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

#include <TopDiLeptonOfflineDQM.h>

Public Types

enum  DecayChannel { NONE, DIMUON, DIELEC, ELECMU }
 different decay channels More...
 
enum  Level { STANDARD, VERBOSE, DEBUG }
 different verbosity levels More...
 
typedef
reco::LeafCandidate::LorentzVector 
LorentzVector
 

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)
 default contructor More...
 
 ~MonitorEnsemble ()
 default destructor More...
 

Private Member Functions

bool booked (const std::string histName) const
 check if histogram was booked More...
 
DecayChannel decayChannel (const std::vector< const reco::Muon * > &muons, const std::vector< const reco::GsfElectron * > &elecs) const
 determine dileptonic decay channel 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...
 
void loggerBinLabels (std::string hist)
 set labels for event logging histograms 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

int diElecLogged_
 
int diMuonLogged_
 
std::vector< std::string > diMuonPaths_
 trigger paths for di muon channel More...
 
StringCutObjectSelector
< reco::GsfElectron > * 
elecIso_
 extra isolation criterion on electron More...
 
int elecMuLogged_
 number of logged interesting events More...
 
std::vector< std::string > elecMuPaths_
 
edm::InputTag elecs_
 input sources for monitoring More...
 
StringCutObjectSelector
< reco::GsfElectron > * 
elecSelect_
 extra selection on electrons More...
 
edm::InputTag electronId_
 electronId More...
 
std::map< std::string,
MonitorElement * > 
hists_
 histogram container More...
 
std::string jetCorrector_
 jetCorrector More...
 
edm::InputTag jetIDLabel_
 jetID as an extra selection type More...
 
StringCutObjectSelector
< reco::JetID > * 
jetIDSelect_
 extra jetID selection on calo jets More...
 
edm::InputTag jets_
 
std::string jetSelect_
 
std::string label_
 instance label More...
 
double lowerEdge_
 mass window upper and lower edge More...
 
std::vector< edm::InputTagmets_
 considers a vector of METs More...
 
StringCutObjectSelector
< reco::Muon > * 
muonIso_
 extra isolation criterion on muon More...
 
edm::InputTag muons_
 
StringCutObjectSelector
< reco::Muon > * 
muonSelect_
 extra selection on muons More...
 
DQMStorestore_
 storage manager More...
 
edm::InputTag triggerTable_
 trigger table More...
 
double upperEdge_
 
Level verbosity_
 verbosity level for booking More...
 

Detailed Description

Definition at line 39 of file TopDiLeptonOfflineDQM.h.

Member Typedef Documentation

make clear which LorentzVector to use for jet, electrons and muon buffering

Definition at line 45 of file TopDiLeptonOfflineDQM.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

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

default contructor

Definition at line 11 of file TopDiLeptonOfflineDQM.cc.

References book(), DEBUG, diMuonPaths_, elecIso_, elecMuPaths_, elecs_, elecSelect_, electronId_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), jetCorrector_, jetIDLabel_, jetIDSelect_, jets_, jetSelect_, lowerEdge_, mets_, muonIso_, muons_, muonSelect_, STANDARD, triggerTable_, upperEdge_, VERBOSE, and verbosity_.

11  :
14  {
15  // sources have to be given; this PSet is not optional
16  edm::ParameterSet sources=cfg.getParameter<edm::ParameterSet>("sources");
17  muons_= sources.getParameter<edm::InputTag>("muons");
18  elecs_= sources.getParameter<edm::InputTag>("elecs");
19  jets_ = sources.getParameter<edm::InputTag>("jets" );
20  mets_ = sources.getParameter<std::vector<edm::InputTag> >("mets" );
21 
22  // elecExtras are optional; they may be omitted or empty
23  if( cfg.existsAs<edm::ParameterSet>("elecExtras") ){
24  edm::ParameterSet elecExtras=cfg.getParameter<edm::ParameterSet>("elecExtras");
25  // select is optional; in case it's not found no
26  // selection will be applied
27  if( elecExtras.existsAs<std::string>("select") ){
28  elecSelect_= new StringCutObjectSelector<reco::GsfElectron>(elecExtras.getParameter<std::string>("select"));
29  }
30  // isolation is optional; in case it's not found no
31  // isolation will be applied
32  if( elecExtras.existsAs<std::string>("isolation") ){
33  elecIso_= new StringCutObjectSelector<reco::GsfElectron>(elecExtras.getParameter<std::string>("isolation"));
34  }
35  // electronId is optional; in case it's not found the
36  // InputTag will remain empty
37  if( elecExtras.existsAs<edm::InputTag>("electronId") ){
38  electronId_= elecExtras.getParameter<edm::InputTag>("electronId");
39  }
40  }
41  // muonExtras are optional; they may be omitted or empty
42  if( cfg.existsAs<edm::ParameterSet>("muonExtras") ){
43  edm::ParameterSet muonExtras=cfg.getParameter<edm::ParameterSet>("muonExtras");
44  // select is optional; in case it's not found no
45  // selection will be applied
46  if( muonExtras.existsAs<std::string>("select") ){
47  muonSelect_= new StringCutObjectSelector<reco::Muon>(muonExtras.getParameter<std::string>("select"));
48  }
49  // isolation is optional; in case it's not found no
50  // isolation will be applied
51  if( muonExtras.existsAs<std::string>("isolation") ){
52  muonIso_= new StringCutObjectSelector<reco::Muon>(muonExtras.getParameter<std::string>("isolation"));
53  }
54  }
55  // jetExtras are optional; they may be omitted or empty
56  if( cfg.existsAs<edm::ParameterSet>("jetExtras") ){
57  edm::ParameterSet jetExtras=cfg.getParameter<edm::ParameterSet>("jetExtras");
58  // jetCorrector is optional; in case it's not found
59  // the InputTag will remain empty
60  if( jetExtras.existsAs<std::string>("jetCorrector") ){
61  jetCorrector_= jetExtras.getParameter<std::string>("jetCorrector");
62  }
63  // read jetID information if it exists
64  if(jetExtras.existsAs<edm::ParameterSet>("jetID")){
65  edm::ParameterSet jetID=jetExtras.getParameter<edm::ParameterSet>("jetID");
66  jetIDLabel_ =jetID.getParameter<edm::InputTag>("label");
67  jetIDSelect_= new StringCutObjectSelector<reco::JetID>(jetID.getParameter<std::string>("select"));
68  }
69  // select is optional; in case it's not found no
70  // selection will be applied (only implemented for
71  // CaloJets at the moment)
72  if( jetExtras.existsAs<std::string>("select") ){
73  jetSelect_= jetExtras.getParameter<std::string>("select");
74  }
75  }
76  // triggerExtras are optional; they may be omitted or empty
77  if( cfg.existsAs<edm::ParameterSet>("triggerExtras") ){
78  edm::ParameterSet triggerExtras=cfg.getParameter<edm::ParameterSet>("triggerExtras");
79  triggerTable_=triggerExtras.getParameter<edm::InputTag>("src");
80  elecMuPaths_ =triggerExtras.getParameter<std::vector<std::string> >("pathsELECMU");
81  diMuonPaths_ =triggerExtras.getParameter<std::vector<std::string> >("pathsDIMUON");
82  }
83  // massExtras is optional; in case it's not found no mass
84  // window cuts are applied for the same flavor monitor
85  // histograms
86  if( cfg.existsAs<edm::ParameterSet>("massExtras") ){
87  edm::ParameterSet massExtras=cfg.getParameter<edm::ParameterSet>("massExtras");
88  lowerEdge_= massExtras.getParameter<double>("lowerEdge");
89  upperEdge_= massExtras.getParameter<double>("upperEdge");
90  }
91 
92  // setup the verbosity level for booking histograms;
93  // per default the verbosity level will be set to
94  // STANDARD. This will also be the chosen level in
95  // the case when the monitoring PSet is not found
97  if( cfg.existsAs<edm::ParameterSet>("monitoring") ){
98  edm::ParameterSet monitoring=cfg.getParameter<edm::ParameterSet>("monitoring");
99  if(monitoring.getParameter<std::string>("verbosity") == "DEBUG" )
100  verbosity_= DEBUG;
101  if(monitoring.getParameter<std::string>("verbosity") == "VERBOSE" )
103  if(monitoring.getParameter<std::string>("verbosity") == "STANDARD")
105  }
106  // and don't forget to do the histogram booking
107  book(cfg.getParameter<std::string>("directory"));
108  }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:180
const std::string & label
Definition: MVAComputer.cc:186
Level verbosity_
verbosity level for booking
edm::InputTag elecs_
input sources for monitoring
edm::InputTag triggerTable_
trigger table
StringCutObjectSelector< reco::Muon > * muonSelect_
extra selection on muons
double lowerEdge_
mass window upper and lower edge
std::vector< std::string > elecMuPaths_
std::vector< edm::InputTag > mets_
considers a vector of METs
edm::InputTag jetIDLabel_
jetID as an extra selection type
void book(std::string directory)
book histograms in subdirectory directory
StringCutObjectSelector< reco::Muon > * muonIso_
extra isolation criterion on muon
int elecMuLogged_
number of logged interesting events
std::vector< std::string > diMuonPaths_
trigger paths for di muon channel
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
StringCutObjectSelector< reco::GsfElectron > * elecSelect_
extra selection on electrons
StringCutObjectSelector< reco::GsfElectron > * elecIso_
extra isolation criterion on electron
TopDiLeptonOffline::MonitorEnsemble::~MonitorEnsemble ( )
inline

