60 for (
int i = 0; i < nStations; i++) {
61 fvhHitPullX.push_back(
new TH1F(Form(
"L%iHitPullX", i),
"", 500, -50, 50));
62 fvhHitPullY.push_back(
new TH1F(Form(
"L%iHitPullY", i),
"", 500, -50, 50));
63 fvhHitPullT.push_back(
new TH1F(Form(
"L%iHitPullT", i),
"", 500, -50, 50));
71 fvhHitResX.push_back(
new TH1F(Form(
"L%iHitResX", i),
"", 500, -50, 50));
72 fvhHitResY.push_back(
new TH1F(Form(
"L%iHitResY", i),
"", 500, -50, 50));
73 fvhHitResT.push_back(
new TH1F(Form(
"L%iHitResT", i),
"", 500, -50, 50));
81 fvhedEcut.push_back(
new TH1F(Form(
"L%iedEcut", i), Form(
"dEdx of e- for layer %i, mom. cut", i), 600, 0., 60.));
82 fvhedEall.push_back(
new TH1F(Form(
"L%iedEall", i), Form(
"dEdx of e- for layer %i", i), 600, 0., 60.));
84 fvhpidEcut.push_back(
new TH1F(Form(
"L%ipidEcut", i), Form(
"dEdx of pi- for layer %i, mom. cut", i), 600, 0., 60.));
85 fvhpidEall.push_back(
new TH1F(Form(
"L%ipidEall", i), Form(
"dEdx of pi- for layer %i", i), 600, 0., 60.));
92 fvdECanvas.push_back(
new CbmQaCanvas(Form(
"cL%iEnergyLoss", i), Form(
"Energy Loss Layer %i", i), 2 * 400, 2 * 400));
97 new CbmQaCanvas(Form(
"cL%iPull", i), Form(
"Pull Distribution Layer %i", i), 3 * 400, 2 * 400));
103 FairRootManager*
rootMgr = FairRootManager::Instance();
105 cout <<
"-E- CbmTrdHitProducerQa::Init : "
106 <<
"ROOT manager is not instantiated !" << endl;
113 cout <<
"-W- CbmTrdHitProducerQa::Init : "
114 <<
"no digi manager found !" << endl;
124 cout <<
"-W- CbmTrdHitProducerQa::Init : "
125 <<
"no TRD point array !" << endl;
132 cout <<
"-W- CbmTrdHitProducerQa::Init : "
133 <<
"no TRD hit array !" << endl;
140 cout <<
"-E- CbmTrdHitProducerQa::Init : No MCTrack array!" << endl;
146 cout << GetName() <<
": no TRD match branch in digi manager." << endl;
162 if (
nullptr == trdHit)
continue;
165 if (
nullptr == trdDigiMatch)
continue;
170 if (
nullptr == trdPoint)
continue;
175 cout << GetName() <<
": Warning, TRD plane out of bounds, skipping hit."
183 const int index = trdPoint->GetTrackID();
187 const float momentum = TMath::Sqrt((trdPoint->GetPx() * trdPoint->GetPx()) + (trdPoint->GetPy() * trdPoint->GetPy())
188 + (trdPoint->GetPz() * trdPoint->GetPz()));
194 if (TMath::Abs(partID) == 11) {
202 if (TMath::Abs(partID) == 211) {
207 const float hitPosX = trdHit->
GetX();
208 const float pointPosX = (trdPoint->GetX() + trdPoint->
GetXOut()) / 2.;
209 const float hitResX = hitPosX - pointPosX;
210 const float hitPullX = hitResX / trdHit->
GetDx();
212 const float hitPosY = trdHit->
GetY();
213 const float pointPosY = (trdPoint->GetY() + trdPoint->
GetYOut()) / 2.;
214 const float hitResY = hitPosY - pointPosY;
215 const float hitPullY = hitResY / trdHit->
GetDy();
217 const double hitPosT = trdHit->
GetTime();
218 const double pointPosT = trdPoint->GetTime();
219 const double hitResT = hitPosT - pointPosT;
220 const double hitPullT = hitResT / trdHit->
GetTimeError();