CMS 3D CMS Logo

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

#include <TopSingleLeptonDQM.h>

Public Types

enum  Level { STANDARD, VERBOSE, DEBUG }
 different verbosity levels More...
 

Public Member Functions

void book (std::string directory)
 book histograms in subdirectory directory More...
 
void fill (const edm::Event &event, const edm::EventSetup &setup)
 fill monitor histograms with electronId and jetCorrections More...
 
 MonitorEnsemble (const char *label, const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
 default contructor More...
 
 ~MonitorEnsemble ()
 default destructor More...
 

Private Member Functions

bool booked (const std::string histName) const
 check if histogram was booked More...
 
void fill (const edm::Event &event, const edm::TriggerResults &triggerTable, std::string channel, const std::vector< std::string > labels) const
 fill trigger monitoring histograms More...
 
void fill (const std::string histName, double value) const
 fill histogram if it had been booked before More...
 
void fill (const std::string histName, double xValue, double yValue) const
 fill histogram if it had been booked before (2-dim version) More...
 
void fill (const std::string histName, double xValue, double yValue, double zValue) const
 fill histogram if it had been booked before (2-dim version) More...
 
std::string monitorPath (const std::string &label) const
 
std::string selectionPath (const std::string &label) const
 
void triggerBinLabels (std::string channel, const std::vector< std::string > labels)
 set configurable labels for trigger monitoring histograms More...
 

Private Attributes

edm::EDGetTokenT
< reco::JetTagCollection
btagCSV_
 
double btagCSVWP_
 
edm::EDGetTokenT
< reco::JetTagCollection
btagEff_
 btag discriminator labels More...
 
double btagEffWP_
 btag working points More...
 
edm::EDGetTokenT
< reco::JetTagCollection
btagPur_
 
double btagPurWP_
 
edm::EDGetTokenT
< reco::JetTagCollection
btagVtx_
 
double btagVtxWP_
 
int eidPattern_
 
StringCutObjectSelector
< reco::GsfElectron > * 
elecIso_
 extra isolation criterion on electron More...
 
edm::EDGetTokenT< edm::View
< reco::GsfElectron > > 
elecs_
 
StringCutObjectSelector
< reco::GsfElectron > * 
elecSelect_
 extra selection on electrons More...
 
edm::EDGetTokenT
< edm::ValueMap< float > > 
electronId_
 electronId label More...
 
std::map< std::string,
MonitorElement * > 
hists_
 histogram container More...
 
bool includeBTag_
 
std::string jetCorrector_
 jetCorrector More...
 
edm::EDGetTokenT
< reco::JetIDValueMap
jetIDLabel_
 jetID as an extra selection type More...
 
StringCutObjectSelector
< reco::JetID > * 
jetIDSelect_
 extra jetID selection on calo jets More...
 
edm::EDGetTokenT< edm::View
< reco::Jet > > 
jets_
 input sources for monitoring More...
 
std::string jetSelect_
 
std::string label_
 instance label More...
 
int logged_
 number of logged interesting events More...
 
double lowerEdge_
 mass window upper and lower edge More...
 
std::vector< edm::EDGetTokenT
< edm::View< reco::MET > > > 
mets_
 considers a vector of METs More...
 
StringCutObjectSelector
< reco::Muon > * 
muonIso_
 extra isolation criterion on muon More...
 
edm::EDGetTokenT< edm::View
< reco::Muon > > 
muons_
 
StringCutObjectSelector
< reco::Muon > * 
muonSelect_
 extra selection on muons More...
 
edm::EDGetTokenT< edm::View
< reco::Vertex > > 
pvs_
 
StringCutObjectSelector
< reco::Vertex > * 
pvSelect_
 extra selection on primary vertices; meant to investigate the pile-up effect More...
 
DQMStorestore_
 storage manager More...
 
edm::EDConsumerBase tmpConsumerBase
 
std::vector< std::string > triggerPaths_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerTable_
 trigger table More...
 
double upperEdge_
 
Level verbosity_
 verbosity level for booking More...
 

Detailed Description

Definition at line 41 of file TopSingleLeptonDQM.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

MonitorEnsemble::MonitorEnsemble ( const char *  label,
const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)

default contructor

Definition at line 21 of file TopSingleLeptonDQM.cc.

References book(), btagCSV_, btagCSVWP_, btagEff_, btagEffWP_, btagPur_, btagPurWP_, btagVtx_, btagVtxWP_, DEBUG, eidPattern_, elecIso_, elecs_, elecSelect_, electronId_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), includeBTag_, jetCorrector_, bTagSequences_cff::jetID, jetIDLabel_, jetIDSelect_, jets_, jetSelect_, lowerEdge_, mets_, muonIso_, muons_, muonSelect_, pvs_, pvSelect_, STANDARD, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, triggerPaths_, triggerTable_, upperEdge_, VERBOSE, and verbosity_.

