12   gROOT->LoadMacro(
"$VMCWORKDIR/macro/mvd/Tools.C");
 
   13   gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
 
   15   TFile* 
fsim = 
new TFile(
"/home/moini/myPandaRoot/myCodes/ROOTfiles/FwEndCapResolution_vacuum_noMagField/assuming150photonsperMeV/emc_complete_5GeVphotons.root");
 
   17   TTree *
tsim=(TTree *) fsim->Get(
"pndsim") ;
 
   19   tsim->SetBranchAddress(
"MCTrack",&mctrack_array);
 
   21   TClonesArray* 
hit_array=
new TClonesArray(
"PndEmcHit");
 
   22   tsim->SetBranchAddress(
"EmcHit",&hit_array);
 
   24   TClonesArray* 
digi_array=
new TClonesArray(
"PndEmcDigi");
 
   25   tsim->SetBranchAddress(
"EmcDigi",&digi_array);
 
   27   TClonesArray* 
cluster_array=
new TClonesArray(
"PndEmcCluster");
 
   28   tsim->SetBranchAddress(
"EmcCluster",&cluster_array);
 
   30   TClonesArray* 
bump_array=
new TClonesArray(
"PndEmcBump");
 
   31   tsim->SetBranchAddress(
"EmcBump",&bump_array);
 
   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.);
 
   48   Int_t 
ncounts = tsim->GetEntriesFast();
 
   49   cout << 
"Number of events = " << ncounts<< endl;
 
   54    TH1F *HISTene_h= 
new TH1F(
"HISTene_h",
"energy (hit)",1000,0.0,1.01);  
 
   55    TH1F *HISThit_ene= 
new TH1F(
"HISThit_ene",
"FwEndCap energy (hit)",2010,0.0,2.01); 
 
   56    TH1F *HISThit_ene_10by6crystalPack= 
new TH1F(
"HISThit_ene_10by6crystalPack",
"",2010,0.0,2.01);
 
   57    TH1F *HISThit_ene_3by3crystalPack= 
new TH1F(
"HISThit_ene_3by3crystalPack",
"",2010,0.0,2.01);
 
   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);  
 
   64    TH1F *HISTtheta_h = 
new TH1F(
"HISTtheta_h",
"theta (hit)",180,0,180);  
 
   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);
 
   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);
 
   81    TH1F *HISTdigi_ene= 
new TH1F(
"HISTdigi_ene",
"FwEndCap energy (digi)",2010,0.0,2.01); 
 
   82    TH1F *HISTene_d= 
new TH1F(
"HISTene_d",
"energy (digi)",1000,0.0001,1.01);  
 
   83    TH2F *HISTxpad_x_d = 
new TH2F(
"HISTxpad_x_d",
"xpad vs x (digi)",200,200,300,2*38.5,-38.5,38.5);   
 
   84    TH2F *HISTypad_y_d = 
new TH2F(
"HISTypad_y_d",
"ypad vs y (digi)",200,200,300,2*38.5,-38.5,38.5);   
 
   85    TH2F *HISTrow_x_d = 
new TH2F(
"HISTrow_x_d",
"row vs x (digi)",200,200,300,2*38.5,-38.5,38.5);      
 
   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);  
 
   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);
 
   97   TH1F *HISTdigi_ene_3by3crystalPack= 
new TH1F(
"HISTdigi_ene_3by3crystalPack",
"",2010,0.0,2.01);
 
   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);
 
  124    Int_t efficiencyCounter_h=0;
 
  125    Int_t atLeastOneHitPerEventCounter_h=0;
 
  128    Int_t efficiencyCounter_d=0;
 
  129    Int_t atLeastOneHitPerEventCounter_d=0;
 
  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;
 
  137      Double_t sum_hit_ene_10by6crystalPack=0;
 
  138      Double_t sum_hit_ene_3by3crystalPack=0;
 
  140      Int_t efficiencyFlag10MeV_d=0;
 
  141      Int_t efficiencyFlag5MeV_d=0;
 
  142      Int_t atLeastOneHitPerEventFlag_d=0;
 
  144      Double_t sum_digi_ene_10by6crystalPack=0;
 
  145      Double_t sum_digi_ene_3by3crystalPack=0;
 
  151         theta_mc=photon_momentum.Theta()*(180./
TMath::Pi());
 
  152         phi_mc=photon_momentum.Phi()*(180./
TMath::Pi());
 
  156         Int_t 