default destructor

Definition at line 53 of file TopDiLeptonOfflineDQM.h.

53 {};

Member Function Documentation

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

book histograms in subdirectory directory

Definition at line 111 of file TopDiLeptonOfflineDQM.cc.

References DQMStore::book1D(), DQMStore::book2D(), cond::rpcobimon::current, diMuonPaths_, elecMuPaths_, hists_, label_, loggerBinLabels(), cmsCodeRules.cppFunctionSkipper::operator, DQMStore::setCurrentFolder(), STANDARD, store_, triggerBinLabels(), VERBOSE, and verbosity_.

Referenced by MonitorEnsemble().

112  {
113  //set up the current directory path
114  std::string current(directory); current+=label_;
117 
118  // determine number of bins for trigger monitoring
119  unsigned int nElecMu=elecMuPaths_.size();
120  unsigned int nDiMuon=diMuonPaths_.size();
121 
122  // --- [STANDARD] --- //
123  // invariant mass of opposite charge lepton pair (only filled for same flavor)
124  hists_["invMass_" ] = store_->book1D("InvMass" , "M(lep1, lep2)" , 80, 0., 320.);
125  // invariant mass of opposite charge lepton pair (only filled for same flavor)
126  hists_["invMassLog_" ] = store_->book1D("InvMassLog" , "log_{10}(M(lep1, lep2))" , 80, .1, 2.5);
127  // invariant mass of same charge lepton pair (log10 for low mass region, only filled for same flavor)
128  hists_["invMassWC_" ] = store_->book1D("InvMassWC" , "M_{WC}(L1, L2)" , 80, 0., 320.);
129  // invariant mass of same charge lepton pair (log10 for low mass region, only filled for same flavor)
130  hists_["invMassWCLog_"] = store_->book1D("InvMassLogWC", "log_{10}(M_{WC})" , 80, .1, 2.5);
131  // decay channel [1]: muon/muon, [2]:elec/elec, [3]:elec/muon
132  hists_["decayChannel_"] = store_->book1D("DecayChannel", "Decay Channel" , 3, 0, 3);
133  // trigger efficiency estimates for the electron muon channel
134  hists_["elecMuEff_" ] = store_->book1D("ElecMuEff" , "Eff(e/#mu paths)" , nElecMu, 0., nElecMu);
135  // monitored trigger occupancy for the electron muon channel
136  hists_["elecMuMon_" ] = store_->book1D("ElecMuMon" , "Mon(e/#mu paths)" , nElecMu, 0., nElecMu);
137  // trigger efficiency estimates for the di muon channel
138  hists_["diMuonEff_" ] = store_->book1D("DiMuonEff" , "Eff(#mu/#mu paths)" , nDiMuon, 0., nDiMuon);
139  // monitored trigger occupancy for the di muon channel
140  hists_["diMuonMon_" ] = store_->book1D("DiMuonMon" , "Mon(#mu/#mu paths)" , nDiMuon, 0., nDiMuon);
141  // pt of the leading lepton
142  hists_["lep1Pt_" ] = store_->book1D("LeptPt" , "pt(lep1)" , 50, 0., 200.);
143  // pt of the 2. leading lepton
144  hists_["lep2Pt_" ] = store_->book1D("Lep2Pt" , "pt(lep2)" , 50, 0., 200.);
145  // multiplicity of jets with pt>30 (corrected to L2+L3)
146  hists_["jetMult_" ] = store_->book1D("JetMult" , "N_{30}(jet)" , 10, 0., 10.);
147  // MET (calo)
148  hists_["metCalo_" ] = store_->book1D("METCalo" , "MET_{Calo}" , 50, 0., 200.);
149 
150  // set bin labels for trigger monitoring
151  triggerBinLabels(std::string("elecMu"), elecMuPaths_);
152  triggerBinLabels(std::string("diMuon"), diMuonPaths_);
153  // set bin labels for decayChannel_
154  hists_["decayChannel_"]->setBinLabel( 1, "#mu e" , 1);
155  hists_["decayChannel_"]->setBinLabel( 2, "#mu #mu", 1);
156  hists_["decayChannel_"]->setBinLabel( 3, "e e" , 1);
157 
158  if( verbosity_==STANDARD) return;
159 
160  // --- [VERBOSE] --- //
161  // mean eta of the candidate leptons
162  hists_["sumEtaL1L2_" ] = store_->book1D("SumEtaL1L2" , "<#eta>(lep1, lep2)" , 30, -5., 5.);
163  // deltaEta between the 2 candidate leptons
164  hists_["dEtaL1L2_" ] = store_->book1D("DEtaL1L2" , "#Delta#eta(lep1,lep2)" , 30, 0., 3.);
165  // deltaPhi between the 2 candidate leptons
166  hists_["dPhiL1L2_" ] = store_->book1D("DPhiL1L2" , "#Delta#phi(lep1,lep2)" , 32, 0., 3.2);
167  // pt of the candidate electron (depending on the decay channel)
168  hists_["elecPt_" ] = store_->book1D("ElecPt" , "pt(e)" , 50, 0., 200.);
169  // relative isolation of the candidate electron (depending on the decay channel)
170  hists_["elecRelIso_" ] = store_->book1D("ElecRelIso" , "Iso_{Rel}(e)" , 50, 0., 1.);
171  // pt of the canddiate muon (depending on the decay channel)
172  hists_["muonPt_" ] = store_->book1D("MuonPt" , "pt(#mu)" , 50, 0., 200.);
173  // relative isolation of the candidate muon (depending on the decay channel)
174  hists_["muonRelIso_" ] = store_->book1D("MuonRelIso" , "Iso_{Rel}(#mu)" , 50, 0., 1.);
175  // pt of the 1. leading jet (corrected to L2+L3)
176  hists_["jet1Pt_" ] = store_->book1D("Jet1Pt" , "pt_{L2L3}(jet1)" , 60, 0., 300.);
177  // pt of the 2. leading jet (corrected to L2+L3)
178  hists_["jet2Pt_" ] = store_->book1D("Jet2Pt" , "pt_{L2L3}(jet2)" , 60, 0., 300.);
179  // MET (PF)
180  hists_["metPflow_" ] = store_->book1D("METPflow" , "MET_{Pflow}" , 50, 0., 200.);
181  // MET (TC)
182  hists_["metTC_" ] = store_->book1D("METTC" , "MET_{TC}" , 50, 0., 200.);
183  // dz for muons (to suppress cosmis)
184  hists_["muonDelZ_" ] = store_->book1D("MuonDelZ" , "d_{z}(#mu)" , 50, -25., 25.);
185  // dxy for muons (to suppress cosmics)
186  hists_["muonDelXY_" ] = store_->book2D("MuonDelXY" , "d_{xy}(#mu)" , 50, -0.1, 0.1, 50, -0.1, 0.1 );
187  // lepton multiplicity after std isolation
188  hists_["lepMultIso_" ] = store_->book2D("LepMultIso" , "N_{Iso}(e) vs N_{Iso}(#mu)" , 5, 0., 5., 5, 0., 5.);
189 
190  // set axes titles for dxy for muons
191  hists_["muonDelXY_" ]->setAxisTitle( "x [cm]", 1); hists_["muonDelXY_" ]->setAxisTitle( "y [cm]", 2);
192  // set axes titles for lepton multiplicity after std isolation
193  hists_["lepMultIso_" ]->setAxisTitle( "N_{Iso}(#mu)", 1); hists_["lepMultIso_" ]->setAxisTitle( "N_{Iso}(elec)", 2);
194 
195  if( verbosity_==VERBOSE) return;
196 
197  // --- [DEBUG] --- //
198  // electron multiplicity after std isolation
199  hists_["elecMultIso_" ] = store_->book1D("ElecMultIso" , "N_{Iso}(e)" , 10, 0., 10.);
200  // muon multiplicity after std isolation
201  hists_["muonMultIso_" ] = store_->book1D("MuonMultIso" , "N_{Iso}(#mu)" , 10, 0., 10.);
202  // calo isolation of the candidate muon (depending on the decay channel)
203  hists_["muonCalIso_" ] = store_->book1D("MuonCalIso" , "Iso_{Cal}(#mu)" , 50, 0., 1.);
204  // track isolation of the candidate muon (depending on the decay channel)
205  hists_["muonTrkIso_" ] = store_->book1D("MuonTrkIso" , "Iso_{Trk}(#mu)" , 50, 0., 1.);
206  // calo isolation of the candidate electron (depending on the decay channel)
207  hists_["elecCalIso_" ] = store_->book1D("ElecCalIso" , "Iso_{Cal}(e)" , 50, 0., 1.);
208  // track isolation of the candidate electron (depending on the decay channel)
209  hists_["elecTrkIso_" ] = store_->book1D("ElecTrkIso" , "Iso_{Trk}(e)" , 50, 0., 1.);
210  // eta of the leading jet
211  hists_["jet1Eta_" ] = store_->book1D("Jet1Eta" , "#eta(jet1)" , 30, -5., 5.);
212  // eta of the 2. leading jet
213  hists_["jet2Eta_" ] = store_->book1D("Jet2Eta" , "#eta(jet2)" , 30, -5., 5.);
214  // pt of the 1. leading jet (not corrected)
215  hists_["jet1PtRaw_" ] = store_->book1D("Jet1PtRaw" , "pt_{Raw}(jet1)" , 60, 0., 300.);
216  // pt of the 2. leading jet (not corrected)
217  hists_["jet2PtRaw_" ] = store_->book1D("Jet2PtRaw" , "pt_{Raw}(jet2)" , 60, 0., 300.);
218  // deltaEta between the 2 leading jets
219  hists_["dEtaJet1Jet2_"] = store_->book1D("DEtaJet1Jet2", "#Delta#eta(jet1,jet2)" , 30, 0., 3.);
220  // deltaEta between the lepton and the leading jet
221  hists_["dEtaJet1Lep1_"] = store_->book1D("DEtaJet1Lep1", "#Delta#eta(jet1,lep1)" , 30, 0., 3.);
222  // deltaEta between the lepton and MET
223  hists_["dEtaLep1MET_" ] = store_->book1D("DEtaLep1MET" , "#Delta#eta(lep1,MET)" , 30, 0., 3.);
224  // deltaEta between leading jet and MET
225  hists_["dEtaJet1MET_" ] = store_->book1D("DEtaJet1MET" , "#Delta#eta(jet1,MET)" , 30, 0., 3.);
226  // deltaPhi of 2 leading jets
227  hists_["dPhiJet1Jet2_"] = store_->book1D("DPhiJet1Jet2", "#Delta#phi(jet1,jet2)" , 32, 0., 3.2);
228  // deltaPhi of 1. lepton and 1. jet
229  hists_["dPhiJet1Lep1_"] = store_->book1D("DPhiJet1Lep1", "#Delta#phi(jet1,lep1)" , 32, 0., 3.2);
230  // deltaPhi of 1. lepton and MET
231  hists_["dPhiLep1MET_" ] = store_->book1D("DPhiLep1MET" , "#Delta#phi(lep1,MET)" , 32, 0., 3.2);
232  // deltaPhi of 1. jet and MET
233  hists_["dPhiJet1MET_" ] = store_->book1D("DPhiJet1MET" , "#Delta#phi(jet1,MET)" , 32, 0., 3.2);
234  // selected dimuon events
235  hists_["diMuonLogger_"] = store_->book2D("DiMuonLogger", "Logged DiMuon Events" , 8, 0., 8., 10, 0., 10.);
236  // selected dielec events
237  hists_["diElecLogger_"] = store_->book2D("DiElecLogger", "Logged DiElec Events" , 8, 0., 8., 10, 0., 10.);
238  // selected elemu events
239  hists_["elecMuLogger_"] = store_->book2D("ElecMuLogger", "Logged ElecMu Events" , 8, 0., 8., 10, 0., 10.);
240 
241  // set bin labels for trigger monitoring
242  loggerBinLabels(std::string("diMuonLogger_"));
243  loggerBinLabels(std::string("diElecLogger_"));
244  loggerBinLabels(std::string("elecMuLogger_"));
245  return;
246  }
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:519
void loggerBinLabels(std::string hist)
set labels for event logging histograms
std::map< std::string, MonitorElement * > hists_
histogram container
std::vector< std::string > elecMuPaths_
std::vector< std::string > diMuonPaths_
trigger paths for di muon channel
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:647
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
bool TopDiLeptonOffline::MonitorEnsemble::booked ( const std::string  histName) const
inlineprivate

