14 #include "FairBaseParSet.h"
15 #include "FairDetector.h"
16 #include "FairRootManager.h"
17 #include "FairRunAna.h"
18 #include "FairRuntimeDb.h"
20 #include "TClonesArray.h"
23 #include "TObjArray.h"
39 , fTrdHitCollection(NULL)
40 , fTrdDigiCollection(NULL)
41 , fTrdDigiMatchCollection(NULL)
42 , fTrdPointCollection(NULL)
45 , fNoTrdPerStation(-1)
46 , fHitPoolsX(new TH1F(
"fHitPoolsX",
"", 500, -50, 50))
47 , fHitPoolsY(new TH1F(
"fHitPoolsY",
"", 500, -50, 50))
48 , S1L1eTR15(new TH1F(
"S1L1eTR15",
"TR of e- for first layer ", 600, 0., 60.))
50 new TH1F(
"S1L1edEdx15",
"dEdx of e- for first layer ", 600, 0., 60.))
52 new TH1F(
"S1L1edE15",
"dEdx+TR of e- for first layer ", 600, 0., 60.))
54 new TH1F(
"S1L1edEall",
"dEdx+TR of e- for first layer ", 600, 0., 60.))
56 new TH1F(
"S1L1pidE15",
"dEdx+TR of pi- for first layer ", 600, 0., 60.))
58 new TH1F(
"S1L1pidEall",
"dEdx+TR of pi- for first layer ", 600, 0., 60.))
63 new TH1F(
"S3L4edEall",
"dEdx+TR of e- for layer 12", 600, 0., 60.))
66 new TH1F(
"S3L4pidEall",
"dEdx+TR of pi- for layer 12", 600, 0., 60.)) {}
78 FairRootManager*
rootMgr = FairRootManager::Instance();
80 cout <<
"-E- CbmTrdHitProducerQa::Init : "
81 <<
"ROOT manager is not instantiated !" << endl;
88 cout <<
"-W- CbmTrdHitProducerQa::Init : "
89 <<
"no TRD point array !" << endl;
96 cout <<
"-W- CbmTrdHitProducerQa::Init : "
97 <<
"no TRD digi array !" << endl;
104 cout <<
"-W- CbmTrdHitProducerQa::Init : "
105 <<
"no TRD digi match array !" << endl;
112 cout <<
"-W- CbmTrdHitProducerQa::Init : "
113 <<
"no TRD hit array !" << endl;
120 cout <<
"-E- CbmTrdHitProducerQa::Init : No MCTrack array!" << endl;
140 Float_t hitPoolX = 0;
141 Float_t hitPoolY = 0;
147 Float_t pointPosX = 0;
148 Float_t pointPosY = 0;
160 for (Int_t iHit = 0; iHit < nTrdHit; iHit++) {
162 if (NULL == trdHit)
continue;
168 if (NULL == trdDigiMatch)
continue;
172 if (NULL == trdPoint)
continue;
181 momentum = TMath::Sqrt((trdPoint->GetPx() * trdPoint->GetPx())
182 + (trdPoint->GetPy() * trdPoint->GetPy())
183 + (trdPoint->GetPz() * trdPoint->GetPz()));
185 if ((TMath::Abs(partID) == 11) && (momentum > 1.25)
186 && (momentum < 1.75)) {
192 if (TMath::Abs(partID) == 11) {
195 if ((TMath::Abs(partID) == 211) && (momentum > 1.25)
196 && (momentum < 1.75)) {
199 if (TMath::Abs(partID) == 211) {
209 momentum = TMath::Sqrt((trdPoint->GetPx() * trdPoint->GetPx())
210 + (trdPoint->GetPy() * trdPoint->GetPy())
211 + (trdPoint->GetPz() * trdPoint->GetPz()));
213 if (TMath::Abs(partID) == 11) {
216 if (TMath::Abs(partID) == 211) {
224 hitPosX = trdHit->
GetX();
227 pointPosX = trdPoint->GetX();
228 hitPoolX = (hitPosX - pointPosX);
231 hitPosY = trdHit->
GetY();
234 pointPosY = trdPoint->GetY();
235 hitPoolY = (hitPosY - pointPosY);