nhits = hit_array->GetEntries();
 
  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;
 
  174               HISTene_h->Fill(hit_ene);
 
  175               if (hit_ene >= 0.010) 
 
  176                 efficiencyFlag10MeV_h = 1;
 
  177               if (hit_ene >= 0.005)
 
  178                 efficiencyFlag5MeV_h = 1;
 
  179               if (hit_ene >= 0.001)
 
  180                 efficiencyFlag1MeV_h = 1;
 
  182               if (hit_ene >= 0.003)
 
  184               if (hit_ene >= 0.005)
 
  185                 firedCrystals5MeV_h++; 
 
  186               if (hit_ene >= 0.010)
 
  187                 firedCrystals10MeV_h++; 
 
  188               if (hit_ene >= 0.0001)
 
  189                 firedCrystals100keV_h++; 
 
  190               if (hit_ene >= 0.0003)
 
  191                 firedCrystals300keV_h++; 
 
  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);
 
  207                 sum_hit_ene_10by6crystalPack+=hit_ene;
 
  209                 sum_hit_ene_3by3crystalPack+=hit_ene;
 
  211               if (hit_ene >= 0.003)
 
  214               TVector3 hit_pos(hit->GetX(),hit->GetY(),hit->GetZ()); 
 
  215               hit_theta=hit_pos.Theta()*(180./
TMath::Pi());
 
  216               hit_phi=hit_pos.Phi()*(180./
TMath::Pi());
 
  219               h10d->Fill(hit_theta);
 
  221               h1->Fill(hit_theta-theta_mc);
 
  222               h2->Fill(hit_phi-phi_mc);
 
  224               id_h = hit->GetDetectorID();
 
  225               crystal_hid = -(id_h%10000 -36);     
 
  226               row_hid = (id_h/1000000)%100 - 37;   
 
  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());
 
  235               HISTy_x_h->Fill(hit->GetX(),hit->GetY());
 
  240         if (efficiencyFlag10MeV_h==1)         
 
  242           HISThit_ene->Fill(sum_hit_ene);                                  
 
  243           HISThit_ene_10by6crystalPack->Fill(sum_hit_ene_10by6crystalPack);
 
  244           HISThit_ene_3by3crystalPack->Fill(sum_hit_ene_3by3crystalPack);
 
  247         if (efficiencyFlag10MeV_h==1)
 
  249           efficiencyCounter_h+=1;
 
  250           HISTmultiplicity_10MeVtrigThresh_h->Fill(firedCrystals_h); 
 
  251           HISTmultiplicity_10MeVtrigThresh_5MeVdetectionThresh_h->Fill(firedCrystals5MeV_h); 
 
  252           HISTmultiplicity_10MeVtrigThresh_10MeVdetectionThresh_h->Fill(firedCrystals10MeV_h); 
 
  253           HISTmultiplicity_10MeVtrigThresh_NOdetectionThresh_h->Fill(nhits); 
 
  255         if (efficiencyFlag5MeV_h==1)
 
  256           HISTmultiplicity_5MeVtrigThresh_h->Fill(firedCrystals_h); 
 
  258         if (efficiencyFlag1MeV_h==1)
 
  260           HISTmultiplicity_1MeVtrigThresh_100keV_h->Fill(firedCrystals100keV_h); 
 
  261           HISTmultiplicity_1MeVtrigThresh_300keV_h->Fill(firedCrystals300keV_h); 
 
  264         if (atLeastOneHitPerEventFlag_h==1)
 
  265           atLeastOneHitPerEventCounter_h+=1;
 
  268         Int_t ndigis = digi_array->GetEntries();
 
  271           atLeastOneHitPerEventFlag_d = 1;
 
  273         for (Int_t 
i=0; 
i<ndigis; 
i++)
 
  276             TVector3 digi_pos=digi->