21  :
23  {
24  // sources have to be given; this PSet is not optional
25  edm::ParameterSet sources=cfg.getParameter<edm::ParameterSet>("sources");
27  elecs_ = iC.consumes<edm::View<reco::GsfElectron> >(sources.getParameter<edm::InputTag>("elecs"));
28  pvs_ = iC.consumes<edm::View<reco::Vertex> >(sources.getParameter<edm::InputTag>("pvs"));
29  jets_ = iC.consumes<edm::View<reco::Jet> >(sources.getParameter<edm::InputTag>("jets"));
30  for (edm::InputTag const & tag : sources.getParameter<std::vector<edm::InputTag> >("mets"))
31  mets_.push_back( iC.consumes<edm::View<reco::MET> >(tag) );
32  // electronExtras are optional; they may be omitted or
33  // empty
34  if( cfg.existsAs<edm::ParameterSet>("elecExtras") ){
35  edm::ParameterSet elecExtras=cfg.getParameter<edm::ParameterSet>("elecExtras");
36  // select is optional; in case it's not found no
37  // selection will be applied
38  if( elecExtras.existsAs<std::string>("select") ){
40  }
41  // isolation is optional; in case it's not found no
42  // isolation will be applied
43  if( elecExtras.existsAs<std::string>("isolation") ){
45  }
46  // electronId is optional; in case it's not found the
47  // InputTag will remain empty
48  if( elecExtras.existsAs<edm::ParameterSet>("electronId") ){
49  edm::ParameterSet elecId=elecExtras.getParameter<edm::ParameterSet>("electronId");
51  eidPattern_= elecId.getParameter<int>("pattern");
52  }
53  }
54  // pvExtras are opetional; they may be omitted or empty
55  if(cfg.existsAs<edm::ParameterSet>("pvExtras")){
56  edm::ParameterSet pvExtras=cfg.getParameter<edm::ParameterSet>("pvExtras");
57  // select is optional; in case it's not found no
58  // selection will be applied
59  if( pvExtras.existsAs<std::string>("select") ){
61  }
62  }
63  // muonExtras are optional; they may be omitted or empty
64  if( cfg.existsAs<edm::ParameterSet>("muonExtras") ){
65  edm::ParameterSet muonExtras=cfg.getParameter<edm::ParameterSet>("muonExtras");
66  // select is optional; in case it's not found no
67  // selection will be applied
68  if( muonExtras.existsAs<std::string>("select") ){
70  }
71  // isolation is optional; in case it's not found no
72  // isolation will be applied
73  if( muonExtras.existsAs<std::string>("isolation") ){
75  }
76  }
77 
78  // jetExtras are optional; they may be omitted or
79  // empty
80  if( cfg.existsAs<edm::ParameterSet>("jetExtras") ){
81  edm::ParameterSet jetExtras=cfg.getParameter<edm::ParameterSet>("jetExtras");
82  // jetCorrector is optional; in case it's not found
83  // the InputTag will remain empty
84  if( jetExtras.existsAs<std::string>("jetCorrector") ){
85  jetCorrector_= jetExtras.getParameter<std::string>("jetCorrector");
86  }
87  // read jetID information if it exists
88  if(jetExtras.existsAs<edm::ParameterSet>("jetID")){
92  }
93  // select is optional; in case it's not found no
94  // selection will be applied (only implemented for
95  // CaloJets at the moment)
96  if( jetExtras.existsAs<std::string>("select") ){
97  jetSelect_= jetExtras.getParameter<std::string>("select");
98  }
99  // jetBDiscriminators are optional; in case they are
100  // not found the InputTag will remain empty; they
101  // consist of pairs of edm::JetFlavorAssociation's &
102  // corresponding working points
103  includeBTag_=jetExtras.existsAs<edm::ParameterSet>("jetBTaggers");
104  if( includeBTag_ ){
105  edm::ParameterSet btagEff=jetExtras.getParameter<edm::ParameterSet>("jetBTaggers").getParameter<edm::ParameterSet>("trackCountingEff");
106  btagEff_= iC.consumes<reco::JetTagCollection>(btagEff.getParameter<edm::InputTag>("label")); btagEffWP_= btagEff.getParameter<double>("workingPoint");
107  edm::ParameterSet btagPur=jetExtras.getParameter<edm::ParameterSet>("jetBTaggers").getParameter<edm::ParameterSet>("trackCountingPur");
108  btagPur_= iC.consumes<reco::JetTagCollection>(btagPur.getParameter<edm::InputTag>("label")); btagPurWP_= btagPur.getParameter<double>("workingPoint");
109  edm::ParameterSet btagVtx=jetExtras.getParameter<edm::ParameterSet>("jetBTaggers").getParameter<edm::ParameterSet>("secondaryVertex" );
110  btagVtx_= iC.consumes<reco::JetTagCollection>(btagVtx.getParameter<edm::InputTag>("label")); btagVtxWP_= btagVtx.getParameter<double>("workingPoint");
111  edm::ParameterSet btagCSV=jetExtras.getParameter<edm::ParameterSet>("jetBTaggers").getParameter<edm::ParameterSet>("cvsVertex");
112  btagCSV_= iC.consumes<reco::JetTagCollection>(btagCSV.getParameter<edm::InputTag>("label")); btagCSVWP_= btagCSV.getParameter<double>("workingPoint");
113  }
114  }
115 
116  // triggerExtras are optional; they may be omitted or empty
117  if( cfg.existsAs<edm::ParameterSet>("triggerExtras") ){
118  edm::ParameterSet triggerExtras=cfg.getParameter<edm::ParameterSet>("triggerExtras");
120  triggerPaths_=triggerExtras.getParameter<std::vector<std::string> >("paths");
121  }
122 
123  // massExtras is optional; in case it's not found no mass
124  // window cuts are applied for the same flavor monitor
125  // histograms
126  if( cfg.existsAs<edm::ParameterSet>("massExtras") ){
127  edm::ParameterSet massExtras=cfg.getParameter<edm::ParameterSet>("massExtras");
128  lowerEdge_= massExtras.getParameter<double>("lowerEdge");
129  upperEdge_= massExtras.getParameter<double>("upperEdge");
130  }
131 
132  // setup the verbosity level for booking histograms;
133  // per default the verbosity level will be set to
134  // STANDARD. This will also be the chosen level in
135  // the case when the monitoring PSet is not found
137  if( cfg.existsAs<edm::ParameterSet>("monitoring") ){
138  edm::ParameterSet monitoring=cfg.getParameter<edm::ParameterSet>("monitoring");
139  if(monitoring.getParameter<std::string>("verbosity") == "DEBUG" )
140  verbosity_= DEBUG;
141  if(monitoring.getParameter<std::string>("verbosity") == "VERBOSE" )
143  if(monitoring.getParameter<std::string>("verbosity") == "STANDARD")
145  }
146  // and don't forget to do the histogram booking
147  book(cfg.getParameter<std::string>("directory"));
148  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
int logged_
number of logged interesting events
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
double btagEffWP_
btag working points
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:184
std::vector< std::string > triggerPaths_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecs_
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
Level verbosity_
verbosity level for booking
StringCutObjectSelector< reco::Vertex > * pvSelect_
extra selection on primary vertices; meant to investigate the pile-up effect
double lowerEdge_
mass window upper and lower edge
StringCutObjectSelector< reco::Muon > * muonSelect_
extra selection on muons
void book(std::string directory)
book histograms in subdirectory directory
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
StringCutObjectSelector< reco::GsfElectron > * elecIso_
extra isolation criterion on electron
std::string label_
instance label
edm::EDGetTokenT< reco::JetTagCollection > btagVtx_
edm::EDGetTokenT< edm::View< reco::Muon > > muons_
StringCutObjectSelector< reco::GsfElectron > * elecSelect_
extra selection on electrons
StringCutObjectSelector< reco::Muon > * muonIso_
extra isolation criterion on muon
edm::EDGetTokenT< reco::JetTagCollection > btagEff_
btag discriminator labels
std::string jetCorrector_
jetCorrector
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
edm::EDGetTokenT< reco::JetTagCollection > btagPur_
TopSingleLepton::MonitorEnsemble::~MonitorEnsemble ( )
inline

default destructor

Definition at line 50 of file TopSingleLeptonDQM.h.

50 {};

Member Function Documentation

void MonitorEnsemble::book ( std::string  directory)

book histograms in subdirectory directory

Definition at line 151 of file TopSingleLeptonDQM.cc.

References DQMStore::book1D(), DQMStore::book2D(), cond::rpcobimon::current, hists_, label_, cppFunctionSkipper::operator, DQMStore::setCurrentFolder(), STANDARD, store_, AlCaHLTBitMon_QueryRunRegistry::string, triggerBinLabels(), triggerPaths_, VERBOSE, and verbosity_.

Referenced by MonitorEnsemble().

152  {
153  //set up the current directory path
157 
158  // determine number of bins for trigger monitoring
159  unsigned int nPaths=triggerPaths_.size();
160 
161  // --- [STANDARD] --- //
162  //Run Number
163  hists_["RunNumb_" ] = store_->book1D("RunNumber" , "Run Nr." , 1.e4, 1.5e5, 3.e5);
164  //instantaneous luminosity
165  hists_["InstLumi_" ] = store_->book1D("InstLumi" , "Inst. Lumi." , 100, 0., 1.e3);
166  // number of selected primary vertices
167  hists_["pvMult_" ] = store_->book1D("PvMult" , "N_{pvs}" , 100, 0., 100.);
168  // pt of the leading muon
169  hists_["muonPt_" ] = store_->book1D("MuonPt" , "pt(#mu)" , 50, 0., 250.);
170  // muon multiplicity before std isolation
171  hists_["muonMult_" ] = store_->book1D("MuonMult" , "N_{All}(#mu)" , 10, 0., 10.);
172  // muon multiplicity after std isolation
173  hists_["muonMultIso_"] = store_->book1D("MuonMultIso", "N_{Iso}(#mu)" , 10, 0., 10.);
174  // pt of the leading electron
175  hists_["elecPt_" ] = store_->book1D("ElecPt" , "pt(e)" , 50, 0., 250.);
176  // electron multiplicity before std isolation
177  hists_["elecMult_" ] = store_->book1D("ElecMult" , "N_{All}(e)" , 10, 0., 10.);
178  // electron multiplicity after std isolation
179  hists_["elecMultIso_"] = store_->book1D("ElecMultIso", "N_{Iso}(e)" , 10, 0., 10.);
180  // multiplicity of jets with pt>20 (corrected to L2+L3)
181  hists_["jetMult_" ] = store_->book1D("JetMult" , "N_{30}(jet)" , 10, 0., 10.);
182  // trigger efficiency estimates for single lepton triggers
183  hists_["triggerEff_" ] = store_->book1D("TriggerEff" , "Eff(trigger)" , nPaths, 0., nPaths);
184  // monitored trigger occupancy for single lepton triggers
185  hists_["triggerMon_" ] = store_->book1D("TriggerMon" , "Mon(trigger)" , nPaths, 0., nPaths);
186  // MET (calo)
187  hists_["metCalo_" ] = store_->book1D("METCalo" , "MET_{Calo}" , 50, 0., 200.);
188  // W mass estimate
189  hists_["massW_" ] = store_->book1D("MassW" , "M(W)" , 60, 0., 300.);
190  // Top mass estimate
191  hists_["massTop_" ] = store_->book1D("MassTop" , "M(Top)" , 50, 0., 500.);
192  // b-tagged Top mass
193  hists_["massBTop_" ] = store_->book1D("MassBTop" , "M(Top, 1 b-tag)" , 50, 0., 500.);
194  // set bin labels for trigger monitoring
196 
197  if( verbosity_==STANDARD) return;
198 
199  // --- [VERBOSE] --- //
200  // eta of the leading muon
201  hists_["muonEta_" ] = store_->book1D("MuonEta" , "#eta(#mu)" , 30, -3., 3.);
202  // std isolation variable of the leading muon
203  hists_["muonRelIso_" ] = store_->book1D("MuonRelIso" , "Iso_{Rel}(#mu)" , 50, 0., 1.);
204  // eta of the leading electron
205  hists_["elecEta_" ] = store_->book1D("ElecEta" , "#eta(e)" , 30, -3., 3.);
206  // std isolation variable of the leading electron
207  hists_["elecRelIso_" ] = store_->book1D("ElecRelIso" , "Iso_{Rel}(e)" , 50, 0., 1.);
208  // multiplicity of btagged jets (for track counting high efficiency) with pt(L2L3)>30
209  hists_["jetMultBEff_"] = store_->book1D("JetMultBEff", "N_{30}(TCHE)" , 10, 0., 10.);
210  // btag discriminator for track counting high efficiency for jets with pt(L2L3)>30
211  hists_["jetBDiscEff_"] = store_->book1D("JetBDiscEff", "Disc_{TCHE}(jet)", 100, 0., 10.);
212  // eta of the 1. leading jet (corrected to L2+L3)
213  hists_["jet1Eta_" ] = store_->book1D("Jet1Eta" , "#eta_{L2L3}(jet1)", 60, -3., 3.);
214  // pt of the 1. leading jet (corrected to L2+L3)
215  hists_["jet1Pt_" ] = store_->book1D("Jet1Pt" , "pt_{L2L3}(jet1)" , 60, 0., 300.);
216  // eta of the 2. leading jet (corrected to L2+L3)
217  hists_["jet2Eta_" ] = store_->book1D("Jet2Eta" , "#eta_{L2L3}(jet2)", 60, -3., 3.);
218  // pt of the 2. leading jet (corrected to L2+L3)
219  hists_["jet2Pt_" ] = store_->book1D("Jet2Pt" , "pt_{L2L3}(jet2)" , 60, 0., 300.);
220  // eta of the 3. leading jet (corrected to L2+L3)
221  hists_["jet3Eta_" ] = store_->book1D("Jet3Eta" , "#eta_{L2L3}(jet3)", 60, -3., 3.);
222  // pt of the 3. leading jet (corrected to L2+L3)
223  hists_["jet3Pt_" ] = store_->book1D("Jet3Pt" , "pt_{L2L3}(jet3)" , 60, 0., 300.);
224  // eta of the 4. leading jet (corrected to L2+L3)
225  hists_["jet4Eta_" ] = store_->book1D("Jet4Eta" , "#eta_{L2L3}(jet4)", 60, -3., 3.);
226  // pt of the 4. leading jet (corrected to L2+L3)
227  hists_["jet4Pt_" ] = store_->book1D("Jet4Pt" , "pt_{L2L3}(jet4)" , 60, 0., 300.);
228  // MET (tc)
229  hists_["metTC_" ] = store_->book1D("METTC" , "MET_{TC}" , 50, 0., 200.);
230  // MET (pflow)
231  hists_["metPflow_" ] = store_->book1D("METPflow" , "MET_{Pflow}" , 50, 0., 200.);
232  // dz for muons (to suppress cosmis)
233  hists_["muonDelZ_" ] = store_->book1D("MuonDelZ" , "d_{z}(#mu)" , 50, -25., 25.);
234  // dxy for muons (to suppress cosmics)
235  hists_["muonDelXY_" ] = store_->book2D("MuonDelXY" , "d_{xy}(#mu)" , 50, -0.1, 0.1, 50, -0.1, 0.1);
236 
237  // set axes titles for dxy for muons
238  hists_["muonDelXY_" ]->setAxisTitle( "x [cm]", 1); hists_["muonDelXY_" ]->setAxisTitle( "y [cm]", 2);
239 
240  if( verbosity_==VERBOSE) return;
241 
242  // --- [DEBUG] --- //
243  // relative muon isolation in tracker for the leading muon
244  hists_["muonTrkIso_" ] = store_->book1D("MuonTrkIso" , "Iso_{Trk}(#mu)" , 50, 0., 1.);
245  // relative muon isolation in ecal+hcal for the leading muon
246  hists_["muonCalIso_" ] = store_->book1D("MuonCalIso" , "Iso_{Ecal}(#mu)" , 50, 0., 1.);
247  // relative electron isolation in tracker for the leading electron
248  hists_["elecTrkIso_" ] = store_->book1D("ElecTrkIso" , "Iso_{Trk}(e)" , 50, 0., 1.);
249  // relative electron isolation in ecal+hcal for the leading electron
250  hists_["elecCalIso_" ] = store_->book1D("ElecCalIso" , "Iso_{Ecal}(e)" , 50, 0., 1.);
251  // multiplicity of btagged jets (for track counting high purity) with pt(L2L3)>30
252  hists_["jetMultBPur_"] = store_->book1D("JetMultBPur", "N_{30}(TCHP)" , 10, 0., 10.);
253  // btag discriminator for track counting high purity
254  hists_["jetBDiscPur_"] = store_->book1D("JetBDiscPur", "Disc_{TCHP}(Jet)", 100, 0., 10.);
255  // multiplicity of btagged jets (for simple secondary vertex) with pt(L2L3)>30
256  hists_["jetMultBVtx_"] = store_->book1D("JetMultBVtx", "N_{30}(SSVHE)" , 10, 0., 10.);
257  // btag discriminator for simple secondary vertex
258  hists_["jetBDiscVtx_"] = store_->book1D("JetBDiscVtx", "Disc_{SSVHE}(Jet)", 35, -1., 6.);
259  // multiplicity for combined secondary vertex
260  hists_["jetMultCSVtx_"]= store_->book1D("JetMultCSV" , "N_{30}(CSV)" , 10, 0., 10.);
261  // btag discriminator for combined secondary vertex
262  hists_["jetBCVtx_"] = store_->book1D("JetDiscCSV" , "Disc_{CSV}(JET)" , 100, -1., 2.);
263  // pt of the 1. leading jet (uncorrected)
264  hists_["jet1PtRaw_" ] = store_->book1D("Jet1PtRaw" , "pt_{Raw}(jet1)" , 60, 0., 300.);
265  // pt of the 2. leading jet (uncorrected)
266  hists_["jet2PtRaw_" ] = store_->book1D("Jet2PtRaw" , "pt_{Raw}(jet2)" , 60, 0., 300.);
267  // pt of the 3. leading jet (uncorrected)
268  hists_["jet3PtRaw_" ] = store_->book1D("Jet3PtRaw" , "pt_{Raw}(jet3)" , 60, 0., 300.);
269  // pt of the 4. leading jet (uncorrected)
270  hists_["jet4PtRaw_" ] = store_->book1D("Jet4PtRaw" , "pt_{Raw}(jet4)" , 60, 0., 300.);
271  // selected events
272  hists_["eventLogger_"] = store_->book2D("EventLogger", "Logged Events" , 9, 0., 9., 10, 0., 10.);
273 
274  // set axes titles for selected events
275  hists_["eventLogger_"]->getTH1()->SetOption("TEXT");
276  hists_["eventLogger_"]->setBinLabel( 1 , "Run" , 1);
277  hists_["eventLogger_"]->setBinLabel( 2 , "Block" , 1);
278  hists_["eventLogger_"]->setBinLabel( 3 , "Event" , 1);
279  hists_["eventLogger_"]->setBinLabel( 4 , "pt_{L2L3}(jet1)" , 1);
280  hists_["eventLogger_"]->setBinLabel( 5 , "pt_{L2L3}(jet2)" , 1);
281  hists_["eventLogger_"]->setBinLabel( 6 , "pt_{L2L3}(jet3)" , 1);
282  hists_["eventLogger_"]->setBinLabel( 7 , "pt_{L2L3}(jet4)" , 1);
283  hists_["eventLogger_"]->setBinLabel( 8 , "M_{W}" , 1);
284  hists_["eventLogger_"]->setBinLabel( 9 , "M_{Top}" , 1);
285  hists_["eventLogger_"]->setAxisTitle("logged evts" , 2);
286  return;
287  }
std::map< std::string, MonitorElement * > hists_
histogram container
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
std::vector< std::string > triggerPaths_
Level verbosity_
verbosity level for booking
std::string label_
instance label
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1082
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
DQMStore * store_
storage manager
bool TopSingleLepton::MonitorEnsemble::booked ( const std::string  histName) const
inlineprivate

check if histogram was booked

Definition at line 71 of file TopSingleLeptonDQM.h.

References hists_.

Referenced by fill().

71 { return hists_.find(histName.c_str())!=hists_.end(); };
std::map< std::string, MonitorElement * > hists_
histogram container
void MonitorEnsemble::fill ( const edm::Event event,
const edm::EventSetup setup 
)

fill monitor histograms with electronId and jetCorrections

Definition at line 290 of file TopSingleLeptonDQM.cc.

References btagCSV_, btagCSVWP_, btagEff_, btagEffWP_, btagPur_, btagPurWP_, btagVtx_, btagVtxWP_, JetCorrector::correction(), eidPattern_, elecIso_, elecs_, elecSelect_, electronId_, reco::LeafCandidate::eta(), edm::EventAuxiliary::event(), edm::Event::eventAuxiliary(), edm::EventSetup::find(), edm::Event::getByToken(), JetCorrector::getJetCorrector(), hists_, customizeTrackingMonitorSeedNumber::idx, includeBTag_, edm::EDGetTokenT< T >::isUninitialized(), metsig::jet, jetCorrector_, bTagSequences_cff::jetID, jetIDLabel_, jetIDSelect_, fwrapper::jets, jets_, jetSelect_, logged_, lowerEdge_, edm::EventAuxiliary::luminosityBlock(), Calculate::massBTopQuark(), Calculate::massTopQuark(), Calculate::massWBoson(), TopSingleLepton::MAXJETS, CaloMET_cfi::met, mets_, VarParsing::mult, metsig::muon, muonIso_, patZpeak::muons, muons_, muonSelect_, RecoTauCleanerPlugins::pt, reco::LeafCandidate::pt(), pvs_, pvSelect_, edm::EventAuxiliary::run(), reco::Jet::scaleEnergy(), EgammaValidation_Wenu_cff::sel, triggerPaths_, triggerTable_, upperEdge_, and TopSingleLepton::WMASS.

Referenced by fill().

291  {
292  // fetch trigger event if configured such
294 
296  if( !event.getByToken(triggerTable_, triggerTable) ) return;
297  }
298 
299  /*
300  ------------------------------------------------------------
301 
302  Primary Vertex Monitoring
303 
304  ------------------------------------------------------------
305  */
306  // fill monitoring plots for primary verices
308  if( !event.getByToken(pvs_, pvs) ) return;
309  unsigned int pvMult = 0;
310  for(edm::View<reco::Vertex>::const_iterator pv=pvs->begin(); pv!=pvs->end(); ++pv){
311  if(!pvSelect_ || (*pvSelect_)(*pv))
312  pvMult++;
313  }
314  fill("pvMult_", pvMult );
315 
316 
317  /*
318  ------------------------------------------------------------
319 
320  Run and Inst. Luminosity information (Inst. Lumi. filled now with a dummy value=5.0)
321 
322  ------------------------------------------------------------
323  */
324  if (!event.eventAuxiliary().run()) return;
325  fill("RunNumb_", event.eventAuxiliary().run());
326 
327  double dummy=5.; fill("InstLumi_", dummy);
328 
329 
330  /*
331  ------------------------------------------------------------
332 
333  Electron Monitoring
334 
335  ------------------------------------------------------------
336  */
337 
338  // fill monitoring plots for electrons
340  if( !event.getByToken(elecs_, elecs) ) return;
341 
342  // check availability of electron id
345  if( !event.getByToken(electronId_, electronId) ) return;
346  }
347 
348  // loop electron collection
349  unsigned int eMult=0, eMultIso=0;
350  std::vector<const reco::GsfElectron*> isoElecs;
351  for(edm::View<reco::GsfElectron>::const_iterator elec=elecs->begin(); elec!=elecs->end(); ++elec){
352  unsigned int idx = elec-elecs->begin();
353  // restrict to electrons with good electronId
354  if( electronId_.isUninitialized() ? true : ((int)(*electronId)[elecs->refAt(idx)] & eidPattern_) ){
355  if(!elecSelect_ || (*elecSelect_)(*elec)){
356  double isolationTrk = elec->pt()/(elec->pt()+elec->dr03TkSumPt());
357  double isolationCal = elec->pt()/(elec->pt()+elec->dr03EcalRecHitSumEt()+elec->dr03HcalTowerSumEt());
358  double isolationRel = (elec->dr03TkSumPt()+elec->dr03EcalRecHitSumEt()+elec->dr03HcalTowerSumEt())/elec->pt();
359  if( eMult==0 ){
360  // restrict to the leading electron
361  fill("elecPt_" , elec->pt() );
362  fill("elecEta_", elec->eta());
363  fill("elecRelIso_" , isolationRel );
364  fill("elecTrkIso_" , isolationTrk );
365  fill("elecCalIso_" , isolationCal );
366  }
367  // in addition to the multiplicity counter buffer the iso
368  // electron candidates for later overlap check with jets
369  ++eMult; if(!elecIso_ || (*elecIso_)(*elec)){ isoElecs.push_back(&(*elec)); ++eMultIso;}
370  }
371  }
372  }
373  fill("elecMult_", eMult );
374  fill("elecMultIso_", eMultIso);
375 
376  /*
377  ------------------------------------------------------------
378 
379  Muon Monitoring
380 
381  ------------------------------------------------------------
382  */
383 
384  // fill monitoring plots for muons
385  unsigned int mMult=0, mMultIso=0;
386 
388  if( !event.getByToken(muons_, muons) ) return;
389 
390  for(edm::View<reco::Muon>::const_iterator muon=muons->begin(); muon!=muons->end(); ++muon){
391  // restrict to globalMuons
392  if( muon->isGlobalMuon() ){
393  fill("muonDelZ_" , muon->globalTrack()->vz());
394  fill("muonDelXY_", muon->globalTrack()->vx(), muon->globalTrack()->vy());
395  // apply preselection
396  if(!muonSelect_ || (*muonSelect_)(*muon)){
397  double isolationTrk = muon->pt()/(muon->pt()+muon->isolationR03().sumPt);
398  double isolationCal = muon->pt()/(muon->pt()+muon->isolationR03().emEt+muon->isolationR03().hadEt);
399  double isolationRel = (muon->isolationR03().sumPt+muon->isolationR03().emEt+muon->isolationR03().hadEt)/muon->pt();
400  if( mMult==0 ){
401  // restrict to leading muon
402  fill("muonPt_" , muon->pt() );
403  fill("muonEta_" , muon->eta());
404  fill("muonRelIso_" , isolationRel );
405  fill("muonTrkIso_" , isolationTrk );
406  fill("muonCalIso_" , isolationCal );
407  }
408  ++mMult; if(!muonIso_ || (*muonIso_)(*muon)) ++mMultIso;
409  }
410  }
411  }
412  fill("muonMult_", mMult );
413  fill("muonMultIso_", mMultIso);
414 
415  /*
416  ------------------------------------------------------------
417 
418  Jet Monitoring
419 
420  ------------------------------------------------------------
421  */
422 
423  // check availability of the btaggers
424  edm::Handle<reco::JetTagCollection> btagEff, btagPur, btagVtx, btagCSV;
425  if( includeBTag_ ){
426  if( !event.getByToken(btagEff_, btagEff) ) return;
427  if( !event.getByToken(btagPur_, btagPur) ) return;
428  if( !event.getByToken(btagVtx_, btagVtx) ) return;
429  if( !event.getByToken(btagCSV_, btagCSV)) return;
430  }
431  // load jet corrector if configured such
432  const JetCorrector* corrector=0;
433  if(!jetCorrector_.empty()){
434  // check whether a jet correcto is in the event setup or not
435  if(setup.find( edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>() )){
436  corrector = JetCorrector::getJetCorrector(jetCorrector_, setup);
437  }
438  else{
439  edm::LogVerbatim( "TopSingleLeptonDQM" )
440  << "\n"
441  << "------------------------------------------------------------------------------------- \n"
442  << " No JetCorrectionsRecord available from EventSetup: \n"
443  << " - Jets will not be corrected. \n"
444  << " - If you want to change this add the following lines to your cfg file: \n"
445  << " \n"
446  << " ## load jet corrections \n"
447  << " process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n"
448  << " process.prefer(\"ak4CaloL2L3\") \n"
449  << " \n"
450  << "------------------------------------------------------------------------------------- \n";
451  }
452  }
453 
454  // loop jet collection
455  std::vector<reco::Jet> correctedJets;
456  std::vector<double> JetTagValues;
457  unsigned int mult=0, multBEff=0, multBPur=0, multBVtx=0, multCSV=0;
458 
460  if( !event.getByToken(jets_, jets) ) {
461  //cout<<"event does not contain "<<jets_.label()<<endl;
462  return;
463  }
464 
466  if(jetIDSelect_){
467  if( !event.getByToken(jetIDLabel_, jetID) ) return;
468  }
469 
470  for(edm::View<reco::Jet>::const_iterator jet=jets->begin(); jet!=jets->end(); ++jet){
471  // check jetID for calo jets
472  unsigned int idx = jet-jets->begin();
473  if( jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())){
474  if(!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue;
475  }
476  // chekc additional jet selection for calo, pf and bare reco jets
477  if(dynamic_cast<const reco::CaloJet*>(&*jet)){
478  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
479  StringCutObjectSelector<reco::CaloJet> jetSelect(jetSelect_); if(!jetSelect(sel)){ continue;}
480  }
481  else if(dynamic_cast<const reco::PFJet*>(&*jet)){
482  reco::PFJet sel= dynamic_cast<const reco::PFJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
483  StringCutObjectSelector<reco::PFJet> jetSelect(jetSelect_); if(!jetSelect(sel)) continue;
484  }
485  else{
486  reco::Jet sel = *jet; sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
487  StringCutObjectSelector<reco::Jet> jetSelect(jetSelect_); if(!jetSelect(sel)) continue;
488  }
489  // check for overlaps -- comment this to be synchronous with the selection
490  //bool overlap=false;
491  //for(std::vector<const reco::GsfElectron*>::const_iterator elec=isoElecs.begin(); elec!=isoElecs.end(); ++elec){
492  // if(reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), jet->phi())<0.4){overlap=true; break;}
493  //} if(overlap){continue;}
494 
495  // prepare jet to fill monitor histograms
496  reco::Jet monitorJet = *jet; monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
497  correctedJets.push_back(monitorJet);
498  ++mult; // determine jet multiplicity
499  if( includeBTag_ ){
500  // fill b-discriminators
501  edm::RefToBase<reco::Jet> jetRef = jets->refAt(idx);
502  fill("jetBDiscEff_", (*btagEff)[jetRef]); if( (*btagEff)[jetRef]>btagEffWP_ ) ++multBEff;
503  fill("jetBDiscPur_", (*btagPur)[jetRef]); if( (*btagPur)[jetRef]>btagPurWP_ ) ++multBPur;
504  fill("jetBDiscVtx_", (*btagVtx)[jetRef]); if( (*btagVtx)[jetRef]>btagVtxWP_ ) ++multBVtx;
505  fill("jetBCVtx_" , (*btagCSV)[jetRef]); if( (*btagCSV)[jetRef]>btagCSVWP_ ) ++multCSV;
506 
507  //Fill a vector with Jet b-tag WP for later M3+1tag calculation: CSV tagger
508  JetTagValues.push_back( (*btagCSV)[jetRef]);
509  }
510  // fill pt (raw or L2L3) for the leading four jets
511  if(idx==0) {fill("jet1Pt_" , monitorJet.pt()); fill("jet1PtRaw_", jet->pt() );
512  fill("jet1Eta_", monitorJet.eta());
513  };
514  if(idx==1) {fill("jet2Pt_" , monitorJet.pt()); fill("jet2PtRaw_", jet->pt() );
515  fill("jet2Eta_", monitorJet.eta());
516  }
517  if(idx==2) {fill("jet3Pt_" , monitorJet.pt()); fill("jet3PtRaw_", jet->pt() );
518  fill("jet3Eta_", monitorJet.eta());
519  }
520  if(idx==3) {fill("jet4Pt_" , monitorJet.pt()); fill("jet4PtRaw_", jet->pt() );
521  fill("jet4Eta_", monitorJet.eta());
522  }
523  }
524  fill("jetMult_" , mult );
525  fill("jetMultBEff_" , multBEff);
526  fill("jetMultBPur_" , multBPur);
527  fill("jetMultBVtx_" , multBVtx);
528  fill("jetMultCSVtx_", multCSV );
529 
530  /*
531  ------------------------------------------------------------
532 
533  MET Monitoring
534 
535  ------------------------------------------------------------
536  */
537 
538  // fill monitoring histograms for met
539  for(std::vector<edm::EDGetTokenT<edm::View<reco::MET> > >::const_iterator met_=mets_.begin(); met_!=mets_.end(); ++met_){
541  if( !event.getByToken(*met_, met) ) continue;
542  if(met->begin()!=met->end()){
543  unsigned int idx=met_-mets_.begin();
544  if(idx==0) fill("metCalo_" , met->begin()->et());
545  if(idx==1) fill("metTC_" , met->begin()->et());
546  if(idx==2) fill("metPflow_", met->begin()->et());
547  }
548  }
549 
550  /*
551  ------------------------------------------------------------
552 
553  Event Monitoring
554 
555  ------------------------------------------------------------
556  */
557 
558  // fill W boson and top mass estimates
559 
560  Calculate eventKinematics(MAXJETS, WMASS);
561  double wMass = eventKinematics.massWBoson (correctedJets);
562  double topMass = eventKinematics.massTopQuark (correctedJets);
563  if(wMass>=0 && topMass>=0 ) {fill("massW_" , wMass );fill("massTop_" , topMass);}
564 
565  // Fill M3 with Btag (CSV Tight) requirement
566 
567  if (!includeBTag_) return;
568  if (correctedJets.size() != JetTagValues.size()) return;
569  double btopMass= eventKinematics.massBTopQuark(correctedJets, JetTagValues, btagCSVWP_);
570  if (btopMass>=0) fill("massBTop_", btopMass);
571 
572  // fill plots for trigger monitoring
573  if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<wMass && wMass<upperEdge_) ){
574  if(!triggerTable_.isUninitialized()) fill(event, *triggerTable, "trigger", triggerPaths_);
575  if(logged_<=hists_.find("eventLogger_")->second->getNbinsY()){
576  // log runnumber, lumi block, event number & some
577  // more pysics infomation for interesting events
578  fill("eventLogger_", 0.5, logged_+0.5, event.eventAuxiliary().run());
579  fill("eventLogger_", 1.5, logged_+0.5, event.eventAuxiliary().luminosityBlock());
580  fill("eventLogger_", 2.5, logged_+0.5, event.eventAuxiliary().event());
581  if(correctedJets.size()>0) fill("eventLogger_", 3.5, logged_+0.5, correctedJets[0].pt());
582  if(correctedJets.size()>1) fill("eventLogger_", 4.5, logged_+0.5, correctedJets[1].pt());
583  if(correctedJets.size()>2) fill("eventLogger_", 5.5, logged_+0.5, correctedJets[2].pt());
584  if(correctedJets.size()>3) fill("eventLogger_", 6.5, logged_+0.5, correctedJets[3].pt());
585  fill("eventLogger_", 7.5, logged_+0.5, wMass );
586  fill("eventLogger_", 8.5, logged_+0.5, topMass);
587  ++logged_;
588  }
589  }
590  }
std::map< std::string, MonitorElement * > hists_
histogram container
int logged_
number of logged interesting events
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
double btagEffWP_
btag working points
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
tuple met
____________________________________________________________________________||
Definition: CaloMET_cfi.py:4
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual float pt() const
transverse momentum
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< std::string > triggerPaths_
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
Base class for all types of Jets.
Definition: Jet.h:20
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
RunNumber_t run() const
virtual void scaleEnergy(double fScale)
scale energy of the jet
Definition: Jet.cc:444
edm::EDGetTokenT< reco::JetTagCollection > btagCSV_
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecs_
Jets made from PFObjects.
Definition: PFJet.h:21
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
LuminosityBlockNumber_t luminosityBlock() const
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:90
StringCutObjectSelector< reco::Vertex > * pvSelect_
extra selection on primary vertices; meant to investigate the pile-up effect
static const double WMASS
double lowerEdge_
mass window upper and lower edge
Helper class for the calculation of a top and a W boson mass estime.
Definition: TopDQMHelpers.h:69
virtual float eta() const
momentum pseudorapidity
StringCutObjectSelector< reco::Muon > * muonSelect_
extra selection on muons
vector< PseudoJet > jets
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
StringCutObjectSelector< reco::GsfElectron > * elecIso_
extra isolation criterion on electron
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:72
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
edm::EDGetTokenT< reco::JetTagCollection > btagVtx_
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:50
edm::EDGetTokenT< edm::View< reco::Muon > > muons_
StringCutObjectSelector< reco::GsfElectron > * elecSelect_
extra selection on electrons
StringCutObjectSelector< reco::Muon > * muonIso_
extra isolation criterion on muon
tuple muons
Definition: patZpeak.py:38
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
bool isUninitialized() const
Definition: EDGetToken.h:71
edm::EDGetTokenT< reco::JetTagCollection > btagEff_
btag discriminator labels
std::string jetCorrector_
jetCorrector
static const unsigned int MAXJETS
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
EventNumber_t event() const
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
edm::EDGetTokenT< reco::JetTagCollection > btagPur_
void MonitorEnsemble::fill ( const edm::Event event,
const edm::TriggerResults triggerTable,
std::string  channel,
const std::vector< std::string >  labels 
) const
inlineprivate

