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
SingleTopTChannelLepton::MonitorEnsemble Class Reference

#include <SingleTopTChannelLeptonDQM.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, const edm::VParameterSet &vcfg, 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
btagCombVtx_
 
double btagCombVtxWP_
 
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_
 
std::string elecIso_
 extra isolation criterion on electron More...
 
edm::EDGetTokenT< edm::View
< reco::PFCandidate > > 
elecs_
 
edm::EDGetTokenT< edm::View
< reco::GsfElectron > > 
elecs_gsf_
 
std::string 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...
 
std::string muonIso_
 extra isolation criterion on muon More...
 
edm::EDGetTokenT< edm::View
< reco::PFCandidate > > 
muons_
 
std::string 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 42 of file SingleTopTChannelLeptonDQM.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

default contructor

Definition at line 25 of file SingleTopTChannelLeptonDQM.cc.

References book(), btagCombVtx_, btagCombVtxWP_, btagEff_, btagEffWP_, btagPur_, btagPurWP_, btagVtx_, btagVtxWP_, DEBUG, eidPattern_, elecIso_, elecs_, elecs_gsf_, 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_.

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

default destructor

Definition at line 51 of file SingleTopTChannelLeptonDQM.h.

References pvSelect_.

51 {delete pvSelect_;}
StringCutObjectSelector< reco::Vertex > * pvSelect_
extra selection on primary vertices; meant to investigate the pile-up effect

Member Function Documentation

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

book histograms in subdirectory directory

Definition at line 163 of file SingleTopTChannelLeptonDQM.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().

