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 == "") { |
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 |