CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
JetMETHLTOfflineSource Class Reference

#include <JetMETHLTOfflineSource.h>

Inheritance diagram for JetMETHLTOfflineSource:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Classes

class  PathInfo
 
class  PathInfoCollection
 

Public Member Functions

 JetMETHLTOfflineSource (const edm::ParameterSet &)
 
 ~JetMETHLTOfflineSource () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &run, edm::EventSetup const &c) override
 
void dqmBeginRun (edm::Run const &run, edm::EventSetup const &c) override
 
virtual void fillMEforEffAllTrigger (const edm::Event &iEvent, const edm::EventSetup &)
 
virtual void fillMEforMonAllTrigger (const edm::Event &iEvent, const edm::EventSetup &)
 
virtual void fillMEforMonTriggerSummary (const edm::Event &iEvent, const edm::EventSetup &)
 
virtual void fillMEforTriggerNTfired ()
 
const std::string getL1ConditionModuleName (const std::string &pathname)
 
virtual bool isBarrel (double eta)
 
virtual bool isEndCap (double eta)
 
virtual bool isForward (double eta)
 
virtual bool isHLTPathAccepted (std::string pathName)
 
virtual bool isTriggerObjectFound (std::string objectName)
 
virtual double TriggerPosition (std::string trigName)
 
virtual bool validPathHLT (std::string path)
 

Private Attributes

double _fEMF
 
double _feta
 
double _fHPD
 
double _max_CEMF
 
double _max_CHEF
 
double _max_NEMF
 
double _max_NHEF
 
double _min_CEMF
 
double _min_CHEF
 
double _min_NEMF
 
double _min_NHEF
 
double _n90Hits
 
double _pfMHT
 
reco::CaloJetCollection calojet
 
edm::Handle< reco::CaloJetCollectioncalojetColl_
 
edm::EDGetTokenT< reco::JetCorrectorCaloJetCorToken_
 
double CaloJetEMF [2]
 
double CaloJetEta [2]
 
double CaloJetfHPD [2]
 
double CaloJetn90 [2]
 
double CaloJetPhi [2]
 
double CaloJetPt [2]
 
double CaloJetPx [2]
 
double CaloJetPy [2]
 
edm::EDGetTokenT< reco::CaloJetCollectioncaloJetsToken
 
edm::Handle< reco::CaloMETCollectioncalometColl_
 
edm::EDGetTokenT< reco::CaloMETCollectioncaloMetToken
 
MonitorElementcorrelation_All
 
MonitorElementcorrelation_AllWrtMB
 
MonitorElementcorrelation_AllWrtMu
 
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
 
std::string dirname_
 
HLTConfigProvider hltConfig_
 
PathInfoCollection hltPathsAll_
 
PathInfoCollection hltPathsAllTriggerSummary_
 
PathInfoCollection hltPathsEff_
 
bool isSetup_
 
reco::helper::JetIDHelperjetID
 
std::vector< std::string > MBTrigPaths_
 
std::vector< std::string > MuonTrigPaths_
 
bool nameForEff_
 
MonitorElementNVertices
 
std::vector< std::string > pathFilter_
 
std::vector< std::string > pathRejectKeyword_
 
reco::PFJetCollection pfjet
 
double PFJetCEMF [2]
 
double PFJetCHEF [2]
 
edm::Handle< reco::PFJetCollectionpfjetColl_
 
edm::EDGetTokenT< reco::JetCorrectorPFJetCorToken_
 
double PFJetEta [2]
 
double PFJetNEMF [2]
 
double PFJetNHEF [2]
 
double PFJetPhi [2]
 
double PFJetPt [2]
 
double PFJetPx [2]
 
double PFJetPy [2]
 
edm::EDGetTokenT< reco::PFJetCollectionpfJetsToken
 
edm::Handle< reco::PFMETCollectionpfmetColl_
 
edm::EDGetTokenT< reco::PFMETCollectionpfMetToken
 
double pfMHTx_All
 
double pfMHTy_All
 
bool plotAll_
 
bool plotEff_
 
std::vector< int > prescUsed_
 
std::string processname_
 
MonitorElementPVZ
 
MonitorElementrate_All
 
MonitorElementrate_AllWrtMB
 
MonitorElementrate_AllWrtMu
 
bool runStandalone_
 
edm::TriggerNames triggerNames_
 
edm::Handle< trigger::TriggerEventtriggerObj_
 
edm::Handle< edm::TriggerResultstriggerResults_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResultsFUToken
 
edm::InputTag triggerResultsLabel_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResultsToken
 
edm::EDGetTokenT< trigger::TriggerEventtriggerSummaryFUToken
 
edm::InputTag triggerSummaryLabel_
 
edm::EDGetTokenT< trigger::TriggerEventtriggerSummaryToken
 
bool verbose_
 
edm::EDGetTokenT< reco::VertexCollectionvertexToken
 

Detailed Description

Definition at line 69 of file JetMETHLTOfflineSource.h.

Constructor & Destructor Documentation

JetMETHLTOfflineSource::JetMETHLTOfflineSource ( const edm::ParameterSet iConfig)
explicit

Definition at line 41 of file JetMETHLTOfflineSource.cc.

References _fEMF, _feta, _fHPD, _max_CEMF, _max_CHEF, _max_NEMF, _max_NHEF, _min_CEMF, _min_CHEF, _min_NEMF, _min_NHEF, _n90Hits, CaloJetCorToken_, caloJetsToken, caloMetToken, custompathnamepairs_, dirname_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), edm::InputTag::instance(), jetID, edm::InputTag::label(), LogDebug, MBTrigPaths_, MuonTrigPaths_, nameForEff_, callgraph::path, pathFilter_, pathRejectKeyword_, PFJetCorToken_, pfJetsToken, pfMetToken, plotAll_, plotEff_, processname_, runStandalone_, AlCaHLTBitMon_QueryRunRegistry::string, triggerResultsFUToken, triggerResultsLabel_, triggerResultsToken, triggerSummaryFUToken, triggerSummaryLabel_, triggerSummaryToken, verbose_, and vertexToken.

41  :
42  isSetup_(false)
43 {
44  LogDebug("JetMETHLTOfflineSource") << "constructor....";
45 
46  //
47  dirname_ = iConfig.getUntrackedParameter("dirname",std::string("HLT/JetMET/"));
48  processname_ = iConfig.getParameter<std::string>("processname");
49  triggerSummaryLabel_ = iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
50  triggerResultsLabel_ = iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
51  triggerSummaryToken = consumes <trigger::TriggerEvent> (triggerSummaryLabel_);
52  triggerResultsToken = consumes <edm::TriggerResults> (triggerResultsLabel_);
53  triggerSummaryFUToken= consumes <trigger::TriggerEvent> (edm::InputTag(triggerSummaryLabel_.label(),triggerSummaryLabel_.instance(),std::string("FU")));
54  triggerResultsFUToken= consumes <edm::TriggerResults> (edm::InputTag(triggerResultsLabel_.label(),triggerResultsLabel_.instance(),std::string("FU")));
55  //
56  verbose_ = iConfig.getUntrackedParameter< bool >("verbose", false);
57  runStandalone_ = iConfig.getUntrackedParameter< bool >("runStandalone", false);
58  //
59  plotAll_ = iConfig.getUntrackedParameter< bool >("plotAll", true);
60  plotEff_ = iConfig.getUntrackedParameter< bool >("plotEff", true);
61  nameForEff_ = iConfig.getUntrackedParameter< bool >("nameForEff", true);
62  MuonTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMuon");
63  MBTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMB");
64  //CaloJet, CaloMET
65  caloJetsToken = consumes<reco::CaloJetCollection> (iConfig.getParameter<edm::InputTag>("CaloJetCollectionLabel"));
66  caloMetToken = consumes<reco::CaloMETCollection> (iConfig.getParameter<edm::InputTag>("CaloMETCollectionLabel"));
67  //PFJet, PFMET
68  pfJetsToken = consumes<reco::PFJetCollection> (iConfig.getParameter<edm::InputTag>("PFJetCollectionLabel"));
69  pfMetToken = consumes<reco::PFMETCollection> (iConfig.getParameter<edm::InputTag>("PFMETCollectionLabel"));
70  //pfmhtTag_ = iConfig.getParameter<edm::InputTag>("PFMHTCollectionLabel");
71  //Vertex info
72  vertexToken = consumes<reco::VertexCollection> (std::string("offlinePrimaryVertices"));
73  //
74  CaloJetCorToken_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("CaloJetCorLabel"));
75  PFJetCorToken_ = consumes<reco::JetCorrector>(iConfig.getParameter<edm::InputTag>("PFJetCorLabel"));
76  //JetID
77  jetID = new reco::helper::JetIDHelper(iConfig.getParameter<ParameterSet>("JetIDParams"), consumesCollector());
78  _fEMF = iConfig.getUntrackedParameter< double >("fEMF", 0.01);
79  _feta = iConfig.getUntrackedParameter< double >("feta", 2.60);
80  _fHPD = iConfig.getUntrackedParameter< double >("fHPD", 0.98);
81  _n90Hits = iConfig.getUntrackedParameter< double >("n90Hits", 1.0);
82  _min_NHEF = iConfig.getUntrackedParameter< double >("minNHEF",0.);
83  _max_NHEF = iConfig.getUntrackedParameter< double >("maxNHEF",0.99);
84  _min_CHEF = iConfig.getUntrackedParameter< double >("minCHEF",0.);
85  _max_CHEF = iConfig.getUntrackedParameter< double >("maxCHEF",1.);
86  _min_NEMF = iConfig.getUntrackedParameter< double >("minNEMF",0.);
87  _max_NEMF = iConfig.getUntrackedParameter< double >("maxNEMF",0.99);
88  _min_CEMF = iConfig.getUntrackedParameter< double >("minCEMF",0.);
89  _max_CEMF = iConfig.getUntrackedParameter< double >("maxCEMF",0.99);
90  //Paths
91  pathFilter_ = iConfig.getUntrackedParameter<vector<std::string> >("pathFilter");
92  pathRejectKeyword_ = iConfig.getUntrackedParameter<vector<std::string> >("pathRejectKeyword");
93  std::vector<edm::ParameterSet> paths = iConfig.getParameter<std::vector<edm::ParameterSet> >("pathPairs");
94  for(auto & path : paths) {
95  custompathnamepairs_.push_back(make_pair(
96  path.getParameter<std::string>("pathname"),
97  path.getParameter<std::string>("denompathname")
98  ));
99  }
100 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
edm::EDGetTokenT< reco::VertexCollection > vertexToken
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken
std::vector< std::string > pathFilter_
edm::EDGetTokenT< reco::JetCorrector > CaloJetCorToken_
std::vector< std::string > MBTrigPaths_
std::vector< std::string > pathRejectKeyword_
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken
std::vector< std::string > MuonTrigPaths_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken
reco::helper::JetIDHelper * jetID
std::string const & instance() const
Definition: InputTag.h:37
edm::EDGetTokenT< reco::JetCorrector > PFJetCorToken_
JetMETHLTOfflineSource::~JetMETHLTOfflineSource ( )
override

Definition at line 103 of file JetMETHLTOfflineSource.cc.

References jetID.

104 {
105  //
106  // do anything here that needs to be done at desctruction time
107  // (e.g. close files, deallocate resources etc.)
108  delete jetID;
109 }
reco::helper::JetIDHelper * jetID

Member Function Documentation

void JetMETHLTOfflineSource::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 113 of file JetMETHLTOfflineSource.cc.

References reco::helper::JetIDHelper::calculate(), calojet, calojetColl_, CaloJetCorToken_, CaloJetEMF, CaloJetEta, CaloJetfHPD, CaloJetn90, CaloJetPhi, CaloJetPt, CaloJetPx, CaloJetPy, caloJetsToken, calometColl_, caloMetToken, reco::JetCorrector::correction(), gather_cfg::cout, edm::EventID::event(), reco::helper::JetIDHelper::fHPD(), fillMEforEffAllTrigger(), fillMEforMonAllTrigger(), fillMEforMonTriggerSummary(), fillMEforTriggerNTfired(), edm::Event::getByToken(), mps_fire::i, edm::EventBase::id(), edm::HandleBase::isValid(), jetID, edm::EventBase::luminosityBlock(), reco::helper::JetIDHelper::n90Hits(), pfjet, PFJetCEMF, PFJetCHEF, pfjetColl_, PFJetCorToken_, PFJetEta, PFJetNEMF, PFJetNHEF, PFJetPhi, PFJetPt, PFJetPx, PFJetPy, pfJetsToken, pfmetColl_, pfMetToken, pfMHTx_All, pfMHTy_All, plotAll_, plotEff_, edm::EventID::run(), runStandalone_, Scenarios_cff::scale, edm::Event::triggerNames(), triggerNames_, triggerObj_, triggerResults_, triggerResultsFUToken, triggerResultsToken, triggerSummaryFUToken, triggerSummaryToken, and verbose_.

114 {
115  if (verbose_) {
116  cout << endl;
117  cout << "============================================================" << endl;
118  cout << " New event" << endl << endl;
119  }
120 
121  //---------- triggerResults ----------
123  if(!triggerResults_.isValid()) {
125  if(!triggerResults_.isValid()) {
126  if (verbose_) cout << " triggerResults not valid" << endl;
127  edm::LogInfo("JetMETHLTOfflineSource") << "TriggerResults not found, "
128  "skipping event";
129  return;
130  }
131  }
132  if (verbose_) cout << " done triggerResults" << endl;
133 
134  //---------- triggerResults ----------
136 
137  //---------- triggerSummary ----------
139  if(!triggerObj_.isValid()) {
141  if(!triggerObj_.isValid()) {
142  edm::LogInfo("JetMETHLTOfflineSource") << "TriggerEvent not found, "
143  "skipping event";
144  return;
145  }
146  }
147  if (verbose_) cout << " done triggerSummary" << endl;
148 
149  if (verbose_) {
150  cout << endl;
151  cout << "============================================================" << endl;
152  cout << " Reading in offline objects" << endl << endl;
153  }
154 
155  //------------ Offline Objects -------
157  if(!calojetColl_.isValid()) return;
158  calojet = *calojetColl_;
159  //std::stable_sort( calojet.begin(), calojet.end(), PtSorter() );
160 
161  if (verbose_) cout << " done calo" << endl;
162 
164  if(!pfjetColl_.isValid()) return;
165  pfjet = *pfjetColl_;
166  //std::stable_sort( pfjet.begin(), pfjet.end(), PtSorter() );
167 
168  if (verbose_) cout << " done pf" << endl;
169 
171  if(!calometColl_.isValid()) return;
172 
174  if(!pfmetColl_.isValid()) return;
175 
176  if (verbose_) {
177  cout << endl;
178  cout << "============================================================" << endl;
179  cout << " Read in offline objects" << endl << endl;
180  }
181 
182  //---------- Event counting (DEBUG) ----------
183  if(verbose_ && iEvent.id().event()%10000==0)
184  cout<<"Run = "<<iEvent.id().run()<<", LS = "<<iEvent.luminosityBlock()<<", Event = "<<iEvent.id().event()<<endl;
185 
186  //Define on-the-fly correction Jet
187  for(int i=0; i<2; i++){
188  CaloJetPx[i] = 0.;
189  CaloJetPy[i] = 0.;
190  CaloJetPt[i] = 0.;
191  CaloJetEta[i] = 0.;
192  CaloJetPhi[i] = 0.;
193  CaloJetEMF[i] = 0.;
194  CaloJetfHPD[i] = 0.;
195  CaloJetn90[i] = 0.;
196  PFJetPx[i] = 0.;
197  PFJetPy[i] = 0.;
198  PFJetPt[i] = 0.;
199  PFJetEta[i] = 0.;
200  PFJetPhi[i] = 0.;
201  PFJetNHEF[i] = 0.;
202  PFJetCHEF[i] = 0.;
203  PFJetNEMF[i] = 0.;
204  PFJetCEMF[i] = 0.;
205  }
206 
207  //---------- CaloJet Correction (on-the-fly) ----------
208  edm::Handle<reco::JetCorrector> calocorrector;
209  iEvent.getByToken(CaloJetCorToken_, calocorrector);
210  auto calojet_ = calojet.begin();
211  for(; calojet_ != calojet.end(); ++calojet_){
212  double scale = calocorrector->correction(*calojet_);
213  jetID->calculate(iEvent, iSetup, *calojet_);
214 
215  if(scale*calojet_->pt()>CaloJetPt[0]){
216  CaloJetPt[1] = CaloJetPt[0];
217  CaloJetPx[1] = CaloJetPx[0];
218  CaloJetPy[1] = CaloJetPy[0];
219  CaloJetEta[1] = CaloJetEta[0];
220  CaloJetPhi[1] = CaloJetPhi[0];
221  CaloJetEMF[1] = CaloJetEMF[0];
222  CaloJetfHPD[1] = CaloJetfHPD[0];
223  CaloJetn90[1] = CaloJetn90[0];
224  //
225  CaloJetPt[0] = scale*calojet_->pt();
226  CaloJetPx[0] = scale*calojet_->px();
227  CaloJetPy[0] = scale*calojet_->py();
228  CaloJetEta[0] = calojet_->eta();
229  CaloJetPhi[0] = calojet_->phi();
230  CaloJetEMF[0] = calojet_->emEnergyFraction();
231  CaloJetfHPD[0] = jetID->fHPD();
232  CaloJetn90[0] = jetID->n90Hits();
233  }
234  else if(scale*calojet_->pt()<CaloJetPt[0] && scale*calojet_->pt()>CaloJetPt[1] ){
235  CaloJetPt[1] = scale*calojet_->pt();
236  CaloJetPx[1] = scale*calojet_->px();
237  CaloJetPy[1] = scale*calojet_->py();
238  CaloJetEta[1] = calojet_->eta();
239  CaloJetPhi[1] = calojet_->phi();
240  CaloJetEMF[1] = calojet_->emEnergyFraction();
241  CaloJetfHPD[1] = jetID->fHPD();
242  CaloJetn90[1] = jetID->n90Hits();
243  }
244  else{}
245  }
246 
247  //---------- PFJet Correction (on-the-fly) ----------
248  pfMHTx_All = 0.;
249  pfMHTy_All = 0.;
251  iEvent.getByToken(PFJetCorToken_, pfcorrector);
252  auto pfjet_ = pfjet.begin();
253  for(; pfjet_ != pfjet.end(); ++pfjet_){
254  double scale = pfcorrector->correction(*pfjet_);
255  pfMHTx_All = pfMHTx_All + scale*pfjet_->px();
256  pfMHTy_All = pfMHTy_All + scale*pfjet_->py();
257  if(scale*pfjet_->pt()>PFJetPt[0]){
258  PFJetPt[1] = PFJetPt[0];
259  PFJetPx[1] = PFJetPx[0];
260  PFJetPy[1] = PFJetPy[0];
261  PFJetEta[1] = PFJetEta[0];
262  PFJetPhi[1] = PFJetPhi[0];
263  PFJetNHEF[1] = PFJetNHEF[0];
264  PFJetCHEF[1] = PFJetCHEF[0];
265  PFJetNEMF[1] = PFJetNEMF[0];
266  PFJetCEMF[1] = PFJetCEMF[0];
267  //
268  PFJetPt[0] = scale*pfjet_->pt();
269  PFJetPx[0] = scale*pfjet_->px();
270  PFJetPy[0] = scale*pfjet_->py();
271  PFJetEta[0] = pfjet_->eta();
272  PFJetPhi[0] = pfjet_->phi();
273  PFJetNHEF[0] = pfjet_->neutralHadronEnergyFraction();
274  PFJetCHEF[0] = pfjet_->chargedHadronEnergyFraction();
275  PFJetNEMF[0] = pfjet_->neutralEmEnergyFraction();
276  PFJetCEMF[0] = pfjet_->chargedEmEnergyFraction();
277  }
278  else if(scale*pfjet_->pt()<PFJetPt[0] && scale*pfjet_->pt()>PFJetPt[1] ){
279  PFJetPt[1] = scale*pfjet_->pt();
280  PFJetPx[1] = scale*pfjet_->px();
281  PFJetPy[1] = scale*pfjet_->py();
282  PFJetEta[1] = pfjet_->eta();
283  PFJetPhi[1] = pfjet_->phi();
284  PFJetNHEF[1] = pfjet_->neutralHadronEnergyFraction();
285  PFJetCHEF[1] = pfjet_->chargedHadronEnergyFraction();
286  PFJetNEMF[1] = pfjet_->neutralEmEnergyFraction();
287  PFJetCEMF[1] = pfjet_->chargedEmEnergyFraction();
288  }
289  else{}
290  }
291 
292  if(verbose_){
293  for(int i = 0; i<2; i++){
294  cout<<"CaloJet-0: "<<CaloJetPt[i]<<", Eta = "<<CaloJetEta[i]<<", Phi = "<<CaloJetPhi[i]<<endl;
295  cout<<"fHPD = "<<CaloJetfHPD[0]<<", n90 = "<<CaloJetn90[0]<<endl;
296  }
297  for(int i = 0; i<2; i++){
298  cout<<"PFJet-0: "<<PFJetPt[i]<<", Eta = "<<PFJetEta[i]<<", Phi = "<<PFJetPhi[i]<<endl;
299  }
300  }
301 
302  //---------- RUN ----------
303  fillMEforMonTriggerSummary(iEvent, iSetup);
304  if(plotAll_) fillMEforMonAllTrigger(iEvent, iSetup);
305  if(plotEff_) fillMEforEffAllTrigger(iEvent,iSetup);
307 }
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken
edm::Handle< reco::PFJetCollection > pfjetColl_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
double fHPD() const
Definition: JetIDHelper.h:41
edm::Handle< edm::TriggerResults > triggerResults_
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
double correction(const LorentzVector &fJet) const
get correction using Jet information only
Definition: JetCorrector.h:49
reco::PFJetCollection pfjet
edm::Handle< reco::PFMETCollection > pfmetColl_
void calculate(const edm::Event &event, const edm::EventSetup &setup, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:100
virtual void fillMEforMonAllTrigger(const edm::Event &iEvent, const edm::EventSetup &)
edm::EDGetTokenT< reco::JetCorrector > CaloJetCorToken_
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken
reco::CaloJetCollection calojet
bool isValid() const
Definition: HandleBase.h:74
edm::Handle< reco::CaloJetCollection > calojetColl_
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
virtual void fillMEforMonTriggerSummary(const edm::Event &iEvent, const edm::EventSetup &)
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken
edm::Handle< trigger::TriggerEvent > triggerObj_
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken
edm::EventID id() const
Definition: EventBase.h:60
edm::Handle< reco::CaloMETCollection > calometColl_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken
virtual void fillMEforEffAllTrigger(const edm::Event &iEvent, const edm::EventSetup &)
reco::helper::JetIDHelper * jetID
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:301
edm::EDGetTokenT< reco::JetCorrector > PFJetCorToken_
void JetMETHLTOfflineSource::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  run,
edm::EventSetup const &  c 
)
overrideprivate