164  {
165  //set up the current directory path
169 
170  // determine number of bins for trigger monitoring
171  unsigned int nPaths=triggerPaths_.size();
172 
173  // --- [STANDARD] --- //
174  // number of selected primary vertices
175  hists_["pvMult_" ] = store_->book1D("PvMult" , "N_{pvs}" , 100, 0., 100.);
176  // pt of the leading muon
177  hists_["muonPt_" ] = store_->book1D("MuonPt" , "pt(#mu)" , 50, 0., 250.);
178  // muon multiplicity before std isolation
179  hists_["muonMult_" ] = store_->book1D("MuonMult" , "N_{20}(#mu)" , 10, 0., 10.);
180  // muon multiplicity after std isolation
181  hists_["muonMultIso_"] = store_->book1D("MuonMultIso", "N_{Iso}(#mu)" , 10, 0., 10.);
182  // pt of the leading electron
183  hists_["elecPt_" ] = store_->book1D("ElecPt" , "pt(e)" , 50, 0., 250.);
184  // electron multiplicity before std isolation
185  hists_["elecMult_" ] = store_->book1D("ElecMult" , "N_{30}(e)" , 10, 0., 10.);
186  // electron multiplicity after std isolation
187  hists_["elecMultIso_"] = store_->book1D("ElecMultIso", "N_{Iso}(e)" , 10, 0., 10.);
188  // multiplicity of jets with pt>20 (corrected to L2+L3)
189  hists_["jetMult_" ] = store_->book1D("JetMult" , "N_{30}(jet)" , 10, 0., 10.);
190  // trigger efficiency estimates for single lepton triggers
191  hists_["triggerEff_" ] = store_->book1D("TriggerEff" , "Eff(trigger)" , nPaths, 0., nPaths);
192  // monitored trigger occupancy for single lepton triggers
193  hists_["triggerMon_" ] = store_->book1D("TriggerMon" , "Mon(trigger)" , nPaths, 0., nPaths);
194  // MET (calo)
195  hists_["metCalo_" ] = store_->book1D("METCalo" , "MET_{Calo}" , 50, 0., 200.);
196  // W mass estimate
197  hists_["massW_" ] = store_->book1D("MassW" , "M(W)" , 60, 0., 300.);
198  // Top mass estimate
199  hists_["massTop_" ] = store_->book1D("MassTop" , "M(Top)" , 50, 0., 500.);
200  // W mass transverse estimate mu
201  hists_["MTWm_" ] = store_->book1D("MTWm" , "M_{T}^{W}(#mu)" , 60, 0., 300.);
202  // Top mass transverse estimate mu
203  hists_["mMTT_" ] = store_->book1D("mMTT" , "M_{T}^{t}(#mu)" , 50, 0., 500.);
204 
205  // W mass transverse estimate e
206  hists_["MTWe_" ] = store_->book1D("MTWe" , "M_{T}^{W}(e)" , 60, 0., 300.);
207  // Top mass transverse estimate e
208  hists_["eMTT_" ] = store_->book1D("eMTT" , "M_{T}^{t}(e)" , 50, 0., 500.);
209 
210  // set bin labels for trigger monitoring
212 
213  if( verbosity_==STANDARD) return;
214 
215  // --- [VERBOSE] --- //
216 
217  // eta of the leading muon
218  hists_["muonEta_" ] = store_->book1D("MuonEta" , "#eta(#mu)" , 30, -3., 3.);
219  // std isolation variable of the leading muon
220  hists_["muonPFRelIso_" ] = store_->book1D("MuonPFRelIso","PFIso_{Rel}(#mu)", 50, 0., 1.);
221  hists_["muonRelIso_" ] = store_->book1D("MuonRelIso" , "Iso_{Rel}(#mu)" , 50, 0., 1.);
222 
223  // eta of the leading electron
224  hists_["elecEta_" ] = store_->book1D("ElecEta" , "#eta(e)" , 30, -3., 3.);
225  // std isolation variable of the leading electron
226  hists_["elecRelIso_" ] = store_->book1D("ElecRelIso" , "Iso_{Rel}(e)" , 50, 0., 1.);
227  hists_["elecPFRelIso_" ] = store_->book1D("ElecPFRelIso" , "PFIso_{Rel}(e)", 50, 0., 1.);
228 
229  // multiplicity of btagged jets (for track counting high efficiency) with pt(L2L3)>30
230  hists_["jetMultBEff_"] = store_->book1D("JetMultBEff", "N_{30}(b/eff)" , 10, 0., 10.);
231  // btag discriminator for track counting high efficiency for jets with pt(L2L3)>30
232  hists_["jetBDiscEff_"] = store_->book1D("JetBDiscEff", "Disc_{b/eff}(jet)", 100, 0., 10.);
233 
234 
235  // eta of the 1. leading jet
236  hists_["jet1Eta_" ] = store_->book1D("Jet1Eta" , "#eta (jet1)" , 50, -5., 5.);
237  // eta of the 2. leading jet
238  hists_["jet2Eta_" ] = store_->book1D("Jet2Eta" , "#eta (jet2)" , 50, -5., 5.);
239 
240  // pt of the 1. leading jet (corrected to L2+L3)
241  hists_["jet1Pt_" ] = store_->book1D("Jet1Pt" , "pt_{L2L3}(jet1)" , 60, 0., 300.);
242  // pt of the 2. leading jet (corrected to L2+L3)
243  hists_["jet2Pt_" ] = store_->book1D("Jet2Pt" , "pt_{L2L3}(jet2)" , 60, 0., 300.);
244 
245 
246  // eta and pt of the b-tagged jet (filled only when nJets==2)
247  hists_["TaggedJetEta_" ] = store_->book1D("TaggedJetEta" , "#eta (Tagged jet)" , 50, -5., 5.);
248  hists_["TaggedJetPt_" ] = store_->book1D("TaggedJetPt" , "pt_{L2L3}(Tagged jet)" , 60, 0., 300.);
249 
250  // eta and pt of the jet not passing b-tag (filled only when nJets==2)
251  hists_["UnTaggedJetEta_" ] = store_->book1D("UnTaggedJetEta" , "#eta (UnTagged jet)" , 50, -5., 5.);
252  hists_["UnTaggedJetPt_" ] = store_->book1D("UnTaggedJetPt" , "pt_{L2L3}(UnTagged jet)" , 60, 0., 300.);
253 
254  // eta and pt of the most forward jet in the event with nJets==2
255  hists_["FwdJetEta_" ] = store_->book1D("FwdJetEta" , "#eta (Fwd jet)" , 50, -5., 5.);
256  hists_["FwdJetPt_" ] = store_->book1D("FwdJetPt" , "pt_{L2L3}(Fwd jet)" , 60, 0., 300.);
257 
258 
259  // 2D histogram (pt,eta) of the b-tagged jet (filled only when nJets==2)
260  hists_["TaggedJetPtEta_" ] = store_->book2D("TaggedJetPt_Eta" , "(pt vs #eta)_{L2L3}(Tagged jet)" , 60, 0., 300., 50, -5., 5.);
261 
262  // 2D histogram (pt,eta) of the not-b tagged jet (filled only when nJets==2)
263  hists_["UnTaggedJetPtEta_" ] = store_->book2D("UnTaggedJetPt_Eta" , "(pt vs #eta)_{L2L3}(UnTagged jet)" , 60, 0., 300., 50, -5., 5.);
264 
265 
266 
267  // MET (tc)
268  hists_["metTC_" ] = store_->book1D("METTC" , "MET_{TC}" , 50, 0., 200.);
269  // MET (pflow)
270  hists_["metPflow_" ] = store_->book1D("METPflow" , "MET_{Pflow}" , 50, 0., 200.);
271 
272  // dz for muons (to suppress cosmis)
273  hists_["muonDelZ_" ] = store_->book1D("MuonDelZ" , "d_{z}(#mu)" , 50, -25., 25.);
274  // dxy for muons (to suppress cosmics)
275  hists_["muonDelXY_" ] = store_->book2D("MuonDelXY" , "d_{xy}(#mu)" , 50, -0.1, 0.1, 50, -0.1, 0.1);
276 
277  // set axes titles for dxy for muons
278  hists_["muonDelXY_" ]->setAxisTitle( "x [cm]", 1); hists_["muonDelXY_" ]->setAxisTitle( "y [cm]", 2);
279 
280  if( verbosity_==VERBOSE) return;
281 
282  // --- [DEBUG] --- //
283 
284  // relative muon isolation from charged hadrons for the leading muon
285  hists_["muonChHadIso_" ] = store_->book1D("MuonChHadIso" , "Iso_{ChHad}(#mu)" , 100, 0., 1.);
286  // relative muon isolation from neutral hadrons for the leading muon
287  hists_["muonNeuHadIso_" ] = store_->book1D("MuonNeuHadIso" , "Iso_{NeuHad}(#mu)" , 100, 0., 1.);
288  // relative muon isolation from photons for the leading muon
289  hists_["muonPhIso_" ] = store_->book1D("MuonPhIso" , "Iso_{Ph}(#mu)" , 100, 0., 1.);
290 
291  // relative electron isolation from charged hadrons for the leading electron
292  hists_["elecChHadIso_" ] = store_->book1D("ElecChHadIso" , "Iso_{ChHad}(e)" , 100, 0., 1.);
293  // relative electron isolation from neutral hadrons for the leading electron
294  hists_["elecNeuHadIso_" ] = store_->book1D("ElecNeuHadIso" , "Iso_{NeuHad}(e)" , 100, 0., 1.);
295  // relative electron isolation from photons for the leading electron
296  hists_["elecPhIso_" ] = store_->book1D("ElecPhIso" , "Iso_{Ph}(e)" , 100, 0., 1.);
297 
298  // multiplicity of btagged jets (for track counting high purity) with pt(L2L3)>30
299  hists_["jetMultBPur_"] = store_->book1D("JetMultBPur", "N_{30}(b/pur)" , 10, 0., 10.);
300  // btag discriminator for track counting high purity
301  hists_["jetBDiscPur_"] = store_->book1D("JetBDiscPur", "Disc_{b/pur}(Jet)", 200, -10., 10.);
302  // btag discriminator for track counting high purity for 1. leading jet
303  hists_["jet1BDiscPur_"] = store_->book1D("Jet1BDiscPur", "Disc_{b/pur}(Jet1)", 200, -10., 10.);
304  // btag discriminator for track counting high purity for 2. leading jet
305  hists_["jet2BDiscPur_"] = store_->book1D("Jet2BDiscPur", "Disc_{b/pur}(Jet2)", 200, -10., 10.);
306 
307 
308  // multiplicity of btagged jets (for simple secondary vertex) with pt(L2L3)>30
309  hists_["jetMultBVtx_"] = store_->book1D("JetMultBVtx", "N_{30}(b/vtx)" , 10, 0., 10.);
310  // btag discriminator for simple secondary vertex
311  hists_["jetBDiscVtx_"] = store_->book1D("JetBDiscVtx", "Disc_{b/vtx}(Jet)", 35, -1., 6.);
312 
313 
314  // multiplicity of btagged jets (for combined secondary vertex) with pt(L2L3)>30
315  hists_["jetMultBCombVtx_"] = store_->book1D("JetMultBCombVtx", "N_{30}(b/CSV)" , 10, 0., 10.);
316  // btag discriminator for combined secondary vertex
317  hists_["jetBDiscCombVtx_"] = store_->book1D("JetBDiscCombVtx", "Disc_{b/CSV}(Jet)", 60, -1., 2.);
318  // btag discriminator for combined secondary vertex for 1. leading jet
319  hists_["jet1BDiscCombVtx_"] = store_->book1D("Jet1BDiscCombVtx", "Disc_{b/CSV}(Jet1)", 60, -1., 2.);
320  // btag discriminator for combined secondary vertex for 2. leading jet
321  hists_["jet2BDiscCombVtx_"] = store_->book1D("Jet2BDiscCombVtx", "Disc_{b/CSV}(Jet2)", 60, -1., 2.);
322 
323 
324  // pt of the 1. leading jet (uncorrected)
325  hists_["jet1PtRaw_" ] = store_->book1D("Jet1PtRaw" , "pt_{Raw}(jet1)" , 60, 0., 300.);
326  // pt of the 2. leading jet (uncorrected)
327  hists_["jet2PtRaw_" ] = store_->book1D("Jet2PtRaw" , "pt_{Raw}(jet2)" , 60, 0., 300.);
328 
329  // selected events
330  hists_["eventLogger_"] = store_->book2D("EventLogger", "Logged Events" , 9, 0., 9., 10, 0., 10.);
331 
332  // set axes titles for selected events
333  hists_["eventLogger_"]->getTH1()->SetOption("TEXT");
334  hists_["eventLogger_"]->setBinLabel( 1 , "Run" , 1);
335  hists_["eventLogger_"]->setBinLabel( 2 , "Block" , 1);
336  hists_["eventLogger_"]->setBinLabel( 3 , "Event" , 1);
337  hists_["eventLogger_"]->setBinLabel( 4 , "pt_{L2L3}(jet1)" , 1);
338  hists_["eventLogger_"]->setBinLabel( 5 , "pt_{L2L3}(jet2)" , 1);
339  hists_["eventLogger_"]->setBinLabel( 6 , "pt_{L2L3}(jet3)" , 1);
340  hists_["eventLogger_"]->setBinLabel( 7 , "pt_{L2L3}(jet4)" , 1);
341  hists_["eventLogger_"]->setBinLabel( 8 , "M_{W}" , 1);
342  hists_["eventLogger_"]->setBinLabel( 9 , "M_{Top}" , 1);
343  hists_["eventLogger_"]->setAxisTitle("logged evts" , 2);
344  return;
345  }
Level verbosity_
verbosity level for booking
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
std::map< std::string, MonitorElement * > hists_
histogram container
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
bool SingleTopTChannelLepton::MonitorEnsemble::booked ( const std::string  histName) const
inlineprivate