fill trigger monitoring histograms

Definition at line 161 of file TopSingleLeptonDQM.h.

References accept(), fill(), hists_, customizeTrackingMonitorSeedNumber::idx, monitorPath(), selectionPath(), and relativeConstraints::value.

162  {
163  for(unsigned int idx=0; idx<labels.size(); ++idx){
164  if( accept(event, triggerTable, monitorPath(labels[idx])) ){
165  fill((channel+"Mon_").c_str(), idx+0.5 );
166  // take care to fill triggerMon_ before evts is being called
167  int evts = hists_.find((channel+"Mon_").c_str())->second->getBinContent(idx+1);
168  double value = hists_.find((channel+"Eff_").c_str())->second->getBinContent(idx+1);
169  fill((channel+"Eff_").c_str(), idx+0.5, 1./evts*(accept(event, triggerTable, selectionPath(labels[idx]))-value));
170  }
171  }
172  }
std::map< std::string, MonitorElement * > hists_
histogram container
std::string selectionPath(const std::string &label) const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:26
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
std::string monitorPath(const std::string &label) const
void TopSingleLepton::MonitorEnsemble::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 73 of file TopSingleLeptonDQM.h.

References booked(), hists_, and edm::second().

73 { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(value); };
std::map< std::string, MonitorElement * > hists_
histogram container
U second(std::pair< T, U > const &p)
bool booked(const std::string histName) const
check if histogram was booked
void TopSingleLepton::MonitorEnsemble::fill ( const std::string  histName,
double  xValue,
double  yValue 
) const
inlineprivate

