CMS 3D CMS Logo

GflashHistogram.cc
Go to the documentation of this file.
2 
4 
6  if (instance_ == nullptr)
8  return instance_;
9 }
10 
12 
14  histFile_ = new TFile(histFileName.c_str(), "RECREATE");
15 
16  TH1::AddDirectory(kTRUE);
17 
18  histFile_->mkdir("GflashEMShowerProfile");
19  histFile_->cd("GflashEMShowerProfile");
20 
21  em_incE = new TH1F("em_incE", "Incoming energy at Ecal;E (GeV);Number of Events", 500, 0.0, 500.0);
22  em_ssp_rho = new TH1F("em_ssp_rho", "Shower starting position;#rho (cm);Number of Events", 100, 100.0, 200.0);
23  em_ssp_z = new TH1F("em_ssp_z", "Shower starting position;z (cm);Number of Events", 800, -400.0, 400.0);
24  em_long = new TH1F("em_long", "Longitudinal Profile;Radiation Length;Number of Spots", 100, 0.0, 50.0);
25  em_lateral = new TH2F(
26  "em_lateral", "Lateral Profile vs. Shower Depth;Radiation Length;Moliere Radius", 100, 0.0, 50.0, 100, 0.0, 3.0);
27  em_long_sd = new TH1F("em_long_sd",
28  "Longitudinal Profile in Sensitive Detector;Radiation "
29  "Length;Number of Spots",
30  100,
31  0.0,
32  50.0);
33  em_lateral_sd = new TH2F("em_lateral_sd",
34  "Lateral Profile vs. Shower Depth in Sensitive "
35  "Detector;Radiation Length;Moliere Radius",
36  100,
37  0.0,
38  50.0,
39  100,
40  0.0,
41  3.0);
42  em_nSpots_sd = new TH1F("em_nSpots_sd",
43  "Number of Gflash Spots in Sensitive Detector;Number "
44  "of Spots;Number of Events",
45  1000,
46  0.0,
47  100000);
48 
49  histFile_->mkdir("GflashHadronShowerModel");
50  histFile_->cd("GflashHadronShowerModel");
51 
52  preStepPosition = new TH1F("preStepPosition", "PreStep Position Shower", 500, 120.0, 270.);
53  postStepPosition = new TH1F("postStepPosition", "PostStep Position Shower", 500, 120.0, 270.);
54  deltaStep = new TH1F("deltaStep", "Delta Step", 200, 0.0, 100.);
55  kineticEnergy = new TH1F("kineticEnergy", "Kinetic Energy", 200, 0.0, 200.);
56  energyLoss = new TH1F("energyLoss", "Energy Loss", 200, 0.0, 200.);
57  energyRatio = new TH1F("energyRatio", "energyLeading/energyTotal", 200, 0.0, 1.);
58 
59  histFile_->mkdir("GflashHadronShowerProfile");
60  histFile_->cd("GflashHadronShowerProfile");
61 
62  rshower = new TH1F("rshower", "Lateral Lever", 200, 0., 100.);
63  lateralx = new TH1F("lateralx", "Lateral-X Distribution", 200, -100., 100.);
64  lateraly = new TH1F("lateraly", "Lateral-Y Distribution", 200, -100., 100.);
65  gfhlongProfile = new TH2F("gfhlongProfile", "Longitudinal Profile (all hits)", 160, 0.0, 160., 60, 125, 245);
66 
67  histFile_->mkdir("GflashWatcher");
68  histFile_->cd("GflashWatcher");
69 
70  g4vertexTrack = new TH1F("g4vertexTrack", "Vertex of Track", 300, 0.0, 300.);
71  g4stepCharge = new TH2F("g4stepCharge", "Geant4 Step Charge", 300, 120., 420, 5, -2.5, 2.5);
72  g4nSecondary = new TH1F("g4nSecondary", "number of Secondaries", 100, 0.0, 100.);
73  g4pidSecondary = new TH1F("g4pidSecondary", "PID of Secondaries", 3000, -500.0, 2500.);
74 
75  g4energySecondary = new TH1F("g4energySecondary", "Kinetic Energy of Secondaries", 300, 0.0, 15.);
76  g4energyPi0 = new TH1F("g4energyPi0", "Kinetic Energy of Pi0", 300, 0.0, 15.);
77  g4energyElectron = new TH1F("g4energyElectron", "Kinetic Energy of Electron", 300, 0.0, 15.);
78  g4energyPhoton = new TH1F("g4energyPhoton", "Kinetic Energy of Photon", 300, 0.0, 15.);
79 
80  g4totalEnergySecPhoton = new TH1F("g4totalEnergySecPhoton", "Total Kinetic Energy of Sec Photon", 300, 0.0, 3.);
81  g4totalEnergySecElectron = new TH1F("g4toalEnergySecElectron", "Total Kinetic Energy of Sec Electron", 300, 0.0, 3.);
82  g4totalEnergySecPi0 = new TH1F("g4totalEnergySecPi0", "Total Kinetic Energy of Sec Pi0", 300, 0.0, 30.);
83 
84  g4energyEM = new TH1F("energyEM", "EM Energy", 600, 0.0, 150.0);
85  g4energyHad = new TH1F("energyHad", "Had Energy", 600, 0.0, 150.0);
86  g4energyTotal = new TH1F("energyTotal", "Total Energy", 600, 0.0, 150.0);
87  g4energyEMMip = new TH1F("energyEMMip", "EM Energy (MIP)", 100, 0.0, 2.0);
88  g4energyHadMip = new TH1F("energyHadMip", "Had Energy (MIP)", 600, 0.0, 150.0);
89  g4energyMip = new TH1F("energyMip", "Total Energy (MIP)", 600, 0.0, 150.0);
90  g4energyEMvsHad = new TH2F("energyEMvsHad", "EM Energy", 600, 0.0, 150.0, 600, 0.0, 150.0);
91 
92  g4energySensitiveEM = new TH1F("energySensitiveEM", "Sensitive EM Energy", 600, 0.0, 150.0);
93  g4energySensitiveHad = new TH1F("energySensitiveHad", "Sensitive Had Energy", 600, 0.0, 150.0);
94  g4energySensitiveTotal = new TH1F("energySensitiveTotal", "Sensitive Total Energy", 600, 0.0, 150.0);
95  g4energyHybridTotal = new TH1F("energyHybridTotal", "Hybrid Total Energy", 600, 0.0, 150.0);
96  g4energySensitiveEMMip = new TH1F("energySensitiveEMMip", "Sensitive EM Energy (MIP)", 100, 0.0, 2.0);
98  new TH2F("energySensitiveEMvsHad", "Sensitive EM Energy vs Had", 600, 0.0, 150.0, 600, 0.0, 150.0);
99 
100  g4energyEMProfile = new TH2F("energyEMProfile", "EM Energy Profile", 600, 0.0, 150.0, 60, 125, 245);
101  g4energyHadProfile = new TH2F("energyHadProfile", "Had Energy Profile", 600, 0.0, 150.0, 60, 125, 245);
102  g4energyTotalProfile = new TH2F("energyTotalProfile", "Total Energy Profile", 600, 0.0, 150.0, 60, 125, 245);
103  g4energyHybridProfile = new TH2F("energyHybridProfile", "Hybrid Energy Profile", 600, 0.0, 150.0, 60, 125, 245);
104 
105  g4ssp = new TH1F("g4ssp", "Shower Starting Position", 160, 120.0, 280.);
106  g4energy = new TH1F("g4energy", "Energy at Shower Starting Position", 600, 0.0, 150.0);
107  g4energyLoss = new TH1F("g4energyLoss", "Energy Loss", 600, 0.0, 150.);
108  g4momentum = new TH1F("g4momentum", "Momentum/GeV at Shower Starting Position", 300, 0.0, 150.0);
109  g4charge = new TH1F("g4charge", "Track Charge at Shower Starting Position", 10, -5.0, 5.0);
110 
111  g4rshower = new TH2F("g4rshower", "rshower", 200, 0., 40, 25, 125., 250);
112  g4rshowerR1 = new TH2F("g4rshowerR1", "rshower vs depth ssp=127-129", 200, 0., 40, 40, 0.0, 160.);
113  g4rshowerR2 = new TH2F("g4rshowerR2", "rshower vs depth ssp=131-133", 200, 0., 40, 40, 0.0, 160.);
114  g4rshowerR3 = new TH2F("g4rshowerR3", "rshower vs depth ssp=173-175", 200, 0., 40, 40, 0.0, 160.);
115 
116  g4lateralXY = new TH2F("g4lateralXY", "Lateral Profile XY", 160, -40., 40, 25, 125., 250);
117  g4lateralRZ = new TH2F("g4lateralRZ", "Lateral Profile RZ", 160, -40., 40, 25, 125., 250);
118  g4spotXY = new TH2F("g4spotXY", "x-y of spots in global coordinate", 800, -400., 400., 800, -400.0, 400.0);
119  g4spotRZ = new TH2F("g4spotRZ", "r-z of spots in global coordinate", 1200, -1500., 1500., 400, .0, 400.0);
120  g4spotRZ0 = new TH2F("g4spotRZ0", "all r-z of spots in global coordinate", 1200, -1500., 1500., 400, .0, 400.0);
121 
122  g4stepRho = new TH1F("g4stepRho", "rho of Geant4 Step", 200, 120., 320.);
123  g4trajectoryPhi0 = new TH1F("g4trajectoryPhi0", "trajectory Phi0", 2000, -5., 5.);
124 
125  g4trajectoryXY = new TH2F("g4trajectoryXY", "trajectory x-y", 800, -400.0, 400.0, 800, -400.0, 400.0);
126  g4trajectoryRZ = new TH2F("g4trajectoryRZ", "trajectory r-z ", 1200, -600.0, 600.0, 400, 0.0, 400.0);
127 
128  g4longProfile = new TH2F("g4longProfile", "Longitudinal Profile (all hits)", 160, 0.0, 160., 60, 125, 245);
130  new TH2F("g4longDetector", "Longitudinal Profile (hits inisde detectors)", 160, 0.0, 160., 60, 125, 245);
131  g4longSensitive = new TH2F("g4longSensitive", "Longitudinal Profile (Sensitive)", 160, 0.0, 160., 60, 125, 245);
132 }
133 
135  histFile_->cd();
136  histFile_->Write();
137  histFile_->Close();
138 }
GflashHistogram::g4energyHybridProfile
TH2F * g4energyHybridProfile
Definition: GflashHistogram.h:96
GflashHistogram::g4rshowerR2
TH2F * g4rshowerR2
Definition: GflashHistogram.h:106
GflashHistogram::g4trajectoryRZ
TH2F * g4trajectoryRZ
Definition: GflashHistogram.h:114
GflashHistogram::postStepPosition
TH1F * postStepPosition
Definition: GflashHistogram.h:50
funct::false
false
Definition: Factorize.h:29
GflashHistogram::g4spotXY
TH2F * g4spotXY
Definition: GflashHistogram.h:110
GflashHistogram::g4energyTotal
TH1F * g4energyTotal
Definition: GflashHistogram.h:80
GflashHistogram::g4energyHybridTotal
TH1F * g4energyHybridTotal
Definition: GflashHistogram.h:89
GflashHistogram::g4lateralXY
TH2F * g4lateralXY
Definition: GflashHistogram.h:108
GflashHistogram::g4ssp
TH1F * g4ssp
Definition: GflashHistogram.h:98
GflashHistogram::g4energyEMvsHad
TH2F * g4energyEMvsHad
Definition: GflashHistogram.h:84
GflashHistogram::g4rshowerR1
TH2F * g4rshowerR1
Definition: GflashHistogram.h:105
GflashHistogram::g4rshower
TH2F * g4rshower
Definition: GflashHistogram.h:104
GflashHistogram::g4pidSecondary
TH1F * g4pidSecondary
Definition: GflashHistogram.h:68
GflashHistogram::g4energyMip
TH1F * g4energyMip
Definition: GflashHistogram.h:83
GflashHistogram::kineticEnergy
TH1F * kineticEnergy
Definition: GflashHistogram.h:52
GflashHistogram::g4nSecondary
TH1F * g4nSecondary
Definition: GflashHistogram.h:67
GflashHistogram::em_nSpots_sd
TH1F * em_nSpots_sd
Definition: GflashHistogram.h:45
GflashHistogram
Definition: GflashHistogram.h:16
GflashHistogram::em_ssp_z
TH1F * em_ssp_z
Definition: GflashHistogram.h:40
GflashHistogram::gfhlongProfile
TH2F * gfhlongProfile
Definition: GflashHistogram.h:61
GflashHistogram::em_ssp_rho
TH1F * em_ssp_rho
Definition: GflashHistogram.h:39
GflashHistogram::g4energySensitiveEMMip
TH1F * g4energySensitiveEMMip
Definition: GflashHistogram.h:90
GflashHistogram::deltaStep
TH1F * deltaStep
Definition: GflashHistogram.h:51
GflashHistogram::g4energyEMProfile
TH2F * g4energyEMProfile
Definition: GflashHistogram.h:93
GflashHistogram::g4spotRZ
TH2F * g4spotRZ
Definition: GflashHistogram.h:111
GflashHistogram::g4trajectoryXY
TH2F * g4trajectoryXY
Definition: GflashHistogram.h:113
GflashHistogram::g4energySensitiveHad
TH1F * g4energySensitiveHad
Definition: GflashHistogram.h:87
GflashHistogram::g4totalEnergySecPhoton
TH1F * g4totalEnergySecPhoton
Definition: GflashHistogram.h:76
GflashHistogram::g4totalEnergySecElectron
TH1F * g4totalEnergySecElectron
Definition: GflashHistogram.h:75
GflashHistogram.h
GflashHistogram::histFile_
TFile * histFile_
Definition: GflashHistogram.h:35
GflashHistogram::g4stepCharge
TH2F * g4stepCharge
Definition: GflashHistogram.h:66
GflashHistogram::g4energyHadProfile
TH2F * g4energyHadProfile
Definition: GflashHistogram.h:94
GflashHistogram::g4energyPhoton
TH1F * g4energyPhoton
Definition: GflashHistogram.h:72
GflashHistogram::g4energyEM
TH1F * g4energyEM
Definition: GflashHistogram.h:78
GflashHistogram::em_lateral
TH2F * em_lateral
Definition: GflashHistogram.h:42
GflashHistogram::g4momentum
TH1F * g4momentum
Definition: GflashHistogram.h:101
GflashHistogram::g4energySensitiveEMvsHad
TH2F * g4energySensitiveEMvsHad
Definition: GflashHistogram.h:91
GflashHistogram::g4energyLoss
TH1F * g4energyLoss
Definition: GflashHistogram.h:100
GflashHistogram::g4energySensitiveTotal
TH1F * g4energySensitiveTotal
Definition: GflashHistogram.h:88
GflashHistogram::g4vertexTrack
TH1F * g4vertexTrack
Definition: GflashHistogram.h:65
GflashHistogram::em_lateral_sd
TH2F * em_lateral_sd
Definition: GflashHistogram.h:44
GflashHistogram::g4energyEMMip
TH1F * g4energyEMMip
Definition: GflashHistogram.h:81
GflashHistogram::g4lateralRZ
TH2F * g4lateralRZ
Definition: GflashHistogram.h:109
GflashHistogram::em_long
TH1F * em_long
Definition: GflashHistogram.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GflashHistogram::g4longDetector
TH2F * g4longDetector
Definition: GflashHistogram.h:120
GflashHistogram::g4spotRZ0
TH2F * g4spotRZ0
Definition: GflashHistogram.h:112
GflashHistogram::g4energy
TH1F * g4energy
Definition: GflashHistogram.h:99
GflashHistogram::instance
static GflashHistogram * instance()
Definition: GflashHistogram.cc:5
GflashHistogram::~GflashHistogram
~GflashHistogram() override
Definition: GflashHistogram.cc:134
GflashHistogram::g4longSensitive
TH2F * g4longSensitive
Definition: GflashHistogram.h:121
GflashHistogram::em_incE
TH1F * em_incE
Definition: GflashHistogram.h:38
GflashHistogram::bookHistogram
void bookHistogram(std::string histFileName="gflash_histogram.root")
Definition: GflashHistogram.cc:13
GflashHistogram::g4totalEnergySecPi0
TH1F * g4totalEnergySecPi0
Definition: GflashHistogram.h:74
GflashHistogram::energyRatio
TH1F * energyRatio
Definition: GflashHistogram.h:54
GflashHistogram::rshower
TH1F * rshower
Definition: GflashHistogram.h:58
GflashHistogram::lateraly
TH1F * lateraly
Definition: GflashHistogram.h:60
GflashHistogram::g4energyTotalProfile
TH2F * g4energyTotalProfile
Definition: GflashHistogram.h:95
GflashHistogram::g4energySensitiveEM
TH1F * g4energySensitiveEM
Definition: GflashHistogram.h:86
GflashHistogram::g4rshowerR3
TH2F * g4rshowerR3
Definition: GflashHistogram.h:107
GflashHistogram::lateralx
TH1F * lateralx
Definition: GflashHistogram.h:59
GflashHistogram::g4energyHad
TH1F * g4energyHad
Definition: GflashHistogram.h:79
GflashHistogram::g4energyPi0
TH1F * g4energyPi0
Definition: GflashHistogram.h:70
GflashHistogram::g4longProfile
TH2F * g4longProfile
Definition: GflashHistogram.h:119
GflashHistogram::em_long_sd
TH1F * em_long_sd
Definition: GflashHistogram.h:43
GflashHistogram::energyLoss
TH1F * energyLoss
Definition: GflashHistogram.h:53
GflashHistogram::GflashHistogram
GflashHistogram()
Definition: GflashHistogram.cc:11
GflashHistogram::instance_
static GflashHistogram * instance_
Definition: GflashHistogram.h:124
GflashHistogram::g4energyElectron
TH1F * g4energyElectron
Definition: GflashHistogram.h:71
GflashHistogram::g4stepRho
TH1F * g4stepRho
Definition: GflashHistogram.h:116
GflashHistogram::g4trajectoryPhi0
TH1F * g4trajectoryPhi0
Definition: GflashHistogram.h:117
GflashHistogram::preStepPosition
TH1F * preStepPosition
Definition: GflashHistogram.h:49
GflashHistogram::g4energyHadMip
TH1F * g4energyHadMip
Definition: GflashHistogram.h:82
GflashHistogram::g4energySecondary
TH1F * g4energySecondary
Definition: GflashHistogram.h:69
GflashHistogram::g4charge
TH1F * g4charge
Definition: GflashHistogram.h:102