highestenergy_sumOf7clusters += highestenergy[k]; if (k==6) //eventually write the summation of the 7 highest cluster enegies
   11   gROOT->LoadMacro(
"$VMCWORKDIR/macro/mvd/Tools.C");
 
   12   gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
 
   14   TFile* 
fsim = 
new TFile(
"/home/moini/myPandaRoot/myCodes/ROOTfiles/h_c_channel/emc_complete_fullEMC.root");
 
   16   TTree *
tsim=(TTree *) fsim->Get(
"pndsim") ;
 
   18   tsim->SetBranchAddress(
"MCTrack",&mctrack_array);
 
   20   TClonesArray* 
digi_array=
new TClonesArray(
"PndEmcDigi");
 
   21   tsim->SetBranchAddress(
"EmcDigi",&digi_array);
 
   23   TClonesArray* 
cluster_array=
new TClonesArray(
"PndEmcCluster");
 
   24   tsim->SetBranchAddress(
"EmcCluster",&cluster_array);
 
   26   TClonesArray* 
bump_array=
new TClonesArray(
"PndEmcBump");
 
   27   tsim->SetBranchAddress(
"EmcBump",&bump_array);
 
   35   TH1F *
hene_mc= 
new TH1F(
"hene_mc",
"MC energy (GeV)",100,0.0,1.05);
 
   36   TH1F *
h10= 
new TH1F(
"h10",
" Theta (MC)",180,0.,180.);
 
   37   TH1F *
h20= 
new TH1F(
"h20",
" Phi (MC)",360,0.,360.);
 
   38   TH1F *
h10d= 
new TH1F(
"h10d",
" Theta (data)",180,0.,180.);
 
   39   TH1F *
h20d= 
new TH1F(
"h20d",
" Phi (data)",360,0.,360.);
 
   40   TH1F *
h1= 
new TH1F(
"h1",
" Theta difference",100,-2.,2.);
 
   41   TH1F *
h2= 
new TH1F(
"h2",
" Phi difference",100,-2.,2.);
 
   43   Int_t 
ncounts = tsim->GetEntriesFast();
 
   44   cout << 
"Number of events = " << ncounts<< endl;
 
   48    TH1F *HISTdigi_ene= 
new TH1F(
"HISTdigi_ene",
"FwEndCap energy (digi)",2000,0.0,2.05); 
 
   49    TH1F *HISTene_d= 
new TH1F(
"HISTene_d",
"energy (digi)",1000,0.0001,1.01);  
 
   50    TH2F *HISTxpad_x_d = 
new TH2F(
"HISTxpad_x_d",
"xpad vs x (digi)",200,200,300,2*38.5,-38.5,38.5);   
 
   51    TH2F *HISTypad_y_d = 
new TH2F(
"HISTypad_y_d",
"ypad vs y (digi)",200,200,300,2*38.5,-38.5,38.5);   
 
   52    TH2F *HISTrow_x_d = 
new TH2F(
"HISTrow_x_d",
"row vs x (digi)",200,200,300,2*38.5,-38.5,38.5);      
 
   53    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);
 
   54    TH2F *HISTy_x_d = 
new TH2F(
"HISTy_x_d",
"y vs x (digi map)",200,200,300,200,200,300);  
 
   55    TH1F *HISTOdigi_ene11_12= 
new TH1F(
"HISTOdigi_ene11_12",
"crystal [11,12] dep. energy (GeV)",100,0.0001,1.01);
 
   56    TH1F *HISTOdigi_ene12_12= 
new TH1F(
"HISTOdigi_ene12_12",
"crystal [12,12] dep. energy (GeV)",100,0.0001,1.01);
 
   57    TH1F *HISTOdigi_ene13_12= 
new TH1F(
"HISTOdigi_ene13_12",
"crystal [13,12] dep. energy (GeV)",100,0.0001,1.01);
 
   58    TH1F *HISTOdigi_ene14_12= 