check if histogram was booked

Definition at line 78 of file TopDiLeptonOfflineDQM.h.

References hists_.

Referenced by fill().

78 { return hists_.find(histName.c_str())!=hists_.end(); };
std::map< std::string, MonitorElement * > hists_
histogram container
MonitorEnsemble::DecayChannel MonitorEnsemble::decayChannel ( const std::vector< const reco::Muon * > &  muons,
const std::vector< const reco::GsfElectron * > &  elecs 
) const
inlineprivate

determine dileptonic decay channel

Definition at line 187 of file TopDiLeptonOfflineDQM.h.

References DIELEC, DIMUON, ELECMU, and NONE.

Referenced by fill().

void MonitorEnsemble::fill ( const edm::Event event,
const edm::EventSetup setup 
)

fill monitor histograms with electronId and jetCorrections

Definition at line 249 of file TopDiLeptonOfflineDQM.cc.

References DeDxDiscriminatorTools::charge(), decayChannel(), reco::deltaPhi(), reco::deltaR(), DIELEC, diElecLogged_, DIMUON, diMuonLogged_, diMuonPaths_, elecIso_, ELECMU, elecMuLogged_, elecMuPaths_, elecs_, elecSelect_, electronId_, reco::LeafCandidate::et(), eta(), edm::EventAuxiliary::event(), edm::Event::eventAuxiliary(), edm::EventSetup::find(), edm::Event::getByLabel(), JetCorrector::getJetCorrector(), hists_, metsig::jet, jetCorrector_, jetIDLabel_, jetIDSelect_, analyzePatCleaning_cfg::jets, jets_, jetSelect_, edm::InputTag::label(), lowerEdge_, edm::EventAuxiliary::luminosityBlock(), CaloMET_cfi::met, mets_, VarParsing::mult, metsig::muon, muonIso_, ExpressReco_HICollisions_FallBack::muons, muons_, muonSelect_, muon::overlap(), phi, reco::LeafCandidate::pt(), ExpressReco_HICollisions_FallBack::pt, edm::EventAuxiliary::run(), reco::Jet::scaleEnergy(), runTheMatrix::sel, triggerTable_, and upperEdge_.