Definition at line 1563 of file JetMETHLTOfflineSource.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookFloat(), correlation_All, correlation_AllWrtMB, correlation_AllWrtMu, TrackerOfflineValidation_Dqm_cff::dirName, dirname_, reco::tau::disc::Eta(), MonitorElement::getTH1(), hltPathsAll_, hltPathsAllTriggerSummary_, hltPathsEff_, mps_fire::i, isSetup_, reco::tau::disc::JetPt(), N, pileupCalc::nbins, NVertices, colinearityKinematic::Phi, plotAll_, plotEff_, reco::tau::disc::Pt(), PVZ, rate_All, rate_AllWrtMB, rate_AllWrtMu, HLTConfigProvider::removeVersion(), runStandalone_, MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, fftjetcommon_cfi::title, trigger::TriggerJet, trigger::TriggerMET, trigger::TriggerTET, and findQualityFiles::v.

1564 {
1565 
1566  if(!isSetup_){
1567 
1568  iBooker.setCurrentFolder(dirname_);
1569 
1570  //-----------------------------------------------------------------
1571  //---book trigger summary histos
1572  if(!isSetup_){
1573  std::string foldernm = "/TriggerSummary/";
1574  iBooker.setCurrentFolder(dirname_ + foldernm);
1575 
1576  int TrigBins_ = hltPathsAllTriggerSummary_.size();
1577  double TrigMin_ = -0.5;
1578  double TrigMax_ = hltPathsAllTriggerSummary_.size()-0.5;
1579 
1580  std::string histonm="JetMET_TriggerRate";
1581  std::string histot="JetMET TriggerRate Summary";
1582  rate_All = iBooker.book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
1583 
1584  histonm = "JetMET_TriggerRate_Correlation";
1585  histot = "JetMET TriggerRate Correlation Summary;y&&!x;x&&y";
1586  correlation_All = iBooker.book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
1587 
1588  histonm = "JetMET_NVertices";
1589  histot = "No. of vertices";
1590  NVertices = iBooker.book1D(histonm.c_str(),histot.c_str(),100,0,50);
1591 
1592  histonm = "JetMET_PVZ";
1593  histot = "Primary Vertex Z pos";
1594  PVZ = iBooker.book1D(histonm.c_str(),histot.c_str(),100,-50.,50.);
1595 
1596  if(runStandalone_){
1597  histonm="JetMET_TriggerRate_WrtMuTrigger";
1598  histot="JetMET TriggerRate Summary Wrt Muon Trigger ";
1599  rate_AllWrtMu = iBooker.book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
1600 
1601  histonm="JetMET_TriggerRate_Correlation_WrtMuTrigger";
1602  histot="JetMET TriggerRate Correlation Summary Wrt Muon Trigger;y&&!x;x&&y";
1603  correlation_AllWrtMu = iBooker.book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
1604 
1605  histonm="JetMET_TriggerRate_WrtMBTrigger";
1606  histot="JetMET TriggerRate Summary Wrt MB Trigger";
1607  rate_AllWrtMB = iBooker.book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
1608 
1609  histonm="JetMET_TriggerRate_Correlation_WrtMBTrigger";
1610  histot="JetMET TriggerRate Correlation Wrt MB Trigger;y&&!x;x&&y";
1611  correlation_AllWrtMB = iBooker.book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
1612  }
1613  isSetup_ = true;
1614  }
1615  //---Set bin label
1616 
1617  for(auto & v : hltPathsAllTriggerSummary_){
1618  std::string labelnm("dummy");
1619  labelnm = v.getPath();
1620  int nbins = rate_All->getTH1()->GetNbinsX();
1621  for(int ibin=1; ibin<nbins+1; ibin++){
1622  const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
1623  std::string binLabel_str = string(binLabel);
1624  if(binLabel_str==labelnm)break;
1625  if(binLabel[0]=='\0'){
1626  rate_All->setBinLabel(ibin,labelnm);
1627  correlation_All->setBinLabel(ibin,labelnm,1);
1628  correlation_All->setBinLabel(ibin,labelnm,2);
1629  if(runStandalone_){
1630  rate_AllWrtMu->setBinLabel(ibin,labelnm);
1631  rate_AllWrtMB->setBinLabel(ibin,labelnm);
1632  correlation_AllWrtMu->setBinLabel(ibin,labelnm,1);
1633  correlation_AllWrtMB->setBinLabel(ibin,labelnm,1);
1634  correlation_AllWrtMu->setBinLabel(ibin,labelnm,2);
1635  correlation_AllWrtMB->setBinLabel(ibin,labelnm,2);
1636  }
1637  break;
1638  }
1639  }
1640  }
1641 
1642  // Now define histos for All triggers
1643  if(plotAll_){
1644  //
1645  int Nbins_ = 10;
1646  double Nmin_ = -0.5;
1647  double Nmax_ = 9.5;
1648  //
1649  int Ptbins_ = 100;
1650  if(runStandalone_) Ptbins_ = 1000;
1651  double PtMin_ = 0.;
1652  double PtMax_ = 1000.;
1653  //
1654  int Etabins_ = 50;
1655  if(runStandalone_) Etabins_ = 100;
1656  double EtaMin_ = -5.;
1657  double EtaMax_ = 5.;
1658  //
1659  int Phibins_ = 35;
1660  double PhiMin_ = -3.5;
1661  double PhiMax_ = 3.5;
1662 
1663  int Resbins_ = 30;
1664  double ResMin_ = -1.5;
1665  double ResMax_ = 1.5;
1666  //
1667  std::string dirName = dirname_ + "/MonitorAllTriggers/";
1668  for(auto & v : hltPathsAll_){
1669  //
1670  std::string trgPathName = HLTConfigProvider::removeVersion(v.getPath());
1671  std::string subdirName = dirName + trgPathName;
1672  std::string trigPath = "("+trgPathName+")";
1673  iBooker.setCurrentFolder(subdirName);
1674 
1675  std::string labelname("ME");
1676  std::string histoname(labelname+"");
1677  std::string title(labelname+"");
1678 
1680  dummy = iBooker.bookFloat("dummy");
1681 
1682  if(v.getObjectType() == trigger::TriggerJet && v.getTriggerType() == "SingleJet_Trigger"){
1683 
1684  histoname = labelname+"_recObjN";
1685  title = labelname+"_recObjN;Reco multiplicity()"+trigPath;
1686  MonitorElement * N = iBooker.book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
1687  N->getTH1();
1688 
1689  histoname = labelname+"_recObjPt";
1690  title = labelname+"_recObjPt; Reco Pt[GeV/c]"+trigPath;
1691  MonitorElement * Pt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1692  Pt->getTH1();
1693 
1694  histoname = labelname+"_recObjPtBarrel";
1695  title = labelname+"_recObjPtBarrel;Reco Pt[GeV/c]"+trigPath;
1696  MonitorElement * PtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1697  PtBarrel->getTH1();
1698 
1699  histoname = labelname+"_recObjPtEndcap";
1700  title = labelname+"_recObjPtEndcap;Reco Pt[GeV/c]"+trigPath;
1701  MonitorElement * PtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1702  PtEndcap->getTH1();
1703 
1704  histoname = labelname+"_recObjPtForward";
1705  title = labelname+"_recObjPtForward;Reco Pt[GeV/c]"+trigPath;
1706  MonitorElement * PtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1707  PtForward->getTH1();
1708 
1709  histoname = labelname+"_recObjEta";
1710  title = labelname+"_recObjEta;Reco #eta"+trigPath;
1711  MonitorElement * Eta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1712  Eta->getTH1();
1713 
1714  histoname = labelname+"_recObjPhi";
1715  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
1716  MonitorElement * Phi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1717  Phi->getTH1();
1718 
1719  histoname = labelname+"_recObjEtaPhi";
1720  title = labelname+"_recObjEtaPhi;Reco #eta;Reco #Phi"+trigPath;
1721  MonitorElement * EtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
1722  EtaPhi->getTH1();
1723 
1724  histoname = labelname+"_l1ObjPt";
1725  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
1726  MonitorElement * Pt_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1727  Pt_L1->getTH1();
1728 
1729  histoname = labelname+"_l1ObjEta";
1730  title = labelname+"_l1ObjEta;L1 #eta"+trigPath;
1731  MonitorElement * Eta_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1732  Eta_L1->getTH1();
1733 
1734  histoname = labelname+"_l1ObjPhi";
1735  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
1736  MonitorElement * Phi_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1737  Phi_L1->getTH1();
1738 
1739  histoname = labelname+"_l1ObjEtaPhi";
1740  title = labelname+"_l1ObjEtaPhi;L1 #eta;L1 #Phi"+trigPath;
1741  MonitorElement * EtaPhi_L1 = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
1742  EtaPhi_L1->getTH1();
1743 
1744  histoname = labelname+"_l1ObjN";
1745  title = labelname+"_l1ObjN;L1 multiplicity"+trigPath;
1746  MonitorElement * N_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
1747  N_L1->getTH1();
1748 
1749  histoname = labelname+"_l1ObjPtBarrel";
1750  title = labelname+"_l1ObjPtBarrel;L1 Pt[GeV/c]"+trigPath;
1751  MonitorElement * PtBarrel_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1752  PtBarrel_L1->getTH1();
1753 
1754  histoname = labelname+"_l1ObjPtEndcap";
1755  title = labelname+"_l1ObjPtEndcap;L1 Pt[GeV/c]"+trigPath;
1756  MonitorElement * PtEndcap_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1757  PtEndcap_L1->getTH1();
1758 
1759  histoname = labelname+"_l1ObjPtForward";
1760  title = labelname+"_l1ObjPtForward;L1 Pt[GeV/c]"+trigPath;
1761  MonitorElement * PtForward_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1762  PtForward_L1->getTH1();
1763 
1764  histoname = labelname+"_hltObjN";
1765  title = labelname+"_hltObjN;HLT multiplicity"+trigPath;
1766  MonitorElement * N_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
1767  N_HLT->getTH1();
1768 
1769  histoname = labelname+"_hltObjPtBarrel";
1770  title = labelname+"_hltObjPtBarrel;HLT Pt[GeV/c]"+trigPath;
1771  MonitorElement * PtBarrel_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1772  PtBarrel_HLT->getTH1();
1773 
1774  histoname = labelname+"_hltObjPtEndcap";
1775  title = labelname+"_hltObjPtEndcap;HLT Pt[GeV/c]"+trigPath;
1776  MonitorElement * PtEndcap_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1777  PtEndcap_HLT->getTH1();
1778 
1779  histoname = labelname+"_hltObjPtForward";
1780  title = labelname+"_hltObjPtForward;HLT Pt[GeV/c]"+trigPath;
1781  MonitorElement * PtForward_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1782  PtForward_HLT->getTH1();
1783 
1784  histoname = labelname+"_hltObjPt";
1785  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
1786  MonitorElement * Pt_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1787  Pt_HLT->getTH1();
1788 
1789  histoname = labelname+"_hltObjEta";
1790  title = labelname+"_hltObjEta;HLT #eta"+trigPath;
1791  MonitorElement * Eta_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1792  Eta_HLT->getTH1();
1793 
1794  histoname = labelname+"_hltObjPhi";
1795  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
1796  MonitorElement * Phi_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1797  Phi_HLT->getTH1();
1798 
1799  histoname = labelname+"_hltObjEtaPhi";
1800  title = labelname+"_hltObjEtaPhi;HLT #eta;HLT #Phi"+trigPath;
1801  MonitorElement * EtaPhi_HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
1802  EtaPhi_HLT->getTH1();
1803 
1804  histoname = labelname+"_l1HLTPtResolution";
1805  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
1806  MonitorElement * PtResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1807  PtResolution_L1HLT->getTH1();
1808 
1809  histoname = labelname+"_l1HLTEtaResolution";
1810  title = labelname+"_l1HLTEtaResolution;#eta(L1)-#eta(HLT)"+trigPath;
1811  MonitorElement * EtaResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1812  EtaResolution_L1HLT->getTH1();
1813 
1814  histoname = labelname+"_l1HLTPhiResolution";
1815  title = labelname+"_l1HLTPhiResolution;#Phi(L1)-#Phi(HLT)"+trigPath;
1816  MonitorElement * PhiResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1817  PhiResolution_L1HLT->getTH1();
1818 
1819  histoname = labelname+"_l1HLTPtCorrelation";
1820  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
1821  MonitorElement * PtCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1822  PtCorrelation_L1HLT->getTH1();
1823 
1824  histoname = labelname+"_l1HLTEtaCorrelation";
1825  title = labelname+"_l1HLTEtaCorrelation;#eta(L1);#eta(HLT)"+trigPath;
1826  MonitorElement * EtaCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
1827  EtaCorrelation_L1HLT->getTH1();
1828 
1829  histoname = labelname+"_l1HLTPhiCorrelation";
1830  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
1831  MonitorElement * PhiCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1832  PhiCorrelation_L1HLT->getTH1();
1833 
1834  histoname = labelname+"_hltRecObjPtResolution";
1835  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
1836  MonitorElement * PtResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1837  PtResolution_HLTRecObj->getTH1();
1838 
1839  histoname = labelname+"_hltRecObjEtaResolution";
1840  title = labelname+"_hltRecObjEtaResolution;#eta(HLT)-#eta(Reco)"+trigPath;
1841  MonitorElement * EtaResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1842  EtaResolution_HLTRecObj->getTH1();
1843 
1844  histoname = labelname+"_hltRecObjPhiResolution";
1845  title = labelname+"_hltRecObjPhiResolution;#Phi(HLT)-#Phi(Reco)"+trigPath;
1846  MonitorElement * PhiResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1847  PhiResolution_HLTRecObj->getTH1();
1848 
1849  histoname = labelname+"_hltRecObjPtCorrelation";
1850  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
1851  MonitorElement * PtCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1852  PtCorrelation_HLTRecObj->getTH1();
1853 
1854  histoname = labelname+"_hltRecObjEtaCorrelation";
1855  title = labelname+"_hltRecObjEtaCorrelation;#eta(HLT);#eta(Reco)"+trigPath;
1856  MonitorElement * EtaCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
1857  EtaCorrelation_HLTRecObj->getTH1();
1858 
1859  histoname = labelname+"_hltRecObjPhiCorrelation";
1860  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
1861  MonitorElement * PhiCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1862  PhiCorrelation_HLTRecObj->getTH1();
1863 
1864  v.setHistos(N,
1865  Pt,
1866  PtBarrel,
1867  PtEndcap,
1868  PtForward,
1869  Eta,
1870  Phi,
1871  EtaPhi,
1872  N_L1,
1873  Pt_L1,
1874  PtBarrel_L1,
1875  PtEndcap_L1,
1876  PtForward_L1,
1877  Eta_L1,
1878  Phi_L1,
1879  EtaPhi_L1,
1880  N_HLT,
1881  Pt_HLT,
1882  PtBarrel_HLT,
1883  PtEndcap_HLT,
1884  PtForward_HLT,
1885  Eta_HLT,
1886  Phi_HLT,
1887  EtaPhi_HLT,
1888  PtResolution_L1HLT,
1889  EtaResolution_L1HLT,
1890  PhiResolution_L1HLT,
1891  PtResolution_HLTRecObj,
1892  EtaResolution_HLTRecObj,
1893  PhiResolution_HLTRecObj,
1894  PtCorrelation_L1HLT,
1895  EtaCorrelation_L1HLT,
1896  PhiCorrelation_L1HLT,
1897  PtCorrelation_HLTRecObj,
1898  EtaCorrelation_HLTRecObj,
1899  PhiCorrelation_HLTRecObj,
1900  dummy,
1901  dummy,
1902  dummy,
1903  dummy,
1904  dummy,
1905  dummy,
1906  dummy,
1907  dummy,
1908  dummy
1909  );
1910  }// histos for SingleJet Triggers
1911 
1912  if(v.getObjectType() == trigger::TriggerJet && v.getTriggerType() == "DiJet_Trigger"){
1913 
1914  histoname = labelname+"_RecObjAveragePt";
1915  title = labelname+"_RecObjAveragePt;Reco Average Pt[GeV/c]"+trigPath;
1916  MonitorElement * jetAveragePt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1917  jetAveragePt->getTH1();
1918 
1919  histoname = labelname+"_RecObjAverageEta";
1920  title = labelname+"_RecObjAverageEta;Reco Average #eta"+trigPath;
1921  MonitorElement * jetAverageEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1922  jetAverageEta->getTH1();
1923 
1924  histoname = labelname+"_RecObjPhiDifference";
1925  title = labelname+"_RecObjPhiDifference;Reco #Delta#Phi"+trigPath;
1926  MonitorElement * jetPhiDifference = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1927  jetPhiDifference->getTH1();
1928 
1929  histoname = labelname+"_hltObjAveragePt";
1930  title = labelname+"_hltObjAveragePt;HLT Average Pt[GeV/c]"+trigPath;
1931  MonitorElement * hltAveragePt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1932  hltAveragePt->getTH1();
1933 
1934  histoname = labelname+"_hltObjAverageEta";
1935  title = labelname+"_hltObjAverageEta;HLT Average #eta"+trigPath;
1936  MonitorElement * hltAverageEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1937  hltAverageEta->getTH1();
1938 
1939  histoname = labelname+"_hltObjPhiDifference";
1940  title = labelname+"_hltObjPhiDifference;Reco #Delta#Phi"+trigPath;
1941  MonitorElement * hltPhiDifference = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1942  hltPhiDifference->getTH1();
1943 
1944  v.setHistos(dummy,
1945  dummy,
1946  dummy,
1947  dummy,
1948  dummy,
1949  dummy,
1950  dummy,
1951  dummy,
1952  dummy,
1953  dummy,
1954  dummy,
1955  dummy,
1956  dummy,
1957  dummy,
1958  dummy,
1959  dummy,
1960  dummy,
1961  dummy,
1962  dummy,
1963  dummy,
1964  dummy,
1965  dummy,
1966  dummy,
1967  dummy,
1968  dummy,
1969  dummy,
1970  dummy,
1971  dummy,
1972  dummy,
1973  dummy,
1974  dummy,
1975  dummy,
1976  dummy,
1977  dummy,
1978  dummy,
1979  dummy,
1980  jetAveragePt,
1981  jetAverageEta,
1982  jetPhiDifference,
1983  hltAveragePt,
1984  hltAverageEta,
1985  hltPhiDifference,
1986  dummy,
1987  dummy,
1988  dummy
1989  );
1990  }// histos for DiJet Triggers
1991 
1992  if(v.getObjectType() == trigger::TriggerMET || (v.getObjectType() == trigger::TriggerTET)){
1993 
1994  histoname = labelname+"_recObjPt";
1995  title = labelname+"_recObjPt;Reco Pt[GeV/c]"+trigPath;
1996  MonitorElement * Pt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1997  Pt->getTH1();
1998 
1999  histoname = labelname+"_recObjPhi";
2000  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
2001  MonitorElement * Phi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2002  Phi->getTH1();
2003 
2004  histoname = labelname+"_l1ObjPt";
2005  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
2006  MonitorElement * Pt_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2007  Pt_L1->getTH1();
2008 
2009  histoname = labelname+"_l1ObjPhi";
2010  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
2011  MonitorElement * Phi_L1 = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2012  Phi_L1->getTH1();
2013 
2014  histoname = labelname+"_hltObjPt";
2015  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
2016  MonitorElement * Pt_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2017  Pt_HLT->getTH1();
2018 
2019  histoname = labelname+"_hltObjPhi";
2020  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
2021  MonitorElement * Phi_HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2022  Phi_HLT->getTH1();
2023 
2024  histoname = labelname+"_l1HLTPtResolution";
2025  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
2026  MonitorElement * PtResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2027  PtResolution_L1HLT->getTH1();
2028 
2029  histoname = labelname+"_l1HLTPhiResolution";
2030  title = labelname+"_l1HLTPhiResolution;#Phi(L1)-#Phi(HLT)"+trigPath;
2031  MonitorElement * PhiResolution_L1HLT = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2032  PhiResolution_L1HLT->getTH1();
2033 
2034  histoname = labelname+"_l1HLTPtCorrelation";
2035  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
2036  MonitorElement * PtCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
2037  PtCorrelation_L1HLT->getTH1();
2038 
2039  histoname = labelname+"_l1HLTPhiCorrelation";
2040  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
2041  MonitorElement * PhiCorrelation_L1HLT = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
2042  PhiCorrelation_L1HLT->getTH1();
2043 
2044  histoname = labelname+"_hltRecObjPtResolution";
2045  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
2046  MonitorElement * PtResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2047  PtResolution_HLTRecObj->getTH1();
2048 
2049  histoname = labelname+"_hltRecObjPhiResolution";
2050  title = labelname+"_hltRecObjPhiResolution;#Phi(HLT)-#Phi(Reco)"+trigPath;
2051  MonitorElement * PhiResolution_HLTRecObj = iBooker.book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2052  PhiResolution_HLTRecObj->getTH1();
2053 
2054  histoname = labelname+"_hltRecObjPtCorrelation";
2055  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
2056  MonitorElement * PtCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
2057  PtCorrelation_HLTRecObj->getTH1();
2058 
2059  histoname = labelname+"_hltRecObjPhiCorrelation";
2060  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
2061  MonitorElement * PhiCorrelation_HLTRecObj = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
2062  PhiCorrelation_HLTRecObj->getTH1();
2063 
2064  v.setHistos(dummy,
2065  Pt,
2066  dummy,
2067  dummy,
2068  dummy,
2069  dummy,
2070  Phi,
2071  dummy,
2072  dummy,
2073  Pt_L1,
2074  dummy,
2075  dummy,
2076  dummy,
2077  dummy,
2078  Phi_L1,
2079  dummy,
2080  dummy,
2081  Pt_HLT,
2082  dummy,
2083  dummy,
2084  dummy,
2085  dummy,
2086  Phi_HLT,
2087  dummy,
2088  PtResolution_L1HLT,
2089  dummy,
2090  PhiResolution_L1HLT,
2091  PtResolution_HLTRecObj,
2092  dummy,
2093  PhiResolution_HLTRecObj,
2094  PtCorrelation_L1HLT,
2095  dummy,
2096  PhiCorrelation_L1HLT,
2097  PtCorrelation_HLTRecObj,
2098  dummy,
2099  PhiCorrelation_HLTRecObj,
2100  dummy,
2101  dummy,
2102  dummy,
2103  dummy,
2104  dummy,
2105  dummy,
2106  dummy,
2107  dummy,
2108  dummy
2109  );
2110  }// histos for MET Triggers
2111  }
2112  }//plotAll_
2113 
2114  //-------Now Efficiency histos--------
2115  if(plotEff_){
2116  int Ptbins_ = 100;
2117  if(runStandalone_) Ptbins_ = 1000;
2118  double PtMin_ = 0.;
2119  double PtMax_ = 1000.;
2120  //
2121  int Etabins_ = 50;
2122  double EtaMin_ = -5.;
2123  double EtaMax_ = 5.;
2124  //
2125  int Phibins_ = 35;
2126  double PhiMin_ = -3.5;
2127  double PhiMax_ = 3.5;
2128  // Now define histos wrt lower threshold trigger
2129  std::string dirName1 = dirname_ + "/RelativeTriggerEff/";
2130  for(auto & v : hltPathsEff_){
2131  //
2132  std::string trgPathName = HLTConfigProvider::removeVersion(v.getPath());
2133  std::string trgPathNameD = HLTConfigProvider::removeVersion(v.getDenomPath());
2134  //
2135  std::string labelname("ME") ;
2136  std::string subdirName = dirName1 + trgPathName + "_wrt_" + trgPathNameD;
2137  iBooker.setCurrentFolder(subdirName);
2138  //
2139  std::string histoname(labelname+"");
2140  std::string title(labelname+"");
2141 
2142  MonitorElement *dummy;
2143  dummy = iBooker.bookFloat("dummy");
2144 
2145  if((v.getObjectType() == trigger::TriggerJet) && (v.getTriggerType() == "SingleJet_Trigger")){
2146 
2147  histoname = labelname+"_NumeratorPt";
2148  title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
2149  MonitorElement * NumeratorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2150  NumeratorPt->getTH1();
2151 
2152  histoname = labelname+"_NumeratorPtBarrel";
2153  title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c] ";
2154  MonitorElement * NumeratorPtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2155  NumeratorPtBarrel->getTH1();
2156 
2157  histoname = labelname+"_NumeratorPtEndcap";
2158  title = labelname+"NumeratorPtEndcap;Calo Pt[GeV/c]";
2159  MonitorElement * NumeratorPtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2160  NumeratorPtEndcap->getTH1();
2161 
2162  histoname = labelname+"_NumeratorPtForward";
2163  title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
2164  MonitorElement * NumeratorPtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2165  NumeratorPtForward->getTH1();
2166 
2167  histoname = labelname+"_NumeratorEta";
2168  title = labelname+"NumeratorEta;Calo #eta ";
2169  MonitorElement * NumeratorEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2170  NumeratorEta->getTH1();
2171 
2172  histoname = labelname+"_NumeratorPhi";
2173  title = labelname+"NumeratorPhi;Calo #Phi";
2174  MonitorElement * NumeratorPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2175  NumeratorPhi->getTH1();
2176 
2177  histoname = labelname+"_NumeratorEtaPhi";
2178  title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi";
2179  MonitorElement * NumeratorEtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2180  NumeratorEtaPhi->getTH1();
2181 
2182  histoname = labelname+"_NumeratorEtaBarrel";
2183  title = labelname+"NumeratorEtaBarrel;Calo #eta ";
2184  MonitorElement * NumeratorEtaBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2185  NumeratorEtaBarrel->getTH1();
2186 
2187  histoname = labelname+"_NumeratorPhiBarrel";
2188  title = labelname+"NumeratorPhiBarrel;Calo #Phi";
2189  MonitorElement * NumeratorPhiBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2190  NumeratorPhiBarrel->getTH1();
2191 
2192  histoname = labelname+"_NumeratorEtaEndcap";
2193  title = labelname+"NumeratorEtaEndcap;Calo #eta ";
2194  MonitorElement * NumeratorEtaEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2195  NumeratorEtaEndcap->getTH1();
2196 
2197  histoname = labelname+"_NumeratorPhiEndcap";
2198  title = labelname+"NumeratorPhiEndcap;Calo #Phi";
2199  MonitorElement * NumeratorPhiEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2200  NumeratorPhiEndcap->getTH1();
2201 
2202  histoname = labelname+"_NumeratorEtaForward";
2203  title = labelname+"NumeratorEtaForward;Calo #eta ";
2204  MonitorElement * NumeratorEtaForward = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2205  NumeratorEtaForward->getTH1();
2206 
2207  histoname = labelname+"_NumeratorPhiForward";
2208  title = labelname+"NumeratorPhiForward;Calo #Phi";
2209  MonitorElement * NumeratorPhiForward = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2210  NumeratorPhiForward->getTH1();
2211 
2212  histoname = labelname+"_NumeratorEta_LowpTcut";
2213  title = labelname+"NumeratorEta_LowpTcut;Calo #eta ";
2214  MonitorElement * NumeratorEta_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2215  NumeratorEta_LowpTcut->getTH1();
2216 
2217  histoname = labelname+"_NumeratorPhi_LowpTcut";
2218  title = labelname+"NumeratorPhi_LowpTcut;Calo #Phi";
2219  MonitorElement * NumeratorPhi_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2220  NumeratorPhi_LowpTcut->getTH1();
2221 
2222  histoname = labelname+"_NumeratorEtaPhi_LowpTcut";
2223  title = labelname+"NumeratorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
2224  MonitorElement * NumeratorEtaPhi_LowpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2225  NumeratorEtaPhi_LowpTcut->getTH1();
2226 
2227  histoname = labelname+"_NumeratorEta_MedpTcut";
2228  title = labelname+"NumeratorEta_MedpTcut;Calo #eta ";
2229  MonitorElement * NumeratorEta_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2230  NumeratorEta_MedpTcut->getTH1();
2231 
2232  histoname = labelname+"_NumeratorPhi_MedpTcut";
2233  title = labelname+"NumeratorPhi_MedpTcut;Calo #Phi";
2234  MonitorElement * NumeratorPhi_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2235  NumeratorPhi_MedpTcut->getTH1();
2236 
2237  histoname = labelname+"_NumeratorEtaPhi_MedpTcut";
2238  title = labelname+"NumeratorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
2239  MonitorElement * NumeratorEtaPhi_MedpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2240  NumeratorEtaPhi_MedpTcut->getTH1();
2241 
2242  histoname = labelname+"_NumeratorEta_HighpTcut";
2243  title = labelname+"NumeratorEta_HighpTcut;Calo #eta ";
2244  MonitorElement * NumeratorEta_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2245  NumeratorEta_HighpTcut->getTH1();
2246 
2247  histoname = labelname+"_NumeratorPhi_HighpTcut";
2248  title = labelname+"NumeratorPhi_HighpTcut;Calo #Phi";
2249  MonitorElement * NumeratorPhi_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2250  NumeratorPhi_HighpTcut->getTH1();
2251 
2252  histoname = labelname+"_NumeratorEtaPhi_HighpTcut";
2253  title = labelname+"NumeratorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
2254  MonitorElement * NumeratorEtaPhi_HighpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2255  NumeratorEtaPhi_HighpTcut->getTH1();
2256 
2257  histoname = labelname+"_DenominatorPt";
2258  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
2259  MonitorElement * DenominatorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2260  DenominatorPt->getTH1();
2261 
2262  histoname = labelname+"_DenominatorPtBarrel";
2263  title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
2264  MonitorElement * DenominatorPtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2265  DenominatorPtBarrel->getTH1();
2266 
2267  histoname = labelname+"_DenominatorPtEndcap";
2268  title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
2269  MonitorElement * DenominatorPtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2270  DenominatorPtEndcap->getTH1();
2271 
2272  histoname = labelname+"_DenominatorPtForward";
2273  title = labelname+"DenominatorPtForward;Calo Pt[GeV/c] ";
2274  MonitorElement * DenominatorPtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2275  DenominatorPtForward->getTH1();
2276 
2277  histoname = labelname+"_DenominatorEta";
2278  title = labelname+"DenominatorEta;Calo #eta ";
2279  MonitorElement * DenominatorEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2280  DenominatorEta->getTH1();
2281 
2282  histoname = labelname+"_DenominatorPhi";
2283  title = labelname+"DenominatorPhi;Calo #Phi";
2284  MonitorElement * DenominatorPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2285  DenominatorPhi->getTH1();
2286 
2287  histoname = labelname+"_DenominatorEtaPhi";
2288  title = labelname+"DenominatorEtaPhi;Calo #eta; Calo #Phi";
2289  MonitorElement * DenominatorEtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2290  DenominatorEtaPhi->getTH1();
2291 
2292  histoname = labelname+"_DenominatorEtaBarrel";
2293  title = labelname+"DenominatorEtaBarrel;Calo #eta ";
2294  MonitorElement * DenominatorEtaBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2295  DenominatorEtaBarrel->getTH1();
2296 
2297  histoname = labelname+"_DenominatorPhiBarrel";
2298  title = labelname+"DenominatorPhiBarrel;Calo #Phi";
2299  MonitorElement * DenominatorPhiBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2300  DenominatorPhiBarrel->getTH1();
2301 
2302  histoname = labelname+"_DenominatorEtaEndcap";
2303  title = labelname+"DenominatorEtaEndcap;Calo #eta ";
2304  MonitorElement * DenominatorEtaEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2305  DenominatorEtaEndcap->getTH1();
2306 
2307  histoname = labelname+"_DenominatorPhiEndcap";
2308  title = labelname+"DenominatorPhiEndcap;Calo #Phi";
2309  MonitorElement * DenominatorPhiEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2310  DenominatorPhiEndcap->getTH1();
2311 
2312  histoname = labelname+"_DenominatorEtaForward";
2313  title = labelname+"DenominatorEtaForward;Calo #eta ";
2314  MonitorElement * DenominatorEtaForward = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2315  DenominatorEtaForward->getTH1();
2316 
2317  histoname = labelname+"_DenominatorPhiForward";
2318  title = labelname+"DenominatorPhiForward;Calo #Phi";
2319  MonitorElement * DenominatorPhiForward = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2320  DenominatorPhiForward->getTH1();
2321 
2322  histoname = labelname+"_DenominatorEta_LowpTcut";
2323  title = labelname+"DenominatorEta_LowpTcut;Calo #eta ";
2324  MonitorElement * DenominatorEta_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2325  DenominatorEta_LowpTcut->getTH1();
2326 
2327  histoname = labelname+"_DenominatorPhi_LowpTcut";
2328  title = labelname+"DenominatorPhi_LowpTcut;Calo #Phi";
2329  MonitorElement * DenominatorPhi_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2330  DenominatorPhi_LowpTcut->getTH1();
2331 
2332  histoname = labelname+"_DenominatorEtaPhi_LowpTcut";
2333  title = labelname+"DenominatorEtaPhi_LowpTcut;Calo #eta;Calo #Phi";
2334  MonitorElement * DenominatorEtaPhi_LowpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2335  DenominatorEtaPhi_LowpTcut->getTH1();
2336 
2337  histoname = labelname+"_DenominatorEta_MedpTcut";
2338  title = labelname+"DenominatorEta_MedpTcut;Calo #eta ";
2339  MonitorElement * DenominatorEta_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2340  DenominatorEta_MedpTcut->getTH1();
2341 
2342  histoname = labelname+"_DenominatorPhi_MedpTcut";
2343  title = labelname+"DenominatorPhi_MedpTcut;Calo #Phi";
2344  MonitorElement * DenominatorPhi_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2345  DenominatorPhi_MedpTcut->getTH1();
2346 
2347  histoname = labelname+"_DenominatorEtaPhi_MedpTcut";
2348  title = labelname+"DenominatorEtaPhi_MedpTcut;Calo #eta;Calo #Phi";
2349  MonitorElement * DenominatorEtaPhi_MedpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2350  DenominatorEtaPhi_MedpTcut->getTH1();
2351 
2352  histoname = labelname+"_DenominatorEta_HighpTcut";
2353  title = labelname+"DenominatorEta_HighpTcut;Calo #eta ";
2354  MonitorElement * DenominatorEta_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2355  DenominatorEta_HighpTcut->getTH1();
2356 
2357  histoname = labelname+"_DenominatorPhi_HighpTcut";
2358  title = labelname+"DenominatorPhi_HighpTcut;Calo #Phi";
2359  MonitorElement * DenominatorPhi_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2360  DenominatorPhi_HighpTcut->getTH1();
2361 
2362  histoname = labelname+"_DenominatorEtaPhi_HighpTcut";
2363  title = labelname+"DenominatorEtaPhi_HighpTcut;Calo #eta;Calo #Phi";
2364  MonitorElement * DenominatorEtaPhi_HighpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2365  DenominatorEtaPhi_HighpTcut->getTH1();
2366 
2367  histoname = labelname+"_DeltaR";
2368  title = labelname+"DeltaR;";
2369  MonitorElement * DeltaR = iBooker.book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
2370  DeltaR->getTH1();
2371 
2372  histoname = labelname+"_DeltaPhi";
2373  title = labelname+"DeltaPhi;";
2374  MonitorElement * DeltaPhi = iBooker.book1D(histoname.c_str(),title.c_str(),500,-5.0,5.0);
2375  DeltaPhi->getTH1();
2376 
2377  histoname = labelname+"_NumeratorPFMHT";
2378  title = labelname+"NumeratorPFMHT;PFMHT[GeV/c]";
2379  MonitorElement * NumeratorPFMHT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2380  NumeratorPFMHT->getTH1();
2381 
2382  histoname = labelname+"_NumeratorPFPt";
2383  title = labelname+"NumeratorPFPt;PF Pt[GeV/c]";
2384  MonitorElement * NumeratorPFPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2385  NumeratorPFPt->getTH1();
2386 
2387  histoname = labelname+"_NumeratorPFPtBarrel";
2388  title = labelname+"NumeratorPFPtBarrel;PF Pt[GeV/c] ";
2389  MonitorElement * NumeratorPFPtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2390  NumeratorPFPtBarrel->getTH1();
2391 
2392  histoname = labelname+"_NumeratorPFPtEndcap";
2393  title = labelname+"NumeratorPFPtEndcap;PF Pt[GeV/c]";
2394  MonitorElement * NumeratorPFPtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2395  NumeratorPFPtEndcap->getTH1();
2396 
2397  histoname = labelname+"_NumeratorPFPtForward";
2398  title = labelname+"NumeratorPFPtForward;PF Pt[GeV/c]";
2399  MonitorElement * NumeratorPFPtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2400  NumeratorPFPtForward->getTH1();
2401 
2402  histoname = labelname+"_NumeratorPFEta";
2403  title = labelname+"NumeratorPFEta;PF #eta ";
2404  MonitorElement * NumeratorPFEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2405  NumeratorPFEta->getTH1();
2406 
2407  histoname = labelname+"_NumeratorPFPhi";
2408  title = labelname+"NumeratorPFPhi;Calo #Phi";
2409  MonitorElement * NumeratorPFPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2410  NumeratorPFPhi->getTH1();
2411 
2412  histoname = labelname+"_NumeratorPFEtaPhi";
2413  title = labelname+"NumeratorPFEtaPhi;PF #eta;Calo #Phi";
2414  MonitorElement * NumeratorPFEtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2415  NumeratorPFEtaPhi->getTH1();
2416 
2417  histoname = labelname+"_NumeratorPFEtaBarrel";
2418  title = labelname+"NumeratorPFEtaBarrel;PF #eta ";
2419  MonitorElement * NumeratorPFEtaBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2420  NumeratorPFEtaBarrel->getTH1();
2421 
2422  histoname = labelname+"_NumeratorPFPhiBarrel";
2423  title = labelname+"NumeratorPFPhiBarrel;PF #Phi";
2424  MonitorElement * NumeratorPFPhiBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2425  NumeratorPFPhiBarrel->getTH1();
2426 
2427  histoname = labelname+"_NumeratorPFEtaEndcap";
2428  title = labelname+"NumeratorPFEtaEndcap;Calo #eta ";
2429  MonitorElement * NumeratorPFEtaEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2430  NumeratorPFEtaEndcap->getTH1();
2431 
2432  histoname = labelname+"_NumeratorPFPhiEndcap";
2433  title = labelname+"NumeratorPFPhiEndcap;PF #Phi";
2434  MonitorElement * NumeratorPFPhiEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2435  NumeratorPFPhiEndcap->getTH1();
2436 
2437  histoname = labelname+"_NumeratorPFEtaForward";
2438  title = labelname+"NumeratorPFEtaForward;Calo #eta ";
2439  MonitorElement * NumeratorPFEtaForward = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2440  NumeratorPFEtaForward->getTH1();
2441 
2442  histoname = labelname+"_NumeratorPFPhiForward";
2443  title = labelname+"NumeratorPFPhiForward;PF #Phi";
2444  MonitorElement * NumeratorPFPhiForward = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2445  NumeratorPFPhiForward->getTH1();
2446 
2447  histoname = labelname+"_NumeratorPFEta_LowpTcut";
2448  title = labelname+"NumeratorPFEta_LowpTcut;PF #eta ";
2449  MonitorElement * NumeratorPFEta_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2450  NumeratorPFEta_LowpTcut->getTH1();
2451 
2452  histoname = labelname+"_NumeratorPFPhi_LowpTcut";
2453  title = labelname+"NumeratorPFPhi_LowpTcut;PF #Phi";
2454  MonitorElement * NumeratorPFPhi_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2455  NumeratorPFPhi_LowpTcut->getTH1();
2456 
2457  histoname = labelname+"_NumeratorPFEtaPhi_LowpTcut";
2458  title = labelname+"NumeratorPFEtaPhi_LowpTcut;PF #eta;Calo #Phi";
2459  MonitorElement * NumeratorPFEtaPhi_LowpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2460  NumeratorPFEtaPhi_LowpTcut->getTH1();
2461 
2462  histoname = labelname+"_NumeratorPFEta_MedpTcut";
2463  title = labelname+"NumeratorPFEta_MedpTcut;PF #eta ";
2464  MonitorElement * NumeratorPFEta_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2465  NumeratorPFEta_MedpTcut->getTH1();
2466 
2467  histoname = labelname+"_NumeratorPFPhi_MedpTcut";
2468  title = labelname+"NumeratorPFPhi_MedpTcut;PF #Phi";
2469  MonitorElement * NumeratorPFPhi_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2470  NumeratorPFPhi_MedpTcut->getTH1();
2471 
2472  histoname = labelname+"_NumeratorPFEtaPhi_MedpTcut";
2473  title = labelname+"NumeratorPFEtaPhi_MedpTcut;PF #eta;PF #Phi";
2474  MonitorElement * NumeratorPFEtaPhi_MedpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2475  NumeratorPFEtaPhi_MedpTcut->getTH1();
2476 
2477  histoname = labelname+"_NumeratorPFEta_HighpTcut";
2478  title = labelname+"NumeratorPFEta_HighpTcut;Calo #eta ";
2479  MonitorElement * NumeratorPFEta_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2480  NumeratorPFEta_HighpTcut->getTH1();
2481 
2482  histoname = labelname+"_NumeratorPFPhi_HighpTcut";
2483  title = labelname+"NumeratorPFPhi_HighpTcut;PF #Phi";
2484  MonitorElement * NumeratorPFPhi_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2485  NumeratorPFPhi_HighpTcut->getTH1();
2486 
2487  histoname = labelname+"_NumeratorPFEtaPhi_HighpTcut";
2488  title = labelname+"NumeratorPFEtaPhi_HighpTcut;PF #eta;PF #Phi";
2489  MonitorElement * NumeratorPFEtaPhi_HighpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2490  NumeratorPFEtaPhi_HighpTcut->getTH1();
2491 
2492  histoname = labelname+"_DenominatorPFMHT";
2493  title = labelname+"DenominatorPFMHT;PF Pt[GeV/c]";
2494  MonitorElement * DenominatorPFMHT = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2495  DenominatorPFMHT->getTH1();
2496 
2497  histoname = labelname+"_DenominatorPFPt";
2498  title = labelname+"DenominatorPFPt;PF Pt[GeV/c]";
2499  MonitorElement * DenominatorPFPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2500  DenominatorPFPt->getTH1();
2501 
2502  histoname = labelname+"_DenominatorPFPtBarrel";
2503  title = labelname+"DenominatorPFPtBarrel;Calo Pt[GeV/c]";
2504  MonitorElement * DenominatorPFPtBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2505  DenominatorPFPtBarrel->getTH1();
2506 
2507  histoname = labelname+"_DenominatorPFPtEndcap";
2508  title = labelname+"DenominatorPFPtEndcap;PF Pt[GeV/c]";
2509  MonitorElement * DenominatorPFPtEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2510  DenominatorPFPtEndcap->getTH1();
2511 
2512  histoname = labelname+"_DenominatorPFPtForward";
2513  title = labelname+"DenominatorPFPtForward;PF Pt[GeV/c] ";
2514  MonitorElement * DenominatorPFPtForward = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2515  DenominatorPFPtForward->getTH1();
2516 
2517  histoname = labelname+"_DenominatorPFEta";
2518  title = labelname+"DenominatorPFEta;PF #eta ";
2519  MonitorElement * DenominatorPFEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2520  DenominatorPFEta->getTH1();
2521 
2522  histoname = labelname+"_DenominatorPFPhi";
2523  title = labelname+"DenominatorPFPhi;PF #Phi";
2524  MonitorElement * DenominatorPFPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2525  DenominatorPFPhi->getTH1();
2526 
2527  histoname = labelname+"_DenominatorPFEtaPhi";
2528  title = labelname+"DenominatorPFEtaPhi;PF #eta; Calo #Phi";
2529  MonitorElement * DenominatorPFEtaPhi = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2530  DenominatorPFEtaPhi->getTH1();
2531 
2532  histoname = labelname+"_DenominatorPFEtaBarrel";
2533  title = labelname+"DenominatorPFEtaBarrel;Calo #eta ";
2534  MonitorElement * DenominatorPFEtaBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2535  DenominatorPFEtaBarrel->getTH1();
2536 
2537  histoname = labelname+"_DenominatorPFPhiBarrel";
2538  title = labelname+"DenominatorPFPhiBarrel;PF #Phi";
2539  MonitorElement * DenominatorPFPhiBarrel = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2540  DenominatorPFPhiBarrel->getTH1();
2541 
2542  histoname = labelname+"_DenominatorPFEtaEndcap";
2543  title = labelname+"DenominatorPFEtaEndcap;PF #eta ";
2544  MonitorElement * DenominatorPFEtaEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2545  DenominatorPFEtaEndcap->getTH1();
2546 
2547  histoname = labelname+"_DenominatorPFPhiEndcap";
2548  title = labelname+"DenominatorPFPhiEndcap;Calo #Phi";
2549  MonitorElement * DenominatorPFPhiEndcap = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2550  DenominatorPFPhiEndcap->getTH1();
2551 
2552  histoname = labelname+"_DenominatorPFEtaForward";
2553  title = labelname+"DenominatorPFEtaForward;PF #eta ";
2554  MonitorElement * DenominatorPFEtaForward = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2555  DenominatorPFEtaForward->getTH1();
2556 
2557  histoname = labelname+"_DenominatorPFPhiForward";
2558  title = labelname+"DenominatorPFPhiForward;PF #Phi";
2559  MonitorElement * DenominatorPFPhiForward = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2560  DenominatorPFPhiForward->getTH1();
2561 
2562  histoname = labelname+"_DenominatorPFEta_LowpTcut";
2563  title = labelname+"DenominatorPFEta_LowpTcut;PF #eta ";
2564  MonitorElement * DenominatorPFEta_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2565  DenominatorPFEta_LowpTcut->getTH1();
2566 
2567  histoname = labelname+"_DenominatorPFPhi_LowpTcut";
2568  title = labelname+"DenominatorPFPhi_LowpTcut;PF #Phi";
2569  MonitorElement * DenominatorPFPhi_LowpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2570  DenominatorPFPhi_LowpTcut->getTH1();
2571 
2572  histoname = labelname+"_DenominatorPFEtaPhi_LowpTcut";
2573  title = labelname+"DenominatorPFEtaPhi_LowpTcut;PF #eta;Calo #Phi";
2574  MonitorElement * DenominatorPFEtaPhi_LowpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2575  DenominatorPFEtaPhi_LowpTcut->getTH1();
2576 
2577  histoname = labelname+"_DenominatorPFEta_MedpTcut";
2578  title = labelname+"DenominatorPFEta_MedpTcut;PF #eta ";
2579  MonitorElement * DenominatorPFEta_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2580  DenominatorPFEta_MedpTcut->getTH1();
2581 
2582  histoname = labelname+"_DenominatorPFPhi_MedpTcut";
2583  title = labelname+"DenominatorPFPhi_MedpTcut;PF #Phi";
2584  MonitorElement * DenominatorPFPhi_MedpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2585  DenominatorPFPhi_MedpTcut->getTH1();
2586 
2587  histoname = labelname+"_DenominatorPFEtaPhi_MedpTcut";
2588  title = labelname+"DenominatorPFEtaPhi_MedpTcut;PF #eta;Calo #Phi";
2589  MonitorElement * DenominatorPFEtaPhi_MedpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2590  DenominatorPFEtaPhi_MedpTcut->getTH1();
2591 
2592  histoname = labelname+"_DenominatorPFEta_HighpTcut";
2593  title = labelname+"DenominatorPFEta_HighpTcut;PF #eta ";
2594  MonitorElement * DenominatorPFEta_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2595  DenominatorPFEta_HighpTcut->getTH1();
2596 
2597  histoname = labelname+"_DenominatorPFPhi_HighpTcut";
2598  title = labelname+"DenominatorPFPhi_HighpTcut;PF #Phi";
2599  MonitorElement * DenominatorPFPhi_HighpTcut = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2600  DenominatorPFPhi_HighpTcut->getTH1();
2601 
2602  histoname = labelname+"_DenominatorPFEtaPhi_HighpTcut";
2603  title = labelname+"DenominatorPFEtaPhi_HighpTcut;PF #eta;Calo #Phi";
2604  MonitorElement * DenominatorPFEtaPhi_HighpTcut = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2605  DenominatorPFEtaPhi_HighpTcut->getTH1();
2606 
2607  histoname = labelname+"_PFDeltaR";
2608  title = labelname+"PFDeltaR;";
2609  MonitorElement * PFDeltaR = iBooker.book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
2610  PFDeltaR->getTH1();
2611 
2612  histoname = labelname+"_PFDeltaPhi";
2613  title = labelname+"PFDeltaPhi;";
2614  MonitorElement * PFDeltaPhi = iBooker.book1D(histoname.c_str(),title.c_str(),500,-5.0,5.0);
2615  PFDeltaPhi->getTH1();
2616 
2617  v.setEffHistos(NumeratorPt,
2618  NumeratorPtBarrel,
2619  NumeratorPtEndcap,
2620  NumeratorPtForward,
2621  NumeratorEta,
2622  NumeratorPhi,
2623  NumeratorEtaPhi,
2624  //
2625  NumeratorEtaBarrel,
2626  NumeratorPhiBarrel,
2627  NumeratorEtaEndcap,
2628  NumeratorPhiEndcap,
2629  NumeratorEtaForward,
2630  NumeratorPhiForward,
2631  NumeratorEta_LowpTcut,
2632  NumeratorPhi_LowpTcut,
2633  NumeratorEtaPhi_LowpTcut,
2634  NumeratorEta_MedpTcut,
2635  NumeratorPhi_MedpTcut,
2636  NumeratorEtaPhi_MedpTcut,
2637  NumeratorEta_HighpTcut,
2638  NumeratorPhi_HighpTcut,
2639  NumeratorEtaPhi_HighpTcut,
2640  //
2641  DenominatorPt,
2642  DenominatorPtBarrel,
2643  DenominatorPtEndcap,
2644  DenominatorPtForward,
2645  DenominatorEta,
2646  DenominatorPhi,
2647  DenominatorEtaPhi,
2648  //
2649  DenominatorEtaBarrel,
2650  DenominatorPhiBarrel,
2651  DenominatorEtaEndcap,
2652  DenominatorPhiEndcap,
2653  DenominatorEtaForward,
2654  DenominatorPhiForward,
2655  DenominatorEta_LowpTcut,
2656  DenominatorPhi_LowpTcut,
2657  DenominatorEtaPhi_LowpTcut,
2658  DenominatorEta_MedpTcut,
2659  DenominatorPhi_MedpTcut,
2660  DenominatorEtaPhi_MedpTcut,
2661  DenominatorEta_HighpTcut,
2662  DenominatorPhi_HighpTcut,
2663  DenominatorEtaPhi_HighpTcut,
2664  DeltaR,
2665  DeltaPhi,
2666  //
2667  NumeratorPFPt,
2668  NumeratorPFMHT,
2669  NumeratorPFPtBarrel,
2670  NumeratorPFPtEndcap,
2671  NumeratorPFPtForward,
2672  NumeratorPFEta,
2673  NumeratorPFPhi,
2674  NumeratorPFEtaPhi,
2675  NumeratorPFEtaBarrel,
2676  NumeratorPFPhiBarrel,
2677  NumeratorPFEtaEndcap,
2678  NumeratorPFPhiEndcap,
2679  NumeratorPFEtaForward,
2680  NumeratorPFPhiForward,
2681  NumeratorPFEta_LowpTcut,
2682  NumeratorPFPhi_LowpTcut,
2683  NumeratorPFEtaPhi_LowpTcut,
2684  NumeratorPFEta_MedpTcut,
2685  NumeratorPFPhi_MedpTcut,
2686  NumeratorPFEtaPhi_MedpTcut,
2687  NumeratorPFEta_HighpTcut,
2688  NumeratorPFPhi_HighpTcut,
2689  NumeratorPFEtaPhi_HighpTcut,
2690  DenominatorPFPt,
2691  DenominatorPFMHT,
2692  DenominatorPFPtBarrel,
2693  DenominatorPFPtEndcap,
2694  DenominatorPFPtForward,
2695  DenominatorPFEta,
2696  DenominatorPFPhi,
2697  DenominatorPFEtaPhi,
2698  DenominatorPFEtaBarrel,
2699  DenominatorPFPhiBarrel,
2700  DenominatorPFEtaEndcap,
2701  DenominatorPFPhiEndcap,
2702  DenominatorPFEtaForward,
2703  DenominatorPFPhiForward,
2704  DenominatorPFEta_LowpTcut,
2705  DenominatorPFPhi_LowpTcut,
2706  DenominatorPFEtaPhi_LowpTcut,
2707  DenominatorPFEta_MedpTcut,
2708  DenominatorPFPhi_MedpTcut,
2709  DenominatorPFEtaPhi_MedpTcut,
2710  DenominatorPFEta_HighpTcut,
2711  DenominatorPFPhi_HighpTcut,
2712  DenominatorPFEtaPhi_HighpTcut,
2713  PFDeltaR,
2714  PFDeltaPhi
2715  );
2716 
2717  }// Loop over Jet Trigger
2718 
2719  if((v.getObjectType() == trigger::TriggerJet) && (v.getTriggerType() == "DiJet_Trigger")){
2720 
2721  histoname = labelname+"_NumeratorAvrgPt";
2722  title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c]";
2723  MonitorElement * NumeratorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2724  NumeratorPt->getTH1();
2725 
2726  histoname = labelname+"_NumeratorAvrgEta";
2727  title = labelname+"NumeratorAvrgEta;Calo #eta";
2728  MonitorElement * NumeratorEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2729  NumeratorEta->getTH1();
2730 
2731  histoname = labelname+"_DenominatorAvrgPt";
2732  title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c] ";
2733  MonitorElement * DenominatorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2734  DenominatorPt->getTH1();
2735 
2736  histoname = labelname+"_DenominatorAvrgEta";
2737  title = labelname+"DenominatorAvrgEta;Calo #eta";
2738  MonitorElement * DenominatorEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2739  DenominatorEta->getTH1();
2740 
2741  histoname = labelname+"_DeltaR";
2742  title = labelname+"DeltaR;";
2743  MonitorElement * DeltaR = iBooker.book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
2744  DeltaR->getTH1();
2745 
2746  histoname = labelname+"_DeltaPhi";
2747  title = labelname+"DeltaPhi;";
2748  MonitorElement * DeltaPhi = iBooker.book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
2749  DeltaPhi->getTH1();
2750 
2751  //add PF histo: SJ
2752  histoname = labelname+"_NumeratorAvrgPFPt";
2753  title = labelname+"NumeratorAvrgPFPt;PF Pt[GeV/c]";
2754  MonitorElement * NumeratorPFPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2755  NumeratorPFPt->getTH1();
2756 
2757  histoname = labelname+"_NumeratorAvrgPFEta";
2758  title = labelname+"NumeratorAvrgPFEta;PF #eta";
2759  MonitorElement * NumeratorPFEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2760  NumeratorPFEta->getTH1();
2761 
2762  histoname = labelname+"_DenominatorAvrgPFPt";
2763  title = labelname+"DenominatorAvrgPFPt;PF Pt[GeV/c] ";
2764  MonitorElement * DenominatorPFPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2765  DenominatorPFPt->getTH1();
2766 
2767  histoname = labelname+"_DenominatorAvrgPFEta";
2768  title = labelname+"DenominatorAvrgPFEta;PF #eta";
2769  MonitorElement * DenominatorPFEta = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2770  DenominatorPFEta->getTH1();
2771 
2772  histoname = labelname+"_PFDeltaR";
2773  title = labelname+"PFDeltaR;";
2774  MonitorElement * PFDeltaR = iBooker.book1D(histoname.c_str(),title.c_str(),100,0.,1.5);
2775  PFDeltaR->getTH1();
2776 
2777  histoname = labelname+"_PFDeltaPhi";
2778  title = labelname+"PFDeltaPhi;";
2779  MonitorElement * PFDeltaPhi = iBooker.book1D(histoname.c_str(),title.c_str(),500,-5.,5.);
2780  PFDeltaPhi->getTH1();
2781 
2782  v.setEffHistos( dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2783  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2784  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2785  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2786  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2787  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2788  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2789  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2790  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2791  dummy, dummy, dummy, dummy
2792  );
2793  }
2794 
2795  if(v.getObjectType() == trigger::TriggerMET || (v.getObjectType() == trigger::TriggerTET)){
2796 
2797  histoname = labelname+"_NumeratorPt";
2798  if(v.getPath().find("HLT_PFMET")==std::string::npos)
2799  title = labelname+"NumeratorPt; CaloMET[GeV/c]";
2800  else
2801  title = labelname+"NumeratorPt; PFMET[GeV/c]";
2802  MonitorElement * NumeratorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2803  NumeratorPt->getTH1();
2804 
2805  histoname = labelname+"_NumeratorPhi";
2806  title = labelname+"NumeratorPhi; #Phi";
2807  MonitorElement * NumeratorPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2808  NumeratorPhi->getTH1();
2809 
2810  histoname = labelname+"_DenominatorPt";
2811  if(v.getPath().find("HLT_PFMET")==std::string::npos)
2812  title = labelname+"DenominatorPt; CaloMET[GeV/c]";
2813  else
2814  title = labelname+"DenominatorPt; PFMET[GeV/c]";
2815  MonitorElement * DenominatorPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2816  DenominatorPt->getTH1();
2817 
2818  histoname = labelname+"_DenominatorPhi";
2819  title = labelname+"DenominatorPhi; #Phi";
2820  MonitorElement * DenominatorPhi = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2821  DenominatorPhi->getTH1();
2822 
2823  v.setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy, dummy, dummy, dummy,
2824  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2825  dummy, dummy, DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy, dummy,
2826  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2827  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2828  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2829  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2830  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2831  dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy, dummy,
2832  dummy, dummy, dummy, dummy
2833  );
2834  }// Loop over MET trigger
2835  }
2836  }//plotEff_
2837 
2838  if(runStandalone_){//runStandalone
2839  //--------Histos to see WHY trigger is NOT fired----------
2840  int Nbins_ = 10;
2841  int Nmin_ = 0;
2842  int Nmax_ = 10;
2843  int Ptbins_ = 1000;
2844  int Etabins_ = 40;
2845  int Phibins_ = 35;
2846  double PtMin_ = 0.;
2847  double PtMax_ = 1000.;
2848  double EtaMin_ = -5.;
2849  double EtaMax_ = 5.;
2850  double PhiMin_ = -3.14159;
2851  double PhiMax_ = 3.14159;
2852 
2853  std::string dirName4_ = dirname_ + "/TriggerNotFired/";
2854  // iBooker.setCurrentFolder(dirName4);
2855 
2856  for(auto & v : hltPathsAll_){
2857 
2858  MonitorElement *dummy;
2859  dummy = iBooker.bookFloat("dummy");
2860 
2861  std::string labelname("ME") ;
2862  std::string histoname(labelname+"");
2863  std::string title(labelname+"");
2864  iBooker.setCurrentFolder(dirName4_ + v.getPath());
2865 
2866  histoname = labelname+"_TriggerSummary";
2867  title = labelname+"Summary of trigger levels";
2868  MonitorElement * TriggerSummary = iBooker.book1D(histoname.c_str(),title.c_str(),7, -0.5,6.5);
2869 
2870  std::vector<std::string> trigger;
2871  trigger.emplace_back("Nevt");
2872  trigger.emplace_back("L1 failed");
2873  trigger.emplace_back("L1 & HLT failed");
2874  trigger.emplace_back("L1 failed but not HLT");
2875  trigger.emplace_back("L1 passed");
2876  trigger.emplace_back("L1 & HLT passed");
2877  trigger.emplace_back("L1 passed but not HLT");
2878 
2879  for(unsigned int i =0; i < trigger.size(); i++)
2880  TriggerSummary->setBinLabel(i+1, trigger[i]);
2881 
2882  if((v.getTriggerType() == "SingleJet_Trigger")){
2883  histoname = labelname+"_JetPt";
2884  title = labelname+"Leading jet pT;Pt[GeV/c]";
2885  MonitorElement * JetPt = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2886  JetPt->getTH1();
2887 
2888  histoname = labelname+"_JetEtaVsPt";
2889  title = labelname+"Leading jet #eta vs pT;#eta;Pt[GeV/c]";
2890  MonitorElement * JetEtaVsPt = iBooker.book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Ptbins_,PtMin_,PtMax_);
2891  JetEtaVsPt->getTH1();
2892 
2893  histoname = labelname+"_JetPhiVsPt";
2894  title = labelname+"Leading jet #Phi vs pT;#Phi;Pt[GeV/c]";
2895  MonitorElement * JetPhiVsPt = iBooker.book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Ptbins_,PtMin_,PtMax_);
2896  JetPhiVsPt->getTH1();
2897 
2898  v.setDgnsHistos( TriggerSummary, dummy, JetPt, JetEtaVsPt, JetPhiVsPt, dummy, dummy, dummy, dummy, dummy, dummy);
2899  }// single Jet trigger
2900 
2901  if((v.getTriggerType() == "DiJet_Trigger")){
2902  histoname = labelname+"_JetSize";
2903  title = labelname+"Jet Size;multiplicity";
2904  MonitorElement * JetSize = iBooker.book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
2905  JetSize->getTH1();
2906 
2907  histoname = labelname+"_AvergPt";
2908  title = labelname+"Average Pt;Pt[GeV/c]";
2909  MonitorElement * Pt12 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2910  Pt12->getTH1();
2911 
2912  histoname = labelname+"_AvergEta";
2913  title = labelname+"Average Eta;#eta";
2914  MonitorElement * Eta12 = iBooker.book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2915  Eta12->getTH1();
2916 
2917  histoname = labelname+"_PhiDifference";
2918  title = labelname+"#Delta#Phi;#Delta#Phi";
2919  MonitorElement * Phi12 = iBooker.book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2920  Phi12->getTH1();
2921 
2922  histoname = labelname+"_Pt3Jet";
2923  title = labelname+"Pt of 3rd Jet;Pt[GeV/c]";
2924  MonitorElement * Pt3 = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2925  Pt3->getTH1();
2926 
2927  histoname = labelname+"_Pt12VsPt3Jet";
2928  title = labelname+"Pt of 3rd Jet vs Average Pt of leading jets;Avergage Pt[GeV/c]; Pt of 3rd Jet [GeV/c]";
2929  MonitorElement * Pt12Pt3 = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
2930  Pt12Pt3->getTH1();
2931 
2932  histoname = labelname+"_Pt12VsPhi12";
2933  title = labelname+"Average Pt of leading jets vs #Delta#Phi between leading jets;Avergage Pt[GeV/c]; #Delta#Phi";
2934  MonitorElement * Pt12Phi12 = iBooker.book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Phibins_,PhiMin_,PhiMax_);
2935  Pt12Phi12->getTH1();
2936 
2937  v.setDgnsHistos( TriggerSummary, JetSize, dummy, dummy, dummy, Pt12, Eta12, Phi12, Pt3, Pt12Pt3, Pt12Phi12);
2938  }// Dijet Jet trigger
2939 
2940  if((v.getTriggerType() == "MET_Trigger")){
2941  histoname = labelname+"_MET";
2942  title = labelname+"MET;Pt[GeV/c]";
2943  MonitorElement * MET = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2944  MET->getTH1();
2945 
2946  v.setDgnsHistos(TriggerSummary, dummy, MET, dummy, dummy, dummy, dummy, dummy,dummy,dummy,dummy);
2947  } // MET trigger
2948 
2949  if((v.getTriggerType() == "TET_Trigger")){
2950  histoname = labelname+"_TET";
2951  title = labelname+"TET;Pt[GeV/c]";
2952  MonitorElement * TET = iBooker.book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2953  TET->getTH1();
2954 
2955  v.setDgnsHistos(TriggerSummary, dummy, TET, dummy, dummy, dummy, dummy, dummy,dummy,dummy,dummy);
2956  } // TET trigger
2957  }
2958  }//runStandalone
2959 
2960  }
2961 }
Definition: DeltaR.py:1
TH1 * getTH1() const
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
PathInfoCollection hltPathsAllTriggerSummary_
static const std::string removeVersion(const std::string &trigger)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
Definition: MET.h:42
MonitorElement * correlation_AllWrtMu
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
#define N
Definition: blowfish.cc:9
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
PathInfoCollection hltPathsAll_
MonitorElement * correlation_AllWrtMB
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:105
PathInfoCollection hltPathsEff_
void JetMETHLTOfflineSource::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  c 
)
overrideprivate

