8 #include "FairRootManager.h"
16 #include "TClonesArray.h"
30 : fdegWkn(4), fEmp(2.4), fXi(0.5), fk1(fdegWkn + 1), fnSet(8), fwkn(-1) {
37 FairRootManager* ioman = FairRootManager::Instance();
38 if (ioman !=
nullptr) {
39 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
40 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
41 fStsHits = (TClonesArray*) ioman->GetObject(
"StsHit");
49 std::vector<float> eLossVector;
50 std::vector<float> dEdxAllveto;
53 if (StsTrack == NULL)
return fwkn;
58 if (nClustersWveto < 8)
return fwkn;
61 for (
int iHit = 0; iHit < StsTrack->
GetNofStsHits(); ++iHit) {
66 double x,
y, z, xNext, yNext, zNext;
74 xNext = stsHitNext->
GetX();
75 yNext = stsHitNext->
GetY();
76 zNext = stsHitNext->
GetZ();
77 dr =
sqrt((xNext -
x) * (xNext -
x) + (yNext -
y) * (yNext -
y)
78 + (zNext - z) * (zNext - z))
91 if (!frontCluster || !backCluster)
return fwkn;
93 dEdxAllveto.push_back((frontCluster->
GetCharge()) / dr);
94 dEdxAllveto.push_back((backCluster->
GetCharge()) / dr);
97 if (dEdxAllveto.size() != 0) {
98 unsigned int NSample = dEdxAllveto.size();
100 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
101 dEdxAllveto[jVec] = dEdxAllveto[jVec] / 10000;
103 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
104 dEdxAllveto[jVec] = (dEdxAllveto[jVec] -
fEmp) /
fXi - 0.225;
106 sort(dEdxAllveto.begin(), dEdxAllveto.end());
108 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
109 dEdxAllveto[jVec] = TMath::LandauI(dEdxAllveto[jVec]);
112 for (
int iHit = 0; iHit <
fnSet; iHit++)
113 eLossVector.push_back(dEdxAllveto[NSample -
fnSet + iHit]);
116 Double_t S = 0, ty = 0, ti = 0;
124 Double_t result_wkn = -fwkn0 * S;
131 std::vector<float> eLossVector;
132 std::vector<float> dEdxAllveto;
137 if (nClustersWveto < 8)
return fwkn;
140 for (
int iHit = 0; iHit < StsTrack->
GetNofStsHits(); ++iHit) {
145 double x,
y, z, xNext, yNext, zNext;
153 xNext = stsHitNext->
GetX();
154 yNext = stsHitNext->
GetY();
155 zNext = stsHitNext->
GetZ();
156 dr =
sqrt((xNext -
x) * (xNext -
x) + (yNext -
y) * (yNext -
y)
157 + (zNext - z) * (zNext - z))
170 if (!frontCluster || !backCluster)
return fwkn;
172 dEdxAllveto.push_back((frontCluster->
GetCharge()) / dr);
173 dEdxAllveto.push_back((backCluster->
GetCharge()) / dr);
176 if (dEdxAllveto.size() != 0) {
177 unsigned int NSample = dEdxAllveto.size();
179 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
180 dEdxAllveto[jVec] = dEdxAllveto[jVec] / 10000;
182 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
183 dEdxAllveto[jVec] = (dEdxAllveto[jVec] -
fEmp) /
fXi - 0.225;
185 sort(dEdxAllveto.begin(), dEdxAllveto.end());
187 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
188 dEdxAllveto[jVec] = TMath::LandauI(dEdxAllveto[jVec]);
191 for (
int iHit = 0; iHit <
fnSet; iHit++)
192 eLossVector.push_back(dEdxAllveto[NSample -
fnSet + iHit]);
195 Double_t S = 0, ty = 0, ti = 0;
203 Double_t result_wkn = -fwkn0 * S;