CMS 3D CMS Logo

CentralitypADQM.cc
Go to the documentation of this file.
2 
3 #include <memory>
4 
5 // DQM
8 
9 // Framework
16 
17 // Centrality
19 
20 using namespace edm;
21 using namespace reco;
22 using namespace hi;
23 
24 //
25 // -- Constructor
26 //
28  edm::LogInfo("CentralitypADQM") << " Starting CentralitypADQM "
29  << "\n";
30 
31  centralityTag_ = ps.getParameter<InputTag>("centralitycollection");
32  centralityToken = consumes<reco::Centrality>(centralityTag_);
33 
34  vertexTag_ = ps.getParameter<InputTag>("vertexcollection");
35  vertexToken = consumes<std::vector<reco::Vertex> >(vertexTag_);
36  // just to initialize
37 }
38 
39 //
40 // -- Destructor
41 //
43  edm::LogInfo("CentralitypADQM") << " Deleting CentralitypADQM "
44  << "\n";
45 }
46 
47 //
48 // -- Book histograms
49 //
51  // void CentralitypADQM::bookHistograms(DQMStore* bei){
52 
53  bei.setCurrentFolder("Physics/CentralitypA/");
54 
55  h_hiNpix = bei.book1D("h_hiNpix", "h_hiNpix", 750, 0, 75000);
56  // h_hiNpixelTracks = bei.book1D("h_hiNpixelTracks", "hiNpixelTracks", 500, 0, 5000);
57  h_hiNtracks = bei.book1D("h_hiNtracks", "h_hiNtracks", 500, 0, 5000);
58  h_hiNtracksPtCut = bei.book1D("h_hiNtracksPtCut", "h_hiNtracksPtCut", 500, 0, 5000);
59  h_hiNtracksEtaCut = bei.book1D("h_hiNtracksEtaCut", "h_hiNtracksEtaCut", 500, 0, 5000);
60  h_hiNtracksEtaPtCut = bei.book1D("h_hiNtracksEtaPtCut", "h_hiNtracksEtaPtCut", 500, 0, 5000);
61 
62  h_hiHF = bei.book1D("h_hiHF", "h_hiHF", 900, 0, 9000);
63  h_hiHFplus = bei.book1D("h_hiHFplus", "h_hiHFplus", 900, 0, 9000);
64  h_hiHFminus = bei.book1D("h_hiHFminus", "h_hiHFminus", 900, 0, 9000);
65  h_hiHFplusEta4 = bei.book1D("h_hiHFplusEta4", "h_hiHFplusEta4", 900, 0, 9000);
66  h_hiHFminusEta4 = bei.book1D("h_hiHFminusEta4", "h_hiHFminusEta4", 900, 0, 9000);
67 
68  h_hiHFhit = bei.book1D("h_hiHFhit", "h_hiHFhit", 3000, 0, 300000);
69  h_hiHFhitPlus = bei.book1D("h_hiHFhitPlus", "h_hiHFhitPlus", 2000, 0, 200000);
70  h_hiHFhitMinus = bei.book1D("h_hiHFhitMinus", "h_hiHFhitMinus", 2000, 0, 200000);
71 
72  h_hiEB = bei.book1D("h_hiEB", "h_hiEB", 600, 0, 6000);
73  h_hiET = bei.book1D("h_hiET", "h_hiET", 600, 0, 6000);
74  h_hiEE = bei.book1D("h_hiEE", "h_hiEE", 600, 0, 6000);
75  h_hiEEplus = bei.book1D("h_hiEEplus", "h_hiEEplus", 600, 0, 6000);
76  h_hiEEminus = bei.book1D("h_hiEEminus", "h_hiEEminus", 600, 0, 6000);
77  h_hiZDC = bei.book1D("h_hiZDC", "h_hiZDC", 600, 0, 6000);
78  h_hiZDCplus = bei.book1D("h_hiZDCplus", "h_hiZDCplus", 600, 0, 6000);
79  h_hiZDCminus = bei.book1D("h_hiZDCminus", "h_hiZDCminus", 600, 0, 6000);
80  h_hiPF = bei.book1D("h_hiPF", "h_hiPF", 900, 0, 9000);
81  h_hiPFplus = bei.book1D("h_hiPFplus", "h_hiPFplus", 900, 0, 9000);
82  h_hiPFminus = bei.book1D("h_hiPFminus", "h_hiPFminus", 900, 0, 9000);
83 
84  h_vertex_x = bei.book1D("h_vertex_x", "h_vertex_x", 400, -4, 4);
85  h_vertex_y = bei.book1D("h_vertex_y", "h_vertex_y", 400, -4, 4);
86  h_vertex_z = bei.book1D("h_vertex_z", "h_vertex_z", 400, -40, 40);
87 }
88 
89 // -- Analyze
90 
92  using namespace edm;
94  iEvent.getByToken(centralityToken, cent); //_centralitytag comes from the cfg
95 
96  if (cent.isValid()) {
97  h_hiNpix->Fill(cent->multiplicityPixel());
98  h_hiNtracks->Fill(cent->Ntracks());
99 
100  h_hiNtracksPtCut->Fill(cent->NtracksPtCut());
101  h_hiNtracksEtaCut->Fill(cent->NtracksEtaCut());
102  h_hiNtracksEtaPtCut->Fill(cent->NtracksEtaPtCut());
103 
104  h_hiHF->Fill(cent->EtHFtowerSum());
105  h_hiHFplus->Fill(cent->EtHFtowerSumPlus());
106  h_hiHFminus->Fill(cent->EtHFtowerSumMinus());
107  h_hiHFplusEta4->Fill(cent->EtHFtruncatedPlus());
108  h_hiHFminusEta4->Fill(cent->EtHFtruncatedMinus());
109 
110  h_hiHFhit->Fill(cent->EtHFhitSum());
111  h_hiHFhitPlus->Fill(cent->EtHFhitSumPlus());
112  h_hiHFhitMinus->Fill(cent->EtHFhitSumMinus());
113 
114  h_hiZDC->Fill(cent->zdcSum());
115  h_hiZDCplus->Fill(cent->zdcSumPlus());
116  h_hiZDCminus->Fill(cent->zdcSumMinus());
117 
118  h_hiEEplus->Fill(cent->EtEESumPlus());
119  h_hiEEminus->Fill(cent->EtEESumMinus());
120  h_hiEE->Fill(cent->EtEESum());
121  h_hiEB->Fill(cent->EtEBSum());
122  h_hiET->Fill(cent->EtMidRapiditySum());
123 
124  h_hiPF->Fill(cent->EtPFhfSum());
125  h_hiPFplus->Fill(cent->EtPFhfSumPlus());
126  h_hiPFminus->Fill(cent->EtPFhfSumMinus());
127 
129  iEvent.getByToken(vertexToken, vertex);
130  h_vertex_x->Fill(vertex->begin()->x());
131  h_vertex_y->Fill(vertex->begin()->y());
132  h_vertex_z->Fill(vertex->begin()->z());
133  }
134 }
CentralitypADQM(const edm::ParameterSet &ps)
double zdcSum() const
Definition: Centrality.h:54
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
double EtHFtruncatedPlus() const
Definition: Centrality.h:31
double NtracksEtaPtCut() const
Definition: Centrality.h:49
double NtracksEtaCut() const
Definition: Centrality.h:48
double EtHFtowerSum() const
Definition: Centrality.h:24
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
~CentralitypADQM() override
double zdcSumMinus() const
Definition: Centrality.h:56
double EtPFhfSumMinus() const
Definition: Centrality.h:60
double EtHFhitSumMinus() const
Definition: Centrality.h:23
double multiplicityPixel() const
Definition: Centrality.h:43
double EtPFhfSum() const
Definition: Centrality.h:58
int iEvent
Definition: GenABIO.cc:224
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
double Ntracks() const
Definition: Centrality.h:46
Definition: EPCuts.h:4
double EtPFhfSumPlus() const
Definition: Centrality.h:59
double EtEESumMinus() const
Definition: Centrality.h:35
double EtHFhitSumPlus() const
Definition: Centrality.h:22
double NtracksPtCut() const
Definition: Centrality.h:47
double EtHFtowerSumMinus() const
Definition: Centrality.h:26
double EtEESum() const
Definition: Centrality.h:33
double EtEBSum() const
Definition: Centrality.h:39
double EtHFhitSum() const
Definition: Centrality.h:21
Log< level::Info, false > LogInfo
double EtMidRapiditySum() const
Definition: Centrality.h:57
bool isValid() const
Definition: HandleBase.h:70
double EtEESumPlus() const
Definition: Centrality.h:34
fixed size matrix
HLT enums.
double EtHFtowerSumPlus() const
Definition: Centrality.h:25
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
Definition: Run.h:45
void bookHistograms(DQMStore::IBooker &bei, edm::Run const &, edm::EventSetup const &) override
double zdcSumPlus() const
Definition: Centrality.h:55
double EtHFtruncatedMinus() const
Definition: Centrality.h:32