CMS 3D CMS Logo

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

#include <JetMETHLTOfflineSource.h>

Inheritance diagram for JetMETHLTOfflineSource:
edm::EDAnalyzer

Classes

class  PathInfo
 
class  PathInfoCollection
 

Public Member Functions

 JetMETHLTOfflineSource (const edm::ParameterSet &)
 
 ~JetMETHLTOfflineSource ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
virtual void endJob ()
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic. More...
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 EndRun. More...
 
virtual void fillMEforEffAllTrigger (const edm::Event &iEvent)
 
virtual void fillMEforEffWrtMBTrigger (const edm::Event &iEvent)
 
virtual void fillMEforEffWrtMuTrigger (const edm::Event &iEvent)
 
virtual void fillMEforMonAllTrigger (const edm::Event &iEvent)
 
virtual void fillMEforMonAllTriggerwrtMuonTrigger (const edm::Event &iEvent)
 
virtual void fillMEforMonTriggerSummary ()
 
virtual void fillMEforTriggerNTfired ()
 
void histobooking (const edm::EventSetup &c)
 
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 _n90Hits
 
reco::CaloJetCollection calojet
 
edm::Handle
< reco::CaloJetCollection
calojetColl_
 
edm::InputTag caloJetsTag_
 
edm::Handle
< reco::CaloMETCollection
calometColl_
 
edm::InputTag caloMETTag_
 
MonitorElementcorrelation_All
 
MonitorElementcorrelation_AllWrtMB
 
MonitorElementcorrelation_AllWrtMu
 
std::vector< std::string > custompathname
 
std::vector< std::pair
< std::string, std::string > > 
custompathnamepairs_
 
DQMStoredbe
 
std::string dirname_
 
HLTConfigProvider hltConfig_
 
PathInfoCollection hltPathsAll_
 
PathInfoCollection hltPathsAllTriggerSummary_
 
PathInfoCollection hltPathsAllWrtMu_
 
PathInfoCollection hltPathsEff_
 
PathInfoCollection hltPathsEffWrtMB_
 
PathInfoCollection hltPathsEffWrtMu_
 
bool isSetup_
 
reco::helper::JetIDHelperjetID
 
std::vector< std::string > MBTrigPaths_
 
std::vector< std::string > MuonTrigPaths_
 
bool nameForEff_
 
int nev_
 
bool plotAll_
 
bool plotAllwrtMu_
 
bool plotEff_
 
std::vector< int > prescUsed_
 
std::string processname_
 
MonitorElementrate_All
 
MonitorElementrate_AllWrtMB
 
MonitorElementrate_AllWrtMu
 
MonitorElementscalersSelect
 
MonitorElementtotal_
 
edm::TriggerNames triggerNames_
 
edm::Handle
< trigger::TriggerEvent
triggerObj_
 
edm::Handle< edm::TriggerResultstriggerResults_
 
edm::InputTag triggerResultsLabel_
 
edm::InputTag triggerSummaryLabel_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 51 of file JetMETHLTOfflineSource.h.

Constructor & Destructor Documentation

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

Definition at line 39 of file JetMETHLTOfflineSource.cc.

References _fEMF, _feta, _fHPD, _n90Hits, caloJetsTag_, caloMETTag_, custompathname, custompathnamepairs_, dbe, dirname_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), jetID, LogDebug, MBTrigPaths_, MuonTrigPaths_, nameForEff_, cmsCodeRules.cppFunctionSkipper::operator, plotAll_, plotAllwrtMu_, plotEff_, processname_, DQMStore::setVerbose(), triggerResultsLabel_, triggerSummaryLabel_, and verbose_.

39  :
40  isSetup_(false)
41 {
42  LogDebug("JetMETHLTOfflineSource") << "constructor....";
43 
45  if ( ! dbe ) {
46  LogDebug("JetMETHLTOfflineSource") << "unabel to get DQMStore service?";
47  }
48  if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
49  dbe->setVerbose(0);
50  }
51 
52  dirname_ = iConfig.getUntrackedParameter("dirname",
53  std::string("HLT/JetMET/"));
54 
55 
56  processname_ = iConfig.getParameter<std::string>("processname");
57  verbose_ = iConfig.getUntrackedParameter< bool >("verbose", false);
58  plotAll_ = iConfig.getUntrackedParameter< bool >("plotAll", false);
59  plotAllwrtMu_ = iConfig.getUntrackedParameter< bool >("plotAllwrtMu", false);
60  plotEff_ = iConfig.getUntrackedParameter< bool >("plotEff", false);
61  nameForEff_ = iConfig.getUntrackedParameter< bool >("nameForEff", true);
62  jetID = new reco::helper::JetIDHelper(iConfig.getParameter<ParameterSet>("JetIDParams"));
63 
64  // plotting paramters
65  MuonTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMuon");
66  MBTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMB");
67  caloJetsTag_ = iConfig.getParameter<edm::InputTag>("CaloJetCollectionLabel");
68  caloMETTag_ = iConfig.getParameter<edm::InputTag>("CaloMETCollectionLabel");
69  triggerSummaryLabel_ = iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
70  triggerResultsLabel_ = iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
71  custompathname = iConfig.getUntrackedParameter<vector<std::string> >("paths");
72  _fEMF = iConfig.getUntrackedParameter< double >("fEMF", 0.01);
73  _feta = iConfig.getUntrackedParameter< double >("feta", 2.60);
74  _fHPD = iConfig.getUntrackedParameter< double >("fHPD", 0.98);
75  _n90Hits = iConfig.getUntrackedParameter< double >("n90Hits", 1.0);
76  // this is the list of paths to look at.
77  std::vector<edm::ParameterSet> paths = iConfig.getParameter<std::vector<edm::ParameterSet> >("pathPairs");
78  for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
79 
80  std::pair<std::string, std::string> custompathnamepair;
81  custompathnamepair.first =pathconf->getParameter<std::string>("pathname");
82  custompathnamepair.second = pathconf->getParameter<std::string>("denompathname");
83  custompathnamepairs_.push_back(custompathnamepair);
84  }
85 
86 
87 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > custompathname
std::vector< std::string > MBTrigPaths_
void setVerbose(unsigned level)
Definition: DQMStore.cc:201
std::vector< std::string > MuonTrigPaths_
std::vector< std::pair< std::string, std::string > > custompathnamepairs_
reco::helper::JetIDHelper * jetID
JetMETHLTOfflineSource::~JetMETHLTOfflineSource ( )

Definition at line 90 of file JetMETHLTOfflineSource.cc.

