/[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.1.2.1 by pam-fi, Wed Dec 21 18:24:26 2011 UTC revision 1.4 by pam-fi, Tue Dec 20 17:41:49 2011 UTC
# 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
# Line 131  void TofDedxVsBetaHistoAction::OnGood(Pa Line 150  void TofDedxVsBetaHistoAction::OnGood(Pa
150        badLayers++;        badLayers++;
151    }    }
152    if (badLayers == 0) {    if (badLayers == 0) {
153      dEdx /= _nLayers - badLayers;      dEdx /= _nLayers;
154      Fill(event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12], dEdx);      Fill(event->GetToFLevel2()->GetToFTrkVar(trkSeqNo)->beta[12], dEdx);
155    }    }
156    else    else

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

  ViewVC Help
Powered by ViewVC 1.1.23