Referenced by fill().

250  {
251  // fetch trigger event if configured such
253  if(!triggerTable_.label().empty()) {
254  if( !event.getByLabel(triggerTable_, triggerTable) ) return;
255  }
256 
257  /*
258  ------------------------------------------------------------
259 
260  Muon Selection
261 
262  ------------------------------------------------------------
263  */
264 
265  // buffer isolated muons
266  std::vector<const reco::Muon*> isoMuons;
267 
269  if( !event.getByLabel(muons_, muons) ) return;
270 
271  for(edm::View<reco::Muon>::const_iterator muon=muons->begin(); muon!=muons->end(); ++muon){
272  // restrict to globalMuons
273  if( muon->isGlobalMuon() ){
274  fill("muonDelZ_" , muon->globalTrack()->vz());
275  fill("muonDelXY_", muon->globalTrack()->vx(), muon->globalTrack()->vy());
276  // apply preselection
277  if(!muonSelect_ || (*muonSelect_)(*muon)){
278  double isolationTrk = muon->pt()/(muon->pt()+muon->isolationR03().sumPt);
279  double isolationCal = muon->pt()/(muon->pt()+muon->isolationR03().emEt+muon->isolationR03().hadEt);
280  double isolationRel = (muon->isolationR03().sumPt+muon->isolationR03().emEt+muon->isolationR03().hadEt)/muon->pt();
281  fill("muonTrkIso_" , isolationTrk); fill("muonCalIso_" , isolationCal); fill("muonRelIso_" , isolationRel);
282  if(!muonIso_ || (*muonIso_)(*muon)) isoMuons.push_back(&(*muon));
283  }
284  }
285  }
286  fill("muonMultIso_", isoMuons.size());
287 
288  /*
289  ------------------------------------------------------------
290 
291  Electron Selection
292 
293  ------------------------------------------------------------
294  */
295 
296  // buffer isolated electronss
297  std::vector<const reco::GsfElectron*> isoElecs;
298  edm::Handle<edm::ValueMap<float> > electronId;
299  if(!electronId_.label().empty()) {
300  if( !event.getByLabel(electronId_, electronId) ) return;
301  }
302 
304  if( !event.getByLabel(elecs_, elecs) ) return;
305 
306  for(edm::View<reco::GsfElectron>::const_iterator elec=elecs->begin(); elec!=elecs->end(); ++elec){
307  // restrict to electrons with good electronId
308  int idx = elec-elecs->begin();
309  if( electronId_.label().empty() ? true : (*electronId)[elecs->refAt(idx)]>0.99 ){
310  // apply preselection
311  if(!elecSelect_ || (*elecSelect_)(*elec)){
312  double isolationTrk = elec->pt()/(elec->pt()+elec->dr03TkSumPt());
313  double isolationCal = elec->pt()/(elec->pt()+elec->dr03EcalRecHitSumEt()+elec->dr03HcalTowerSumEt());
314  double isolationRel = (elec->dr03TkSumPt()+elec->dr03EcalRecHitSumEt()+elec->dr03HcalTowerSumEt())/elec->pt();
315  fill("elecTrkIso_" , isolationTrk); fill("elecCalIso_" , isolationCal); fill("elecRelIso_" , isolationRel);
316  if(!elecIso_ || (*elecIso_)(*elec)) isoElecs.push_back(&(*elec));
317  }
318  }
319  }
320  fill("elecMultIso_", isoElecs.size());
321 
322  /*
323  ------------------------------------------------------------
324 
325  Jet Selection
326 
327  ------------------------------------------------------------
328  */
329 
330  const JetCorrector* corrector=0;
331  if(!jetCorrector_.empty()){
332  // check whether a jet correcto is in the event setup or not
333  if(setup.find( edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>() )){
334  corrector = JetCorrector::getJetCorrector(jetCorrector_, setup);
335  }
336  else{
337  edm::LogVerbatim( "TopDiLeptonOfflineDQM" )
338  << "\n"
339  << "------------------------------------------------------------------------------------- \n"
340  << " No JetCorrectionsRecord available from EventSetup: \n"
341  << " - Jets will not be corrected. \n"
342  << " - If you want to change this add the following lines to your cfg file: \n"
343  << " \n"
344  << " ## load jet corrections \n"
345  << " process.load(\"JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff\") \n"
346  << " process.prefer(\"ak5CaloL2L3\") \n"
347  << " \n"
348  << "------------------------------------------------------------------------------------- \n";
349  }
350  }
351 
352  unsigned int mult=0;
353  // buffer leadingJets
354  std::vector<reco::Jet> leadingJets;
356  if( !event.getByLabel(jets_, jets) ) return;
357 
359  if(jetIDSelect_){
360  if( !event.getByLabel(jetIDLabel_, jetID) ) return;
361  }
362 
363  for(edm::View<reco::Jet>::const_iterator jet=jets->begin(); jet!=jets->end(); ++jet){
364  unsigned int idx=jet-jets->begin();
365  if( jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())){
366  if(!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue;
367  }
368  // chekc additional jet selection for calo, pf and bare reco jets
369  if(dynamic_cast<const reco::CaloJet*>(&*jet)){
370  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
371  StringCutObjectSelector<reco::CaloJet> jetSelect(jetSelect_); if(!jetSelect(sel)){ continue;}
372  }
373  else if(dynamic_cast<const reco::PFJet*>(&*jet)){
374  reco::PFJet sel= dynamic_cast<const reco::PFJet&>(*jet); sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
375  StringCutObjectSelector<reco::PFJet> jetSelect(jetSelect_); if(!jetSelect(sel)) continue;
376  }
377  else{
378  reco::Jet sel = *jet; sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
379  StringCutObjectSelector<reco::Jet> jetSelect(jetSelect_); if(!jetSelect(sel)) continue;
380  }
381  // check for overlaps
382  bool overlap=false;
383  for(std::vector<const reco::GsfElectron*>::const_iterator elec=isoElecs.begin(); elec!=isoElecs.end(); ++elec){
384  if(reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), jet->phi())<0.4){overlap=true; break;}
385  } if(overlap){continue;}
386  // prepare jet to fill monitor histograms
387  reco::Jet monitorJet=*jet; monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
388  ++mult; // determine jet multiplicity
389  if(idx==0) {
390  leadingJets.push_back(monitorJet);
391  fill("jet1Pt_" , monitorJet.pt());
392  fill("jet1PtRaw_" , jet->pt() );
393  fill("jet1Eta_" , jet->eta());
394  }
395  if(idx==1) {
396  leadingJets.push_back(monitorJet);
397  fill("jet2Pt_" , monitorJet.pt());
398  fill("jet2PtRaw_" , jet->pt() );
399  fill("jet2Eta_" , jet->eta());
400  }
401  }
402  if(leadingJets.size()>1){
403  fill("dEtaJet1Jet2_" , leadingJets[0].eta()-leadingJets[1].eta());
404  fill("dPhiJet1Jet2_" , reco::deltaPhi(leadingJets[0].phi(), leadingJets[1].phi()));
405  if( !isoMuons.empty() ){
406  if( isoElecs.empty() || isoMuons[0]->pt()>isoElecs[0]->pt() ){
407  fill("dEtaJet1Lep1_" , isoMuons[0]->eta()-leadingJets[0].eta());
408  fill("dPhiJet1Lep1_" , reco::deltaPhi(isoMuons[0]->phi() , leadingJets[0].phi()));
409  }
410  }
411  if( !isoElecs.empty() ){
412  if( isoMuons.empty() || isoElecs[0]->pt()>isoMuons[0]->pt() ){
413  fill("dEtaJet1Lep1_" , isoElecs[0]->eta()-leadingJets[0].eta());
414  fill("dPhiJet1Lep1_" , reco::deltaPhi(isoElecs[0]->phi() , leadingJets[0].phi()));
415  }
416  }
417  }
418  fill("jetMult_", mult);
419 
420  /*
421  ------------------------------------------------------------
422 
423  MET Selection
424 
425  ------------------------------------------------------------
426  */
427 
428  // buffer for event logging
429  reco::MET caloMET;
430  for(std::vector<edm::InputTag>::const_iterator met_=mets_.begin(); met_!=mets_.end(); ++met_){
431 
433  if( !event.getByLabel(*met_, met) ) continue;
434 
435  if(met->begin()!=met->end()){
436  unsigned int idx=met_-mets_.begin();
437  if(idx==0){
438  caloMET=*met->begin();
439  fill("metCalo_", met->begin()->et());
440  if(!leadingJets.empty()){
441  fill("dEtaJet1MET_" , leadingJets[0].eta()-met->begin()->eta());
442  fill("dPhiJet1MET_" , reco::deltaPhi(leadingJets[0].phi(), met->begin()->phi()));
443  }
444  if( !isoMuons.empty() ){
445  if( isoElecs.empty() || isoMuons[0]->pt()>isoElecs[0]->pt() ){
446  fill("dEtaLep1MET_" , isoMuons[0]->eta()-met->begin()->eta());
447  fill("dPhiLep1MET_" , reco::deltaPhi(isoMuons[0]->phi(), met->begin()->phi()));
448  }
449  }
450  if( !isoElecs.empty() ){
451  if( isoMuons.empty() || isoElecs[0]->pt()>isoMuons[0]->pt() ){
452  fill("dEtaLep1MET_" , isoElecs[0]->eta()-met->begin()->eta());
453  fill("dPhiLep1MET_" , reco::deltaPhi(isoElecs[0]->phi(), met->begin()->phi()));
454  }
455  }
456  }
457  if(idx==1){ fill("metTC_" , met->begin()->et());}
458  if(idx==2){ fill("metPflow_", met->begin()->et());}
459  }
460  }
461 
462 
463  /*
464  ------------------------------------------------------------
465 
466  Event Monitoring
467 
468  ------------------------------------------------------------
469  */
470 
471  // check number of isolated leptons
472  fill("lepMultIso_", isoMuons.size(), isoElecs.size());
473  // ELECMU channel
474  if( decayChannel(isoMuons, isoElecs) == ELECMU ){
475  fill("decayChannel_", 0.5);
476  double mass = (isoElecs[0]->p4()+isoMuons[0]->p4()).mass();
477  if( (lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<mass && mass<upperEdge_) ){
478  fill("dEtaL1L2_" , isoElecs[0]->eta()-isoMuons[0]->eta());
479  fill("sumEtaL1L2_", (isoElecs[0]->eta()+isoMuons[0]->eta())/2);
480  fill("dPhiL1L2_" , reco::deltaPhi(isoElecs[0]->phi(), isoMuons[0]->eta()));
481  fill("elecPt_", isoElecs[0]->pt()); fill("muonPt_", isoMuons[0]->pt());
482  fill("lep1Pt_", isoElecs[0]->pt()>isoMuons[0]->pt() ? isoElecs[0]->pt() : isoMuons[0]->pt());
483  fill("lep2Pt_", isoElecs[0]->pt()>isoMuons[0]->pt() ? isoMuons[0]->pt() : isoElecs[0]->pt());
484  // fill plots for trigger monitoring
485  if(!triggerTable_.label().empty()) fill(event, *triggerTable, "elecMu", elecMuPaths_);
486  if(elecMuLogged_<=hists_.find("elecMuLogger_")->second->getNbinsY()){
487  // log runnumber, lumi block, event number & some
488  // more pysics infomation for interesting events
489  fill("elecMuLogger_", 0.5, elecMuLogged_+0.5, event.eventAuxiliary().run());
490  fill("elecMuLogger_", 1.5, elecMuLogged_+0.5, event.eventAuxiliary().luminosityBlock());
491  fill("elecMuLogger_", 2.5, elecMuLogged_+0.5, event.eventAuxiliary().event());
492  fill("elecMuLogger_", 3.5, elecMuLogged_+0.5, isoMuons[0]->pt());
493  fill("elecMuLogger_", 4.5, elecMuLogged_+0.5, isoElecs[0]->pt());
494  if(leadingJets.size()>0) fill("elecMuLogger_", 5.5, elecMuLogged_+0.5, leadingJets[0].pt());
495  if(leadingJets.size()>1) fill("elecMuLogger_", 6.5, elecMuLogged_+0.5, leadingJets[1].pt());
496  fill("elecMuLogger_", 7.5, elecMuLogged_+0.5, caloMET.et());
497  ++elecMuLogged_;
498  }
499  }
500  }
501 
502  // DIMUON channel
503  if( decayChannel(isoMuons, isoElecs) == DIMUON ){
504  fill("decayChannel_", 1.5);
505  int charge = isoMuons[0]->charge()*isoMuons[1]->charge();
506  double mass = (isoMuons[0]->p4()+isoMuons[1]->p4()).mass();
507  fill(charge<0 ? "invMass_" : "invMassWC_" , mass );
508  fill(charge<0 ? "invMassLog_" : "invMassWCLog_" , log10(mass));
509  if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<mass && mass<upperEdge_) ){
510  fill("dEtaL1L2" , isoMuons[0]->eta()-isoMuons[1]->eta() );
511  fill("sumEtaL1L2", (isoMuons[0]->eta()+isoMuons[1]->eta())/2);
512  fill("dPhiL1L2" , reco::deltaPhi(isoMuons[0]->phi(),isoMuons[1]->phi()) );
513  fill("muonPt_", isoMuons[0]->pt()); fill("muonPt_", isoMuons[1]->pt());
514  fill("lep1Pt_", isoMuons[0]->pt()); fill("lep2Pt_", isoMuons[1]->pt());
515  // fill plots for trigger monitoring
516  if(!triggerTable_.label().empty()) fill(event, *triggerTable, "diMuon", diMuonPaths_);
517  if(diMuonLogged_<=hists_.find("diMuonLogger_")->second->getNbinsY()){
518  // log runnumber, lumi block, event number & some
519  // more pysics infomation for interesting events
520  fill("diMuonLogger_", 0.5, diMuonLogged_+0.5, event.eventAuxiliary().run());
521  fill("diMuonLogger_", 1.5, diMuonLogged_+0.5, event.eventAuxiliary().luminosityBlock());
522  fill("diMuonLogger_", 2.5, diMuonLogged_+0.5, event.eventAuxiliary().event());
523  fill("diMuonLogger_", 3.5, diMuonLogged_+0.5, isoMuons[0]->pt());
524  fill("diMuonLogger_", 4.5, diMuonLogged_+0.5, isoMuons[1]->pt());
525  if(leadingJets.size()>0) fill("diMuonLogger_", 5.5, diMuonLogged_+0.5, leadingJets[0].pt());
526  if(leadingJets.size()>1) fill("diMuonLogger_", 6.5, diMuonLogged_+0.5, leadingJets[1].pt());
527  fill("diMuonLogger_", 7.5, diMuonLogged_+0.5, caloMET.et());
528  ++diMuonLogged_;
529  }
530  }
531  }
532 
533  // DIELEC channel
534  if( decayChannel(isoMuons, isoElecs) == DIELEC ){
535  int charge = isoElecs[0]->charge()*isoElecs[1]->charge();
536  double mass = (isoElecs[0]->p4()+isoElecs[1]->p4()).mass();
537  fill("decayChannel_", 2.5);
538  fill(charge<0 ? "invMass_" : "invMassWC_" , mass );
539  fill(charge<0 ? "invMassLog_" : "invMassWCLog_" , log10(mass));
540  if((lowerEdge_==-1. && upperEdge_==-1.) || (lowerEdge_<mass && mass<upperEdge_) ){
541  fill("dEtaL1L2" , isoElecs[0]->eta()-isoElecs[1]->eta() );
542  fill("sumEtaL1L2", (isoElecs[0]->eta()+isoElecs[1]->eta())/2);
543  fill("dPhiL1L2" , reco::deltaPhi(isoElecs[0]->phi(),isoElecs[1]->phi()) );
544  fill("elecPt_", isoElecs[0]->pt()); fill("elecPt_", isoElecs[1]->pt());
545  fill("lep1Pt_", isoElecs[0]->pt()); fill("lep2Pt_", isoElecs[1]->pt());
546  if(diElecLogged_<=hists_.find("diElecLogger_")->second->getNbinsY()){
547  // log runnumber, lumi block, event number & some
548  // more pysics infomation for interesting events
549  fill("diElecLogger_", 0.5, diElecLogged_+0.5, event.eventAuxiliary().run());
550  fill("diElecLogger_", 1.5, diElecLogged_+0.5, event.eventAuxiliary().luminosityBlock());
551  fill("diElecLogger_", 2.5, diElecLogged_+0.5, event.eventAuxiliary().event());
552  fill("diElecLogger_", 3.5, diElecLogged_+0.5, isoElecs[0]->pt());
553  fill("diElecLogger_", 4.5, diElecLogged_+0.5, isoElecs[1]->pt());
554  if(leadingJets.size()>0) fill("diElecLogger_", 5.5, diElecLogged_+0.5, leadingJets[0].pt());
555  if(leadingJets.size()>1) fill("diElecLogger_", 6.5, diElecLogged_+0.5, leadingJets[1].pt());
556  fill("diElecLogger_", 7.5, diElecLogged_+0.5, caloMET.et());
557  ++diElecLogged_;
558  }
559  }
560  }
561  }
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
Jets made from CaloTowers.
Definition: CaloJet.h:30
virtual double et() const
transverse energy
edm::InputTag elecs_
input sources for monitoring
Base class for all types of Jets.
Definition: Jet.h:21
DecayChannel decayChannel(const std::vector< const reco::Muon * > &muons, const std::vector< const reco::GsfElectron * > &elecs) const
determine dileptonic decay channel
RunNumber_t run() const
virtual void scaleEnergy(double fScale)
scale energy of the jet
Definition: Jet.cc:386
double charge(const std::vector< uint8_t > &Ampls)
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
T eta() const
Jets made from PFObjects.
Definition: PFJet.h:22
LuminosityBlockNumber_t luminosityBlock() const
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:82
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
edm::InputTag triggerTable_
trigger table
std::map< std::string, MonitorElement * > hists_
histogram container
StringCutObjectSelector< reco::Muon > * muonSelect_
extra selection on muons
Definition: MET.h:32
double lowerEdge_
mass window upper and lower edge
std::vector< std::string > elecMuPaths_
std::vector< edm::InputTag > mets_
considers a vector of METs
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
edm::InputTag jetIDLabel_
jetID as an extra selection type
StringCutObjectSelector< reco::Muon > * muonIso_
extra isolation criterion on muon
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:12
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:55
int elecMuLogged_
number of logged interesting events
std::vector< std::string > diMuonPaths_
trigger paths for di muon channel
virtual double pt() const
transverse momentum
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:40
std::string const & label() const
Definition: InputTag.h:25
StringCutObjectSelector< reco::JetID > * jetIDSelect_
extra jetID selection on calo jets
StringCutObjectSelector< reco::GsfElectron > * elecSelect_
extra selection on electrons
StringCutObjectSelector< reco::GsfElectron > * elecIso_
extra isolation criterion on electron
EventNumber_t event() const
Definition: DDAxes.h:10
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 173 of file TopDiLeptonOfflineDQM.h.

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