90  {
91 
92 
93  //
94  // do anything here that needs to be done at desctruction time
95  // (e.g. close files, deallocate resources etc.)
96 
97 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 101 of file JetMETHLTOfflineSource.cc.

References calojet, calojetColl_, caloJetsTag_, calometColl_, caloMETTag_, fillMEforEffAllTrigger(), fillMEforEffWrtMBTrigger(), fillMEforEffWrtMuTrigger(), fillMEforMonAllTrigger(), fillMEforMonAllTriggerwrtMuonTrigger(), fillMEforMonTriggerSummary(), fillMEforTriggerNTfired(), edm::Event::getByLabel(), edm::InputTag::instance(), edm::HandleBase::isValid(), edm::InputTag::label(), CaloMET_cfi::met, plotAll_, plotAllwrtMu_, plotEff_, edm::Handle< T >::product(), dt_offlineAnalysis_common_cff::reco, edm::Event::triggerNames(), triggerNames_, triggerObj_, triggerResults_, triggerResultsLabel_, and triggerSummaryLabel_.

101  {
102  using namespace edm;
103  using namespace trigger;
104  using namespace reco;
105  //---------- triggerResults ----------
107  if(!triggerResults_.isValid()) {
108  edm::InputTag triggerResultsLabelFU(triggerResultsLabel_.label(),triggerResultsLabel_.instance(), "FU");
109  iEvent.getByLabel(triggerResultsLabelFU,triggerResults_);
110  if(!triggerResults_.isValid()) {
111  edm::LogInfo("FourVectorHLTOffline") << "TriggerResults not found, "
112  "skipping event";
113  return;
114  }
115  }
116 
117  int npath;
118  if(&triggerResults_) {
119 
120  // Check how many HLT triggers are in triggerResults
121  npath = triggerResults_->size();
123 
124 
125  } else {
126 
127  edm::LogInfo("CaloMETHLTOfflineSource") << "TriggerResults::HLT not found, "
128  "automatically select events";
129  return;
130 
131  }
132  //---------- triggerSummary ----------
134  if(!triggerObj_.isValid()) {
135  edm::InputTag triggerSummaryLabelFU(triggerSummaryLabel_.label(),triggerSummaryLabel_.instance(), "FU");
136  iEvent.getByLabel(triggerSummaryLabelFU,triggerObj_);
137  if(!triggerObj_.isValid()) {
138  edm::LogInfo("FourVectorHLTOffline") << "TriggerEvent not found, "
139  "skipping event";
140  return;
141  }
142  }
143  //------------Offline Objects-------
144  bool ValidJetColl_ = iEvent.getByLabel(caloJetsTag_,calojetColl_);
145  if(!ValidJetColl_)return;
146  calojet = *calojetColl_;
147  std::stable_sort( calojet.begin(), calojet.end(), PtSorter() );
148 
149  bool ValidMETColl_ = iEvent.getByLabel(caloMETTag_, calometColl_);
150  if(!ValidMETColl_)return;
151 
152  if(calometColl_.isValid()){
153  const CaloMETCollection *calometcol = calometColl_.product();
154  const CaloMET met = calometcol->front();
155  }
157  if(plotAll_)fillMEforMonAllTrigger(iEvent);
159  if(plotEff_)
160  {
161  fillMEforEffAllTrigger(iEvent);
162  fillMEforEffWrtMuTrigger(iEvent);
163  fillMEforEffWrtMBTrigger(iEvent);
164  }
166 }
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
edm::Handle< edm::TriggerResults > triggerResults_
virtual void fillMEforMonAllTrigger(const edm::Event &iEvent)
Collection of Calo MET.
virtual void fillMEforMonTriggerSummary()
virtual void fillMEforEffAllTrigger(const edm::Event &iEvent)
reco::CaloJetCollection calojet
virtual void fillMEforEffWrtMBTrigger(const edm::Event &iEvent)
virtual void fillMEforEffWrtMuTrigger(const edm::Event &iEvent)
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
edm::Handle< reco::CaloJetCollection > calojetColl_
edm::Handle< trigger::TriggerEvent > triggerObj_
T const * product() const
Definition: Handle.h:74
std::string const & label() const
Definition: InputTag.h:25
edm::Handle< reco::CaloMETCollection > calometColl_
virtual void fillMEforMonAllTriggerwrtMuonTrigger(const edm::Event &iEvent)
std::string const & instance() const
Definition: InputTag.h:26
void JetMETHLTOfflineSource::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1204 of file JetMETHLTOfflineSource.cc.

1204  {
1205 
1206 }
void JetMETHLTOfflineSource::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 3064 of file JetMETHLTOfflineSource.cc.

3065  {
3066 }
void JetMETHLTOfflineSource::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1209 of file JetMETHLTOfflineSource.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookFloat(), correlation_All, correlation_AllWrtMB, correlation_AllWrtMu, gather_cfg::cout, custompathnamepairs_, dbe, TrackerOfflineValidation_Dqm_cff::dirName, dirname_, reco::tau::disc::Eta(), MonitorElement::getTH1(), h, hltConfig_, hltPathsAll_, hltPathsAllTriggerSummary_, hltPathsAllWrtMu_, hltPathsEff_, hltPathsEffWrtMB_, hltPathsEffWrtMu_, i, HLTConfigProvider::init(), isSetup_, reco::tau::disc::JetPt(), LogDebug, MBTrigPaths_, CaloMET_cfi::met, HLTConfigProvider::moduleLabels(), HLTConfigProvider::moduleType(), MuonTrigPaths_, MultiGaussianStateTransform::N, n, nameForEff_, ExpressReco_HICollisions_FallBack::nbins, cmsCodeRules.cppFunctionSkipper::operator, colinearityKinematic::Phi, plotAll_, plotAllwrtMu_, plotEff_, processname_, reco::tau::disc::Pt(), rate_All, rate_AllWrtMB, rate_AllWrtMu, DQMStore::rmdir(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), HLTConfigProvider::size(), indexGen::title, trigger::TriggerJet, trigger::TriggerMET, HLTConfigProvider::triggerName(), v, and verbose_.

1209  {
1210  if(!isSetup_)
1211  {
1212  DQMStore *dbe = 0;
1213  dbe = Service<DQMStore>().operator->();
1214  if (dbe) {
1216  dbe->rmdir(dirname_);
1217  }
1218  if (dbe) {
1220  }
1221 
1222  //--- htlConfig_
1223  bool changed(true);
1224  if (!hltConfig_.init(run, c, processname_, changed)) {
1225  LogDebug("HLTJetMETDQMSource") << "HLTConfigProvider failed to initialize.";
1226  }
1227 
1228 
1229 
1230  /*
1231  Here we select the Single Jet, DiJet, MET trigger. SingleJet and DiJet trigger are saved under same object type "TriggerJet". We can easily separate out sing
1232  le and di jet trigger later. For the first trigger in the list, denominator trigger is dummy (empty) whereas for other triggers denom is previous trigger o
1233  f same type. e.g. SingleJet50 has singleJet30 as denominator.
1234  For defining histos wrt muon trigger, denominator is always set "MuonTrigger". This string later can be checked and condition can be applied on muon triggers
1235  .
1236  */
1237 
1238  const unsigned int n(hltConfig_.size());
1239  int singleJet = 0;
1240  int diJet = 0;
1241  int met = 0;
1242  for (unsigned int i=0; i!=n; ++i) {
1243  bool denomFound = false;
1244  bool numFound = false;
1245  bool mbFound = false;
1246  bool muFound = false;
1247  std::string pathname = hltConfig_.triggerName(i);
1248  if(verbose_)cout<<"==pathname=="<<pathname<<endl;
1249  std::string dpathname = MuonTrigPaths_[0];
1250  std::string l1pathname = "dummy";
1251  std::string denompathname = "";
1252  unsigned int usedPrescale = 1;
1253  unsigned int objectType = 0;
1254  std::string triggerType = "";
1255  std::string filtername("dummy");
1256  std::string Denomfiltername("denomdummy");
1257 
1258  if (pathname.find("Jet") != std::string::npos && !(pathname.find("DoubleJet") != std::string::npos) && !(pathname.find("DiJet") != std::string::npos) && !(pathname.find("BTag") != std::string::npos) && !(pathname.find("Mu") != std::string::npos) && !(pathname.find("Fwd") != std::string::npos)){
1259  triggerType = "SingleJet_Trigger";
1260  objectType = trigger::TriggerJet;
1261  }
1262  if (pathname.find("DiJet") != std::string::npos || pathname.find("DoubleJet") != std::string::npos){
1263  triggerType = "DiJet_Trigger";
1264  objectType = trigger::TriggerJet;
1265  }
1266  if (pathname.find("MET") != std::string::npos || pathname.find("HT") != std::string::npos){
1267  triggerType = "MET_Trigger";
1268  objectType = trigger::TriggerMET;
1269  }
1270 
1271 
1272  if(objectType == trigger::TriggerJet && !(pathname.find("DiJet") != std::string::npos) && !(pathname.find("DoubleJet") != std::string::npos))
1273  {
1274  singleJet++;
1275  if(singleJet > 1)dpathname = dpathname = hltConfig_.triggerName(i-1);
1276  if(singleJet == 1)dpathname = MuonTrigPaths_[0];
1277  }
1278 
1279  if(objectType == trigger::TriggerJet && (pathname.find("DiJet") != std::string::npos))
1280  {
1281  diJet++;
1282  if(diJet > 1)dpathname = dpathname = hltConfig_.triggerName(i-1);
1283  if(diJet == 1)dpathname = MuonTrigPaths_[0];
1284  }
1285  if(objectType == trigger::TriggerMET )
1286  {
1287  met++;
1288  if(met > 1)dpathname = dpathname = hltConfig_.triggerName(i-1);
1289  if(met == 1)dpathname = MuonTrigPaths_[0];
1290  }
1291  // find L1 condition for numpath with numpath objecttype
1292  // find PSet for L1 global seed for numpath,
1293  // list module labels for numpath
1294  // Checking if the trigger exist in HLT table or not
1295  for (unsigned int i=0; i!=n; ++i) {
1296  std::string HLTname = hltConfig_.triggerName(i);
1297  if(HLTname == pathname)numFound = true;
1298  if(HLTname == dpathname)denomFound = true;
1299  if(HLTname == MBTrigPaths_[0])mbFound = true;
1300  if(HLTname == MuonTrigPaths_[0])muFound = true;
1301  }
1302 
1303  if(numFound)//make trigger exist in the menu
1304  {
1305  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
1306  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1307  edm::InputTag testTag(*numpathmodule,"",processname_);
1308  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")|| (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter") || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" ) || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )filtername = *numpathmodule;
1309  if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed")l1pathname = *numpathmodule;
1310  }
1311  }
1312 
1313  if(objectType != 0 && denomFound)
1314  {
1315  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
1316  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1317  edm::InputTag testTag(*numpathmodule,"",processname_);
1318  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")|| (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter") || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" ) || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )Denomfiltername = *numpathmodule;
1319  }
1320  }
1321 
1322  if(objectType != 0 && numFound)
1323  {
1324  if(verbose_)cout<<"==pathname=="<<pathname<<"==denompath=="<<dpathname<<"==filtername=="<<filtername<<"==denomfiltername=="<<Denomfiltername<<"==l1pathname=="<<l1pathname<<"==objectType=="<<objectType<<endl;
1325  if(!((pathname.find("HT") != std::string::npos) || (pathname.find("Quad") != std::string::npos)))
1326  {
1327  hltPathsAll_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
1328  if(muFound)hltPathsAllWrtMu_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
1329  if(muFound)hltPathsEffWrtMu_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
1330  if(mbFound)hltPathsEffWrtMB_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
1331 
1332  if(!nameForEff_ && denomFound) hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
1333  }
1334 
1335  hltPathsAllTriggerSummary_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
1336 
1337  }
1338  } //Loop over paths
1339 
1340  //---------bool to pick trigger names pair from config file-------------
1341  if(nameForEff_)
1342  {
1343  std::string l1pathname = "dummy";
1344  std::string denompathname = "";
1345  unsigned int usedPrescale = 1;
1346  unsigned int objectType = 0;
1347  std::string triggerType = "";
1348  std::string filtername("dummy");
1349  std::string Denomfiltername("denomdummy");
1350  for (std::vector<std::pair<std::string, std::string> >::iterator custompathnamepair = custompathnamepairs_.begin(); custompathnamepair != custompathnamepairs_.end(); ++custompathnamepair)
1351  {
1352  std::string pathname = custompathnamepair->first;
1353  std::string dpathname = custompathnamepair->second;
1354  bool numFound = false;
1355  bool denomFound = false;
1356  // Checking if the trigger exist in HLT table or not
1357  for (unsigned int i=0; i!=n; ++i) {
1358  std::string HLTname = hltConfig_.triggerName(i);
1359  if(HLTname == pathname)numFound = true;
1360  if(HLTname == dpathname)denomFound = true;
1361  }
1362  if(numFound && denomFound)
1363  {
1364  if (pathname.find("Jet") != std::string::npos && !(pathname.find("DiJet") != std::string::npos) && !(pathname.find("DoubleJet") != std::string::npos) && !(pathname.find("BTag") != std::string::npos) && !(pathname.find("Mu") != std::string::npos) && !(pathname.find("Fwd") != std::string::npos)){
1365  triggerType = "SingleJet_Trigger";
1366  objectType = trigger::TriggerJet;
1367  }
1368  if (pathname.find("DiJet") != std::string::npos || pathname.find("DoubleJet") != std::string::npos ){
1369  triggerType = "DiJet_Trigger";
1370  objectType = trigger::TriggerJet;
1371  }
1372  if (pathname.find("MET") != std::string::npos ){
1373  triggerType = "MET_Trigger";
1374  objectType = trigger::TriggerMET;
1375  }
1376 
1377  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
1378  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1379  edm::InputTag testTag(*numpathmodule,"",processname_);
1380  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")|| (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter") || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" ) || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )filtername = *numpathmodule;
1381  if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed")l1pathname = *numpathmodule;
1382  }
1383 
1384  if(objectType != 0)
1385  {
1386  std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
1387  for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
1388  edm::InputTag testTag(*numpathmodule,"",processname_);
1389  if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")|| (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter") || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" ) || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )Denomfiltername = *numpathmodule;
1390  }
1391 
1392  if(verbose_)cout<<"==pathname=="<<pathname<<"==denompath=="<<dpathname<<"==filtername=="<<filtername<<"==denomfiltername=="<<Denomfiltername<<"==l1pathname=="<<l1pathname<<"==objectType=="<<objectType<<endl;
1393  hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
1394 
1395  }
1396  }
1397  }
1398  }
1399  //-----------------------------------------------------------------
1400  //---book trigger summary histos
1401  if(!isSetup_)
1402  {
1403  std::string foldernm = "/TriggerSummary/";
1404  if (dbe) {
1405  dbe->setCurrentFolder(dirname_ + foldernm);
1406  }
1407  int TrigBins_ = hltPathsAllTriggerSummary_.size();
1408  double TrigMin_ = -0.5;
1409  double TrigMax_ = hltPathsAllTriggerSummary_.size()-0.5;
1410  std::string histonm="JetMET_TriggerRate";
1411  std::string histot="JetMET TriggerRate Summary";
1412 
1413  rate_All = dbe->book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
1414 
1415 
1416  histonm="JetMET_TriggerRate_Correlation";
1417  histot="JetMET TriggerRate Correlation Summary;y&&!x;x&&y";
1418 
1419  correlation_All = dbe->book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
1420 
1421 
1422  histonm="JetMET_TriggerRate_WrtMuTrigger";
1423  histot="JetMET TriggerRate Summary Wrt Muon Trigger ";
1424 
1425  rate_AllWrtMu = dbe->book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
1426 
1427 
1428  histonm="JetMET_TriggerRate_Correlation_WrtMuTrigger";
1429  histot="JetMET TriggerRate Correlation Summary Wrt Muon Trigger;y&&!x;x&&y";
1430 
1431  correlation_AllWrtMu = dbe->book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
1432 
1433  histonm="JetMET_TriggerRate_WrtMBTrigger";
1434  histot="JetMET TriggerRate Summary Wrt MB Trigger";
1435 
1436  rate_AllWrtMB = dbe->book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
1437 
1438 
1439  histonm="JetMET_TriggerRate_Correlation_WrtMBTrigger";
1440  histot="JetMET TriggerRate Correlation Wrt MB Trigger;y&&!x;x&&y";
1441 
1442  correlation_AllWrtMB = dbe->book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
1443  isSetup_ = true;
1444 
1445  }
1446  //---Set bin label
1447 
1448  for(PathInfoCollection::iterator v = hltPathsAllTriggerSummary_.begin(); v!= hltPathsAllTriggerSummary_.end(); ++v ){
1449  std::string labelnm("dummy");
1450  labelnm = v->getPath();
1451  int nbins = rate_All->getTH1()->GetNbinsX();
1452  for(int ibin=1; ibin<nbins+1; ibin++)
1453  {
1454  const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
1455  std::string binLabel_str = string(binLabel);
1456  if(binLabel_str.compare(labelnm)==0)break;
1457  if(binLabel[0]=='\0')
1458  {
1459  rate_All->setBinLabel(ibin,labelnm);
1460  rate_AllWrtMu->setBinLabel(ibin,labelnm);
1461  rate_AllWrtMB->setBinLabel(ibin,labelnm);
1462  correlation_All->setBinLabel(ibin,labelnm,1);
1463  correlation_AllWrtMu->setBinLabel(ibin,labelnm,1);
1464  correlation_AllWrtMB->setBinLabel(ibin,labelnm,1);
1465  correlation_All->setBinLabel(ibin,labelnm,2);
1466  correlation_AllWrtMu->setBinLabel(ibin,labelnm,2);
1467  correlation_AllWrtMB->setBinLabel(ibin,labelnm,2);
1468  break;
1469  }
1470  }
1471 
1472  }
1473 
1474  // Now define histos for All triggers
1475  if(plotAll_)
1476  {
1477  int Nbins_ = 10;
1478  int Nmin_ = -0.5;
1479  int Nmax_ = 9.5;
1480  int Ptbins_ = 40;
1481  int Etabins_ = 40;
1482  int Phibins_ = 35;
1483  int Resbins_ = 30;
1484  double PtMin_ = 0.;
1485  double PtMax_ = 200.;
1486  double EtaMin_ = -5.;
1487  double EtaMax_ = 5.;
1488  double PhiMin_ = -3.14159;
1489  double PhiMax_ = 3.14159;
1490  double ResMin_ = -1.5;
1491  double ResMax_ = 1.5;
1492  std::string dirName = dirname_ + "/MonitorAllTriggers/";
1493  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
1494 
1495  std::string subdirName = dirName + v->getPath();
1496  std::string trigPath = "("+v->getPath()+")";
1497  dbe->setCurrentFolder(subdirName);
1498 
1499  MonitorElement *dummy, *N, *Pt, *PtBarrel, *PtEndcap, *PtForward, *Eta, *Phi, *EtaPhi,
1500  *N_L1, *Pt_L1, *PtBarrel_L1, *PtEndcap_L1, *PtForward_L1, *Eta_L1, *Phi_L1, *EtaPhi_L1,
1501  *N_HLT, *Pt_HLT, *PtBarrel_HLT, *PtEndcap_HLT, *PtForward_HLT, *Eta_HLT, *Phi_HLT, *EtaPhi_HLT,
1502  *PtResolution_L1HLT, *EtaResolution_L1HLT,*PhiResolution_L1HLT,
1503  *PtResolution_HLTRecObj, *EtaResolution_HLTRecObj,*PhiResolution_HLTRecObj,
1504  *PtCorrelation_L1HLT,*EtaCorrelation_L1HLT,*PhiCorrelation_L1HLT,
1505  *PtCorrelation_HLTRecObj,*EtaCorrelation_HLTRecObj,*PhiCorrelation_HLTRecObj,
1506  *jetAveragePt, *jetAverageEta, *jetPhiDifference, *hltAveragePt, *hltAverageEta, *hltPhiDifference;
1507 
1508  dummy = dbe->bookFloat("dummy");
1509  N = dbe->bookFloat("N");
1510  Pt = dbe->bookFloat("Pt");
1511  PtBarrel = dbe->bookFloat("PtBarrel");
1512  PtEndcap = dbe->bookFloat("PtEndcap");
1513  PtForward = dbe->bookFloat("PtForward");
1514  Eta = dbe->bookFloat("Eta");
1515  Phi = dbe->bookFloat("Phi");
1516  EtaPhi = dbe->bookFloat("EtaPhi");
1517  N_L1 = dbe->bookFloat("N_L1");
1518  Pt_L1 = dbe->bookFloat("Pt_L1");
1519  PtBarrel_L1 = dbe->bookFloat("PtBarrel_L1");
1520  PtEndcap_L1 = dbe->bookFloat("PtEndcap_L1");
1521  PtForward_L1 = dbe->bookFloat("PtForward_L1");
1522  Eta_L1 = dbe->bookFloat("Eta_L1");
1523  Phi_L1 = dbe->bookFloat("Phi_L1");
1524  EtaPhi_L1 = dbe->bookFloat("EtaPhi_L1");
1525 
1526  N_HLT = dbe->bookFloat("N_HLT");
1527  Pt_HLT = dbe->bookFloat("Pt_HLT");
1528  PtBarrel_HLT = dbe->bookFloat("PtBarrel_HLT");
1529  PtEndcap_HLT = dbe->bookFloat("PtEndcap_HLT");
1530  PtForward_HLT = dbe->bookFloat("PtForward_HLT");
1531  Eta_HLT = dbe->bookFloat("Eta_HLT");
1532  Phi_HLT = dbe->bookFloat("Phi_HLT");
1533  EtaPhi_HLT = dbe->bookFloat("EtaPhi_HLT");
1534 
1535  PtResolution_L1HLT = dbe->bookFloat("PtResolution_L1HLT");
1536  EtaResolution_L1HLT = dbe->bookFloat("EtaResolution_L1HLT");
1537  PhiResolution_L1HLT = dbe->bookFloat("PhiResolution_L1HLT");
1538  PtResolution_HLTRecObj = dbe->bookFloat("PtResolution_HLTRecObj");
1539  EtaResolution_HLTRecObj = dbe->bookFloat("EtaResolution_HLTRecObj");
1540  PhiResolution_HLTRecObj = dbe->bookFloat("PhiResolution_HLTRecObj");
1541  PtCorrelation_L1HLT = dbe->bookFloat("PtCorrelation_L1HLT");
1542  EtaCorrelation_L1HLT = dbe->bookFloat("EtaCorrelation_L1HLT");
1543  PhiCorrelation_L1HLT = dbe->bookFloat("PhiCorrelation_L1HLT");
1544  PtCorrelation_HLTRecObj = dbe->bookFloat("PtCorrelation_HLTRecObj");
1545  EtaCorrelation_HLTRecObj = dbe->bookFloat("EtaCorrelation_HLTRecObj");
1546  PhiCorrelation_HLTRecObj = dbe->bookFloat("PhiCorrelation_HLTRecObj");
1547 
1548  jetAveragePt = dbe->bookFloat("jetAveragePt");
1549  jetAverageEta = dbe->bookFloat("jetAverageEta");
1550  jetPhiDifference = dbe->bookFloat("jetPhiDifference");
1551  hltAveragePt = dbe->bookFloat("hltAveragePt");
1552  hltAverageEta = dbe->bookFloat("hltAverageEta");
1553  hltPhiDifference = dbe->bookFloat("hltPhiDifference");
1554 
1555  std::string labelname("ME");
1556  std::string histoname(labelname+"");
1557  std::string title(labelname+"");
1558  if(v->getObjectType() == trigger::TriggerJet)
1559  {
1560 
1561  histoname = labelname+"_recObjN";
1562  title = labelname+"_recObjN;Reco multiplicity()"+trigPath;
1563  N = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
1564  TH1 *h = N->getTH1();
1565  h->Sumw2();
1566 
1567  histoname = labelname+"_recObjPt";
1568  title = labelname+"_recObjPt; Reco Pt[GeV/c]"+trigPath;
1569  Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1570  h = Pt->getTH1();
1571  h->Sumw2();
1572 
1573  histoname = labelname+"_recObjPtBarrel";
1574  title = labelname+"_recObjPtBarrel;Reco Pt[GeV/c]"+trigPath;
1575  PtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1576  h = PtBarrel->getTH1();
1577  h->Sumw2();
1578 
1579  histoname = labelname+"_recObjPtEndcap";
1580  title = labelname+"_recObjPtEndcap;Reco Pt[GeV/c]"+trigPath;
1581  PtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1582  h = PtEndcap->getTH1();
1583  h->Sumw2();
1584 
1585  histoname = labelname+"_recObjPtForward";
1586  title = labelname+"_recObjPtForward;Reco Pt[GeV/c]"+trigPath;
1587  PtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1588  h = PtForward->getTH1();
1589  h->Sumw2();
1590 
1591  histoname = labelname+"_recObjEta";
1592  title = labelname+"_recObjEta;Reco #eta"+trigPath;
1593  Eta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1594  h = Eta->getTH1();
1595  h->Sumw2();
1596 
1597  histoname = labelname+"_recObjPhi";
1598  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
1599  Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1600  h = Phi->getTH1();
1601  h->Sumw2();
1602 
1603  histoname = labelname+"_recObjEtaPhi";
1604  title = labelname+"_recObjEtaPhi;Reco #eta;Reco #Phi"+trigPath;
1605  EtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
1606  h = EtaPhi->getTH1();
1607  h->Sumw2();
1608 
1609 
1610  histoname = labelname+"_l1ObjN";
1611  title = labelname+"_l1ObjN;L1 multiplicity"+trigPath;
1612  N_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
1613  h = N_L1->getTH1();
1614  h->Sumw2();
1615 
1616  histoname = labelname+"_l1ObjPt";
1617  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
1618  Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1619  h = Pt_L1->getTH1();
1620  h->Sumw2();
1621 
1622  histoname = labelname+"_l1ObjPtBarrel";
1623  title = labelname+"_l1ObjPtBarrel;L1 Pt[GeV/c]"+trigPath;
1624  PtBarrel_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1625  h = PtBarrel_L1->getTH1();
1626  h->Sumw2();
1627 
1628  histoname = labelname+"_l1ObjPtEndcap";
1629  title = labelname+"_l1ObjPtEndcap;L1 Pt[GeV/c]"+trigPath;
1630  PtEndcap_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1631  h = PtEndcap_L1->getTH1();
1632  h->Sumw2();
1633 
1634  histoname = labelname+"_l1ObjPtForward";
1635  title = labelname+"_l1ObjPtForward;L1 Pt[GeV/c]"+trigPath;
1636  PtForward_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1637  h = PtForward_L1->getTH1();
1638  h->Sumw2();
1639 
1640  histoname = labelname+"_l1ObjEta";
1641  title = labelname+"_l1ObjEta;L1 #eta"+trigPath;
1642  Eta_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1643  h = Eta_L1->getTH1();
1644  h->Sumw2();
1645 
1646  histoname = labelname+"_l1ObjPhi";
1647  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
1648  Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1649  h = Phi_L1->getTH1();
1650  h->Sumw2();
1651 
1652  histoname = labelname+"_l1ObjEtaPhi";
1653  title = labelname+"_l1ObjEtaPhi;L1 #eta;L1 #Phi"+trigPath;
1654  EtaPhi_L1 = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
1655  h = EtaPhi_L1->getTH1();
1656  h->Sumw2();
1657 
1658  histoname = labelname+"_hltObjN";
1659  title = labelname+"_hltObjN;HLT multiplicity"+trigPath;
1660  N_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
1661  h = N_HLT->getTH1();
1662  h->Sumw2();
1663 
1664  histoname = labelname+"_hltObjPt";
1665  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
1666  Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1667  h = Pt_HLT->getTH1();
1668  h->Sumw2();
1669 
1670  histoname = labelname+"_hltObjPtBarrel";
1671  title = labelname+"_hltObjPtBarrel;HLT Pt[GeV/c]"+trigPath;
1672  PtBarrel_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1673  h = PtBarrel_HLT->getTH1();
1674  h->Sumw2();
1675 
1676  histoname = labelname+"_hltObjPtEndcap";
1677  title = labelname+"_hltObjPtEndcap;HLT Pt[GeV/c]"+trigPath;
1678  PtEndcap_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1679  h = PtEndcap_HLT->getTH1();
1680  h->Sumw2();
1681 
1682  histoname = labelname+"_hltObjPtForward";
1683  title = labelname+"_hltObjPtForward;HLT Pt[GeV/c]"+trigPath;
1684  PtForward_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1685  h = PtForward_HLT->getTH1();
1686  h->Sumw2();
1687 
1688  histoname = labelname+"_hltObjEta";
1689  title = labelname+"_hltObjEta;HLT #eta"+trigPath;
1690  Eta_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1691  h = Eta_HLT->getTH1();
1692  h->Sumw2();
1693 
1694  histoname = labelname+"_hltObjPhi";
1695  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
1696  Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1697  h = Phi_HLT->getTH1();
1698  h->Sumw2();
1699 
1700  histoname = labelname+"_hltObjEtaPhi";
1701  title = labelname+"_hltObjEtaPhi;HLT #eta;HLT #Phi"+trigPath;
1702  EtaPhi_HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
1703  h = EtaPhi_HLT->getTH1();
1704  h->Sumw2();
1705 
1706  histoname = labelname+"_l1HLTPtResolution";
1707  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
1708  PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1709  h = PtResolution_L1HLT->getTH1();
1710  h->Sumw2();
1711 
1712  histoname = labelname+"_l1HLTEtaResolution";
1713  title = labelname+"_l1HLTEtaResolution;(#eta(L1)-#eta(HLT))/#eta(L1)"+trigPath;
1714  EtaResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1715  h = EtaResolution_L1HLT->getTH1();
1716  h->Sumw2();
1717 
1718  histoname = labelname+"_l1HLTPhiResolution";
1719  title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
1720  PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1721  h = PhiResolution_L1HLT->getTH1();
1722  h->Sumw2();
1723 
1724  histoname = labelname+"_l1HLTPtCorrelation";
1725  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
1726  PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1727  h = PtCorrelation_L1HLT->getTH1();
1728  h->Sumw2();
1729 
1730  histoname = labelname+"_l1HLTEtaCorrelation";
1731  title = labelname+"_l1HLTEtaCorrelation;#eta(L1);#eta(HLT)"+trigPath;
1732  EtaCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
1733  h = EtaCorrelation_L1HLT->getTH1();
1734  h->Sumw2();
1735 
1736  histoname = labelname+"_l1HLTPhiCorrelation";
1737  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
1738  PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1739  h = PhiCorrelation_L1HLT->getTH1();
1740  h->Sumw2();
1741 
1742 
1743  histoname = labelname+"_hltRecObjPtResolution";
1744  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
1745  PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1746  h = PtResolution_HLTRecObj->getTH1();
1747  h->Sumw2();
1748 
1749  histoname = labelname+"_hltRecObjEtaResolution";
1750  title = labelname+"_hltRecObjEtaResolution;(#eta(HLT)-#eta(Reco))/#eta(HLT)"+trigPath;
1751  EtaResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1752  h = EtaResolution_HLTRecObj->getTH1();
1753  h->Sumw2();
1754 
1755  histoname = labelname+"_hltRecObjPhiResolution";
1756  title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
1757  PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1758  h = PhiResolution_HLTRecObj->getTH1();
1759  h->Sumw2();
1760 
1761 
1762  histoname = labelname+"_hltRecObjPtCorrelation";
1763  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
1764  PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1765  h = PtCorrelation_HLTRecObj->getTH1();
1766  h->Sumw2();
1767 
1768  histoname = labelname+"_hltRecObjEtaCorrelation";
1769  title = labelname+"_hltRecObjEtaCorrelation;#eta(HLT);#eta(Reco)"+trigPath;
1770  EtaCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
1771  h = EtaCorrelation_HLTRecObj->getTH1();
1772  h->Sumw2();
1773 
1774  histoname = labelname+"_hltRecObjPhiCorrelation";
1775  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
1776  PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1777  h = PhiCorrelation_HLTRecObj->getTH1();
1778  h->Sumw2();
1779 
1780  if((v->getTriggerType().compare("DiJet_Trigger") == 0))
1781  {
1782  histoname = labelname+"_RecObjAveragePt";
1783  title = labelname+"_RecObjAveragePt;Reco Average Pt[GeV/c]"+trigPath;
1784  jetAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1785  h = jetAveragePt->getTH1();
1786  h->Sumw2();
1787 
1788  histoname = labelname+"_RecObjAverageEta";
1789  title = labelname+"_RecObjAverageEta;Reco Average #eta"+trigPath;
1790  jetAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1791  h = jetAverageEta->getTH1();
1792  h->Sumw2();
1793 
1794  histoname = labelname+"_RecObjPhiDifference";
1795  title = labelname+"_RecObjPhiDifference;Reco #Delta#Phi"+trigPath;
1796  jetPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1797  h = jetPhiDifference->getTH1();
1798  h->Sumw2();
1799 
1800  histoname = labelname+"_hltObjAveragePt";
1801  title = labelname+"_hltObjAveragePt;HLT Average Pt[GeV/c]"+trigPath;
1802  hltAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1803  h = hltAveragePt->getTH1();
1804  h->Sumw2();
1805 
1806  histoname = labelname+"_hltObjAverageEta";
1807  title = labelname+"_hltObjAverageEta;HLT Average #eta"+trigPath;
1808  hltAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
1809  h = hltAverageEta->getTH1();
1810  h->Sumw2();
1811 
1812  histoname = labelname+"_hltObjPhiDifference";
1813  title = labelname+"_hltObjPhiDifference;Reco #Delta#Phi"+trigPath;
1814  hltPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1815  h = hltPhiDifference->getTH1();
1816  h->Sumw2();
1817 
1818  }
1819 
1820  }// histos for Jet Triggers
1821 
1822 
1823  if(v->getObjectType() == trigger::TriggerMET)
1824  {
1825  histoname = labelname+"_recObjPt";
1826  title = labelname+"_recObjPt;Reco Pt[GeV/c]"+trigPath;
1827  Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1828  TH1 *h = Pt->getTH1();
1829  h->Sumw2();
1830 
1831 
1832  histoname = labelname+"_recObjPhi";
1833  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
1834  Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1835  h = Phi->getTH1();
1836  h->Sumw2();
1837 
1838  histoname = labelname+"_l1ObjPt";
1839  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
1840  Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1841  h = Pt_L1->getTH1();
1842  h->Sumw2();
1843 
1844 
1845  histoname = labelname+"_l1ObjPhi";
1846  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
1847  Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1848  h = Phi_L1->getTH1();
1849  h->Sumw2();
1850 
1851 
1852  histoname = labelname+"_hltObjPt";
1853  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
1854  Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
1855  h = Pt_HLT->getTH1();
1856  h->Sumw2();
1857 
1858 
1859  histoname = labelname+"_hltObjPhi";
1860  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
1861  Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
1862  h = Phi_HLT->getTH1();
1863  h->Sumw2();
1864 
1865 
1866  histoname = labelname+"_l1HLTPtResolution";
1867  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
1868  PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1869  h = PtResolution_L1HLT->getTH1();
1870  h->Sumw2();
1871 
1872 
1873  histoname = labelname+"_l1HLTPhiResolution";
1874  title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
1875  PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1876  h = PhiResolution_L1HLT->getTH1();
1877  h->Sumw2();
1878 
1879 
1880 
1881  histoname = labelname+"_l1HLTPtCorrelation";
1882  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
1883  PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1884  h = PtCorrelation_L1HLT->getTH1();
1885  h->Sumw2();
1886 
1887 
1888  histoname = labelname+"_l1HLTPhiCorrelation";
1889  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
1890  PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1891  h = PhiCorrelation_L1HLT->getTH1();
1892  h->Sumw2();
1893 
1894 
1895  histoname = labelname+"_hltRecObjPtResolution";
1896  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
1897  PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1898  h = PtResolution_HLTRecObj->getTH1();
1899  h->Sumw2();
1900 
1901 
1902  histoname = labelname+"_hltRecObjPhiResolution";
1903  title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
1904  PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
1905  h = PhiResolution_HLTRecObj->getTH1();
1906  h->Sumw2();
1907 
1908 
1909 
1910  histoname = labelname+"_hltRecObjPtCorrelation";
1911  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
1912  PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
1913  h = PtCorrelation_HLTRecObj->getTH1();
1914  h->Sumw2();
1915 
1916 
1917  histoname = labelname+"_hltRecObjPhiCorrelation";
1918  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
1919  PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
1920  h = PhiCorrelation_HLTRecObj->getTH1();
1921  h->Sumw2();
1922 
1923 
1924  }// histos for MET Triggers
1925 
1926  v->setHistos( N, Pt, PtBarrel, PtEndcap, PtForward, Eta, Phi, EtaPhi,
1927  N_L1, Pt_L1, PtBarrel_L1, PtEndcap_L1, PtForward_L1, Eta_L1, Phi_L1, EtaPhi_L1,
1928  N_HLT, Pt_HLT, PtBarrel_HLT, PtEndcap_HLT, PtForward_HLT, Eta_HLT, Phi_HLT, EtaPhi_HLT,
1929  PtResolution_L1HLT, EtaResolution_L1HLT,PhiResolution_L1HLT,
1930  PtResolution_HLTRecObj,EtaResolution_HLTRecObj,PhiResolution_HLTRecObj,
1931  PtCorrelation_L1HLT,EtaCorrelation_L1HLT,PhiCorrelation_L1HLT,
1932  PtCorrelation_HLTRecObj,EtaCorrelation_HLTRecObj,PhiCorrelation_HLTRecObj,
1933  jetAveragePt, jetAverageEta, jetPhiDifference, hltAveragePt, hltAverageEta, hltPhiDifference,
1934  dummy, dummy, dummy);
1935 
1936  }
1937 
1938  }
1939  if(plotAllwrtMu_)
1940  {
1941  int Nbins_ = 10;
1942  int Nmin_ = -0.5;
1943  int Nmax_ = 9.5;
1944  int Ptbins_ = 40;
1945  int Etabins_ = 40;
1946  int Phibins_ = 35;
1947  int Resbins_ = 30;
1948  double PtMin_ = 0.;
1949  double PtMax_ = 200.;
1950  double EtaMin_ = -5.;
1951  double EtaMax_ = 5.;
1952  double PhiMin_ = -3.14159;
1953  double PhiMax_ = 3.14159;
1954  double ResMin_ = -1.5;
1955  double ResMax_ = 1.5;
1956  // Now define histos wrt Muon trigger
1957  std::string dirName = dirname_ + "/MonitorAllTriggersWrtMuonTrigger/";
1958  for(PathInfoCollection::iterator v = hltPathsAllWrtMu_.begin(); v!= hltPathsAllWrtMu_.end(); ++v ){
1959 
1960  std::string subdirName = dirName + v->getPath();
1961  std::string trigPath = "("+v->getPath()+")";
1962  dbe->setCurrentFolder(subdirName);
1963 
1964 
1965  MonitorElement *dummy, *N, *Pt, *PtBarrel, *PtEndcap, *PtForward, *Eta, *Phi, *EtaPhi,
1966  *N_L1, *Pt_L1, *PtBarrel_L1, *PtEndcap_L1, *PtForward_L1, *Eta_L1, *Phi_L1, *EtaPhi_L1,
1967  *N_HLT, *Pt_HLT, *PtBarrel_HLT, *PtEndcap_HLT, *PtForward_HLT, *Eta_HLT, *Phi_HLT, *EtaPhi_HLT,
1968  *PtResolution_L1HLT, *EtaResolution_L1HLT,*PhiResolution_L1HLT,
1969  *PtResolution_HLTRecObj, *EtaResolution_HLTRecObj,*PhiResolution_HLTRecObj,
1970  *PtCorrelation_L1HLT,*EtaCorrelation_L1HLT,*PhiCorrelation_L1HLT,
1971  *PtCorrelation_HLTRecObj,*EtaCorrelation_HLTRecObj,*PhiCorrelation_HLTRecObj,
1972  *jetAveragePt, *jetAverageEta, *jetPhiDifference, *hltAveragePt, *hltAverageEta, *hltPhiDifference;
1973 
1974  dummy = dbe->bookFloat("dummy");
1975  N = dbe->bookFloat("N");
1976  Pt = dbe->bookFloat("Pt");
1977  PtBarrel = dbe->bookFloat("PtBarrel");
1978  PtEndcap = dbe->bookFloat("PtEndcap");
1979  PtForward = dbe->bookFloat("PtForward");
1980  Eta = dbe->bookFloat("Eta");
1981  Phi = dbe->bookFloat("Phi");
1982  EtaPhi = dbe->bookFloat("EtaPhi");
1983  N_L1 = dbe->bookFloat("N_L1");
1984  Pt_L1 = dbe->bookFloat("Pt_L1");
1985  PtBarrel_L1 = dbe->bookFloat("PtBarrel_L1");
1986  PtEndcap_L1 = dbe->bookFloat("PtEndcap_L1");
1987  PtForward_L1 = dbe->bookFloat("PtForward_L1");
1988  Eta_L1 = dbe->bookFloat("Eta_L1");
1989  Phi_L1 = dbe->bookFloat("Phi_L1");
1990  EtaPhi_L1 = dbe->bookFloat("EtaPhi_L1");
1991 
1992  N_HLT = dbe->bookFloat("N_HLT");
1993  Pt_HLT = dbe->bookFloat("Pt_HLT");
1994  PtBarrel_HLT = dbe->bookFloat("PtBarrel_HLT");
1995  PtEndcap_HLT = dbe->bookFloat("PtEndcap_HLT");
1996  PtForward_HLT = dbe->bookFloat("PtForward_HLT");
1997  Eta_HLT = dbe->bookFloat("Eta_HLT");
1998  Phi_HLT = dbe->bookFloat("Phi_HLT");
1999  EtaPhi_HLT = dbe->bookFloat("EtaPhi_HLT");
2000 
2001  PtResolution_L1HLT = dbe->bookFloat("PtResolution_L1HLT");
2002  EtaResolution_L1HLT = dbe->bookFloat("EtaResolution_L1HLT");
2003  PhiResolution_L1HLT = dbe->bookFloat("PhiResolution_L1HLT");
2004  PtResolution_HLTRecObj = dbe->bookFloat("PtResolution_HLTRecObj");
2005  EtaResolution_HLTRecObj = dbe->bookFloat("EtaResolution_HLTRecObj");
2006  PhiResolution_HLTRecObj = dbe->bookFloat("PhiResolution_HLTRecObj");
2007  PtCorrelation_L1HLT = dbe->bookFloat("PtCorrelation_L1HLT");
2008  EtaCorrelation_L1HLT = dbe->bookFloat("EtaCorrelation_L1HLT");
2009  PhiCorrelation_L1HLT = dbe->bookFloat("PhiCorrelation_L1HLT");
2010  PtCorrelation_HLTRecObj = dbe->bookFloat("PtCorrelation_HLTRecObj");
2011  EtaCorrelation_HLTRecObj = dbe->bookFloat("EtaCorrelation_HLTRecObj");
2012  PhiCorrelation_HLTRecObj = dbe->bookFloat("PhiCorrelation_HLTRecObj");
2013 
2014  jetAveragePt = dbe->bookFloat("jetAveragePt");
2015  jetAverageEta = dbe->bookFloat("jetAverageEta");
2016  jetPhiDifference = dbe->bookFloat("jetPhiDifference");
2017  hltAveragePt = dbe->bookFloat("hltAveragePt");
2018  hltAverageEta = dbe->bookFloat("hltAverageEta");
2019  hltPhiDifference = dbe->bookFloat("hltPhiDifference");
2020  std::string labelname("ME");
2021  std::string histoname(labelname+"");
2022  std::string title(labelname+"");
2023  if(v->getObjectType() == trigger::TriggerJet)
2024  {
2025 
2026  histoname = labelname+"_recObjN";
2027  title = labelname+"_recObjN;Reco multiplicity()"+trigPath;
2028  N = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
2029  TH1 *h = N->getTH1();
2030  h->Sumw2();
2031 
2032  histoname = labelname+"_recObjPt";
2033  title = labelname+"_recObjPt; Reco Pt[GeV/c]"+trigPath;
2034  Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2035  h = Pt->getTH1();
2036  h->Sumw2();
2037 
2038  histoname = labelname+"_recObjPtBarrel";
2039  title = labelname+"_recObjPtBarrel;Reco Pt[GeV/c]"+trigPath;
2040  PtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2041  h = PtBarrel->getTH1();
2042  h->Sumw2();
2043 
2044  histoname = labelname+"_recObjPtEndcap";
2045  title = labelname+"_recObjPtEndcap;Reco Pt[GeV/c]"+trigPath;
2046  PtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2047  h = PtEndcap->getTH1();
2048  h->Sumw2();
2049 
2050  histoname = labelname+"_recObjPtForward";
2051  title = labelname+"_recObjPtForward;Reco Pt[GeV/c]"+trigPath;
2052  PtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2053  h = PtForward->getTH1();
2054  h->Sumw2();
2055 
2056  histoname = labelname+"_recObjEta";
2057  title = labelname+"_recObjEta;Reco #eta"+trigPath;
2058  Eta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2059  h = Eta->getTH1();
2060  h->Sumw2();
2061 
2062  histoname = labelname+"_recObjPhi";
2063  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
2064  Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2065  h = Phi->getTH1();
2066  h->Sumw2();
2067 
2068  histoname = labelname+"_recObjEtaPhi";
2069  title = labelname+"_recObjEtaPhi;Reco #eta;Reco #Phi"+trigPath;
2070  EtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2071  h = EtaPhi->getTH1();
2072  h->Sumw2();
2073 
2074 
2075  histoname = labelname+"_l1ObjN";
2076  title = labelname+"_l1ObjN;L1 multiplicity"+trigPath;
2077  N_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
2078  h = N_L1->getTH1();
2079  h->Sumw2();
2080 
2081  histoname = labelname+"_l1ObjPt";
2082  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
2083  Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2084  h = Pt_L1->getTH1();
2085  h->Sumw2();
2086 
2087  histoname = labelname+"_l1ObjPtBarrel";
2088  title = labelname+"_l1ObjPtBarrel;L1 Pt[GeV/c]"+trigPath;
2089  PtBarrel_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2090  h = PtBarrel_L1->getTH1();
2091  h->Sumw2();
2092 
2093  histoname = labelname+"_l1ObjPtEndcap";
2094  title = labelname+"_l1ObjPtEndcap;L1 Pt[GeV/c]"+trigPath;
2095  PtEndcap_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2096  h = PtEndcap_L1->getTH1();
2097  h->Sumw2();
2098 
2099  histoname = labelname+"_l1ObjPtForward";
2100  title = labelname+"_l1ObjPtForward;L1 Pt[GeV/c]"+trigPath;
2101  PtForward_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2102  h = PtForward_L1->getTH1();
2103  h->Sumw2();
2104 
2105  histoname = labelname+"_l1ObjEta";
2106  title = labelname+"_l1ObjEta;L1 #eta"+trigPath;
2107  Eta_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2108  h = Eta_L1->getTH1();
2109  h->Sumw2();
2110 
2111  histoname = labelname+"_l1ObjPhi";
2112  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
2113  Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2114  h = Phi_L1->getTH1();
2115  h->Sumw2();
2116 
2117  histoname = labelname+"_l1ObjEtaPhi";
2118  title = labelname+"_l1ObjEtaPhi;L1 #eta;L1 #Phi"+trigPath;
2119  EtaPhi_L1 = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2120  h = EtaPhi_L1->getTH1();
2121  h->Sumw2();
2122 
2123  histoname = labelname+"_hltObjN";
2124  title = labelname+"_hltObjN;HLT multiplicity"+trigPath;
2125  N_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
2126  h = N_HLT->getTH1();
2127  h->Sumw2();
2128 
2129  histoname = labelname+"_hltObjPt";
2130  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
2131  Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2132  h = Pt_HLT->getTH1();
2133  h->Sumw2();
2134 
2135  histoname = labelname+"_hltObjPtBarrel";
2136  title = labelname+"_hltObjPtBarrel;HLT Pt[GeV/c]"+trigPath;
2137  PtBarrel_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2138  h = PtBarrel_HLT->getTH1();
2139  h->Sumw2();
2140 
2141  histoname = labelname+"_hltObjPtEndcap";
2142  title = labelname+"_hltObjPtEndcap;HLT Pt[GeV/c]"+trigPath;
2143  PtEndcap_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2144  h = PtEndcap_HLT->getTH1();
2145  h->Sumw2();
2146 
2147  histoname = labelname+"_hltObjPtForward";
2148  title = labelname+"_hltObjPtForward;HLT Pt[GeV/c]"+trigPath;
2149  PtForward_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2150  h = PtForward_HLT->getTH1();
2151  h->Sumw2();
2152 
2153  histoname = labelname+"_hltObjEta";
2154  title = labelname+"_hltObjEta;HLT #eta"+trigPath;
2155  Eta_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2156  h = Eta_HLT->getTH1();
2157  h->Sumw2();
2158 
2159  histoname = labelname+"_hltObjPhi";
2160  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
2161  Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2162  h = Phi_HLT->getTH1();
2163  h->Sumw2();
2164 
2165  histoname = labelname+"_hltObjEtaPhi";
2166  title = labelname+"_hltObjEtaPhi;HLT #eta;HLT #Phi"+trigPath;
2167  EtaPhi_HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2168  h = EtaPhi_HLT->getTH1();
2169  h->Sumw2();
2170 
2171  histoname = labelname+"_l1HLTPtResolution";
2172  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
2173  PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2174  h = PtResolution_L1HLT->getTH1();
2175  h->Sumw2();
2176 
2177  histoname = labelname+"_l1HLTEtaResolution";
2178  title = labelname+"_l1HLTEtaResolution;(#eta(L1)-#eta(HLT))/#eta(L1)"+trigPath;
2179  EtaResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2180  h = EtaResolution_L1HLT->getTH1();
2181  h->Sumw2();
2182 
2183  histoname = labelname+"_l1HLTPhiResolution";
2184  title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
2185  PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2186  h = PhiResolution_L1HLT->getTH1();
2187  h->Sumw2();
2188 
2189  histoname = labelname+"_l1HLTPtCorrelation";
2190  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
2191  PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
2192  h = PtCorrelation_L1HLT->getTH1();
2193  h->Sumw2();
2194 
2195  histoname = labelname+"_l1HLTEtaCorrelation";
2196  title = labelname+"_l1HLTEtaCorrelation;#eta(L1);#eta(HLT)"+trigPath;
2197  EtaCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
2198  h = EtaCorrelation_L1HLT->getTH1();
2199  h->Sumw2();
2200 
2201  histoname = labelname+"_l1HLTPhiCorrelation";
2202  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
2203  PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
2204  h = PhiCorrelation_L1HLT->getTH1();
2205  h->Sumw2();
2206 
2207 
2208  histoname = labelname+"_hltRecObjPtResolution";
2209  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
2210  PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2211  h = PtResolution_HLTRecObj->getTH1();
2212  h->Sumw2();
2213 
2214  histoname = labelname+"_hltRecObjEtaResolution";
2215  title = labelname+"_hltRecObjEtaResolution;(#eta(HLT)-#eta(Reco))/#eta(HLT)"+trigPath;
2216  EtaResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2217  h = EtaResolution_HLTRecObj->getTH1();
2218  h->Sumw2();
2219 
2220  histoname = labelname+"_hltRecObjPhiResolution";
2221  title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
2222  PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2223  h = PhiResolution_HLTRecObj->getTH1();
2224  h->Sumw2();
2225 
2226 
2227  histoname = labelname+"_hltRecObjPtCorrelation";
2228  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
2229  PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
2230  h = PtCorrelation_HLTRecObj->getTH1();
2231  h->Sumw2();
2232 
2233  histoname = labelname+"_hltRecObjEtaCorrelation";
2234  title = labelname+"_hltRecObjEtaCorrelation;#eta(HLT);#eta(Reco)"+trigPath;
2235  EtaCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
2236  h = EtaCorrelation_HLTRecObj->getTH1();
2237  h->Sumw2();
2238 
2239  histoname = labelname+"_hltRecObjPhiCorrelation";
2240  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
2241  PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
2242  h = PhiCorrelation_HLTRecObj->getTH1();
2243  h->Sumw2();
2244 
2245  if((v->getTriggerType().compare("DiJet_Trigger") == 0))
2246  {
2247  histoname = labelname+"_RecObjAveragePt";
2248  title = labelname+"_RecObjAveragePt;Reco Average Pt[GeV/c]"+trigPath;
2249  jetAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2250  h = jetAveragePt->getTH1();
2251  h->Sumw2();
2252 
2253  histoname = labelname+"_RecObjAverageEta";
2254  title = labelname+"_RecObjAverageEta;Reco Average #eta"+trigPath;
2255  jetAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2256  h = jetAverageEta->getTH1();
2257  h->Sumw2();
2258 
2259  histoname = labelname+"_RecObjPhiDifference";
2260  title = labelname+"_RecObjPhiDifference;Reco #Delta#Phi"+trigPath;
2261  jetPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2262  h = jetPhiDifference->getTH1();
2263  h->Sumw2();
2264 
2265  histoname = labelname+"_hltObjAveragePt";
2266  title = labelname+"_hltObjAveragePt;HLT Average Pt[GeV/c]"+trigPath;
2267  hltAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2268  h = hltAveragePt->getTH1();
2269  h->Sumw2();
2270 
2271  histoname = labelname+"_hltObjAverageEta";
2272  title = labelname+"_hltObjAverageEta;HLT Average #eta"+trigPath;
2273  hltAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2274  h = hltAverageEta->getTH1();
2275  h->Sumw2();
2276 
2277  histoname = labelname+"_hltObjPhiDifference";
2278  title = labelname+"_hltObjPhiDifference;Reco #Delta#Phi"+trigPath;
2279  hltPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2280  h = hltPhiDifference->getTH1();
2281  h->Sumw2();
2282 
2283  }
2284 
2285  }// histos for Jet Triggers
2286 
2287 
2288  if(v->getObjectType() == trigger::TriggerMET)
2289  {
2290  histoname = labelname+"_recObjPt";
2291  title = labelname+"_recObjPt;Reco Pt[GeV/c]"+trigPath;
2292  Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2293  TH1 *h = Pt->getTH1();
2294  h->Sumw2();
2295 
2296 
2297  histoname = labelname+"_recObjPhi";
2298  title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
2299  Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2300  h = Phi->getTH1();
2301  h->Sumw2();
2302 
2303  histoname = labelname+"_l1ObjPt";
2304  title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
2305  Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2306  h = Pt_L1->getTH1();
2307  h->Sumw2();
2308 
2309 
2310  histoname = labelname+"_l1ObjPhi";
2311  title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
2312  Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2313  h = Phi_L1->getTH1();
2314  h->Sumw2();
2315 
2316 
2317  histoname = labelname+"_hltObjPt";
2318  title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
2319  Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2320  h = Pt_HLT->getTH1();
2321  h->Sumw2();
2322 
2323 
2324  histoname = labelname+"_hltObjPhi";
2325  title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
2326  Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2327  h = Phi_HLT->getTH1();
2328  h->Sumw2();
2329 
2330 
2331  histoname = labelname+"_l1HLTPtResolution";
2332  title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
2333  PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2334  h = PtResolution_L1HLT->getTH1();
2335  h->Sumw2();
2336 
2337 
2338  histoname = labelname+"_l1HLTPhiResolution";
2339  title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
2340  PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2341  h = PhiResolution_L1HLT->getTH1();
2342  h->Sumw2();
2343 
2344 
2345 
2346  histoname = labelname+"_l1HLTPtCorrelation";
2347  title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
2348  PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
2349  h = PtCorrelation_L1HLT->getTH1();
2350  h->Sumw2();
2351 
2352 
2353  histoname = labelname+"_l1HLTPhiCorrelation";
2354  title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
2355  PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
2356  h = PhiCorrelation_L1HLT->getTH1();
2357  h->Sumw2();
2358 
2359 
2360  histoname = labelname+"_hltRecObjPtResolution";
2361  title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
2362  PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2363  h = PtResolution_HLTRecObj->getTH1();
2364  h->Sumw2();
2365 
2366 
2367  histoname = labelname+"_hltRecObjPhiResolution";
2368  title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
2369  PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
2370  h = PhiResolution_HLTRecObj->getTH1();
2371  h->Sumw2();
2372 
2373 
2374 
2375  histoname = labelname+"_hltRecObjPtCorrelation";
2376  title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
2377  PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
2378  h = PtCorrelation_HLTRecObj->getTH1();
2379  h->Sumw2();
2380 
2381 
2382  histoname = labelname+"_hltRecObjPhiCorrelation";
2383  title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
2384  PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
2385  h = PhiCorrelation_HLTRecObj->getTH1();
2386  h->Sumw2();
2387 
2388 
2389  }// histos for MET Triggers
2390  v->setHistos( N, Pt, PtBarrel, PtEndcap, PtForward, Eta, Phi, EtaPhi,
2391  N_L1, Pt_L1, PtBarrel_L1, PtEndcap_L1, PtForward_L1, Eta_L1, Phi_L1, EtaPhi_L1,
2392  N_HLT, Pt_HLT, PtBarrel_HLT, PtEndcap_HLT, PtForward_HLT, Eta_HLT, Phi_HLT, EtaPhi_HLT,
2393  PtResolution_L1HLT, EtaResolution_L1HLT,PhiResolution_L1HLT,
2394  PtResolution_HLTRecObj,EtaResolution_HLTRecObj,PhiResolution_HLTRecObj,
2395  PtCorrelation_L1HLT,EtaCorrelation_L1HLT,PhiCorrelation_L1HLT,
2396  PtCorrelation_HLTRecObj,EtaCorrelation_HLTRecObj,PhiCorrelation_HLTRecObj,
2397  jetAveragePt, jetAverageEta, jetPhiDifference, hltAveragePt, hltAverageEta, hltPhiDifference,
2398  dummy, dummy, dummy);
2399 
2400  }
2401 
2402  }
2403  //-------Now Efficiency histos--------
2404  if(plotEff_)
2405  {
2406  int Ptbins_ = 100;
2407  int Etabins_ = 40;
2408  int Phibins_ = 35;
2409  double PtMin_ = 0.;
2410  double PtMax_ = 200.;
2411  double EtaMin_ = -5.;
2412  double EtaMax_ = 5.;
2413  double PhiMin_ = -3.14159;
2414  double PhiMax_ = 3.14159;
2415  // Now define histos wrt lower threshold trigger
2416  std::string dirName1 = dirname_ + "/RelativeTriggerEff/";
2417  for(PathInfoCollection::iterator v = hltPathsEff_.begin(); v!= hltPathsEff_.end(); ++v ){
2418  std::string labelname("ME") ;
2419  std::string subdirName = dirName1 + v->getPath() + "_wrt_" + v->getDenomPath();
2420  dbe->setCurrentFolder(subdirName);
2421  std::string histoname(labelname+"");
2422  std::string title(labelname+"");
2423 
2424  MonitorElement *dummy;
2425  dummy = dbe->bookFloat("dummy");
2426 
2427  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0))
2428  {
2429  histoname = labelname+"_NumeratorPt";
2430  title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
2431  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2432  TH1 * h = NumeratorPt->getTH1();
2433  h->Sumw2();
2434 
2435  histoname = labelname+"_NumeratorPtBarrel";
2436  title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c] ";
2437  MonitorElement * NumeratorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2438  h = NumeratorPtBarrel->getTH1();
2439  h->Sumw2();
2440 
2441  histoname = labelname+"_NumeratorPtEndcap";
2442  title = labelname+"NumeratorPtEndcap;Calo Pt[GeV/c]";
2443  MonitorElement * NumeratorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2444  h = NumeratorPtEndcap->getTH1();
2445  h->Sumw2();
2446 
2447  histoname = labelname+"_NumeratorPtForward";
2448  title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
2449  MonitorElement * NumeratorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2450  h = NumeratorPtForward->getTH1();
2451  h->Sumw2();
2452 
2453  histoname = labelname+"_NumeratorEta";
2454  title = labelname+"NumeratorEta;Calo #eta ";
2455  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2456  h = NumeratorEta->getTH1();
2457  h->Sumw2();
2458 
2459  histoname = labelname+"_NumeratorPhi";
2460  title = labelname+"NumeratorPhi;Calo #Phi";
2461  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2462  h = NumeratorPhi->getTH1();
2463  h->Sumw2();
2464 
2465  histoname = labelname+"_NumeratorEtaPhi";
2466  title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi";
2467  MonitorElement * NumeratorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2468  h = NumeratorEtaPhi->getTH1();
2469  h->Sumw2();
2470 
2471  histoname = labelname+"_DenominatorPt";
2472  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
2473  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2474  h = DenominatorPt->getTH1();
2475  h->Sumw2();
2476 
2477  histoname = labelname+"_DenominatorPtBarrel";
2478  title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
2479  MonitorElement * DenominatorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2480  h = DenominatorPtBarrel->getTH1();
2481  h->Sumw2();
2482 
2483  histoname = labelname+"_DenominatorPtEndcap";
2484  title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
2485  MonitorElement * DenominatorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2486  h = DenominatorPtEndcap->getTH1();
2487  h->Sumw2();
2488 
2489  histoname = labelname+"_DenominatorPtForward";
2490  title = labelname+"DenominatorPtForward;Calo Pt[GeV/c] ";
2491  MonitorElement * DenominatorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2492  h = DenominatorPtForward->getTH1();
2493  h->Sumw2();
2494 
2495  histoname = labelname+"_DenominatorEta";
2496  title = labelname+"DenominatorEta;Calo #eta ";
2497  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2498  h = DenominatorEta->getTH1();
2499  h->Sumw2();
2500 
2501  histoname = labelname+"_DenominatorPhi";
2502  title = labelname+"DenominatorPhi;Calo #Phi";
2503  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2504  h = DenominatorPhi->getTH1();
2505  h->Sumw2();
2506 
2507  histoname = labelname+"_DenominatorEtaPhi";
2508  title = labelname+"DenominatorEtaPhi;Calo #eta; Calo #Phi";
2509  MonitorElement * DenominatorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2510  h = DenominatorEtaPhi->getTH1();
2511  h->Sumw2();
2512 
2513 
2514  v->setEffHistos( NumeratorPt, NumeratorPtBarrel, NumeratorPtEndcap, NumeratorPtForward, NumeratorEta, NumeratorPhi, NumeratorEtaPhi,
2515  DenominatorPt, DenominatorPtBarrel, DenominatorPtEndcap, DenominatorPtForward, DenominatorEta, DenominatorPhi, DenominatorEtaPhi);
2516  }// Loop over Jet Trigger
2517 
2518  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0))
2519  {
2520 
2521  histoname = labelname+"_NumeratorAvrgPt";
2522  title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c]";
2523  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2524  TH1 * h = NumeratorPt->getTH1();
2525  h->Sumw2();
2526 
2527  histoname = labelname+"_NumeratorAvrgEta";
2528  title = labelname+"NumeratorAvrgEta;Calo #eta";
2529  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2530  h = NumeratorEta->getTH1();
2531  h->Sumw2();
2532 
2533  histoname = labelname+"_DenominatorAvrgPt";
2534  title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c] ";
2535  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2536  h = DenominatorPt->getTH1();
2537  h->Sumw2();
2538 
2539  histoname = labelname+"_DenominatorAvrgEta";
2540  title = labelname+"DenominatorAvrgEta;Calo #eta";
2541  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2542  h = DenominatorEta->getTH1();
2543  h->Sumw2();
2544 
2545  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, NumeratorEta, dummy, dummy,
2546  DenominatorPt, dummy, dummy, dummy, DenominatorEta, dummy, dummy);
2547 
2548 
2549  }
2550 
2551  if(v->getObjectType() == trigger::TriggerMET)
2552  {
2553  histoname = labelname+"_NumeratorPt";
2554  title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
2555  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2556  TH1 * h = NumeratorPt->getTH1();
2557  h->Sumw2();
2558 
2559 
2560  histoname = labelname+"_NumeratorPhi";
2561  title = labelname+"NumeratorPhi;Calo #Phi";
2562  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2563  h = NumeratorPhi->getTH1();
2564  h->Sumw2();
2565 
2566 
2567  histoname = labelname+"_DenominatorPt";
2568  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
2569  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2570  h = DenominatorPt->getTH1();
2571  h->Sumw2();
2572 
2573 
2574  histoname = labelname+"_DenominatorPhi";
2575  title = labelname+"DenominatorPhi;Calo #Phi";
2576  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2577  h = DenominatorPhi->getTH1();
2578  h->Sumw2();
2579 
2580 
2581  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy,
2582  DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy);
2583 
2584 
2585  }// Loop over MET trigger
2586  }
2587 
2588  //------Efficiency wrt Muon trigger-----------------------
2589  std::string dirName2 = dirname_ + "/EffWrtMuonTrigger/";
2590  for(PathInfoCollection::iterator v = hltPathsEffWrtMu_.begin(); v!= hltPathsEffWrtMu_.end(); ++v ){
2591  std::string labelname("ME") ;
2592  std::string subdirName = dirName2 + v->getPath();
2593  std::string histoname(labelname+"");
2594  std::string title(labelname+"");
2595  dbe->setCurrentFolder(subdirName);
2596 
2597  MonitorElement *dummy;
2598  dummy = dbe->bookFloat("dummy");
2599  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0))
2600  {
2601  histoname = labelname+"_NumeratorPt";
2602  title = labelname+"NumeratorPt;Pt[GeV/c]";
2603  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2604  TH1 * h = NumeratorPt->getTH1();
2605  h->Sumw2();
2606 
2607  histoname = labelname+"_NumeratorPtBarrel";
2608  title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c]";
2609  MonitorElement * NumeratorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2610  h = NumeratorPtBarrel->getTH1();
2611  h->Sumw2();
2612 
2613  histoname = labelname+"_NumeratorPtEndcap";
2614  title = labelname+"NumeratorPtEndcap;Calo Pt[GeV/c]";
2615  MonitorElement * NumeratorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2616  h = NumeratorPtEndcap->getTH1();
2617  h->Sumw2();
2618 
2619  histoname = labelname+"_NumeratorPtForward";
2620  title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
2621  MonitorElement * NumeratorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2622  h = NumeratorPtForward->getTH1();
2623  h->Sumw2();
2624 
2625  histoname = labelname+"_NumeratorEta";
2626  title = labelname+"NumeratorEta;Calo #eta ";
2627  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2628  h = NumeratorEta->getTH1();
2629  h->Sumw2();
2630 
2631  histoname = labelname+"_NumeratorPhi";
2632  title = labelname+"NumeratorPhi;Calo #Phi";
2633  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2634  h = NumeratorPhi->getTH1();
2635  h->Sumw2();
2636 
2637  histoname = labelname+"_NumeratorEtaPhi";
2638  title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi";
2639  MonitorElement * NumeratorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2640  h = NumeratorEtaPhi->getTH1();
2641  h->Sumw2();
2642 
2643  histoname = labelname+"_DenominatorPt";
2644  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
2645  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2646  h = DenominatorPt->getTH1();
2647  h->Sumw2();
2648 
2649  histoname = labelname+"_DenominatorPtBarrel";
2650  title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
2651  MonitorElement * DenominatorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2652  h = DenominatorPtBarrel->getTH1();
2653  h->Sumw2();
2654 
2655  histoname = labelname+"_DenominatorPtEndcap";
2656  title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
2657  MonitorElement * DenominatorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2658  h = DenominatorPtEndcap->getTH1();
2659  h->Sumw2();
2660 
2661  histoname = labelname+"_DenominatorPtForward";
2662  title = labelname+"DenominatorPtForward;Calo Pt[GeV/c] ";
2663  MonitorElement * DenominatorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2664  h = DenominatorPtForward->getTH1();
2665  h->Sumw2();
2666 
2667  histoname = labelname+"_DenominatorEta";
2668  title = labelname+"DenominatorEta;Calo #eta";
2669  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2670  h = DenominatorEta->getTH1();
2671  h->Sumw2();
2672 
2673  histoname = labelname+"_DenominatorPhi";
2674  title = labelname+"DenominatorPhi;Calo #Phi";
2675  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2676  h = DenominatorPhi->getTH1();
2677  h->Sumw2();
2678 
2679  histoname = labelname+"_DenominatorEtaPhi";
2680  title = labelname+"DenominatorEtaPhi;Calo #eta (IC5);Calo #Phi ";
2681  MonitorElement * DenominatorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2682  h = DenominatorEtaPhi->getTH1();
2683  h->Sumw2();
2684 
2685 
2686  v->setEffHistos( NumeratorPt, NumeratorPtBarrel, NumeratorPtEndcap, NumeratorPtForward, NumeratorEta, NumeratorPhi, NumeratorEtaPhi,
2687  DenominatorPt, DenominatorPtBarrel, DenominatorPtEndcap, DenominatorPtForward, DenominatorEta, DenominatorPhi, DenominatorEtaPhi);
2688  }// Loop over Jet Trigger
2689 
2690  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0))
2691  {
2692  histoname = labelname+"_NumeratorAvrgPt";
2693  title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c] ";
2694  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2695  TH1 * h = NumeratorPt->getTH1();
2696  h->Sumw2();
2697 
2698  histoname = labelname+"_NumeratorAvrgEta";
2699  title = labelname+"NumeratorAvrgEta;Calo #eta";
2700  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2701  h = NumeratorEta->getTH1();
2702  h->Sumw2();
2703 
2704  histoname = labelname+"_DenominatorAvrgPt";
2705  title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c]";
2706  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2707  h = DenominatorPt->getTH1();
2708  h->Sumw2();
2709 
2710  histoname = labelname+"_DenominatorAvrgEta";
2711  title = labelname+"DenominatorAvrgEta;Calo #eta ";
2712  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2713  h = DenominatorEta->getTH1();
2714  h->Sumw2();
2715 
2716  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, NumeratorEta, dummy, dummy,
2717  DenominatorPt, dummy, dummy, dummy, DenominatorEta, dummy, dummy);
2718 
2719 
2720  }
2721  if(v->getObjectType() == trigger::TriggerMET)
2722  {
2723  histoname = labelname+"_NumeratorPt";
2724  title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
2725  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2726  TH1 * h = NumeratorPt->getTH1();
2727  h->Sumw2();
2728 
2729 
2730  histoname = labelname+"_NumeratorPhi";
2731  title = labelname+"NumeratorPhi;Calo #Phi";
2732  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2733  h = NumeratorPhi->getTH1();
2734  h->Sumw2();
2735 
2736 
2737  histoname = labelname+"_DenominatorPt";
2738  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
2739  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2740  h = DenominatorPt->getTH1();
2741  h->Sumw2();
2742 
2743 
2744  histoname = labelname+"_DenominatorPhi";
2745  title = labelname+"DenominatorPhi;Calo #Phi";
2746  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2747  h = DenominatorPhi->getTH1();
2748  h->Sumw2();
2749 
2750 
2751  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy,
2752  DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy);
2753 
2754 
2755  }// Loop over MET trigger
2756  }
2757  //--------Efficiency wrt MiniBias trigger---------
2758  std::string dirName3 = dirname_ + "/EffWrtMBTrigger/";
2759  for(PathInfoCollection::iterator v = hltPathsEffWrtMB_.begin(); v!= hltPathsEffWrtMB_.end(); ++v ){
2760  std::string labelname("ME") ;
2761  std::string subdirName = dirName3 + v->getPath() ;
2762  std::string histoname(labelname+"");
2763  std::string title(labelname+"");
2764  dbe->setCurrentFolder(subdirName);
2765  MonitorElement *dummy;
2766  dummy = dbe->bookFloat("dummy");
2767  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0))
2768  {
2769  histoname = labelname+"_NumeratorPt";
2770  title = labelname+"NumeratorPt;Calo Pt[GeV/c] ";
2771  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2772  TH1 * h = NumeratorPt->getTH1();
2773  h->Sumw2();
2774 
2775  histoname = labelname+"_NumeratorPtBarrel";
2776  title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c]";
2777  MonitorElement * NumeratorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2778  h = NumeratorPtBarrel->getTH1();
2779  h->Sumw2();
2780 
2781  histoname = labelname+"_NumeratorPtEndcap";
2782  title = labelname+"NumeratorPtEndcap; Calo Pt[GeV/c] ";
2783  MonitorElement * NumeratorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2784  h = NumeratorPtEndcap->getTH1();
2785  h->Sumw2();
2786 
2787  histoname = labelname+"_NumeratorPtForward";
2788  title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
2789  MonitorElement * NumeratorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2790  h = NumeratorPtForward->getTH1();
2791  h->Sumw2();
2792 
2793  histoname = labelname+"_NumeratorEta";
2794  title = labelname+"NumeratorEta;Calo #eta ";
2795  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2796  h = NumeratorEta->getTH1();
2797  h->Sumw2();
2798 
2799  histoname = labelname+"_NumeratorPhi";
2800  title = labelname+"NumeratorPhi;Calo #Phi";
2801  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2802  h = NumeratorPhi->getTH1();
2803  h->Sumw2();
2804 
2805  histoname = labelname+"_NumeratorEtaPhi";
2806  title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi ";
2807  MonitorElement * NumeratorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2808  h = NumeratorEtaPhi->getTH1();
2809  h->Sumw2();
2810 
2811  histoname = labelname+"_DenominatorPt";
2812  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
2813  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2814  h = DenominatorPt->getTH1();
2815  h->Sumw2();
2816 
2817  histoname = labelname+"_DenominatorPtBarrel";
2818  title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
2819  MonitorElement * DenominatorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2820  h = DenominatorPtBarrel->getTH1();
2821  h->Sumw2();
2822 
2823  histoname = labelname+"_DenominatorPtEndcap";
2824  title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
2825  MonitorElement * DenominatorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2826  h = DenominatorPtEndcap->getTH1();
2827  h->Sumw2();
2828 
2829  histoname = labelname+"_DenominatorPtForward";
2830  title = labelname+"DenominatorPtForward;Calo Pt[GeV/c]";
2831  MonitorElement * DenominatorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2832  h = DenominatorPtForward->getTH1();
2833  h->Sumw2();
2834 
2835  histoname = labelname+"_DenominatorEta";
2836  title = labelname+"DenominatorEta;Calo #eta ";
2837  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2838  h = DenominatorEta->getTH1();
2839  h->Sumw2();
2840 
2841  histoname = labelname+"_DenominatorPhi";
2842  title = labelname+"DenominatorPhi;Calo #Phi";
2843  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2844  h = DenominatorPhi->getTH1();
2845  h->Sumw2();
2846 
2847  histoname = labelname+"_DenominatorEtaPhi";
2848  title = labelname+"DenominatorEtaPhi;Calo #eta ;Calo #Phi ";
2849  MonitorElement * DenominatorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
2850  h = DenominatorEtaPhi->getTH1();
2851  h->Sumw2();
2852 
2853 
2854  v->setEffHistos( NumeratorPt, NumeratorPtBarrel, NumeratorPtEndcap, NumeratorPtForward, NumeratorEta, NumeratorPhi, NumeratorEtaPhi,
2855  DenominatorPt, DenominatorPtBarrel, DenominatorPtEndcap, DenominatorPtForward, DenominatorEta, DenominatorPhi, DenominatorEtaPhi);
2856  }// Loop over Jet Trigger
2857 
2858 
2859  if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0))
2860  {
2861 
2862  histoname = labelname+"_NumeratorAvrgPt";
2863  title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c] ";
2864  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2865  TH1 * h = NumeratorPt->getTH1();
2866  h->Sumw2();
2867 
2868  histoname = labelname+"_NumeratorAvrgEta";
2869  title = labelname+"NumeratorAvrgEta;Calo #eta ";
2870  MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2871  h = NumeratorEta->getTH1();
2872  h->Sumw2();
2873 
2874  histoname = labelname+"_DenominatorAvrgPt";
2875  title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c] ";
2876  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2877  h = DenominatorPt->getTH1();
2878  h->Sumw2();
2879 
2880  histoname = labelname+"_DenominatorAvrgEta";
2881  title = labelname+"DenominatorAvrgEta;Calo #eta ";
2882  MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
2883  h = DenominatorEta->getTH1();
2884  h->Sumw2();
2885 
2886  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, NumeratorEta, dummy, dummy,
2887  DenominatorPt, dummy, dummy, dummy, DenominatorEta, dummy, dummy);
2888 
2889 
2890 
2891  }
2892  if(v->getObjectType() == trigger::TriggerMET)
2893  {
2894  histoname = labelname+"_NumeratorPt";
2895  title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
2896  MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2897  TH1 * h = NumeratorPt->getTH1();
2898  h->Sumw2();
2899 
2900 
2901  histoname = labelname+"_NumeratorPhi";
2902  title = labelname+"NumeratorPhi;Calo #Phi";
2903  MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2904  h = NumeratorPhi->getTH1();
2905  h->Sumw2();
2906 
2907 
2908  histoname = labelname+"_DenominatorPt";
2909  title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
2910  MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2911  h = DenominatorPt->getTH1();
2912  h->Sumw2();
2913 
2914 
2915  histoname = labelname+"_DenominatorPhi";
2916  title = labelname+"DenominatorPhi;Calo #Phi";
2917  MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
2918  h = DenominatorPhi->getTH1();
2919  h->Sumw2();
2920 
2921 
2922 
2923 
2924  v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy,
2925  DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy);
2926 
2927 
2928  }// Loop over MET trigger
2929  }
2930 
2931 
2932  }// This is loop over all efficiency plots
2933  //--------Histos to see WHY trigger is NOT fired----------
2934  int Nbins_ = 10;
2935  int Nmin_ = 0;
2936  int Nmax_ = 10;
2937  int Ptbins_ = 100;
2938  int Etabins_ = 40;
2939  int Phibins_ = 35;
2940  double PtMin_ = 0.;
2941  double PtMax_ = 200.;
2942  double EtaMin_ = -5.;
2943  double EtaMax_ = 5.;
2944  double PhiMin_ = -3.14159;
2945  double PhiMax_ = 3.14159;
2946 
2947  std::string dirName4_ = dirname_ + "/TriggerNotFired/";
2948  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
2949 
2950  MonitorElement *dummy;
2951  dummy = dbe->bookFloat("dummy");
2952 
2953 
2954  std::string labelname("ME") ;
2955  std::string histoname(labelname+"");
2956  std::string title(labelname+"");
2957  dbe->setCurrentFolder(dirName4_ + v->getPath());
2958 
2959  histoname = labelname+"_TriggerSummary";
2960  title = labelname+"Summary of trigger levels";
2961  MonitorElement * TriggerSummary = dbe->book1D(histoname.c_str(),title.c_str(),7, -0.5,6.5);
2962 
2963  std::vector<std::string> trigger;
2964  trigger.push_back("Nevt");
2965  trigger.push_back("L1 failed");
2966  trigger.push_back("L1 & HLT failed");
2967  trigger.push_back("L1 failed but not HLT");
2968  trigger.push_back("L1 passed");
2969  trigger.push_back("L1 & HLT passed");
2970  trigger.push_back("L1 passed but not HLT");
2971  for(unsigned int i =0; i < trigger.size(); i++)TriggerSummary->setBinLabel(i+1, trigger[i]);
2972 
2973  if((v->getTriggerType().compare("SingleJet_Trigger") == 0))
2974  {
2975  histoname = labelname+"_JetPt";
2976  title = labelname+"Leading jet pT;Pt[GeV/c]";
2977  MonitorElement * JetPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
2978  TH1 * h = JetPt->getTH1();
2979  h->Sumw2();
2980 
2981  histoname = labelname+"_JetEtaVsPt";
2982  title = labelname+"Leading jet #eta vs pT;#eta;Pt[GeV/c]";
2983  MonitorElement * JetEtaVsPt = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Ptbins_,PtMin_,PtMax_);
2984  h = JetEtaVsPt->getTH1();
2985  h->Sumw2();
2986 
2987  histoname = labelname+"_JetPhiVsPt";
2988  title = labelname+"Leading jet #Phi vs pT;#Phi;Pt[GeV/c]";
2989  MonitorElement * JetPhiVsPt = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Ptbins_,PtMin_,PtMax_);
2990  h = JetPhiVsPt->getTH1();
2991  h->Sumw2();
2992 
2993 
2994 
2995  v->setDgnsHistos( TriggerSummary, dummy, JetPt, JetEtaVsPt, JetPhiVsPt, dummy, dummy, dummy, dummy, dummy, dummy);
2996  }// single Jet trigger
2997 
2998  if((v->getTriggerType().compare("DiJet_Trigger") == 0))
2999  {
3000  histoname = labelname+"_JetSize";
3001  title = labelname+"Jet Size;multiplicity";
3002  MonitorElement * JetSize = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
3003  TH1 * h = JetSize->getTH1();
3004  h->Sumw2();
3005 
3006 
3007  histoname = labelname+"_AvergPt";
3008  title = labelname+"Average Pt;Pt[GeV/c]";
3009  MonitorElement * Pt12 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3010  h = Pt12->getTH1();
3011  h->Sumw2();
3012 
3013  histoname = labelname+"_AvergEta";
3014  title = labelname+"Average Eta;#eta";
3015  MonitorElement * Eta12 = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
3016  h = Eta12->getTH1();
3017  h->Sumw2();
3018 
3019  histoname = labelname+"_PhiDifference";
3020  title = labelname+"#Delta#Phi;#Delta#Phi";
3021  MonitorElement * Phi12 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
3022  h = Phi12->getTH1();
3023  h->Sumw2();
3024 
3025  histoname = labelname+"_Pt3Jet";
3026  title = labelname+"Pt of 3rd Jet;Pt[GeV/c]";
3027  MonitorElement * Pt3 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3028  h = Pt3->getTH1();
3029  h->Sumw2();
3030 
3031  histoname = labelname+"_Pt12VsPt3Jet";
3032  title = labelname+"Pt of 3rd Jet vs Average Pt of leading jets;Avergage Pt[GeV/c]; Pt of 3rd Jet [GeV/c]";
3033  MonitorElement * Pt12Pt3 = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
3034  h = Pt12Pt3->getTH1();
3035  h->Sumw2();
3036 
3037  histoname = labelname+"_Pt12VsPhi12";
3038  title = labelname+"Average Pt of leading jets vs #Delta#Phi between leading jets;Avergage Pt[GeV/c]; #Delta#Phi";
3039  MonitorElement * Pt12Phi12 = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Phibins_,PhiMin_,PhiMax_);
3040  h = Pt12Phi12->getTH1();
3041  h->Sumw2();
3042 
3043  v->setDgnsHistos( TriggerSummary, JetSize, dummy, dummy, dummy, Pt12, Eta12, Phi12, Pt3, Pt12Pt3, Pt12Phi12);
3044 
3045  }// Dijet Jet trigger
3046 
3047  if((v->getTriggerType().compare("MET_Trigger") == 0))
3048  {
3049  histoname = labelname+"_MET";
3050  title = labelname+"MET;Pt[GeV/c]";
3051  MonitorElement * MET = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
3052  TH1 * h = MET->getTH1();
3053  h->Sumw2();
3054  v->setDgnsHistos(TriggerSummary, dummy, MET, dummy, dummy, dummy, dummy, dummy,dummy,dummy,dummy);
3055  } // MET trigger
3056 
3057 
3058  }
3059 
3060  }
3061 }
#define LogDebug(id)
unsigned int size() const
number of trigger paths in trigger table
PathInfoCollection hltPathsAllWrtMu_
int i
Definition: DBlmapReader.cc:9
const std::string moduleType(const std::string &module) const
C++ class name of module.
const std::string & triggerName(unsigned int triggerIndex) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2296
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_
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:456
std::vector< std::string > MBTrigPaths_
Definition: MET.h:32
MonitorElement * correlation_AllWrtMu
TH1 * getTH1(void) const
PathInfoCollection hltPathsEffWrtMB_
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_
PathInfoCollection hltPathsAll_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
MonitorElement * correlation_AllWrtMB
PathInfoCollection hltPathsEffWrtMu_
tuple cout
Definition: gather_cfg.py:41
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
mathSSE::Vec4< T > v
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
PathInfoCollection hltPathsEff_
void JetMETHLTOfflineSource::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 3073 of file JetMETHLTOfflineSource.cc.