Definition at line 1294 of file JetMETHLTOfflineSource.cc.

References config::checkPath, gather_cfg::cout, custompathnamepairs_, getL1ConditionModuleName(), hltConfig_, hltPathsAll_, hltPathsAllTriggerSummary_, hltPathsEff_, mps_fire::i, HLTConfigProvider::init(), isSetup_, LogDebug, RazorAnalyzer::met, HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), MuonTrigPaths_, gen::n, nameForEff_, pathFilter_, pathRejectKeyword_, processname_, HLTConfigProvider::size(), AlCaHLTBitMon_QueryRunRegistry::string, trigger::TriggerJet, trigger::TriggerMET, HLTConfigProvider::triggerName(), trigger::TriggerTET, and verbose_.

1295 {
1296 
1297  if(!isSetup_){
1298 
1299  //--- htlConfig_
1300  bool changed(true);
1301  if (!hltConfig_.init(run, c, processname_, changed)) {
1302  LogDebug("HLTJetMETDQMSource") << "HLTConfigProvider failed to initialize.";
1303  }
1304 
1305  /*
1306  Here we select the Single Jet, DiJet, MET trigger. SingleJet and DiJet trigger are saved under same object type "TriggerJet".
1307  We can easily separate out single and di jet trigger later. For the first trigger in the list, denominator trigger is dummy
1308  (empty) whereas for other triggers denom is previous trigger of same type. e.g. SingleJet50 has singleJet30 as denominator.
1309  */
1310 
1311  const unsigned int n(hltConfig_.size());
1312  int singleJet = 0;
1313  int diJet = 0;
1314  int met = 0;
1315  int tet = 0;
1316  for (unsigned int i=0; i!=n; ++i) {
1317  bool denomFound = false;
1318  bool numFound = false;
1319  bool checkPath = false;
1320 
1321  //Look for paths if "path name fraction" is found in the pathname
1322  std::string pathname = hltConfig_.triggerName(i);
1323  //Filter only paths JetMET triggers are interested in
1324  auto controlPathname = pathFilter_.begin();
1325  for(;controlPathname!=pathFilter_.end(); ++controlPathname){
1326  if(pathname.find((*controlPathname)) != std::string::npos){
1327  checkPath = true;
1328  break;
1329  }
1330  }
1331  if(checkPath==false) continue;
1332 
1333  //Reject if keyword(s) is found in the pathname
1334  auto rejectPathname = pathRejectKeyword_.begin();
1335  for(; rejectPathname!=pathRejectKeyword_.end();++rejectPathname){
1336  if(pathname.find((*rejectPathname)) != std::string::npos){
1337  checkPath = false;
1338  break;
1339  }
1340  }
1341  if(checkPath==false) continue;
1342 
1343  //
1344  if(verbose_) cout<<"==pathname=="<<pathname<<endl;
1345  std::string dpathname = MuonTrigPaths_[0];
1346  std::string l1pathname = "dummy";
1347  std::string denompathname = "";
1348  unsigned int usedPrescale = 1;
1349  unsigned int objectType = 0;
1350  std::string triggerType = "";
1351  std::string filtername("dummy");
1352  std::string Denomfiltername("denomdummy");
1353 
1354  if(pathname.find("Jet") != std::string::npos
1355  && !(pathname.find("DoubleJet") != std::string::npos)
1356  && !(pathname.find("DiJet") != std::string::npos)
1357  && !(pathname.find("DiPFJet") != std::string::npos)
1358  && !(pathname.find("BTag") != std::string::npos)
1359  && !(pathname.find("Mu") != std::string::npos)
1360  && !(pathname.find("Fwd") != std::string::npos)){
1361  triggerType = "SingleJet_Trigger";
1362  objectType = trigger::TriggerJet;
1363  }
1364  if(pathname.find("DiJet") != std::string::npos
1365  || pathname.find("DiPFJet") != std::string::npos
1366  || pathname.find("DoubleJet") != std::string::npos){
1367  triggerType = "DiJet_Trigger";
1368  objectType = trigger::TriggerJet;
1369  }
1370  if(pathname.find("MET") != std::string::npos){
1371  triggerType = "MET_Trigger";
1372  objectType = trigger::TriggerMET;
1373  }
1374  if(pathname.find("HT") != std::string::npos) {
1375  triggerType = "TET_Trigger";
1376  objectType = trigger::TriggerTET;
1377  }
1378 
1379  //
1380  if(objectType == trigger::TriggerJet
1381  && !(pathname.find("DiJet") != std::string::npos)
1382  && !(pathname.find("DiPFJet") != std::string::npos)
1383  && !(pathname.find("DoubleJet") != std::string::npos)){
1384  singleJet++;
1385  if(singleJet > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
1386  if(singleJet == 1) dpathname = MuonTrigPaths_[0];
1387  }
1388  if(objectType == trigger::TriggerJet
1389  && ((pathname.find("DiJet") != std::string::npos)
1390  || (pathname.find("DiPFJet") != std::string::npos))){
1391  diJet++;
1392  if(diJet > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
1393  if(diJet == 1) dpathname = MuonTrigPaths_[0];
1394  }
1395  if(objectType == trigger::TriggerMET ){
1396  met++;
1397  if(met > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
1398  if(met == 1) dpathname = MuonTrigPaths_[0];
1399  }
1400  if(objectType == trigger::TriggerTET ){
1401  tet++;
1402  if(tet > 1) dpathname = dpathname = hltConfig_.triggerName(i-1);
1403  if(tet == 1) dpathname = MuonTrigPaths_[0];
1404  }
1405 
1406  // find L1 condition for numpath with numpath objecttype
1407  // find PSet for L1 global seed for numpath,sss
1408  // list module labels for numpath
1409 
1410  // Checking if the trigger exist in HLT table or not
1411  for (unsigned int i=0; i!=n; ++i){
1412  std::string HLTname = hltConfig_.triggerName(i);
1413  if(HLTname == pathname) numFound = true;
1414  if(HLTname == dpathname) denomFound = true;
1415  }
1416 
1417  if(numFound){ //make trigger exist in the menu
1418  //ml needs change l1pathname
1419  l1pathname = getL1ConditionModuleName(pathname); //ml added L1conditionmodulename
1420  //ml added
1421  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
1422  for(auto & numpathmodule : numpathmodules) {
1423  edm::InputTag testTag(numpathmodule,"",processname_);
1424  if ((hltConfig_.moduleType(numpathmodule) == "HLT1CaloJet")
1425  || (hltConfig_.moduleType(numpathmodule) == "HLT1PFJet")
1426  || (hltConfig_.moduleType(numpathmodule) == "HLTDiJetAveFilter")
1427  || (hltConfig_.moduleType(numpathmodule) == "HLTDiPFJetAveFilter")
1428  || (hltConfig_.moduleType(numpathmodule) == "HLT1CaloMET")
1429  || (hltConfig_.moduleType(numpathmodule) == "HLTMhtFilter")
1430  || (hltConfig_.moduleType(numpathmodule) == "HLTPrescaler"))
1431  filtername = numpathmodule;
1432  }
1433  }
1434 
1435  if(objectType != 0 && denomFound){
1436  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
1437  for(auto & numpathmodule : numpathmodules) {
1438  edm::InputTag testTag(numpathmodule,"",processname_);
1439  if ((hltConfig_.moduleType(numpathmodule) == "HLT1CaloJet")
1440  || (hltConfig_.moduleType(numpathmodule) == "HLT1PFJet")
1441  || (hltConfig_.moduleType(numpathmodule) == "HLTDiJetAveFilter")
1442  || (hltConfig_.moduleType(numpathmodule) == "HLTDiPFJetAveFilter")
1443  || (hltConfig_.moduleType(numpathmodule) == "HLT1CaloMET" )
1444  || (hltConfig_.moduleType(numpathmodule) == "HLTMhtFilter")
1445  || (hltConfig_.moduleType(numpathmodule) == "HLTPrescaler") )
1446  Denomfiltername = numpathmodule;
1447  }
1448  }
1449 
1450  if(objectType != 0 && numFound){
1451  if(verbose_)
1452  cout<<"=Pathname= "<<pathname
1453  <<" | =Denompath= "<<dpathname
1454  <<" | =Filtername= "<<filtername
1455  <<" | =Denomfiltername= "<<Denomfiltername
1456  <<" | =L1pathname= "<<l1pathname
1457  <<" | =ObjectType= "<<objectType<<endl;
1458  if(!((pathname.find("HT") != std::string::npos) || (pathname.find("Quad") != std::string::npos))){
1459  hltPathsAll_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
1460  if(!nameForEff_ && denomFound) hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
1461  filtername, Denomfiltername, processname_, objectType, triggerType));
1462  }
1463  hltPathsAllTriggerSummary_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
1464  filtername, Denomfiltername, processname_, objectType, triggerType));
1465  }
1466  } //Loop over paths
1467 
1468  if (verbose_) cout << "get names for efficicncy------------------"<< endl;
1469  //---------bool to pick trigger names pair from config file-------------
1470  if(nameForEff_){
1471  std::string l1pathname = "dummy";
1472  std::string denompathname = "";
1473  unsigned int usedPrescale = 1;
1474  unsigned int objectType = 0;
1475  std::string triggerType = "";
1476  std::string filtername("dummy");
1477  std::string Denomfiltername("denomdummy");
1478  for (auto & custompathnamepair : custompathnamepairs_){
1479  std::string pathname = custompathnamepair.first;
1480  std::string dpathname = custompathnamepair.second;
1481  bool numFound = false;
1482  bool denomFound = false;
1483  // Checking if the trigger exist in HLT table or not
1484  for (unsigned int i=0; i!=n; ++i) {
1485  std::string HLTname = hltConfig_.triggerName(i);
1486  if(HLTname.find(pathname)!=std::string::npos){numFound = true; pathname = HLTname;} //changed to get versions
1487  if(HLTname.find(dpathname)!=std::string::npos){denomFound = true; dpathname = HLTname;}
1488  }
1489  if(numFound && denomFound){
1490  if (pathname.find("Jet") != std::string::npos
1491  && !(pathname.find("DiJet") != std::string::npos)
1492  && !(pathname.find("DiPFJet") != std::string::npos)
1493  && !(pathname.find("DoubleJet") != std::string::npos)
1494  && !(pathname.find("BTag") != std::string::npos)
1495  && !(pathname.find("Mu") != std::string::npos)
1496  && !(pathname.find("Fwd") != std::string::npos)){
1497  triggerType = "SingleJet_Trigger";
1498  objectType = trigger::TriggerJet;
1499  }
1500  if (pathname.find("DiJet") != std::string::npos
1501  || pathname.find("DiPFJet") != std::string::npos
1502  || pathname.find("DoubleJet") != std::string::npos ){
1503  triggerType = "DiJet_Trigger";
1504  objectType = trigger::TriggerJet;
1505  }
1506  if (pathname.find("MET") != std::string::npos ){
1507  triggerType = "MET_Trigger";
1508  objectType = trigger::TriggerMET;
1509  }
1510  if (pathname.find("TET") != std::string::npos ){
1511  triggerType = "TET_Trigger";
1512  objectType = trigger::TriggerTET;
1513  }
1514 
1515  l1pathname = getL1ConditionModuleName(pathname); //ml added L1conditionmodulename
1516  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
1517  for(auto & numpathmodule : numpathmodules) {
1518  edm::InputTag testTag(numpathmodule,"",processname_);
1519  if ((hltConfig_.moduleType(numpathmodule) == "HLT1CaloJet")
1520  || (hltConfig_.moduleType(numpathmodule) == "HLT1PFJet")
1521  || (hltConfig_.moduleType(numpathmodule) == "HLTDiJetAveFilter")
1522  || (hltConfig_.moduleType(numpathmodule) == "HLTDiPFJetAveFilter")
1523  || (hltConfig_.moduleType(numpathmodule) == "HLT1CaloMET" )
1524  || (hltConfig_.moduleType(numpathmodule) == "HLTMhtFilter")
1525  || (hltConfig_.moduleType(numpathmodule) == "HLTPrescaler") )
1526  filtername = numpathmodule;
1527  }
1528 
1529  if(objectType != 0){
1530  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
1531  for(auto & numpathmodule : numpathmodules) {
1532  edm::InputTag testTag(numpathmodule,"",processname_);
1533  if ((hltConfig_.moduleType(numpathmodule) == "HLT1CaloJet")
1534  || (hltConfig_.moduleType(numpathmodule) == "HLT1PFJet")
1535  || (hltConfig_.moduleType(numpathmodule) == "HLTDiJetAveFilter")
1536  || (hltConfig_.moduleType(numpathmodule) == "HLTDiPFJetAveFilter")
1537  || (hltConfig_.moduleType(numpathmodule) == "HLT1CaloMET" )
1538  || (hltConfig_.moduleType(numpathmodule) == "HLTMhtFilter")
1539  || (hltConfig_.moduleType(numpathmodule) == "HLTPrescaler") )
1540  Denomfiltername = numpathmodule;
1541  }
1542 
1543  if(verbose_)cout<<"==pathname=="<<pathname
1544  <<"==denompath=="<<dpathname
1545  <<"==filtername=="<<filtername
1546  <<"==denomfiltername=="<<Denomfiltername
1547  <<"==l1pathname=="<<l1pathname
1548  <<"==objectType=="<<objectType<<endl;
1549  hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname,
1550  filtername, Denomfiltername, processname_, objectType, triggerType));
1551  }
1552  }
1553  }
1554  }
1555 
1556  if(verbose_)cout<<"== end hltPathsEff_.push_back ======" << endl;
1557 
1558  }
1559 }
#define LogDebug(id)
unsigned int size() const
number of trigger paths in trigger table
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::string & triggerName(unsigned int triggerIndex) const
PathInfoCollection hltPathsAllTriggerSummary_
std::vector< std::string > pathFilter_
checkPath
Definition: config.py:11
std::vector< std::string > pathRejectKeyword_
std::vector< std::string > MuonTrigPaths_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
met
===> hadronic RAZOR
PathInfoCollection hltPathsAll_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
const std::string getL1ConditionModuleName(const std::string &pathname)
PathInfoCollection hltPathsEff_
void JetMETHLTOfflineSource::fillMEforEffAllTrigger ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Definition at line 794 of file JetMETHLTOfflineSource.cc.

