/[PAMELA software]/PamCut/CollectionActions/TofDedxVsBetaHistoAction/TofDedxVsBetaHistoAction.cpp
ViewVC logotype

Diff of /PamCut/CollectionActions/TofDedxVsBetaHistoAction/TofDedxVsBetaHistoAction.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by pam-fi, Wed Aug 5 13:57:19 2009 UTC revision 1.2 by pam-fi, Fri Aug 14 10:34:02 2009 UTC
# Line 10  Line 10 
10  #include "TofDedxVsBetaHistoAction.h"  #include "TofDedxVsBetaHistoAction.h"
11    
12  TofDedxVsBetaHistoAction::TofDedxVsBetaHistoAction(const char *actionName, TString outFileName, unsigned int layers,  TofDedxVsBetaHistoAction::TofDedxVsBetaHistoAction(const char *actionName, TString outFileName, unsigned int layers,
13      TString mode, float minDedx, float maxDedx, unsigned int nBinsDedx, float minBeta, float maxBeta,      TString mode, bool standAlone, float minDedx, float maxDedx, unsigned int nBinsDedx, float minBeta, float maxBeta,
14      unsigned int nBinsBeta) :      unsigned int nBinsBeta) :
15    CollectionAction(actionName), _outFileName(outFileName), _layers(layers), _nLayers(0), _badEvents(0), _histo(), _mode(mode) {    CollectionAction(actionName), _outFileName(outFileName), _layers(layers), _nLayers(0), _badEvents(0), _histo(),
16          _mode(mode), _standAlone(standAlone) {
17    
18    _histo.SetName(GetName());    _histo.SetName(GetName());
19    TString title = "TOF dE/dx (";    TString title = "TOF dE/dx (";
# Line 63  void TofDedxVsBetaHistoAction::OnGood(Pa Line 64  void TofDedxVsBetaHistoAction::OnGood(Pa
64    float dEdx = 0.;    float dEdx = 0.;
65    float dEdxLayer = 0.;    float dEdxLayer = 0.;
66    unsigned int badLayers = 0;    unsigned int badLayers = 0;
67    int trkSeqNo = event->GetTrack(0)->GetToFTrack()->trkseqno;  
68      int trkSeqNo;
69      if (_standAlone)
70        trkSeqNo = 0;
71      else
72        trkSeqNo = event->GetTrack(0)->GetToFTrack()->trkseqno;
73    
74    if ((_layers & S11) == S11) {    if ((_layers & S11) == S11) {
75      dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 0, 100);      dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 0, 100);
# Line 108  void TofDedxVsBetaHistoAction::OnGood(Pa Line 114  void TofDedxVsBetaHistoAction::OnGood(Pa
114        badLayers++;        badLayers++;
115    }    }
116    if (badLayers == 0) {    if (badLayers == 0) {
117      dEdx /= _nLayers-badLayers;      dEdx /= _nLayers - badLayers;
118      _histo.Fill(event->GetTrack(0)->GetToFTrack()->beta[12], dEdx);      _histo.Fill(event->GetTrack(0)->GetToFTrack()->beta[12], dEdx);
119    }    }
120    else    else

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23