check if histogram was booked

Definition at line 72 of file SingleTopTChannelLeptonDQM.h.

References hists_.

Referenced by fill().

72 { 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 348 of file SingleTopTChannelLeptonDQM.cc.

References funct::abs(), btagCombVtx_, btagCombVtxWP_, btagEff_, btagEffWP_, btagPur_, btagPurWP_, btagVtx_, btagVtxWP_, JetCorrector::correction(), alignCSCRings::e, eidPattern_, elecIso_, elecs_, elecs_gsf_, elecSelect_, electronId_, reco::LeafCandidate::eta(), edm::EventAuxiliary::event(), edm::Event::eventAuxiliary(), edm::EventSetup::find(), edm::Event::getByToken(), JetCorrector::getJetCorrector(), hists_, customizeTrackingMonitorSeedNumber::idx, includeBTag_, edm::Ref< C, T, F >::isNull(), edm::EDGetTokenT< T >::isUninitialized(), metsig::jet, jetCorrector_, bTagSequences_cff::jetID, jetIDLabel_, jetIDSelect_, fwrapper::jets, jets_, jetSelect_, logged_, lowerEdge_, edm::EventAuxiliary::luminosityBlock(), Calculate::massTopQuark(), Calculate::massWBoson(), SingleTopTChannelLepton::MAXJETS, CaloMET_cfi::met, mets_, RPCpg::mu, 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, Calculate::tmassTopQuark(), Calculate::tmassWBoson(), triggerPaths_, triggerTable_, upperEdge_, and SingleTopTChannelLepton::WMASS.

Referenced by fill().

349  {
350  // fetch trigger event if configured such
353  if( !event.getByToken(triggerTable_, triggerTable) ) return;
354 
355  }
356 
357  /*
358  ------------------------------------------------------------
359 
360  Primary Vertex Monitoring
361 
362  ------------------------------------------------------------
363  */
364 
365  // fill monitoring plots for primary vertices
367  if( !event.getByToken(pvs_, pvs) ) return;
368  unsigned int pvMult = 0;
369  for(edm::View<reco::Vertex>::const_iterator pv=pvs->begin(); pv!=pvs->end(); ++pv){
370  if(!pvSelect_ || (*pvSelect_)(*pv))
371  pvMult++;
372  }
373  fill("pvMult_", pvMult );
374 
375  /*
376  ------------------------------------------------------------
377 
378  Electron Monitoring
379 
380  ------------------------------------------------------------
381  */
382 
383  /*
384  reco::BeamSpot beamSpot;
385  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
386  if( !event.getByToken("offlineBeamSpot",recoBeamSpotHandle)) return;
387  beamSpot = *recoBeamSpotHandle;
388  */
389 
390  // fill monitoring plots for electrons
397 
398  if( !event.getByToken(elecs_, elecs) ) return;
399  if( !event.getByToken(elecs_gsf_, elecs_gsf) ) return;
400  // check availability of electron id
401  edm::Handle<edm::ValueMap<float> > electronId;
403  if( !event.getByToken(electronId_, electronId) ) return;
404  }
405  // loop electron collection
406  unsigned int eMult=0, eMultIso=0;
407  std::vector<const reco::GsfElectron*> isoElecs;
409 
410  unsigned int idx_gsf = 0;
411  for(elec_it=elecs->begin(); elec_it!=elecs->end(); ++elec_it){
412  if(elec_it->gsfElectronRef().isNull()) continue ;
413 
414  reco::GsfElectronRef elec = elec_it->gsfElectronRef();
415  if(elec->gsfTrack().isNull()) continue ;
416 
417  // restrict to electrons with good electronId
418  int eID = 0;
420  eID = (int)(*electronId)[elecs_gsf->refAt(idx_gsf)];
421 
422  if( electronId_.isUninitialized() ? true : ( (eID & eidPattern_) && (eID >=5)) ){
423 
424  if( elecSelect(*elec_it)){
425  double isolationRel = (elec->dr03TkSumPt()+elec->dr03EcalRecHitSumEt()+elec->dr03HcalTowerSumEt())/elec->pt();
426 
427  double isolationChHad = elec->pt()/(elec->pt()+elec->pfIsolationVariables().sumChargedHadronPt);
428  double isolationNeuHad = elec->pt()/(elec->pt()+elec->pfIsolationVariables().sumNeutralHadronEt);
429  double isolationPhoton = elec->pt()/(elec->pt()+elec->pfIsolationVariables().sumPhotonEt);
430  double PFisolationRel = (elec->pfIsolationVariables().sumChargedHadronPt+elec->pfIsolationVariables().sumNeutralHadronEt+elec->pfIsolationVariables().sumPhotonEt)/elec->pt();
431 
432  if( eMult==0 ){
433  // restrict to the leading electron
434  fill("elecPt_" , elec->pt() );
435  fill("elecEta_", elec->eta());
436  fill("elecRelIso_" , isolationRel );
437  fill("elecPFRelIso_",PFisolationRel );
438  fill("elecChHadIso_" , isolationChHad );
439  fill("elecNeuHadIso_" , isolationNeuHad );
440  fill("elecPhIso_" , isolationPhoton );
441 
442  }
443  // in addition to the multiplicity counter buffer the iso
444  // electron candidates for later overlap check with jets
445  ++eMult; if( (elecIso)(*elec_it)){ if(eMultIso == 0) e = *elec; isoElecs.push_back(&(*elec)); ++eMultIso; }
446  }
447  }
448  idx_gsf++;
449  }
450 
451  fill("elecMult_", eMult );
452  fill("elecMultIso_", eMultIso);
453 
454 
455  /*
456  ------------------------------------------------------------
457 
458  Muon Monitoring
459 
460  ------------------------------------------------------------
461  */
462 
463  // fill monitoring plots for muons
464  unsigned int mMult=0, mMultIso=0;
465 
471  reco::Muon mu;
472 
473 
474  /*
475  if (muons_.label() == "muons"){
476  edm::Handle<edm::View<reco::Muon> > muons;
477  edm::View<reco::Muon>::const_iterator muon;
478  StringCutObjectSelector<reco::Muon> *muonSelect = new StringCutObjectSelector<reco::Muon>(muonSelect_);
479  StringCutObjectSelector<reco::Muon> *muonIso = new StringCutObjectSelector<reco::Muon>(muonIso_);
480  }
481  */
482 
483  if( !event.getByToken(muons_, muons )) return;
484  for(muonit = muons->begin(); muonit != muons->end(); ++muonit){ // for now, to use Reco::Muon need to substitute muonit with muon
485  // and comment the MuonRef and PFCandidate parts
486 
487  if(muonit->muonRef().isNull()) continue ;
488  reco::MuonRef muon = muonit->muonRef();
489 
490  if(muon->innerTrack().isNull()) continue ;
491 
492 
493  // restrict to globalMuons
494  if( muon->isGlobalMuon() ){
495  fill("muonDelZ_" , muon->globalTrack()->vz());
496  fill("muonDelXY_", muon->globalTrack()->vx(), muon->globalTrack()->vy());
497 
498  // apply selection
499  if( !muonSelect || (*muonSelect)(*muonit)) {
500 
501 
502 
503  double isolationRel = (muon->isolationR03().sumPt+muon->isolationR03().emEt+muon->isolationR03().hadEt)/muon->pt();
504  double isolationChHad = muon->pt()/(muon->pt()+muon->pfIsolationR04().sumChargedHadronPt);
505  double isolationNeuHad = muon->pt()/(muon->pt()+muon->pfIsolationR04().sumNeutralHadronEt);
506  double isolationPhoton = muon->pt()/(muon->pt()+muon->pfIsolationR04().sumPhotonEt);
507  double PFisolationRel = (muon->pfIsolationR04().sumChargedHadronPt + muon->pfIsolationR04().sumNeutralHadronEt + muon->pfIsolationR04().sumPhotonEt)/muon->pt();
508 
509 
510 
511  if( mMult==0 ){
512  // restrict to leading muon
513  fill("muonPt_" , muon->pt() );
514  fill("muonEta_" , muon->eta());
515  fill("muonRelIso_" , isolationRel );
516  fill("muonChHadIso_" , isolationChHad );
517  fill("muonNeuHadIso_" , isolationNeuHad );
518  fill("muonPhIso_" , isolationPhoton );
519  fill("muonPFRelIso_" , PFisolationRel );
520 
521  }
522  ++mMult;
523 
524  if( !muonIso || (*muonIso)(*muonit)) {if(mMultIso == 0) mu = *muon; ++mMultIso;}
525  }
526  }
527  }
528  fill("muonMult_", mMult );
529  fill("muonMultIso_", mMultIso);
530 
531  /*
532  ------------------------------------------------------------
533 
534  Jet Monitoring
535 
536  ------------------------------------------------------------
537  */
538  // check availability of the btaggers
539  edm::Handle<reco::JetTagCollection> btagEff, btagPur, btagVtx, btagCombVtx;
540  if( includeBTag_ ){
541  if( !event.getByToken(btagEff_, btagEff) ) return;
542  if( !event.getByToken(btagPur_, btagPur) ) return;
543  if( !event.getByToken(btagVtx_, btagVtx) ) return;
544  if( !event.getByToken(btagCombVtx_, btagCombVtx) ) return;
545  }
546 
547  // load jet corrector if configured such
548  const JetCorrector* corrector=0;
549  if(!jetCorrector_.empty()){
550  // check whether a jet correcto is in the event setup or not
551  if(setup.find( edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>() )){
552  corrector = JetCorrector::getJetCorrector(jetCorrector_, setup);
553  }
554  else{
555  edm::LogVerbatim( "SingleTopTChannelLeptonDQM" )
556  << "\n"
557  << "------------------------------------------------------------------------------------- \n"
558  << " No JetCorrectionsRecord available from EventSetup: \n"
559  << " - Jets will not be corrected. \n"
560  << " - If you want to change this add the following lines to your cfg file: \n"
561  << " \n"
562  << " ## load jet corrections \n"
563  << " process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n"
564  << " process.prefer(\"ak5CaloL2L3\") \n"
565  << " \n"
566  << "------------------------------------------------------------------------------------- \n";
567  }
568  }
569 
570  // loop jet collection
571  std::vector<reco::Jet> correctedJets;
572  unsigned int mult=0, multBEff=0, multBPur=0, multNoBPur=0, multBVtx=0, multBCombVtx=0;
573 
574 
576  if( !event.getByToken(jets_, jets) ) return;
577 
578 
580  if(jetIDSelect_){
581  if( !event.getByToken(jetIDLabel_, jetID) ) return;
582  }
583 
584  vector<double> bJetDiscVal;
585  vector<double> NobJetDiscVal;
586  reco::Jet TaggedJetCand;
587  reco::Jet UnTaggedJetCand;
588  reco::Jet FwdJetCand;
589  for(edm::View<reco::Jet>::const_iterator jet=jets->begin(); jet!=jets->end(); ++jet){
590  // check jetID for calo jets
591  unsigned int idx = jet-jets->begin();
592  if(dynamic_cast<const reco::CaloJet*>(&*jet)){
593  if( jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())){
594  if(!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue;
595  }
596  }
597 
598  // check additional jet selection for calo, pf and bare reco jets
599  if(dynamic_cast<const reco::CaloJet*>(&*jet)){
600  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
602  if(!jetSelect(sel)){ continue;}
603  }
604  else if(dynamic_cast<const reco::PFJet*>(&*jet)){
605  reco::PFJet sel= dynamic_cast<const reco::PFJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
607  if(!jetSelect(sel)) continue;
608  }
609  else{
610  reco::Jet sel = *jet; sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
612  if(!jetSelect(sel)) continue;
613  }
614  // check for overlaps -- comment this to be synchronous with the selection
615  //bool overlap=false;
616  //for(std::vector<const reco::GsfElectron*>::const_iterator elec=isoElecs.begin(); elec!=isoElecs.end(); ++elec){
617  // if(reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), jet->phi())<0.4){overlap=true; break;}
618  //} if(overlap){continue;}
619 
620 
621  // prepare jet to fill monitor histograms
622  reco::Jet monitorJet = *jet; monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
623  correctedJets.push_back(monitorJet);
624 
625 
626  ++mult; // determine jet multiplicity
627  if( includeBTag_ ){
628  // fill b-discriminators
629  edm::RefToBase<reco::Jet> jetRef = jets->refAt(idx);
630  if( (*btagVtx)[jetRef]>btagVtxWP_ ) ++multBVtx;
631  if( (*btagCombVtx)[jetRef]>btagCombVtxWP_ ) ++multBCombVtx;
632  if( (*btagPur)[jetRef]>btagPurWP_ ){
633  if (multBPur == 0){
634  TaggedJetCand = monitorJet;
635  // TaggedJetCand = *jet;
636  bJetDiscVal.push_back((*btagPur)[jetRef]);
637 
638  }
639  else if (multBPur == 1){
640  bJetDiscVal.push_back((*btagPur)[jetRef]);
641  if (bJetDiscVal[1]>bJetDiscVal[0])
642  TaggedJetCand = monitorJet;
643  //TaggedJetCand = *jet;
644  }
645  ++multBPur;
646  }
647 
648  else{
649  if (multNoBPur == 0){
650  UnTaggedJetCand = monitorJet;
651  NobJetDiscVal.push_back((*btagPur)[jetRef]);
652 
653  }
654  else if (multNoBPur == 1){
655  NobJetDiscVal.push_back((*btagPur)[jetRef]);
656  if (NobJetDiscVal[1]<NobJetDiscVal[0])
657  UnTaggedJetCand = monitorJet;
658  }
659 
660  ++multNoBPur;
661  }
662 
663  if( (*btagEff)[jetRef]>btagEffWP_ ) ++multBEff;
664 
665  if(mult==1) {
666  fill("jet1BDiscPur_", (*btagPur)[jetRef]);
667  fill("jet1BDiscCombVtx_", (*btagCombVtx)[jetRef]);
668  }
669 
670  else if(mult==2) {
671  fill("jet2BDiscPur_", (*btagPur)[jetRef]);
672  fill("jet2BDiscCombVtx_", (*btagCombVtx)[jetRef]);
673  }
674 
675  fill("jetBDiscEff_", (*btagEff)[jetRef]);
676  fill("jetBDiscPur_", (*btagPur)[jetRef]);
677  fill("jetBDiscVtx_", (*btagVtx)[jetRef]);
678  fill("jetBDiscCombVtx_", (*btagCombVtx)[jetRef]);
679 
680  }
681  // fill pt (raw or L2L3) for the leading jets
682  if(mult==1) {
683  fill("jet1Pt_" , monitorJet.pt());
684  fill("jet1Eta_", monitorJet.eta());
685  fill("jet1PtRaw_", jet->pt() );
686  FwdJetCand = monitorJet;
687 
688  }
689 
690  if(mult==2) {
691  fill("jet2Pt_" , monitorJet.pt());
692  fill("jet2Eta_", monitorJet.eta());
693  fill("jet2PtRaw_", jet->pt() );
694 
695  if ( abs(monitorJet.eta()) > abs(FwdJetCand.eta()) ){
696  FwdJetCand = monitorJet;
697  }
698 
699  fill("FwdJetPt_" , FwdJetCand.pt());
700  fill("FwdJetEta_", FwdJetCand.eta());
701 
702  }
703 
704 
705 
706  }
707 
708  if (multNoBPur == 1 && multBPur == 1){
709 
710  fill("TaggedJetPtEta_" , TaggedJetCand.pt(), TaggedJetCand.eta());
711  fill("UnTaggedJetPtEta_" , UnTaggedJetCand.pt(), UnTaggedJetCand.eta());
712 
713 
714  fill("TaggedJetPt_" , TaggedJetCand.pt());
715  fill("TaggedJetEta_", TaggedJetCand.eta());
716  fill("UnTaggedJetPt_" , UnTaggedJetCand.pt());
717  fill("UnTaggedJetEta_", UnTaggedJetCand.eta());
718  }
719 
720  fill("jetMult_" , mult );
721  fill("jetMultBEff_", multBEff);
722  fill("jetMultBPur_", multBPur);
723  fill("jetMultBVtx_", multBVtx);
724  fill("jetMultBCombVtx_", multBCombVtx);
725 
726 
727  /*
728  ------------------------------------------------------------
729 
730  MET Monitoring
731 
732  ------------------------------------------------------------
733  */
734 
735  // fill monitoring histograms for met
736  reco::MET mET;
737  for(std::vector<edm::EDGetTokenT<edm::View<reco::MET> > >::const_iterator met_=mets_.begin(); met_!=mets_.end(); ++met_){
739  if( !event.getByToken(*met_, met) ) continue;
740  if(met->begin()!=met->end()){
741  unsigned int idx=met_-mets_.begin();
742  if(idx==0) { fill("metCalo_" , met->begin()->et()); }
743  if(idx==1) { fill("metTC_" , met->begin()->et()); }
744  if(idx==2) { fill("metPflow_", met->begin()->et()); mET = *(met->begin()); }
745  }
746  }
747 
748 
749  /*
750  ------------------------------------------------------------
751 
752  Event Monitoring
753 
754  ------------------------------------------------------------
755  */
756 
757  // fill W boson and top mass estimates
758  Calculate eventKinematics(MAXJETS, WMASS);
759  double wMass = eventKinematics.massWBoson (correctedJets);
760  double topMass = eventKinematics.massTopQuark(correctedJets);
761  if(wMass>=0 && topMass>=0) {fill("massW_" , wMass ); fill("massTop_" , topMass);}
762  // fill plots for trigger monitoring
763  if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<wMass && wMass<upperEdge_) ){
764  if(!triggerTable_.isUninitialized()) fill(event, *triggerTable, "trigger", triggerPaths_);
765  if(logged_<=hists_.find("eventLogger_")->second->getNbinsY()){
766  // log runnumber, lumi block, event number & some
767  // more pysics infomation for interesting events
768  fill("eventLogger_", 0.5, logged_+0.5, event.eventAuxiliary().run());
769  fill("eventLogger_", 1.5, logged_+0.5, event.eventAuxiliary().luminosityBlock());
770  fill("eventLogger_", 2.5, logged_+0.5, event.eventAuxiliary().event());
771  if(correctedJets.size()>0) fill("eventLogger_", 3.5, logged_+0.5, correctedJets[0].pt());
772  if(correctedJets.size()>1) fill("eventLogger_", 4.5, logged_+0.5, correctedJets[1].pt());
773  if(correctedJets.size()>2) fill("eventLogger_", 5.5, logged_+0.5, correctedJets[2].pt());
774  if(correctedJets.size()>3) fill("eventLogger_", 6.5, logged_+0.5, correctedJets[3].pt());
775  fill("eventLogger_", 7.5, logged_+0.5, wMass );
776  fill("eventLogger_", 8.5, logged_+0.5, topMass);
777  ++logged_;
778  }
779  }
780  if(multBPur != 0 && mMultIso == 1 ){
781 
782  double mtW = eventKinematics.tmassWBoson(&mu,mET,TaggedJetCand); fill("MTWm_",mtW);
783  double MTT = eventKinematics.tmassTopQuark(&mu,mET,TaggedJetCand); fill("mMTT_", MTT);
784 
785  }
786 
787  if(multBPur != 0 && eMultIso == 1 ){
788  double mtW = eventKinematics.tmassWBoson(&e,mET,TaggedJetCand); fill("MTWe_",mtW);
789  double MTT = eventKinematics.tmassTopQuark(&e,mET,TaggedJetCand); fill("eMTT_", MTT);
790  }
791 
792  }
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
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
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
int logged_
number of logged interesting events
edm::EDGetTokenT< reco::JetTagCollection > btagCombVtx_
RunNumber_t run() const
virtual void scaleEnergy(double fScale)
scale energy of the jet
Definition: Jet.cc:444
std::string muonIso_
extra isolation criterion on muon
std::string muonSelect_
extra selection on muons
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
Jets made from PFObjects.
Definition: PFJet.h:21
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
Helper class for the calculation of a top and a W boson mass estime.
Definition: TopDQMHelpers.h:69
std::string elecSelect_
extra selection on electrons
double lowerEdge_
mass window upper and lower edge
bool isNull() const
Checks for null.
Definition: Ref.h:247
Definition: MET.h:39
virtual float eta() const
momentum pseudorapidity
vector< PseudoJet > jets
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecs_gsf_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int mu
Definition: Constants.h:22
edm::EDGetTokenT< reco::JetTagCollection > btagPur_
edm::EDGetTokenT< reco::JetTagCollection > btagEff_
btag discriminator labels
std::map< std::string, MonitorElement * > hists_
histogram container
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:72
edm::EDGetTokenT< reco::JetTagCollection > btagVtx_
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
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::PFCandidate > > elecs_
static const unsigned int MAXJETS
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
tuple muons
Definition: patZpeak.py:38
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
bool isUninitialized() const
Definition: EDGetToken.h:71
EventNumber_t event() const
std::string elecIso_
extra isolation criterion on electron
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 179 of file SingleTopTChannelLeptonDQM.h.

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

