12 #include "FairRootManager.h"
14 #include "TClonesArray.h"
66 FairRootManager* ioman = FairRootManager::Instance();
68 cout <<
"-E- CbmTrdSetTracksPidWkn::Init: "
69 <<
"RootManager not instantised!" << endl;
74 fTrackArray = (TClonesArray*) ioman->GetObject(
"TrdTrack");
76 cout <<
"-E- CbmTrdSetTracksPidWkn::Init: No TrdTrack array!" << endl;
81 fTrdHitArray = (TClonesArray*) ioman->GetObject(
"TrdHit");
83 cout <<
"-E- CbmTrdSetTracksPidWkn::Init: No TrdHit array!" << endl;
107 std::vector<float> eLossVectorTmp;
108 std::vector<float> eLossVector;
110 for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
111 eLossVectorTmp.clear();
119 double_t sumEloss = 0.;
120 for (Int_t iHit = 0; iHit < NHits; iHit++) {
137 for (Int_t iTRD = 0; iTRD < NHits; iTRD++) {
140 eLossVectorTmp.push_back((trdHit->
GetELoss()) * 1000000);
144 for (
unsigned int jVec = 0; jVec < eLossVectorTmp.size(); jVec++)
145 eLossVectorTmp[jVec] = (eLossVectorTmp[jVec] -
fEmp) /
fXi - 0.225;
147 sort(eLossVectorTmp.begin(), eLossVectorTmp.end());
149 for (
unsigned int jVec = 0; jVec < eLossVectorTmp.size(); jVec++) {
150 eLossVectorTmp[jVec] = TMath::LandauI(eLossVectorTmp[jVec]);
153 for (
int iHit = 0; iHit <
fnSet; iHit++)
154 eLossVector.push_back(eLossVectorTmp[NHits -
fnSet + iHit]);
158 Double_t S = 0, ty = 0, ti = 0;
165 result_wkn = -
fwkn0 * S;