fill histogram if it had been booked before (2-dim version)

Definition at line 75 of file TopSingleLeptonDQM.h.

References booked(), hists_, and edm::second().

75 { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(xValue, yValue); };
std::map< std::string, MonitorElement * > hists_
histogram container
U second(std::pair< T, U > const &p)
bool booked(const std::string histName) const
check if histogram was booked
void TopSingleLepton::MonitorEnsemble::fill ( const std::string  histName,
double  xValue,
double  yValue,
double  zValue 
) const
inlineprivate

fill histogram if it had been booked before (2-dim version)

Definition at line 77 of file TopSingleLeptonDQM.h.

77 { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(xValue, yValue, zValue); };
std::map< std::string, MonitorElement * > hists_
histogram container
U second(std::pair< T, U > const &p)
bool booked(const std::string histName) const
check if histogram was booked
std::string TopSingleLepton::MonitorEnsemble::monitorPath ( const std::string &  label) const
inlineprivate

deduce monitorPath from label, the label is expected to be of type 'selectionPath:monitorPath'

Definition at line 60 of file TopSingleLeptonDQM.h.

Referenced by fill(), and triggerBinLabels().

60 { return label.substr(label.find(':')+1); };
std::string TopSingleLepton::MonitorEnsemble::selectionPath ( const std::string &  label) const
inlineprivate