References jetID.

3073  {
3074  delete jetID;
3075 }
reco::helper::JetIDHelper * jetID
void JetMETHLTOfflineSource::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
privatevirtual

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 3068 of file JetMETHLTOfflineSource.cc.

3069  {
3070 }
void JetMETHLTOfflineSource::endRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 3078 of file JetMETHLTOfflineSource.cc.

References gather_cfg::cout, edm::RunBase::id(), and verbose_.

3078  {
3079  if (verbose_) std::cout << "endRun, run " << run.id() << std::endl;
3080 }
RunID const & id() const
Definition: RunBase.h:43
tuple cout
Definition: gather_cfg.py:41
void JetMETHLTOfflineSource::fillMEforEffAllTrigger ( const edm::Event iEvent)
privatevirtual

Definition at line 870 of file JetMETHLTOfflineSource.cc.

References _fEMF, _feta, _fHPD, _n90Hits, reco::helper::JetIDHelper::calculate(), calojet, calojetColl_, calometColl_, gather_cfg::cout, reco::helper::JetIDHelper::fHPD(), hltPathsEff_, isBarrel(), isEndCap(), isForward(), edm::HandleBase::isValid(), metsig::jet, jetID, CaloMET_cfi::met, reco::helper::JetIDHelper::n90Hits(), reco::LeafCandidate::phi(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), edm::TriggerNames::size(), edm::TriggerNames::triggerIndex(), trigger::TriggerJet, trigger::TriggerMET, triggerNames_, triggerResults_, v, and verbose_.