where();
 
  282               HISTene_d->Fill(digi_ene);
 
  283               if (digi_ene >= 0.010) 
 
  284                 efficiencyFlag10MeV_d = 1;
 
  285               if (digi_ene >= 0.005) 
 
  286                 efficiencyFlag5MeV_d = 1;
 
  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);
 
  301                 sum_digi_ene_10by6crystalPack+=digi_ene;
 
  303                 sum_digi_ene_3by3crystalPack+=digi_ene;
 
  305               if (digi_ene >= 0.003)
 
  321               crystal_did = -(id_d%10000 - 36);     
 
  322               row_did = (id_d/1000000)%100 - 37;    
 
  335         if (efficiencyFlag10MeV_d==1)             
 
  337           HISTdigi_ene->Fill(sum_digi_ene);       
 
  338           HISTdigi_ene_10by6crystalPack->Fill(sum_digi_ene_10by6crystalPack);
 
  339           HISTdigi_ene_3by3crystalPack->Fill(sum_digi_ene_3by3crystalPack);
 
  342         if (efficiencyFlag10MeV_d==1)
 
  344           efficiencyCounter_d+=1;
 
  345           HISTmultiplicity_10MeVtrigThresh_d->Fill(ndigis); 
 
  347         if (efficiencyFlag5MeV_d==1)
 
  348           HISTmultiplicity_5MeVtrigThresh_d->Fill(ndigis); 
 
  350         if (atLeastOneHitPerEventFlag_d==1)
 
  351           atLeastOneHitPerEventCounter_d+=1;
 
  434           cout<<
"Evt. No. "<< j<<endl;
 
  520   gStyle->SetPalette(1);
 
  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();
 
  534   TCanvas* 
c1 = 
new TCanvas(
"c1",
"", 100, 100, 800, 800);
 
  537   HISTOhit_ene19_1->Draw();
 
  539   HISTOhit_ene19_2->Draw();
 
  540   HISTOhit_ene19_2->GetXaxis()->SetTitle(
"central crystal Deposited Energy per event (hit analysis)");
 
  542   HISTOhit_ene19_3->Draw();
 
  544   HISTOhit_ene19_4->Draw();
 
  546   HISTOhit_ene19_5->Draw();
 
  548   HISThit_ene_3by3crystalPack->Draw();
 
  549   HISThit_ene_3by3crystalPack->GetXaxis()->SetTitle(
"3x3 pack of crystals in FwEndCap Deposited Energy per event (hit analysis)");
 
  551   HISThit_ene_10by6crystalPack->Draw();
 
  552   HISThit_ene_10by6crystalPack->GetXaxis()->SetTitle(
"10x6 pack of crystals in FwEndCap Deposited Energy per event (hit analysis)");
 
  555   HISThit_ene->GetXaxis()->SetTitle(
"FwEndCap Deposited Energy per event (hit analysis)");
 
  557   TCanvas* 
c2 = 
new TCanvas(
"c2",
"", 100, 100, 800, 800);
 
  560   HISTOdigi_ene19_1->Draw();
 
  562   HISTOdigi_ene19_2->Draw();
 
  563   HISTOdigi_ene19_2->GetXaxis()->SetTitle(
"central crystal Deposited Energy per event (digi analysis)");
 
  565   HISTOdigi_ene19_3->Draw();
 
  567   HISTOdigi_ene19_4->Draw();
 
  569   HISTOdigi_ene19_5->Draw();
 
  571   HISTdigi_ene_3by3crystalPack->Draw();
 
  572   HISTdigi_ene_3by3crystalPack->GetXaxis()->SetTitle(
"3x3 pack of crystals in FwEndCap Deposited Energy per event (digi analysis)");
 
  574   HISTdigi_ene_10by6crystalPack->Draw();
 
  575   HISTdigi_ene_10by6crystalPack->GetXaxis()->SetTitle(
"10x6 pack of crystals in FwEndCap Deposited Energy per event (digi analysis)");
 
  577   HISTdigi_ene->Draw();
 
  578   HISTdigi_ene->GetXaxis()->SetTitle(
"FwEndCap Deposited Energy per event (digi analysis)");
 
virtual Double_t GetEnergy() const 
represents the reconstructed hit of one emc crystal 
Int_t GetThetaInt() const 
Int_t GetDetectorId() const 
TClonesArray * digi_array
TVector3 GetMomentum() const 
Short_t GetModule() const 
Double_t GetTheta() const 
TClonesArray * cluster_array
virtual Double_t GetEnergy() const 
represents the deposited energy of one emc crystal from simulation 
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)
const TVector3 & where() const 
TClonesArray * bump_array
TClonesArray * mctrack_array
Short_t GetModule() const