deduce selectionPath from label, the label is expected to be of type 'selectionPath:monitorPath'

Definition at line 63 of file TopSingleLeptonDQM.h.

Referenced by fill(), and triggerBinLabels().

63 { return label.substr(0, label.find(':')); };
void MonitorEnsemble::triggerBinLabels ( std::string  channel,
const std::vector< std::string >  labels 
)
inlineprivate

set configurable labels for trigger monitoring histograms

Definition at line 152 of file TopSingleLeptonDQM.h.

References hists_, customizeTrackingMonitorSeedNumber::idx, monitorPath(), and selectionPath().

Referenced by book().

153  {
154  for(unsigned int idx=0; idx<labels.size(); ++idx){
155  hists_[(channel+"Mon_").c_str()]->setBinLabel( idx+1, "["+monitorPath(labels[idx])+"]", 1);
156  hists_[(channel+"Eff_").c_str()]->setBinLabel( idx+1, "["+selectionPath(labels[idx])+"]|["+monitorPath(labels[idx])+"]", 1);
157  }
158  }
std::map< std::string, MonitorElement * > hists_
histogram container
std::string selectionPath(const std::string &label) const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
std::string monitorPath(const std::string &label) const

Member Data Documentation

edm::EDGetTokenT<reco::JetTagCollection> TopSingleLepton::MonitorEnsemble::btagCSV_
private