References _fEMF, _feta, _fHPD, _max_CEMF, _max_CHEF, _max_NEMF, _max_NHEF, _min_CEMF, _min_CHEF, _min_NEMF, _min_NHEF, _n90Hits, _pfMHT, funct::abs(), edm::HLTGlobalStatus::accept(), calojet, calojetColl_, CaloJetEMF, CaloJetEta, CaloJetfHPD, CaloJetn90, CaloJetPhi, CaloJetPt, calometColl_, gather_cfg::cout, hiPixelPairStep_cff::deltaPhi, deltaR(), particleFlow_cfi::dPhi, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, reco::LeafCandidate::et(), PVValHelper::eta, trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::getObjects(), hltPathsEff_, createfilelist::int, isBarrel(), isEndCap(), isForward(), edm::HandleBase::isValid(), RazorAnalyzer::met, pileupDistInMC::num, pfjet, PFJetCEMF, PFJetCHEF, pfjetColl_, PFJetEta, PFJetNEMF, PFJetNHEF, PFJetPhi, PFJetPt, pfmetColl_, pfMHTx_All, pfMHTy_All, phi, reco::LeafCandidate::phi(), processname_, edm::Handle< T >::product(), edm::TriggerNames::size(), trigger::TriggerEvent::sizeFilters(), mathSSE::sqrt(), edm::TriggerNames::triggerIndex(), trigger::TriggerJet, trigger::TriggerMET, triggerNames_, triggerObj_, triggerResults_, trigger::TriggerTET, findQualityFiles::v, and verbose_.

