#include <SimG4CMS/HcalTestBeam/interface/HcalTB04Histo.h>
Public Member Functions | |
void | fillEdep (double etots, double eecals, double ehcals, double etotq, double eecalq, double ehcalq) |
void | fillLongProf (std::vector< double > es, std::vector< double > eq) |
void | fillPrimary (double energy, double eta, double phi) |
void | fillTrnsProf (std::vector< double > es1, std::vector< double > eq1, std::vector< double > es2, std::vector< double > eq2) |
HcalTB04Histo (const edm::ParameterSet &ps) | |
virtual | ~HcalTB04Histo () |
Private Attributes | |
TH1D * | edecQ |
TH1D * | edecS |
TH2D * | edehQ |
TH2D * | edehS |
TH1D * | edepQ |
TH1D * | edepS |
TH1D * | edhcQ |
TH1D * | edhcS |
double | eHcalMax |
double | eTotMax |
TH1D * | iEta |
TH1D * | iniE |
TH1D * | iPhi |
TProfile * | latqe |
TProfile * | latqf |
TProfile * | latse |
TProfile * | latsf |
TProfile * | lngq |
TProfile * | lngs |
bool | verbose |
Description: Histogram handling for Hcal Test Beam 2004 studies
Usage: Sets up histograms and stores in a file
Definition at line 32 of file HcalTB04Histo.h.
HcalTB04Histo::HcalTB04Histo | ( | const edm::ParameterSet & | ps | ) |
Definition at line 26 of file HcalTB04Histo.cc.
References edecQ, edecS, edehQ, edehS, edepQ, edepS, edhcQ, edhcS, edm::ParameterSet::getUntrackedParameter(), iEta, iniE, iPhi, edm::Service< T >::isAvailable(), latqe, latqf, latse, latsf, lngq, and lngs.
: iniE(0), iEta(0), iPhi(0), edepS(0), edecS(0), edhcS(0), edepQ(0), edecQ(0), edhcQ(0), edehS(0), edehQ(0), latse(0), latqe(0), latsf(0), latqf(0), lngs(0), lngq(0) { verbose = ps.getUntrackedParameter<bool>("Verbose", false); double em1 = ps.getUntrackedParameter<double>("ETtotMax", 400.); double em2 = ps.getUntrackedParameter<double>("EHCalMax", 4.0); // Book histograms edm::Service<TFileService> tfile; if ( !tfile.isAvailable() ) throw cms::Exception("BadConfig") << "TFileService unavailable: " << "please add it to config file"; iniE = tfile->make<TH1D>("iniE", "Incident Energy (GeV)", 4000, 0., em1); iEta = tfile->make<TH1D>("iEta", "Eta at incidence ", 300, 0., 3.); iPhi = tfile->make<TH1D>("iPhi", "Phi at incidence ", 300, -1., 1.); edepS= tfile->make<TH1D>("edepS", "Energy deposit == Total (Simhit)",4000, 0., em1); edecS= tfile->make<TH1D>("edecS", "Energy deposit == ECal (Simhit)",4000, 0., em1); edhcS= tfile->make<TH1D>("edhcS", "Energy deposit == HCal (Simhit)",4000, 0., em2); edepQ= tfile->make<TH1D>("edepQ", "Energy deposit == Total (QIE)", 4000, 0., em1); edecQ= tfile->make<TH1D>("edecQ", "Energy deposit == ECal (QIE)", 4000, 0., em1); edhcQ= tfile->make<TH1D>("edhcQ", "Energy deposit == HCal (QIE)", 4000, 0., em2); edehS= tfile->make<TH2D>("edehS", "Hcal vs Ecal (Simhit)", 100,0.,em1, 100, 0.,em2); edehQ= tfile->make<TH2D>("edehQ", "Hcal vs Ecal (QIE)", 100,0.,em1, 100, 0.,em2); latse= tfile->make<TProfile>("latse","Lat Prof (Eta Sim)",10,0.,10.); latqe= tfile->make<TProfile>("latqe","Lat Prof (Eta QIE)",10,0.,10.); latsf= tfile->make<TProfile>("latsf","Lat Prof (Phi Sim)",10,0.,10.); latqf= tfile->make<TProfile>("latqf","Lat Prof (Phi QIE)",10,0.,10.); lngs = tfile->make<TProfile>("lngs", "Long. Prof (Sim)", 20,0.,20.); lngq = tfile->make<TProfile>("lngq", "Long. Prof (QIE)", 20,0.,20.); }
HcalTB04Histo::~HcalTB04Histo | ( | ) | [virtual] |
Definition at line 60 of file HcalTB04Histo.cc.
{}
void HcalTB04Histo::fillEdep | ( | double | etots, |
double | eecals, | ||
double | ehcals, | ||
double | etotq, | ||
double | eecalq, | ||
double | ehcalq | ||
) |
Definition at line 75 of file HcalTB04Histo.cc.
References edecQ, edecS, edehQ, edehS, edepQ, edepS, edhcQ, edhcS, and LogDebug.
Referenced by HcalTB04Analysis::finalAnalysis().
{ LogDebug("HcalTBSim") << "HcalTB04Histo:::fillEdep: Simulated Total " << etots << " ECal " << eecals << " HCal " << ehcals << " Digitised Total " << etotq << " ECal " << eecalq << " HCal " << ehcalq; edepS->Fill(etots); edecS->Fill(eecals); edhcS->Fill(ehcals); edepQ->Fill(etotq); edecQ->Fill(eecalq); edhcQ->Fill(ehcalq); edehS->Fill(eecals, ehcals); edehQ->Fill(eecalq, ehcalq); }
void HcalTB04Histo::fillLongProf | ( | std::vector< double > | es, |
std::vector< double > | eq | ||
) |
Definition at line 122 of file HcalTB04Histo.cc.
References i, lngq, lngs, LogDebug, min, and n.
Referenced by HcalTB04Analysis::finalAnalysis().
{ unsigned int n = std::min(es.size(),eq.size()); for (unsigned int i = 0; i < n; i++) LogDebug("HcalTBSim") << "HcalTB04Histo::fillLongProf [" << i << "] Sim " << es[i] << " Dig " << eq[i]; for (unsigned int i=0; i<(es.size()); i++) { double lay = i+0.5; lngs->Fill(lay, es[i]); } for (unsigned int i=0; i<(eq.size()); i++) { double lay = i+0.5; lngq->Fill(lay, eq[i]); } }
void HcalTB04Histo::fillPrimary | ( | double | energy, |
double | eta, | ||
double | phi | ||
) |
Definition at line 66 of file HcalTB04Histo.cc.
References iEta, iniE, iPhi, LogDebug, and phi.
Referenced by HcalTB04Analysis::finalAnalysis().
void HcalTB04Histo::fillTrnsProf | ( | std::vector< double > | es1, |
std::vector< double > | eq1, | ||
std::vector< double > | es2, | ||
std::vector< double > | eq2 | ||
) |
Definition at line 92 of file HcalTB04Histo.cc.
References i, latqe, latqf, latse, latsf, LogDebug, min, and n.
Referenced by HcalTB04Analysis::finalAnalysis().
{ unsigned int n1 = std::min(es1.size(),eq1.size()); unsigned int n2 = std::min(es2.size(),eq2.size()); unsigned int n = std::min(n1,n2); for (unsigned int i = 0; i < n; i++) LogDebug("HcalTBSim") << "HcalTB04Histo::fillTrnsProf [" << i << "] SimEta " << es1[i] << " DigEta " << eq1[i] << " SimPhi " << es2[i] << " DigPhi " << eq2[i]; for (unsigned int i=0; i<(es1.size()); i++) { double tow = i+0.5; latse->Fill(tow, es1[i]); } for (unsigned int i=0; i<(eq1.size()); i++) { double tow = i+0.5; latqe->Fill(tow, eq1[i]); } for (unsigned int i=0; i<(es2.size()); i++) { double tow = i+0.5; latsf->Fill(tow, es2[i]); } for (unsigned int i=0; i<(eq2.size()); i++) { double tow = i+0.5; latqf->Fill(tow, eq2[i]); } }
TH1D * HcalTB04Histo::edecQ [private] |
Definition at line 55 of file HcalTB04Histo.h.
Referenced by fillEdep(), and HcalTB04Histo().
TH1D * HcalTB04Histo::edecS [private] |
Definition at line 55 of file HcalTB04Histo.h.
Referenced by fillEdep(), and HcalTB04Histo().
TH2D * HcalTB04Histo::edehQ [private] |
Definition at line 56 of file HcalTB04Histo.h.
Referenced by fillEdep(), and HcalTB04Histo().
TH2D* HcalTB04Histo::edehS [private] |
Definition at line 56 of file HcalTB04Histo.h.
Referenced by fillEdep(), and HcalTB04Histo().
TH1D * HcalTB04Histo::edepQ [private] |
Definition at line 55 of file HcalTB04Histo.h.
Referenced by fillEdep(), and HcalTB04Histo().
TH1D* HcalTB04Histo::edepS [private] |
Definition at line 55 of file HcalTB04Histo.h.
Referenced by fillEdep(), and HcalTB04Histo().
TH1D * HcalTB04Histo::edhcQ [private] |
Definition at line 55 of file HcalTB04Histo.h.
Referenced by fillEdep(), and HcalTB04Histo().
TH1D * HcalTB04Histo::edhcS [private] |
Definition at line 55 of file HcalTB04Histo.h.
Referenced by fillEdep(), and HcalTB04Histo().
double HcalTB04Histo::eHcalMax [private] |
Definition at line 52 of file HcalTB04Histo.h.
double HcalTB04Histo::eTotMax [private] |
Definition at line 52 of file HcalTB04Histo.h.
TH1D * HcalTB04Histo::iEta [private] |
Definition at line 54 of file HcalTB04Histo.h.
Referenced by fillPrimary(), and HcalTB04Histo().
TH1D* HcalTB04Histo::iniE [private] |
Definition at line 54 of file HcalTB04Histo.h.
Referenced by fillPrimary(), and HcalTB04Histo().
TH1D * HcalTB04Histo::iPhi [private] |
Definition at line 54 of file HcalTB04Histo.h.
Referenced by fillPrimary(), and HcalTB04Histo().
TProfile * HcalTB04Histo::latqe [private] |
Definition at line 57 of file HcalTB04Histo.h.
Referenced by fillTrnsProf(), and HcalTB04Histo().
TProfile * HcalTB04Histo::latqf [private] |
Definition at line 57 of file HcalTB04Histo.h.
Referenced by fillTrnsProf(), and HcalTB04Histo().
TProfile* HcalTB04Histo::latse [private] |
Definition at line 57 of file HcalTB04Histo.h.
Referenced by fillTrnsProf(), and HcalTB04Histo().
TProfile * HcalTB04Histo::latsf [private] |
Definition at line 57 of file HcalTB04Histo.h.
Referenced by fillTrnsProf(), and HcalTB04Histo().
TProfile * HcalTB04Histo::lngq [private] |
Definition at line 57 of file HcalTB04Histo.h.
Referenced by fillLongProf(), and HcalTB04Histo().
TProfile * HcalTB04Histo::lngs [private] |
Definition at line 57 of file HcalTB04Histo.h.
Referenced by fillLongProf(), and HcalTB04Histo().
bool HcalTB04Histo::verbose [private] |
Definition at line 51 of file HcalTB04Histo.h.