Referenced by analyze().

870  {
871  int npath;
872  if(&triggerResults_) {
873  npath = triggerResults_->size();
874  } else {
875  return;
876  }
877  int num = -1;
878  int denom = -1;
879  for(PathInfoCollection::iterator v = hltPathsEff_.begin(); v!= hltPathsEff_.end(); ++v )
880  {
881  num++;
882  denom++;
883  bool denompassed = false;
884  bool numpassed = false;
885 
886  unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
887  unsigned indexDenom = triggerNames_.triggerIndex(v->getDenomPath());
888 
889  if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum))numpassed = true;
890  if(indexDenom < triggerNames_.size() && triggerResults_->accept(indexDenom))denompassed = true;
891 
892  if(denompassed){
893  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
894  bool jetIDbool = false;
895  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
896  {
897 
898  CaloJetCollection::const_iterator jet = calojet.begin();
899  jetID->calculate(iEvent, *jet);
900 
901  if(verbose_)cout<<"n90Hits==="<<jetID->n90Hits()<<"==fHPDs=="<<jetID->fHPD()<<endl;
902  if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
903  {
904  jetIDbool = true;
905  v->getMEhisto_DenominatorPt()->Fill(jet->pt());
906  if (isBarrel(jet->eta())) v->getMEhisto_DenominatorPtBarrel()->Fill(jet->pt());
907  if (isEndCap(jet->eta())) v->getMEhisto_DenominatorPtEndcap()->Fill(jet->pt());
908  if (isForward(jet->eta())) v->getMEhisto_DenominatorPtForward()->Fill(jet->pt());
909  v->getMEhisto_DenominatorEta()->Fill(jet->eta());
910  v->getMEhisto_DenominatorPhi()->Fill(jet->phi());
911  v->getMEhisto_DenominatorEtaPhi()->Fill(jet->eta(),jet->phi());
912  }
913  }
914  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size()>1)
915  {
916  CaloJetCollection::const_iterator jet = calojet.begin();
917  CaloJetCollection::const_iterator jet2 = jet++;
918  jetID->calculate(iEvent, *jet2);
919  if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
920  {
921  v->getMEhisto_DenominatorPt()->Fill((jet->pt() + jet2->pt())/2.);
922  v->getMEhisto_DenominatorEta()->Fill((jet->eta() + jet2->eta())/2.);
923  }
924  }
925 
926  }// Jet trigger and valid jet collection
927  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
928  const CaloMETCollection *calometcol = calometColl_.product();
929  const CaloMET met = calometcol->front();
930  v->getMEhisto_DenominatorPt()->Fill(met.pt());
931  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
932 
933  }// MET trigger and valid MET collection
934 
935  if (numpassed)
936  {
937  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
938  bool jetIDbool = false;
939  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
940  {
941  CaloJetCollection::const_iterator jet = calojet.begin();
942  jetID->calculate(iEvent, *jet);
943  if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
944  {
945  jetIDbool = true;
946  v->getMEhisto_NumeratorPt()->Fill(jet->pt());
947  if (isBarrel(jet->eta())) v->getMEhisto_NumeratorPtBarrel()->Fill(jet->pt());
948  if (isEndCap(jet->eta())) v->getMEhisto_NumeratorPtEndcap()->Fill(jet->pt());
949  if (isForward(jet->eta())) v->getMEhisto_NumeratorPtForward()->Fill(jet->pt());
950  v->getMEhisto_NumeratorEta()->Fill(jet->eta());
951  v->getMEhisto_NumeratorPhi()->Fill(jet->phi());
952  v->getMEhisto_NumeratorEtaPhi()->Fill(jet->eta(),jet->phi());
953  }
954  }
955  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() > 1)
956  {
957  CaloJetCollection::const_iterator jet = calojet.begin();
958  CaloJetCollection::const_iterator jet2 = jet++;
959  jetID->calculate(iEvent, *jet2);
960  if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
961  {
962  v->getMEhisto_NumeratorPt()->Fill((jet->pt() + jet2->pt())/2.);
963  v->getMEhisto_NumeratorEta()->Fill((jet->eta() + jet2->eta())/2.);
964  }
965  }
966  }// Jet trigger and valid jet collection
967  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
968  const CaloMETCollection *calometcol = calometColl_.product();
969  const CaloMET met = calometcol->front();
970  v->getMEhisto_NumeratorPt()->Fill(met.pt());
971  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
972 
973  }// MET trigger and valid MET collection
974  }//Numerator is fired
975  }//Denominator is fired
976  }// trigger under study
977 
978 }
virtual bool isEndCap(double eta)
double fHPD() const
Definition: JetIDHelper.h:33
edm::Handle< edm::TriggerResults > triggerResults_
Strings::size_type size() const
Definition: TriggerNames.cc:39
Collection of Calo MET.
virtual bool isBarrel(double eta)
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
virtual bool isForward(double eta)
reco::CaloJetCollection calojet
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::CaloJetCollection > calojetColl_
virtual double pt() const
transverse momentum
long long int num
Definition: procUtils.cc:71
T const * product() const
Definition: Handle.h:74
edm::Handle< reco::CaloMETCollection > calometColl_
tuple cout
Definition: gather_cfg.py:41
virtual double phi() const
momentum azimuthal angle
reco::helper::JetIDHelper * jetID
mathSSE::Vec4< T > v
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:86
PathInfoCollection hltPathsEff_
void JetMETHLTOfflineSource::fillMEforEffWrtMBTrigger ( const edm::Event iEvent)
privatevirtual