Referenced by analyze().

795 {
796  if (!triggerResults_.isValid()) return;
797 
798  int num = -1;
799  int denom = -1;
800  bool denompassed = false;
801  bool numpassed = false;
803 
804  for(auto & v : hltPathsEff_){
805  num++;
806  denom++;
807  denompassed = false;
808  numpassed = false;
809 
810  unsigned indexNum = triggerNames_.triggerIndex(v.getPath());
811  unsigned indexDenom = triggerNames_.triggerIndex(v.getDenomPath());
812 
813  if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum)) numpassed = true;
814  if(indexDenom < triggerNames_.size() && triggerResults_->accept(indexDenom)) denompassed = true;
815 
816  if(denompassed==false) continue;
817 
818  //if(numpassed==true){
819  edm::InputTag hltTag(v.getLabel(),"",processname_);
820  const int hltIndex = triggerObj_->filterIndex(hltTag);
821  edm::InputTag l1Tag(v.getl1Path(),"",processname_);
822  const int l1Index = triggerObj_->filterIndex(l1Tag);
823  //}
824 
825  //----------------------------------------------------------------------
826  //double pTcut = 0;
827  double trigLowpTcut = 0;
828  double trigMedpTcut = 0;
829  double trigHighpTcut = 0;
830  double trigLowpTcutFwd = 0;
831  double trigMedpTcutFwd = 0;
832  double trigHighpTcutFwd = 0;
833  //
834  //double pTPFcut = 0 ;
835  double trigLowpTPFcut = 0;
836  double trigMedpTPFcut = 0;
837  double trigHighpTPFcut = 0;
838  double trigLowpTPFcutFwd = 0;
839  double trigMedpTPFcutFwd = 0;
840  double trigHighpTPFcutFwd = 0;
841  //
842  //cout<<"pre-path" << v->getPath()<<endl;
843  size_t jetstrfound = v.getPath().find("Jet");
844  //size_t censtrfound = v->getPath().find("Central"); //shoouldn't be needed?
845  string tpath = v.getPath();
846  string jetTrigVal;
847  float jetVal = 0.;
848  //
849  if(jetstrfound != string::npos){// && ustrfound != string::npos ){
850  //cout<<v->getPath()<<endl;
851  for(int trig = int(jetstrfound)+3; trig < int(jetstrfound)+7; trig++){// int(ustrfound); trig++){
852  if(!isdigit(tpath[trig])) break;
853  jetTrigVal+=tpath[trig];
854  }
855  jetVal=atof(jetTrigVal.c_str());
856  //
857  if(jetVal>0.){
858  if(jetVal<50.){
859  //pTcut = jetVal / 2.;
860  trigMedpTcut = jetVal + 5.;
861  trigHighpTcut = jetVal + 10.;
862  //
863  trigLowpTcutFwd = jetVal + 9.;
864  trigMedpTcutFwd = jetVal + 15.;
865  trigHighpTcutFwd = jetVal + 21.;
866  }
867  else{
868  //pTcut = jetVal - 20. ;
869  trigMedpTcut = jetVal + 2.;
870  trigHighpTcut = jetVal + 60.;
871  //
872  trigLowpTcutFwd = jetVal + 22.;
873  trigMedpTcutFwd = jetVal + 25.;
874  trigHighpTcutFwd = jetVal + 110.;
875  }
876  trigLowpTcut = jetVal;
877  }
878  //
879  if(jetVal>0.){
880  if(jetVal<50.){
881  //pTPFcut = jetVal ;
882  trigMedpTPFcut = jetVal + 20.;
883  trigHighpTPFcut = jetVal + 40.;
884  //
885  trigLowpTPFcutFwd = jetVal + 60.;
886  trigMedpTPFcutFwd = jetVal + 80.;
887  trigHighpTPFcutFwd = jetVal + 100.;
888  }
889  else{
890  //pTPFcut = jetVal ;
891  trigMedpTPFcut = jetVal + 40.;
892  trigHighpTPFcut = jetVal + 140.;
893  //
894  trigLowpTPFcutFwd = jetVal + 110.;
895  trigMedpTPFcutFwd = jetVal + 130.;
896  trigHighpTPFcutFwd = jetVal + 190.;
897  }
898  trigLowpTPFcut = jetVal;
899  }
900  }
901  //----------------------------------------------------------------------
902 
903  //CaloJet paths
904  if(verbose_) std::cout << "fillMEforEffAllTrigger: CaloJet -------------------" << std::endl;
905  if(calojetColl_.isValid() && (v.getObjectType() == trigger::TriggerJet)){
906  //cout<<" - CaloJet "<<endl;
907  //&& (v->getPath().find("HLT_PFJet")==std::string::npos)
908  //&& (v->getPath().find("HLT_DiPFJet")==std::string::npos)){
909  bool jetIDbool = false;
910  double leadjpt = CaloJetPt[0];
911  double leadjeta = CaloJetEta[0];
912  double leadjphi = CaloJetPhi[0];
913  //double ljemf = CaloJetEMF[0];
914  double ljfhpd = CaloJetfHPD[0];
915  double ljn90 = CaloJetn90[0];
916  if((v.getTriggerType() == "SingleJet_Trigger") && !calojet.empty()){ //this line stops the central jets
917  if( (ljfhpd < _fHPD) && (ljn90 > _n90Hits )){
918  if(verbose_) cout<<"Passed CaloJet ID -------------------" << endl;
919  jetIDbool = true;
920  //Denominator fill
921  v.getMEhisto_DenominatorPt()->Fill(leadjpt);
922  if (isBarrel(leadjeta)) v.getMEhisto_DenominatorPtBarrel()->Fill(leadjpt);
923  if (isEndCap(leadjeta)) v.getMEhisto_DenominatorPtEndcap()->Fill(leadjpt);
924  if (isForward(leadjeta)) v.getMEhisto_DenominatorPtForward()->Fill(leadjpt);
925  v.getMEhisto_DenominatorEta()->Fill(leadjeta);
926  v.getMEhisto_DenominatorPhi()->Fill(leadjphi);
927  v.getMEhisto_DenominatorEtaPhi()->Fill(leadjeta,leadjphi);
928  if (isBarrel(leadjeta)){
929  v.getMEhisto_DenominatorEtaBarrel()->Fill(leadjeta);
930  v.getMEhisto_DenominatorPhiBarrel()->Fill(leadjphi);
931  }
932  if (isEndCap(leadjeta)){
933  v.getMEhisto_DenominatorEtaEndcap()->Fill(leadjeta);
934  v.getMEhisto_DenominatorPhiEndcap()->Fill(leadjphi);
935  }
936  if (isForward(leadjeta)){
937  v.getMEhisto_DenominatorEtaForward()->Fill(leadjeta);
938  v.getMEhisto_DenominatorPhiForward()->Fill(leadjphi);
939  }
940  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
941  v.getMEhisto_DenominatorEta_LowpTcut()->Fill(leadjeta);
942  v.getMEhisto_DenominatorPhi_LowpTcut()->Fill(leadjphi);
943  v.getMEhisto_DenominatorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
944  }
945  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
946  v.getMEhisto_DenominatorEta_MedpTcut()->Fill(leadjeta);
947  v.getMEhisto_DenominatorPhi_MedpTcut()->Fill(leadjphi);
948  v.getMEhisto_DenominatorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
949  }
950  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
951  v.getMEhisto_DenominatorEta_HighpTcut()->Fill(leadjeta);
952  v.getMEhisto_DenominatorPhi_HighpTcut()->Fill(leadjphi);
953  v.getMEhisto_DenominatorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
954  }
955 
956  //Numerator fill
957  if(numpassed){
958  //
959  double dRmin = 99999.;
960  double dPhimin = 9999.;
961  if(v.getPath().find("L1") != std::string::npos){
962  if ( l1Index >= triggerObj_->sizeFilters() ) {
963  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
964  }
965  else {
966  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
967  for(unsigned short ki : kl1){
968  double dR = deltaR(toc[ki].eta(), toc[ki].phi(), leadjeta, leadjphi);
969  if(dR < dRmin){
970  dRmin = dR;
971  }
972  }
973  }
974  }
975  else{
976  if ( hltIndex >= triggerObj_->sizeFilters() ) {
977  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
978  }
979  else {
980  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
981  auto kj = khlt.begin();
982  for(;kj != khlt.end(); ++kj){
983  double dR = deltaR(toc[*kj].eta(), toc[*kj].phi(),
984  leadjeta, leadjphi);
985  if(dR < dRmin){
986  dRmin = dR;
987  }
988  double dPhi = deltaPhi(toc[*kj].phi(), leadjphi);
989  if(dPhi < dPhimin){
990  dPhimin = dPhi;
991  }
992  }
993  //v->getMEhisto_DeltaPhi()->Fill(dPhimin);
994  v.getMEhisto_DeltaPhi()->Fill(dPhimin);
995  v.getMEhisto_DeltaR()->Fill(dRmin);
996  }
997  }
998  if(dRmin < 0.1 || (v.getPath().find("L1") != std::string::npos && dRmin < 0.4)){
999  v.getMEhisto_NumeratorPt()->Fill(leadjpt);
1000  if (isBarrel(leadjeta)) v.getMEhisto_NumeratorPtBarrel()->Fill(leadjpt);
1001  if (isEndCap(leadjeta)) v.getMEhisto_NumeratorPtEndcap()->Fill(leadjpt);
1002  if (isForward(leadjeta)) v.getMEhisto_NumeratorPtForward()->Fill(leadjpt);
1003  v.getMEhisto_NumeratorEta()->Fill(leadjeta);
1004  v.getMEhisto_NumeratorPhi()->Fill(leadjphi);
1005  v.getMEhisto_NumeratorEtaPhi()->Fill(leadjeta,leadjphi);
1006  if (isBarrel(leadjeta)){
1007  v.getMEhisto_NumeratorEtaBarrel()->Fill(leadjeta);
1008  v.getMEhisto_NumeratorPhiBarrel()->Fill(leadjphi);
1009  }
1010  if (isEndCap(leadjeta)){
1011  v.getMEhisto_NumeratorEtaEndcap()->Fill(leadjeta);
1012  v.getMEhisto_NumeratorPhiEndcap()->Fill(leadjphi);
1013  }
1014  if (isForward(leadjeta)){
1015  v.getMEhisto_NumeratorEtaForward()->Fill(leadjeta);
1016  v.getMEhisto_NumeratorPhiForward()->Fill(leadjphi);
1017  }
1018  if((leadjpt > trigLowpTcut && !isForward(leadjeta)) || (leadjpt > trigLowpTcutFwd && isForward(leadjeta))){
1019  v.getMEhisto_NumeratorEta_LowpTcut()->Fill(leadjeta);
1020  v.getMEhisto_NumeratorPhi_LowpTcut()->Fill(leadjphi);
1021  v.getMEhisto_NumeratorEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1022  }
1023  if((leadjpt > trigMedpTcut && !isForward(leadjeta)) || (leadjpt > trigMedpTcutFwd && isForward(leadjeta))){
1024  v.getMEhisto_NumeratorEta_MedpTcut()->Fill(leadjeta);
1025  v.getMEhisto_NumeratorPhi_MedpTcut()->Fill(leadjphi);
1026  v.getMEhisto_NumeratorEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1027  }
1028  if((leadjpt > trigHighpTcut && !isForward(leadjeta)) || (leadjpt > trigHighpTcutFwd && isForward(leadjeta))){
1029  v.getMEhisto_NumeratorEta_HighpTcut()->Fill(leadjeta);
1030  v.getMEhisto_NumeratorPhi_HighpTcut()->Fill(leadjphi);
1031  v.getMEhisto_NumeratorEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1032  }
1033  }
1034  }//numpassed
1035  }//CalojetID filter
1036  }
1037 
1038  if(jetIDbool == true && (v.getTriggerType() == "DiJet_Trigger") && calojet.size()>1){
1039  if(((CaloJetEMF[1] > _fEMF || std::abs(CaloJetEta[1]) > _feta) &&
1040  CaloJetfHPD[0] < _fHPD && CaloJetn90[0] > _n90Hits)){
1041  v.getMEhisto_DenominatorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
1042  v.getMEhisto_DenominatorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
1043  if(numpassed==true){
1044  v.getMEhisto_NumeratorPt()->Fill((CaloJetPt[0] + CaloJetPt[1])/2.);
1045  v.getMEhisto_NumeratorEta()->Fill((CaloJetEta[0] + CaloJetEta[1])/2.);
1046  }
1047  }
1048  }
1049  }// Jet trigger and valid jet collection
1050 
1051  //PFJet paths
1052  if(verbose_) std::cout << "fillMEforEffAllTrigger: PFJet -------------------" << std::endl;
1053  if(pfjetColl_.isValid() && (v.getObjectType() == trigger::TriggerJet)){
1054  //cout<<" - PFJet "<<endl;
1055  //&& (v->getPath().find("HLT_PFJet")!=std::string::npos)
1056  //&& (v->getPath().find("HLT_DiPFJet")!=std::string::npos)){
1057  bool jetIDbool = false;
1058  double leadjpt = PFJetPt[0];
1059  double leadjeta = PFJetEta[0];
1060  double leadjphi = PFJetPhi[0];
1061  double ljNHEF = PFJetNHEF[0];
1062  double ljCHEF = PFJetCHEF[0];
1063  double ljNEMF = PFJetNEMF[0];
1064  double ljCEMF = PFJetCEMF[0];
1065  //double sleadjpt = PFJetPt[1];
1066  //double sleadjeta = PFJetEta[1];
1067  //double sleadjphi = PFJetPhi[1];
1068  double sljNHEF = PFJetNHEF[1];
1069  double sljCHEF = PFJetCHEF[1];
1070  double sljNEMF = PFJetNEMF[1];
1071  double sljCEMF = PFJetCEMF[1];
1072  //
1073  double pfMHTx = pfMHTx_All;
1074  double pfMHTy = pfMHTy_All;
1075  //
1076  if((v.getTriggerType() == "SingleJet_Trigger") && !pfjet.empty()){ //this line stops the central jets
1077 
1078  //======get pfmht
1079  _pfMHT = sqrt(pfMHTx*pfMHTx + pfMHTy*pfMHTy);
1080  v.getMEhisto_DenominatorPFMHT()->Fill(_pfMHT);
1081 
1082  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
1083  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
1084  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
1085  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF){
1086  if(verbose_) cout<<"Passed PFJet ID -------------------" << endl;
1087  jetIDbool = true;
1088  v.getMEhisto_DenominatorPFPt()->Fill(leadjpt);
1089  if (isBarrel(leadjeta)) v.getMEhisto_DenominatorPFPtBarrel()->Fill(leadjpt);
1090  if (isEndCap(leadjeta)) v.getMEhisto_DenominatorPFPtEndcap()->Fill(leadjpt);
1091  if (isForward(leadjeta)) v.getMEhisto_DenominatorPFPtForward()->Fill(leadjpt);
1092  v.getMEhisto_DenominatorPFEta()->Fill(leadjeta);
1093  v.getMEhisto_DenominatorPFPhi()->Fill(leadjphi);
1094  v.getMEhisto_DenominatorPFEtaPhi()->Fill(leadjeta,leadjphi);
1095  if(isBarrel(leadjeta)){
1096  v.getMEhisto_DenominatorPFEtaBarrel()->Fill(leadjeta);
1097  v.getMEhisto_DenominatorPFPhiBarrel()->Fill(leadjphi);
1098  }
1099  if (isEndCap(leadjeta)){
1100  v.getMEhisto_DenominatorPFEtaEndcap()->Fill(leadjeta);
1101  v.getMEhisto_DenominatorPFPhiEndcap()->Fill(leadjphi);
1102  }
1103  if (isForward(leadjeta)){
1104  v.getMEhisto_DenominatorPFEtaForward()->Fill(leadjeta);
1105  v.getMEhisto_DenominatorPFPhiForward()->Fill(leadjphi);
1106  }
1107  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta)) || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
1108  v.getMEhisto_DenominatorPFEta_LowpTcut()->Fill(leadjeta);
1109  v.getMEhisto_DenominatorPFPhi_LowpTcut()->Fill(leadjphi);
1110  v.getMEhisto_DenominatorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1111  }
1112  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta)) || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
1113  v.getMEhisto_DenominatorPFEta_MedpTcut()->Fill(leadjeta);
1114  v.getMEhisto_DenominatorPFPhi_MedpTcut()->Fill(leadjphi);
1115  v.getMEhisto_DenominatorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1116  }
1117  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta)) || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
1118  v.getMEhisto_DenominatorPFEta_HighpTcut()->Fill(leadjeta);
1119  v.getMEhisto_DenominatorPFPhi_HighpTcut()->Fill(leadjphi);
1120  v.getMEhisto_DenominatorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1121  }
1122 
1123  //Numerator fill
1124  if(numpassed){
1125  double dRmin = 99999.;
1126  double dPhimin = 9999.;
1127  if(v.getPath().find("L1") != std::string::npos){
1128  if ( l1Index >= triggerObj_->sizeFilters() ) {
1129  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1130  }
1131  else{
1132  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
1133  for(unsigned short ki : kl1){
1134  double dR = deltaR(toc[ki].eta(), toc[ki].phi(), leadjeta, leadjphi);
1135  if(dR < dRmin){
1136  dRmin = dR;
1137  }
1138  }
1139  }
1140  }
1141  else{
1142  if ( hltIndex >= triggerObj_->sizeFilters() ) {
1143  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1144  }
1145  else{
1146  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1147  for(unsigned short kj : khlt){
1148  double dR = deltaR(toc[kj].eta(), toc[kj].phi(), leadjeta, leadjphi);
1149  if(dR < dRmin){
1150  dRmin = dR;
1151  }
1152  double dPhi = deltaPhi(toc[kj].phi(), leadjphi);
1153  if(dPhi < dPhimin){
1154  dPhimin = dPhi;
1155  }
1156  }
1157  v.getMEhisto_PFDeltaPhi()->Fill(dPhimin);
1158  v.getMEhisto_PFDeltaR()->Fill(dRmin);
1159  }
1160  }
1161  if(dRmin < 0.1 || (v.getPath().find("L1") != std::string::npos && dRmin < 0.4)){
1162  v.getMEhisto_NumeratorPFPt()->Fill(leadjpt);
1163  if (isBarrel(leadjeta)) v.getMEhisto_NumeratorPFPtBarrel()->Fill(leadjpt);
1164  if (isEndCap(leadjeta)) v.getMEhisto_NumeratorPFPtEndcap()->Fill(leadjpt);
1165  if (isForward(leadjeta)) v.getMEhisto_NumeratorPFPtForward()->Fill(leadjpt);
1166  v.getMEhisto_NumeratorPFEta()->Fill(leadjeta);
1167  v.getMEhisto_NumeratorPFPhi()->Fill(leadjphi);
1168  v.getMEhisto_NumeratorPFEtaPhi()->Fill(leadjeta,leadjphi);
1169  if (isBarrel(leadjeta)){
1170  v.getMEhisto_NumeratorPFEtaBarrel()->Fill(leadjeta);
1171  v.getMEhisto_NumeratorPFPhiBarrel()->Fill(leadjphi);
1172  }
1173  if (isEndCap(leadjeta)){
1174  v.getMEhisto_NumeratorPFEtaEndcap()->Fill(leadjeta);
1175  v.getMEhisto_NumeratorPFPhiEndcap()->Fill(leadjphi);
1176  }
1177  if (isForward(leadjeta)){
1178  v.getMEhisto_NumeratorPFEtaForward()->Fill(leadjeta);
1179  v.getMEhisto_NumeratorPFPhiForward()->Fill(leadjphi);
1180  }
1181  if((leadjpt > trigLowpTPFcut && !isForward(leadjeta))
1182  || (leadjpt > trigLowpTPFcutFwd && isForward(leadjeta))){
1183  v.getMEhisto_NumeratorPFEta_LowpTcut()->Fill(leadjeta);
1184  v.getMEhisto_NumeratorPFPhi_LowpTcut()->Fill(leadjphi);
1185  v.getMEhisto_NumeratorPFEtaPhi_LowpTcut()->Fill(leadjeta,leadjphi);
1186  }
1187  if((leadjpt > trigMedpTPFcut && !isForward(leadjeta))
1188  || (leadjpt > trigMedpTPFcutFwd && isForward(leadjeta))){
1189  v.getMEhisto_NumeratorPFEta_MedpTcut()->Fill(leadjeta);
1190  v.getMEhisto_NumeratorPFPhi_MedpTcut()->Fill(leadjphi);
1191  v.getMEhisto_NumeratorPFEtaPhi_MedpTcut()->Fill(leadjeta,leadjphi);
1192  }
1193  if((leadjpt > trigHighpTPFcut && !isForward(leadjeta))
1194  || (leadjpt > trigHighpTPFcutFwd && isForward(leadjeta))){
1195  v.getMEhisto_NumeratorPFEta_HighpTcut()->Fill(leadjeta);
1196  v.getMEhisto_NumeratorPFPhi_HighpTcut()->Fill(leadjphi);
1197  v.getMEhisto_NumeratorPFEtaPhi_HighpTcut()->Fill(leadjeta,leadjphi);
1198  }
1199  }
1200  }
1201  }
1202  }
1203  if(jetIDbool == true && (v.getTriggerType() == "DiJet_Trigger") && pfjet.size()>1){
1204  if( ljNHEF >= _min_NHEF && ljNHEF <= _max_NHEF
1205  && ljCHEF >= _min_CHEF && ljCHEF <= _max_CHEF
1206  && ljNEMF >= _min_NEMF && ljNEMF <= _max_NEMF
1207  && ljCEMF >= _min_CEMF && ljCEMF <= _max_CEMF
1208  && sljNHEF >= _min_NHEF && sljNHEF <= _max_NHEF
1209  && sljCHEF >= _min_CHEF && sljCHEF <= _max_CHEF
1210  && sljNEMF >= _min_NEMF && sljNEMF <= _max_NEMF
1211  && sljCEMF >= _min_CEMF && sljCEMF <= _max_CEMF ){
1212  v.getMEhisto_DenominatorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
1213  v.getMEhisto_DenominatorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
1214  if(numpassed){
1215  v.getMEhisto_NumeratorPFPt()->Fill((PFJetPt[0] + PFJetPt[1])/2.);
1216  v.getMEhisto_NumeratorPFEta()->Fill((PFJetEta[0] + PFJetEta[1])/2.);
1217  }
1218  }
1219  }
1220  }// PF Jet trigger and valid jet collection
1221 
1222  //CaloMET path
1223  if(verbose_) std::cout << "fillMEforEffAllTrigger: CaloMET -------------------" << std::endl;
1224  if(calometColl_.isValid()
1225  && ((v.getObjectType() == trigger::TriggerMET) || (v.getObjectType() == trigger::TriggerTET))
1226  && (v.getPath().find("HLT_PFMET")==std::string::npos)){
1227  const CaloMETCollection *calometcol = calometColl_.product();
1228  const CaloMET met = calometcol->front();
1229  v.getMEhisto_DenominatorPt()->Fill(met.et());
1230  v.getMEhisto_DenominatorPhi()->Fill(met.phi());
1231  if(numpassed){
1232  v.getMEhisto_NumeratorPt()->Fill(met.et());
1233  v.getMEhisto_NumeratorPhi()->Fill(met.phi());
1234  if(hltIndex >= triggerObj_->sizeFilters()){
1235  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1236  }
1237  else{
1238  double dPhimin = 9999.;//
1239  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1240  for(unsigned short kj : khlt){
1241  double dPhi = deltaPhi(toc[kj].phi(), met.phi());
1242  if(dPhi < dPhimin){
1243  dPhimin = dPhi;
1244  }
1245  }
1246  v.getMEhisto_DeltaPhi()->Fill(dPhimin);
1247  }
1248  }
1249  }
1250 
1251  //PFMET
1252  if(verbose_) std::cout << "fillMEforEffAllTrigger: PFMET -------------------" << std::endl;
1253  if(pfmetColl_.isValid()
1254  && ((v.getObjectType() == trigger::TriggerMET) || (v.getObjectType() == trigger::TriggerTET))
1255  && (v.getPath().find("HLT_PFMET")!=std::string::npos)){
1256  const PFMETCollection *pfmetcol = pfmetColl_.product();
1257  const PFMET met = pfmetcol->front();
1258  v.getMEhisto_DenominatorPt()->Fill(met.et());
1259  v.getMEhisto_DenominatorPhi()->Fill(met.phi());
1260  if(numpassed){
1261  v.getMEhisto_NumeratorPt()->Fill(met.et());
1262  v.getMEhisto_NumeratorPhi()->Fill(met.phi());
1263  if(hltIndex >= triggerObj_->sizeFilters()){
1264  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
1265  }
1266  else{
1267  double dPhimin = 9999.;//
1268  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
1269  for(unsigned short kj : khlt){
1270  double dPhi = deltaPhi(toc[kj].phi(), met.phi());
1271  if(dPhi < dPhimin){
1272  dPhimin = dPhi;
1273  }
1274  }
1275  v.getMEhisto_DeltaPhi()->Fill(dPhimin);
1276  }
1277  }
1278  }
1279 
1280  /*
1281  if(pfmhtColl_.isValid() && ((v->getObjectType() == trigger::TriggerMET)|| (v->getObjectType() == trigger::TriggerTET))){
1282  const PFMHTCollection *pfmhtcol = pfmhtColl_.product();
1283  const PFMHT met = pfmhtcol->front();
1284  v->getMEhisto_DenominatorPFPt()->Fill(met.pt());
1285  v->getMEhisto_DenominatorPFPhi()->Fill(met.phi());
1286  }// PFMHT trigger and valid MET collection
1287  */
1288  }// trigger under study
1289 }
virtual bool isEndCap(double eta)
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
edm::Handle< reco::PFJetCollection > pfjetColl_
bool accept() const
Has at least one path accepted the event?
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:123
edm::Handle< edm::TriggerResults > triggerResults_
reco::PFJetCollection pfjet
Strings::size_type size() const
Definition: TriggerNames.cc:39
edm::Handle< reco::PFMETCollection > pfmetColl_
Collection of Calo MET.
virtual bool isBarrel(double eta)
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
double et() const final
transverse energy
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:98
T sqrt(T t)
Definition: SSEVec.h:18
virtual bool isForward(double eta)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::CaloJetCollection calojet
bool isValid() const
Definition: HandleBase.h:74
edm::Handle< reco::CaloJetCollection > calojetColl_
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
T const * product() const
Definition: Handle.h:81
met
===> hadronic RAZOR
std::vector< size_type > Keys
edm::Handle< trigger::TriggerEvent > triggerObj_
edm::Handle< reco::CaloMETCollection > calometColl_
double phi() const final
momentum azimuthal angle
PathInfoCollection hltPathsEff_
Collection of PF MET.
void JetMETHLTOfflineSource::fillMEforMonAllTrigger ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Definition at line 465 of file JetMETHLTOfflineSource.cc.

