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
HcalTB06Histo Class Reference

#include <SimG4CMS/HcalTestBeam/interface/HcalTB06Histo.h>

Public Member Functions

void fillEdep (double etots, double eecals, double ehcals)
 
void fillPrimary (double energy, double eta, double phi)
 
 HcalTB06Histo (const edm::ParameterSet &ps)
 
virtual ~HcalTB06Histo ()
 

Private Attributes

TH1D * edecS
 
TH2D * edehS
 
TH1D * edepS
 
TH1D * edhcS
 
TH1D * iEta
 
TH1D * iniE
 
TH1D * iPhi
 
bool verbose
 

Detailed Description

Description: Histogram handling for Hcal Test Beam 2006 studies

Usage: Sets up histograms and stores in a file

Definition at line 30 of file HcalTB06Histo.h.

Constructor & Destructor Documentation

HcalTB06Histo::HcalTB06Histo ( const edm::ParameterSet ps)

Definition at line 25 of file HcalTB06Histo.cc.

References edecS, edehS, edepS, edhcS, edm::ParameterSet::getUntrackedParameter(), iEta, iniE, iPhi, edm::Service< T >::isAvailable(), and TFileService::make().

25  :
26  iniE(0), iEta(0), iPhi(0), edepS(0), edecS(0), edhcS(0), edehS(0) {
27 
28  verbose = ps.getUntrackedParameter<bool>("Verbose", false);
29  double em1 = ps.getUntrackedParameter<double>("ETtotMax", 400.);
30  double em2 = ps.getUntrackedParameter<double>("EHCalMax", 4.0);
31 
32  // Book histograms
34 
35  if ( !tfile.isAvailable() )
36  throw cms::Exception("BadConfig") << "TFileService unavailable: "
37  << "please add it to config file";
38  iniE = tfile->make<TH1D>("iniE", "Incident Energy (GeV)", 4000, 0., em1);
39  iEta = tfile->make<TH1D>("iEta", "Eta at incidence ", 300, 0., 3.);
40  iPhi = tfile->make<TH1D>("iPhi", "Phi at incidence ", 300, -1., 1.);
41  edepS= tfile->make<TH1D>("edepS", "Energy deposit == Total",4000, 0., em1);
42  edecS= tfile->make<TH1D>("edecS", "Energy deposit == ECal ",4000, 0., em1);
43  edhcS= tfile->make<TH1D>("edhcS", "Energy deposit == HCal ",4000, 0., em2);
44  edehS= tfile->make<TH2D>("edehS", "Hcal vs Ecal", 100,0.,em1, 100, 0.,em2);
45 }
T getUntrackedParameter(std::string const &, T const &) const
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
bool isAvailable() const
Definition: Service.h:46
HcalTB06Histo::~HcalTB06Histo ( )
virtual

Definition at line 47 of file HcalTB06Histo.cc.

47 {}

Member Function Documentation

void HcalTB06Histo::fillEdep ( double  etots,
double  eecals,
double  ehcals 
)

Definition at line 62 of file HcalTB06Histo.cc.

References edecS, edehS, edepS, edhcS, and LogDebug.

Referenced by HcalTB06Analysis::finalAnalysis().

62  {
63 
64  LogDebug("HcalTBSim") << "HcalTB06Histo:::fillEdep: Simulated Total "
65  << etots << " ECal " << eecals << " HCal " << ehcals;
66  edepS->Fill(etots);
67  edecS->Fill(eecals);
68  edhcS->Fill(ehcals);
69  edehS->Fill(eecals, ehcals);
70 }
#define LogDebug(id)
void HcalTB06Histo::fillPrimary ( double  energy,
double  eta,
double  phi 
)

Definition at line 53 of file HcalTB06Histo.cc.

References iEta, iniE, iPhi, LogDebug, and phi.

Referenced by HcalTB06Analysis::finalAnalysis().

53  {
54 
55  LogDebug("HcalTBSim") << "HcalTB06Histo::fillPrimary: Energy "
56  << energy << " Eta " << eta << " Phi " << phi;
57  iniE->Fill(energy);
58  iEta->Fill(eta);
59  iPhi->Fill(phi);
60 }
#define LogDebug(id)
T eta() const
Definition: DDAxes.h:10

Member Data Documentation

TH1D * HcalTB06Histo::edecS
private

Definition at line 48 of file HcalTB06Histo.h.

Referenced by fillEdep(), and HcalTB06Histo().

TH2D* HcalTB06Histo::edehS
private

Definition at line 49 of file HcalTB06Histo.h.

Referenced by fillEdep(), and HcalTB06Histo().

TH1D* HcalTB06Histo::edepS
private

Definition at line 48 of file HcalTB06Histo.h.

Referenced by fillEdep(), and HcalTB06Histo().

TH1D * HcalTB06Histo::edhcS
private

Definition at line 48 of file HcalTB06Histo.h.

Referenced by fillEdep(), and HcalTB06Histo().

TH1D * HcalTB06Histo::iEta
private

Definition at line 47 of file HcalTB06Histo.h.

Referenced by fillPrimary(), and HcalTB06Histo().

TH1D* HcalTB06Histo::iniE
private

Definition at line 47 of file HcalTB06Histo.h.

Referenced by fillPrimary(), and HcalTB06Histo().

TH1D * HcalTB06Histo::iPhi
private

Definition at line 47 of file HcalTB06Histo.h.

Referenced by fillPrimary(), and HcalTB06Histo().

bool HcalTB06Histo::verbose
private

Definition at line 45 of file HcalTB06Histo.h.