Definition at line 1093 of file JetMETHLTOfflineSource.cc.

References _fEMF, _feta, _fHPD, _n90Hits, reco::helper::JetIDHelper::calculate(), calojet, calojetColl_, calometColl_, reco::helper::JetIDHelper::fHPD(), hltPathsEffWrtMB_, i, isBarrel(), isEndCap(), isForward(), isHLTPathAccepted(), edm::HandleBase::isValid(), metsig::jet, jetID, MBTrigPaths_, CaloMET_cfi::met, reco::helper::JetIDHelper::n90Hits(), reco::LeafCandidate::phi(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), edm::TriggerNames::size(), edm::TriggerNames::triggerIndex(), trigger::TriggerJet, trigger::TriggerMET, triggerNames_, triggerResults_, and v.

Referenced by analyze().

1093  {
1094 
1095  int npath;
1096  if(&triggerResults_) {
1097  npath = triggerResults_->size();
1098  } else {
1099  return;
1100  }
1101  bool mbTrig = false;
1102  bool denompassed = false;
1103  for(size_t i=0;i<MBTrigPaths_.size();++i){
1105  mbTrig = true;
1106  break;
1107  }
1108  }
1109  for(PathInfoCollection::iterator v = hltPathsEffWrtMB_.begin(); v!= hltPathsEffWrtMB_.end(); ++v )
1110  {
1111  bool numpassed = false;
1112  if(mbTrig)denompassed = true;
1113 
1114  unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
1115  if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum))numpassed = true;
1116 
1117  if(denompassed){
1118  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
1119  bool jetIDbool = false;
1120  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
1121  {
1122  CaloJetCollection::const_iterator jet = calojet.begin();
1123  jetID->calculate(iEvent, *jet);
1124  if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
1125  {
1126  jetIDbool = true;
1127  v->getMEhisto_DenominatorPt()->Fill(jet->pt());
1128  if (isBarrel(jet->eta())) v->getMEhisto_DenominatorPtBarrel()->Fill(jet->pt());
1129  if (isEndCap(jet->eta())) v->getMEhisto_DenominatorPtEndcap()->Fill(jet->pt());
1130  if (isForward(jet->eta())) v->getMEhisto_DenominatorPtForward()->Fill(jet->pt());
1131  v->getMEhisto_DenominatorEta()->Fill(jet->eta());
1132  v->getMEhisto_DenominatorPhi()->Fill(jet->phi());
1133  v->getMEhisto_DenominatorEtaPhi()->Fill(jet->eta(),jet->phi());
1134  }
1135  }
1136  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() >1)
1137  {
1138  CaloJetCollection::const_iterator jet = calojet.begin();
1139  CaloJetCollection::const_iterator jet2 = jet++;
1140  jetID->calculate(iEvent, *jet2);
1141  if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
1142  {
1143  v->getMEhisto_DenominatorPt()->Fill((jet->pt() + jet2->pt())/2.);
1144  v->getMEhisto_DenominatorEta()->Fill((jet->eta() + jet2->eta())/2.);
1145  }
1146  }
1147  }// Jet trigger and valid jet collection
1148  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
1149  const CaloMETCollection *calometcol = calometColl_.product();
1150  const CaloMET met = calometcol->front();
1151  v->getMEhisto_DenominatorPt()->Fill(met.pt());
1152  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
1153 
1154  }// MET trigger and valid MET collection
1155 
1156  if (numpassed)
1157  {
1158  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
1159  bool jetIDbool = false;
1160  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
1161  {
1162  CaloJetCollection::const_iterator jet = calojet.begin();
1163  jetID->calculate(iEvent, *jet);
1164  if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
1165  {
1166  jetIDbool = true;
1167  v->getMEhisto_NumeratorPt()->Fill(jet->pt());
1168  if (isBarrel(jet->eta())) v->getMEhisto_NumeratorPtBarrel()->Fill(jet->pt());
1169  if (isEndCap(jet->eta())) v->getMEhisto_NumeratorPtEndcap()->Fill(jet->pt());
1170  if (isForward(jet->eta())) v->getMEhisto_NumeratorPtForward()->Fill(jet->pt());
1171  v->getMEhisto_NumeratorEta()->Fill(jet->eta());
1172  v->getMEhisto_NumeratorPhi()->Fill(jet->phi());
1173  v->getMEhisto_NumeratorEtaPhi()->Fill(jet->eta(),jet->phi());
1174  }
1175  }
1176  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() > 1)
1177  {
1178  CaloJetCollection::const_iterator jet = calojet.begin();
1179  CaloJetCollection::const_iterator jet2 = jet++;
1180  jetID->calculate(iEvent, *jet2);
1181  if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
1182  {
1183  v->getMEhisto_NumeratorPt()->Fill((jet->pt() + jet2->pt())/2.);
1184  v->getMEhisto_NumeratorEta()->Fill((jet->eta() + jet2->eta())/2.);
1185  }
1186  }
1187  }// Jet trigger and valid jet collection
1188  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
1189  const CaloMETCollection *calometcol = calometColl_.product();
1190  const CaloMET met = calometcol->front();
1191  v->getMEhisto_NumeratorPt()->Fill(met.pt());
1192  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
1193 
1194  }// MET trigger and valid MET collection
1195  }//Numerator is fired
1196  }//Denominator is fired
1197  }// trigger under study
1198 
1199 
1200 }
int i
Definition: DBlmapReader.cc:9
virtual bool isEndCap(double eta)
double fHPD() const
Definition: JetIDHelper.h:33
edm::Handle< edm::TriggerResults > triggerResults_
Strings::size_type size() const
Definition: TriggerNames.cc:39
Collection of Calo MET.
virtual bool isBarrel(double eta)
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
std::vector< std::string > MBTrigPaths_
virtual bool isForward(double eta)
PathInfoCollection hltPathsEffWrtMB_
reco::CaloJetCollection calojet
bool isValid() const
Definition: HandleBase.h:76
virtual bool isHLTPathAccepted(std::string pathName)
edm::Handle< reco::CaloJetCollection > calojetColl_
virtual double pt() const
transverse momentum
T const * product() const
Definition: Handle.h:74
edm::Handle< reco::CaloMETCollection > calometColl_
virtual double phi() const
momentum azimuthal angle
reco::helper::JetIDHelper * jetID
mathSSE::Vec4< T > v
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:86
void JetMETHLTOfflineSource::fillMEforEffWrtMuTrigger ( const edm::Event iEvent)
privatevirtual

