Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
SimG4CMS
HcalTestBeam
src
HcalTB06Histo.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: HcalTestBeam
4
// Class : HcalTB06Histo
5
//
6
// Implementation:
7
// <Notes on implementation>
8
//
9
// Original Author:
10
// Created: Tue Oct 10 10:14:34 CEST 2006
11
//
12
13
// system include files
14
#include <iostream>
15
#include <cmath>
16
17
// user include files
18
#include "
SimG4CMS/HcalTestBeam/interface/HcalTB06Histo.h
"
19
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
20
#include "
FWCore/ServiceRegistry/interface/Service.h
"
21
#include "
CommonTools/UtilAlgos/interface/TFileService.h
"
22
23
//
24
// constructors and destructor
25
HcalTB06Histo::HcalTB06Histo
(
const
edm::ParameterSet
& ps) :
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
33
edm::Service<TFileService>
tfile;
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
}
46
47
HcalTB06Histo::~HcalTB06Histo
() {}
48
49
//
50
// member functions
51
//
52
53
void
HcalTB06Histo::fillPrimary
(
double
energy
,
double
eta
,
double
phi
) {
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
}
61
62
void
HcalTB06Histo::fillEdep
(
double
etots,
double
eecals,
double
ehcals) {
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
}
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:501
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HcalTB06Histo::iPhi
TH1D * iPhi
Definition:
HcalTB06Histo.h:47
MessageLogger.h
edm::Service< TFileService >
HcalTB06Histo::~HcalTB06Histo
virtual ~HcalTB06Histo()
Definition:
HcalTB06Histo.cc:47
verbose
Definition:
MagVerbosity.h:13
HcalTB06Histo::fillEdep
void fillEdep(double etots, double eecals, double ehcals)
Definition:
HcalTB06Histo.cc:62
HcalTB06Histo.h
eta
T eta() const
Definition:
Basic3DVectorLD.h:179
TFileService.h
edm::Service::isAvailable
bool isAvailable() const
Definition:
Service.h:47
HcalTB06Histo::edehS
TH2D * edehS
Definition:
HcalTB06Histo.h:49
Service.h
HcalTB06Histo::iniE
TH1D * iniE
Definition:
HcalTB06Histo.h:47
cms::Exception
Definition:
Exception.h:68
HcalTB06Histo::edepS
TH1D * edepS
Definition:
HcalTB06Histo.h:48
HcalTB06Histo::edhcS
TH1D * edhcS
Definition:
HcalTB06Histo.h:48
TFileDirectory::make
T * make() const
make new ROOT object
Definition:
TFileDirectory.h:55
edm::ParameterSet
Definition:
ParameterSet.h:35
relval_parameters_module.energy
string energy
Definition:
relval_parameters_module.py:29
HcalTB06Histo::edecS
TH1D * edecS
Definition:
HcalTB06Histo.h:48
HcalTB06Histo::fillPrimary
void fillPrimary(double energy, double eta, double phi)
Definition:
HcalTB06Histo.cc:53
HcalTB06Histo::HcalTB06Histo
HcalTB06Histo(const edm::ParameterSet &ps)
Definition:
HcalTB06Histo.cc:25
HcalTB06Histo::iEta
TH1D * iEta
Definition:
HcalTB06Histo.h:47
phi
Definition:
DDAxes.h:10
Generated for CMSSW Reference Manual by
1.8.5