13 #include "FairRootManager.h"
15 #include "TClonesArray.h"
17 #include "TStopwatch.h"
22 #include "P4_F32vec4.h"
53 , fSISType(
"sis300") {}
66 FairRootManager* ioman = FairRootManager::Instance();
68 cout <<
"-E- CbmTrdSetTracksPidModWkn::Init: "
69 <<
"RootManager not instantised!" << endl;
74 fTrackArray = (TClonesArray*) ioman->GetObject(
"TrdTrack");
76 cout <<
"-E- CbmTrdSetTracksPidModWkn::Init: No TrdTrack array!" << endl;
81 fTrdHitArray = (TClonesArray*) ioman->GetObject(
"TrdHit");
83 cout <<
"-E- CbmTrdSetTracksPidModWkn::Init: No TrdHit array!" << endl;
102 float ti = 0, mom = 0;
104 std::vector<float> eLossVector;
114 unsigned short nTracks =
fTrackArray->GetEntriesFast();
115 unsigned short nTrue = 0;
117 for (
unsigned short itr = 0; itr < nTracks; itr++) {
125 for (
unsigned short itrack = 0; itrack < nTrue; itrack++) {
133 fEmp = 0.0002598 * mom * mom * mom - 0.008862 * mom * mom + 0.1176 * mom
135 fXi = 0.00008938 * mom * mom * mom - 0.003022 * mom * mom + 0.03999 * mom
138 for (Int_t iHit = 0; iHit < NHits; iHit++) {
141 eLossVector.push_back((trdHit->
GetELoss()) * 1000000);
144 for (
unsigned int jVec = 0; jVec < eLossVector.size(); jVec++)
145 eLossVector[jVec] = (eLossVector[jVec] -
fEmp) /
fXi - 0.225;
147 sort(eLossVector.begin(), eLossVector.end());
149 for (
unsigned int jVec = 0; jVec < eLossVector.size(); jVec++)
150 eLossVector[jVec] = TMath::LandauI(eLossVector[jVec]);
152 for (Int_t iHit = 0; iHit <
fnSet; iHit++)
153 mWkn[iHit][iV] = eLossVector[NHits -
fnSet + iHit];
157 if (!((iV ==
fvecLen) || ((itrack == (nTrue - 1)) && (iV != 0))))
continue;
160 for (Int_t iHit = 0; iHit <
fnSet; iHit++) {
165 for (
int iPow = 0; iPow < 5; iPow++) {
177 for (Int_t iHit = 0; iHit < iV; iHit++) {
190 static Double_t rtime = 0;
191 rtime += timer.RealTime();
192 static Double_t ctime = 0;
193 ctime += timer.CpuTime();
194 cout << endl << endl;
195 cout <<
"--CbmTrdSetTracksPidModWkn--" << endl;
196 cout <<
"Real time " << (rtime / Double_t(nEv)) <<
" s, CPU time "
197 << (ctime / Double_t(nEv)) <<
"s" << endl