Definition at line 981 of file JetMETHLTOfflineSource.cc.

References _fEMF, _feta, _fHPD, _n90Hits, reco::helper::JetIDHelper::calculate(), calojet, calojetColl_, calometColl_, reco::helper::JetIDHelper::fHPD(), hltPathsEffWrtMu_, i, isBarrel(), isEndCap(), isForward(), isHLTPathAccepted(), edm::HandleBase::isValid(), metsig::jet, jetID, CaloMET_cfi::met, MuonTrigPaths_, reco::helper::JetIDHelper::n90Hits(), reco::LeafCandidate::phi(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), edm::TriggerNames::size(), edm::TriggerNames::triggerIndex(), trigger::TriggerJet, trigger::TriggerMET, triggerNames_, triggerResults_, and v.

Referenced by analyze().

981  {
982 
983  int npath;
984  if(&triggerResults_) {
985  npath = triggerResults_->size();
986  } else {
987  return;
988  }
989  bool muTrig = false;
990  bool denompassed = false;
991  for(size_t i=0;i<MuonTrigPaths_.size();++i){
993  muTrig = true;
994  break;
995  }
996  }
997  for(PathInfoCollection::iterator v = hltPathsEffWrtMu_.begin(); v!= hltPathsEffWrtMu_.end(); ++v )
998  {
999  bool numpassed = false;
1000  if(muTrig)denompassed = true;
1001 
1002  unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
1003  if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum))numpassed = true;
1004 
1005  if(denompassed){
1006  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
1007  bool jetIDbool = false;
1008  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
1009  {
1010  CaloJetCollection::const_iterator jet = calojet.begin();
1011  jetID->calculate(iEvent, *jet);
1012  if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
1013  {
1014  jetIDbool = true;
1015  v->getMEhisto_DenominatorPt()->Fill(jet->pt());
1016  if (isBarrel(jet->eta())) v->getMEhisto_DenominatorPtBarrel()->Fill(jet->pt());
1017  if (isEndCap(jet->eta())) v->getMEhisto_DenominatorPtEndcap()->Fill(jet->pt());
1018  if (isForward(jet->eta())) v->getMEhisto_DenominatorPtForward()->Fill(jet->pt());
1019  v->getMEhisto_DenominatorEta()->Fill(jet->eta());
1020  v->getMEhisto_DenominatorPhi()->Fill(jet->phi());
1021  v->getMEhisto_DenominatorEtaPhi()->Fill(jet->eta(),jet->phi());
1022  }
1023  }
1024  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() > 1)
1025  {
1026  CaloJetCollection::const_iterator jet = calojet.begin();
1027  CaloJetCollection::const_iterator jet2 = jet++;
1028  jetID->calculate(iEvent, *jet2);
1029  if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
1030  {
1031  v->getMEhisto_DenominatorPt()->Fill((jet->pt() + jet2->pt())/2.);
1032  v->getMEhisto_DenominatorEta()->Fill((jet->eta() + jet2->eta())/2.);
1033  }
1034  }
1035 
1036  }// Jet trigger and valid jet collection
1037  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
1038  const CaloMETCollection *calometcol = calometColl_.product();
1039  const CaloMET met = calometcol->front();
1040  v->getMEhisto_DenominatorPt()->Fill(met.pt());
1041  v->getMEhisto_DenominatorPhi()->Fill(met.phi());
1042 
1043  }// MET trigger and valid MET collection
1044 
1045  if (numpassed)
1046  {
1047  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
1048  bool jetIDbool = false;
1049  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
1050  {
1051  CaloJetCollection::const_iterator jet = calojet.begin();
1052  jetID->calculate(iEvent, *jet);
1053  if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
1054  {
1055  jetIDbool = true;
1056  v->getMEhisto_NumeratorPt()->Fill(jet->pt());
1057  if (isBarrel(jet->eta())) v->getMEhisto_NumeratorPtBarrel()->Fill(jet->pt());
1058  if (isEndCap(jet->eta())) v->getMEhisto_NumeratorPtEndcap()->Fill(jet->pt());
1059  if (isForward(jet->eta())) v->getMEhisto_NumeratorPtForward()->Fill(jet->pt());
1060  v->getMEhisto_NumeratorEta()->Fill(jet->eta());
1061  v->getMEhisto_NumeratorPhi()->Fill(jet->phi());
1062  v->getMEhisto_NumeratorEtaPhi()->Fill(jet->eta(),jet->phi());
1063  }
1064  }
1065  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() > 1)
1066  {
1067  CaloJetCollection::const_iterator jet = calojet.begin();
1068  CaloJetCollection::const_iterator jet2 = jet++;
1069  jetID->calculate(iEvent, *jet2);
1070  if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
1071  {
1072  v->getMEhisto_NumeratorPt()->Fill((jet->pt() + jet2->pt())/2.);
1073  v->getMEhisto_NumeratorEta()->Fill((jet->eta() + jet2->eta())/2.);
1074  }
1075  }
1076 
1077  }// Jet trigger and valid jet collection
1078  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
1079  const CaloMETCollection *calometcol = calometColl_.product();
1080  const CaloMET met = calometcol->front();
1081  v->getMEhisto_NumeratorPt()->Fill(met.pt());
1082  v->getMEhisto_NumeratorPhi()->Fill(met.phi());
1083 
1084  }// MET trigger and valid MET collection
1085  }//Numerator is fired
1086  }//Denominator is fired
1087  }// trigger under study
1088 
1089 
1090 }
int i
Definition: DBlmapReader.cc:9
virtual bool isEndCap(double eta)
double fHPD() const
Definition: JetIDHelper.h:33
edm::Handle< edm::TriggerResults > triggerResults_
Strings::size_type size() const
Definition: TriggerNames.cc:39
Collection of Calo MET.
virtual bool isBarrel(double eta)
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
virtual bool isForward(double eta)
reco::CaloJetCollection calojet
std::vector< std::string > MuonTrigPaths_
bool isValid() const
Definition: HandleBase.h:76
virtual bool isHLTPathAccepted(std::string pathName)
edm::Handle< reco::CaloJetCollection > calojetColl_
virtual double pt() const
transverse momentum
T const * product() const
Definition: Handle.h:74
PathInfoCollection hltPathsEffWrtMu_
edm::Handle< reco::CaloMETCollection > calometColl_
virtual double phi() const
momentum azimuthal angle
reco::helper::JetIDHelper * jetID
mathSSE::Vec4< T > v
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:86
void JetMETHLTOfflineSource::fillMEforMonAllTrigger ( const edm::Event iEvent)
privatevirtual

Definition at line 301 of file JetMETHLTOfflineSource.cc.

References calojet, calojetColl_, calometColl_, Geom::deltaPhi(), deltaR(), eta(), hltPathsAll_, isBarrel(), isEndCap(), isForward(), isHLTPathAccepted(), edm::HandleBase::isValid(), metsig::jet, reco::btau::jetEta, reco::btau::jetPhi, CaloMET_cfi::met, phi, reco::LeafCandidate::phi(), processname_, edm::Handle< T >::product(), reco::LeafCandidate::pt(), ExpressReco_HICollisions_FallBack::pt, trigger::TriggerJet, trigger::TriggerMET, triggerObj_, triggerResults_, and v.

Referenced by analyze().

