00001 #include "SimGeneral/GFlash/interface/GflashHistogram.h" 00002 00003 GflashHistogram* GflashHistogram::instance_ = 0; 00004 00005 GflashHistogram* GflashHistogram::instance(){ 00006 00007 if(instance_ == 0) instance_ = new GflashHistogram(); 00008 return instance_; 00009 00010 } 00011 00012 GflashHistogram::GflashHistogram() : 00013 theStoreFlag(false) 00014 { 00015 } 00016 00017 void GflashHistogram::bookHistogram(std::string histFileName) 00018 { 00019 histFile_ = new TFile(histFileName.c_str(),"RECREATE"); 00020 00021 TH1::AddDirectory(kTRUE); 00022 00023 histFile_->mkdir("GflashEMShowerProfile"); 00024 histFile_->cd("GflashEMShowerProfile"); 00025 00026 em_incE = new TH1F("em_incE","Incoming energy at Ecal;E (GeV);Number of Events",500,0.0,500.0); 00027 em_ssp_rho = new TH1F("em_ssp_rho","Shower starting position;#rho (cm);Number of Events",100,100.0,200.0); 00028 em_ssp_z = new TH1F("em_ssp_z","Shower starting position;z (cm);Number of Events",800,-400.0,400.0); 00029 em_long = new TH1F("em_long","Longitudinal Profile;Radiation Length;Number of Spots",100,0.0,50.0); 00030 em_lateral = new TH2F("em_lateral","Lateral Profile vs. Shower Depth;Radiation Length;Moliere Radius",100,0.0,50.0,100,0.0,3.0); 00031 em_long_sd = new TH1F("em_long_sd","Longitudinal Profile in Sensitive Detector;Radiation Length;Number of Spots",100,0.0,50.0); 00032 em_lateral_sd = new TH2F("em_lateral_sd","Lateral Profile vs. Shower Depth in Sensitive Detector;Radiation Length;Moliere Radius",100,0.0,50.0,100,0.0,3.0); 00033 em_nSpots_sd = new TH1F("em_nSpots_sd","Number of Gflash Spots in Sensitive Detector;Number of Spots;Number of Events",1000,0.0,100000); 00034 00035 histFile_->mkdir("GflashHadronShowerModel"); 00036 histFile_->cd("GflashHadronShowerModel"); 00037 00038 preStepPosition = new TH1F("preStepPosition","PreStep Position Shower",500,120.0,270.); 00039 postStepPosition = new TH1F("postStepPosition","PostStep Position Shower",500,120.0,270.); 00040 deltaStep = new TH1F("deltaStep","Delta Step",200,0.0,100.); 00041 kineticEnergy = new TH1F("kineticEnergy","Kinetic Energy",200,0.0,200.); 00042 energyLoss = new TH1F("energyLoss","Energy Loss",200,0.0,200.); 00043 energyRatio = new TH1F("energyRatio","energyLeading/energyTotal",200,0.0,1.); 00044 00045 histFile_->mkdir("GflashHadronShowerProfile"); 00046 histFile_->cd("GflashHadronShowerProfile"); 00047 00048 rshower = new TH1F("rshower","Lateral Lever" ,200,0.,100.); 00049 lateralx = new TH1F("lateralx","Lateral-X Distribution" ,200,-100.,100.); 00050 lateraly = new TH1F("lateraly","Lateral-Y Distribution" ,200,-100.,100.); 00051 gfhlongProfile = new TH2F("gfhlongProfile","Longitudinal Profile (all hits)",160,0.0,160.,60,125,245); 00052 00053 histFile_->mkdir("GflashWatcher"); 00054 histFile_->cd("GflashWatcher"); 00055 00056 g4vertexTrack = new TH1F("g4vertexTrack","Vertex of Track",300,0.0,300.); 00057 g4stepCharge = new TH2F("g4stepCharge","Geant4 Step Charge",300,120.,420,5,-2.5,2.5); 00058 g4nSecondary = new TH1F("g4nSecondary","number of Secondaries",100,0.0,100.); 00059 g4pidSecondary = new TH1F("g4pidSecondary","PID of Secondaries",3000,-500.0,2500.); 00060 00061 g4energySecondary = new TH1F("g4energySecondary","Kinetic Energy of Secondaries",300,0.0,15.); 00062 g4energyPi0 = new TH1F("g4energyPi0","Kinetic Energy of Pi0",300,0.0,15.); 00063 g4energyElectron = new TH1F("g4energyElectron","Kinetic Energy of Electron",300,0.0,15.); 00064 g4energyPhoton = new TH1F("g4energyPhoton","Kinetic Energy of Photon",300,0.0,15.); 00065 00066 g4totalEnergySecPhoton = new TH1F("g4totalEnergySecPhoton","Total Kinetic Energy of Sec Photon",300,0.0,3.); 00067 g4totalEnergySecElectron = new TH1F("g4toalEnergySecElectron","Total Kinetic Energy of Sec Electron",300,0.0,3.); 00068 g4totalEnergySecPi0 = new TH1F("g4totalEnergySecPi0","Total Kinetic Energy of Sec Pi0",300,0.0,30.); 00069 00070 g4energyEM = new TH1F("energyEM","EM Energy",600,0.0,150.0); 00071 g4energyHad = new TH1F("energyHad","Had Energy",600,0.0,150.0); 00072 g4energyTotal = new TH1F("energyTotal","Total Energy",600,0.0,150.0); 00073 g4energyEMMip = new TH1F("energyEMMip","EM Energy (MIP)",100,0.0,2.0); 00074 g4energyHadMip = new TH1F("energyHadMip","Had Energy (MIP)",600,0.0,150.0); 00075 g4energyMip = new TH1F("energyMip","Total Energy (MIP)",600,0.0,150.0); 00076 g4energyEMvsHad = new TH2F("energyEMvsHad","EM Energy",600,0.0,150.0,600,0.0,150.0); 00077 00078 g4energySensitiveEM = new TH1F("energySensitiveEM","Sensitive EM Energy",600,0.0,150.0); 00079 g4energySensitiveHad = new TH1F("energySensitiveHad","Sensitive Had Energy",600,0.0,150.0); 00080 g4energySensitiveTotal = new TH1F("energySensitiveTotal","Sensitive Total Energy",600,0.0,150.0); 00081 g4energyHybridTotal = new TH1F("energyHybridTotal","Hybrid Total Energy",600,0.0,150.0); 00082 g4energySensitiveEMMip = new TH1F("energySensitiveEMMip","Sensitive EM Energy (MIP)",100,0.0,2.0); 00083 g4energySensitiveEMvsHad = new TH2F("energySensitiveEMvsHad","Sensitive EM Energy vs Had",600,0.0,150.0,600,0.0,150.0); 00084 00085 g4energyEMProfile = new TH2F("energyEMProfile","EM Energy Profile",600,0.0,150.0,60,125,245); 00086 g4energyHadProfile = new TH2F("energyHadProfile","Had Energy Profile",600,0.0,150.0,60,125,245); 00087 g4energyTotalProfile = new TH2F("energyTotalProfile","Total Energy Profile",600,0.0,150.0,60,125,245); 00088 g4energyHybridProfile = new TH2F("energyHybridProfile","Hybrid Energy Profile",600,0.0,150.0,60,125,245); 00089 00090 g4ssp = new TH1F("g4ssp","Shower Starting Position",160,120.0,280.); 00091 g4energy = new TH1F("g4energy","Energy at Shower Starting Position",600,0.0,150.0); 00092 g4energyLoss = new TH1F("g4energyLoss","Energy Loss",600,0.0,150.); 00093 g4momentum = new TH1F("g4momentum","Momentum/GeV at Shower Starting Position",300,0.0,150.0); 00094 g4charge = new TH1F("g4charge","Track Charge at Shower Starting Position",10,-5.0,5.0); 00095 00096 g4rshower = new TH2F("g4rshower","rshower",200,0.,40,25,125.,250); 00097 g4rshowerR1 = new TH2F("g4rshowerR1","rshower vs depth ssp=127-129",200,0.,40,40,0.0,160.); 00098 g4rshowerR2 = new TH2F("g4rshowerR2","rshower vs depth ssp=131-133",200,0.,40,40,0.0,160.); 00099 g4rshowerR3 = new TH2F("g4rshowerR3","rshower vs depth ssp=173-175",200,0.,40,40,0.0,160.); 00100 00101 g4lateralXY = new TH2F("g4lateralXY","Lateral Profile XY",160,-40.,40,25,125.,250); 00102 g4lateralRZ = new TH2F("g4lateralRZ","Lateral Profile RZ",160,-40.,40,25,125.,250); 00103 g4spotXY = new TH2F("g4spotXY","x-y of spots in global coordinate",800,-400.,400.,800,-400.0,400.0); 00104 g4spotRZ = new TH2F("g4spotRZ","r-z of spots in global coordinate",1200,-1500.,1500.,400,.0,400.0); 00105 g4spotRZ0 = new TH2F("g4spotRZ0","all r-z of spots in global coordinate",1200,-1500.,1500.,400,.0,400.0); 00106 00107 g4stepRho = new TH1F("g4stepRho","rho of Geant4 Step",200,120.,320.); 00108 g4trajectoryPhi0 = new TH1F("g4trajectoryPhi0","trajectory Phi0",2000,-5.,5.); 00109 00110 g4trajectoryXY = new TH2F("g4trajectoryXY","trajectory x-y",800,-400.0,400.0,800,-400.0,400.0); 00111 g4trajectoryRZ = new TH2F("g4trajectoryRZ","trajectory r-z ",1200,-600.0,600.0,400,0.0,400.0); 00112 00113 g4longProfile = new TH2F("g4longProfile","Longitudinal Profile (all hits)",160,0.0,160.,60,125,245); 00114 g4longDetector = new TH2F("g4longDetector","Longitudinal Profile (hits inisde detectors)",160,0.0,160.,60,125,245); 00115 g4longSensitive = new TH2F("g4longSensitive","Longitudinal Profile (Sensitive)",160,0.0,160.,60,125,245); 00116 00117 } 00118 00119 00120 GflashHistogram::~GflashHistogram(){ 00121 00122 histFile_->cd(); 00123 histFile_->Write(); 00124 histFile_->Close(); 00125 00126 } 00127