15 #include "FairRootManager.h"
25 , fHistoList_tomography()
28 , fhTomography_XZ(NULL)
29 , fhTomography_YZ(NULL)
30 , fhTomography_uptoRICH(NULL)
31 , fhTomography_RICH_complete(NULL)
32 , fhTomography_RICH_beampipe(NULL)
33 , fhTomography_STS_end(NULL)
34 , fhTomography_STS_lastStation(NULL)
35 , fhTomography_RICH_frontplate(NULL)
36 , fhTomography_RICH_backplate(NULL)
38 , fhConversion_cut(NULL)
39 , fhConversion_inSTS(NULL)
40 , fhConversion_prob(NULL)
41 , fhConversion_energy(NULL)
42 , fhConversion_p(NULL)
43 , fhConversion_vs_momentum(NULL)
44 , fhTomography_reco(NULL)
45 , fhTomography_reco_XZ(NULL)
46 , fhTomography_reco_YZ(NULL)
47 , fhConversion_reco(NULL)
50 , conversionsInDetector()
53 fhConversionsPerDetector(NULL)
54 , fhConversionsPerDetectorPE(NULL)
64 FairRootManager* ioman = FairRootManager::Instance();
66 Fatal(
"CbmAnaConversionTomography::Init",
"RootManager not instantised!");
69 fMcTracks = (TClonesArray*) ioman->GetObject(
"MCTrack");
71 Fatal(
"CbmAnaConversion::Init",
"No MCTrack array!");
82 fhGammaZ =
new TH1D(
"fhGammaZ",
"fhGammaZ;Z in cm;Entries", 300, 0.0, 300.);
87 "Tomography/fhTomography;X in cm;Y in cm;Z in cm",
98 "fhTomography_XZ;X in cm;Z in cm",
106 "fhTomography_YZ;Y in cm;Z in cm",
122 "fhTomography_uptoRICH;X in cm;Y in cm",
130 new TH2D(
"fhTomography_RICH_complete",
131 "fhTomography_RICH_complete;X in cm;Y in cm",
139 new TH2D(
"fhTomography_RICH_beampipe",
140 "fhTomography_RICH_beampipe;X in cm;Y in cm",
148 "fhTomography_STS_end;X in cm;Y in cm",
156 new TH2D(
"fhTomography_STS_lastStation",
157 "fhTomography_STS_lastStation;X in cm;Y in cm",
165 new TH2D(
"fhTomography_RICH_frontplate",
166 "fhTomography_RICH_frontplate;X in cm;Y in cm",
174 new TH2D(
"fhTomography_RICH_backplate",
175 "fhTomography_RICH_backplate;X in cm;Y in cm",
192 "fhConversion",
"fhConversion;Z in cm;# conversions", 4800, -0.5, 1199.5);
194 "fhConversion_cut;Z in cm;# conversions",
199 "fhConversion in STS;Z in cm;# conversions",
204 "fhConversion_prob;Z in cm;# conversions",
214 "fhConversion_energy",
"fhConversion_energy;energy;#", 1000, 0., 100.);
216 new TH1D(
"fhConversion_p",
"fhConversion_p;p;#", 1000, 0., 100.);
221 new TH2D(
"fhConversion_vs_momentum",
222 "fhConversion_vs_momentum;Z in cm;momentum in GeV/c",
232 "fhConversionsPerDetector",
"fhConversionsPerDetector;;#", 5, 0, 5);
241 new TH2I(
"fhConversionsPerDetectorPE",
242 "fhConversionsPerDetectorPE;;conversions per event",
266 "fhTomography_reco;X in cm;Y in cm;Z in cm",
277 "fhTomography_reco_XZ;X in cm;Z in cm",
285 "fhTomography_reco_YZ;Y in cm;Z in cm",
293 "fhConversion_reco;Z in cm;# conversions",
306 gDirectory->mkdir(
"Tomography");
307 gDirectory->cd(
"Tomography");
311 gDirectory->cd(
"..");
313 cout <<
"CbmAnaConversionTomography: Realtime - " <<
fTime << endl;
328 Int_t nofMcTracks =
fMcTracks->GetEntriesFast();
329 for (
int i = 0;
i < nofMcTracks;
i++) {
331 if (mctrack == NULL)
continue;
333 if (TMath::Abs(mctrack->
GetPdgCode()) == 11) {
335 if (motherId == -1)
continue;
347 std::multimap<int, int> electronMap;
354 for (std::map<int, int>::iterator it = electronMap.begin();
355 it != electronMap.end();
357 if (it == electronMap.begin()) {
360 std::map<int, int>::iterator zwischen = it;
363 int id_old = zwischen->first;
467 if (
v.z() >= 0 &&
v.Z() <= 170) {
470 if (
v.z() >= 170 &&
v.Z() <= 400) {
489 if (
v.z() >= 179 &&
v.Z() <= 181) {
492 if (
v.z() >= 369 &&
v.Z() <= 371) {
501 if ((TMath::Abs(
v.X()) <= 100 && TMath::Abs(
v.X()) > 3)
502 && (TMath::Abs(
v.Y()) <= 50 && TMath::Abs(
v.Y()) > 3)
503 && TMath::Abs(
v.Z()) <= 169) {
508 if (
v.z() >= 170 &&
v.Z() <= 380) {
514 if (
v.z() >= 405 &&
v.Z() <= 595) {
520 if (
v.z() > 598 &&
v.Z() <= 730) {
525 if ((TMath::Abs(
v.X()) <= 100 && TMath::Abs(
v.X()) > 3)
526 && (TMath::Abs(
v.Y()) <= 65 && TMath::Abs(
v.Y()) > 3)
527 && TMath::Abs(
v.Z()) <= 105) {
532 if ((TMath::Abs(
v.X()) > 100 || TMath::Abs(
v.Y()) > 65)
533 && TMath::Abs(
v.Z()) <= 169) {
546 if (TMath::Abs(mctrack->
GetPdgCode()) == 11) {
548 if (motherId != -1) {
550 int mcMotherPdg = -1;
551 if (NULL != mother) mcMotherPdg = mother->
GetPdgCode();
553 if (mcMotherPdg == 22) {
576 Bool_t result =
false;
577 if (np_sts > 0 || np_rich > 0 || np_trd > 0 || np_tof > 0) { result =
true; }