301  {
302  int npath;
303  if(&triggerResults_) {
304  npath = triggerResults_->size();
305  } else {
306  return;
307  }
308  //-----------------------------------------------------
309  const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
310  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v )
311  {
312  if (isHLTPathAccepted(v->getPath()))
313  {
314  std::vector<double>jetPtVec;
315  std::vector<double>jetPhiVec;
316  std::vector<double>jetEtaVec;
317  std::vector<double>jetPxVec;
318  std::vector<double>jetPyVec;
319 
320  std::vector<double>hltPtVec;
321  std::vector<double>hltPhiVec;
322  std::vector<double>hltEtaVec;
323  std::vector<double>hltPxVec;
324  std::vector<double>hltPyVec;
325  bool fillL1HLT = false; // This will be used to find out punch throgh trigger
326  //---------------------------------------------
327  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
328  const int l1Index = triggerObj_->filterIndex(l1Tag);
329  edm::InputTag hltTag(v->getLabel(),"",processname_);
330  const int hltIndex = triggerObj_->filterIndex(hltTag);
331  bool l1TrigBool = false;
332  bool hltTrigBool = false;
333  bool diJetFire = false;
334  int jetsize = 0;
335  if ( l1Index >= triggerObj_->sizeFilters() ) {
336  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
337  } else {
338  l1TrigBool = true;
339  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
340  if(v->getObjectType() == trigger::TriggerJet)v->getMEhisto_N_L1()->Fill(kl1.size());
341  for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki)
342  {
343  double l1TrigEta = -100;
344  double l1TrigPhi = -100;
345  //-------------------------------------------
346  if(v->getObjectType() == trigger::TriggerJet)
347  {
348  l1TrigEta = toc[*ki].eta();
349  l1TrigPhi = toc[*ki].phi();
350  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
351  if (isBarrel(toc[*ki].eta())) v->getMEhisto_PtBarrel_L1()->Fill(toc[*ki].pt());
352  if (isEndCap(toc[*ki].eta())) v->getMEhisto_PtEndcap_L1()->Fill(toc[*ki].pt());
353  if (isForward(toc[*ki].eta())) v->getMEhisto_PtForward_L1()->Fill(toc[*ki].pt());
354  v->getMEhisto_Eta_L1()->Fill(toc[*ki].eta());
355  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
356  v->getMEhisto_EtaPhi_L1()->Fill(toc[*ki].eta(),toc[*ki].phi());
357  }
358  if(v->getObjectType() == trigger::TriggerMET)
359  {
360  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
361  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
362  }
363  //-----------------------------------------------
364  if ( hltIndex >= triggerObj_->sizeFilters() ) {
365  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
366  } else {
367  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
368  if((v->getObjectType() == trigger::TriggerJet) && (ki == kl1.begin()))v->getMEhisto_N_HLT()->Fill(khlt.size());
369 
370  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj)
371  {
372  double hltTrigEta = -100;
373  double hltTrigPhi = -100;
374  if(v->getObjectType() == trigger::TriggerJet)
375  {
376  hltTrigEta = toc[*kj].eta();
377  hltTrigPhi = toc[*kj].phi();
378  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4 && (v->getTriggerType().compare("DiJet_Trigger") == 0))hltTrigBool = true;
379  }
380  }
381  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj)
382  {
383  double hltTrigEta = -100;
384  double hltTrigPhi = -100;
385  fillL1HLT = true;
386  //--------------------------------------------------
387  if(v->getObjectType() == trigger::TriggerMET)
388  {
389  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
390  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
391  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
392  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
393  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
394  v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
395  }
396  //--------------------------------------------------
397  if(v->getObjectType() == trigger::TriggerJet)
398  {
399  hltTrigEta = toc[*kj].eta();
400  hltTrigPhi = toc[*kj].phi();
401 
402  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4)
403  {
404 
405  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
406  v->getMEhisto_EtaCorrelation_L1HLT()->Fill(toc[*ki].eta(),toc[*kj].eta());
407  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
408 
409  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
410  v->getMEhisto_EtaResolution_L1HLT()->Fill((toc[*ki].eta()-toc[*kj].eta())/(toc[*ki].eta()));
411  v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
412  }
413 
414  if(((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi) < 0.4 ) || ((v->getTriggerType().compare("DiJet_Trigger") == 0) && hltTrigBool)) && !diJetFire)
415  {
416  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
417  if (isBarrel(toc[*kj].eta())) v->getMEhisto_PtBarrel_HLT()->Fill(toc[*kj].pt());
418  if (isEndCap(toc[*kj].eta())) v->getMEhisto_PtEndcap_HLT()->Fill(toc[*kj].pt());
419  if (isForward(toc[*kj].eta())) v->getMEhisto_PtForward_HLT()->Fill(toc[*kj].pt());
420  v->getMEhisto_Eta_HLT()->Fill(toc[*kj].eta());
421  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
422  v->getMEhisto_EtaPhi_HLT()->Fill(toc[*kj].eta(),toc[*kj].phi());
423  //-------------------------------------------------
424 
425  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
426 
427  for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
428  double jetEta = jet->eta();
429  double jetPhi = jet->phi();
430  if(deltaR(hltTrigEta, hltTrigPhi, jetEta, jetPhi) < 0.4)
431  {
432  jetsize++;
433  v->getMEhisto_Pt()->Fill(jet->pt());
434  if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
435  if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
436  if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
437  v->getMEhisto_Eta()->Fill(jet->eta());
438  v->getMEhisto_Phi()->Fill(jet->phi());
439  v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
440 
441  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),jet->pt());
442  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),jet->eta());
443  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),jet->phi());
444 
445  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-jet->pt())/(toc[*kj].pt()));
446  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*kj].eta()-jet->eta())/(toc[*kj].eta()));
447  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-jet->phi())/(toc[*kj].phi()));
448 
449  //-------------------------------------------------------
450  if((v->getTriggerType().compare("DiJet_Trigger") == 0))
451  {
452  jetPhiVec.push_back(jet->phi());
453  jetPtVec.push_back(jet->pt());
454  jetEtaVec.push_back(jet->eta());
455  jetPxVec.push_back(jet->px());
456  jetPyVec.push_back(jet->py());
457 
458  hltPhiVec.push_back(toc[*kj].phi());
459  hltPtVec.push_back(toc[*kj].pt());
460  hltEtaVec.push_back(toc[*kj].eta());
461  hltPxVec.push_back(toc[*kj].px());
462  hltPyVec.push_back(toc[*kj].py());
463 
464  }
465 
466 
467  }// matching jet
468 
469  }// Jet Loop
470  }// valid jet collection
471  } // hlt matching with l1
472 
473  }// jet trigger
474  //------------------------------------------------------
475  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
476  const CaloMETCollection *calometcol = calometColl_.product();
477  const CaloMET met = calometcol->front();
478  v->getMEhisto_Pt()->Fill(met.pt());
479  v->getMEhisto_Phi()->Fill(met.phi());
480 
481  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),met.pt());
482  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),met.phi());
483  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-met.pt())/(toc[*kj].pt()));
484  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-met.phi())/(toc[*kj].phi()));
485  }// valid MET Collection
486 
487  //--------------------------------------------------------
488 
489  }//Loop over HLT trigger candidates
490  if((v->getTriggerType().compare("DiJet_Trigger") == 0))diJetFire = true;
491  }// valid hlt trigger object
492  }// Loop over L1 objects
493  }// valid L1
494  v->getMEhisto_N()->Fill(jetsize);
495  //--------------------------------------------------------
496  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && jetPtVec.size() >1)
497  {
498  double AveJetPt = (jetPtVec[0] + jetPtVec[1])/2;
499  double AveJetEta = (jetEtaVec[0] + jetEtaVec[1])/2;
500  double JetDelPhi = deltaPhi(jetPhiVec[0],jetPhiVec[1]);
501  double AveHLTPt = (hltPtVec[0] + hltPtVec[1])/2;
502  double AveHLTEta = (hltEtaVec[0] + hltEtaVec[1])/2;
503  double HLTDelPhi = deltaPhi(hltPhiVec[0],hltPhiVec[1]);
504  v->getMEhisto_AveragePt_RecObj()->Fill(AveJetPt);
505  v->getMEhisto_AverageEta_RecObj()->Fill(AveJetEta);
506  v->getMEhisto_DeltaPhi_RecObj()->Fill(JetDelPhi);
507 
508  v->getMEhisto_AveragePt_HLTObj()->Fill(AveHLTPt);
509  v->getMEhisto_AverageEta_HLTObj()->Fill(AveHLTEta);
510  v->getMEhisto_DeltaPhi_HLTObj()->Fill(HLTDelPhi);
511 
512 
513  }
514  //-----------------------------------------------------
515  if(v->getPath().find("L1") != std::string::npos && !fillL1HLT)
516  {
517  if ( l1Index >= triggerObj_->sizeFilters() ) {
518  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
519  } else {
520  l1TrigBool = true;
521  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
522  for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki)
523  {
524  double l1TrigEta = toc[*ki].eta();
525  double l1TrigPhi = toc[*ki].phi();
526  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0) ){
527  for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
528  double jetEta = jet->eta();
529  double jetPhi = jet->phi();
530  if(deltaR(l1TrigEta, l1TrigPhi, jetEta, jetPhi) < 0.4)
531  {
532  jetsize++;
533  v->getMEhisto_Pt()->Fill(jet->pt());
534  if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
535  if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
536  if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
537  v->getMEhisto_Eta()->Fill(jet->eta());
538  v->getMEhisto_Phi()->Fill(jet->phi());
539  v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
540 
541  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),jet->pt());
542  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*ki].eta(),jet->eta());
543  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),jet->phi());
544 
545  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-jet->pt())/(toc[*ki].pt()));
546  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*ki].eta()-jet->eta())/(toc[*ki].eta()));
547  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-jet->phi())/(toc[*ki].phi()));
548 
549  }// matching jet
550 
551  }// Jet Loop
552  v->getMEhisto_N()->Fill(jetsize);
553  }// valid Jet collection
554 
555  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
556  const CaloMETCollection *calometcol = calometColl_.product();
557  const CaloMET met = calometcol->front();
558  v->getMEhisto_Pt()->Fill(met.pt());
559  v->getMEhisto_Phi()->Fill(met.phi());
560 
561  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),met.pt());
562  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),met.phi());
563  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-met.pt())/(toc[*ki].pt()));
564  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-met.phi())/(toc[*ki].phi()));
565  }// valid MET Collection
566 
567 
568  }// Loop over keys
569  }// valid object
570  }// L1 is fired but not HLT
571  //-----------------------------------
572  }//Trigger is fired
573  }//Loop over all trigger paths
574 
575 }
virtual bool isEndCap(double eta)
double deltaPhi(float phi1, float phi2)
Definition: VectorUtil.h:30
edm::Handle< edm::TriggerResults > triggerResults_
T eta() const
Collection of Calo MET.
virtual bool isBarrel(double eta)
virtual bool isForward(double eta)
reco::CaloJetCollection calojet
bool isValid() const
Definition: HandleBase.h:76
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:83
virtual double pt() const
transverse momentum
std::vector< size_type > Keys
PathInfoCollection hltPathsAll_
edm::Handle< trigger::TriggerEvent > triggerObj_
T const * product() const
Definition: Handle.h:74
edm::Handle< reco::CaloMETCollection > calometColl_
virtual double phi() const
momentum azimuthal angle
mathSSE::Vec4< T > v
Definition: DDAxes.h:10
void JetMETHLTOfflineSource::fillMEforMonAllTriggerwrtMuonTrigger ( const edm::Event iEvent)
privatevirtual

Definition at line 578 of file JetMETHLTOfflineSource.cc.

References calojet, calojetColl_, calometColl_, Geom::deltaPhi(), deltaR(), eta(), hltPathsAll_, i, isBarrel(), isEndCap(), isForward(), isHLTPathAccepted(), edm::HandleBase::isValid(), metsig::jet, reco::btau::jetEta, reco::btau::jetPhi, CaloMET_cfi::met, MuonTrigPaths_, phi, reco::LeafCandidate::phi(), processname_, edm::Handle< T >::product(), reco::LeafCandidate::pt(), ExpressReco_HICollisions_FallBack::pt, trigger::TriggerJet, trigger::TriggerMET, triggerObj_, triggerResults_, and v.

Referenced by analyze().

578  {
579 
580  int npath;
581  if(&triggerResults_) {
582  npath = triggerResults_->size();
583  } else {
584  return;
585  }
586 
587  bool muTrig = false;
588  for(size_t i=0;i<MuonTrigPaths_.size();++i){
590  muTrig = true;
591  break;
592  }
593  }
594  if(muTrig)
595  {
596  //-----------------------------------------------------
597  const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
598  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v )
599  {
600  if (isHLTPathAccepted(v->getPath()))
601  {
602  std::vector<double>jetPtVec;
603  std::vector<double>jetPhiVec;
604  std::vector<double>jetEtaVec;
605  std::vector<double>jetPxVec;
606  std::vector<double>jetPyVec;
607 
608  std::vector<double>hltPtVec;
609  std::vector<double>hltPhiVec;
610  std::vector<double>hltEtaVec;
611  std::vector<double>hltPxVec;
612  std::vector<double>hltPyVec;
613  bool fillL1HLT = false;
614  //---------------------------------------------
615  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
616  const int l1Index = triggerObj_->filterIndex(l1Tag);
617  edm::InputTag hltTag(v->getLabel(),"",processname_);
618  const int hltIndex = triggerObj_->filterIndex(hltTag);
619  bool l1TrigBool = false;
620  bool hltTrigBool = false;
621  bool diJetFire = false;
622  int jetsize = 0;
623  if ( l1Index >= triggerObj_->sizeFilters() ) {
624  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
625  } else {
626  l1TrigBool = true;
627  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
628  if(v->getObjectType() == trigger::TriggerJet)v->getMEhisto_N_L1()->Fill(kl1.size());
629  for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki)
630  {
631  double l1TrigEta = -100;
632  double l1TrigPhi = -100;
633  //-------------------------------------------
634  if(v->getObjectType() == trigger::TriggerJet)
635  {
636  l1TrigEta = toc[*ki].eta();
637  l1TrigPhi = toc[*ki].phi();
638  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
639  if (isBarrel(toc[*ki].eta())) v->getMEhisto_PtBarrel_L1()->Fill(toc[*ki].pt());
640  if (isEndCap(toc[*ki].eta())) v->getMEhisto_PtEndcap_L1()->Fill(toc[*ki].pt());
641  if (isForward(toc[*ki].eta())) v->getMEhisto_PtForward_L1()->Fill(toc[*ki].pt());
642  v->getMEhisto_Eta_L1()->Fill(toc[*ki].eta());
643  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
644  v->getMEhisto_EtaPhi_L1()->Fill(toc[*ki].eta(),toc[*ki].phi());
645  }
646  if(v->getObjectType() == trigger::TriggerMET)
647  {
648  v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
649  v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
650  }
651  //-----------------------------------------------
652  if ( hltIndex >= triggerObj_->sizeFilters() ) {
653  edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
654  } else {
655  const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
656  if((v->getObjectType() == trigger::TriggerJet) && (ki == kl1.begin()))v->getMEhisto_N_HLT()->Fill(khlt.size());
657 
658  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj)
659  {
660  double hltTrigEta = -100;
661  double hltTrigPhi = -100;
662  if(v->getObjectType() == trigger::TriggerJet)
663  {
664  hltTrigEta = toc[*kj].eta();
665  hltTrigPhi = toc[*kj].phi();
666  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4 && (v->getTriggerType().compare("DiJet_Trigger") == 0))hltTrigBool = true;
667  }
668  }
669  for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj)
670  {
671  double hltTrigEta = -100;
672  double hltTrigPhi = -100;
673  fillL1HLT = true;
674  //--------------------------------------------------
675  if(v->getObjectType() == trigger::TriggerMET)
676  {
677  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
678  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
679  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
680  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
681  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
682  v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
683  }
684  //--------------------------------------------------
685  if(v->getObjectType() == trigger::TriggerJet)
686  {
687  hltTrigEta = toc[*kj].eta();
688  hltTrigPhi = toc[*kj].phi();
689 
690  if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4)
691  {
692 
693  v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
694  v->getMEhisto_EtaCorrelation_L1HLT()->Fill(toc[*ki].eta(),toc[*kj].eta());
695  v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
696 
697  v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
698  v->getMEhisto_EtaResolution_L1HLT()->Fill((toc[*ki].eta()-toc[*kj].eta())/(toc[*ki].eta()));
699  v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
700  }
701 
702  if(((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi) < 0.4 ) || ((v->getTriggerType().compare("DiJet_Trigger") == 0) && hltTrigBool)
703  ) && !diJetFire)
704  {
705  v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
706  if (isBarrel(toc[*kj].eta())) v->getMEhisto_PtBarrel_HLT()->Fill(toc[*kj].pt());
707  if (isEndCap(toc[*kj].eta())) v->getMEhisto_PtEndcap_HLT()->Fill(toc[*kj].pt());
708  if (isForward(toc[*kj].eta())) v->getMEhisto_PtForward_HLT()->Fill(toc[*kj].pt());
709  v->getMEhisto_Eta_HLT()->Fill(toc[*kj].eta());
710  v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
711  v->getMEhisto_EtaPhi_HLT()->Fill(toc[*kj].eta(),toc[*kj].phi());
712  //-------------------------------------------------
713 
714  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
715 
716  for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
717  double jetEta = jet->eta();
718  double jetPhi = jet->phi();
719  if(deltaR(hltTrigEta, hltTrigPhi, jetEta, jetPhi) < 0.4)
720  {
721  jetsize++;
722  v->getMEhisto_Pt()->Fill(jet->pt());
723  if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
724  if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
725  if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
726  v->getMEhisto_Eta()->Fill(jet->eta());
727  v->getMEhisto_Phi()->Fill(jet->phi());
728  v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
729 
730  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),jet->pt());
731  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),jet->eta());
732  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),jet->phi());
733 
734  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-jet->pt())/(toc[*kj].pt()));
735  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*kj].eta()-jet->eta())/(toc[*kj].eta()));
736  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-jet->phi())/(toc[*kj].phi()));
737 
738  //-------------------------------------------------------
739  if((v->getTriggerType().compare("DiJet_Trigger") == 0))
740  {
741  jetPhiVec.push_back(jet->phi());
742  jetPtVec.push_back(jet->pt());
743  jetEtaVec.push_back(jet->eta());
744  jetPxVec.push_back(jet->px());
745  jetPyVec.push_back(jet->py());
746 
747  hltPhiVec.push_back(toc[*kj].phi());
748  hltPtVec.push_back(toc[*kj].pt());
749  hltEtaVec.push_back(toc[*kj].eta());
750  hltPxVec.push_back(toc[*kj].px());
751  hltPyVec.push_back(toc[*kj].py());
752 
753  }
754 
755 
756  }// matching jet
757 
758  }// Jet Loop
759  }// valid jet collection
760  } // hlt matching with l1
761 
762  }// jet trigger
763  //------------------------------------------------------
764  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
765  const CaloMETCollection *calometcol = calometColl_.product();
766  const CaloMET met = calometcol->front();
767  v->getMEhisto_Pt()->Fill(met.pt());
768  v->getMEhisto_Phi()->Fill(met.phi());
769 
770  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),met.pt());
771  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),met.phi());
772  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-met.pt())/(toc[*kj].pt()));
773  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-met.phi())/(toc[*kj].phi()));
774  }// valid MET Collection
775 
776  //--------------------------------------------------------
777 
778  }//Loop over HLT trigger candidates
779  if((v->getTriggerType().compare("DiJet_Trigger") == 0))diJetFire = true;
780  }// valid hlt trigger object
781  }// Loop over L1 objects
782  }// valid L1
783  v->getMEhisto_N()->Fill(jetsize);
784  //--------------------------------------------------------
785  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && jetPtVec.size() >1)
786  {
787  double AveJetPt = (jetPtVec[0] + jetPtVec[1])/2;
788  double AveJetEta = (jetEtaVec[0] + jetEtaVec[1])/2;
789  double JetDelPhi = deltaPhi(jetPhiVec[0],jetPhiVec[1]);
790  double AveHLTPt = (hltPtVec[0] + hltPtVec[1])/2;
791  double AveHLTEta = (hltEtaVec[0] + hltEtaVec[1])/2;
792  double HLTDelPhi = deltaPhi(hltPhiVec[0],hltPhiVec[1]);
793  v->getMEhisto_AveragePt_RecObj()->Fill(AveJetPt);
794  v->getMEhisto_AverageEta_RecObj()->Fill(AveJetEta);
795  v->getMEhisto_DeltaPhi_RecObj()->Fill(JetDelPhi);
796 
797  v->getMEhisto_AveragePt_HLTObj()->Fill(AveHLTPt);
798  v->getMEhisto_AverageEta_HLTObj()->Fill(AveHLTEta);
799  v->getMEhisto_DeltaPhi_HLTObj()->Fill(HLTDelPhi);
800 
801 
802  }
803  //-----------------------------------------------------
804  if(v->getPath().find("L1") != std::string::npos && !fillL1HLT)
805  {
806  if ( l1Index >= triggerObj_->sizeFilters() ) {
807  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
808  } else {
809  l1TrigBool = true;
810  const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
811  for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki)
812  {
813  double l1TrigEta = toc[*ki].eta();
814  double l1TrigPhi = toc[*ki].phi();
815  if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0) ){
816  for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
817  double jetEta = jet->eta();
818  double jetPhi = jet->phi();
819  if(deltaR(l1TrigEta, l1TrigPhi, jetEta, jetPhi) < 0.4)
820  {
821  jetsize++;
822  v->getMEhisto_Pt()->Fill(jet->pt());
823  if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
824  if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
825  if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
826  v->getMEhisto_Eta()->Fill(jet->eta());
827  v->getMEhisto_Phi()->Fill(jet->phi());
828  v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
829 
830  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),jet->pt());
831  v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*ki].eta(),jet->eta());
832  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),jet->phi());
833 
834  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-jet->pt())/(toc[*ki].pt()));
835  v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*ki].eta()-jet->eta())/(toc[*ki].eta()));
836  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-jet->phi())/(toc[*ki].phi()));
837 
838  }// matching jet
839 
840  }// Jet Loop
841  v->getMEhisto_N()->Fill(jetsize);
842  }// valid Jet collection
843 
844  if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
845  const CaloMETCollection *calometcol = calometColl_.product();
846  const CaloMET met = calometcol->front();
847  v->getMEhisto_Pt()->Fill(met.pt());
848  v->getMEhisto_Phi()->Fill(met.phi());
849 
850  v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),met.pt());
851  v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),met.phi());
852  v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-met.pt())/(toc[*ki].pt()));
853  v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-met.phi())/(toc[*ki].phi()));
854  }// valid MET Collection
855 
856 
857  }// Loop over keys
858  }// valid object
859  }// L1 is fired but not HLT
860  //-----------------------------------
861  }//Trigger is fired
862  }//Loop over all trigger paths
863 
864 
865  }// Muon trigger fired
866 
867 
868 }
int i
Definition: DBlmapReader.cc:9
virtual bool isEndCap(double eta)
double deltaPhi(float phi1, float phi2)
Definition: VectorUtil.h:30
edm::Handle< edm::TriggerResults > triggerResults_
T eta() const
Collection of Calo MET.
virtual bool isBarrel(double eta)
virtual bool isForward(double eta)
reco::CaloJetCollection calojet
std::vector< std::string > MuonTrigPaths_
bool isValid() const
Definition: HandleBase.h:76
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:83
virtual double pt() const
transverse momentum
std::vector< size_type > Keys
PathInfoCollection hltPathsAll_
edm::Handle< trigger::TriggerEvent > triggerObj_
T const * product() const
Definition: Handle.h:74
edm::Handle< reco::CaloMETCollection > calometColl_
virtual double phi() const
momentum azimuthal angle
mathSSE::Vec4< T > v
Definition: DDAxes.h:10
void JetMETHLTOfflineSource::fillMEforMonTriggerSummary ( )
privatevirtual

