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

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

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

revision 1.3 by pam-fi, Thu Aug 12 15:14:31 2010 UTC revision 1.4 by pam-fi, Tue Dec 20 17:41:49 2011 UTC
# Line 11  Line 11 
11    
12  TofDedxVsBetaHistoAction::TofDedxVsBetaHistoAction(const char *actionName, unsigned int layers, bool standAlone,  TofDedxVsBetaHistoAction::TofDedxVsBetaHistoAction(const char *actionName, unsigned int layers, bool standAlone,
13      TString outFileBase, TString mode, bool outRoot, bool outText, TString title) :      TString outFileBase, TString mode, bool outRoot, bool outText, TString title) :
14    Histo2DAction<Int_t> (actionName, title, outFileBase, mode, outRoot, outText), _layers(layers), _nLayers(0),      Histo2DAction<Int_t>(actionName, title, outFileBase, mode, outRoot, outText), _layers(layers), _nLayers(0), _badEvents(
15        _badEvents(0), _standAlone(standAlone) {          0), _standAlone(standAlone) {
16    
17    bool buildTitle = false;    bool buildTitle = false;
18    if (title == "") {    if (title == "") {
# Line 90  void TofDedxVsBetaHistoAction::OnGood(Pa Line 90  void TofDedxVsBetaHistoAction::OnGood(Pa
90    badLayers = 0;    badLayers = 0;
91    if ((_layers & S11) == S11) {    if ((_layers & S11) == S11) {
92      dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 0, 100);      dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 0, 100);
93        // Patch to exclude S115b
94        ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo);
95        bool has8 = false, has9 = false;
96        float dedx9 = 0.;
97        for (Int_t ib = 0; ib < tofTrk->npmtadc; ib++) {
98          if (tofTrk->pmtadc[ib] == 8) {
99            has8 = true;
100          }
101          if (tofTrk->pmtadc[ib] == 9) {
102            has9 = true;
103            dedx9 = tofTrk->dedx[ib];
104          }
105        }
106    
107        if (has9) {
108          dEdxLayer -= (dedx9 / ((int) has8 + 1));
109          dEdxLayer *= 2.;
110        }
111        //End of patch
112      if (dEdxLayer > 0. && dEdxLayer < 4090)      if (dEdxLayer > 0. && dEdxLayer < 4090)
113        dEdx += dEdxLayer;        dEdx += dEdxLayer;
114      else      else

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23