References calojetColl_, CaloJetEta, CaloJetPhi, CaloJetPt, CaloJetPx, CaloJetPy, calometColl_, gather_cfg::cout, hiPixelPairStep_cff::deltaPhi, deltaR(), stringResolutionProvider_cfi::et, reco::LeafCandidate::et(), PVValHelper::eta, trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::getObjects(), hltPathsAll_, isBarrel(), isEndCap(), isForward(), isHLTPathAccepted(), edm::HandleBase::isValid(), RazorAnalyzer::met, pfjetColl_, PFJetEta, PFJetPhi, PFJetPt, PFJetPx, PFJetPy, pfmetColl_, phi, reco::LeafCandidate::phi(), processname_, edm::Handle< T >::product(), EnergyCorrector::pt, trigger::TriggerEvent::sizeFilters(), trigger::TriggerJet, trigger::TriggerMET, triggerObj_, triggerResults_, trigger::TriggerTET, findQualityFiles::v, and verbose_.

Referenced by analyze().

466 {
467  if (verbose_)
468  cout << ">> Inside fillMEforMonAllTrigger " << endl;
469  if(!triggerResults_.isValid()) return;
470  if (verbose_)
471  cout << " ... and triggerResults is valid" << endl;
472 
474  for(auto & v : hltPathsAll_){
475  if (verbose_)
476  cout << " + Checking path " << v.getPath();
477  if(isHLTPathAccepted(v.getPath())==false) {
478  if (verbose_)
479  cout << " - failed" << endl;
480  continue;
481  }
482  if (verbose_)
483  cout << " - PASSED! " << endl;
484 
485  //New jet collection (after apply JEC)
486  std::vector<double>jetPtVec;
487  std::vector<double>jetPhiVec;
488  std::vector<double>jetEtaVec;
489  std::vector<double>jetPxVec;
490  std::vector<double>jetPyVec;
491  std::vector<double>hltPtVec;
492  std::vector<double>hltPhiVec;
493  std::vector<double>hltEtaVec;
494  std::vector<double>hltPxVec;
495  std::vector<double>hltPyVec;
496 
497  //This will be used to find out punch through trigger
498  //bool fillL1HLT = false;
499 
500  //L1 and HLT indices
501  if (verbose_) {
502  cout << " - L1Path = " << v.getl1Path() << endl;
503  cout << " - Label = " << v.getLabel() << endl;
504  }
505 
506  //edm::InputTag l1Tag(v->getl1Path(),"",processname_);
507  edm::InputTag l1Tag(v.getLabel(),"",processname_);
508  const int l1Index = triggerObj_->filterIndex(l1Tag);
509  if (verbose_)
510  cout << " - l1Index = " << l1Index << " - l1Tag = [" << l1Tag << "]" << endl;
511 
512 
513  edm::InputTag hltTag(v.getLabel(),"",processname_);
514  const int hltIndex = triggerObj_->filterIndex(hltTag);
515  if (verbose_)
516  cout << " - hltIndex = " << hltIndex << " - hltTag = [" << hltTag << "]" << endl;
517 
518 
519  //bool l1TrigBool = false;
520  bool hltTrigBool = false;
521  bool diJetFire = false;
522  int jetsize = 0;
523 
524  if ( l1Index >= triggerObj_->sizeFilters() ) {
525  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
526  if (verbose_)
527  cout << "[JetMETHLTOfflineSource::fillMEforMonAllTrigger] - No index l1Index="
528  << l1Index << " of that name \"" << l1Tag << "\"" << endl;
529  }
530  else {
531  //l1TrigBool = true;
532  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
533  //
534  if(v.getObjectType() == trigger::TriggerJet
535  && v.getTriggerType() == "SingleJet_Trigger")
536  v.getMEhisto_N_L1()->Fill(kl1.size());
537  //
538  auto ki = kl1.begin();
539  for(; ki != kl1.end(); ++ki){
540  double l1TrigEta = -100;
541  double l1TrigPhi = -100;
542  //
543  if(v.getObjectType() == trigger::TriggerJet){
544  l1TrigEta = toc[*ki].eta();
545  l1TrigPhi = toc[*ki].phi();
546  if(v.getTriggerType() == "SingleJet_Trigger"){
547  v.getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
548  if (isBarrel(toc[*ki].eta())) v.getMEhisto_PtBarrel_L1()->Fill(toc[*ki].pt());
549  if (isEndCap(toc[*ki].eta())) v.getMEhisto_PtEndcap_L1()->Fill(toc[*ki].pt());
550  if (isForward(toc[*ki].eta())) v.getMEhisto_PtForward_L1()->Fill(toc[*ki].pt());
551  v.getMEhisto_Eta_L1()->Fill(toc[*ki].eta());
552  v.getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
553  v.getMEhisto_EtaPhi_L1()->Fill(toc[*ki].eta(),toc[*ki].phi());
554  }
555  }
556  if(v.getObjectType() == trigger::TriggerMET ||
557  v.getObjectType() == trigger::TriggerTET){
558  v.getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
559  v.getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
560  }
561 
562  //-----------------------------------------------
563  if ( hltIndex >= triggerObj_->sizeFilters() ) {
564  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
565  if (verbose_)
566  cout << "[JetMETHLTOfflineSource::fillMEforMonAllTrigger] - No index hltIndex="
567  << hltIndex << " of that name " << endl;
568  }
569  else {
570  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
571  if(v.getObjectType() == trigger::TriggerJet
572  && ki == kl1.begin()
573  && v.getTriggerType() == "SingleJet_Trigger")
574  v.getMEhisto_N_HLT()->Fill(khlt.size());
575  //
576  auto kj = khlt.begin();
577  //Define hltTrigBool
578  for(;kj != khlt.end(); ++kj){
579  if(v.getObjectType() == trigger::TriggerJet){
580  double hltTrigEta = -100;
581  double hltTrigPhi = -100;
582  hltTrigEta = toc[*kj].eta();
583  hltTrigPhi = toc[*kj].phi();
584  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4
585  && (v.getTriggerType() == "DiJet_Trigger"))
586  hltTrigBool = true;
587  }
588  }
589  //
590  kj = khlt.begin();
591  for(;kj != khlt.end(); ++kj){
592  double hltTrigEta = -100.;
593  double hltTrigPhi = -100.;
594  //fillL1HLT = true;
595  //MET Triggers
596  if (verbose_)
597  cout << "+ MET Triggers plots" << endl;
598  if(v.getObjectType() == trigger::TriggerMET || (v.getObjectType() == trigger::TriggerTET)){
599  v.getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
600  v.getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
601  v.getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
602  v.getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
603  v.getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
604  v.getMEhisto_PhiResolution_L1HLT()->Fill(toc[*ki].phi()-toc[*kj].phi());
605  }
606  //Jet Triggers
607  if (verbose_)
608  cout << "+ Jet Trigger plots" << endl;
609  if(v.getObjectType() == trigger::TriggerJet){
610  if (verbose_)
611  cout << " - Going for those..." << endl;
612  hltTrigEta = toc[*kj].eta();
613  hltTrigPhi = toc[*kj].phi();
614  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4){
615  if(v.getTriggerType() == "SingleJet_Trigger"){
616  v.getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
617  v.getMEhisto_EtaCorrelation_L1HLT()->Fill(toc[*ki].eta(),toc[*kj].eta());
618  v.getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
619  v.getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
620  v.getMEhisto_EtaResolution_L1HLT()->Fill(toc[*ki].eta()-toc[*kj].eta());
621  v.getMEhisto_PhiResolution_L1HLT()->Fill(toc[*ki].phi()-toc[*kj].phi());
622  }
623  }
624  if(((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi) < 0.4 )
625  || ((v.getTriggerType() == "DiJet_Trigger") && hltTrigBool)) && !diJetFire){
626  if(v.getTriggerType() == "SingleJet_Trigger"){
627  v.getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
628  if (isBarrel(toc[*kj].eta())) v.getMEhisto_PtBarrel_HLT()->Fill(toc[*kj].pt());
629  if (isEndCap(toc[*kj].eta())) v.getMEhisto_PtEndcap_HLT()->Fill(toc[*kj].pt());
630  if (isForward(toc[*kj].eta())) v.getMEhisto_PtForward_HLT()->Fill(toc[*kj].pt());
631  v.getMEhisto_Eta_HLT()->Fill(toc[*kj].eta());
632  v.getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
633  v.getMEhisto_EtaPhi_HLT()->Fill(toc[*kj].eta(),toc[*kj].phi());
634  }
635 
636  //Calojet
637  if(calojetColl_.isValid()
638  && (v.getObjectType() == trigger::TriggerJet)
639  && (v.getPath() == "PFJet")){
640  //CaloJetCollection::const_iterator jet = calojet.begin();
641  //for(; jet != calojet.end(); ++jet) {
642  for(int iCalo=0; iCalo<2; iCalo++){
643  if(deltaR(hltTrigEta, hltTrigPhi, CaloJetEta[iCalo], CaloJetPhi[iCalo]) < 0.4){
644  jetsize++;
645  if(v.getTriggerType() == "SingleJet_Trigger"){
646  v.getMEhisto_Pt()->Fill(CaloJetPt[iCalo]);
647  if (isBarrel(CaloJetEta[iCalo])) v.getMEhisto_PtBarrel()->Fill(CaloJetPt[iCalo]);
648  if (isEndCap(CaloJetEta[iCalo])) v.getMEhisto_PtEndcap()->Fill(CaloJetPt[iCalo]);
649  if (isForward(CaloJetEta[iCalo])) v.getMEhisto_PtForward()->Fill(CaloJetPt[iCalo]);
650  //
651  v.getMEhisto_Eta()->Fill(CaloJetEta[iCalo]);
652  v.getMEhisto_Phi()->Fill(CaloJetPhi[iCalo]);
653  v.getMEhisto_EtaPhi()->Fill(CaloJetEta[iCalo],CaloJetPhi[iCalo]);
654  //
655  v.getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),CaloJetPt[iCalo]);
656  v.getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),CaloJetEta[iCalo]);
657  v.getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),CaloJetPhi[iCalo]);
658  //
659  v.getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-CaloJetPt[iCalo])/(toc[*kj].pt()));
660  v.getMEhisto_EtaResolution_HLTRecObj()->Fill(toc[*kj].eta()-CaloJetEta[iCalo]);
661  v.getMEhisto_PhiResolution_HLTRecObj()->Fill(toc[*kj].phi()-CaloJetPhi[iCalo]);
662  }
663 
664  //-------------------------------------------------------
665  if((v.getTriggerType() == "DiJet_Trigger")){
666  jetPhiVec.push_back(CaloJetPhi[iCalo]);
667  jetPtVec.push_back(CaloJetPt[iCalo]);
668  jetEtaVec.push_back(CaloJetEta[iCalo]);
669  jetPxVec.push_back(CaloJetPx[iCalo]);
670  jetPyVec.push_back(CaloJetPy[iCalo]);
671  //
672  hltPhiVec.push_back(toc[*kj].phi());
673  hltPtVec.push_back(toc[*kj].pt());
674  hltEtaVec.push_back(toc[*kj].eta());
675  hltPxVec.push_back(toc[*kj].px());
676  hltPyVec.push_back(toc[*kj].py());
677  }
678  }// matching jet
679  }// Jet Loop
680  }// valid calojet collection, with calojet trigger
681 
682  //PFJet trigger
683  if(pfjetColl_.isValid()
684  && (v.getObjectType() == trigger::TriggerJet)
685  && (v.getPath() != "PFJet")){
686  //PFJetCollection::const_iterator jet = pfjet.begin();
687  //for(; jet != pfjet.end(); ++jet){
688  for(int iPF=0; iPF<2; iPF++){
689  if(deltaR(hltTrigEta, hltTrigPhi, PFJetEta[iPF], PFJetPhi[iPF]) < 0.4){
690  jetsize++;
691  if(v.getTriggerType() == "SingleJet_Trigger"){
692  v.getMEhisto_Pt()->Fill(PFJetPt[iPF]);
693  if (isBarrel(PFJetEta[iPF])) v.getMEhisto_PtBarrel()->Fill(PFJetPt[iPF]);
694  if (isEndCap(PFJetEta[iPF])) v.getMEhisto_PtEndcap()->Fill(PFJetPt[iPF]);
695  if (isForward(PFJetEta[iPF])) v.getMEhisto_PtForward()->Fill(PFJetPt[iPF]);
696  //
697  v.getMEhisto_Eta()->Fill(PFJetEta[iPF]);
698  v.getMEhisto_Phi()->Fill(PFJetPhi[iPF]);
699  v.getMEhisto_EtaPhi()->Fill(PFJetEta[iPF],PFJetPhi[iPF]);
700  //
701  v.getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),PFJetPt[iPF]);
702  v.getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),PFJetEta[iPF]);
703  v.getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),PFJetPhi[iPF]);
704  //
705  v.getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-PFJetPt[iPF])/(toc[*kj].pt()));
706  v.getMEhisto_EtaResolution_HLTRecObj()->Fill(toc[*kj].eta()-PFJetEta[iPF]);
707  v.getMEhisto_PhiResolution_HLTRecObj()->Fill(toc[*kj].phi()-PFJetPhi[iPF]);
708  }
709 
710  //-------------------------------------------------------
711  if((v.getTriggerType() == "DiJet_Trigger")){
712  jetPhiVec.push_back(PFJetPhi[iPF]);
713  jetPtVec.push_back(PFJetPt[iPF]);
714  jetEtaVec.push_back(PFJetEta[iPF]);
715  jetPxVec.push_back(PFJetPx[iPF]);
716  jetPyVec.push_back(PFJetPy[iPF]);
717  //
718  hltPhiVec.push_back(toc[*kj].phi());
719  hltPtVec.push_back(toc[*kj].pt());
720  hltEtaVec.push_back(toc[*kj].eta());
721  hltPxVec.push_back(toc[*kj].px());
722  hltPyVec.push_back(toc[*kj].py());
723  }
724  }// matching jet
725  }//PFJet loop
726  }//valid pfjet collection, with pfjet trigger
727  //
728  }// hlt matching with l1
729  }// jet trigger
730 
731  //------------------------------------------------------
732  if(calometColl_.isValid()
733  && ((v.getObjectType() == trigger::TriggerMET) || (v.getObjectType() == trigger::TriggerTET))
734  && (v.getPath().find("HLT_PFMET")==std::string::npos)){
735  const CaloMETCollection *calometcol = calometColl_.product();
736  const CaloMET met = calometcol->front();
737  //
738  v.getMEhisto_Pt()->Fill(met.et());
739  v.getMEhisto_Phi()->Fill(met.phi());
740  //
741  v.getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].et(),met.et());
742  v.getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),met.phi());
743  v.getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].et()-met.et())/(toc[*kj].et()));
744  v.getMEhisto_PhiResolution_HLTRecObj()->Fill(toc[*kj].phi()-met.phi());
745  }
746 
747  //--------------------------------------------------------
748  if(pfmetColl_.isValid()
749  && ((v.getObjectType() == trigger::TriggerMET) || (v.getObjectType() == trigger::TriggerTET))
750  && (v.getPath().find("HLT_PFMET")!=std::string::npos)){
751  const PFMETCollection *pfmetcol = pfmetColl_.product();
752  const PFMET pfmet = pfmetcol->front();
753  //
754  v.getMEhisto_Pt()->Fill(pfmet.et());
755  v.getMEhisto_Phi()->Fill(pfmet.phi());
756  //
757  v.getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].et(),pfmet.et());
758  v.getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),pfmet.phi());
759  v.getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].et()-pfmet.et())/(toc[*kj].et()));
760  v.getMEhisto_PhiResolution_HLTRecObj()->Fill(toc[*kj].phi()-pfmet.phi());
761  }
762  }//Loop over HLT trigger candidates
763  if((v.getTriggerType() == "DiJet_Trigger")) diJetFire = true;
764  }// Valid hlt trigger object
765  }// Loop over L1 objects
766  }// Valid L1 trigger object
767  v.getMEhisto_N()->Fill(jetsize);
768 
769  //--------------------------------------------------------
770  if((v.getTriggerType() == "DiJet_Trigger") && jetPtVec.size() >1){
771  double AveJetPt = (jetPtVec[0] + jetPtVec[1])/2;
772  double AveJetEta = (jetEtaVec[0] + jetEtaVec[1])/2;
773  double JetDelPhi = deltaPhi(jetPhiVec[0],jetPhiVec[1]);
774  double AveHLTPt = (hltPtVec[0] + hltPtVec[1])/2;
775  double AveHLTEta = (hltEtaVec[0] + hltEtaVec[1])/2;
776  double HLTDelPhi = deltaPhi(hltPhiVec[0],hltPhiVec[1]);
777  v.getMEhisto_AveragePt_RecObj()->Fill(AveJetPt);
778  v.getMEhisto_AverageEta_RecObj()->Fill(AveJetEta);
779  v.getMEhisto_DeltaPhi_RecObj()->Fill(JetDelPhi);
780  //
781  v.getMEhisto_AveragePt_HLTObj()->Fill(AveHLTPt);
782  v.getMEhisto_AverageEta_HLTObj()->Fill(AveHLTEta);
783  v.getMEhisto_DeltaPhi_HLTObj()->Fill(HLTDelPhi);
784  }
785 
786  }
787  if (verbose_)
788  cout << "<< Exiting fillMEforMonAllTrigger " << endl;
789 
790 }
virtual bool isEndCap(double eta)
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
edm::Handle< reco::PFJetCollection > pfjetColl_
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:123
edm::Handle< edm::TriggerResults > triggerResults_
edm::Handle< reco::PFMETCollection > pfmetColl_
Collection of Calo MET.
virtual bool isBarrel(double eta)
double et() const final
transverse energy
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:98
virtual bool isForward(double eta)
bool isValid() const
Definition: HandleBase.h:74
virtual bool isHLTPathAccepted(std::string pathName)
edm::Handle< reco::CaloJetCollection > calojetColl_
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
T const * product() const
Definition: Handle.h:81
met
===> hadronic RAZOR
std::vector< size_type > Keys
PathInfoCollection hltPathsAll_
edm::Handle< trigger::TriggerEvent > triggerObj_
et
define resolution functions of each parameter
edm::Handle< reco::CaloMETCollection > calometColl_
double phi() const final
momentum azimuthal angle
Collection of PF MET.
void JetMETHLTOfflineSource::fillMEforMonTriggerSummary ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Definition at line 312 of file JetMETHLTOfflineSource.cc.