new TH1F(
"HISTOdigi_ene14_12",
"crystal [14,12] dep. energy (GeV)",100,0.0001,1.01);
 
   59    TH1F *HISTtotdigis_fromClusterAnalysis = 
new TH1F(
"HISTtotdigis_fromClusterAnalysis",
"total number of digis per event",100,0,25);
 
   60    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);
 
   61    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);
 
   63    TH1I *HISTnumberOfClusters = 
new TH1I(
"HISTnumberOfClusters",
"Total number of clusters per event, having more than or equal to one digi per cluster",100,0,20);
 
   64    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);
 
   65    TH1I *HISTndigisOfHighestEnergyCluster = 
new TH1I(
"HISTndigisOfHighestEnergyCluster",
"Number of digis per event for clusters with highest energy deposition",1000,0,30);
 
   66    TH1F *HISTmax_cluster_energy= 
new TH1F(
"HISTOmax_cluster_energy",
"Maximum cluster energy deposition per event",500,0.,1.05);
 
   67    TH1F *HISTmax_cluster_theta = 
new TH1F(
"HISTmax_cluster_theta",
"#theta per event of the cluster with maximum deposition energy",100,0,30);
 
   68    TH1F *HISTmax_cluster_phi = 
new TH1F(
"HISTmax_cluster_phi",
"#phi per event of the cluster with maximum deposition energy",370,-185,185);
 
   69    TH1F *HISTmax_cluster_x = 
new TH1F(
"HISTmax_cluster_x",
"x per event of the cluster with maximum deposition energy",220,-110,110);
 
   70    TH1F *HISTmax_cluster_y = 
new TH1F(
"HISTmax_cluster_y",
"y per event of the cluster with maximum deposition energy",220,-110,110);
 
   71    TH1F *HISTmax_cluster_z = 
new TH1F(
"HISTmax_cluster_z",
"z per event of the cluster with maximum deposition energy",80,208,216);
 
   72    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);
 
   73    TH1F *HISTtheta_MonteCarlo = 
new TH1F(
"HISTtheta_MonteCarlo",
"Monte Carlo #theta per event of the cluster with maximum deposition energy",100,0,30);
 
   74    TH1F *HISTphi_MonteCarlo = 
new TH1F(
"HISTphi_MonteCarlo",
"Monte Carlo #phi per event of the cluster with maximum deposition energy",370,-185,185);
 
   75    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);
 
   76    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);
 
   77    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);
 
   78    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);
 
   79    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);
 
   80    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);
 
   81    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);
 
   82    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);
 
   83    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);
 
   84    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);
 
   86    TH1F *HISTinvariantMass = 
new TH1F(
"HISTinvariantMass",
"invariant mass of every two clusters (7 highest energy clusters in total)",3200,0.,3.2);
 
   87    TH2F *HISTinvariantMass_openingAngle = 
new TH2F(
"HISTinvariantMass_openingAngle",
"opening angle of the two clusters versus the invariant mass of the assumed two gammas that make the two clusters",3200,0,3.2,500,0,180);
 
   88    TH1F *HIST_Egamma1Egamma2 = 
new TH1F(
"HIST_Egamma1Egamma2",
"E_{#gamma1} #times E_{#gamma2}",8000,0,8.);
 
   89    TH2F *HIST_Egamma1vsEgamma2 = 
new TH2F(
"HIST_Egamma1vsEgamma2",
"E_{#gamma2} versus E_{#gamma1}",6400,0,6.4,3200,0,3.2);
 
   90    TH2F *HIST_Egamma1Egamma2_openingAngle = 
new TH2F(
"HIST_Egamma1Egamma2_openingAngle",
"opening angle of the two clusters versus E_{#gamma1} #times E_{#gamma2}",8000,0,8.,500,0,180);
 
   91    TH2F *HISTinvariantMass_Egamma1Egamma2 = 
