CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
CentralityDQM Class Reference

#include <CentralityDQM.h>

Inheritance diagram for CentralityDQM:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 CentralityDQM (const edm::ParameterSet &ps)
 
virtual ~CentralityDQM ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

virtual void analyze (edm::Event const &e, edm::EventSetup const &eSetup)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

virtual void bookHistograms (DQMStore::IBooker &bei, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

edm::Handle< reco::Centralitycentrality_
 
edm::InputTag centralityTag_
 
edm::EDGetTokenT
< reco::Centrality
centralityToken
 
MonitorElementh_hiEB
 
MonitorElementh_hiEE
 
MonitorElementh_hiEEminus
 
MonitorElementh_hiEEplus
 
MonitorElementh_hiET
 
MonitorElementh_hiHF
 
MonitorElementh_hiHFhit
 
MonitorElementh_hiHFhitMinus
 
MonitorElementh_hiHFhitPlus
 
MonitorElementh_hiHFminus
 
MonitorElementh_hiHFminusEta4
 
MonitorElementh_hiHFplus
 
MonitorElementh_hiHFplusEta4
 
MonitorElementh_hiNpix
 
MonitorElementh_hiNpixelTracks
 
MonitorElementh_hiNtracks
 
MonitorElementh_hiNtracksEtaCut
 
MonitorElementh_hiNtracksEtaPtCut
 
MonitorElementh_hiNtracksPtCut
 
MonitorElementh_hiZDC
 
MonitorElementh_hiZDCminus
 
MonitorElementh_hiZDCplus
 
MonitorElementh_vertex_x
 
MonitorElementh_vertex_y
 
MonitorElementh_vertex_z
 
edm::Handle< std::vector
< reco::Vertex > > 
vertex_
 
edm::InputTag vertexTag_
 
edm::EDGetTokenT< std::vector
< reco::Vertex > > 
vertexToken
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 21 of file CentralityDQM.h.

Constructor & Destructor Documentation

CentralityDQM::CentralityDQM ( const edm::ParameterSet ps)
explicit

Definition at line 29 of file CentralityDQM.cc.

References edm::ParameterSet::getParameter().

29  {
30 
31  edm::LogInfo("CentralityDQM") << " Starting CentralityDQM "
32  << "\n";
33 
34  centralityTag_ = ps.getParameter<InputTag>("centralitycollection");
35  centralityToken = consumes<reco::Centrality>(centralityTag_);
36 
37  vertexTag_ = ps.getParameter<InputTag>("vertexcollection");
38  vertexToken = consumes<std::vector<reco::Vertex> >(vertexTag_);
39 
40  // just to initialize
41 }
T getParameter(std::string const &) const
edm::InputTag centralityTag_
Definition: CentralityDQM.h:40
edm::InputTag vertexTag_
Definition: CentralityDQM.h:44
edm::EDGetTokenT< reco::Centrality > centralityToken
Definition: CentralityDQM.h:41
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken
Definition: CentralityDQM.h:45
CentralityDQM::~CentralityDQM ( )
virtual

Definition at line 46 of file CentralityDQM.cc.

46  {
47  edm::LogInfo("CentralityDQM") << " Deleting CentralityDQM "
48  << "\n";
49 }

Member Function Documentation

void CentralityDQM::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
protectedvirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 100 of file CentralityDQM.cc.

References edm::Event::getByToken().

101  {
102 
103  using namespace edm;
105  iEvent.getByToken(centralityToken, cent); //_centralitytag comes from the cfg
106  // as an inputTag and is
107  //"hiCentrality"
108 
109  if (!cent.isValid()) return;
110 
111  h_hiNpix->Fill(cent->multiplicityPixel());
112  h_hiNpixelTracks->Fill(cent->NpixelTracks());
113  h_hiNtracks->Fill(cent->Ntracks()); //
114 
115  h_hiNtracksPtCut->Fill(cent->NtracksPtCut());
116  h_hiNtracksEtaCut->Fill(cent->NtracksEtaCut());
117  h_hiNtracksEtaPtCut->Fill(cent->NtracksEtaPtCut());
118 
119  h_hiHF->Fill(cent->EtHFtowerSum());
120  h_hiHFplus->Fill(cent->EtHFtowerSumPlus());
121  h_hiHFminus->Fill(cent->EtHFtowerSumMinus());
122  h_hiHFplusEta4->Fill(cent->EtHFtruncatedPlus());
123  h_hiHFminusEta4->Fill(cent->EtHFtruncatedMinus());
124 
125  h_hiHFhit->Fill(cent->EtHFhitSum());
126  h_hiHFhitPlus->Fill(cent->EtHFhitSumPlus());
127  h_hiHFhitMinus->Fill(cent->EtHFhitSumMinus());
128 
129  h_hiZDC->Fill(cent->zdcSum());
130  h_hiZDCplus->Fill(cent->zdcSumPlus());
131  h_hiZDCminus->Fill(cent->zdcSumMinus());
132 
133  h_hiEEplus->Fill(cent->EtEESumPlus());
134  h_hiEEminus->Fill(cent->EtEESumMinus());
135  h_hiEE->Fill(cent->EtEESum());
136  h_hiEB->Fill(cent->EtEBSum());
137  h_hiET->Fill(cent->EtMidRapiditySum());
138 
140  iEvent.getByToken(vertexToken, vertex);
141  h_vertex_x->Fill(vertex->begin()->x());
142  h_vertex_y->Fill(vertex->begin()->y());
143  h_vertex_z->Fill(vertex->begin()->z());
144 }
MonitorElement * h_hiZDC
Definition: CentralityDQM.h:72
MonitorElement * h_hiZDCplus
Definition: CentralityDQM.h:73
MonitorElement * h_vertex_x
Definition: CentralityDQM.h:76
MonitorElement * h_vertex_z
Definition: CentralityDQM.h:78
MonitorElement * h_hiET
Definition: CentralityDQM.h:68
MonitorElement * h_hiNpix
Definition: CentralityDQM.h:53
MonitorElement * h_hiNtracksEtaCut
Definition: CentralityDQM.h:57
MonitorElement * h_hiNpixelTracks
Definition: CentralityDQM.h:54
MonitorElement * h_hiNtracksEtaPtCut
Definition: CentralityDQM.h:58
MonitorElement * h_hiHFminusEta4
Definition: CentralityDQM.h:63
MonitorElement * h_vertex_y
Definition: CentralityDQM.h:77
MonitorElement * h_hiEB
Definition: CentralityDQM.h:67
MonitorElement * h_hiHFplusEta4
Definition: CentralityDQM.h:62
MonitorElement * h_hiEEminus
Definition: CentralityDQM.h:71
void Fill(long long x)
MonitorElement * h_hiHF
Definition: CentralityDQM.h:59
MonitorElement * h_hiHFhit
Definition: CentralityDQM.h:64
int iEvent
Definition: GenABIO.cc:230
MonitorElement * h_hiHFhitPlus
Definition: CentralityDQM.h:65
MonitorElement * h_hiHFminus
Definition: CentralityDQM.h:61
MonitorElement * h_hiNtracks
Definition: CentralityDQM.h:55
MonitorElement * h_hiHFhitMinus
Definition: CentralityDQM.h:66
MonitorElement * h_hiNtracksPtCut
Definition: CentralityDQM.h:56
MonitorElement * h_hiZDCminus
Definition: CentralityDQM.h:74
MonitorElement * h_hiHFplus
Definition: CentralityDQM.h:60
MonitorElement * h_hiEEplus
Definition: CentralityDQM.h:70
MonitorElement * h_hiEE
Definition: CentralityDQM.h:69
edm::EDGetTokenT< reco::Centrality > centralityToken
Definition: CentralityDQM.h:41
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken
Definition: CentralityDQM.h:45
void CentralityDQM::bookHistograms ( DQMStore::IBooker bei,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 54 of file CentralityDQM.cc.

References DQMStore::IBooker::book1D(), and DQMStore::IBooker::setCurrentFolder().

55  {
56  // void CentralityDQM::bookHistograms(DQMStore* bei){
57 
58  bei.setCurrentFolder("Physics/Centrality/");
59 
60  h_hiNpix = bei.book1D("h_hiNpix", "h_hiNpix", 750, 0, 75000);
62  bei.book1D("h_hiNpixelTracks", "hiNpixelTracks", 500, 0, 5000);
63  h_hiNtracks = bei.book1D("h_hiNtracks", "h_hiNtracks", 500, 0, 5000);
65  bei.book1D("h_hiNtracksPtCut", "h_hiNtracksPtCut", 500, 0, 5000);
67  bei.book1D("h_hiNtracksEtaCut", "h_hiNtracksEtaCut", 500, 0, 5000);
69  bei.book1D("h_hiNtracksEtaPtCut", "h_hiNtracksEtaPtCut", 500, 0, 5000);
70 
71  h_hiHF = bei.book1D("h_hiHF", "h_hiHF", 900, 0, 9000);
72  h_hiHFplus = bei.book1D("h_hiHFplus", "h_hiHFplus", 900, 0, 9000);
73  h_hiHFminus = bei.book1D("h_hiHFminus", "h_hiHFminus", 900, 0, 9000);
74  h_hiHFplusEta4 = bei.book1D("h_hiHFplusEta4", "h_hiHFplusEta4", 900, 0, 9000);
76  bei.book1D("h_hiHFminusEta4", "h_hiHFminusEta4", 900, 0, 9000);
77 
78  h_hiHFhit = bei.book1D("h_hiHFhit", "h_hiHFhit", 3000, 0, 300000);
79  h_hiHFhitPlus = bei.book1D("h_hiHFhitPlus", "h_hiHFhitPlus", 2000, 0, 200000);
81  bei.book1D("h_hiHFhitMinus", "h_hiHFhitMinus", 2000, 0, 200000);
82 
83  h_hiEB = bei.book1D("h_hiEB", "h_hiEB", 600, 0, 6000);
84  h_hiET = bei.book1D("h_hiET", "h_hiET", 600, 0, 6000);
85  h_hiEE = bei.book1D("h_hiEE", "h_hiEE", 600, 0, 6000);
86  h_hiEEplus = bei.book1D("h_hiEEplus", "h_hiEEplus", 600, 0, 6000);
87  h_hiEEminus = bei.book1D("h_hiEEminus", "h_hiEEminus", 600, 0, 6000);
88  h_hiZDC = bei.book1D("h_hiZDC", "h_hiZDC", 600, 0, 6000);
89  h_hiZDCplus = bei.book1D("h_hiZDCplus", "h_hiZDCplus", 600, 0, 6000);
90  h_hiZDCminus = bei.book1D("h_hiZDCminus", "h_hiZDCminus", 600, 0, 6000);
91 
92  h_vertex_x = bei.book1D("h_vertex_x", "h_vertex_x", 400, -4, 4);
93  h_vertex_y = bei.book1D("h_vertex_y", "h_vertex_y", 400, -4, 4);
94  h_vertex_z = bei.book1D("h_vertex_z", "h_vertex_z", 400, -40, 40);
95 }
MonitorElement * h_hiZDC
Definition: CentralityDQM.h:72
MonitorElement * h_hiZDCplus
Definition: CentralityDQM.h:73
MonitorElement * h_vertex_x
Definition: CentralityDQM.h:76
MonitorElement * h_vertex_z
Definition: CentralityDQM.h:78
MonitorElement * h_hiET
Definition: CentralityDQM.h:68
MonitorElement * h_hiNpix
Definition: CentralityDQM.h:53
MonitorElement * h_hiNtracksEtaCut
Definition: CentralityDQM.h:57
MonitorElement * h_hiNpixelTracks
Definition: CentralityDQM.h:54
MonitorElement * h_hiNtracksEtaPtCut
Definition: CentralityDQM.h:58
MonitorElement * h_hiHFminusEta4
Definition: CentralityDQM.h:63
MonitorElement * h_vertex_y
Definition: CentralityDQM.h:77
MonitorElement * h_hiEB
Definition: CentralityDQM.h:67
MonitorElement * h_hiHFplusEta4
Definition: CentralityDQM.h:62
MonitorElement * h_hiEEminus
Definition: CentralityDQM.h:71
MonitorElement * h_hiHF
Definition: CentralityDQM.h:59
MonitorElement * h_hiHFhit
Definition: CentralityDQM.h:64
MonitorElement * h_hiHFhitPlus
Definition: CentralityDQM.h:65
MonitorElement * h_hiHFminus
Definition: CentralityDQM.h:61
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * h_hiNtracks
Definition: CentralityDQM.h:55
MonitorElement * h_hiHFhitMinus
Definition: CentralityDQM.h:66
MonitorElement * h_hiNtracksPtCut
Definition: CentralityDQM.h:56
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * h_hiZDCminus
Definition: CentralityDQM.h:74
MonitorElement * h_hiHFplus
Definition: CentralityDQM.h:60
MonitorElement * h_hiEEplus
Definition: CentralityDQM.h:70
MonitorElement * h_hiEE
Definition: CentralityDQM.h:69

Member Data Documentation

edm::Handle<reco::Centrality> CentralityDQM::centrality_
private

Definition at line 42 of file CentralityDQM.h.

edm::InputTag CentralityDQM::centralityTag_
private

Definition at line 40 of file CentralityDQM.h.

edm::EDGetTokenT<reco::Centrality> CentralityDQM::centralityToken
private

Definition at line 41 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiEB
private

Definition at line 67 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiEE
private

Definition at line 69 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiEEminus
private

Definition at line 71 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiEEplus
private

Definition at line 70 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiET
private

Definition at line 68 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiHF
private

Definition at line 59 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiHFhit
private

Definition at line 64 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiHFhitMinus
private

Definition at line 66 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiHFhitPlus
private

Definition at line 65 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiHFminus
private

Definition at line 61 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiHFminusEta4
private

Definition at line 63 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiHFplus
private

Definition at line 60 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiHFplusEta4
private

Definition at line 62 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiNpix
private

Definition at line 53 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiNpixelTracks
private

Definition at line 54 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiNtracks
private

Definition at line 55 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiNtracksEtaCut
private

Definition at line 57 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiNtracksEtaPtCut
private

Definition at line 58 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiNtracksPtCut
private

Definition at line 56 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiZDC
private

Definition at line 72 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiZDCminus
private

Definition at line 74 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_hiZDCplus
private

Definition at line 73 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_vertex_x
private

Definition at line 76 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_vertex_y
private

Definition at line 77 of file CentralityDQM.h.

MonitorElement* CentralityDQM::h_vertex_z
private

Definition at line 78 of file CentralityDQM.h.

edm::Handle<std::vector<reco::Vertex> > CentralityDQM::vertex_
private

Definition at line 46 of file CentralityDQM.h.

edm::InputTag CentralityDQM::vertexTag_
private

Definition at line 44 of file CentralityDQM.h.

edm::EDGetTokenT<std::vector<reco::Vertex> > CentralityDQM::vertexToken
private

Definition at line 45 of file CentralityDQM.h.