Definition at line 136 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::btagCSVWP_
private

Definition at line 138 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<reco::JetTagCollection> TopSingleLepton::MonitorEnsemble::btagEff_
private

btag discriminator labels

Definition at line 136 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 138 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<reco::JetTagCollection> TopSingleLepton::MonitorEnsemble::btagPur_
private

Definition at line 136 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::btagPurWP_
private

Definition at line 138 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<reco::JetTagCollection> TopSingleLepton::MonitorEnsemble::btagVtx_
private

Definition at line 136 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::btagVtxWP_
private

Definition at line 138 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

int TopSingleLepton::MonitorEnsemble::eidPattern_
private

electronId pattern we expect the following pattern: 0: fails 1: passes electron ID only 2: passes electron Isolation only 3: passes electron ID and Isolation only 4: passes conversion rejection 5: passes conversion rejection and ID 6: passes conversion rejection and Isolation 7: passes the whole selection As described on https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID

Definition at line 109 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::GsfElectron>* TopSingleLepton::MonitorEnsemble::elecIso_
private

extra isolation criterion on electron

Definition at line 111 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::GsfElectron> > TopSingleLepton::MonitorEnsemble::elecs_
private

Definition at line 89 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::GsfElectron>* TopSingleLepton::MonitorEnsemble::elecSelect_
private