new TH2F(
"HISTinvariantMass_Egamma1Egamma2",
"E_{#gamma1} #times E_{#gamma2} versus the invariant mass of the two gammas",3200,0,3.2,8000,0,8.);
 
   92    TH2F *HIST_Egamma1_Egamma1Egamma2 = 
new TH2F(
"HIST_Egamma1_Egamma1Egamma2",
"E_{#gamma1} #times E_{#gamma2} versus E_{#gamma1}",6400,0,6.4,8000,0,8.);
 
   93    TH2F *HIST_Egamma1_openingAngle = 
new TH2F(
"HIST_Egamma1_openingAngle",
"opening angle of the two clusters versus E_{#gamma1}",6400,0,6.4,500,0,180);
 
   94    TH3F *HISTinvariantMass_openingAngle_Egamma1Egamma2 = 
new TH3F(
"HISTinvariantMass_openingAngle_Egamma1Egamma2",
"",150,0,1.5,140,0,50,400,0,4.);
 
   96    TH1F *moduleDistribution = 
new TH1F(
"moduleDistribution",
"Module distribution of clusters for the decay channel h_{c}-> #pi^{0} #pi^{0} #eta #gamma",12,0,6);
 
   99    Int_t efficiencyCounter_d=0;
 
  100    Int_t atLeastOneHitPerEventCounter_d=0;
 
  103    for (
int j = 0; j < 
ncounts; j++) {
 
  105      Int_t efficiencyFlag10MeV_d=0;
 
  106      Int_t efficiencyFlag5MeV_d=0;
 
  107      Int_t atLeastOneHitPerEventFlag_d=0;
 
  114         theta_mc=photon_momentum.Theta()*(180./
TMath::Pi());
 
  115         phi_mc=photon_momentum.Phi()*(180./
TMath::Pi());
 
  195         Int_t NumberOfClusters, ClustNo, totdigis_fromClusterAnalysis, ndigisOfHighestEnergyCluster, NumberOfClusters_noModule5;
 
  196         NumberOfClusters=ClustNo=totdigis_fromClusterAnalysis=ndigisOfHighestEnergyCluster=NumberOfClusters_noModule5=0;   
 
  197         Int_t idClusterSatisfiedThresholdEnergy=-1;
 
  199         Double_t highestenergy_sumOf7clusters=0;    
 
  201         Double_t highestenergy[7], cluster_x_7[7], cluster_y_7[7],cluster_z_7[7],cluster_dist_7[7],cluster_module_7[7];
 
  202         for (
int k=0; k<7;k++){
 
  204           cluster_x_7[k]=cluster_y_7[k]=cluster_z_7[k]=cluster_dist_7[k]=cluster_module_7[k]=-1000; 
 
  207         Int_t originalClusterIndex[7];
 
  208         for (
int k=0; k<7;k++)
 
  209           originalClusterIndex[k]=-1;               
 
  211         if (cluster_array->GetEntriesFast() > 0)
 
  213               NumberOfClusters=cluster_array->GetEntriesFast(); 
 
  214               totClusters+=NumberOfClusters; 
 
  215               std::vector <double> clusterEnergies;
 
  216               std::vector <double> clusterEnergies_original;
 
  218               for (Int_t 
i=0; 
i<NumberOfClusters; 
i++)                        
 
  223                       NumberOfClusters_noModule5++; 
 
  226                          moduleDistribution->Fill(cluster->
GetModule());
 
  229                          clusterEnergies.push_back(cluster_energy);                 
 
  230                          clusterEnergies_original.push_back(cluster_energy);        
 
  233                          totdigis_fromClusterAnalysis += 
ndigi;
 
  234                          if (ndigi >= 1 && cluster_energy >= clusterThresholdEnergy) 
 
  286               std::sort(clusterEnergies.begin(), clusterEnergies.end());   
 
  288               if (NumberOfClusters_noModule5>=7)  
 
  290                 for (
int k=0; k<7; k++)           
 
  292                    highestenergy[k] = clusterEnergies[(NumberOfClusters_noModule5-1)-k];
 
  298                    for (
int i=0; 
i<NumberOfClusters_noModule5; 
i++) 
 
  299                      if (!(clusterEnergies_original[
i]>highestenergy[k]) && !(clusterEnergies_original[
i]<highestenergy[k]))
 
  301                        originalClusterIndex[k]=
i;
 
  306                    TVector3 cluster_pos=cluster->
where();
 
  307                    cluster_x_7[k]=cluster->
x();
 
  308                    cluster_y_7[k]=cluster->
y();
 
  309                    cluster_z_7[k]=cluster->
z();
 
  310                    cluster_dist_7[k]=cluster_pos.Mag();
 
  311                    cluster_module_7[k]=cluster->
GetModule();
 
  314               for (
int k0=1; k0<7; k0++)
 
  318                   Double_t cosTheta = (1./cluster_dist_7[0]/cluster_dist_7[k0])*(cluster_x_7[0]*cluster_x_7[k0]+cluster_y_7[0]*cluster_y_7[k0]+cluster_z_7[0]*cluster_z_7[k0]);
 
  319                   Double_t invMass = 
sqrt(2*highestenergy[0]*highestenergy[k0]*(1-cosTheta));
 
  320                   HISTinvariantMass->Fill(invMass);
 
  321                   HISTinvariantMass_openingAngle->Fill(invMass,
acos(cosTheta)*180/3.1415926535);
 
  322                   HIST_Egamma1Egamma2->Fill(highestenergy[0]*highestenergy[k0]);
 
  323                   HIST_Egamma1vsEgamma2->Fill(highestenergy[0],highestenergy[k0]);
 
  324                   HIST_Egamma1Egamma2_openingAngle->Fill(highestenergy[0]*highestenergy[k0],
acos(cosTheta)*180/3.1415926535);
 
  325                   HISTinvariantMass_Egamma1Egamma2->Fill(invMass,highestenergy[0]*highestenergy[k0]);
 
  326                   HIST_Egamma1_Egamma1Egamma2->Fill(highestenergy[0],highestenergy[0]*highestenergy[k0]);
 
  327                   HIST_Egamma1_openingAngle->Fill(highestenergy[0],
acos(cosTheta)*180/3.1415926535);
 
  328                   HISTinvariantMass_openingAngle_Egamma1Egamma2->Fill(invMass,
acos(cosTheta)*180/3.1415926535,highestenergy[0]*highestenergy[k0]);
 
  331               for (
int k1=2; k1<7; k1++)
 
  335                   Double_t cosTheta = (1./cluster_dist_7[1]/cluster_dist_7[k1])*(cluster_x_7[1]*cluster_x_7[k1]+cluster_y_7[1]*cluster_y_7[k1]+cluster_z_7[1]*cluster_z_7[k1]);
 
  336                   Double_t invMass = 
sqrt(2*highestenergy[1]*highestenergy[k1]*(1-cosTheta));
 
  337                   HISTinvariantMass->Fill(invMass);
 
  338                   HISTinvariantMass_openingAngle->Fill(invMass,
acos(cosTheta)*180/3.1415926535);
 
  339                   HIST_Egamma1Egamma2->Fill(highestenergy[1]*highestenergy[k1]);
 
  340                   HIST_Egamma1vsEgamma2->Fill(highestenergy[1],highestenergy[k1]);
 
  341                   HIST_Egamma1Egamma2_openingAngle->Fill(highestenergy[1]*highestenergy[k1],
acos(cosTheta)*180/3.1415926535);
 
  342                   HISTinvariantMass_Egamma1Egamma2->Fill(invMass,highestenergy[1]*highestenergy[k1]);
 
  343                   HIST_Egamma1_Egamma1Egamma2->Fill(highestenergy[1],highestenergy[1]*highestenergy[k1]);
 
  344                   HIST_Egamma1_openingAngle->Fill(highestenergy[1],
acos(cosTheta)*180/3.1415926535);
 
  345                   HISTinvariantMass_openingAngle_Egamma1Egamma2->Fill(invMass,
acos(cosTheta)*180/3.1415926535,highestenergy[1]*highestenergy[k1]);
 
  348               for (
int k2=3; k2<7; k2++)
 
  352                   Double_t cosTheta = (1./cluster_dist_7[2]/cluster_dist_7[k2])*(cluster_x_7[2]*cluster_x_7[k2]+cluster_y_7[2]*cluster_y_7[k2]+cluster_z_7[2]*cluster_z_7[k2]);
 
  353                   Double_t invMass = 
sqrt(2*highestenergy[2]*highestenergy[k2]*(1-cosTheta));
 
  354                   HISTinvariantMass->Fill(invMass);
 
  355                   HISTinvariantMass_openingAngle->Fill(invMass,
acos(cosTheta)*180/3.1415926535);
 
  356                   HIST_Egamma1Egamma2->Fill(highestenergy[2]*highestenergy[k2]);
 
  357                   HIST_Egamma1vsEgamma2->Fill(highestenergy[2],highestenergy[k2]);
 
  358                   HIST_Egamma1Egamma2_openingAngle->Fill(highestenergy[2]*highestenergy[k2],
acos(cosTheta)*180/3.1415926535);
 
  359                   HISTinvariantMass_Egamma1Egamma2->Fill(invMass,highestenergy[2]*highestenergy[k2]);
 
  360                   HIST_Egamma1_Egamma1Egamma2->Fill(highestenergy[2],highestenergy[2]*highestenergy[k2]);
 
  361                   HIST_Egamma1_openingAngle->Fill(highestenergy[2],
acos(cosTheta)*180/3.1415926535);
 
  362                   HISTinvariantMass_openingAngle_Egamma1Egamma2->Fill(invMass,
acos(cosTheta)*180/3.1415926535,highestenergy[2]*highestenergy[k2]);
 
  365               for (
int k3=4; k3<7; k3++)
 
  369                   Double_t cosTheta = (1./cluster_dist_7[3]/cluster_dist_7[k3])*(cluster_x_7[3]*cluster_x_7[k3]+cluster_y_7[3]*cluster_y_7[k3]+cluster_z_7[3]*cluster_z_7[k3]);
 
  370                   Double_t invMass = 
sqrt(2*highestenergy[3]*highestenergy[k3]*(1-cosTheta));
 
  371                   HISTinvariantMass->Fill(invMass);
 
  372                   HISTinvariantMass_openingAngle->Fill(invMass,
acos(cosTheta)*180/3.1415926535);
 
  373                   HIST_Egamma1Egamma2->Fill(highestenergy[3]*highestenergy[k3]);
 
  374                   HIST_Egamma1vsEgamma2->Fill(highestenergy[3],highestenergy[k3]);
 
  375                   HIST_Egamma1Egamma2_openingAngle->Fill(highestenergy[3]*highestenergy[k3],
acos(cosTheta)*180/3.1415926535);
 
  376                   HISTinvariantMass_Egamma1Egamma2->Fill(invMass,highestenergy[3]*highestenergy[k3]);
 
  377                   HIST_Egamma1_Egamma1Egamma2->Fill(highestenergy[3],highestenergy[3]*highestenergy[k3]);
 
  378                   HIST_Egamma1_openingAngle->Fill(highestenergy[3],
acos(cosTheta)*180/3.1415926535);
 
  379                   HISTinvariantMass_openingAngle_Egamma1Egamma2->Fill(invMass,
acos(cosTheta)*180/3.1415926535,highestenergy[3]*highestenergy[k3]);
 
  382               for (
int k4=5; k4<7; k4++)
 
  386                   Double_t cosTheta = (1./cluster_dist_7[4]/cluster_dist_7[k4])*(cluster_x_7[4]*cluster_x_7[k4]+cluster_y_7[4]*cluster_y_7[k4]+cluster_z_7[4]*cluster_z_7[k4]);
 
  387                   Double_t invMass = 
sqrt(2*highestenergy[4]*highestenergy[k4]*(1-cosTheta));
 
  388                   HISTinvariantMass->Fill(invMass);
 
  389                   HISTinvariantMass_openingAngle->Fill(invMass,
acos(cosTheta)*180/3.1415926535);
 
  390                   HIST_Egamma1Egamma2->Fill(highestenergy[4]*highestenergy[k4]);
 
  391                   HIST_Egamma1vsEgamma2->Fill(highestenergy[4],highestenergy[k4]);
 
  392                   HIST_Egamma1Egamma2_openingAngle->Fill(highestenergy[4]*highestenergy[k4],
acos(cosTheta)*180/3.1415926535);
 
  393                   HISTinvariantMass_Egamma1Egamma2->Fill(invMass,highestenergy[4]*highestenergy[k4]);
 
  394                   HIST_Egamma1_Egamma1Egamma2->Fill(highestenergy[4],highestenergy[4]*highestenergy[k4]);
 
  395                   HIST_Egamma1_openingAngle->Fill(highestenergy[4],
acos(cosTheta)*180/3.1415926535);
 
  396                   HISTinvariantMass_openingAngle_Egamma1Egamma2->Fill(invMass,
acos(cosTheta)*180/3.1415926535,highestenergy[4]*highestenergy[k4]);
 
  399               for (
int k5=6; k5<7; k5++)
 
  403                   Double_t cosTheta = (1./cluster_dist_7[5]/cluster_dist_7[k5])*(cluster_x_7[5]*cluster_x_7[k5]+cluster_y_7[5]*cluster_y_7[k5]+cluster_z_7[5]*cluster_z_7[k5]);
 
  404                   Double_t invMass = 
sqrt(2*highestenergy[5]*highestenergy[k5]*(1-cosTheta));
 
  405                   HISTinvariantMass->Fill(invMass);
 
  406                   HISTinvariantMass_openingAngle->Fill(invMass,
acos(cosTheta)*180/3.1415926535);
 
  407                   HIST_Egamma1Egamma2->Fill(highestenergy[5]*highestenergy[k5]);
 
  408                   HIST_Egamma1vsEgamma2->Fill(highestenergy[5],highestenergy[k5]);
 
  409                   HIST_Egamma1Egamma2_openingAngle->Fill(highestenergy[5]*highestenergy[k5],
acos(cosTheta)*180/3.1415926535);
 
  410                   HISTinvariantMass_Egamma1Egamma2->Fill(invMass,highestenergy[5]*highestenergy[k5]);
 
  411                   HIST_Egamma1_Egamma1Egamma2->Fill(highestenergy[5],highestenergy[5]*highestenergy[k5]);
 
  412                   HIST_Egamma1_openingAngle->Fill(highestenergy[5],
acos(cosTheta)*180/3.1415926535);
 
  413                   HISTinvariantMass_openingAngle_Egamma1Egamma2->Fill(invMass,
acos(cosTheta)*180/3.1415926535,highestenergy[5]*highestenergy[k5]);
 
  421         if (NumberOfClusters>0)
 
  422           HISTnumberOfClusters->Fill(NumberOfClusters);                         
 
  424           HISTclustNo->Fill(ClustNo);                                           
 
  425         if (ndigisOfHighestEnergyCluster>0)
 
  426           HISTndigisOfHighestEnergyCluster->Fill(ndigisOfHighestEnergyCluster); 
 
  428         HISTtotdigis_fromClusterAnalysis->Fill(totdigis_fromClusterAnalysis);
 
  431           cout<<
"Evt. No. "<< j<<endl;
 
  436    cout<<
"totClusters = "<<totClusters<<endl;
 
  438   gStyle->SetPalette(1);
 
  540    TCanvas* 
c10 = 
new TCanvas(
"c10",
"", 100, 100, 1200, 800);
 
  542    c10->cd(1)->SetLogy();
 
  543    HISTinvariantMass->Draw();
 
  544    c10->cd(2)->SetLogy();
 
  545    HIST_Egamma1Egamma2->Draw();
 
  546    c10->cd(3)->SetLogz();
 
  547    HIST_Egamma1vsEgamma2->Draw(
"colz");
 
  548    c10->cd(4)->SetLogz();
 
  549    HISTinvariantMass_openingAngle->Draw(
"colz");
 
  550    c10->cd(5)->SetLogz();
 
  551    HIST_Egamma1Egamma2_openingAngle->Draw(
"colz");
 
  552    c10->cd(6)->SetLogz();
 
  553    HIST_Egamma1_openingAngle->Draw(
"colz");
 
  554    c10->cd(7)->SetLogz();
 
  555    HIST_Egamma1_Egamma1Egamma2->Draw(
"colz");
 
  556    c10->cd(8)->SetLogz();
 
  557    HISTinvariantMass_Egamma1Egamma2->Draw(
"colz");
 
  559    TCanvas* c100 = 
new TCanvas(
"c100",
"", 100, 100, 1200, 800);
 
  560    HISTinvariantMass_openingAngle_Egamma1Egamma2->Draw(
"Box");
 
  561    HISTinvariantMass_openingAngle_Egamma1Egamma2->GetXaxis()->SetTitle(
"m_{#gamma#gamma}");
 
  562    HISTinvariantMass_openingAngle_Egamma1Egamma2->GetXaxis()->SetTitleOffset(1.5);
 
  563    HISTinvariantMass_openingAngle_Egamma1Egamma2->GetYaxis()->SetTitle(
"opening angle");
 
  564    HISTinvariantMass_openingAngle_Egamma1Egamma2->GetYaxis()->SetTitleOffset(1.5);
 
  565    HISTinvariantMass_openingAngle_Egamma1Egamma2->GetZaxis()->SetTitle(
"E_{#gamma1} #times E_{#gamma2}");
 
  566    HISTinvariantMass_openingAngle_Egamma1Egamma2->GetZaxis()->SetTitleOffset(1.1);
 
  569    TCanvas* 
c11 = 
new TCanvas(
"c11",
"", 100, 100, 1200, 800);
 
  571    moduleDistribution->Draw();
 
  574    TString outfile= 
"./invMass_histo_7gammaAnalysis_FullEmcIncluded.root";
 
  575    TFile* file_out = 
new TFile(outfile,
"RECREATE");
 
  577    HISTinvariantMass->Write();
 
  578    HISTinvariantMass_openingAngle->Write();
 
  579    HIST_Egamma1Egamma2->Write();
 
  580    HIST_Egamma1vsEgamma2->Write();
 
  581    HIST_Egamma1Egamma2_openingAngle->Write();
 
  582    HISTinvariantMass_Egamma1Egamma2->Write();
 
  583    HIST_Egamma1_Egamma1Egamma2->Write();
 
  584    HIST_Egamma1_openingAngle->Write();
 
  585    HISTinvariantMass_openingAngle_Egamma1Egamma2->Write();
 
  586    moduleDistribution->Write();
 
  593    printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
 
friend F32vec4 acos(const F32vec4 &a)
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
Short_t GetModule() const 
friend F32vec4 sqrt(const F32vec4 &a)
TClonesArray * digi_array
TVector3 GetMomentum() const 
TClonesArray * cluster_array
a cluster (group of neighboring crystals) of hit emc crystals 
Int_t NumberOfDigis() const 
Double_t GetEnergyCorrected() const 
TClonesArray * bump_array
TClonesArray * mctrack_array