180  {
181  for(unsigned int idx=0; idx<labels.size(); ++idx){
182  if( accept(event, triggerTable, monitorPath(labels[idx])) ){
183  fill((channel+"Mon_").c_str(), idx+0.5 );
184  // take care to fill triggerMon_ before evts is being called
185  int evts = hists_.find((channel+"Mon_").c_str())->second->getBinContent(idx+1);
186  double value = hists_.find((channel+"Eff_").c_str())->second->getBinContent(idx+1);
187  fill((channel+"Eff_").c_str(), idx+0.5, 1./evts*(accept(event, triggerTable, selectionPath(labels[idx]))-value));
188  }
189  }
190  }
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:26
std::string monitorPath(const std::string &label) const
std::string selectionPath(const std::string &label) const
std::map< std::string, MonitorElement * > hists_
histogram container
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
void SingleTopTChannelLepton::MonitorEnsemble::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 74 of file SingleTopTChannelLeptonDQM.h.

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

74 { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(value); };
bool booked(const std::string histName) const
check if histogram was booked
U second(std::pair< T, U > const &p)
std::map< std::string, MonitorElement * > hists_
histogram container
void SingleTopTChannelLepton::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 76 of file SingleTopTChannelLeptonDQM.h.

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

76 { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(xValue, yValue); };
bool booked(const std::string histName) const
check if histogram was booked
U second(std::pair< T, U > const &p)
std::map< std::string, MonitorElement * > hists_
histogram container
void SingleTopTChannelLepton::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 78 of file SingleTopTChannelLeptonDQM.h.