extra selection on electrons

Definition at line 113 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::ValueMap<float> > TopSingleLepton::MonitorEnsemble::electronId_
private

electronId label

Definition at line 98 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::map<std::string,MonitorElement*> TopSingleLepton::MonitorEnsemble::hists_
private

histogram container

Definition at line 147 of file TopSingleLeptonDQM.h.

Referenced by book(), booked(), fill(), and triggerBinLabels().

bool TopSingleLepton::MonitorEnsemble::includeBTag_
private

include btag information or not to be determined from the cfg

Definition at line 134 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string TopSingleLepton::MonitorEnsemble::jetCorrector_
private

jetCorrector

Definition at line 124 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<reco::JetIDValueMap> TopSingleLepton::MonitorEnsemble::jetIDLabel_
private

jetID as an extra selection type

Definition at line 126 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::JetID>* TopSingleLepton::MonitorEnsemble::jetIDSelect_
private

extra jetID selection on calo jets

Definition at line 128 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::Jet> > TopSingleLepton::MonitorEnsemble::jets_
private

input sources for monitoring

Definition at line 87 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string TopSingleLepton::MonitorEnsemble::jetSelect_
private

extra selection on jets (here given as std::string as it depends on the the jet type, which selections are valid and which not)

Definition at line 131 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string TopSingleLepton::MonitorEnsemble::label_
private
int TopSingleLepton::MonitorEnsemble::logged_
private

