ATLAS Offline Software
FWDZeePlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 using CLHEP::GeV;
8 
9 namespace ZeeValidation{
10 
11  FWDZeePlots::FWDZeePlots(PlotBase* pParent, std::string sDir, std::string sParticleType):
12  PlotBase(pParent, sDir),
13  m_sParticleType(sParticleType)
14  {
15  for (int i = 0; i < nLevels; i++) {
16  h_z_mass[i] = NULL;
17  h_z_pt[i] = NULL;
18  h_z_y[i] = NULL;
19  h_dr_electrons[i] = NULL;
20  h_pt_central_electron[i] = NULL;
21  h_eta_central_electron[i] = NULL;
22  h_phi_central_electron[i] = NULL;
23  h_pt_fwd_electron[i] = NULL;
24  h_eta_fwd_electron[i] = NULL;
25  h_phi_fwd_electron[i] = NULL;
26  }
27  }
28 
29  const std::string FWDZeePlots::cLevelLabel[nLevels] = {
30  "Reco",
31  "OQ",
32  "FWDLoose",
33  "FWDTight"
34  };
35 
37  for (int i = 0; i < nLevels; i++) {
38  h_z_mass[i] = Book1D("ZMass"+ cLevelLabel[i] , "Mass of Z;Mass (GeV);Events", 50, 66., 116.);
39  h_z_pt[i] = Book1D("ZPt"+ cLevelLabel[i] , "P_{T} of Z;P_{T};Events", 60, 0., 120.);
40  h_z_y[i] = Book1D("ZY"+ cLevelLabel[i] , "#eta of Z;#eta;Events", 50, -5., 5.);
41 
42  h_dr_electrons[i] = Book1D("DRElectrons"+ cLevelLabel[i] , " #DeltaR(electrons);Events", 50, 0., 6.);
43 
44  h_pt_central_electron[i] = Book1D("PtCentralElectron"+ cLevelLabel[i] , " P_{T}(electron);Events", 60, 20., 140.);
45  h_eta_central_electron[i] = Book1D("EtaCentralElectron"+ cLevelLabel[i] , " #eta(electron);Events", 50, -2.5, 2.5);
46  h_phi_central_electron[i] = Book1D("PhiCentralElectron"+ cLevelLabel[i] , " #varphi(electrons);Events", 60, -TMath::Pi(), TMath::Pi());
47 
48  h_pt_fwd_electron[i] = Book1D("PtFwdElectron"+ cLevelLabel[i] , " P_{T}(electron);Events", 60, 20., 140.);
49  h_eta_fwd_electron[i] = Book1D("EtaFwdElectron"+ cLevelLabel[i] , " #eta(electron);Events", 50, -5.0, 5.0);
50  h_phi_fwd_electron[i] = Book1D("PhiFwd_Electron"+ cLevelLabel[i] , " #varphi(electron);Events", 60, -TMath::Pi(), TMath::Pi());
51  }
52  }
53 
54  void FWDZeePlots::fillZPlots(TLorentzVector& z, int level){
55  h_z_mass[level] -> Fill(z.M()*(1./GeV));
56  h_z_pt[level] -> Fill(z.Pt()*(1./GeV));
57  h_z_y[level] -> Fill(z.Rapidity());
58  }
59 
60  void FWDZeePlots::fillElPlots(TLorentzVector& elec1, TLorentzVector& elec2, int level){
61  h_dr_electrons[level] -> Fill( elec1.DeltaR(elec2) );
62 
63  h_pt_central_electron[level] -> Fill( elec1.Perp()*(1./GeV) );
64  h_pt_fwd_electron[level] -> Fill( elec2.Perp()*(1./GeV) );
65 
66  h_eta_central_electron[level] -> Fill( elec1.Rapidity() );
67  h_eta_fwd_electron[level] -> Fill( elec2.Rapidity() );
68 
69  h_phi_central_electron[level] -> Fill( elec1.Phi() );
70  h_phi_fwd_electron[level] -> Fill( elec2.Phi() );
71  }
72 
73 }
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
ZeeValidation::FWDZeePlots::initializePlots
virtual void initializePlots()
Definition: FWDZeePlots.cxx:36
PlotBase
Definition: PlotBase.h:34
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
ZeeValidation::FWDZeePlots::h_dr_electrons
TH1 * h_dr_electrons[nLevels]
Definition: FWDZeePlots.h:31
FWDZeePlots.h
ZeeValidation::FWDZeePlots::h_phi_fwd_electron
TH1 * h_phi_fwd_electron[nLevels]
Definition: FWDZeePlots.h:38
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
ZeeValidation::FWDZeePlots::nLevels
static const int nLevels
Definition: FWDZeePlots.h:21
PlotBase::Book1D
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition: PlotBase.cxx:94
ZeeValidation::FWDZeePlots::fillElPlots
void fillElPlots(TLorentzVector &eleccen, TLorentzVector &elecfwd, int level)
Definition: FWDZeePlots.cxx:60
ZeeValidation::FWDZeePlots::h_z_pt
TH1 * h_z_pt[nLevels]
Definition: FWDZeePlots.h:28
ZeeValidation::FWDZeePlots::FWDZeePlots
FWDZeePlots(PlotBase *pParent, std::string sDir, std::string sParticleType)
Definition: FWDZeePlots.cxx:11
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
ZeeValidation::FWDZeePlots::h_z_mass
TH1 * h_z_mass[nLevels]
Definition: FWDZeePlots.h:27
ZeeValidation
Definition: FWDZeePlots.cxx:9
ZeeValidation::FWDZeePlots::h_pt_central_electron
TH1 * h_pt_central_electron[nLevels]
Definition: FWDZeePlots.h:33
ZeeValidation::FWDZeePlots::h_z_y
TH1 * h_z_y[nLevels]
Definition: FWDZeePlots.h:29
ZeeValidation::FWDZeePlots::h_phi_central_electron
TH1 * h_phi_central_electron[nLevels]
Definition: FWDZeePlots.h:35
ZeeValidation::FWDZeePlots::cLevelLabel
static const std::string cLevelLabel[nLevels]
Definition: FWDZeePlots.h:22
ZeeValidation::FWDZeePlots::fillZPlots
void fillZPlots(TLorentzVector &, int level)
Definition: FWDZeePlots.cxx:54
ZeeValidation::FWDZeePlots::h_eta_central_electron
TH1 * h_eta_central_electron[nLevels]
Definition: FWDZeePlots.h:34
ZeeValidation::FWDZeePlots::h_pt_fwd_electron
TH1 * h_pt_fwd_electron[nLevels]
Definition: FWDZeePlots.h:36
ZeeValidation::FWDZeePlots::h_eta_fwd_electron
TH1 * h_eta_fwd_electron[nLevels]
Definition: FWDZeePlots.h:37