Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:18

0001 #define Loopers_cxx
0002 #include "Loopers.h"
0003 #include <TH2.h>
0004 #include <TStyle.h>
0005 #include <TCanvas.h>
0006 
0007 #include <cmath>
0008 
0009 //#define DEBUG
0010 
0011 //using namespace std;
0012 
0013 void Loopers::Loop()
0014 {
0015   //   In a ROOT session, you can do:
0016   //      Root > .L Loopers.C
0017   //      Root > Loopers t
0018   //      Root > t.GetEntry(12); // Fill t data members with entry number 12
0019   //      Root > t.Show();       // Show values of entry 12
0020   //      Root > t.Show(16);     // Read and show values of entry 16
0021   //      Root > t.Loop();       // Loop on all entries
0022   //
0023   
0024   //     This is the loop skeleton where:
0025   //    jentry is the global entry number in the chain
0026   //    ientry is the entry number in the current Tree
0027   //  Note that the argument to GetEntry must be:
0028   //    jentry for TChain::GetEntry
0029   //    ientry for TTree::GetEntry and TBranch::GetEntry
0030   //
0031   //       To read only selected branches, Insert statements like:
0032   // METHOD1:
0033   //    fChain->SetBranchStatus("*",0);  // disable all branches
0034   //    fChain->SetBranchStatus("branchname",1);  // activate branchname
0035   // METHOD2: replace line
0036   //    fChain->GetEntry(jentry);       //read all branches
0037   //by  b_branchname->GetEntry(ientry); //read only this branch
0038   if (fChain == 0) return;
0039   
0040   Long64_t nentries = fChain->GetEntriesFast();
0041   
0042   theLogFile << " Entries " << nentries << endl;
0043   
0044   Long64_t nbytes = 0, nb = 0;
0045   for (Long64_t jentry=0; jentry<nentries; jentry++) {
0046     // load tree variables
0047     Long64_t ientry = LoadTree(jentry);
0048     if (ientry < 0) break;
0049     nb = fChain->GetEntry(jentry);   nbytes += nb;
0050     //
0051     
0052     double phiSum   = 1e-11; // phi_i [protection against division by zero]
0053     double phi_init = 0.0;
0054     double phi_last = 0.0;
0055     unsigned int n_loops = 0;
0056     // Density
0057     double pathSum     = 1e-11; // x_i
0058     double normDensSum = 0.0; // rho_i x x_i
0059     double pathSum_211  = 0.0; // x_i
0060     double pathSum_13   = 0.0; // x_i
0061     double pathSum_11   = 0.0; // x_i
0062     double pathSum_2212 = 0.0; // x_i
0063     // Lambda0
0064     double nuclSum     = 1e-11; // x_i / l0_i
0065     // Hadronic Interactions
0066     unsigned int iHadronicInteractions = 0;
0067     double energyLossHad = 0.0;
0068     // Secondaries
0069     int    iParticle    = -1;
0070     double particleMass = -1;
0071     
0072     // loop on steps
0073     //    theLogFile << " Steps " << Nsteps << endl;
0074     theLogFile << "Event " << jentry+1 << " Steps = " << Nsteps << endl;
0075     Int_t lastStep = 0;
0076     for(Int_t iStep=0; iStep<Nsteps; iStep++) {
0077       
0078       // x_i
0079       double x_i = sqrt(
0080             (FinalX[iStep]-InitialX[iStep]) * (FinalX[iStep]-InitialX[iStep])
0081             +
0082             (FinalY[iStep]-InitialY[iStep]) * (FinalY[iStep]-InitialY[iStep])
0083             +
0084             (FinalZ[iStep]-InitialZ[iStep]) * (FinalZ[iStep]-InitialZ[iStep])
0085             );
0086       
0087       // hadronic interactions
0088       if(ParticleStepPostInteraction[iStep] == 4) {
0089     iHadronicInteractions++;
0090     energyLossHad += (InitialE[iStep] - FinalE[iStep]);
0091       }
0092       
0093       // find emission
0094       if(iStep==0) actualParticleID = ParticleStepID[iStep];
0095       if(iStep!=0) {
0096     if(FinalZ[iStep-1] != InitialZ[iStep]) {
0097       theLogFile << "\t\t EMISSION at " << iStep
0098              << " from " << actualParticleID << " of a " << ParticleStepID[iStep] << endl;
0099     }
0100       }
0101       
0102       // find decay
0103       if(actualParticleID != ParticleStepID[iStep]) {
0104     theLogFile << "\t\t DECAY at " << iStep
0105            << " from " << actualParticleID << " to " << ParticleStepID[iStep] << endl;
0106     actualParticleID = ParticleStepID[iStep];   
0107     if (fabs(ParticleStepID[iStep]) == 211) { // pi+-
0108       iParticle = 1;
0109     }
0110     if (fabs(ParticleStepID[iStep]) == 13) {  // mu+-
0111       iParticle = 2;
0112     }
0113     if (fabs(ParticleStepID[iStep]) == 11) {  // e+-
0114       iParticle = 3;
0115     }
0116     if (fabs(ParticleStepID[iStep]) == 2212) { // p+-
0117       iParticle = 4;
0118     }   
0119     hist_productionEnergy_vs_secondaryParticle->Fill((float)iParticle,(InitialE[iStep]-InitialM[iStep]));
0120       }
0121       
0122       // path sum
0123       if (fabs(ParticleStepID[iStep]) == 211) { // pi+-
0124     pathSum_211+=x_i;
0125       }
0126       if (fabs(ParticleStepID[iStep]) == 13) {  // mu+-
0127     pathSum_13+=x_i;
0128       }
0129       if (fabs(ParticleStepID[iStep]) == 11) {  // e+-
0130     pathSum_11+=x_i;
0131       }
0132       if (fabs(ParticleStepID[iStep]) == 2212) { // p+-
0133     pathSum_2212+=x_i;
0134       }
0135       
0136       
0137       // select secondary/decay particles: only pi/mu/e/p
0138       if( fabs(ParticleStepID[iStep])!=211
0139       &&
0140       fabs(ParticleStepID[iStep])!=13
0141       &&
0142       fabs(ParticleStepID[iStep])!=11
0143       &&
0144       fabs(ParticleStepID[iStep])!=2212
0145       ) {
0146     //  theLogFile << "Skip particle " << ParticleStepID[iStep] << " step " << iStep << endl;
0147     continue;
0148       } else {
0149     // go on
0150       }
0151       
0152       // energy threshold
0153       if( ( ParticleStepID[0] == ParticleID )
0154       &&
0155       (
0156        ( (FinalE[iStep]-InitialM[iStep]) < Ekin_threshold ) // lower energy
0157        ||
0158        ( ParticleStepPostInteraction[iStep] == 6 ) // decay
0159        )
0160       ) {
0161     if(lastStep == 0) {
0162       theLogFile << "Set final step to " << iStep << " final E " << FinalE[iStep] << " MeV" << endl;
0163       lastStep = iStep;
0164     }
0165     continue;
0166       }
0167       
0168       
0169       // middle-point
0170       double xStep = (FinalX[iStep]+InitialX[iStep])/2;
0171       double yStep = (FinalY[iStep]+InitialY[iStep])/2;
0172       double zStep = (FinalZ[iStep]+InitialZ[iStep])/2;
0173       //
0174       double phi_i = atan2(yStep,xStep); // [-pi,+pi]
0175       double deltaPhi = (phi_last > 0 && phi_i < 0) ? (phi_i-phi_last)+(2*pi) : phi_i-phi_last; // it works only if phi is growing anti-clockwise
0176       phiSum += deltaPhi;
0177       //
0178       // Density
0179       // rho_i
0180       double rho_i = MaterialDensity[iStep];
0181       pathSum     += x_i;
0182       normDensSum += (rho_i * x_i);
0183       // Lambda0
0184       double l0_i = MaterialLambda0[iStep];
0185       nuclSum += (x_i / l0_i);      
0186       
0187       /*
0188     theLogFile << "################################" << endl;
0189     theLogFile << "\t step " << iStep                << endl;
0190     theLogFile << "\t phi_i = " << phi_i             << endl;
0191     theLogFile << "\t DeltaPhi = " << deltaPhi       << endl;
0192     theLogFile << "\t PhiSum = " << phiSum           << endl;
0193     theLogFile << "\t x_i = "   << x_i   << " mm"    << endl;
0194     theLogFile << "\t rho_i = " << rho_i << " g/cm3" << endl;
0195     theLogFile << "################################" << endl;
0196       */
0197       phi_last = phi_i;
0198     
0199     } // step loop
0200     
0201     double phiTurns = phiSum/(2*pi);
0202     phiTurns += (float)n_loops;
0203     
0204     theLogFile << "  Last Step = " << lastStep << endl;
0205     if(lastStep!=0) {
0206       // average density: Sum(x_i x rho_i) / Sum(x_i)
0207       double averageDensity = normDensSum / pathSum;
0208       double averageLambda0 = pathSum / nuclSum;
0209       double time = (pathSum/1000.) / c; // time: [s] ; pathSum: [mm]->[m] ; c: [m/s]
0210       double bunchCrossings = (time * 1E9) / bx; // time: [s]-->[ns] ; bx: [ns]
0211       //
0212       if(
0213      (
0214       ParticleStepFinalPt[lastStep] > 10 // The particle must disappear with pT=0 GeV
0215       &&
0216       FinalZ[lastStep] < 2500 // only if not at the end of the Tracker (along z)
0217       )
0218      ||
0219      (
0220       ParticleStepPostInteraction[lastStep] == 0
0221       )
0222      ) {
0223     theLogFile << "################################"                                      << endl;
0224     theLogFile << "Event " << jentry+1                                                    << endl;
0225     theLogFile << "\t Steps = " << Nsteps                                                 << endl;
0226     theLogFile << "\t Last Step = " << lastStep                                           << endl;
0227     theLogFile << "\t Sum(phi_i) = "  << phiSum                                           << endl;
0228     theLogFile << "\t Turns = "       << phiTurns                                         << endl;
0229     theLogFile << "\t Energy Init = " << InitialE[0]                                      << endl;
0230     theLogFile << "\t Energy End = "  << FinalE[lastStep]                                 << endl;
0231     theLogFile << "\t Final Z = "  << FinalZ[lastStep]                                    << endl;
0232     theLogFile << "\t Particle Mass = " << InitialM[0]                                    << endl;
0233     theLogFile << "\t pT Init = " << ParticleStepInitialPt[0]                             << endl;
0234     theLogFile << "\t pT End = "  << ParticleStepFinalPt[lastStep]                        << endl;
0235     theLogFile << "\t Last particle = " << ParticleStepID[lastStep]                       << endl;
0236     theLogFile << "\t Final Pre Interaction  = " << ParticleStepPreInteraction[lastStep]  << endl;
0237     theLogFile << "\t Final Post Interaction = " << ParticleStepPostInteraction[lastStep] << endl;
0238     theLogFile << "\t Sum(x_i) = "         << pathSum        << " mm"                     << endl;
0239     theLogFile << "\t Sum(x_i x rho_i) = " << normDensSum    << " mm x g/cm3"             << endl;
0240     theLogFile << "\t <rho> = "            << averageDensity << " g/cm3"                  << endl;
0241     theLogFile << "\t <lambda0> = "        << averageLambda0 << " mm"                     << endl;
0242     theLogFile << "\t path length per turn = " << pathSum / phiTurns << " mm"             << endl;
0243     theLogFile << "\t time spent = " << time << " s"                                      << endl;
0244     theLogFile << "\t bunch crossings = " << bunchCrossings                               << endl;
0245     theLogFile << "################################"                                      << endl;
0246       }
0247       // else { // The particle must disappear with pT=0 GeV
0248       hist_loops->Fill(phiTurns);
0249       hist_energy_init->Fill(InitialE[0]);
0250       hist_energy_end->Fill(FinalE[lastStep]);
0251       hist_energy_beforeend->Fill(InitialE[lastStep]);
0252       hist_density->Fill(averageDensity);
0253       hist_lambda0->Fill(averageLambda0);
0254       hist_density_vs_loops->Fill(phiTurns,averageDensity);
0255       hist_pT_init->Fill(ParticleStepInitialPt[0]);
0256       hist_pT_end->Fill(ParticleStepFinalPt[lastStep]);
0257       hist_energyLossPerTurn->Fill( (InitialE[0]-FinalE[lastStep]) / phiTurns ); // Energy = Kinetics + Mass (Final Energy=Mass)
0258       hist_trackLength->Fill(pathSum);
0259       hist_trackLengthPerTurn->Fill(pathSum / phiTurns);
0260       hist_lastInteraction->Fill(ParticleStepPostInteraction[lastStep]);
0261       hist_bx->Fill(bunchCrossings);
0262       hist_bx_finer->Fill(bunchCrossings);
0263       hist_energybeforeend_vs_lastInteraction->Fill(ParticleStepPostInteraction[lastStep],InitialE[lastStep]);
0264       hist_trackLength_vs_lastInteraction->Fill(ParticleStepPostInteraction[lastStep],pathSum);
0265       hist_hadronicInteractions->Fill((float)iHadronicInteractions);
0266       hist_hadronicInteractions_vs_lastInteraction->Fill(ParticleStepPostInteraction[lastStep],(float)iHadronicInteractions);
0267       hist_energyLossHadronicInteractions->Fill(energyLossHad);
0268 
0269       // Secondaries
0270       // cut away zeroes
0271       //      if(pathSum_211  == 0) pathSum_211  = -10.;
0272       //      if(pathSum_13   == 0) pathSum_13   = -10.;
0273       if( !(pathSum_11   > 0) ) pathSum_11   = -10000.;
0274       if( !(pathSum_2212 > 0) ) pathSum_2212 = -10000.;
0275       //
0276       if(pathSum_13 > 0){
0277     hist_bx_vs_secondaryParticle->Fill(1,-10.);
0278     hist_bx_vs_secondaryParticle->Fill(2,((pathSum_211+pathSum_13)/1000)/c*1E9/bx);
0279       } else {
0280     hist_bx_vs_secondaryParticle->Fill(1,(pathSum_211/1000)/c*1E9/bx);
0281     hist_bx_vs_secondaryParticle->Fill(2,-10.);
0282       }
0283       hist_bx_vs_secondaryParticle->Fill(3,(pathSum_11/1000)/c*1E9/bx);
0284       hist_bx_vs_secondaryParticle->Fill(4,(pathSum_2212/1000)/c*1E9/bx);
0285       //      } // sanity check final pT=0
0286       
0287     } // steps!=0
0288     
0289   } // event loop
0290   
0291   // Draw plots
0292   MakePlots("Gigi");
0293   //
0294   
0295 }
0296 
0297 
0298 void Loopers::MakePlots(TString suffix) { 
0299   //
0300   rootStyle();
0301   //
0302   //
0303   // canvas
0304   TCanvas can_Gigi("can_Gigi","can_Gigi",1300,800);
0305   //  can_Gigi.Range(0,0,25,25);
0306   can_Gigi.SetFillColor(kWhite);
0307   //
0308   
0309   // Draw
0310   can_Gigi.cd();
0311   hist_loops->SetLineColor(kBlue);
0312   hist_loops->SetFillColor(kWhite);
0313   hist_loops->Draw();
0314   //  
0315   // Print
0316   theLogFile << endl << "--------"     << endl;
0317   theLogFile << hist_loops->GetTitle() << endl;
0318   theLogFile << "\t Mean = " << hist_loops->GetMean()  << endl;
0319   theLogFile << "\t  RMS = " << hist_loops->GetRMS()   << endl;
0320   //
0321   // Store
0322   can_Gigi.Update();
0323   can_Gigi.SaveAs( Form("%s/Loopers_Turns_%s.eps",  theDirName.Data(), suffix.Data() ) );
0324   can_Gigi.SaveAs( Form("%s/Loopers_Turns_%s.gif",  theDirName.Data(), suffix.Data() ) );
0325   // 
0326   
0327   // Draw
0328   can_Gigi.cd();
0329   hist_energy_init->SetLineColor(kBlue);
0330   hist_energy_init->SetFillColor(kWhite);
0331   hist_energy_init->Draw();
0332   //  
0333   // Print
0334   theLogFile << endl << "--------"     << endl;
0335   theLogFile << hist_energy_init->GetTitle() << endl;
0336   theLogFile << "\t Mean = " << hist_energy_init->GetMean()  << endl;
0337   theLogFile << "\t  RMS = " << hist_energy_init->GetRMS()   << endl;
0338   //
0339   // Store
0340   can_Gigi.Update();
0341   can_Gigi.SaveAs( Form("%s/Loopers_Energy_Init_%s.eps",  theDirName.Data(), suffix.Data() ) );
0342   can_Gigi.SaveAs( Form("%s/Loopers_Energy_Init_%s.gif",  theDirName.Data(), suffix.Data() ) );
0343   // 
0344 
0345   // Draw
0346   can_Gigi.cd();
0347   hist_energy_end->SetLineColor(kBlue);
0348   hist_energy_end->SetFillColor(kWhite);
0349   hist_energy_end->Draw();
0350   //  
0351   // Print
0352   theLogFile << endl << "--------"     << endl;
0353   theLogFile << hist_energy_end->GetTitle() << endl;
0354   theLogFile << "\t Mean = " << hist_energy_end->GetMean()  << endl;
0355   theLogFile << "\t  RMS = " << hist_energy_end->GetRMS()   << endl;
0356   //
0357   // Store
0358   can_Gigi.Update();
0359   can_Gigi.SaveAs( Form("%s/Loopers_Energy_End_%s.eps",  theDirName.Data(), suffix.Data() ) );
0360   can_Gigi.SaveAs( Form("%s/Loopers_Energy_End_%s.gif",  theDirName.Data(), suffix.Data() ) );
0361   // 
0362 
0363   // Draw
0364   can_Gigi.cd();
0365   hist_energy_beforeend->SetLineColor(kBlue);
0366   hist_energy_beforeend->SetFillColor(kWhite);
0367   hist_energy_beforeend->Draw();
0368   //  
0369   // Print
0370   theLogFile << endl << "--------"     << endl;
0371   theLogFile << hist_energy_beforeend->GetTitle() << endl;
0372   theLogFile << "\t Mean = " << hist_energy_beforeend->GetMean()  << endl;
0373   theLogFile << "\t  RMS = " << hist_energy_beforeend->GetRMS()   << endl;
0374   //
0375   // Store
0376   can_Gigi.Update();
0377   can_Gigi.SaveAs( Form("%s/Loopers_Energy_BeforeEnd_%s.eps",  theDirName.Data(), suffix.Data() ) );
0378   can_Gigi.SaveAs( Form("%s/Loopers_Energy_BeforeEnd_%s.gif",  theDirName.Data(), suffix.Data() ) );
0379   // 
0380 
0381   // Draw
0382   can_Gigi.cd();
0383   hist_density->SetLineColor(kBlue);
0384   hist_density->SetFillColor(kWhite);
0385   hist_density->Draw();
0386   //  
0387   // Print
0388   theLogFile << endl << "--------"     << endl;
0389   theLogFile << hist_density->GetTitle() << endl;
0390   theLogFile << "\t Mean = " << hist_density->GetMean()  << endl;
0391   theLogFile << "\t  RMS = " << hist_density->GetRMS()   << endl;
0392   //
0393   // Store
0394   can_Gigi.Update();
0395   can_Gigi.SaveAs( Form("%s/Loopers_Density_%s.eps",  theDirName.Data(), suffix.Data() ) );
0396   can_Gigi.SaveAs( Form("%s/Loopers_Density_%s.gif",  theDirName.Data(), suffix.Data() ) );
0397   // 
0398 
0399   // Draw
0400   can_Gigi.cd();
0401   hist_lambda0->SetLineColor(kBlue);
0402   hist_lambda0->SetFillColor(kWhite);
0403   hist_lambda0->Draw();
0404   //  
0405   // Print
0406   theLogFile << endl << "--------"     << endl;
0407   theLogFile << hist_lambda0->GetTitle() << endl;
0408   theLogFile << "\t Mean = " << hist_lambda0->GetMean()  << endl;
0409   theLogFile << "\t  RMS = " << hist_lambda0->GetRMS()   << endl;
0410   //
0411   // Store
0412   can_Gigi.Update();
0413   can_Gigi.SaveAs( Form("%s/Loopers_Lambda0_%s.eps",  theDirName.Data(), suffix.Data() ) );
0414   can_Gigi.SaveAs( Form("%s/Loopers_Lambda0_%s.gif",  theDirName.Data(), suffix.Data() ) );
0415   // 
0416 
0417   // Draw
0418   can_Gigi.cd();
0419   hist_density_vs_loops->SetLineColor(kBlue);
0420   hist_density_vs_loops->SetFillColor(kBlue);
0421   hist_density_vs_loops->Draw("BOX");
0422   //  
0423   // Print
0424   theLogFile << endl << "--------"     << endl;
0425   theLogFile << hist_density_vs_loops->GetTitle() << endl;
0426   theLogFile << "\t Mean = " << hist_density_vs_loops->GetMean()  << endl;
0427   theLogFile << "\t  RMS = " << hist_density_vs_loops->GetRMS()   << endl;
0428   //
0429   // Store
0430   can_Gigi.Update();
0431   can_Gigi.SaveAs( Form("%s/Loopers_Density_vs_Turns_%s.eps",  theDirName.Data(), suffix.Data() ) );
0432   can_Gigi.SaveAs( Form("%s/Loopers_Density_vs_Turns_%s.gif",  theDirName.Data(), suffix.Data() ) );
0433   // 
0434   
0435   // Draw
0436   can_Gigi.cd();
0437   hist_pT_init->SetLineColor(kBlue);
0438   hist_pT_init->SetFillColor(kWhite);
0439   hist_pT_init->Draw();
0440   //  
0441   // Print
0442   theLogFile << endl << "--------"     << endl;
0443   theLogFile << hist_pT_init->GetTitle() << endl;
0444   theLogFile << "\t Mean = " << hist_pT_init->GetMean()  << endl;
0445   theLogFile << "\t  RMS = " << hist_pT_init->GetRMS()   << endl;
0446   //
0447   // Store
0448   can_Gigi.Update();
0449   can_Gigi.SaveAs( Form("%s/Loopers_pT_Init_%s.eps",  theDirName.Data(), suffix.Data() ) );
0450   can_Gigi.SaveAs( Form("%s/Loopers_pT_Init_%s.gif",  theDirName.Data(), suffix.Data() ) );
0451   // 
0452 
0453   // Draw
0454   can_Gigi.cd();
0455   hist_pT_end->SetLineColor(kBlue);
0456   hist_pT_end->SetFillColor(kWhite);
0457   hist_pT_end->Draw();
0458   //  
0459   // Print
0460   theLogFile << endl << "--------"     << endl;
0461   theLogFile << hist_pT_end->GetTitle() << endl;
0462   theLogFile << "\t Mean = " << hist_pT_end->GetMean()  << endl;
0463   theLogFile << "\t  RMS = " << hist_pT_end->GetRMS()   << endl;
0464   //
0465   // Store
0466   can_Gigi.Update();
0467   can_Gigi.SaveAs( Form("%s/Loopers_pT_End_%s.eps",  theDirName.Data(), suffix.Data() ) );
0468   can_Gigi.SaveAs( Form("%s/Loopers_pT_End_%s.gif",  theDirName.Data(), suffix.Data() ) );
0469   // 
0470 
0471   // Draw
0472   can_Gigi.cd();
0473   hist_energyLossPerTurn->SetLineColor(kBlue);
0474   hist_energyLossPerTurn->SetFillColor(kWhite);
0475   hist_energyLossPerTurn->Draw();
0476   //  
0477   // Print
0478   theLogFile << endl << "--------"     << endl;
0479   theLogFile << hist_energyLossPerTurn->GetTitle() << endl;
0480   theLogFile << "\t Mean = " << hist_energyLossPerTurn->GetMean()  << endl;
0481   theLogFile << "\t  RMS = " << hist_energyLossPerTurn->GetRMS()   << endl;
0482   //
0483   // Store
0484   can_Gigi.Update();
0485   can_Gigi.SaveAs( Form("%s/Loopers_EnergyLossPerTurn_%s.eps",  theDirName.Data(), suffix.Data() ) );
0486   can_Gigi.SaveAs( Form("%s/Loopers_EnergyLossPerTurn_%s.gif",  theDirName.Data(), suffix.Data() ) );
0487   // 
0488   
0489   // Draw
0490   can_Gigi.cd();
0491   hist_trackLength->SetLineColor(kBlue);
0492   hist_trackLength->SetFillColor(kWhite);
0493   hist_trackLength->Draw();
0494   //  
0495   // Print
0496   theLogFile << endl << "--------"     << endl;
0497   theLogFile << hist_trackLength->GetTitle() << endl;
0498   theLogFile << "\t Mean = " << hist_trackLength->GetMean()  << endl;
0499   theLogFile << "\t  RMS = " << hist_trackLength->GetRMS()   << endl;
0500   //
0501   // Store
0502   can_Gigi.Update();
0503   can_Gigi.SaveAs( Form("%s/Loopers_trackLength_%s.eps",  theDirName.Data(), suffix.Data() ) );
0504   can_Gigi.SaveAs( Form("%s/Loopers_trackLength_%s.gif",  theDirName.Data(), suffix.Data() ) );
0505   // 
0506   
0507   // Draw
0508   can_Gigi.cd();
0509   hist_trackLengthPerTurn->SetLineColor(kBlue);
0510   hist_trackLengthPerTurn->SetFillColor(kWhite);
0511   hist_trackLengthPerTurn->Draw();
0512   //  
0513   // Print
0514   theLogFile << endl << "--------"     << endl;
0515   theLogFile << hist_trackLengthPerTurn->GetTitle() << endl;
0516   theLogFile << "\t Mean = " << hist_trackLengthPerTurn->GetMean()  << endl;
0517   theLogFile << "\t  RMS = " << hist_trackLengthPerTurn->GetRMS()   << endl;
0518   //
0519   // Store
0520   can_Gigi.Update();
0521   can_Gigi.SaveAs( Form("%s/Loopers_trackLengthPerTurn_%s.eps",  theDirName.Data(), suffix.Data() ) );
0522   can_Gigi.SaveAs( Form("%s/Loopers_trackLengthPerTurn_%s.gif",  theDirName.Data(), suffix.Data() ) );
0523   // 
0524   
0525   // Prepare Axes Labels
0526   hist_lastInteraction->GetXaxis()->SetBinLabel( 1,"Not Defined");
0527   hist_lastInteraction->GetXaxis()->SetBinLabel( 2,"Transportation");
0528   hist_lastInteraction->GetXaxis()->SetBinLabel( 3,"Electromagnetic");
0529   hist_lastInteraction->GetXaxis()->SetBinLabel( 4,"Optical");
0530   hist_lastInteraction->GetXaxis()->SetBinLabel( 5,"Hadronic");
0531   hist_lastInteraction->GetXaxis()->SetBinLabel( 6,"Photolepton Hadron");
0532   hist_lastInteraction->GetXaxis()->SetBinLabel( 7,"Decay");
0533   hist_lastInteraction->GetXaxis()->SetBinLabel( 8,"General");
0534   hist_lastInteraction->GetXaxis()->SetBinLabel( 9,"Parameterisation");
0535   hist_lastInteraction->GetXaxis()->SetBinLabel(10,"User Defined");
0536   hist_lastInteraction->GetXaxis()->SetBinLabel(11,"Other");
0537   hist_lastInteraction->GetXaxis()->SetTitle("");
0538   
0539   // Draw
0540   can_Gigi.cd();
0541   hist_lastInteraction->SetLineColor(kBlue);
0542   hist_lastInteraction->SetFillColor(kWhite);
0543   hist_lastInteraction->Draw();
0544   //  
0545   // Print
0546   theLogFile << endl << "--------"     << endl;
0547   theLogFile << hist_lastInteraction->GetTitle() << endl;
0548   theLogFile << "\t Mean = " << hist_lastInteraction->GetMean()  << endl;
0549   theLogFile << "\t  RMS = " << hist_lastInteraction->GetRMS()   << endl;
0550   for(unsigned int iBin = 0; iBin<= hist_lastInteraction->GetNbinsX(); iBin++)
0551     theLogFile << "\t\t" << hist_lastInteraction->GetXaxis()->GetBinLabel(iBin) << " : "
0552            << hist_lastInteraction->GetBinContent(iBin) / hist_lastInteraction->GetEntries()
0553            << std::endl;
0554   //
0555   // Store
0556   can_Gigi.Update();
0557   can_Gigi.SaveAs( Form("%s/Loopers_lastInteraction_%s.eps",  theDirName.Data(), suffix.Data() ) );
0558   can_Gigi.SaveAs( Form("%s/Loopers_lastInteraction_%s.gif",  theDirName.Data(), suffix.Data() ) );
0559   // 
0560   
0561   // Draw
0562   can_Gigi.cd();
0563   hist_bx->SetLineColor(kBlue);
0564   hist_bx->SetFillColor(kWhite);
0565   hist_bx->Draw();
0566   //  
0567   // Print
0568   theLogFile << endl << "--------"     << endl;
0569   theLogFile << hist_bx->GetTitle() << endl;
0570   theLogFile << "\t Mean = " << hist_bx->GetMean()  << endl;
0571   theLogFile << "\t  RMS = " << hist_bx->GetRMS()   << endl;
0572   for(unsigned int iBin = 0; iBin<= hist_bx->GetNbinsX(); iBin++) {
0573     theLogFile << "\t\t bx " << hist_bx->GetBinCenter(iBin) << " : " << hist_bx->GetBinContent(iBin)
0574            << " integral > " << hist_bx->GetBinCenter(iBin)
0575            << " : " << hist_bx->Integral(iBin+1,hist_bx->GetNbinsX()+1) / hist_bx->Integral()
0576            << std::endl;
0577   }
0578   //
0579   // Store
0580   can_Gigi.Update();
0581   can_Gigi.SaveAs( Form("%s/Loopers_bx_%s.eps",  theDirName.Data(), suffix.Data() ) );
0582   can_Gigi.SaveAs( Form("%s/Loopers_bx_%s.gif",  theDirName.Data(), suffix.Data() ) );
0583   // 
0584   
0585   // Draw
0586   can_Gigi.cd();
0587   hist_bx_finer->SetLineColor(kBlue);
0588   hist_bx_finer->SetFillColor(kWhite);
0589   hist_bx_finer->Draw();
0590   //  
0591   // Print
0592   theLogFile << endl << "--------"     << endl;
0593   theLogFile << hist_bx_finer->GetTitle() << endl;
0594   theLogFile << "\t Mean = " << hist_bx_finer->GetMean()  << endl;
0595   theLogFile << "\t  RMS = " << hist_bx_finer->GetRMS()   << endl;
0596   for(unsigned int iBin = 0; iBin<= hist_bx_finer->GetNbinsX(); iBin++) {
0597     theLogFile << "\t\t bx_finer " << hist_bx_finer->GetBinCenter(iBin) << " : " << hist_bx_finer->GetBinContent(iBin)
0598            << " integral > " << hist_bx_finer->GetBinCenter(iBin)
0599            << " : " << hist_bx_finer->Integral(iBin+1,hist_bx_finer->GetNbinsX()+1) / hist_bx_finer->Integral()
0600            << std::endl;
0601   }
0602   //
0603   // Store
0604   can_Gigi.Update();
0605   can_Gigi.SaveAs( Form("%s/Loopers_bx_finer_%s.eps",  theDirName.Data(), suffix.Data() ) );
0606   can_Gigi.SaveAs( Form("%s/Loopers_bx_finer_%s.gif",  theDirName.Data(), suffix.Data() ) );
0607   // 
0608   
0609   // Prepare Axes Labels
0610   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel( 1,"Not Defined");
0611   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel( 2,"Transportation");
0612   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel( 3,"Electromagnetic");
0613   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel( 4,"Optical");
0614   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel( 5,"Hadronic");
0615   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel( 6,"Photolepton Hadron");
0616   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel( 7,"Decay");
0617   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel( 8,"General");
0618   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel( 9,"Parameterisation");
0619   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel(10,"User Defined");
0620   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetBinLabel(11,"Other");
0621   hist_energybeforeend_vs_lastInteraction->GetXaxis()->SetTitle("");
0622   // Draw
0623   can_Gigi.cd();
0624   hist_energybeforeend_vs_lastInteraction->SetLineColor(kBlue);
0625   hist_energybeforeend_vs_lastInteraction->SetFillColor(kBlue);
0626   hist_energybeforeend_vs_lastInteraction->Draw("BOX");
0627   //  
0628   // Print
0629   theLogFile << endl << "--------"     << endl;
0630   theLogFile << hist_energybeforeend_vs_lastInteraction->GetTitle() << endl;
0631   theLogFile << "\t Mean = " << hist_energybeforeend_vs_lastInteraction->GetMean()  << endl;
0632   theLogFile << "\t  RMS = " << hist_energybeforeend_vs_lastInteraction->GetRMS()   << endl;
0633   //
0634   // Store
0635   can_Gigi.Update();
0636   can_Gigi.SaveAs( Form("%s/Loopers_EnergyBeforeEnd_vs_lastInteraction_%s.eps",  theDirName.Data(), suffix.Data() ) );
0637   can_Gigi.SaveAs( Form("%s/Loopers_EnergyBeforeEnd_vs_lastInteraction_%s.gif",  theDirName.Data(), suffix.Data() ) );
0638   // 
0639 
0640   // Prepare Axes Labels
0641   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel( 1,"Not Defined");
0642   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel( 2,"Transportation");
0643   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel( 3,"Electromagnetic");
0644   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel( 4,"Optical");
0645   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel( 5,"Hadronic");
0646   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel( 6,"Photolepton Hadron");
0647   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel( 7,"Decay");
0648   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel( 8,"General");
0649   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel( 9,"Parameterisation");
0650   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel(10,"User Defined");
0651   hist_trackLength_vs_lastInteraction->GetXaxis()->SetBinLabel(11,"Other");
0652   hist_trackLength_vs_lastInteraction->GetXaxis()->SetTitle("");
0653   // Draw
0654   can_Gigi.cd();
0655   hist_trackLength_vs_lastInteraction->SetLineColor(kBlue);
0656   hist_trackLength_vs_lastInteraction->SetFillColor(kBlue);
0657   hist_trackLength_vs_lastInteraction->Draw("BOX");
0658   //  
0659   // Print
0660   theLogFile << endl << "--------"     << endl;
0661   theLogFile << hist_trackLength_vs_lastInteraction->GetTitle() << endl;
0662   theLogFile << "\t Mean = " << hist_trackLength_vs_lastInteraction->GetMean()  << endl;
0663   theLogFile << "\t  RMS = " << hist_trackLength_vs_lastInteraction->GetRMS()   << endl;
0664   //
0665   // Store
0666   can_Gigi.Update();
0667   can_Gigi.SaveAs( Form("%s/Loopers_trackLength_vs_lastInteraction_%s.eps",  theDirName.Data(), suffix.Data() ) );
0668   can_Gigi.SaveAs( Form("%s/Loopers_trackLength_vs_lastInteraction_%s.gif",  theDirName.Data(), suffix.Data() ) );
0669   // 
0670 
0671   // Draw
0672   can_Gigi.cd();
0673   hist_hadronicInteractions->SetLineColor(kBlue);
0674   hist_hadronicInteractions->SetFillColor(kWhite);
0675   hist_hadronicInteractions->Draw();
0676   //  
0677   // Print
0678   theLogFile << endl << "--------"     << endl;
0679   theLogFile << hist_hadronicInteractions->GetTitle() << endl;
0680   theLogFile << "\t Mean = " << hist_hadronicInteractions->GetMean()  << endl;
0681   theLogFile << "\t  RMS = " << hist_hadronicInteractions->GetRMS()   << endl;
0682   //
0683   // Store
0684   can_Gigi.Update();
0685   can_Gigi.SaveAs( Form("%s/Loopers_HadronicInteractions_%s.eps",  theDirName.Data(), suffix.Data() ) );
0686   can_Gigi.SaveAs( Form("%s/Loopers_HadronicInteractions_%s.gif",  theDirName.Data(), suffix.Data() ) );
0687   // 
0688   
0689   // Prepare Axes Labels
0690   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel( 1,"Not Defined");
0691   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel( 2,"Transportation");
0692   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel( 3,"Electromagnetic");
0693   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel( 4,"Optical");
0694   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel( 5,"Hadronic");
0695   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel( 6,"Photolepton Hadron");
0696   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel( 7,"Decay");
0697   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel( 8,"General");
0698   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel( 9,"Parameterisation");
0699   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel(10,"User Defined");
0700   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetBinLabel(11,"Other");
0701   hist_hadronicInteractions_vs_lastInteraction->GetXaxis()->SetTitle("");
0702   // Draw
0703   can_Gigi.cd();
0704   hist_hadronicInteractions_vs_lastInteraction->SetLineColor(kBlue);
0705   hist_hadronicInteractions_vs_lastInteraction->SetFillColor(kBlue);
0706   hist_hadronicInteractions_vs_lastInteraction->Draw("BOX");
0707   //  
0708   // Print
0709   theLogFile << endl << "--------"     << endl;
0710   theLogFile << hist_hadronicInteractions_vs_lastInteraction->GetTitle() << endl;
0711   //  theLogFile << "\t Mean = " << hist_hadronicInteractions_vs_lastInteraction->GetMean()  << endl;
0712   //  theLogFile << "\t  RMS = " << hist_hadronicInteractions_vs_lastInteraction->GetRMS()   << endl;
0713   //
0714   // Store
0715   can_Gigi.Update();
0716   can_Gigi.SaveAs( Form("%s/Loopers_HadronicInteractions_vs_lastInteraction_%s.eps",  theDirName.Data(), suffix.Data() ) );
0717   can_Gigi.SaveAs( Form("%s/Loopers_Hadronicinteractions_vs_lastInteraction_%s.gif",  theDirName.Data(), suffix.Data() ) );
0718   // 
0719 
0720   // Draw
0721   can_Gigi.cd();
0722   hist_energyLossHadronicInteractions->SetLineColor(kBlue);
0723   hist_energyLossHadronicInteractions->SetFillColor(kWhite);
0724   hist_energyLossHadronicInteractions->Draw();
0725   //  
0726   // Print
0727   theLogFile << endl << "--------"     << endl;
0728   theLogFile << hist_energyLossHadronicInteractions->GetTitle() << endl;
0729   theLogFile << "\t Mean = " << hist_energyLossHadronicInteractions->GetMean()  << endl;
0730   theLogFile << "\t  RMS = " << hist_energyLossHadronicInteractions->GetRMS()   << endl;
0731   //
0732   // Store
0733   can_Gigi.Update();
0734   can_Gigi.SaveAs( Form("%s/Loopers_EnergyLossHadronicInteractions_%s.eps",  theDirName.Data(), suffix.Data() ) );
0735   can_Gigi.SaveAs( Form("%s/Loopers_EnergyLossHadronicInteractions_%s.gif",  theDirName.Data(), suffix.Data() ) );
0736   // 
0737 
0738   // Prepare Axes Labels
0739   hist_productionEnergy_vs_secondaryParticle->GetXaxis()->SetBinLabel( 1,"#pi^{#pm}");
0740   hist_productionEnergy_vs_secondaryParticle->GetXaxis()->SetBinLabel( 2,"#mu^{#pm}");
0741   hist_productionEnergy_vs_secondaryParticle->GetXaxis()->SetBinLabel( 3,"e^{#pm}");
0742   hist_productionEnergy_vs_secondaryParticle->GetXaxis()->SetBinLabel( 4,"p/#bar{p}");
0743   // Draw
0744   can_Gigi.cd();
0745   hist_productionEnergy_vs_secondaryParticle->SetLineColor(kBlue);
0746   hist_productionEnergy_vs_secondaryParticle->SetFillColor(kBlue);
0747   hist_productionEnergy_vs_secondaryParticle->Draw("BOX");
0748   //  
0749   // Print
0750   theLogFile << endl << "--------"     << endl;
0751   theLogFile << hist_productionEnergy_vs_secondaryParticle->GetTitle() << endl;
0752   //  theLogFile << "\t Mean = " << hist_productionEnergy_vs_secondaryParticle->GetMean()  << endl;
0753   //  theLogFile << "\t  RMS = " << hist_productionEnergy_vs_secondaryParticle->GetRMS()   << endl;
0754   //
0755   // Store
0756   can_Gigi.Update();
0757   can_Gigi.SaveAs( Form("%s/Loopers_ProductionEnergy_vs_SecondaryParticle_%s.eps",  theDirName.Data(), suffix.Data() ) );
0758   can_Gigi.SaveAs( Form("%s/Loopers_ProductionEnergy_vs_SecondaryParticle_%s.gif",  theDirName.Data(), suffix.Data() ) );
0759   //
0760   
0761   // Draw
0762   can_Gigi.cd();
0763   hist_productionEnergy_vs_secondaryParticle->SetLineColor(kBlack);
0764   hist_productionEnergy_vs_secondaryParticle->SetMarkerColor(kBlue);
0765   hist_productionEnergy_vs_secondaryParticle->SetMarkerStyle(20);
0766   hist_productionEnergy_vs_secondaryParticle->Draw("AXIS");
0767   hist_productionEnergy_vs_secondaryParticle->ProfileX()->Draw("E1,SAME");
0768   // Store
0769   can_Gigi.Update();
0770   can_Gigi.SaveAs( Form("%s/Loopers_ProductionEnergy_vs_SecondaryParticle_profile_%s.eps",  theDirName.Data(), suffix.Data() ) );
0771   can_Gigi.SaveAs( Form("%s/Loopers_ProductionEnergy_vs_SecondaryParticle_profile_%s.gif",  theDirName.Data(), suffix.Data() ) );
0772   //
0773   
0774   // Prepare Axes Labels
0775   hist_bx_vs_secondaryParticle->GetXaxis()->SetBinLabel( 1,"#pi^{#pm}");
0776   hist_bx_vs_secondaryParticle->GetXaxis()->SetBinLabel( 2,"#mu^{#pm}");
0777   hist_bx_vs_secondaryParticle->GetXaxis()->SetBinLabel( 3,"e^{#pm}");
0778   hist_bx_vs_secondaryParticle->GetXaxis()->SetBinLabel( 4,"p/#bar{p}");
0779   // Draw
0780   can_Gigi.cd();
0781   hist_bx_vs_secondaryParticle->GetYaxis()->SetRangeUser(0.,5.);
0782   hist_bx_vs_secondaryParticle->SetLineColor(kBlue);
0783   hist_bx_vs_secondaryParticle->SetFillColor(kBlue);
0784   hist_bx_vs_secondaryParticle->Draw("BOX");
0785   //  
0786   // Print
0787   theLogFile << endl << "--------"     << endl;
0788   theLogFile << hist_bx_vs_secondaryParticle->GetTitle() << endl;
0789   //  theLogFile << "\t Mean = " << hist_bx_vs_secondaryParticle->GetMean()  << endl;
0790   //  theLogFile << "\t  RMS = " << hist_bx_vs_secondaryParticle->GetRMS()   << endl;
0791   //
0792 
0793   // Store
0794   can_Gigi.Update();
0795   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_%s.eps",  theDirName.Data(), suffix.Data() ) );
0796   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_%s.gif",  theDirName.Data(), suffix.Data() ) );
0797   //
0798   // Draw
0799   can_Gigi.cd();
0800   hist_bx_vs_secondaryParticle->SetLineColor(kBlack);
0801   hist_bx_vs_secondaryParticle->SetMarkerColor(kBlue);
0802   hist_bx_vs_secondaryParticle->SetMarkerStyle(20);
0803   hist_bx_vs_secondaryParticle->Draw("AXIS");
0804   hist_bx_vs_secondaryParticle->ProfileX()->Draw("E1,SAME");
0805   // Store
0806   can_Gigi.Update();
0807   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_profile_%s.eps",  theDirName.Data(), suffix.Data() ) );
0808   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_profile_%s.gif",  theDirName.Data(), suffix.Data() ) );
0809   //
0810 
0811   // only 1/2 pi/mu
0812   hist_bx_vs_secondaryParticle->GetXaxis()->SetRangeUser(0.5,1.5);
0813   hist_bx_vs_secondaryParticle->Draw("BOX");
0814   // Store
0815   can_Gigi.Update();
0816   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_pimu_%s.eps",  theDirName.Data(), suffix.Data() ) );
0817   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_pimu_%s.gif",  theDirName.Data(), suffix.Data() ) );
0818   //
0819   // only 4 proton
0820   hist_bx_vs_secondaryParticle->GetXaxis()->SetRangeUser(3.5,4.5);
0821   hist_bx_vs_secondaryParticle->Draw("BOX");
0822   // Store
0823   can_Gigi.Update();
0824   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_p_%s.eps",  theDirName.Data(), suffix.Data() ) );
0825   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_p_%s.gif",  theDirName.Data(), suffix.Data() ) );
0826   //
0827   // only 4 proton
0828   hist_bx_vs_secondaryParticle->GetXaxis()->SetRangeUser(3.5,4.5);
0829   hist_bx_vs_secondaryParticle->ProjectionY(" ",4,4)->GetXaxis()->SetRangeUser(0.,5.); // bx axis
0830   hist_bx_vs_secondaryParticle->ProjectionY(" ",4,4)->Draw();
0831   // Store
0832   can_Gigi.Update();
0833   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_projection_p_%s.eps",  theDirName.Data(), suffix.Data() ) );
0834   can_Gigi.SaveAs( Form("%s/Loopers_bx_vs_SecondaryParticle_projection_p_%s.gif",  theDirName.Data(), suffix.Data() ) );
0835   //
0836   
0837   
0838 }
0839 
0840 void Loopers::rootStyle() {
0841   // rrStyle
0842   TStyle* rrStyle = new TStyle("rootStyle","rootStyle");
0843   TGaxis::SetMaxDigits(3);          // to avoid too much decimal digits
0844   rrStyle->SetOptStat(0000);        // general statistics
0845   rrStyle->SetOptFit(1111);         // fit statistics
0846   rrStyle->SetOptLogy(0);           // logscale
0847   rrStyle->SetCanvasColor(kWhite);  // white canvas
0848   rrStyle->SetHistFillColor(34);    // histo: blue gray filling
0849   rrStyle->SetFuncColor(146);       // function: dark red line
0850   //
0851   rrStyle->SetLabelSize(0.04,"x,y,z");
0852   rrStyle->SetTitleSize(0.05,"x,y,z");
0853   rrStyle->SetTitleOffset(0.8,"x,y,z");
0854   rrStyle->SetTitleFontSize(0.06);
0855   //
0856   rrStyle->SetHistLineWidth(1);
0857   //
0858   rrStyle->SetPaintTextFormat("g");
0859   //
0860   rrStyle->SetTitleBorderSize(0);
0861   rrStyle->SetTitleFillColor(0);
0862   rrStyle->SetTitleFont(12,"pad");
0863   rrStyle->SetTitleFontSize(0.04);
0864   rrStyle->SetTitleX(0.075);
0865   rrStyle->SetTitleY(0.950);
0866   //
0867   rrStyle->SetLegendBorderSize(0); // no legend border
0868   rrStyle->SetFillColor(0); // all the filling colors are white
0869   //
0870   
0871   // ROOT macro
0872   gROOT->SetBatch();
0873   gROOT->SetStyle("rootStyle");
0874   //
0875 }
0876 
0877 void Loopers::helpfulCommands() {
0878   cout << "########################################" << endl;
0879   cout << "a.Loop()"                                 << endl;
0880   cout << "########################################" << endl;
0881 }