Skip to content

Commit

Permalink
Merge pull request #21342 from civanch/tb2006_update
Browse files Browse the repository at this point in the history
Updated TB2006
  • Loading branch information
cmsbuild committed Nov 17, 2017
2 parents 3303c8e + 368a614 commit b4980ca
Show file tree
Hide file tree
Showing 7 changed files with 745 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SimG4CMS/HcalTestBeam/interface/HcalTB06Histo.h
Expand Up @@ -48,13 +48,14 @@ class HcalTB06Histo {

TH1D *iniE, *iEta, *iPhi;
TH1D *edepS, *edecS, *edhcS;
TH1D *edepN, *edecN, *edhcN;
TH1D *edepN, *edecN, *edhcN, *emhcN;
TH2D *edehS;
TTree *tree_;
double eBeam_, etaBeam_, phiBeam_;
double edepEC_, edepHB_, edepHO_;
double noiseEC_, noiseHB_, noiseHO_;
double edepS1_, edepS2_, edepS3_, edepS4_, edepVC_, edepS7_, edepS8_;
double mip_;
};

#endif
2 changes: 2 additions & 0 deletions SimG4CMS/HcalTestBeam/plugins/HcalTB06Analysis.cc
Expand Up @@ -80,6 +80,7 @@ HcalTB06Analysis::HcalTB06Analysis(const edm::ParameterSet &p) : count(0) {
m_widthHcal = ptb.getParameter<double>("HcalWidth");
m_factEcal = ptb.getParameter<double>("EcalFactor");
m_factHcal = ptb.getParameter<double>("HcalFactor");
double eMIP = ptb.getParameter<double>("MIP");

edm::LogInfo("HcalTB06Analysis")
<< "Beam parameters: E(GeV)= " << m_ener
Expand All @@ -94,6 +95,7 @@ HcalTB06Analysis::HcalTB06Analysis(const edm::ParameterSet &p) : count(0) {
<< " EcalWidth= " << m_widthEcal << " GeV"
<< "\n HcalFactor= " << m_factHcal
<< " HcalWidth= " << m_widthHcal << " GeV"
<< " MIP= " << eMIP << " GeV"
<< "\n TimeLimit= " << m_timeLimit << " ns" << "\n";
m_histo = new HcalTB06Histo(ptb);
}
Expand Down
1 change: 1 addition & 0 deletions SimG4CMS/HcalTestBeam/python/TB2006Analysis_cfi.py
Expand Up @@ -72,6 +72,7 @@ def testbeam2006(process):
HcalWidth = cms.double(0.640),
EcalFactor = cms.double(1.),
HcalFactor = cms.double(100.),
MIP = cms.double(0.8),
MakeTree = cms.untracked.bool(False)
)
)
Expand Down
4 changes: 4 additions & 0 deletions SimG4CMS/HcalTestBeam/src/HcalTB06Histo.cc
Expand Up @@ -30,6 +30,8 @@ HcalTB06Histo::HcalTB06Histo(const edm::ParameterSet& ps) {
mkTree_ = ps.getUntrackedParameter<bool>("MakeTree", false);
eBeam_ = 50.;

mip_ = ps.getParameter<double>("MIP");

// Book histograms
edm::Service<TFileService> tfile;

Expand All @@ -45,6 +47,7 @@ HcalTB06Histo::HcalTB06Histo(const edm::ParameterSet& ps) {
edepN= tfile->make<TH1D>("edepN", "Etot/Ebeam ", 200, -2.5, 2.5);
edecN= tfile->make<TH1D>("edecN", "Eecal/Ebeam ", 200, -2.5, 2.5);
edhcN= tfile->make<TH1D>("edhcN", "Ehcal/Ebeam ", 200, -2.5, 2.5);
emhcN= tfile->make<TH1D>("emhcN", "Ehcal/Ebeam MIP in Ecal", 200, -2.5, 2.5);
edehS= tfile->make<TH2D>("edehS", "Hcal vs Ecal", 100,0.,em1, 100, 0.,em2);

if (mkTree_) {
Expand Down Expand Up @@ -99,6 +102,7 @@ void HcalTB06Histo::fillEdep(double etots, double eecals, double ehcals) {
edepN->Fill(etots/eBeam_);
edecN->Fill(eecals/eBeam_);
edhcN->Fill(ehcals/eBeam_);
if(eecals <= mip_) { emhcN->Fill(etots/eBeam_); }
edehS->Fill(eecals, ehcals);
}

Expand Down

0 comments on commit b4980ca

Please sign in to comment.