CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HcalTB04Histo Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

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, lngs, and TFileDirectory::make().

26  :
27  iniE(0), iEta(0), iPhi(0), edepS(0), edecS(0), edhcS(0), edepQ(0),
28  edecQ(0), edhcQ(0), edehS(0), edehQ(0), latse(0), latqe(0), latsf(0),
29  latqf(0), lngs(0), lngq(0) {
30 
31  verbose = ps.getUntrackedParameter<bool>("Verbose", false);
32  double em1 = ps.getUntrackedParameter<double>("ETtotMax", 400.);
33  double em2 = ps.getUntrackedParameter<double>("EHCalMax", 4.0);
34 
35  // Book histograms
37 
38  if ( !tfile.isAvailable() )
39  throw cms::Exception("BadConfig") << "TFileService unavailable: "
40  << "please add it to config file";
41  iniE = tfile->make<TH1D>("iniE", "Incident Energy (GeV)", 4000, 0., em1);
42  iEta = tfile->make<TH1D>("iEta", "Eta at incidence ", 300, 0., 3.);
43  iPhi = tfile->make<TH1D>("iPhi", "Phi at incidence ", 300, -1., 1.);
44  edepS= tfile->make<TH1D>("edepS", "Energy deposit == Total (Simhit)",4000, 0., em1);
45  edecS= tfile->make<TH1D>("edecS", "Energy deposit == ECal (Simhit)",4000, 0., em1);
46  edhcS= tfile->make<TH1D>("edhcS", "Energy deposit == HCal (Simhit)",4000, 0., em2);
47  edepQ= tfile->make<TH1D>("edepQ", "Energy deposit == Total (QIE)", 4000, 0., em1);
48  edecQ= tfile->make<TH1D>("edecQ", "Energy deposit == ECal (QIE)", 4000, 0., em1);
49  edhcQ= tfile->make<TH1D>("edhcQ", "Energy deposit == HCal (QIE)", 4000, 0., em2);
50  edehS= tfile->make<TH2D>("edehS", "Hcal vs Ecal (Simhit)", 100,0.,em1, 100, 0.,em2);
51  edehQ= tfile->make<TH2D>("edehQ", "Hcal vs Ecal (QIE)", 100,0.,em1, 100, 0.,em2);
52  latse= tfile->make<TProfile>("latse","Lat Prof (Eta Sim)",10,0.,10.);
53  latqe= tfile->make<TProfile>("latqe","Lat Prof (Eta QIE)",10,0.,10.);
54  latsf= tfile->make<TProfile>("latsf","Lat Prof (Phi Sim)",10,0.,10.);
55  latqf= tfile->make<TProfile>("latqf","Lat Prof (Phi QIE)",10,0.,10.);
56  lngs = tfile->make<TProfile>("lngs", "Long. Prof (Sim)", 20,0.,20.);
57  lngq = tfile->make<TProfile>("lngq", "Long. Prof (QIE)", 20,0.,20.);
58 }
T getUntrackedParameter(std::string const &, T const &) const
TProfile * lngq
Definition: HcalTB04Histo.h:57
TProfile * lngs
Definition: HcalTB04Histo.h:57
TProfile * latse
Definition: HcalTB04Histo.h:57
TProfile * latqf
Definition: HcalTB04Histo.h:57
bool isAvailable() const
Definition: Service.h:47
TProfile * latsf
Definition: HcalTB04Histo.h:57
TProfile * latqe
Definition: HcalTB04Histo.h:57
T * make() const
make new ROOT object
HcalTB04Histo::~HcalTB04Histo ( )
virtual

Definition at line 60 of file HcalTB04Histo.cc.

60 {}

Member Function Documentation

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().

76  {
77 
78  LogDebug("HcalTBSim") << "HcalTB04Histo:::fillEdep: Simulated Total "
79  << etots << " ECal " << eecals << " HCal " << ehcals
80  << " Digitised Total " << etotq << " ECal " << eecalq
81  << " HCal " << ehcalq;
82  edepS->Fill(etots);
83  edecS->Fill(eecals);
84  edhcS->Fill(ehcals);
85  edepQ->Fill(etotq);
86  edecQ->Fill(eecalq);
87  edhcQ->Fill(ehcalq);
88  edehS->Fill(eecals, ehcals);
89  edehQ->Fill(eecalq, ehcalq);
90 }
#define LogDebug(id)
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().

123  {
124 
125  unsigned int n = std::min(es.size(),eq.size());
126  for (unsigned int i = 0; i < n; i++)
127  LogDebug("HcalTBSim") << "HcalTB04Histo::fillLongProf [" << i
128  << "] Sim " << es[i] << " Dig " << eq[i];
129  for (unsigned int i=0; i<(es.size()); i++) {
130  double lay = i+0.5;
131  lngs->Fill(lay, es[i]);
132  }
133  for (unsigned int i=0; i<(eq.size()); i++) {
134  double lay = i+0.5;
135  lngq->Fill(lay, eq[i]);
136  }
137 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
TProfile * lngq
Definition: HcalTB04Histo.h:57
#define min(a, b)
Definition: mlp_lapack.h:161
TProfile * lngs
Definition: HcalTB04Histo.h:57
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().

66  {
67 
68  LogDebug("HcalTBSim") << "HcalTB04Histo::fillPrimary: Energy "
69  << energy << " Eta " << eta << " Phi " << phi;
70  iniE->Fill(energy);
71  iEta->Fill(eta);
72  iPhi->Fill(phi);
73 }
#define LogDebug(id)
T eta() const
Definition: DDAxes.h:10
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().

95  {
96 
97  unsigned int n1 = std::min(es1.size(),eq1.size());
98  unsigned int n2 = std::min(es2.size(),eq2.size());
99  unsigned int n = std::min(n1,n2);
100  for (unsigned int i = 0; i < n; i++)
101  LogDebug("HcalTBSim") << "HcalTB04Histo::fillTrnsProf [" << i
102  << "] SimEta " << es1[i] << " DigEta " << eq1[i]
103  << " SimPhi " << es2[i] << " DigPhi " << eq2[i];
104  for (unsigned int i=0; i<(es1.size()); i++) {
105  double tow = i+0.5;
106  latse->Fill(tow, es1[i]);
107  }
108  for (unsigned int i=0; i<(eq1.size()); i++) {
109  double tow = i+0.5;
110  latqe->Fill(tow, eq1[i]);
111  }
112  for (unsigned int i=0; i<(es2.size()); i++) {
113  double tow = i+0.5;
114  latsf->Fill(tow, es2[i]);
115  }
116  for (unsigned int i=0; i<(eq2.size()); i++) {
117  double tow = i+0.5;
118  latqf->Fill(tow, eq2[i]);
119  }
120 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
#define min(a, b)
Definition: mlp_lapack.h:161
TProfile * latse
Definition: HcalTB04Histo.h:57
TProfile * latqf
Definition: HcalTB04Histo.h:57
TProfile * latsf
Definition: HcalTB04Histo.h:57
TProfile * latqe
Definition: HcalTB04Histo.h:57

Member Data Documentation

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.