Definition at line 169 of file JetMETHLTOfflineSource.cc.

References correlation_All, correlation_AllWrtMB, correlation_AllWrtMu, MonitorElement::Fill(), hltPathsAll_, i, isHLTPathAccepted(), MBTrigPaths_, MuonTrigPaths_, rate_All, rate_AllWrtMB, rate_AllWrtMu, TriggerPosition(), and v.

Referenced by analyze().

169  {
170  // Trigger summary for all paths
171 
172  bool muTrig = false;
173  bool mbTrig = false;
174  for(size_t i=0;i<MuonTrigPaths_.size();++i){
176  muTrig = true;
177  break;
178  }
179  }
180  for(size_t i=0;i<MBTrigPaths_.size();++i){
182  mbTrig = true;
183  break;
184  }
185  }
186  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v )
187  {
188  bool trigFirst= false;
189  double binV = TriggerPosition(v->getPath());
190  if(isHLTPathAccepted(v->getPath())) trigFirst = true;
191  if(!trigFirst)continue;
192  if(trigFirst)
193  {
194  rate_All->Fill(binV);
195  correlation_All->Fill(binV,binV);
196  if(muTrig){
197  rate_AllWrtMu->Fill(binV);
198  correlation_AllWrtMu->Fill(binV,binV);
199  }
200  if(mbTrig){
201  rate_AllWrtMB->Fill(binV);
202  correlation_AllWrtMB->Fill(binV,binV);
203  }
204  }
205  for(PathInfoCollection::iterator w = v+1; w!= hltPathsAll_.end(); ++w )
206  {
207  bool trigSec = false;
208  double binW = TriggerPosition(w->getPath());
209  if(isHLTPathAccepted(w->getPath()))trigSec = true;
210  if(trigSec && trigFirst)
211  {
212  correlation_All->Fill(binV,binW);
213  if(muTrig)correlation_AllWrtMu->Fill(binV,binW);
214  if(mbTrig)correlation_AllWrtMB->Fill(binV,binW);
215  }
216  if(!trigSec && trigFirst)
217  {
218  correlation_All->Fill(binW,binV);
219  if(muTrig)correlation_AllWrtMu->Fill(binW,binV);
220  if(mbTrig)correlation_AllWrtMB->Fill(binW,binV);
221 
222  }
223  }
224  }
225 }
int i
Definition: DBlmapReader.cc:9
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
mathSSE::Vec4< T > v
void JetMETHLTOfflineSource::fillMEforTriggerNTfired ( )
privatevirtual

Definition at line 227 of file JetMETHLTOfflineSource.cc.

References calojet, calojetColl_, calometColl_, Geom::deltaPhi(), hltPathsAll_, getHLTprescales::index, edm::HandleBase::isValid(), metsig::jet, CaloMET_cfi::met, processname_, edm::Handle< T >::product(), reco::LeafCandidate::pt(), edm::TriggerNames::size(), edm::TriggerNames::triggerIndex(), triggerNames_, triggerObj_, triggerResults_, and v.

Referenced by analyze().

227  {
228 
229  int npath;
230  if(&triggerResults_) {
231  npath = triggerResults_->size();
232  } else {
233  return;
234  }
235  for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v )
236  {
237  unsigned index = triggerNames_.triggerIndex(v->getPath());
238  if (index < triggerNames_.size() )
239  {
240  v->getMEhisto_TriggerSummary()->Fill(0.);
241  edm::InputTag l1Tag(v->getl1Path(),"",processname_);
242  const int l1Index = triggerObj_->filterIndex(l1Tag);
243  bool l1found = false;
244  if ( l1Index < triggerObj_->sizeFilters() ) l1found = true;
245  if(!l1found)v->getMEhisto_TriggerSummary()->Fill(1.);
246  if(!l1found && !(triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(2.);
247  if(!l1found && (triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(3.);
248  if(l1found)v->getMEhisto_TriggerSummary()->Fill(4.);
249  if(l1found && (triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(5.);
250  if(l1found && !(triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(6.);
251  if(!(triggerResults_->accept(index)) && l1found)
252  {
253 
254  if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && (calojetColl_.isValid()) && calojet.size())
255 
256  {
257  CaloJetCollection::const_iterator jet = calojet.begin();
258  v->getMEhisto_JetPt()->Fill(jet->pt());
259  v->getMEhisto_EtavsPt()->Fill(jet->eta(),jet->pt());
260  v->getMEhisto_PhivsPt()->Fill(jet->phi(),jet->pt());
261 
262  }// single jet trigger is not fired
263 
264  if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojetColl_.isValid() && calojet.size())
265  {
266  v->getMEhisto_JetSize()->Fill(calojet.size()) ;
267  if (calojet.size()>=2){
268  CaloJetCollection::const_iterator jet = calojet.begin();
269  CaloJetCollection::const_iterator jet2= calojet.begin(); jet2++;
270  double jet3pt = 0.;
271  if(calojet.size()>2)
272  {
273  CaloJetCollection::const_iterator jet3 = jet2++;
274  jet3pt = jet3->pt();
275  }
276  v->getMEhisto_Pt12()->Fill((jet->pt()+jet2->pt())/2.);
277  v->getMEhisto_Eta12()->Fill((jet->eta()+jet2->eta())/2.);
278  v->getMEhisto_Phi12()->Fill(deltaPhi(jet->phi(),jet2->phi()));
279  v->getMEhisto_Pt3()->Fill(jet3pt);
280  v->getMEhisto_Pt12Pt3()->Fill((jet->pt()+jet2->pt())/2., jet3pt);
281  v->getMEhisto_Pt12Phi12()->Fill((jet->pt()+jet2->pt())/2., deltaPhi(jet->phi(),jet2->phi()));
282 
283  }
284  }// di jet trigger is not fired
285 
286  if((v->getTriggerType().compare("MET_Trigger") == 0) && calometColl_.isValid() )
287  {
288  const CaloMETCollection *calometcol = calometColl_.product();
289  const CaloMET met = calometcol->front();
290  v->getMEhisto_JetPt()->Fill(met.pt());
291  }//MET trigger is not fired
292  } // L1 is fired
293  }//
294  }// trigger not fired
295 
296 
297 
298 }
double deltaPhi(float phi1, float phi2)
Definition: VectorUtil.h:30
edm::Handle< edm::TriggerResults > triggerResults_
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:76
edm::Handle< reco::CaloJetCollection > calojetColl_
virtual double pt() const
transverse momentum
PathInfoCollection hltPathsAll_
edm::Handle< trigger::TriggerEvent > triggerObj_
T const * product() const
Definition: Handle.h:74
edm::Handle< reco::CaloMETCollection > calometColl_
mathSSE::Vec4< T > v
void JetMETHLTOfflineSource::histobooking ( const edm::EventSetup c)
private
bool JetMETHLTOfflineSource::isBarrel ( double  eta)
privatevirtual

Definition at line 3082 of file JetMETHLTOfflineSource.cc.

References convertSQLitetoXML_cfg::output.

Referenced by fillMEforEffAllTrigger(), fillMEforEffWrtMBTrigger(), fillMEforEffWrtMuTrigger(), fillMEforMonAllTrigger(), and fillMEforMonAllTriggerwrtMuonTrigger().

3082  {
3083  bool output = false;
3084  if (fabs(eta)<=1.3) output=true;
3085  return output;
3086 }
T eta() const
bool JetMETHLTOfflineSource::isEndCap ( double  eta)
privatevirtual

Definition at line 3089 of file JetMETHLTOfflineSource.cc.

References convertSQLitetoXML_cfg::output.

Referenced by fillMEforEffAllTrigger(), fillMEforEffWrtMBTrigger(), fillMEforEffWrtMuTrigger(), fillMEforMonAllTrigger(), and fillMEforMonAllTriggerwrtMuonTrigger().

3089  {
3090  bool output = false;
3091  if (fabs(eta)<=3.0 && fabs(eta)>1.3) output=true;
3092  return output;
3093 }
T eta() const
bool JetMETHLTOfflineSource::isForward ( double  eta)
privatevirtual

Definition at line 3096 of file JetMETHLTOfflineSource.cc.

References convertSQLitetoXML_cfg::output.

Referenced by fillMEforEffAllTrigger(), fillMEforEffWrtMBTrigger(), fillMEforEffWrtMuTrigger(), fillMEforMonAllTrigger(), and fillMEforMonAllTriggerwrtMuonTrigger().

3096  {
3097  bool output = false;
3098  if (fabs(eta)>3.0) output=true;
3099  return output;
3100 }
T eta() const
bool JetMETHLTOfflineSource::isHLTPathAccepted ( std::string  pathName)
privatevirtual

Definition at line 3113 of file JetMETHLTOfflineSource.cc.

References getHLTprescales::index, convertSQLitetoXML_cfg::output, edm::TriggerNames::size(), edm::TriggerNames::triggerIndex(), triggerNames_, and triggerResults_.

Referenced by fillMEforEffWrtMBTrigger(), fillMEforEffWrtMuTrigger(), fillMEforMonAllTrigger(), fillMEforMonAllTriggerwrtMuonTrigger(), and fillMEforMonTriggerSummary().

3113  {
3114  // triggerResults_, triggerNames_ has to be defined first before calling this method
3115  bool output=false;
3116  if(&triggerResults_) {
3118  if(index < triggerNames_.size() && triggerResults_->accept(index)) output = true;
3119  }
3120  return output;
3121 }
edm::Handle< edm::TriggerResults > triggerResults_
Strings::size_type size() const
Definition: TriggerNames.cc:39
const std::string * pathName() const
Definition: HLTadd.h:31
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
bool JetMETHLTOfflineSource::isTriggerObjectFound ( std::string  objectName)
privatevirtual

Definition at line 3141 of file JetMETHLTOfflineSource.cc.

References getHLTprescales::index, gen::k, convertSQLitetoXML_cfg::output, processname_, and triggerObj_.

3141  {
3142  // processname_, triggerObj_ has to be defined before calling this method
3143  bool output=false;
3145  const int index = triggerObj_->filterIndex(testTag);
3146  if ( index >= triggerObj_->sizeFilters() ) {
3147  edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< index << " of that name ";
3148  } else {
3149  const trigger::Keys & k = triggerObj_->filterKeys(index);
3150  if (k.size()) output=true;
3151  }
3152  return output;
3153 }
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 3123 of file JetMETHLTOfflineSource.cc.

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

Referenced by fillMEforMonTriggerSummary().

3123  {
3124  int nbins = rate_All->getTH1()->GetNbinsX();
3125  double binVal = -100;
3126  for(int ibin=1; ibin<nbins+1; ibin++)
3127  {
3128  const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
3129  if(binLabel[0]=='\0')continue;
3130  // std::string binLabel_str = string(binLabel);
3131  // if(binLabel_str.compare(trigName)!=0)continue;
3132  if(trigName.compare(binLabel)!=0)continue;
3133 
3134  if(trigName.compare(binLabel)==0){
3135  binVal = rate_All->getTH1()->GetBinCenter(ibin);
3136  break;
3137  }
3138  }
3139  return binVal;
3140 }
TH1 * getTH1(void) const
bool JetMETHLTOfflineSource::validPathHLT ( std::string  path)
privatevirtual

Definition at line 3103 of file JetMETHLTOfflineSource.cc.

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

3103  {
3104  // hltConfig_ has to be defined first before calling this method
3105  bool output=false;
3106  for (unsigned int j=0; j!=hltConfig_.size(); ++j) {
3107  if (hltConfig_.triggerName(j) == pathname )
3108  output=true;
3109  }
3110  return output;
3111 }
unsigned int size() const
number of trigger paths in trigger table
const std::string & triggerName(unsigned int triggerIndex) const
int j
Definition: DBlmapReader.cc:9

Member Data Documentation

double JetMETHLTOfflineSource::_fEMF
private
double JetMETHLTOfflineSource::_feta
private
double JetMETHLTOfflineSource::_fHPD
private
double JetMETHLTOfflineSource::_n90Hits
private
reco::CaloJetCollection JetMETHLTOfflineSource::calojet
private
edm::Handle<reco::CaloJetCollection> JetMETHLTOfflineSource::calojetColl_
private
edm::InputTag JetMETHLTOfflineSource::caloJetsTag_
private

Definition at line 123 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

edm::Handle<reco::CaloMETCollection> JetMETHLTOfflineSource::calometColl_
private
edm::InputTag JetMETHLTOfflineSource::caloMETTag_
private

Definition at line 124 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

MonitorElement* JetMETHLTOfflineSource::correlation_All
private

Definition at line 550 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and fillMEforMonTriggerSummary().

MonitorElement* JetMETHLTOfflineSource::correlation_AllWrtMB
private

Definition at line 552 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and fillMEforMonTriggerSummary().

MonitorElement* JetMETHLTOfflineSource::correlation_AllWrtMu
private

Definition at line 551 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and fillMEforMonTriggerSummary().

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

Definition at line 127 of file JetMETHLTOfflineSource.h.

Referenced by JetMETHLTOfflineSource().

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

Definition at line 128 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and JetMETHLTOfflineSource().

DQMStore* JetMETHLTOfflineSource::dbe
private

Definition at line 95 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and JetMETHLTOfflineSource().

std::string JetMETHLTOfflineSource::dirname_
private

Definition at line 105 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and JetMETHLTOfflineSource().

HLTConfigProvider JetMETHLTOfflineSource::hltConfig_
private

Definition at line 131 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and validPathHLT().

PathInfoCollection JetMETHLTOfflineSource::hltPathsAll_
private
PathInfoCollection JetMETHLTOfflineSource::hltPathsAllTriggerSummary_
private

Definition at line 539 of file JetMETHLTOfflineSource.h.

Referenced by beginRun().

PathInfoCollection JetMETHLTOfflineSource::hltPathsAllWrtMu_
private

Definition at line 541 of file JetMETHLTOfflineSource.h.

Referenced by beginRun().

PathInfoCollection JetMETHLTOfflineSource::hltPathsEff_
private

Definition at line 542 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and fillMEforEffAllTrigger().

PathInfoCollection JetMETHLTOfflineSource::hltPathsEffWrtMB_
private

Definition at line 544 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and fillMEforEffWrtMBTrigger().

PathInfoCollection JetMETHLTOfflineSource::hltPathsEffWrtMu_
private

Definition at line 543 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and fillMEforEffWrtMuTrigger().

bool JetMETHLTOfflineSource::isSetup_
private

Definition at line 114 of file JetMETHLTOfflineSource.h.

Referenced by beginRun().

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

Definition at line 115 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and JetMETHLTOfflineSource().

int JetMETHLTOfflineSource::nev_
private

Definition at line 94 of file JetMETHLTOfflineSource.h.

bool JetMETHLTOfflineSource::plotAll_
private

Definition at line 111 of file JetMETHLTOfflineSource.h.

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

bool JetMETHLTOfflineSource::plotAllwrtMu_
private

Definition at line 112 of file JetMETHLTOfflineSource.h.

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

bool JetMETHLTOfflineSource::plotEff_
private

Definition at line 113 of file JetMETHLTOfflineSource.h.

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

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

Definition at line 102 of file JetMETHLTOfflineSource.h.

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

Definition at line 546 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), fillMEforMonTriggerSummary(), and TriggerPosition().

MonitorElement* JetMETHLTOfflineSource::rate_AllWrtMB
private

Definition at line 548 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and fillMEforMonTriggerSummary().

MonitorElement* JetMETHLTOfflineSource::rate_AllWrtMu
private

Definition at line 547 of file JetMETHLTOfflineSource.h.

Referenced by beginRun(), and fillMEforMonTriggerSummary().

MonitorElement* JetMETHLTOfflineSource::scalersSelect
private

Definition at line 136 of file JetMETHLTOfflineSource.h.

MonitorElement* JetMETHLTOfflineSource::total_
private

Definition at line 97 of file JetMETHLTOfflineSource.h.

edm::TriggerNames JetMETHLTOfflineSource::triggerNames_
private
edm::Handle<trigger::TriggerEvent> JetMETHLTOfflineSource::triggerObj_
private
edm::Handle<edm::TriggerResults> JetMETHLTOfflineSource::triggerResults_
private
edm::InputTag JetMETHLTOfflineSource::triggerResultsLabel_
private

Definition at line 122 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

edm::InputTag JetMETHLTOfflineSource::triggerSummaryLabel_
private

Definition at line 121 of file JetMETHLTOfflineSource.h.

Referenced by analyze(), and JetMETHLTOfflineSource().

bool JetMETHLTOfflineSource::verbose_
private