174  {
175  for(unsigned int idx=0; idx<labels.size(); ++idx){
176  if( accept(event, triggerTable, monitorPath(labels[idx])) ){
177  fill((channel+"Mon_").c_str(), idx+0.5 );
178  // take care to fill triggerMon_ before evts is being called
179  int evts = hists_.find((channel+"Mon_").c_str())->second->getBinContent(idx+1);
180  double value = hists_.find((channel+"Eff_").c_str())->second->getBinContent(idx+1);
181  fill((channel+"Eff_").c_str(), idx+0.5, 1./evts*(accept(event, triggerTable, selectionPath(labels[idx]))-value));
182  }
183  }
184  }
std::string selectionPath(const std::string &label) const
std::string monitorPath(const std::string &label) const
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:21
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
std::map< std::string, MonitorElement * > hists_
histogram container
tuple labels
Definition: L1TDQM_cfg.py:62
void TopDiLeptonOffline::MonitorEnsemble::fill ( const std::string  histName,
double  value 
) const
inlineprivate

fill histogram if it had been booked before

Definition at line 80 of file TopDiLeptonOfflineDQM.h.

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

80 { 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 TopDiLeptonOffline::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 82 of file TopDiLeptonOfflineDQM.h.

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

82 { 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 TopDiLeptonOffline::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 84 of file TopDiLeptonOfflineDQM.h.

84 { 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
void MonitorEnsemble::loggerBinLabels ( std::string  hist)
inlineprivate

set labels for event logging histograms

Definition at line 137 of file TopDiLeptonOfflineDQM.h.

References hists_.

Referenced by book().

138  {
139  // set axes titles for selected events
140  hists_[hist.c_str()]->getTH1()->SetOption("TEXT");
141  hists_[hist.c_str()]->setBinLabel( 1 , "Run" , 1);
142  hists_[hist.c_str()]->setBinLabel( 2 , "Block" , 1);
143  hists_[hist.c_str()]->setBinLabel( 3 , "Event" , 1);
144  hists_[hist.c_str()]->setBinLabel( 6 , "pt_{L2L3}(jet1)" , 1);
145  hists_[hist.c_str()]->setBinLabel( 7 , "pt_{L2L3}(jet2)" , 1);
146  hists_[hist.c_str()]->setBinLabel( 8 , "MET_{Calo}" , 1);
147  hists_[hist.c_str()]->setAxisTitle("logged evts" , 2);
148 
149  if(hist=="diMuonLogger_"){
150  hists_[hist.c_str()]->setBinLabel( 4 , "pt(muon)" , 1);
151  hists_[hist.c_str()]->setBinLabel( 5 , "pt(muon)" , 1);
152  }
153  if(hist=="diElecLogger_"){
154  hists_[hist.c_str()]->setBinLabel( 4 , "pt(elec)" , 1);
155  hists_[hist.c_str()]->setBinLabel( 5 , "pt(elec)" , 1);
156  }
157  if(hist=="elecMuLogger_"){
158  hists_[hist.c_str()]->setBinLabel( 4 , "pt(elec)" , 1);
159  hists_[hist.c_str()]->setBinLabel( 5 , "pt(muon)" , 1);
160  }
161  }
std::map< std::string, MonitorElement * > hists_
histogram container
std::string TopDiLeptonOffline::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 63 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and triggerBinLabels().

63 { return label.substr(label.find(':')+1); };
const std::string & label
Definition: MVAComputer.cc:186
std::string TopDiLeptonOffline::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 66 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and triggerBinLabels().

66 { return label.substr(0, label.find(':')); };
const std::string & label
Definition: MVAComputer.cc:186
void MonitorEnsemble::triggerBinLabels ( std::string  channel,
const std::vector< std::string >  labels 
)
inlineprivate

set configurable labels for trigger monitoring histograms

Definition at line 164 of file TopDiLeptonOfflineDQM.h.

References hists_, monitorPath(), and selectionPath().

Referenced by book().

165  {
166  for(unsigned int idx=0; idx<labels.size(); ++idx){
167  hists_[(channel+"Mon_").c_str()]->setBinLabel( idx+1, "["+monitorPath(labels[idx])+"]", 1);
168  hists_[(channel+"Eff_").c_str()]->setBinLabel( idx+1, "["+selectionPath(labels[idx])+"]|["+monitorPath(labels[idx])+"]", 1);
169  }
170  }
std::string selectionPath(const std::string &label) const
std::string monitorPath(const std::string &label) const
std::map< std::string, MonitorElement * > hists_
histogram container
tuple labels
Definition: L1TDQM_cfg.py:62

Member Data Documentation

int TopDiLeptonOffline::MonitorEnsemble::diElecLogged_
private

Definition at line 129 of file TopDiLeptonOfflineDQM.h.

Referenced by fill().

int TopDiLeptonOffline::MonitorEnsemble::diMuonLogged_
private

Definition at line 129 of file TopDiLeptonOfflineDQM.h.

Referenced by fill().

std::vector<std::string> TopDiLeptonOffline::MonitorEnsemble::diMuonPaths_
private

trigger paths for di muon channel

Definition at line 102 of file TopDiLeptonOfflineDQM.h.

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

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

extra isolation criterion on electron

Definition at line 107 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

int TopDiLeptonOffline::MonitorEnsemble::elecMuLogged_
private

number of logged interesting events

Definition at line 129 of file TopDiLeptonOfflineDQM.h.

Referenced by fill().

std::vector<std::string> TopDiLeptonOffline::MonitorEnsemble::elecMuPaths_
private

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

Definition at line 100 of file TopDiLeptonOfflineDQM.h.

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

edm::InputTag TopDiLeptonOffline::MonitorEnsemble::elecs_
private

input sources for monitoring

Definition at line 92 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

extra selection on electrons

Definition at line 109 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::InputTag TopDiLeptonOffline::MonitorEnsemble::electronId_
private

electronId

Definition at line 105 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

histogram container

Definition at line 133 of file TopDiLeptonOfflineDQM.h.

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

std::string TopDiLeptonOffline::MonitorEnsemble::jetCorrector_
private

jetCorrector

Definition at line 117 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::InputTag TopDiLeptonOffline::MonitorEnsemble::jetIDLabel_
private

jetID as an extra selection type

Definition at line 119 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

extra jetID selection on calo jets

Definition at line 121 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::InputTag TopDiLeptonOffline::MonitorEnsemble::jets_
private

Definition at line 92 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string TopDiLeptonOffline::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 124 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::string TopDiLeptonOffline::MonitorEnsemble::label_
private
double TopDiLeptonOffline::MonitorEnsemble::lowerEdge_
private

mass window upper and lower edge

Definition at line 126 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

std::vector<edm::InputTag> TopDiLeptonOffline::MonitorEnsemble::mets_
private

considers a vector of METs

Definition at line 94 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

extra isolation criterion on muon

Definition at line 112 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

edm::InputTag TopDiLeptonOffline::MonitorEnsemble::muons_
private

Definition at line 92 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

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

extra selection on muons

Definition at line 114 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

DQMStore* TopDiLeptonOffline::MonitorEnsemble::store_
private

storage manager

Definition at line 131 of file TopDiLeptonOfflineDQM.h.

Referenced by book().

edm::InputTag TopDiLeptonOffline::MonitorEnsemble::triggerTable_
private

trigger table

Definition at line 97 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

double TopDiLeptonOffline::MonitorEnsemble::upperEdge_
private

Definition at line 126 of file TopDiLeptonOfflineDQM.h.

Referenced by fill(), and MonitorEnsemble().

Level TopDiLeptonOffline::MonitorEnsemble::verbosity_
private

verbosity level for booking

Definition at line 84 of file TopDiLeptonOfflineDQM.h.

Referenced by book(), and MonitorEnsemble().