References correlation_All, correlation_AllWrtMB, correlation_AllWrtMu, gather_cfg::cout, MonitorElement::Fill(), edm::Event::getByToken(), hltConfig_, hltPathsAll_, isHLTPathAccepted(), MBTrigPaths_, MuonTrigPaths_, wplusjetsAnalysis_cfi::muTrig, NVertices, PVZ, rate_All, rate_AllWrtMB, rate_AllWrtMu, runStandalone_, HLTConfigProvider::size(), AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerName(), TriggerPosition(), findQualityFiles::v, verbose_, vertexToken, and w.

Referenced by analyze().

313 {
314  if (verbose_)
315  cout << ">> Inside fillMEforMonTriggerSummary " << endl;
316  bool muTrig = false;
317 
318  for(auto const & MuonTrigPath : MuonTrigPaths_){
319  const unsigned int nPath(hltConfig_.size());
320  for (unsigned int j=0; j!=nPath; ++j) {
321  std::string pathname = hltConfig_.triggerName(j);
322  if(pathname.find(MuonTrigPath) != std::string::npos){
323  if(isHLTPathAccepted(pathname)){
324  muTrig = true;
325  if(verbose_) cout<<"fillMEforMonTriggerSummary: Muon Match"<<endl;
326  }
327  }
328  if(muTrig) break;
329  }
330  if(muTrig) break;
331  }
332 
333  bool mbTrig = false;
334  for(auto const & MBTrigPath : MBTrigPaths_){
335  const unsigned int nPath(hltConfig_.size());
336  for (unsigned int j=0; j!=nPath; ++j) {
337  std::string pathname = hltConfig_.triggerName(j);
338  if(pathname.find(MBTrigPath) != std::string::npos){
339  if(isHLTPathAccepted(pathname)){
340  mbTrig = true;
341  if(verbose_) cout<<"fillMEforMonTriggerSummary: MinBias Match"<<endl;
342  }
343  }
344  if(mbTrig) break;
345  }
346  if(mbTrig) break;
347  }
348 
349  auto v = hltPathsAll_.begin();
350  for(; v!= hltPathsAll_.end(); ++v ){
351  bool trigFirst= false;
352  double binV = TriggerPosition(v->getPath());
353  if(isHLTPathAccepted(v->getPath())) trigFirst = true;
354  if(!trigFirst)continue;
355  if(trigFirst){
356  rate_All->Fill(binV);
357  correlation_All->Fill(binV,binV);
358  if(muTrig && runStandalone_){
359  rate_AllWrtMu->Fill(binV);
360  correlation_AllWrtMu->Fill(binV,binV);
361  }
362  if(mbTrig && runStandalone_){
363  rate_AllWrtMB->Fill(binV);
364  correlation_AllWrtMB->Fill(binV,binV);
365  }
366  }
367  for(auto w = v+1; w!= hltPathsAll_.end(); ++w ){
368  bool trigSec = false;
369  double binW = TriggerPosition(w->getPath());
370  if(isHLTPathAccepted(w->getPath()))trigSec = true;
371  if(trigSec && trigFirst){
372  correlation_All->Fill(binV,binW);
373  if(muTrig && runStandalone_) correlation_AllWrtMu->Fill(binV,binW);
374  if(mbTrig && runStandalone_) correlation_AllWrtMB->Fill(binV,binW);
375  }
376  if(!trigSec && trigFirst){
377  correlation_All->Fill(binW,binV);
378  if(muTrig && runStandalone_) correlation_AllWrtMu->Fill(binW,binV);
379  if(mbTrig && runStandalone_) correlation_AllWrtMB->Fill(binW,binV);
380  }
381  }
382  }
383 
384  //Vertex
386  iEvent.getByToken (vertexToken,Vtx);
387  int vtxcnt=0;
388  for (auto const & itv : *Vtx){
389  //if(vtxcnt>=20) break;
390  PVZ->Fill(itv.z());
391  //chi2vtx[vtxcnt] = itv->chi2();
392  //ndofvtx[vtxcnt] = itv->ndof();
393  //ntrkvtx[vtxcnt] = itv->tracksSize();
394  vtxcnt++;
395  }
396  NVertices->Fill(vtxcnt);
397 }
unsigned int size() const
number of trigger paths in trigger table
edm::EDGetTokenT< reco::VertexCollection > vertexToken
const std::string & triggerName(unsigned int triggerIndex) const
const double w
Definition: UKUtility.cc:23
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
virtual double TriggerPosition(std::string trigName)
void Fill(long long x)
std::vector< std::string > MBTrigPaths_
MonitorElement * correlation_AllWrtMu
std::vector< std::string > MuonTrigPaths_
virtual bool isHLTPathAccepted(std::string pathName)
PathInfoCollection hltPathsAll_
MonitorElement * correlation_AllWrtMB
void JetMETHLTOfflineSource::fillMEforTriggerNTfired ( )
privatevirtual

