/[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.2 by pam-fi, Tue Jan 3 08:45:27 2012 UTC revision 1.5 by pam-fi, Tue Jan 3 08:57:21 2012 UTC
# Line 93  void TofDedxVsBetaHistoAction::OnGood(Pa Line 93  void TofDedxVsBetaHistoAction::OnGood(Pa
93    badLayers = 0;    badLayers = 0;
94    if ((_layers & S11) == S11) {    if ((_layers & S11) == S11) {
95      dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 0, 100);      dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 0, 100);
96        // Patch to exclude S115b
97        ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(idx);
98        bool has8 = false, has9 = false;
99        float dedx9 = 0.;
100        for (Int_t ib = 0; ib < tofTrk->npmtadc; ib++) {
101          if (tofTrk->pmtadc[ib] == 8) {
102            has8 = true;
103          }
104          if (tofTrk->pmtadc[ib] == 9) {
105            has9 = true;
106            dedx9 = tofTrk->dedx[ib];
107          }
108        }
109    
110        if (has9) {
111          dEdxLayer -= (dedx9 / ((int) has8 + 1));
112          dEdxLayer *= 2.;
113        }
114        //End of patch
115      if (dEdxLayer > 0. && dEdxLayer < 4090)      if (dEdxLayer > 0. && dEdxLayer < 4090)
116        dEdx += dEdxLayer;        dEdx += dEdxLayer;
117      else      else
# Line 134  void TofDedxVsBetaHistoAction::OnGood(Pa Line 153  void TofDedxVsBetaHistoAction::OnGood(Pa
153        badLayers++;        badLayers++;
154    }    }
155    if (badLayers == 0) {    if (badLayers == 0) {
156      dEdx /= _nLayers - badLayers;      dEdx /= _nLayers;
157      Fill(event->GetToFLevel2()->GetToFTrkVar(idx)->beta[12], dEdx);      Fill(event->GetToFLevel2()->GetToFTrkVar(idx)->beta[12], dEdx);
158    }    }
159    else    else

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23