CMS 3D CMS Logo

Public Member Functions | Private Attributes

HcalTB06Histo Class Reference

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

List of all members.

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, and edm::Service< T >::isAvailable().

                                                      :
  iniE(0),  iEta(0), iPhi(0), edepS(0), edecS(0), edhcS(0), edehS(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",4000, 0., em1);
  edecS= tfile->make<TH1D>("edecS", "Energy deposit == ECal ",4000, 0., em1);
  edhcS= tfile->make<TH1D>("edhcS", "Energy deposit == HCal ",4000, 0., em2);
  edehS= tfile->make<TH2D>("edehS", "Hcal vs Ecal", 100,0.,em1, 100, 0.,em2);
}
HcalTB06Histo::~HcalTB06Histo ( ) [virtual]

Definition at line 47 of file HcalTB06Histo.cc.

{}

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

                                                                       { 

  LogDebug("HcalTBSim") << "HcalTB06Histo:::fillEdep: Simulated Total "
                        << etots << " ECal " << eecals << " HCal " << ehcals;
  edepS->Fill(etots);
  edecS->Fill(eecals);
  edhcS->Fill(ehcals);
  edehS->Fill(eecals, ehcals);
}
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().

                                                                     {

  LogDebug("HcalTBSim") << "HcalTB06Histo::fillPrimary: Energy " 
                        << energy << " Eta " << eta << " Phi " << phi;
  iniE->Fill(energy);
  iEta->Fill(eta);
  iPhi->Fill(phi);
}

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.