Definition at line 401 of file JetMETHLTOfflineSource.cc.

References edm::HLTGlobalStatus::accept(), calojet, calojetColl_, calometColl_, gather_cfg::cout, hiPixelPairStep_cff::deltaPhi, trigger::TriggerEvent::filterIndex(), hltPathsAll_, edm::HandleBase::isValid(), metsig::jet, RazorAnalyzer::met, processname_, edm::Handle< T >::product(), reco::LeafCandidate::pt(), edm::TriggerNames::size(), edm::TriggerNames::triggerIndex(), triggerNames_, triggerObj_, triggerResults_, findQualityFiles::v, and verbose_.

Referenced by analyze().

402 {
403  if (verbose_)
404  cout << ">> Inside fillMEforTriggerNTfired" << endl;
405  if(!triggerResults_.isValid()) return;
406  if (verbose_)
407  cout << " ... and triggerResults is valid" << endl;
408 
409  //
410  for(auto & v : hltPathsAll_){
411  unsigned index = triggerNames_.triggerIndex(v.getPath());
412  if (index < triggerNames_.size() ){
413  v.getMEhisto_TriggerSummary()->Fill(0.);
414  edm::InputTag l1Tag(v.getl1Path(),"",processname_);
415  const int l1Index = triggerObj_->filterIndex(l1Tag);
416  bool l1found = false;
417  if(l1Index < triggerObj_->sizeFilters() ) l1found = true;
418  if(!l1found)v.getMEhisto_TriggerSummary()->Fill(1.);
419  if(!l1found && !(triggerResults_->accept(index)))v.getMEhisto_TriggerSummary()->Fill(2.);
420  if(!l1found && (triggerResults_->accept(index)))v.getMEhisto_TriggerSummary()->Fill(3.);
421  if(l1found)v.getMEhisto_TriggerSummary()->Fill(4.);
422  if(l1found && (triggerResults_->accept(index)))v.getMEhisto_TriggerSummary()->Fill(5.);
423  if(l1found && !(triggerResults_->accept(index)))v.getMEhisto_TriggerSummary()->Fill(6.);
424  if(!(triggerResults_->accept(index)) && l1found){
425  //cout<<v->getTriggerType()<<endl;
426  if((v.getTriggerType() == "SingleJet_Trigger") && (calojetColl_.isValid()) && !calojet.empty()){
427  auto jet = calojet.begin();
428  v.getMEhisto_JetPt()->Fill(jet->pt());
429  v.getMEhisto_EtavsPt()->Fill(jet->eta(),jet->pt());
430  v.getMEhisto_PhivsPt()->Fill(jet->phi(),jet->pt());
431  }
432  // single jet trigger is not fired
433 
434  if((v.getTriggerType() == "DiJet_Trigger") && calojetColl_.isValid() && !calojet.empty()){
435  v.getMEhisto_JetSize()->Fill(calojet.size());
436  if (calojet.size()>=2){
437  auto jet = calojet.begin();
438  auto jet2= calojet.begin(); jet2++;
439  double jet3pt = 0.;
440  if(calojet.size()>2){
441  auto jet3 = jet2++;
442  jet3pt = jet3->pt();
443  }
444  v.getMEhisto_Pt12()->Fill((jet->pt()+jet2->pt())/2.);
445  v.getMEhisto_Eta12()->Fill((jet->eta()+jet2->eta())/2.);
446  v.getMEhisto_Phi12()->Fill(deltaPhi(jet->phi(),jet2->phi()));
447  v.getMEhisto_Pt3()->Fill(jet3pt);
448  v.getMEhisto_Pt12Pt3()->Fill((jet->pt()+jet2->pt())/2., jet3pt);
449  v.getMEhisto_Pt12Phi12()->Fill((jet->pt()+jet2->pt())/2., deltaPhi(jet->phi(),jet2->phi()));
450  }
451  }// di jet trigger is not fired
452 
453  if(((v.getTriggerType() == "MET_Trigger")|| (v.getTriggerType() == "TET_Trigger")) && calometColl_.isValid() ){
454  const CaloMETCollection *calometcol = calometColl_.product();
455  const CaloMET met = calometcol->front();
456  v.getMEhisto_JetPt()->Fill(met.pt());
457  }//MET trigger is not fired
458  } // L1 is fired
459  }//
460  }// trigger not fired
461 }
bool accept() const
Has at least one path accepted the event?
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:123
edm::Handle< edm::TriggerResults > triggerResults_
double pt() const final
transverse momentum
Strings::size_type size() const
Definition: TriggerNames.cc:39
Collection of Calo MET.
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
reco::CaloJetCollection calojet
bool isValid() const
Definition: HandleBase.h:74
edm::Handle< reco::CaloJetCollection > calojetColl_
T const * product() const
Definition: Handle.h:81
met
===> hadronic RAZOR
PathInfoCollection hltPathsAll_
edm::Handle< trigger::TriggerEvent > triggerObj_
edm::Handle< reco::CaloMETCollection > calometColl_
const std::string JetMETHLTOfflineSource::getL1ConditionModuleName ( const std::string &  pathname)
private

Definition at line 2963 of file JetMETHLTOfflineSource.cc.

References hltConfig_, HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmBeginRun().

2964 {
2965 
2966  // find L1 condition for numpath with numpath objecttype
2967  // find PSet for L1 global seed for numpath,
2968  // list module labels for numpath
2969  std::string l1pathname = "dummy";
2970 
2971  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
2972 
2973  for(auto & numpathmodule : numpathmodules) {
2974 
2975  if (hltConfig_.moduleType(numpathmodule) == "HLTLevel1GTSeed") {
2976  l1pathname = numpathmodule;
2977  break;
2978  }
2979  }
2980  return l1pathname;
2981 }
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
bool JetMETHLTOfflineSource::isBarrel ( double  eta)
privatevirtual

Definition at line 2984 of file JetMETHLTOfflineSource.cc.

References convertSQLitetoXML_cfg::output.

Referenced by fillMEforEffAllTrigger(), and fillMEforMonAllTrigger().

2984  {
2985  bool output = false;
2986  if (fabs(eta)<=1.3) output=true;
2987  return output;
2988 }
bool JetMETHLTOfflineSource::isEndCap ( double  eta)
privatevirtual

Definition at line 2991 of file JetMETHLTOfflineSource.cc.

References convertSQLitetoXML_cfg::output.

Referenced by fillMEforEffAllTrigger(), and fillMEforMonAllTrigger().

2991  {
2992  bool output = false;
2993  if (fabs(eta)<=3.0 && fabs(eta)>1.3) output=true;
2994  return output;
2995 }
bool JetMETHLTOfflineSource::isForward ( double  eta)
privatevirtual

Definition at line 2998 of file JetMETHLTOfflineSource.cc.

References convertSQLitetoXML_cfg::output.

Referenced by fillMEforEffAllTrigger(), and fillMEforMonAllTrigger().

2998  {
2999  bool output = false;
3000  if (fabs(eta)>3.0) output=true;
3001  return output;
3002 }
bool JetMETHLTOfflineSource::isHLTPathAccepted ( std::string  pathName)
privatevirtual

Definition at line 3016 of file JetMETHLTOfflineSource.cc.

References edm::HLTGlobalStatus::accept(), edm::HandleBase::isValid(), convertSQLitetoXML_cfg::output, edm::TriggerNames::size(), edm::TriggerNames::triggerIndex(), triggerNames_, and triggerResults_.

Referenced by fillMEforMonAllTrigger(), and fillMEforMonTriggerSummary().

3016  {
3017  // triggerResults_, triggerNames_ has to be defined first before calling this method
3018  bool output=false;
3019  if(triggerResults_.isValid()) {
3020  unsigned index = triggerNames_.triggerIndex(pathName);
3021  if(index < triggerNames_.size() && triggerResults_->accept(index)) output = true;
3022  }
3023  return output;
3024 }
bool accept() const
Has at least one path accepted the event?
edm::Handle< edm::TriggerResults > triggerResults_
Strings::size_type size() const
Definition: TriggerNames.cc:39
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
bool isValid() const
Definition: HandleBase.h:74
bool JetMETHLTOfflineSource::isTriggerObjectFound ( std::string  objectName)
privatevirtual

Definition at line 3048 of file JetMETHLTOfflineSource.cc.

References trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), gen::k, convertSQLitetoXML_cfg::output, processname_, trigger::TriggerEvent::sizeFilters(), and triggerObj_.

3048  {
3049  // processname_, triggerObj_ has to be defined before calling this method
3050  bool output=false;
3052  const int index = triggerObj_->filterIndex(testTag);
3053  if ( index >= triggerObj_->sizeFilters() ) {
3054  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< index << " of that name ";
3055  } else {
3056  const trigger::Keys & k = triggerObj_->filterKeys(index);
3057  if (!k.empty()) output=true;
3058  }
3059  return output;
3060 }
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:123
int k[5][pyjets_maxn]
std::vector< size_type > Keys
edm::Handle< trigger::TriggerEvent > triggerObj_
double JetMETHLTOfflineSource::TriggerPosition ( std::string  trigName)
privatevirtual

Definition at line 3028 of file JetMETHLTOfflineSource.cc.

References MonitorElement::getTH1(), pileupCalc::nbins, and rate_All.

Referenced by fillMEforMonTriggerSummary().

3028  {
3029  int nbins = rate_All->getTH1()->GetNbinsX();
3030  double binVal = -100;
3031  for(int ibin=1; ibin<nbins+1; ibin++)
3032  {
3033  const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
3034  if(binLabel[0]=='\0')continue;
3035  // std::string binLabel_str = string(binLabel);
3036  // if(binLabel_str.compare(trigName)!=0)continue;
3037  if(trigName!=binLabel)continue;
3038 
3039  if(trigName==binLabel){
3040  binVal = rate_All->getTH1()->GetBinCenter(ibin);
3041  break;
3042  }
3043  }
3044  return binVal;
3045 }
TH1 * getTH1() const
bool JetMETHLTOfflineSource::validPathHLT ( std::string  path)
privatevirtual

Definition at line 3005 of file JetMETHLTOfflineSource.cc.

References hltConfig_, convertSQLitetoXML_cfg::output, HLTConfigProvider::size(), and HLTConfigProvider::triggerName().

3005  {
3006  // hltConfig_ has to be defined first before calling this method
3007  bool output=false;
3008  for (unsigned int j=0; j!=hltConfig_.size(); ++j) {
3009  if (hltConfig_.triggerName(j) == pathname )
3010  output=true;
3011  }
3012  return output;
3013 }
unsigned int size() const
number of trigger paths in trigger table
const std::string & triggerName(unsigned int triggerIndex) const

Member Data Documentation

double JetMETHLTOfflineSource::_fEMF
private

Definition at line 114 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_feta
private

Definition at line 115 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_fHPD
private

Definition at line 116 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_max_CEMF
private

Definition at line 126 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_max_CHEF
private

Definition at line 122 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_max_NEMF
private

Definition at line 124 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_max_NHEF
private

Definition at line 120 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_min_CEMF
private

Definition at line 125 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_min_CHEF
private

Definition at line 121 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_min_NEMF
private

Definition at line 123 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_min_NHEF
private

Definition at line 119 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_n90Hits
private

Definition at line 117 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::_pfMHT
private

Definition at line 118 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforEffAllTrigger().

reco::CaloJetCollection JetMETHLTOfflineSource::calojet
private
edm::Handle<reco::CaloJetCollection> JetMETHLTOfflineSource::calojetColl_
private
edm::EDGetTokenT<reco::JetCorrector> JetMETHLTOfflineSource::CaloJetCorToken_
private

Definition at line 145 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::CaloJetEMF[2]
private

Definition at line 164 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

double JetMETHLTOfflineSource::CaloJetEta[2]
private
double JetMETHLTOfflineSource::CaloJetfHPD[2]
private

Definition at line 165 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

double JetMETHLTOfflineSource::CaloJetn90[2]
private

Definition at line 166 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

double JetMETHLTOfflineSource::CaloJetPhi[2]
private
double JetMETHLTOfflineSource::CaloJetPt[2]
private
double JetMETHLTOfflineSource::CaloJetPx[2]
private

Definition at line 159 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforMonAllTrigger().

double JetMETHLTOfflineSource::CaloJetPy[2]
private

Definition at line 160 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforMonAllTrigger().

edm::EDGetTokenT<reco::CaloJetCollection> JetMETHLTOfflineSource::caloJetsToken
private

Definition at line 136 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

edm::Handle<reco::CaloMETCollection> JetMETHLTOfflineSource::calometColl_
private
edm::EDGetTokenT<reco::CaloMETCollection> JetMETHLTOfflineSource::caloMetToken
private

Definition at line 137 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

MonitorElement* JetMETHLTOfflineSource::correlation_All
private

Definition at line 982 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and fillMEforMonTriggerSummary().

MonitorElement* JetMETHLTOfflineSource::correlation_AllWrtMB
private

Definition at line 984 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and fillMEforMonTriggerSummary().

MonitorElement* JetMETHLTOfflineSource::correlation_AllWrtMu
private

Definition at line 983 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and fillMEforMonTriggerSummary().

std::vector<std::pair<std::string, std::string> > JetMETHLTOfflineSource::custompathnamepairs_
private

Definition at line 150 of file JetMETHLTOfflineSource.h.

Referenced by dqmBeginRun(), and JetMETHLTOfflineSource().

std::string JetMETHLTOfflineSource::dirname_
private

Definition at line 100 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and JetMETHLTOfflineSource().

HLTConfigProvider JetMETHLTOfflineSource::hltConfig_
private
PathInfoCollection JetMETHLTOfflineSource::hltPathsAll_
private
PathInfoCollection JetMETHLTOfflineSource::hltPathsAllTriggerSummary_
private

Definition at line 974 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and dqmBeginRun().

PathInfoCollection JetMETHLTOfflineSource::hltPathsEff_
private

Definition at line 976 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), dqmBeginRun(), and fillMEforEffAllTrigger().

bool JetMETHLTOfflineSource::isSetup_
private

Definition at line 111 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and dqmBeginRun().

reco::helper::JetIDHelper* JetMETHLTOfflineSource::jetID
private
std::vector<std::string> JetMETHLTOfflineSource::MBTrigPaths_
private

Definition at line 97 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforMonTriggerSummary(), and JetMETHLTOfflineSource().

std::vector<std::string> JetMETHLTOfflineSource::MuonTrigPaths_
private
bool JetMETHLTOfflineSource::nameForEff_
private

Definition at line 112 of file JetMETHLTOfflineSource.h.

Referenced by dqmBeginRun(), and JetMETHLTOfflineSource().

MonitorElement* JetMETHLTOfflineSource::NVertices
private

Definition at line 986 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and fillMEforMonTriggerSummary().

std::vector<std::string> JetMETHLTOfflineSource::pathFilter_
private

Definition at line 148 of file JetMETHLTOfflineSource.h.

Referenced by dqmBeginRun(), and JetMETHLTOfflineSource().

std::vector<std::string> JetMETHLTOfflineSource::pathRejectKeyword_
private

Definition at line 149 of file JetMETHLTOfflineSource.h.

Referenced by dqmBeginRun(), and JetMETHLTOfflineSource().

reco::PFJetCollection JetMETHLTOfflineSource::pfjet
private

Definition at line 153 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

double JetMETHLTOfflineSource::PFJetCEMF[2]
private

Definition at line 176 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

double JetMETHLTOfflineSource::PFJetCHEF[2]
private

Definition at line 174 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

edm::Handle<reco::PFJetCollection> JetMETHLTOfflineSource::pfjetColl_
private
edm::EDGetTokenT<reco::JetCorrector> JetMETHLTOfflineSource::PFJetCorToken_
private

Definition at line 146 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::PFJetEta[2]
private
double JetMETHLTOfflineSource::PFJetNEMF[2]
private

Definition at line 175 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

double JetMETHLTOfflineSource::PFJetNHEF[2]
private

Definition at line 173 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

double JetMETHLTOfflineSource::PFJetPhi[2]
private
double JetMETHLTOfflineSource::PFJetPt[2]
private
double JetMETHLTOfflineSource::PFJetPx[2]
private

Definition at line 168 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforMonAllTrigger().

double JetMETHLTOfflineSource::PFJetPy[2]
private

Definition at line 169 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforMonAllTrigger().

edm::EDGetTokenT<reco::PFJetCollection> JetMETHLTOfflineSource::pfJetsToken
private

Definition at line 134 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

edm::Handle<reco::PFMETCollection> JetMETHLTOfflineSource::pfmetColl_
private
edm::EDGetTokenT<reco::PFMETCollection> JetMETHLTOfflineSource::pfMetToken
private

Definition at line 135 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

double JetMETHLTOfflineSource::pfMHTx_All
private

Definition at line 178 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

double JetMETHLTOfflineSource::pfMHTy_All
private

Definition at line 179 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and fillMEforEffAllTrigger().

bool JetMETHLTOfflineSource::plotAll_
private

Definition at line 108 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), bookHistograms(), and JetMETHLTOfflineSource().

bool JetMETHLTOfflineSource::plotEff_
private

Definition at line 109 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), bookHistograms(), and JetMETHLTOfflineSource().

std::vector<int> JetMETHLTOfflineSource::prescUsed_
private

Definition at line 98 of file JetMETHLTOfflineSource.h.

std::string JetMETHLTOfflineSource::processname_
private
MonitorElement* JetMETHLTOfflineSource::PVZ
private

Definition at line 985 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and fillMEforMonTriggerSummary().

MonitorElement* JetMETHLTOfflineSource::rate_All
private
MonitorElement* JetMETHLTOfflineSource::rate_AllWrtMB
private

Definition at line 980 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and fillMEforMonTriggerSummary().

MonitorElement* JetMETHLTOfflineSource::rate_AllWrtMu
private

Definition at line 979 of file JetMETHLTOfflineSource.h.

Referenced by bookHistograms(), and fillMEforMonTriggerSummary().

bool JetMETHLTOfflineSource::runStandalone_
private
edm::TriggerNames JetMETHLTOfflineSource::triggerNames_
private
edm::Handle<trigger::TriggerEvent> JetMETHLTOfflineSource::triggerObj_
private
edm::Handle<edm::TriggerResults> JetMETHLTOfflineSource::triggerResults_
private
edm::EDGetTokenT<edm::TriggerResults> JetMETHLTOfflineSource::triggerResultsFUToken
private

Definition at line 131 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

edm::InputTag JetMETHLTOfflineSource::triggerResultsLabel_
private

Definition at line 129 of file JetMETHLTOfflineSource.h.

Referenced by JetMETHLTOfflineSource().

edm::EDGetTokenT<edm::TriggerResults> JetMETHLTOfflineSource::triggerResultsToken
private

Definition at line 130 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

edm::EDGetTokenT<trigger::TriggerEvent> JetMETHLTOfflineSource::triggerSummaryFUToken
private

Definition at line 133 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

edm::InputTag JetMETHLTOfflineSource::triggerSummaryLabel_
private

Definition at line 128 of file JetMETHLTOfflineSource.h.

Referenced by JetMETHLTOfflineSource().

edm::EDGetTokenT<trigger::TriggerEvent> JetMETHLTOfflineSource::triggerSummaryToken
private

Definition at line 132 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

bool JetMETHLTOfflineSource::verbose_
private
edm::EDGetTokenT<reco::VertexCollection> JetMETHLTOfflineSource::vertexToken
private

Definition at line 138 of file JetMETHLTOfflineSource.h.

Referenced by fillMEforMonTriggerSummary(), and JetMETHLTOfflineSource().