41 FairRootManager* ioman = FairRootManager::Instance();
42 if (ioman !=
nullptr) {
43 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
44 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
45 fStsHits = (TClonesArray*) ioman->GetObject(
"StsHit");
54 std::vector<float> eLossVector;
55 std::vector<float> dEdxAllveto;
58 if (StsTrack == NULL)
return fwkn;
61 if (nClustersWveto < 8)
return fwkn;
64 for (
int iHit = 0; iHit < StsTrack->
GetNofStsHits(); ++iHit) {
69 double x,
y, z, xNext, yNext, zNext;
76 xNext = stsHitNext->
GetX();
77 yNext = stsHitNext->
GetY();
78 zNext = stsHitNext->
GetZ();
79 dr =
sqrt((xNext -
x) * (xNext -
x) + (yNext -
y) * (yNext -
y) + (zNext - z) * (zNext - z))
90 if (!frontCluster || !backCluster)
return fwkn;
92 dEdxAllveto.push_back((frontCluster->
GetCharge()) / dr);
93 dEdxAllveto.push_back((backCluster->
GetCharge()) / dr);
96 if (dEdxAllveto.size() != 0) {
97 unsigned int NSample = dEdxAllveto.size();
99 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
100 dEdxAllveto[jVec] = dEdxAllveto[jVec] / 10000;
102 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
103 dEdxAllveto[jVec] = (dEdxAllveto[jVec] -
fEmp) /
fXi - 0.225;
105 sort(dEdxAllveto.begin(), dEdxAllveto.end());
107 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
108 dEdxAllveto[jVec] = TMath::LandauI(dEdxAllveto[jVec]);
111 for (
int iHit = 0; iHit <
fnSet; iHit++)
112 eLossVector.push_back(dEdxAllveto[NSample -
fnSet + iHit]);
115 Double_t S = 0, ty = 0, ti = 0;
117 for (Int_t i = 0; i <
fnSet; i++) {
123 Double_t result_wkn = -fwkn0 * S;
131 std::vector<float> eLossVector;
132 std::vector<float> dEdxAllveto;
135 if (nClustersWveto < 8)
return fwkn;
138 for (
int iHit = 0; iHit < StsTrack->
GetNofStsHits(); ++iHit) {
143 double x,
y, z, xNext, yNext, zNext;
150 xNext = stsHitNext->
GetX();
151 yNext = stsHitNext->
GetY();
152 zNext = stsHitNext->
GetZ();
153 dr =
sqrt((xNext -
x) * (xNext -
x) + (yNext -
y) * (yNext -
y) + (zNext - z) * (zNext - z))
164 if (!frontCluster || !backCluster)
return fwkn;
166 dEdxAllveto.push_back((frontCluster->
GetCharge()) / dr);
167 dEdxAllveto.push_back((backCluster->
GetCharge()) / dr);
170 if (dEdxAllveto.size() != 0) {
171 unsigned int NSample = dEdxAllveto.size();
173 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
174 dEdxAllveto[jVec] = dEdxAllveto[jVec] / 10000;
176 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
177 dEdxAllveto[jVec] = (dEdxAllveto[jVec] -
fEmp) /
fXi - 0.225;
179 sort(dEdxAllveto.begin(), dEdxAllveto.end());
181 for (
unsigned int jVec = 0; jVec < NSample; jVec++)
182 dEdxAllveto[jVec] = TMath::LandauI(dEdxAllveto[jVec]);
185 for (
int iHit = 0; iHit <
fnSet; iHit++)
186 eLossVector.push_back(dEdxAllveto[NSample -
fnSet + iHit]);
189 Double_t S = 0, ty = 0, ti = 0;
191 for (Int_t i = 0; i <
fnSet; i++) {
197 Double_t result_wkn = -fwkn0 * S;