78 { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(xValue, yValue, zValue); };
bool booked(const std::string histName) const
check if histogram was booked
U second(std::pair< T, U > const &p)
std::map< std::string, MonitorElement * > hists_
histogram container
std::string SingleTopTChannelLepton::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 61 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and triggerBinLabels().

61 { return label.substr(label.find(':')+1); };
std::string SingleTopTChannelLepton::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 64 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and triggerBinLabels().

64 { 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 170 of file SingleTopTChannelLeptonDQM.h.

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

Referenced by book().

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

Member Data Documentation

edm::EDGetTokenT<reco::JetTagCollection> SingleTopTChannelLepton::MonitorEnsemble::btagCombVtx_
private

Definition at line 153 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton::MonitorEnsemble::btagCombVtxWP_
private

Definition at line 156 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

btag discriminator labels

Definition at line 153 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton::MonitorEnsemble::btagEffWP_
private

btag working points

Definition at line 156 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 153 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton::MonitorEnsemble::btagPurWP_
private

Definition at line 156 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 153 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton::MonitorEnsemble::btagVtxWP_
private

Definition at line 156 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

int SingleTopTChannelLepton::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 119 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton::MonitorEnsemble::elecIso_
private

extra isolation criterion on electron

Definition at line 122 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::PFCandidate> > SingleTopTChannelLepton::MonitorEnsemble::elecs_
private

Definition at line 92 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::GsfElectron> > SingleTopTChannelLepton::MonitorEnsemble::elecs_gsf_
private

Definition at line 91 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton::MonitorEnsemble::elecSelect_
private

extra selection on electrons

Definition at line 125 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

electronId label

Definition at line 107 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

histogram container

Definition at line 165 of file SingleTopTChannelLeptonDQM.h.

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

bool SingleTopTChannelLepton::MonitorEnsemble::includeBTag_
private

include btag information or not to be determined from the cfg

Definition at line 150 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton::MonitorEnsemble::jetCorrector_
private

jetCorrector

Definition at line 138 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

jetID as an extra selection type

Definition at line 141 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

extra jetID selection on calo jets

Definition at line 144 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

input sources for monitoring

Definition at line 89 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton::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 147 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

number of logged interesting events

Definition at line 161 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill().

double SingleTopTChannelLepton::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 158 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

considers a vector of METs

Definition at line 86 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton::MonitorEnsemble::muonIso_
private

extra isolation criterion on muon

Definition at line 132 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::EDGetTokenT<edm::View<reco::PFCandidate> > SingleTopTChannelLepton::MonitorEnsemble::muons_
private

Definition at line 90 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string SingleTopTChannelLepton::MonitorEnsemble::muonSelect_
private

extra selection on muons

Definition at line 135 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

Definition at line 93 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

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

Definition at line 128 of file SingleTopTChannelLeptonDQM.h.

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

DQMStore* SingleTopTChannelLepton::MonitorEnsemble::store_
private

storage manager

Definition at line 163 of file SingleTopTChannelLeptonDQM.h.

Referenced by book().

edm::EDConsumerBase SingleTopTChannelLepton::MonitorEnsemble::tmpConsumerBase
private

Definition at line 166 of file SingleTopTChannelLeptonDQM.h.

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

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

Definition at line 103 of file SingleTopTChannelLeptonDQM.h.

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

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

trigger table

Definition at line 99 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

double SingleTopTChannelLepton::MonitorEnsemble::upperEdge_
private

Definition at line 158 of file SingleTopTChannelLeptonDQM.h.

Referenced by fill(), and MonitorEnsemble().

Level SingleTopTChannelLepton::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 78 of file SingleTopTChannelLeptonDQM.h.

Referenced by book(), and MonitorEnsemble().