number of logged interesting events

Definition at line 143 of file TopSingleLeptonDQM.h.

Referenced by fill().

double TopSingleLepton::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 140 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::vector<edm::EDGetTokenT<edm::View<reco::MET> > > TopSingleLepton::MonitorEnsemble::mets_
private

considers a vector of METs

Definition at line 85 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::Muon>* TopSingleLepton::MonitorEnsemble::muonIso_
private

extra isolation criterion on muon

Definition at line 119 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::Muon> > TopSingleLepton::MonitorEnsemble::muons_
private

Definition at line 88 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::Muon>* TopSingleLepton::MonitorEnsemble::muonSelect_
private

extra selection on muons

Definition at line 121 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::Vertex> > TopSingleLepton::MonitorEnsemble::pvs_
private

Definition at line 90 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

StringCutObjectSelector<reco::Vertex>* TopSingleLepton::MonitorEnsemble::pvSelect_
private

extra selection on primary vertices; meant to investigate the pile-up effect

Definition at line 116 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

DQMStore* TopSingleLepton::MonitorEnsemble::store_
private

storage manager

Definition at line 145 of file TopSingleLeptonDQM.h.

Referenced by book().

edm::EDConsumerBase TopSingleLepton::MonitorEnsemble::tmpConsumerBase
private

Definition at line 148 of file TopSingleLeptonDQM.h.

std::vector<std::string> TopSingleLepton::MonitorEnsemble::triggerPaths_
private

trigger paths for monitoring, expected to be of form signalPath:MonitorPath

Definition at line 95 of file TopSingleLeptonDQM.h.

Referenced by book(), fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::TriggerResults> TopSingleLepton::MonitorEnsemble::triggerTable_
private

trigger table

Definition at line 92 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopSingleLepton::MonitorEnsemble::upperEdge_
private

Definition at line 140 of file TopSingleLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

Level TopSingleLepton::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 77 of file TopSingleLeptonDQM.h.

Referenced by book(), and MonitorEnsemble().