FairRoot/PandaRoot
Functions
analysis_hit_digi_cluster_fwendcap.C File Reference
#include "TH1.h"
#include "TMath.h"
#include "TF1.h"
#include "TLegend.h"
#include <#include>
#include <iomanip>

Go to the source code of this file.

Functions

TCanvas h TList h int analysis_hit_digi_cluster_fwendcap ()
 

Function Documentation

TCanvas h TList h int analysis_hit_digi_cluster_fwendcap ( )

Definition at line 10 of file analysis_hit_digi_cluster_fwendcap.C.

11 {
12  gROOT->LoadMacro("$VMCWORKDIR/macro/mvd/Tools.C");
13  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
14 
15  TFile* fsim = new TFile("/home/moini/myPandaRoot/myCodes/ROOTfiles/FwEndCapResolution_vacuum_noMagField/assuming150photonsperMeV/emc_complete_5GeVphotons.root");
16 
17  TTree *tsim=(TTree *) fsim->Get("pndsim") ;
18  TClonesArray* mctrack_array=new TClonesArray("PndMCTrack");
19  tsim->SetBranchAddress("MCTrack",&mctrack_array);
20 
21  TClonesArray* hit_array=new TClonesArray("PndEmcHit");
22  tsim->SetBranchAddress("EmcHit",&hit_array);
23 
24  TClonesArray* digi_array=new TClonesArray("PndEmcDigi");
25  tsim->SetBranchAddress("EmcDigi",&digi_array);
26 
27  TClonesArray* cluster_array=new TClonesArray("PndEmcCluster");
28  tsim->SetBranchAddress("EmcCluster",&cluster_array);
29 
30  TClonesArray* bump_array=new TClonesArray("PndEmcBump");
31  tsim->SetBranchAddress("EmcBump",&bump_array);
32 
36  TVector3 photon_momentum;
37  TLorentzVector p4mom;
38  Double_t clusterThresholdEnergy=0;
39 
40  TH1F *hene_mc= new TH1F("hene_mc","MC energy (GeV)",100,0.0,1.05);
41  TH1F *h10= new TH1F("h10"," Theta (MC)",180,0.,180.);
42  TH1F *h20= new TH1F("h20"," Phi (MC)",360,0.,360.);
43  TH1F *h10d= new TH1F("h10d"," Theta (data)",180,0.,180.);
44  TH1F *h20d= new TH1F("h20d"," Phi (data)",360,0.,360.);
45  TH1F *h1= new TH1F("h1"," Theta difference",100,-2.,2.);
46  TH1F *h2= new TH1F("h2"," Phi difference",100,-2.,2.);
47 
48  Int_t ncounts = tsim->GetEntriesFast();
49  cout << "Number of events = " << ncounts<< endl;
50  //ncounts=100; //in case you want to analyse specific number of events
51 
52 
54  TH1F *HISTene_h= new TH1F("HISTene_h","energy (hit)",1000,0.0,1.01); // deposited energy per hit in the whole FwEndCap
55  TH1F *HISThit_ene= new TH1F("HISThit_ene","FwEndCap energy (hit)",2010,0.0,2.01); // deposited energy per event in the whole FwEndCap (1 MeV/bin precision)
56  TH1F *HISThit_ene_10by6crystalPack= new TH1F("HISThit_ene_10by6crystalPack","",2010,0.0,2.01);//(1 MeV/bin precision)
57  TH1F *HISThit_ene_3by3crystalPack= new TH1F("HISThit_ene_3by3crystalPack","",2010,0.0,2.01);//(1 MeV/bin precision)
58  TH1F *HISTz_h = new TH1F("HISTz_h","z (hit)",100,200,300);
59  TH2F *HISTxpad_x_h = new TH2F("HISTxpad_x_h","xpad vs x (hit)",211,-105,105,2*38.5,-38.5,38.5);
60  TH2F *HISTypad_y_h = new TH2F("HISTypad_y_h","ypad vs y (hit)",211,-105,105,2*38.5,-38.5,38.5);
61  TH2F *HISTrow_x_h = new TH2F("HISTrow_x_h","row vs x (hit)",200,-100,100,2*38.5,-38.5,38.5);
62  TH2F *HISTrow_crystal_h = new TH2F("HISTrow_crystal_h","row vs column (hit)",2*38.5,-38.5,38.5,2*38.5,-38.5,38.5);
63  TH2F *HISTy_x_h = new TH2F("HISTy_x_h","y vs x (hit)",211,-105,105,211,-105,105); // y- versus x-position of the center of the hit crystal
64  TH1F *HISTtheta_h = new TH1F("HISTtheta_h","theta (hit)",180,0,180); // theta of the
65  TH1I *HISTmultiplicity_5MeVtrigThresh_h = new TH1I("HISTmultiplicity_5MeVtrigThresh_h","Crystal hit multiplicity (3 MeV detection threshold and considering 5 MeV trigger threshold)",40,0.5,40.5);
66  TH1I *HISTmultiplicity_10MeVtrigThresh_h = new TH1I("HISTmultiplicity_10MeVtrigThresh_h","Crystal hit multiplicity (3 MeV detection threshold and 10 MeV trigger threshold)",40,0.5,40.5);
67  TH1I *HISTmultiplicity_10MeVtrigThresh_5MeVdetectionThresh_h = new TH1I("HISTmultiplicity_10MeVtrigThresh_5MeVdetectionThresh_h","FwEndCap crystal hit multiplicity (5 MeV detection threshold and 10 MeV trigger threshold)",40,0.5,40.5);
68  TH1I *HISTmultiplicity_10MeVtrigThresh_10MeVdetectionThresh_h = new TH1I("HISTmultiplicity_10MeVtrigThresh_10MeVdetectionThresh_h","FwEndCap crystal hit multiplicity (10 MeV trigger threshold) -- sensitivity to detection threshold",40,0.5,40.5);
69  TH1I *HISTmultiplicity_10MeVtrigThresh_NOdetectionThresh_h = new TH1I("HISTmultiplicity_10MeVtrigThresh_NOdetectionThresh_h","FwEndCap crystal hit multiplicity (no detection threshold and 10 MeV trigger threshold)",40,0.5,40.5);
70  TH1I *HISTmultiplicity_1MeVtrigThresh_100keV_h = new TH1I("HISTmultiplicity_1MeVtrigThresh_100keV_h","",40,0.5,40.5);
71  TH1I *HISTmultiplicity_1MeVtrigThresh_300keV_h = new TH1I("HISTmultiplicity_1MeVtrigThresh_300keV_h","",40,0.5,40.5);
72 
73  //TH1F *HISTid_h = new TH1F("HISTid_h","id (HIT)",140000000,300000000,340000000);
74  TH1F *HISTOhit_ene19_1= new TH1F("HISTOhit_ene19_1","crystal [19,1] dep. energy (GeV)",2010,0.0,2.01);
75  TH1F *HISTOhit_ene19_2= new TH1F("HISTOhit_ene19_2","crystal [19,2] dep. energy (GeV)",2010,0.0,2.01);
76  TH1F *HISTOhit_ene19_3= new TH1F("HISTOhit_ene19_3","crystal [19,3] dep. energy (GeV)",2010,0.0,2.01);
77  TH1F *HISTOhit_ene19_4= new TH1F("HISTOhit_ene19_4","crystal [19,4] dep. energy (GeV)",2010,0.0,2.01);
78  TH1F *HISTOhit_ene19_5= new TH1F("HISTOhit_ene19_5","crystal [19,5] dep. energy (GeV)",2010,0.0,2.01);
79 
81  TH1F *HISTdigi_ene= new TH1F("HISTdigi_ene","FwEndCap energy (digi)",2010,0.0,2.01); // deposited energy per event in the whole FwEndCap (1 MeV/bin precision)
82  TH1F *HISTene_d= new TH1F("HISTene_d","energy (digi)",1000,0.0001,1.01); // deposited energy per digi in the whole FwEndCap
83  TH2F *HISTxpad_x_d = new TH2F("HISTxpad_x_d","xpad vs x (digi)",200,200,300,2*38.5,-38.5,38.5); // here x means: map of the x-position of the hit crystal
84  TH2F *HISTypad_y_d = new TH2F("HISTypad_y_d","ypad vs y (digi)",200,200,300,2*38.5,-38.5,38.5); // here y means: map of the y-position of the hit crystal
85  TH2F *HISTrow_x_d = new TH2F("HISTrow_x_d","row vs x (digi)",200,200,300,2*38.5,-38.5,38.5); // here x means: map of the x-position of the hit crystal
86  TH2F *HISTrow_crystal_d = new TH2F("HISTrow_crystal_d","row vs column (digi)",2*38.5,-38.5,38.5,2*38.5,-38.5,38.5);
87  TH2F *HISTy_x_d = new TH2F("HISTy_x_d","y vs x (digi map)",200,200,300,200,200,300); // here x and y mean: map of the y- and x-position of the hit crystal
88  TH1F *HISTtotdigis_fromClusterAnalysis = new TH1F("HISTtotdigis_fromClusterAnalysis","total number of digis per event",100,0,25);
89  TH1I *HISTmultiplicity_5MeVtrigThresh_d = new TH1I("HISTmultiplicity_5MeVtrigThresh_d","Crystal digi multiplicity per event (3 MeV detection threshold and considering 5 MeV trigger threshold)",40,0.5,40.5);
90  TH1I *HISTmultiplicity_10MeVtrigThresh_d = new TH1I("HISTmultiplicity_10MeVtrigThresh_d","Crystal digi multiplicity per event (3 MeV detection threshold and considering 10 MeV trigger threshold)",40,0.5,40.5);
91  TH1F *HISTOdigi_ene19_1= new TH1F("HISTOdigi_ene19_1","crystal [19,1] dep. energy (GeV)",2010,0.0,2.01);
92  TH1F *HISTOdigi_ene19_2= new TH1F("HISTOdigi_ene19_2","crystal [19,2] dep. energy (GeV)",2010,0.0,2.01);
93  TH1F *HISTOdigi_ene19_3= new TH1F("HISTOdigi_ene19_3","crystal [19,3] dep. energy (GeV)",2010,0.0,2.01);
94  TH1F *HISTOdigi_ene19_4= new TH1F("HISTOdigi_ene19_4","crystal [19,4] dep. energy (GeV)",2010,0.0,2.01);
95  TH1F *HISTOdigi_ene19_5= new TH1F("HISTOdigi_ene19_5","crystal [19,5] dep. energy (GeV)",2010,0.0,2.01);
96  TH1F *HISTdigi_ene_10by6crystalPack= new TH1F("HISTdigi_ene_10by6crystalPack","",2010,0.0,2.01);//(1 MeV/bin precision)
97  TH1F *HISTdigi_ene_3by3crystalPack= new TH1F("HISTdigi_ene_3by3crystalPack","",2010,0.0,2.01);//(1 MeV/bin precision)
98 
99  TH1I *HISTnumberOfClusters = new TH1I("HISTnumberOfClusters","Total number of clusters per event, having more than or equal to one digi per cluster",100,0,20);
100  TH1I *HISTclustNo = new TH1I("HISTclustNo","Total number of clusters per event, having more than one digi per cluster and satisfying the cluster threshold energy",1000,0,20);
101  TH1I *HISTndigisOfHighestEnergyCluster = new TH1I("HISTndigisOfHighestEnergyCluster","Number of digis per event for clusters with highest energy deposition",1000,0,30);
102  TH1F *HISTmax_cluster_energy= new TH1F("HISTOmax_cluster_energy","Maximum cluster energy deposition per event",500,0.,1.05);
103  TH1F *HISTmax_cluster_theta = new TH1F("HISTmax_cluster_theta","#theta per event of the cluster with maximum deposition energy",100,0,30);
104  TH1F *HISTmax_cluster_phi = new TH1F("HISTmax_cluster_phi","#phi per event of the cluster with maximum deposition energy",370,-185,185);
105  TH1F *HISTmax_cluster_x = new TH1F("HISTmax_cluster_x","x per event of the cluster with maximum deposition energy",220,-110,110);
106  TH1F *HISTmax_cluster_y = new TH1F("HISTmax_cluster_y","y per event of the cluster with maximum deposition energy",220,-110,110);
107  TH1F *HISTmax_cluster_z = new TH1F("HISTmax_cluster_z","z per event of the cluster with maximum deposition energy",80,208,216);
108  TH2F *HISTmax_cluster_y_x = new TH2F("HISTmax_cluster_y_x","y vs x per event of the cluster with maximum deposition energy",220,-110,110,220,-110,110);
109  TH1F *HISTtheta_MonteCarlo = new TH1F("HISTtheta_MonteCarlo","Monte Carlo #theta per event of the cluster with maximum deposition energy",100,0,30);
110  TH1F *HISTphi_MonteCarlo = new TH1F("HISTphi_MonteCarlo","Monte Carlo #phi per event of the cluster with maximum deposition energy",370,-185,185);
111  TH1F *HISTmax_cluster_theta_diff = new TH1F("HISTmax_cluster_theta_diff","Difference between Monte Carlo and reconstructed #theta per event of the cluster with maximum deposition energy",100,-5,5);
112  TH1F *HISTmax_cluster_phi_diff = new TH1F("HISTmax_cluster_phi_diff","Difference between Monte Carlo and reconstructed #phi per event of the cluster with maximum deposition energy",360,-5,5);
113  TH2F *HISTtheta_MonteCarlo_cluster = new TH2F("HISTtheta_MonteCarlo_cluster","Monte Carlo versus cluster #theta of the cluster with maximum deposition energy",100,0,30,100,0,30);
114  TH2F *HISTphi_MonteCarlo_cluster = new TH2F("HISTphi_MonteCarlo_cluster","Monte Carlo versus cluster #phi of the cluster with maximum deposition energy",370,-185,185,370,-185,185);
115  TH1F *HISTmax_cluster_x_diff = new TH1F("HISTmax_cluster_x_diff","Difference between Monte Carlo and reconstructed x per event of the cluster with maximum deposition energy",100,-5,5);
116  TH1F *HISTmax_cluster_y_diff = new TH1F("HISTmax_cluster_y_diff","Difference between Monte Carlo and reconstructed y per event of the cluster with maximum deposition energy",100,-5,5);
117  TH2F *HISTclusterSize_clusterPhi = new TH2F("HISTclusterSize_clusterPhi","number of digis vs cluster #phi for clusters with highest energy deposition",370,-185,185,100,0,25);
118  TH2F *HISTclusterEnergy_clusterPhi = new TH2F("HISTclusterEnergy_clusterPhi","cluster energy deposition vs cluster #phi for clusters with highest energy deposition",370,-185,185,500,0.,1.05);
119  TH2F *HISTnumberOfclusters_clusterPhi = new TH2F("HISTnumberOfclusters_clusterPhi","number of clusters vs cluster #phi for clusters with highest energy deposition",370,-185,185,100,0,20);
120  TH2F *HISTtotdigis_clusterPhi = new TH2F("HISTtotdigis_clusterPhi","total number of digis vs cluster #phi (#phi of clusters with highest energy deposition)",370,-185,185,100,0,25);
121 
122 
123  Int_t totalhits=0; //counter on the total number of hits (fired detectors) in all events
124  Int_t efficiencyCounter_h=0;
125  Int_t atLeastOneHitPerEventCounter_h=0;
126 
127  Int_t totaldigis=0; //counter on the total number of digis (fired detectors) in all events
128  Int_t efficiencyCounter_d=0;
129  Int_t atLeastOneHitPerEventCounter_d=0;
130 
131  for (int j = 0; j < ncounts; j++) {
132  Int_t efficiencyFlag10MeV_h=0;
133  Int_t efficiencyFlag5MeV_h=0;
134  Int_t efficiencyFlag1MeV_h=0;
135  Int_t atLeastOneHitPerEventFlag_h=0;
136  Double_t sum_hit_ene=0;
137  Double_t sum_hit_ene_10by6crystalPack=0;
138  Double_t sum_hit_ene_3by3crystalPack=0;
139 
140  Int_t efficiencyFlag10MeV_d=0;
141  Int_t efficiencyFlag5MeV_d=0;
142  Int_t atLeastOneHitPerEventFlag_d=0;
143  Double_t sum_digi_ene=0;
144  Double_t sum_digi_ene_10by6crystalPack=0;
145  Double_t sum_digi_ene_3by3crystalPack=0;
146 
147  tsim->GetEntry(j);
148 
149  PndMCTrack *mctrack=(PndMCTrack *) mctrack_array->At(0);
150  photon_momentum=mctrack->GetMomentum();
151  theta_mc=photon_momentum.Theta()*(180./TMath::Pi());
152  phi_mc=photon_momentum.Phi()*(180./TMath::Pi());
153  //p4mom=mctrack->Get4Momentum();
154 
156  Int_t nhits = hit_array->GetEntries();
157  totalhits+=nhits;
158  if (nhits!=0)
159  atLeastOneHitPerEventFlag_h = 1;
160  Int_t firedCrystals_h=0;
161  Int_t firedCrystals5MeV_h=0;
162  Int_t firedCrystals10MeV_h=0;
163  Int_t firedCrystals100keV_h=0;
164  Int_t firedCrystals300keV_h=0;
165 
166  for (Int_t i=0; i<nhits; i++)
167  {
168  PndEmcHit *hit=(PndEmcHit*)hit_array->At(i); // get the i-th hit (detector) of the event
169  module_h = hit->GetModule();
170 
171  if (module_h==3){
172  //hene_mc->Fill(p4mom.E());
173  hit_ene=hit->GetEnergy();
174  HISTene_h->Fill(hit_ene);
175  if (hit_ene >= 0.010) // 10 MeV trigger threshold used (here only) to calculate the efficiency of the FwEndCap geometry
176  efficiencyFlag10MeV_h = 1;
177  if (hit_ene >= 0.005)
178  efficiencyFlag5MeV_h = 1;
179  if (hit_ene >= 0.001)
180  efficiencyFlag1MeV_h = 1;
181 
182  if (hit_ene >= 0.003)
183  firedCrystals_h++; //for 3 MeV detection threshold
184  if (hit_ene >= 0.005)
185  firedCrystals5MeV_h++; //for 5 MeV detection threshold
186  if (hit_ene >= 0.010)
187  firedCrystals10MeV_h++; //for 10 MeV detection threshold
188  if (hit_ene >= 0.0001)
189  firedCrystals100keV_h++; //for 100 keV detection threshold
190  if (hit_ene >= 0.0003)
191  firedCrystals300keV_h++; //for 300 keV detection threshold
192 
193 
194  //filling some histograms for a few crystals
195  if (hit_ene >= 0.003 && hit->GetXPad()==19 && hit->GetYPad()==1)
196  HISTOhit_ene19_1->Fill(hit_ene);
197  else if (hit_ene >= 0.003 && hit->GetXPad()==19 && hit->GetYPad()==2)
198  HISTOhit_ene19_2->Fill(hit_ene);
199  else if (hit_ene >= 0.003 && hit->GetXPad()==19 && hit->GetYPad()==3)
200  HISTOhit_ene19_3->Fill(hit_ene);
201  else if (hit_ene >= 0.003 && hit->GetXPad()==19 && hit->GetYPad()==4)
202  HISTOhit_ene19_4->Fill(hit_ene);
203  else if (hit_ene >= 0.003 && hit->GetXPad()==19 && hit->GetYPad()==5)
204  HISTOhit_ene19_5->Fill(hit_ene);
205 
206  if (hit_ene >= 0.003 && hit->GetXPad()>=15 && hit->GetXPad()<=24 && hit->GetYPad()>=-1 && hit->GetYPad()<=5)//pack of 6x10 crystals
207  sum_hit_ene_10by6crystalPack+=hit_ene;
208  if (hit_ene >= 0.003 && hit->GetXPad()>=18 && hit->GetXPad()<=20 && hit->GetYPad()>=1 && hit->GetYPad()<=3)//pack of 3x3 crystals around crystal of col=19 and row=2
209  sum_hit_ene_3by3crystalPack+=hit_ene;
210 
211  if (hit_ene >= 0.003)
212  sum_hit_ene+=hit_ene;
213 
214  TVector3 hit_pos(hit->GetX(),hit->GetY(),hit->GetZ()); // position of the center of the hit crystal
215  hit_theta=hit_pos.Theta()*(180./TMath::Pi());
216  hit_phi=hit_pos.Phi()*(180./TMath::Pi());
217  h10->Fill(theta_mc);
218  h20->Fill(phi_mc);
219  h10d->Fill(hit_theta);
220  h20d->Fill(hit_phi);
221  h1->Fill(hit_theta-theta_mc);
222  h2->Fill(hit_phi-phi_mc);
223 
224  id_h = hit->GetDetectorID();
225  crystal_hid = -(id_h%10000 -36); //crystal column number (the same as GetXPad())
226  row_hid = (id_h/1000000)%100 - 37; //crystal row number (the same as GetYPad())
227 
228  HISTz_h->Fill(hit->GetZ());
229  HISTxpad_x_h->Fill(hit->GetX(),hit->GetXPad());
230  HISTypad_y_h->Fill(hit->GetY(),hit->GetYPad());
231  HISTrow_x_h->Fill(hit->GetX(),hit->GetYPad());
232 
233  //HISTid_h->Fill(id_h);
234  HISTrow_crystal_h->Fill(hit->GetXPad(),hit->GetYPad());
235  HISTy_x_h->Fill(hit->GetX(),hit->GetY());
236 
237  }
238  }
239 
240  if (efficiencyFlag10MeV_h==1) //if the trigger threshold is satisfied
241  {
242  HISThit_ene->Fill(sum_hit_ene); // deposited energy per event in all hits (whole FwEndCap)
243  HISThit_ene_10by6crystalPack->Fill(sum_hit_ene_10by6crystalPack);// deposited energy per event in the pack of 6x10 crystals
244  HISThit_ene_3by3crystalPack->Fill(sum_hit_ene_3by3crystalPack);// deposited energy per event in the pack of 3x3 crystals
245  }
246 
247  if (efficiencyFlag10MeV_h==1)
248  {
249  efficiencyCounter_h+=1;
250  HISTmultiplicity_10MeVtrigThresh_h->Fill(firedCrystals_h); //10 MEV trigger threshold and 3 MeV detection threshold (in the level of hit)
251  HISTmultiplicity_10MeVtrigThresh_5MeVdetectionThresh_h->Fill(firedCrystals5MeV_h); //10 MEV trigger threshold and 5 MeV detection threshold (in the level of hit)
252  HISTmultiplicity_10MeVtrigThresh_10MeVdetectionThresh_h->Fill(firedCrystals10MeV_h); //10 MEV trigger threshold and 10 MeV detection threshold (in the level of hit)
253  HISTmultiplicity_10MeVtrigThresh_NOdetectionThresh_h->Fill(nhits); //10 MEV trigger threshold and no detection threshold (in the level of hit)
254  }
255  if (efficiencyFlag5MeV_h==1)
256  HISTmultiplicity_5MeVtrigThresh_h->Fill(firedCrystals_h); //5 MEV trigger threshold and 3 MeV detection threshold (in the level of hit)
257 
258  if (efficiencyFlag1MeV_h==1)
259  {
260  HISTmultiplicity_1MeVtrigThresh_100keV_h->Fill(firedCrystals100keV_h); //1 MEV trigger threshold and 100 keV detection threshold (in the level of hit)
261  HISTmultiplicity_1MeVtrigThresh_300keV_h->Fill(firedCrystals300keV_h); //1 MEV trigger threshold and 300 keV detection threshold (in the level of hit)
262  }
263 
264  if (atLeastOneHitPerEventFlag_h==1)
265  atLeastOneHitPerEventCounter_h+=1;
266 
268  Int_t ndigis = digi_array->GetEntries();
269  totaldigis+=ndigis;
270  if (ndigis!=0)
271  atLeastOneHitPerEventFlag_d = 1;
272 
273  for (Int_t i=0; i<ndigis; i++)
274  {
275  PndEmcDigi *digi=(PndEmcDigi*)digi_array->At(i);
276  TVector3 digi_pos=digi->where();
277  module_d = digi->GetModule();
278  if (module_d==3){
279  //dene_mc->Fill(p4mom.E());
280 
281  digi_ene=digi->GetEnergy();
282  HISTene_d->Fill(digi_ene);
283  if (digi_ene >= 0.010) // 10 MeV trigger threshold used (here only) to calculate the efficiency of the FwEndCap geometry
284  efficiencyFlag10MeV_d = 1;
285  if (digi_ene >= 0.005) // 5 MeV trigger threshold used (here only) to calculate the efficiency of the FwEndCap geometry
286  efficiencyFlag5MeV_d = 1;
287 
288  //filling some histograms for a few crystals
289  if (digi_ene >= 0.003 && digi->GetXPad()==19 && digi->GetYPad()==1)
290  HISTOdigi_ene19_1->Fill(digi_ene);
291  else if (digi_ene >= 0.003 && digi->GetXPad()==19 && digi->GetYPad()==2)
292  HISTOdigi_ene19_2->Fill(digi_ene);
293  else if (digi_ene >= 0.003 && digi->GetXPad()==19 && digi->GetYPad()==3)
294  HISTOdigi_ene19_3->Fill(digi_ene);
295  else if (digi_ene >= 0.003 && digi->GetXPad()==19 && digi->GetYPad()==4)
296  HISTOdigi_ene19_4->Fill(digi_ene);
297  else if (digi_ene >= 0.003 && digi->GetXPad()==19 && digi->GetYPad()==5)
298  HISTOdigi_ene19_5->Fill(digi_ene);
299 
300  if (digi_ene >= 0.003 && digi->GetXPad()>=15 && digi->GetXPad()<=24 && digi->GetYPad()>=-1 && digi->GetYPad()<=5)//pack of 6x10 crystals
301  sum_digi_ene_10by6crystalPack+=digi_ene;
302  if (digi_ene >= 0.003 && digi->GetXPad()>=18 && digi->GetXPad()<=20 && digi->GetYPad()>=1 && digi->GetYPad()<=3)//pack of 3x3 crystals around crystal of col=19 and row=2
303  sum_digi_ene_3by3crystalPack+=digi_ene;
304 
305  if (digi_ene >= 0.003)
306  sum_digi_ene+=digi_ene;
307 
308  //Double_t digi_z=digi_pos.Z();
309  //hz_d->Fill(digi_z);
310 
311  digi_theta=(digi->GetTheta())*(180./TMath::Pi());
312  digi_phi=(digi->GetPhi())*(180./TMath::Pi());
313  //h10digi->Fill(theta_mc);
314  //h20digi->Fill(phi_mc);
315  //h10ddigi->Fill(digi_theta);
316  //h20ddigi->Fill(digi_phi);
317  //h1d->Fill(digi_theta-theta_mc);
318  //h2d->Fill(digi_phi-phi_mc);
319 
320  id_d = digi->GetDetectorId();
321  crystal_did = -(id_d%10000 - 36); //crystal column number (the same as GetXPad())
322  row_did = (id_d/1000000)%100 - 37; //crystal row number (the same as GetYPad())
323 
324  HISTxpad_x_d->Fill(digi->GetThetaInt(),digi->GetXPad());
325  HISTypad_y_d->Fill(digi->GetPhiInt(),digi->GetYPad());
326  HISTrow_x_d->Fill(digi->GetThetaInt(),digi->GetYPad());
327 
328  //hid_d->Fill(id_d);
329  //hmodule_d->Fill(module_d);
330  HISTrow_crystal_d->Fill(digi->GetXPad(),digi->GetYPad());
331  HISTy_x_d->Fill(digi->GetThetaInt(),digi->GetPhiInt());
332  }
333  }
334 
335  if (efficiencyFlag10MeV_d==1) //if the trigger threshold is satisfied
336  {
337  HISTdigi_ene->Fill(sum_digi_ene); // deposited energy per event in all digis (whole FwEndCap)
338  HISTdigi_ene_10by6crystalPack->Fill(sum_digi_ene_10by6crystalPack);// deposited energy per event in the pack of 6x10 crystals
339  HISTdigi_ene_3by3crystalPack->Fill(sum_digi_ene_3by3crystalPack);// deposited energy per event in the pack of 3x3 crystals
340  }
341 
342  if (efficiencyFlag10MeV_d==1)
343  {
344  efficiencyCounter_d+=1;
345  HISTmultiplicity_10MeVtrigThresh_d->Fill(ndigis); //10 MEV trigger threshold and 3 MeV detection threshold (in the level of digi this 3 MeV is already implemented)
346  }
347  if (efficiencyFlag5MeV_d==1)
348  HISTmultiplicity_5MeVtrigThresh_d->Fill(ndigis); //5 MEV trigger threshold and 3 MeV detection threshold (in the level of digi this 3 MeV is already implemented)
349 
350  if (atLeastOneHitPerEventFlag_d==1)
351  atLeastOneHitPerEventCounter_d+=1;
352 
353  /*
355  Int_t NumberOfClusters, ClustNo, idClusterSatisfiedThresholdEnergy, ndigisOfHighestEnergyCluster, totdigis_fromClusterAnalysis;
356  idClusterSatisfiedThresholdEnergy = -1; //set per event
357  NumberOfClusters=ClustNo=ndigisOfHighestEnergyCluster=totdigis_fromClusterAnalysis=0; //set per event
358  Double_t highestenergy = 0; //set per event
359 
360  if (cluster_array->GetEntriesFast() > 0 && module_d==3)
361  {
362  // find the cluster with the highest energy
363 
364  NumberOfClusters=cluster_array->GetEntriesFast();
365  for (Int_t i=0; i<NumberOfClusters; i++) //loop over all clusters of the present event under analysis
366  {
367  PndEmcCluster *cluster=(PndEmcCluster*)cluster_array->At(i);
368  Double_t cluster_energy=cluster->energy();
369 
370  Int_t ndigi=cluster->NumberOfDigis(); // number of fired detectors inside the cluster
371  totdigis_fromClusterAnalysis += ndigi;
372  if (ndigi > 1 && cluster_energy >= clusterThresholdEnergy) //by definition for a cluster ndigi should be more than 1
373  ClustNo++;
374 
375  if (cluster_energy > highestenergy) //finding the cluster with highest deposited energy
376  {
377  idClusterSatisfiedThresholdEnergy = i;
378  highestenergy = cluster_energy;
379  ndigisOfHighestEnergyCluster = ndigi;
380  }
381  }
382 
383  // Per-event analysis of this cluster with highest deposited energy
384  if (idClusterSatisfiedThresholdEnergy != -1) {
385  PndEmcCluster *cluster=(PndEmcCluster*)cluster_array->At(idClusterSatisfiedThresholdEnergy);
386  TVector3 cluster_pos=cluster->where();
387  Double_t cluster_theta=cluster->theta()*(180./TMath::Pi()); //cluster_theta=cluster_pos.Theta()*(180./TMath::Pi());
388  Double_t cluster_phi=cluster->phi()*(180./TMath::Pi()); //cluster_phi=cluster_pos.Phi()*(180./TMath::Pi());
389  Double_t cluster_x=cluster->x();
390  Double_t cluster_y=cluster->y();
391  Double_t cluster_z=cluster->z();
392  cluster_energy=cluster->energy();
393  //sum_clus_ene+=cluster_energy; //sum up the highest deposited cluster energy of all events
394  HISTmax_cluster_energy->Fill(cluster_energy); //fill the highest deposited cluster energy per event
395  HISTmax_cluster_theta->Fill(cluster_theta); // reconstructed
396  HISTmax_cluster_theta_diff->Fill(cluster_theta-theta_mc);
397  //if (cluster_theta>10)
398  // {
399  HISTmax_cluster_phi->Fill(cluster_phi); // reconstructed
400  HISTmax_cluster_phi_diff->Fill(cluster_phi-phi_mc);
401  HISTmax_cluster_x->Fill(cluster_x); // reconstructed
402  HISTmax_cluster_y->Fill(cluster_y); // reconstructed
403  HISTmax_cluster_y_x->Fill(cluster_x,cluster_y);
404  HISTmax_cluster_z->Fill(cluster_z); // reconstructed
405  Double_t x_mc = cluster_z*TMath::Tan(theta_mc/180.*TMath::Pi())*TMath::Cos(phi_mc/180.*TMath::Pi());
406  Double_t y_mc = cluster_z*TMath::Tan(theta_mc/180.*TMath::Pi())*TMath::Sin(phi_mc/180.*TMath::Pi());
407  HISTmax_cluster_x_diff->Fill(cluster_x-x_mc);
408  HISTmax_cluster_y_diff->Fill(cluster_y-y_mc);
409  //}
410  HISTtheta_MonteCarlo->Fill(theta_mc);
411  HISTphi_MonteCarlo->Fill(phi_mc);
412  HISTtheta_MonteCarlo_cluster->Fill(cluster_theta,theta_mc);
413  HISTphi_MonteCarlo_cluster->Fill(cluster_phi,phi_mc);
414  HISTclusterSize_clusterPhi->Fill(cluster_phi,ndigisOfHighestEnergyCluster);
415  HISTclusterEnergy_clusterPhi->Fill(cluster_phi,cluster_energy);
416  HISTnumberOfclusters_clusterPhi->Fill(cluster_phi,NumberOfClusters);
417  HISTtotdigis_clusterPhi->Fill(cluster_phi,totdigis_fromClusterAnalysis);
418  }
419  }
420 
421  //hz_clust->Fill(cluster->z());
422 
423  if (NumberOfClusters>0)
424  HISTnumberOfClusters->Fill(NumberOfClusters); //number of clusters per event, having more than or equal to one digi per cluster
425  if (ClustNo>0)
426  HISTclustNo->Fill(ClustNo); //number of clusters per event, having more than one digi per cluster and satisfying the cluster threshold energy
427  if (ndigisOfHighestEnergyCluster>0)
428  HISTndigisOfHighestEnergyCluster->Fill(ndigisOfHighestEnergyCluster); //number of digis per event for clusters with highest energy deposition
429 
430  HISTtotdigis_fromClusterAnalysis->Fill(totdigis_fromClusterAnalysis);
431 
432 */
433  if (j%1000 ==0)
434  cout<<"Evt. No. "<< j<<endl;
435  }
436  //cout<<"totalhits = "<<totalhits<<"\n";
437  //cout<<"efficiencyCounter_h = "<<efficiencyCounter_h<<" , atLeastOneHitPerEventCounter_h = "<<atLeastOneHitPerEventCounter_h<<"\n";
438  //cout<<"FwEndCap efficiency (more than 10 MeV deposition in at least one crystal) = "<< (double)efficiencyCounter_h/atLeastOneHitPerEventCounter_h<<"\n";
439 
440  //cout<<"totaldigis = "<<totaldigis<<"\n";
441  //cout<<"efficiencyCounter_d = "<<efficiencyCounter_d<<" , atLeastOneHitPerEventCounter_d = "<<atLeastOneHitPerEventCounter_d<<"\n";
442  //cout<<"FwEndCap efficiency (more than 10 MeV deposition in at least one crystal) = "<< (double)efficiencyCounter_d/atLeastOneHitPerEventCounter_d<<"\n";
443 
444 
446  /* TH2I *HISTnhitsVSndigis = new TH2I("HISTnhitsVSndigis","HISTnhitsVSndigis",90,-1,44,90,-1,44);
447  TH2F *HISThitENE_digiENE = new TH2F("HISThitENE_digiENE","HISThitENE_digiENE",1000,0,1.,1000,0,1.);
448  TH2F *HISThitVSdigi_phi_3MeVhitEnergyThreshold = new TH2F("HISThitVSdigi_phi_3MeVhitEnergyThreshold","hit vs digi #phi (3 MeV hit threshold energy)",370,-185,185,370,-185,185);
449  TH2F *HISThitVSdigi_phi_3MeVhitEnergyThreshold_zoomed = new TH2F("HISThitVSdigi_phi_3MeVhitEnergyThreshold_zoomed","hit vs digi #phi (3 MeV hit threshold energy)",30,100,130,30,100,130);
450  TH1F *HISThit_phi = new TH1F("HISThit_phi","#phi of hit",370,-185,185);
451  TH1F *HISTdigi_phi = new TH1F("HISTdigi_phi","#phi of digi",370,-185,185);
452  TH1F *HISThit_x = new TH1F("HISThit_x","x of hit",220,-110,110);
453  TH1F *HISThit_y = new TH1F("HISThit_y","y of hit",220,-110,110);
454  TH1F *HISTdigi_x = new TH1F("HISTdigi_x","x of digi",220,-110,110);
455  TH1F *HISTdigi_y = new TH1F("HISTdigi_y","y of digi",220,-110,110);
456  TH2F *HISTdigi_phi_x = new TH2F("HISTdigi_phi_x","#phi vs x of digi",220,-110,110,370,-185,185);
457  TH2F *HISTdigi_phi_y = new TH2F("HISTdigi_phi_y","#phi vs y of digi",220,-110,110,370,-185,185);
458 
459  for (int j = 0; j < ncounts; j++)
460  {
461  tsim->GetEntry(j);
462  Int_t ndigis = digi_array->GetEntries();
463  Int_t nhits = hit_array->GetEntries();
464 
465  for (Int_t ii=0; ii<nhits; ii++)
466  {
467  PndEmcHit *hit=(PndEmcHit*)hit_array->At(ii);
468  Double_t hitENE = hit->GetEnergy();
469  TVector3 hit_pos(hit->GetX(),hit->GetY(),hit->GetZ()); // position of the center of the hit crystal
470  Double_t hitPHI=hit_pos.Phi()*(180./TMath::Pi()); //wrong answer if using-----> hit->GetPhi()*180./TMath::Pi();
471  Int_t hitXPad = hit->GetXPad();
472  Int_t hitYPad = hit->GetYPad();
473  Double_t hitX = hit->GetX();
474  Double_t hitY = hit->GetY();
475 
476  for (Int_t jj=0; jj<ndigis; jj++)
477  {
478  PndEmcDigi *digi=(PndEmcDigi*)digi_array->At(jj);
479 
480  Double_t digiENE = digi->GetEnergy();
481  Double_t digiPHI = digi->GetPhi()*180./TMath::Pi();
482  Int_t digiXPad = digi->GetXPad();
483  Int_t digiYPad = digi->GetYPad();
484  Double_t digiX = (digi->where()).X();
485  Double_t digiY = (digi->where()).Y();
486 
487  if (hitXPad==digiXPad && hitYPad==digiYPad && hitENE >= 0.003)//the detection threshold condition of 3 MeV doesn't show much effect on the pattern of the 2D histogram
488  {
489  HISThitENE_digiENE->Fill(digiENE,hitENE);
490  HISThitVSdigi_phi_3MeVhitEnergyThreshold->Fill(digiPHI,hitPHI);
491  HISThitVSdigi_phi_3MeVhitEnergyThreshold_zoomed->Fill(digiPHI,hitPHI);
492  }
493  if (hitXPad==digiXPad && hitYPad==digiYPad)
494  {
495  HISThit_phi->Fill(hitPHI);
496  HISTdigi_phi->Fill(digiPHI);
497 
498  HISThit_x->Fill(hitX);
499  HISThit_y->Fill(hitY);
500  HISTdigi_x->Fill(digiX);
501  HISTdigi_y->Fill(digiY);
502  HISTdigi_phi_x->Fill(digiX,digiPHI);
503  HISTdigi_phi_y->Fill(digiY,digiPHI);
504  }
505  }
506  }
507 
508  Int_t flag_h=0;
509  for (Int_t ii=0; ii<nhits; ii++)
510  {
511  PndEmcHit *hit=(PndEmcHit*)hit_array->At(ii);
512  if (hit->GetEnergy() > 0)
513  flag_h=1;
514  }
515  if (flag_h==1)
516  HISTnhitsVSndigis->Fill(ndigis,nhits);//fill the histogram if there a hit registers (hitEne > 0)
517  }
518 */
520  gStyle->SetPalette(1);
521 
522  TString outfile= "./hitdigiEne.root";
523  TFile* file_out = new TFile(outfile,"RECREATE");
524  HISThit_ene->Write();
525  HISThit_ene_10by6crystalPack->Write();
526  HISThit_ene_3by3crystalPack->Write();
527  HISTdigi_ene->Write();
528  HISTdigi_ene_10by6crystalPack->Write();
529  HISTdigi_ene_3by3crystalPack->Write();
530  file_out->Close();
531 
533 
534  TCanvas* c1 = new TCanvas("c1","", 100, 100, 800, 800);
535  c1->Divide(3,3);
536  c1->cd(1);
537  HISTOhit_ene19_1->Draw();
538  c1->cd(2);
539  HISTOhit_ene19_2->Draw();
540  HISTOhit_ene19_2->GetXaxis()->SetTitle("central crystal Deposited Energy per event (hit analysis)");
541  c1->cd(3);
542  HISTOhit_ene19_3->Draw();
543  c1->cd(4);
544  HISTOhit_ene19_4->Draw();
545  c1->cd(5);
546  HISTOhit_ene19_5->Draw();
547  c1->cd(6);
548  HISThit_ene_3by3crystalPack->Draw();
549  HISThit_ene_3by3crystalPack->GetXaxis()->SetTitle("3x3 pack of crystals in FwEndCap Deposited Energy per event (hit analysis)");
550  c1->cd(7);
551  HISThit_ene_10by6crystalPack->Draw();
552  HISThit_ene_10by6crystalPack->GetXaxis()->SetTitle("10x6 pack of crystals in FwEndCap Deposited Energy per event (hit analysis)");
553  c1->cd(8);
554  HISThit_ene->Draw();
555  HISThit_ene->GetXaxis()->SetTitle("FwEndCap Deposited Energy per event (hit analysis)");
556 
557  TCanvas* c2 = new TCanvas("c2","", 100, 100, 800, 800);
558  c2->Divide(3,3);
559  c2->cd(1);
560  HISTOdigi_ene19_1->Draw();
561  c2->cd(2);
562  HISTOdigi_ene19_2->Draw();
563  HISTOdigi_ene19_2->GetXaxis()->SetTitle("central crystal Deposited Energy per event (digi analysis)");
564  c2->cd(3);
565  HISTOdigi_ene19_3->Draw();
566  c2->cd(4);
567  HISTOdigi_ene19_4->Draw();
568  c2->cd(5);
569  HISTOdigi_ene19_5->Draw();
570  c2->cd(6);
571  HISTdigi_ene_3by3crystalPack->Draw();
572  HISTdigi_ene_3by3crystalPack->GetXaxis()->SetTitle("3x3 pack of crystals in FwEndCap Deposited Energy per event (digi analysis)");
573  c2->cd(7);
574  HISTdigi_ene_10by6crystalPack->Draw();
575  HISTdigi_ene_10by6crystalPack->GetXaxis()->SetTitle("10x6 pack of crystals in FwEndCap Deposited Energy per event (digi analysis)");
576  c2->cd(8);
577  HISTdigi_ene->Draw();
578  HISTdigi_ene->GetXaxis()->SetTitle("FwEndCap Deposited Energy per event (digi analysis)");
579 
580  /*
581  TCanvas* c3 = new TCanvas("c3","", 100, 100, 800, 800);
582  c3->Divide(3,2);
583  c3->cd(1);
584  HISTy_x_h->Draw("colz");
585  c3->cd(2);
586  HISTrow_crystal_h->Draw("colz");
587  c3->cd(3);
588  HISTxpad_x_h->Draw("colz");
589  c3->cd(4);
590  HISTypad_y_h->Draw("colz");
591  c3->cd(5);
592  HISTrow_x_h->Draw("colz");
593  */
594 
595  /*
596  TCanvas* c4 = new TCanvas("c4","", 100, 100, 800, 800);
597  c4->Divide(3,2);
598  c4->cd(1);
599  HISTy_x_d->Draw("colz");
600  c4->cd(2);
601  HISTrow_crystal_d->Draw("colz");
602  c4->cd(3);
603  HISTxpad_x_d->Draw("colz");
604  c4->cd(4);
605  HISTypad_y_d->Draw("colz");
606  c4->cd(5);
607  HISTrow_x_d->Draw("colz");
608  */
609 
610 /*
611  TCanvas* c5 = new TCanvas("c5","", 100, 100, 800, 800);
612  c5->Divide(4,4);
613  c5->cd(1);
614  HISTnumberOfClusters->Draw("");
615  c5->cd(2);
616  HISTclustNo->Draw("");
617  c5->cd(3);
618  HISTndigisOfHighestEnergyCluster->Draw("");
619  c5->cd(4);
620  HISTmax_cluster_energy->Draw("");
621  c5->cd(5);
622  HISTtheta_MonteCarlo->Draw("");
623  c5->cd(6);
624  HISTphi_MonteCarlo->Draw("");
625  c5->cd(7);
626  HISTtheta_MonteCarlo_cluster->Draw("colz");
627  c5->cd(8);
628  HISTphi_MonteCarlo_cluster->Draw("colz");
629  c5->cd(9);
630  HISTmax_cluster_theta->Draw("");
631  c5->cd(10);
632  HISTmax_cluster_phi->Draw("");
633  c5->cd(11);
634  HISTmax_cluster_theta_diff->Draw("");
635  c5->cd(12);
636  HISTmax_cluster_phi_diff->Draw("");
637  c5->cd(13);
638  HISTmax_cluster_x->Draw("");
639  c5->cd(14);
640  HISTmax_cluster_y->Draw("");
641  c5->cd(15);
642  //HISTmax_cluster_z->Draw("");
643  HISTmax_cluster_x_diff->Draw("");
644  c5->cd(16);
645  HISTmax_cluster_y_diff->Draw("");
646 
647  TCanvas* c55 = new TCanvas("c55","", 100, 100, 800, 800);
648  HISTmax_cluster_y_x->Draw("colz");
649  */
650 
651  /* TCanvas* c6 = new TCanvas("c6","", 100, 100, 800, 800);
652  c6->Divide(2,2);
653  c6->cd(1);
654  HISTclusterSize_clusterPhi->Draw("colz");
655  c6->cd(2);
656  HISTclusterEnergy_clusterPhi->Draw("colz");
657  c6->cd(3);
658  HISTnumberOfclusters_clusterPhi->Draw("colz");
659  c6->cd(4);
660  HISTtotdigis_clusterPhi->Draw("colz");
661  //HISTtotdigis_fromClusterAnalysis->Draw();
662  */
663 
664  /*
665  TCanvas* c7 = new TCanvas("c7","", 100, 100, 800, 800);
666  c7->Divide(2,2);
667  c7->cd(1);
668  HISTnhitsVSndigis->Draw("colz");
669  c7->cd(3);
670  HISThitENE_digiENE->Draw("colz");
671  c7->cd(2)->Divide(2,1);
672  c7->cd(2)->cd(1);
673  HISThit_phi->Draw();
674  c7->cd(2)->cd(2);
675  HISTdigi_phi->Draw();
676  c7->cd(4)->Divide(2,1);
677  c7->cd(4)->cd(1);
678  HISThitVSdigi_phi_3MeVhitEnergyThreshold->Draw("colz");
679  c7->cd(4)->cd(2);
680  HISThitVSdigi_phi_3MeVhitEnergyThreshold_zoomed->Draw("colz");
681 
682  TCanvas* c77 = new TCanvas("c77","", 100, 100, 800, 1000);
683  c77->Divide(2,3);
684  c77->cd(1);
685  HISThit_x->Draw();
686  c77->cd(2);
687  HISThit_y->Draw();
688  c77->cd(3);
689  HISTdigi_x->Draw();
690  c77->cd(4);
691  HISTdigi_y->Draw();
692  c77->cd(5);
693  HISTdigi_phi_x->Draw("colz");
694  c77->cd(6);
695  HISTdigi_phi_y->Draw("colz");
696 */
697 
698  /*
699  TCanvas* c8 = new TCanvas("c8","", 100, 100, 1200, 800);
700  c8->Divide(2,2);
701  c8->cd(1);
702  HISTmultiplicity_5MeVtrigThresh_d->Draw();
703  c8->cd(2);
704  HISTmultiplicity_10MeVtrigThresh_d->Draw();
705  c8->cd(3);
706  HISTmultiplicity_5MeVtrigThresh_h->Draw();//3 MeV detection threshold
707  c8->cd(4);
708  HISTmultiplicity_10MeVtrigThresh_h->Draw();//3 MeV detection threshold
709 
710 
711  TCanvas* c9 = new TCanvas("c9","", 100, 100, 1000, 800);
712  HISTmultiplicity_10MeVtrigThresh_10MeVdetectionThresh_h->Draw();
713  HISTmultiplicity_10MeVtrigThresh_10MeVdetectionThresh_h->SetLineWidth(3);
714 
715  HISTmultiplicity_10MeVtrigThresh_NOdetectionThresh_h->Draw("same");
716  HISTmultiplicity_10MeVtrigThresh_NOdetectionThresh_h->SetLineStyle(2);
717 
718  HISTmultiplicity_10MeVtrigThresh_h->Draw("same");//3 MeV detection threshold
719 
720  HISTmultiplicity_10MeVtrigThresh_5MeVdetectionThresh_h->Draw("same");
721  HISTmultiplicity_10MeVtrigThresh_5MeVdetectionThresh_h->SetLineWidth(2);
722 
723 
724  TCanvas* c99 = new TCanvas("c99","", 100, 100, 1000, 800);
725  HISTmultiplicity_1MeVtrigThresh_300keV_h->Draw();
726  HISTmultiplicity_1MeVtrigThresh_300keV_h->SetLineWidth(1);
727 
728  HISTmultiplicity_1MeVtrigThresh_100keV_h->Draw("same");
729  HISTmultiplicity_1MeVtrigThresh_100keV_h->SetLineStyle(2);
730 */
731 
732  return 0;
733 }
PndMCTrack * mctrack
Double_t hit_theta
Short_t GetXPad() const
Definition: PndEmcHit.cxx:87
TClonesArray * digi
Double_t theta_mc
Double_t crystal_did
virtual Double_t GetEnergy() const
Definition: PndEmcDigi.cxx:296
represents the reconstructed hit of one emc crystal
Definition: PndEmcDigi.h:40
Int_t i
Definition: run_full.C:25
TVector3 photon_momentum
Int_t GetThetaInt() const
Definition: PndEmcDigi.h:99
Int_t GetDetectorId() const
Definition: PndEmcDigi.h:97
TClonesArray * digi_array
TVector3 GetMomentum() const
Definition: PndMCTrack.h:78
c2
Definition: plot_dirc.C:39
Double_t crystal_hid
Short_t GetModule() const
Definition: PndEmcDigi.h:103
TClonesArray * hit_array
Double_t GetTheta() const
Definition: PndEmcDigi.h:101
Double_t module_h
Double_t digi_ene
Short_t GetYPad() const
Definition: PndEmcHit.cxx:120
TClonesArray * cluster_array
Double_t
virtual Double_t GetEnergy() const
Definition: PndEmcHit.h:54
Double_t row_did
c1
Definition: plot_dirc.C:35
Double_t hit_phi
Double_t digi_theta
Double_t row_hid
represents the deposited energy of one emc crystal from simulation
Definition: PndEmcHit.h:26
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
Double_t GetPhi() const
Definition: PndEmcDigi.h:102
Short_t GetYPad() const
Definition: PndEmcDigi.cxx:261
const TVector3 & where() const
Definition: PndEmcDigi.h:111
TClonesArray * bump_array
Definition: bump_analys.C:14
Short_t GetXPad() const
Definition: PndEmcDigi.cxx:223
TClonesArray * mctrack_array
TLorentzVector p4mom
Double_t Pi
Short_t GetModule() const
Definition: PndEmcHit.h:58
Double_t module_d
Double_t digi_phi
Double_t hit_ene
TString outfile
Int_t GetPhiInt() const
Definition: PndEmcDigi.h:100