00001
00002
00003
00004
00005
00006
00007 #include "TMath.h"
00008 #include "FWCore/Framework/interface/EDAnalyzer.h"
00009 #include "DataFormats/Common/interface/Handle.h"
00010 #include "FWCore/Framework/interface/Run.h"
00011 #include "FWCore/Framework/interface/MakerMacros.h"
00012 #include "FWCore/Framework/interface/ESHandle.h"
00013
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "DQMOffline/Trigger/interface/JetMETHLTOfflineSource.h"
00016
00017 #include "DataFormats/Common/interface/TriggerResults.h"
00018 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
00019 #include "DataFormats/HLTReco/interface/TriggerObject.h"
00020 #include "FWCore/Common/interface/TriggerNames.h"
00021 #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
00022 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
00023
00024 #include "DataFormats/Math/interface/deltaR.h"
00025
00026 #include "DQMServices/Core/interface/MonitorElement.h"
00027 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00028 #include "math.h"
00029 #include "TH1F.h"
00030 #include "TProfile.h"
00031 #include "TH2F.h"
00032 #include "TPRegexp.h"
00033
00034 using namespace edm;
00035 using namespace reco;
00036 using namespace std;
00037
00038
00039 JetMETHLTOfflineSource::JetMETHLTOfflineSource(const edm::ParameterSet& iConfig):
00040 isSetup_(false)
00041 {
00042 LogDebug("JetMETHLTOfflineSource") << "constructor....";
00043
00044 dbe = Service < DQMStore > ().operator->();
00045 if ( ! dbe ) {
00046 LogDebug("JetMETHLTOfflineSource") << "unabel to get DQMStore service?";
00047 }
00048 if (iConfig.getUntrackedParameter < bool > ("DQMStore", false)) {
00049 dbe->setVerbose(0);
00050 }
00051
00052 dirname_ = iConfig.getUntrackedParameter("dirname",
00053 std::string("HLT/JetMET/"));
00054
00055
00056 processname_ = iConfig.getParameter<std::string>("processname");
00057 verbose_ = iConfig.getUntrackedParameter< bool >("verbose", false);
00058 plotAll_ = iConfig.getUntrackedParameter< bool >("plotAll", false);
00059 plotAllwrtMu_ = iConfig.getUntrackedParameter< bool >("plotAllwrtMu", false);
00060 plotEff_ = iConfig.getUntrackedParameter< bool >("plotEff", false);
00061 nameForEff_ = iConfig.getUntrackedParameter< bool >("nameForEff", true);
00062 jetID = new reco::helper::JetIDHelper(iConfig.getParameter<ParameterSet>("JetIDParams"));
00063
00064
00065 MuonTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMuon");
00066 MBTrigPaths_ = iConfig.getUntrackedParameter<vector<std::string> >("pathnameMB");
00067 caloJetsTag_ = iConfig.getParameter<edm::InputTag>("CaloJetCollectionLabel");
00068 caloMETTag_ = iConfig.getParameter<edm::InputTag>("CaloMETCollectionLabel");
00069 triggerSummaryLabel_ = iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
00070 triggerResultsLabel_ = iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
00071 custompathname = iConfig.getUntrackedParameter<vector<std::string> >("paths");
00072 _fEMF = iConfig.getUntrackedParameter< double >("fEMF", 0.01);
00073 _feta = iConfig.getUntrackedParameter< double >("feta", 2.60);
00074 _fHPD = iConfig.getUntrackedParameter< double >("fHPD", 0.98);
00075 _n90Hits = iConfig.getUntrackedParameter< double >("n90Hits", 1.0);
00076
00077 std::vector<edm::ParameterSet> paths = iConfig.getParameter<std::vector<edm::ParameterSet> >("pathPairs");
00078 for(std::vector<edm::ParameterSet>::iterator pathconf = paths.begin() ; pathconf != paths.end(); pathconf++) {
00079
00080 std::pair<std::string, std::string> custompathnamepair;
00081 custompathnamepair.first =pathconf->getParameter<std::string>("pathname");
00082 custompathnamepair.second = pathconf->getParameter<std::string>("denompathname");
00083 custompathnamepairs_.push_back(custompathnamepair);
00084 }
00085
00086
00087 }
00088
00089
00090 JetMETHLTOfflineSource::~JetMETHLTOfflineSource() {
00091
00092
00093
00094
00095
00096
00097 }
00098
00099
00100 void
00101 JetMETHLTOfflineSource::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){
00102 using namespace edm;
00103 using namespace trigger;
00104 using namespace reco;
00105
00106 iEvent.getByLabel(triggerResultsLabel_, triggerResults_);
00107 if(!triggerResults_.isValid()) {
00108 edm::InputTag triggerResultsLabelFU(triggerResultsLabel_.label(),triggerResultsLabel_.instance(), "FU");
00109 iEvent.getByLabel(triggerResultsLabelFU,triggerResults_);
00110 if(!triggerResults_.isValid()) {
00111 edm::LogInfo("FourVectorHLTOffline") << "TriggerResults not found, "
00112 "skipping event";
00113 return;
00114 }
00115 }
00116
00117 int npath;
00118 if(&triggerResults_) {
00119
00120
00121 npath = triggerResults_->size();
00122 triggerNames_ = iEvent.triggerNames(*triggerResults_);
00123
00124
00125 } else {
00126
00127 edm::LogInfo("CaloMETHLTOfflineSource") << "TriggerResults::HLT not found, "
00128 "automatically select events";
00129 return;
00130
00131 }
00132
00133 iEvent.getByLabel(triggerSummaryLabel_,triggerObj_);
00134 if(!triggerObj_.isValid()) {
00135 edm::InputTag triggerSummaryLabelFU(triggerSummaryLabel_.label(),triggerSummaryLabel_.instance(), "FU");
00136 iEvent.getByLabel(triggerSummaryLabelFU,triggerObj_);
00137 if(!triggerObj_.isValid()) {
00138 edm::LogInfo("FourVectorHLTOffline") << "TriggerEvent not found, "
00139 "skipping event";
00140 return;
00141 }
00142 }
00143
00144 bool ValidJetColl_ = iEvent.getByLabel(caloJetsTag_,calojetColl_);
00145 if(!ValidJetColl_)return;
00146 calojet = *calojetColl_;
00147 std::stable_sort( calojet.begin(), calojet.end(), PtSorter() );
00148
00149 bool ValidMETColl_ = iEvent.getByLabel(caloMETTag_, calometColl_);
00150 if(!ValidMETColl_)return;
00151
00152 if(calometColl_.isValid()){
00153 const CaloMETCollection *calometcol = calometColl_.product();
00154 const CaloMET met = calometcol->front();
00155 }
00156 fillMEforMonTriggerSummary();
00157 if(plotAll_)fillMEforMonAllTrigger(iEvent);
00158 if(plotAllwrtMu_)fillMEforMonAllTriggerwrtMuonTrigger(iEvent);
00159 if(plotEff_)
00160 {
00161 fillMEforEffAllTrigger(iEvent);
00162 fillMEforEffWrtMuTrigger(iEvent);
00163 fillMEforEffWrtMBTrigger(iEvent);
00164 }
00165 fillMEforTriggerNTfired();
00166 }
00167
00168
00169 void JetMETHLTOfflineSource::fillMEforMonTriggerSummary(){
00170
00171
00172 bool muTrig = false;
00173 bool mbTrig = false;
00174 for(size_t i=0;i<MuonTrigPaths_.size();++i){
00175 if(isHLTPathAccepted(MuonTrigPaths_[i])){
00176 muTrig = true;
00177 break;
00178 }
00179 }
00180 for(size_t i=0;i<MBTrigPaths_.size();++i){
00181 if(isHLTPathAccepted(MBTrigPaths_[i])){
00182 mbTrig = true;
00183 break;
00184 }
00185 }
00186 for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v )
00187 {
00188 bool trigFirst= false;
00189 double binV = TriggerPosition(v->getPath());
00190 if(isHLTPathAccepted(v->getPath())) trigFirst = true;
00191 if(!trigFirst)continue;
00192 if(trigFirst)
00193 {
00194 rate_All->Fill(binV);
00195 correlation_All->Fill(binV,binV);
00196 if(muTrig){
00197 rate_AllWrtMu->Fill(binV);
00198 correlation_AllWrtMu->Fill(binV,binV);
00199 }
00200 if(mbTrig){
00201 rate_AllWrtMB->Fill(binV);
00202 correlation_AllWrtMB->Fill(binV,binV);
00203 }
00204 }
00205 for(PathInfoCollection::iterator w = v+1; w!= hltPathsAll_.end(); ++w )
00206 {
00207 bool trigSec = false;
00208 double binW = TriggerPosition(w->getPath());
00209 if(isHLTPathAccepted(w->getPath()))trigSec = true;
00210 if(trigSec && trigFirst)
00211 {
00212 correlation_All->Fill(binV,binW);
00213 if(muTrig)correlation_AllWrtMu->Fill(binV,binW);
00214 if(mbTrig)correlation_AllWrtMB->Fill(binV,binW);
00215 }
00216 if(!trigSec && trigFirst)
00217 {
00218 correlation_All->Fill(binW,binV);
00219 if(muTrig)correlation_AllWrtMu->Fill(binW,binV);
00220 if(mbTrig)correlation_AllWrtMB->Fill(binW,binV);
00221
00222 }
00223 }
00224 }
00225 }
00226
00227 void JetMETHLTOfflineSource::fillMEforTriggerNTfired(){
00228
00229 int npath;
00230 if(&triggerResults_) {
00231 npath = triggerResults_->size();
00232 } else {
00233 return;
00234 }
00235 for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v )
00236 {
00237 unsigned index = triggerNames_.triggerIndex(v->getPath());
00238 if (index < triggerNames_.size() )
00239 {
00240 v->getMEhisto_TriggerSummary()->Fill(0.);
00241 edm::InputTag l1Tag(v->getl1Path(),"",processname_);
00242 const int l1Index = triggerObj_->filterIndex(l1Tag);
00243 bool l1found = false;
00244 if ( l1Index < triggerObj_->sizeFilters() ) l1found = true;
00245 if(!l1found)v->getMEhisto_TriggerSummary()->Fill(1.);
00246 if(!l1found && !(triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(2.);
00247 if(!l1found && (triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(3.);
00248 if(l1found)v->getMEhisto_TriggerSummary()->Fill(4.);
00249 if(l1found && (triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(5.);
00250 if(l1found && !(triggerResults_->accept(index)))v->getMEhisto_TriggerSummary()->Fill(6.);
00251 if(!(triggerResults_->accept(index)) && l1found)
00252 {
00253
00254 if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && (calojetColl_.isValid()) && calojet.size())
00255
00256 {
00257 CaloJetCollection::const_iterator jet = calojet.begin();
00258 v->getMEhisto_JetPt()->Fill(jet->pt());
00259 v->getMEhisto_EtavsPt()->Fill(jet->eta(),jet->pt());
00260 v->getMEhisto_PhivsPt()->Fill(jet->phi(),jet->pt());
00261
00262 }
00263
00264 if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojetColl_.isValid() && calojet.size())
00265 {
00266 v->getMEhisto_JetSize()->Fill(calojet.size()) ;
00267 if (calojet.size()>=2){
00268 CaloJetCollection::const_iterator jet = calojet.begin();
00269 CaloJetCollection::const_iterator jet2= calojet.begin(); jet2++;
00270 double jet3pt = 0.;
00271 if(calojet.size()>2)
00272 {
00273 CaloJetCollection::const_iterator jet3 = jet2++;
00274 jet3pt = jet3->pt();
00275 }
00276 v->getMEhisto_Pt12()->Fill((jet->pt()+jet2->pt())/2.);
00277 v->getMEhisto_Eta12()->Fill((jet->eta()+jet2->eta())/2.);
00278 v->getMEhisto_Phi12()->Fill(deltaPhi(jet->phi(),jet2->phi()));
00279 v->getMEhisto_Pt3()->Fill(jet3pt);
00280 v->getMEhisto_Pt12Pt3()->Fill((jet->pt()+jet2->pt())/2., jet3pt);
00281 v->getMEhisto_Pt12Phi12()->Fill((jet->pt()+jet2->pt())/2., deltaPhi(jet->phi(),jet2->phi()));
00282
00283 }
00284 }
00285
00286 if((v->getTriggerType().compare("MET_Trigger") == 0) && calometColl_.isValid() )
00287 {
00288 const CaloMETCollection *calometcol = calometColl_.product();
00289 const CaloMET met = calometcol->front();
00290 v->getMEhisto_JetPt()->Fill(met.pt());
00291 }
00292 }
00293 }
00294 }
00295
00296
00297
00298 }
00299
00300
00301 void JetMETHLTOfflineSource::fillMEforMonAllTrigger(const Event & iEvent){
00302 int npath;
00303 if(&triggerResults_) {
00304 npath = triggerResults_->size();
00305 } else {
00306 return;
00307 }
00308
00309 const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
00310 for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v )
00311 {
00312 if (isHLTPathAccepted(v->getPath()))
00313 {
00314 std::vector<double>jetPtVec;
00315 std::vector<double>jetPhiVec;
00316 std::vector<double>jetEtaVec;
00317 std::vector<double>jetPxVec;
00318 std::vector<double>jetPyVec;
00319
00320 std::vector<double>hltPtVec;
00321 std::vector<double>hltPhiVec;
00322 std::vector<double>hltEtaVec;
00323 std::vector<double>hltPxVec;
00324 std::vector<double>hltPyVec;
00325 bool fillL1HLT = false;
00326
00327 edm::InputTag l1Tag(v->getl1Path(),"",processname_);
00328 const int l1Index = triggerObj_->filterIndex(l1Tag);
00329 edm::InputTag hltTag(v->getLabel(),"",processname_);
00330 const int hltIndex = triggerObj_->filterIndex(hltTag);
00331 bool l1TrigBool = false;
00332 bool hltTrigBool = false;
00333 bool diJetFire = false;
00334 int jetsize = 0;
00335 if ( l1Index >= triggerObj_->sizeFilters() ) {
00336 edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
00337 } else {
00338 l1TrigBool = true;
00339 const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
00340 if(v->getObjectType() == trigger::TriggerJet)v->getMEhisto_N_L1()->Fill(kl1.size());
00341 for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki)
00342 {
00343 double l1TrigEta = -100;
00344 double l1TrigPhi = -100;
00345
00346 if(v->getObjectType() == trigger::TriggerJet)
00347 {
00348 l1TrigEta = toc[*ki].eta();
00349 l1TrigPhi = toc[*ki].phi();
00350 v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
00351 if (isBarrel(toc[*ki].eta())) v->getMEhisto_PtBarrel_L1()->Fill(toc[*ki].pt());
00352 if (isEndCap(toc[*ki].eta())) v->getMEhisto_PtEndcap_L1()->Fill(toc[*ki].pt());
00353 if (isForward(toc[*ki].eta())) v->getMEhisto_PtForward_L1()->Fill(toc[*ki].pt());
00354 v->getMEhisto_Eta_L1()->Fill(toc[*ki].eta());
00355 v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
00356 v->getMEhisto_EtaPhi_L1()->Fill(toc[*ki].eta(),toc[*ki].phi());
00357 }
00358 if(v->getObjectType() == trigger::TriggerMET)
00359 {
00360 v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
00361 v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
00362 }
00363
00364 if ( hltIndex >= triggerObj_->sizeFilters() ) {
00365 edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
00366 } else {
00367 const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
00368 if((v->getObjectType() == trigger::TriggerJet) && (ki == kl1.begin()))v->getMEhisto_N_HLT()->Fill(khlt.size());
00369
00370 for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj)
00371 {
00372 double hltTrigEta = -100;
00373 double hltTrigPhi = -100;
00374 if(v->getObjectType() == trigger::TriggerJet)
00375 {
00376 hltTrigEta = toc[*kj].eta();
00377 hltTrigPhi = toc[*kj].phi();
00378 if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4 && (v->getTriggerType().compare("DiJet_Trigger") == 0))hltTrigBool = true;
00379 }
00380 }
00381 for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj)
00382 {
00383 double hltTrigEta = -100;
00384 double hltTrigPhi = -100;
00385 fillL1HLT = true;
00386
00387 if(v->getObjectType() == trigger::TriggerMET)
00388 {
00389 v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
00390 v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
00391 v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
00392 v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
00393 v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
00394 v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
00395 }
00396
00397 if(v->getObjectType() == trigger::TriggerJet)
00398 {
00399 hltTrigEta = toc[*kj].eta();
00400 hltTrigPhi = toc[*kj].phi();
00401
00402 if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4)
00403 {
00404
00405 v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
00406 v->getMEhisto_EtaCorrelation_L1HLT()->Fill(toc[*ki].eta(),toc[*kj].eta());
00407 v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
00408
00409 v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
00410 v->getMEhisto_EtaResolution_L1HLT()->Fill((toc[*ki].eta()-toc[*kj].eta())/(toc[*ki].eta()));
00411 v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
00412 }
00413
00414 if(((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi) < 0.4 ) || ((v->getTriggerType().compare("DiJet_Trigger") == 0) && hltTrigBool)) && !diJetFire)
00415 {
00416 v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
00417 if (isBarrel(toc[*kj].eta())) v->getMEhisto_PtBarrel_HLT()->Fill(toc[*kj].pt());
00418 if (isEndCap(toc[*kj].eta())) v->getMEhisto_PtEndcap_HLT()->Fill(toc[*kj].pt());
00419 if (isForward(toc[*kj].eta())) v->getMEhisto_PtForward_HLT()->Fill(toc[*kj].pt());
00420 v->getMEhisto_Eta_HLT()->Fill(toc[*kj].eta());
00421 v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
00422 v->getMEhisto_EtaPhi_HLT()->Fill(toc[*kj].eta(),toc[*kj].phi());
00423
00424
00425 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
00426
00427 for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
00428 double jetEta = jet->eta();
00429 double jetPhi = jet->phi();
00430 if(deltaR(hltTrigEta, hltTrigPhi, jetEta, jetPhi) < 0.4)
00431 {
00432 jetsize++;
00433 v->getMEhisto_Pt()->Fill(jet->pt());
00434 if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
00435 if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
00436 if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
00437 v->getMEhisto_Eta()->Fill(jet->eta());
00438 v->getMEhisto_Phi()->Fill(jet->phi());
00439 v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
00440
00441 v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),jet->pt());
00442 v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),jet->eta());
00443 v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),jet->phi());
00444
00445 v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-jet->pt())/(toc[*kj].pt()));
00446 v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*kj].eta()-jet->eta())/(toc[*kj].eta()));
00447 v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-jet->phi())/(toc[*kj].phi()));
00448
00449
00450 if((v->getTriggerType().compare("DiJet_Trigger") == 0))
00451 {
00452 jetPhiVec.push_back(jet->phi());
00453 jetPtVec.push_back(jet->pt());
00454 jetEtaVec.push_back(jet->eta());
00455 jetPxVec.push_back(jet->px());
00456 jetPyVec.push_back(jet->py());
00457
00458 hltPhiVec.push_back(toc[*kj].phi());
00459 hltPtVec.push_back(toc[*kj].pt());
00460 hltEtaVec.push_back(toc[*kj].eta());
00461 hltPxVec.push_back(toc[*kj].px());
00462 hltPyVec.push_back(toc[*kj].py());
00463
00464 }
00465
00466
00467 }
00468
00469 }
00470 }
00471 }
00472
00473 }
00474
00475 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
00476 const CaloMETCollection *calometcol = calometColl_.product();
00477 const CaloMET met = calometcol->front();
00478 v->getMEhisto_Pt()->Fill(met.pt());
00479 v->getMEhisto_Phi()->Fill(met.phi());
00480
00481 v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),met.pt());
00482 v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),met.phi());
00483 v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-met.pt())/(toc[*kj].pt()));
00484 v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-met.phi())/(toc[*kj].phi()));
00485 }
00486
00487
00488
00489 }
00490 if((v->getTriggerType().compare("DiJet_Trigger") == 0))diJetFire = true;
00491 }
00492 }
00493 }
00494 v->getMEhisto_N()->Fill(jetsize);
00495
00496 if((v->getTriggerType().compare("DiJet_Trigger") == 0) && jetPtVec.size() >1)
00497 {
00498 double AveJetPt = (jetPtVec[0] + jetPtVec[1])/2;
00499 double AveJetEta = (jetEtaVec[0] + jetEtaVec[1])/2;
00500 double JetDelPhi = deltaPhi(jetPhiVec[0],jetPhiVec[1]);
00501 double AveHLTPt = (hltPtVec[0] + hltPtVec[1])/2;
00502 double AveHLTEta = (hltEtaVec[0] + hltEtaVec[1])/2;
00503 double HLTDelPhi = deltaPhi(hltPhiVec[0],hltPhiVec[1]);
00504 v->getMEhisto_AveragePt_RecObj()->Fill(AveJetPt);
00505 v->getMEhisto_AverageEta_RecObj()->Fill(AveJetEta);
00506 v->getMEhisto_DeltaPhi_RecObj()->Fill(JetDelPhi);
00507
00508 v->getMEhisto_AveragePt_HLTObj()->Fill(AveHLTPt);
00509 v->getMEhisto_AverageEta_HLTObj()->Fill(AveHLTEta);
00510 v->getMEhisto_DeltaPhi_HLTObj()->Fill(HLTDelPhi);
00511
00512
00513 }
00514
00515 if(v->getPath().find("L1") != std::string::npos && !fillL1HLT)
00516 {
00517 if ( l1Index >= triggerObj_->sizeFilters() ) {
00518 edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
00519 } else {
00520 l1TrigBool = true;
00521 const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
00522 for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki)
00523 {
00524 double l1TrigEta = toc[*ki].eta();
00525 double l1TrigPhi = toc[*ki].phi();
00526 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0) ){
00527 for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
00528 double jetEta = jet->eta();
00529 double jetPhi = jet->phi();
00530 if(deltaR(l1TrigEta, l1TrigPhi, jetEta, jetPhi) < 0.4)
00531 {
00532 jetsize++;
00533 v->getMEhisto_Pt()->Fill(jet->pt());
00534 if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
00535 if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
00536 if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
00537 v->getMEhisto_Eta()->Fill(jet->eta());
00538 v->getMEhisto_Phi()->Fill(jet->phi());
00539 v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
00540
00541 v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),jet->pt());
00542 v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*ki].eta(),jet->eta());
00543 v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),jet->phi());
00544
00545 v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-jet->pt())/(toc[*ki].pt()));
00546 v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*ki].eta()-jet->eta())/(toc[*ki].eta()));
00547 v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-jet->phi())/(toc[*ki].phi()));
00548
00549 }
00550
00551 }
00552 v->getMEhisto_N()->Fill(jetsize);
00553 }
00554
00555 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
00556 const CaloMETCollection *calometcol = calometColl_.product();
00557 const CaloMET met = calometcol->front();
00558 v->getMEhisto_Pt()->Fill(met.pt());
00559 v->getMEhisto_Phi()->Fill(met.phi());
00560
00561 v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),met.pt());
00562 v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),met.phi());
00563 v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-met.pt())/(toc[*ki].pt()));
00564 v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-met.phi())/(toc[*ki].phi()));
00565 }
00566
00567
00568 }
00569 }
00570 }
00571
00572 }
00573 }
00574
00575 }
00576
00577
00578 void JetMETHLTOfflineSource::fillMEforMonAllTriggerwrtMuonTrigger(const Event & iEvent){
00579
00580 int npath;
00581 if(&triggerResults_) {
00582 npath = triggerResults_->size();
00583 } else {
00584 return;
00585 }
00586
00587 bool muTrig = false;
00588 for(size_t i=0;i<MuonTrigPaths_.size();++i){
00589 if(isHLTPathAccepted(MuonTrigPaths_[i])){
00590 muTrig = true;
00591 break;
00592 }
00593 }
00594 if(muTrig)
00595 {
00596
00597 const trigger::TriggerObjectCollection & toc(triggerObj_->getObjects());
00598 for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v )
00599 {
00600 if (isHLTPathAccepted(v->getPath()))
00601 {
00602 std::vector<double>jetPtVec;
00603 std::vector<double>jetPhiVec;
00604 std::vector<double>jetEtaVec;
00605 std::vector<double>jetPxVec;
00606 std::vector<double>jetPyVec;
00607
00608 std::vector<double>hltPtVec;
00609 std::vector<double>hltPhiVec;
00610 std::vector<double>hltEtaVec;
00611 std::vector<double>hltPxVec;
00612 std::vector<double>hltPyVec;
00613 bool fillL1HLT = false;
00614
00615 edm::InputTag l1Tag(v->getl1Path(),"",processname_);
00616 const int l1Index = triggerObj_->filterIndex(l1Tag);
00617 edm::InputTag hltTag(v->getLabel(),"",processname_);
00618 const int hltIndex = triggerObj_->filterIndex(hltTag);
00619 bool l1TrigBool = false;
00620 bool hltTrigBool = false;
00621 bool diJetFire = false;
00622 int jetsize = 0;
00623 if ( l1Index >= triggerObj_->sizeFilters() ) {
00624 edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
00625 } else {
00626 l1TrigBool = true;
00627 const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
00628 if(v->getObjectType() == trigger::TriggerJet)v->getMEhisto_N_L1()->Fill(kl1.size());
00629 for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki)
00630 {
00631 double l1TrigEta = -100;
00632 double l1TrigPhi = -100;
00633
00634 if(v->getObjectType() == trigger::TriggerJet)
00635 {
00636 l1TrigEta = toc[*ki].eta();
00637 l1TrigPhi = toc[*ki].phi();
00638 v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
00639 if (isBarrel(toc[*ki].eta())) v->getMEhisto_PtBarrel_L1()->Fill(toc[*ki].pt());
00640 if (isEndCap(toc[*ki].eta())) v->getMEhisto_PtEndcap_L1()->Fill(toc[*ki].pt());
00641 if (isForward(toc[*ki].eta())) v->getMEhisto_PtForward_L1()->Fill(toc[*ki].pt());
00642 v->getMEhisto_Eta_L1()->Fill(toc[*ki].eta());
00643 v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
00644 v->getMEhisto_EtaPhi_L1()->Fill(toc[*ki].eta(),toc[*ki].phi());
00645 }
00646 if(v->getObjectType() == trigger::TriggerMET)
00647 {
00648 v->getMEhisto_Pt_L1()->Fill(toc[*ki].pt());
00649 v->getMEhisto_Phi_L1()->Fill(toc[*ki].phi());
00650 }
00651
00652 if ( hltIndex >= triggerObj_->sizeFilters() ) {
00653 edm::LogInfo("JetMETHLTOfflineSource") << "no index hlt"<< hltIndex << " of that name ";
00654 } else {
00655 const trigger::Keys & khlt = triggerObj_->filterKeys(hltIndex);
00656 if((v->getObjectType() == trigger::TriggerJet) && (ki == kl1.begin()))v->getMEhisto_N_HLT()->Fill(khlt.size());
00657
00658 for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj)
00659 {
00660 double hltTrigEta = -100;
00661 double hltTrigPhi = -100;
00662 if(v->getObjectType() == trigger::TriggerJet)
00663 {
00664 hltTrigEta = toc[*kj].eta();
00665 hltTrigPhi = toc[*kj].phi();
00666 if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4 && (v->getTriggerType().compare("DiJet_Trigger") == 0))hltTrigBool = true;
00667 }
00668 }
00669 for(trigger::Keys::const_iterator kj = khlt.begin();kj != khlt.end(); ++kj)
00670 {
00671 double hltTrigEta = -100;
00672 double hltTrigPhi = -100;
00673 fillL1HLT = true;
00674
00675 if(v->getObjectType() == trigger::TriggerMET)
00676 {
00677 v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
00678 v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
00679 v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
00680 v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
00681 v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
00682 v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
00683 }
00684
00685 if(v->getObjectType() == trigger::TriggerJet)
00686 {
00687 hltTrigEta = toc[*kj].eta();
00688 hltTrigPhi = toc[*kj].phi();
00689
00690 if((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi)) < 0.4)
00691 {
00692
00693 v->getMEhisto_PtCorrelation_L1HLT()->Fill(toc[*ki].pt(),toc[*kj].pt());
00694 v->getMEhisto_EtaCorrelation_L1HLT()->Fill(toc[*ki].eta(),toc[*kj].eta());
00695 v->getMEhisto_PhiCorrelation_L1HLT()->Fill(toc[*ki].phi(),toc[*kj].phi());
00696
00697 v->getMEhisto_PtResolution_L1HLT()->Fill((toc[*ki].pt()-toc[*kj].pt())/(toc[*ki].pt()));
00698 v->getMEhisto_EtaResolution_L1HLT()->Fill((toc[*ki].eta()-toc[*kj].eta())/(toc[*ki].eta()));
00699 v->getMEhisto_PhiResolution_L1HLT()->Fill((toc[*ki].phi()-toc[*kj].phi())/(toc[*ki].phi()));
00700 }
00701
00702 if(((deltaR(hltTrigEta, hltTrigPhi, l1TrigEta, l1TrigPhi) < 0.4 ) || ((v->getTriggerType().compare("DiJet_Trigger") == 0) && hltTrigBool)
00703 ) && !diJetFire)
00704 {
00705 v->getMEhisto_Pt_HLT()->Fill(toc[*kj].pt());
00706 if (isBarrel(toc[*kj].eta())) v->getMEhisto_PtBarrel_HLT()->Fill(toc[*kj].pt());
00707 if (isEndCap(toc[*kj].eta())) v->getMEhisto_PtEndcap_HLT()->Fill(toc[*kj].pt());
00708 if (isForward(toc[*kj].eta())) v->getMEhisto_PtForward_HLT()->Fill(toc[*kj].pt());
00709 v->getMEhisto_Eta_HLT()->Fill(toc[*kj].eta());
00710 v->getMEhisto_Phi_HLT()->Fill(toc[*kj].phi());
00711 v->getMEhisto_EtaPhi_HLT()->Fill(toc[*kj].eta(),toc[*kj].phi());
00712
00713
00714 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
00715
00716 for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
00717 double jetEta = jet->eta();
00718 double jetPhi = jet->phi();
00719 if(deltaR(hltTrigEta, hltTrigPhi, jetEta, jetPhi) < 0.4)
00720 {
00721 jetsize++;
00722 v->getMEhisto_Pt()->Fill(jet->pt());
00723 if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
00724 if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
00725 if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
00726 v->getMEhisto_Eta()->Fill(jet->eta());
00727 v->getMEhisto_Phi()->Fill(jet->phi());
00728 v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
00729
00730 v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),jet->pt());
00731 v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*kj].eta(),jet->eta());
00732 v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),jet->phi());
00733
00734 v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-jet->pt())/(toc[*kj].pt()));
00735 v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*kj].eta()-jet->eta())/(toc[*kj].eta()));
00736 v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-jet->phi())/(toc[*kj].phi()));
00737
00738
00739 if((v->getTriggerType().compare("DiJet_Trigger") == 0))
00740 {
00741 jetPhiVec.push_back(jet->phi());
00742 jetPtVec.push_back(jet->pt());
00743 jetEtaVec.push_back(jet->eta());
00744 jetPxVec.push_back(jet->px());
00745 jetPyVec.push_back(jet->py());
00746
00747 hltPhiVec.push_back(toc[*kj].phi());
00748 hltPtVec.push_back(toc[*kj].pt());
00749 hltEtaVec.push_back(toc[*kj].eta());
00750 hltPxVec.push_back(toc[*kj].px());
00751 hltPyVec.push_back(toc[*kj].py());
00752
00753 }
00754
00755
00756 }
00757
00758 }
00759 }
00760 }
00761
00762 }
00763
00764 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
00765 const CaloMETCollection *calometcol = calometColl_.product();
00766 const CaloMET met = calometcol->front();
00767 v->getMEhisto_Pt()->Fill(met.pt());
00768 v->getMEhisto_Phi()->Fill(met.phi());
00769
00770 v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*kj].pt(),met.pt());
00771 v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*kj].phi(),met.phi());
00772 v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*kj].pt()-met.pt())/(toc[*kj].pt()));
00773 v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*kj].phi()-met.phi())/(toc[*kj].phi()));
00774 }
00775
00776
00777
00778 }
00779 if((v->getTriggerType().compare("DiJet_Trigger") == 0))diJetFire = true;
00780 }
00781 }
00782 }
00783 v->getMEhisto_N()->Fill(jetsize);
00784
00785 if((v->getTriggerType().compare("DiJet_Trigger") == 0) && jetPtVec.size() >1)
00786 {
00787 double AveJetPt = (jetPtVec[0] + jetPtVec[1])/2;
00788 double AveJetEta = (jetEtaVec[0] + jetEtaVec[1])/2;
00789 double JetDelPhi = deltaPhi(jetPhiVec[0],jetPhiVec[1]);
00790 double AveHLTPt = (hltPtVec[0] + hltPtVec[1])/2;
00791 double AveHLTEta = (hltEtaVec[0] + hltEtaVec[1])/2;
00792 double HLTDelPhi = deltaPhi(hltPhiVec[0],hltPhiVec[1]);
00793 v->getMEhisto_AveragePt_RecObj()->Fill(AveJetPt);
00794 v->getMEhisto_AverageEta_RecObj()->Fill(AveJetEta);
00795 v->getMEhisto_DeltaPhi_RecObj()->Fill(JetDelPhi);
00796
00797 v->getMEhisto_AveragePt_HLTObj()->Fill(AveHLTPt);
00798 v->getMEhisto_AverageEta_HLTObj()->Fill(AveHLTEta);
00799 v->getMEhisto_DeltaPhi_HLTObj()->Fill(HLTDelPhi);
00800
00801
00802 }
00803
00804 if(v->getPath().find("L1") != std::string::npos && !fillL1HLT)
00805 {
00806 if ( l1Index >= triggerObj_->sizeFilters() ) {
00807 edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< l1Index << " of that name "<<l1Tag;
00808 } else {
00809 l1TrigBool = true;
00810 const trigger::Keys & kl1 = triggerObj_->filterKeys(l1Index);
00811 for( trigger::Keys::const_iterator ki = kl1.begin(); ki != kl1.end(); ++ki)
00812 {
00813 double l1TrigEta = toc[*ki].eta();
00814 double l1TrigPhi = toc[*ki].phi();
00815 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0) ){
00816 for(CaloJetCollection::const_iterator jet = calojet.begin(); jet != calojet.end(); ++jet ) {
00817 double jetEta = jet->eta();
00818 double jetPhi = jet->phi();
00819 if(deltaR(l1TrigEta, l1TrigPhi, jetEta, jetPhi) < 0.4)
00820 {
00821 jetsize++;
00822 v->getMEhisto_Pt()->Fill(jet->pt());
00823 if (isBarrel(jet->eta())) v->getMEhisto_PtBarrel()->Fill(jet->pt());
00824 if (isEndCap(jet->eta())) v->getMEhisto_PtEndcap()->Fill(jet->pt());
00825 if (isForward(jet->eta())) v->getMEhisto_PtForward()->Fill(jet->pt());
00826 v->getMEhisto_Eta()->Fill(jet->eta());
00827 v->getMEhisto_Phi()->Fill(jet->phi());
00828 v->getMEhisto_EtaPhi()->Fill(jet->eta(),jet->phi());
00829
00830 v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),jet->pt());
00831 v->getMEhisto_EtaCorrelation_HLTRecObj()->Fill(toc[*ki].eta(),jet->eta());
00832 v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),jet->phi());
00833
00834 v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-jet->pt())/(toc[*ki].pt()));
00835 v->getMEhisto_EtaResolution_HLTRecObj()->Fill((toc[*ki].eta()-jet->eta())/(toc[*ki].eta()));
00836 v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-jet->phi())/(toc[*ki].phi()));
00837
00838 }
00839
00840 }
00841 v->getMEhisto_N()->Fill(jetsize);
00842 }
00843
00844 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
00845 const CaloMETCollection *calometcol = calometColl_.product();
00846 const CaloMET met = calometcol->front();
00847 v->getMEhisto_Pt()->Fill(met.pt());
00848 v->getMEhisto_Phi()->Fill(met.phi());
00849
00850 v->getMEhisto_PtCorrelation_HLTRecObj()->Fill(toc[*ki].pt(),met.pt());
00851 v->getMEhisto_PhiCorrelation_HLTRecObj()->Fill(toc[*ki].phi(),met.phi());
00852 v->getMEhisto_PtResolution_HLTRecObj()->Fill((toc[*ki].pt()-met.pt())/(toc[*ki].pt()));
00853 v->getMEhisto_PhiResolution_HLTRecObj()->Fill((toc[*ki].phi()-met.phi())/(toc[*ki].phi()));
00854 }
00855
00856
00857 }
00858 }
00859 }
00860
00861 }
00862 }
00863
00864
00865 }
00866
00867
00868 }
00869
00870 void JetMETHLTOfflineSource::fillMEforEffAllTrigger(const Event & iEvent){
00871 int npath;
00872 if(&triggerResults_) {
00873 npath = triggerResults_->size();
00874 } else {
00875 return;
00876 }
00877 int num = -1;
00878 int denom = -1;
00879 for(PathInfoCollection::iterator v = hltPathsEff_.begin(); v!= hltPathsEff_.end(); ++v )
00880 {
00881 num++;
00882 denom++;
00883 bool denompassed = false;
00884 bool numpassed = false;
00885
00886 unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
00887 unsigned indexDenom = triggerNames_.triggerIndex(v->getDenomPath());
00888
00889 if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum))numpassed = true;
00890 if(indexDenom < triggerNames_.size() && triggerResults_->accept(indexDenom))denompassed = true;
00891
00892 if(denompassed){
00893 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
00894 bool jetIDbool = false;
00895 if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
00896 {
00897
00898 CaloJetCollection::const_iterator jet = calojet.begin();
00899 jetID->calculate(iEvent, *jet);
00900
00901 if(verbose_)cout<<"n90Hits==="<<jetID->n90Hits()<<"==fHPDs=="<<jetID->fHPD()<<endl;
00902 if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
00903 {
00904 jetIDbool = true;
00905 v->getMEhisto_DenominatorPt()->Fill(jet->pt());
00906 if (isBarrel(jet->eta())) v->getMEhisto_DenominatorPtBarrel()->Fill(jet->pt());
00907 if (isEndCap(jet->eta())) v->getMEhisto_DenominatorPtEndcap()->Fill(jet->pt());
00908 if (isForward(jet->eta())) v->getMEhisto_DenominatorPtForward()->Fill(jet->pt());
00909 v->getMEhisto_DenominatorEta()->Fill(jet->eta());
00910 v->getMEhisto_DenominatorPhi()->Fill(jet->phi());
00911 v->getMEhisto_DenominatorEtaPhi()->Fill(jet->eta(),jet->phi());
00912 }
00913 }
00914 if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size()>1)
00915 {
00916 CaloJetCollection::const_iterator jet = calojet.begin();
00917 CaloJetCollection::const_iterator jet2 = jet++;
00918 jetID->calculate(iEvent, *jet2);
00919 if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
00920 {
00921 v->getMEhisto_DenominatorPt()->Fill((jet->pt() + jet2->pt())/2.);
00922 v->getMEhisto_DenominatorEta()->Fill((jet->eta() + jet2->eta())/2.);
00923 }
00924 }
00925
00926 }
00927 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
00928 const CaloMETCollection *calometcol = calometColl_.product();
00929 const CaloMET met = calometcol->front();
00930 v->getMEhisto_DenominatorPt()->Fill(met.pt());
00931 v->getMEhisto_DenominatorPhi()->Fill(met.phi());
00932
00933 }
00934
00935 if (numpassed)
00936 {
00937 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
00938 bool jetIDbool = false;
00939 if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
00940 {
00941 CaloJetCollection::const_iterator jet = calojet.begin();
00942 jetID->calculate(iEvent, *jet);
00943 if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
00944 {
00945 jetIDbool = true;
00946 v->getMEhisto_NumeratorPt()->Fill(jet->pt());
00947 if (isBarrel(jet->eta())) v->getMEhisto_NumeratorPtBarrel()->Fill(jet->pt());
00948 if (isEndCap(jet->eta())) v->getMEhisto_NumeratorPtEndcap()->Fill(jet->pt());
00949 if (isForward(jet->eta())) v->getMEhisto_NumeratorPtForward()->Fill(jet->pt());
00950 v->getMEhisto_NumeratorEta()->Fill(jet->eta());
00951 v->getMEhisto_NumeratorPhi()->Fill(jet->phi());
00952 v->getMEhisto_NumeratorEtaPhi()->Fill(jet->eta(),jet->phi());
00953 }
00954 }
00955 if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() > 1)
00956 {
00957 CaloJetCollection::const_iterator jet = calojet.begin();
00958 CaloJetCollection::const_iterator jet2 = jet++;
00959 jetID->calculate(iEvent, *jet2);
00960 if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
00961 {
00962 v->getMEhisto_NumeratorPt()->Fill((jet->pt() + jet2->pt())/2.);
00963 v->getMEhisto_NumeratorEta()->Fill((jet->eta() + jet2->eta())/2.);
00964 }
00965 }
00966 }
00967 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
00968 const CaloMETCollection *calometcol = calometColl_.product();
00969 const CaloMET met = calometcol->front();
00970 v->getMEhisto_NumeratorPt()->Fill(met.pt());
00971 v->getMEhisto_NumeratorPhi()->Fill(met.phi());
00972
00973 }
00974 }
00975 }
00976 }
00977
00978 }
00979
00980
00981 void JetMETHLTOfflineSource::fillMEforEffWrtMuTrigger(const Event & iEvent){
00982
00983 int npath;
00984 if(&triggerResults_) {
00985 npath = triggerResults_->size();
00986 } else {
00987 return;
00988 }
00989 bool muTrig = false;
00990 bool denompassed = false;
00991 for(size_t i=0;i<MuonTrigPaths_.size();++i){
00992 if(isHLTPathAccepted(MuonTrigPaths_[i])){
00993 muTrig = true;
00994 break;
00995 }
00996 }
00997 for(PathInfoCollection::iterator v = hltPathsEffWrtMu_.begin(); v!= hltPathsEffWrtMu_.end(); ++v )
00998 {
00999 bool numpassed = false;
01000 if(muTrig)denompassed = true;
01001
01002 unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
01003 if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum))numpassed = true;
01004
01005 if(denompassed){
01006 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
01007 bool jetIDbool = false;
01008 if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
01009 {
01010 CaloJetCollection::const_iterator jet = calojet.begin();
01011 jetID->calculate(iEvent, *jet);
01012 if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
01013 {
01014 jetIDbool = true;
01015 v->getMEhisto_DenominatorPt()->Fill(jet->pt());
01016 if (isBarrel(jet->eta())) v->getMEhisto_DenominatorPtBarrel()->Fill(jet->pt());
01017 if (isEndCap(jet->eta())) v->getMEhisto_DenominatorPtEndcap()->Fill(jet->pt());
01018 if (isForward(jet->eta())) v->getMEhisto_DenominatorPtForward()->Fill(jet->pt());
01019 v->getMEhisto_DenominatorEta()->Fill(jet->eta());
01020 v->getMEhisto_DenominatorPhi()->Fill(jet->phi());
01021 v->getMEhisto_DenominatorEtaPhi()->Fill(jet->eta(),jet->phi());
01022 }
01023 }
01024 if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() > 1)
01025 {
01026 CaloJetCollection::const_iterator jet = calojet.begin();
01027 CaloJetCollection::const_iterator jet2 = jet++;
01028 jetID->calculate(iEvent, *jet2);
01029 if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
01030 {
01031 v->getMEhisto_DenominatorPt()->Fill((jet->pt() + jet2->pt())/2.);
01032 v->getMEhisto_DenominatorEta()->Fill((jet->eta() + jet2->eta())/2.);
01033 }
01034 }
01035
01036 }
01037 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
01038 const CaloMETCollection *calometcol = calometColl_.product();
01039 const CaloMET met = calometcol->front();
01040 v->getMEhisto_DenominatorPt()->Fill(met.pt());
01041 v->getMEhisto_DenominatorPhi()->Fill(met.phi());
01042
01043 }
01044
01045 if (numpassed)
01046 {
01047 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
01048 bool jetIDbool = false;
01049 if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
01050 {
01051 CaloJetCollection::const_iterator jet = calojet.begin();
01052 jetID->calculate(iEvent, *jet);
01053 if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
01054 {
01055 jetIDbool = true;
01056 v->getMEhisto_NumeratorPt()->Fill(jet->pt());
01057 if (isBarrel(jet->eta())) v->getMEhisto_NumeratorPtBarrel()->Fill(jet->pt());
01058 if (isEndCap(jet->eta())) v->getMEhisto_NumeratorPtEndcap()->Fill(jet->pt());
01059 if (isForward(jet->eta())) v->getMEhisto_NumeratorPtForward()->Fill(jet->pt());
01060 v->getMEhisto_NumeratorEta()->Fill(jet->eta());
01061 v->getMEhisto_NumeratorPhi()->Fill(jet->phi());
01062 v->getMEhisto_NumeratorEtaPhi()->Fill(jet->eta(),jet->phi());
01063 }
01064 }
01065 if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() > 1)
01066 {
01067 CaloJetCollection::const_iterator jet = calojet.begin();
01068 CaloJetCollection::const_iterator jet2 = jet++;
01069 jetID->calculate(iEvent, *jet2);
01070 if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
01071 {
01072 v->getMEhisto_NumeratorPt()->Fill((jet->pt() + jet2->pt())/2.);
01073 v->getMEhisto_NumeratorEta()->Fill((jet->eta() + jet2->eta())/2.);
01074 }
01075 }
01076
01077 }
01078 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
01079 const CaloMETCollection *calometcol = calometColl_.product();
01080 const CaloMET met = calometcol->front();
01081 v->getMEhisto_NumeratorPt()->Fill(met.pt());
01082 v->getMEhisto_NumeratorPhi()->Fill(met.phi());
01083
01084 }
01085 }
01086 }
01087 }
01088
01089
01090 }
01091
01092
01093 void JetMETHLTOfflineSource::fillMEforEffWrtMBTrigger(const Event & iEvent){
01094
01095 int npath;
01096 if(&triggerResults_) {
01097 npath = triggerResults_->size();
01098 } else {
01099 return;
01100 }
01101 bool mbTrig = false;
01102 bool denompassed = false;
01103 for(size_t i=0;i<MBTrigPaths_.size();++i){
01104 if(isHLTPathAccepted(MBTrigPaths_[i])){
01105 mbTrig = true;
01106 break;
01107 }
01108 }
01109 for(PathInfoCollection::iterator v = hltPathsEffWrtMB_.begin(); v!= hltPathsEffWrtMB_.end(); ++v )
01110 {
01111 bool numpassed = false;
01112 if(mbTrig)denompassed = true;
01113
01114 unsigned indexNum = triggerNames_.triggerIndex(v->getPath());
01115 if(indexNum < triggerNames_.size() && triggerResults_->accept(indexNum))numpassed = true;
01116
01117 if(denompassed){
01118 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
01119 bool jetIDbool = false;
01120 if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
01121 {
01122 CaloJetCollection::const_iterator jet = calojet.begin();
01123 jetID->calculate(iEvent, *jet);
01124 if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
01125 {
01126 jetIDbool = true;
01127 v->getMEhisto_DenominatorPt()->Fill(jet->pt());
01128 if (isBarrel(jet->eta())) v->getMEhisto_DenominatorPtBarrel()->Fill(jet->pt());
01129 if (isEndCap(jet->eta())) v->getMEhisto_DenominatorPtEndcap()->Fill(jet->pt());
01130 if (isForward(jet->eta())) v->getMEhisto_DenominatorPtForward()->Fill(jet->pt());
01131 v->getMEhisto_DenominatorEta()->Fill(jet->eta());
01132 v->getMEhisto_DenominatorPhi()->Fill(jet->phi());
01133 v->getMEhisto_DenominatorEtaPhi()->Fill(jet->eta(),jet->phi());
01134 }
01135 }
01136 if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() >1)
01137 {
01138 CaloJetCollection::const_iterator jet = calojet.begin();
01139 CaloJetCollection::const_iterator jet2 = jet++;
01140 jetID->calculate(iEvent, *jet2);
01141 if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
01142 {
01143 v->getMEhisto_DenominatorPt()->Fill((jet->pt() + jet2->pt())/2.);
01144 v->getMEhisto_DenominatorEta()->Fill((jet->eta() + jet2->eta())/2.);
01145 }
01146 }
01147 }
01148 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
01149 const CaloMETCollection *calometcol = calometColl_.product();
01150 const CaloMET met = calometcol->front();
01151 v->getMEhisto_DenominatorPt()->Fill(met.pt());
01152 v->getMEhisto_DenominatorPhi()->Fill(met.phi());
01153
01154 }
01155
01156 if (numpassed)
01157 {
01158 if(calojetColl_.isValid() && (v->getObjectType() == trigger::TriggerJet)){
01159 bool jetIDbool = false;
01160 if((v->getTriggerType().compare("SingleJet_Trigger") == 0) && calojet.size())
01161 {
01162 CaloJetCollection::const_iterator jet = calojet.begin();
01163 jetID->calculate(iEvent, *jet);
01164 if((jet->emEnergyFraction()>_fEMF || fabs(jet->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits)
01165 {
01166 jetIDbool = true;
01167 v->getMEhisto_NumeratorPt()->Fill(jet->pt());
01168 if (isBarrel(jet->eta())) v->getMEhisto_NumeratorPtBarrel()->Fill(jet->pt());
01169 if (isEndCap(jet->eta())) v->getMEhisto_NumeratorPtEndcap()->Fill(jet->pt());
01170 if (isForward(jet->eta())) v->getMEhisto_NumeratorPtForward()->Fill(jet->pt());
01171 v->getMEhisto_NumeratorEta()->Fill(jet->eta());
01172 v->getMEhisto_NumeratorPhi()->Fill(jet->phi());
01173 v->getMEhisto_NumeratorEtaPhi()->Fill(jet->eta(),jet->phi());
01174 }
01175 }
01176 if((v->getTriggerType().compare("DiJet_Trigger") == 0) && calojet.size() > 1)
01177 {
01178 CaloJetCollection::const_iterator jet = calojet.begin();
01179 CaloJetCollection::const_iterator jet2 = jet++;
01180 jetID->calculate(iEvent, *jet2);
01181 if(jetIDbool && ((jet2->emEnergyFraction()>_fEMF || fabs(jet2->eta()) > _feta) && (jetID->fHPD()) < _fHPD && (jetID->n90Hits()) > _n90Hits))
01182 {
01183 v->getMEhisto_NumeratorPt()->Fill((jet->pt() + jet2->pt())/2.);
01184 v->getMEhisto_NumeratorEta()->Fill((jet->eta() + jet2->eta())/2.);
01185 }
01186 }
01187 }
01188 if(calometColl_.isValid() && (v->getObjectType() == trigger::TriggerMET)){
01189 const CaloMETCollection *calometcol = calometColl_.product();
01190 const CaloMET met = calometcol->front();
01191 v->getMEhisto_NumeratorPt()->Fill(met.pt());
01192 v->getMEhisto_NumeratorPhi()->Fill(met.phi());
01193
01194 }
01195 }
01196 }
01197 }
01198
01199
01200 }
01201
01202
01203
01204 void JetMETHLTOfflineSource::beginJob(){
01205
01206 }
01207
01208
01209 void JetMETHLTOfflineSource::beginRun(const edm::Run& run, const edm::EventSetup& c){
01210 if(!isSetup_)
01211 {
01212 DQMStore *dbe = 0;
01213 dbe = Service<DQMStore>().operator->();
01214 if (dbe) {
01215 dbe->setCurrentFolder(dirname_);
01216 dbe->rmdir(dirname_);
01217 }
01218 if (dbe) {
01219 dbe->setCurrentFolder(dirname_);
01220 }
01221
01222
01223 bool changed(true);
01224 if (!hltConfig_.init(run, c, processname_, changed)) {
01225 LogDebug("HLTJetMETDQMSource") << "HLTConfigProvider failed to initialize.";
01226 }
01227
01228
01229
01230
01231
01232
01233
01234
01235
01236
01237
01238 const unsigned int n(hltConfig_.size());
01239 int singleJet = 0;
01240 int diJet = 0;
01241 int met = 0;
01242 for (unsigned int i=0; i!=n; ++i) {
01243 bool denomFound = false;
01244 bool numFound = false;
01245 bool mbFound = false;
01246 bool muFound = false;
01247 std::string pathname = hltConfig_.triggerName(i);
01248 if(verbose_)cout<<"==pathname=="<<pathname<<endl;
01249 std::string dpathname = MuonTrigPaths_[0];
01250 std::string l1pathname = "dummy";
01251 std::string denompathname = "";
01252 unsigned int usedPrescale = 1;
01253 unsigned int objectType = 0;
01254 std::string triggerType = "";
01255 std::string filtername("dummy");
01256 std::string Denomfiltername("denomdummy");
01257
01258 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)){
01259 triggerType = "SingleJet_Trigger";
01260 objectType = trigger::TriggerJet;
01261 }
01262 if (pathname.find("DiJet") != std::string::npos || pathname.find("DoubleJet") != std::string::npos){
01263 triggerType = "DiJet_Trigger";
01264 objectType = trigger::TriggerJet;
01265 }
01266 if (pathname.find("MET") != std::string::npos || pathname.find("HT") != std::string::npos){
01267 triggerType = "MET_Trigger";
01268 objectType = trigger::TriggerMET;
01269 }
01270
01271
01272 if(objectType == trigger::TriggerJet && !(pathname.find("DiJet") != std::string::npos) && !(pathname.find("DoubleJet") != std::string::npos))
01273 {
01274 singleJet++;
01275 if(singleJet > 1)dpathname = dpathname = hltConfig_.triggerName(i-1);
01276 if(singleJet == 1)dpathname = MuonTrigPaths_[0];
01277 }
01278
01279 if(objectType == trigger::TriggerJet && (pathname.find("DiJet") != std::string::npos))
01280 {
01281 diJet++;
01282 if(diJet > 1)dpathname = dpathname = hltConfig_.triggerName(i-1);
01283 if(diJet == 1)dpathname = MuonTrigPaths_[0];
01284 }
01285 if(objectType == trigger::TriggerMET )
01286 {
01287 met++;
01288 if(met > 1)dpathname = dpathname = hltConfig_.triggerName(i-1);
01289 if(met == 1)dpathname = MuonTrigPaths_[0];
01290 }
01291
01292
01293
01294
01295 for (unsigned int i=0; i!=n; ++i) {
01296 std::string HLTname = hltConfig_.triggerName(i);
01297 if(HLTname == pathname)numFound = true;
01298 if(HLTname == dpathname)denomFound = true;
01299 if(HLTname == MBTrigPaths_[0])mbFound = true;
01300 if(HLTname == MuonTrigPaths_[0])muFound = true;
01301 }
01302
01303 if(numFound)
01304 {
01305 std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
01306 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
01307 edm::InputTag testTag(*numpathmodule,"",processname_);
01308 if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")|| (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter") || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" ) || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )filtername = *numpathmodule;
01309 if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed")l1pathname = *numpathmodule;
01310 }
01311 }
01312
01313 if(objectType != 0 && denomFound)
01314 {
01315 std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
01316 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
01317 edm::InputTag testTag(*numpathmodule,"",processname_);
01318 if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")|| (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter") || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" ) || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )Denomfiltername = *numpathmodule;
01319 }
01320 }
01321
01322 if(objectType != 0 && numFound)
01323 {
01324 if(verbose_)cout<<"==pathname=="<<pathname<<"==denompath=="<<dpathname<<"==filtername=="<<filtername<<"==denomfiltername=="<<Denomfiltername<<"==l1pathname=="<<l1pathname<<"==objectType=="<<objectType<<endl;
01325 if(!((pathname.find("HT") != std::string::npos) || (pathname.find("Quad") != std::string::npos)))
01326 {
01327 hltPathsAll_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
01328 if(muFound)hltPathsAllWrtMu_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
01329 if(muFound)hltPathsEffWrtMu_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
01330 if(mbFound)hltPathsEffWrtMB_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
01331
01332 if(!nameForEff_ && denomFound) hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
01333 }
01334
01335 hltPathsAllTriggerSummary_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
01336
01337 }
01338 }
01339
01340
01341 if(nameForEff_)
01342 {
01343 std::string l1pathname = "dummy";
01344 std::string denompathname = "";
01345 unsigned int usedPrescale = 1;
01346 unsigned int objectType = 0;
01347 std::string triggerType = "";
01348 std::string filtername("dummy");
01349 std::string Denomfiltername("denomdummy");
01350 for (std::vector<std::pair<std::string, std::string> >::iterator custompathnamepair = custompathnamepairs_.begin(); custompathnamepair != custompathnamepairs_.end(); ++custompathnamepair)
01351 {
01352 std::string pathname = custompathnamepair->first;
01353 std::string dpathname = custompathnamepair->second;
01354 bool numFound = false;
01355 bool denomFound = false;
01356
01357 for (unsigned int i=0; i!=n; ++i) {
01358 std::string HLTname = hltConfig_.triggerName(i);
01359 if(HLTname == pathname)numFound = true;
01360 if(HLTname == dpathname)denomFound = true;
01361 }
01362 if(numFound && denomFound)
01363 {
01364 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)){
01365 triggerType = "SingleJet_Trigger";
01366 objectType = trigger::TriggerJet;
01367 }
01368 if (pathname.find("DiJet") != std::string::npos || pathname.find("DoubleJet") != std::string::npos ){
01369 triggerType = "DiJet_Trigger";
01370 objectType = trigger::TriggerJet;
01371 }
01372 if (pathname.find("MET") != std::string::npos ){
01373 triggerType = "MET_Trigger";
01374 objectType = trigger::TriggerMET;
01375 }
01376
01377 std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(pathname);
01378 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
01379 edm::InputTag testTag(*numpathmodule,"",processname_);
01380 if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")|| (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter") || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" ) || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )filtername = *numpathmodule;
01381 if (hltConfig_.moduleType(*numpathmodule) == "HLTLevel1GTSeed")l1pathname = *numpathmodule;
01382 }
01383
01384 if(objectType != 0)
01385 {
01386 std::vector<std::string> numpathmodules = hltConfig_.moduleLabels(dpathname);
01387 for(std::vector<std::string>::iterator numpathmodule = numpathmodules.begin(); numpathmodule!= numpathmodules.end(); ++numpathmodule ) {
01388 edm::InputTag testTag(*numpathmodule,"",processname_);
01389 if ((hltConfig_.moduleType(*numpathmodule) == "HLT1CaloJet")|| (hltConfig_.moduleType(*numpathmodule) == "HLTDiJetAveFilter") || (hltConfig_.moduleType(*numpathmodule) == "HLT1CaloMET" ) || (hltConfig_.moduleType(*numpathmodule) == "HLTPrescaler") )Denomfiltername = *numpathmodule;
01390 }
01391
01392 if(verbose_)cout<<"==pathname=="<<pathname<<"==denompath=="<<dpathname<<"==filtername=="<<filtername<<"==denomfiltername=="<<Denomfiltername<<"==l1pathname=="<<l1pathname<<"==objectType=="<<objectType<<endl;
01393 hltPathsEff_.push_back(PathInfo(usedPrescale, dpathname, pathname, l1pathname, filtername, Denomfiltername, processname_, objectType, triggerType));
01394
01395 }
01396 }
01397 }
01398 }
01399
01400
01401 if(!isSetup_)
01402 {
01403 std::string foldernm = "/TriggerSummary/";
01404 if (dbe) {
01405 dbe->setCurrentFolder(dirname_ + foldernm);
01406 }
01407 int TrigBins_ = hltPathsAllTriggerSummary_.size();
01408 double TrigMin_ = -0.5;
01409 double TrigMax_ = hltPathsAllTriggerSummary_.size()-0.5;
01410 std::string histonm="JetMET_TriggerRate";
01411 std::string histot="JetMET TriggerRate Summary";
01412
01413 rate_All = dbe->book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
01414
01415
01416 histonm="JetMET_TriggerRate_Correlation";
01417 histot="JetMET TriggerRate Correlation Summary;y&&!x;x&&y";
01418
01419 correlation_All = dbe->book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
01420
01421
01422 histonm="JetMET_TriggerRate_WrtMuTrigger";
01423 histot="JetMET TriggerRate Summary Wrt Muon Trigger ";
01424
01425 rate_AllWrtMu = dbe->book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
01426
01427
01428 histonm="JetMET_TriggerRate_Correlation_WrtMuTrigger";
01429 histot="JetMET TriggerRate Correlation Summary Wrt Muon Trigger;y&&!x;x&&y";
01430
01431 correlation_AllWrtMu = dbe->book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
01432
01433 histonm="JetMET_TriggerRate_WrtMBTrigger";
01434 histot="JetMET TriggerRate Summary Wrt MB Trigger";
01435
01436 rate_AllWrtMB = dbe->book1D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_);
01437
01438
01439 histonm="JetMET_TriggerRate_Correlation_WrtMBTrigger";
01440 histot="JetMET TriggerRate Correlation Wrt MB Trigger;y&&!x;x&&y";
01441
01442 correlation_AllWrtMB = dbe->book2D(histonm.c_str(),histot.c_str(),TrigBins_,TrigMin_,TrigMax_,TrigBins_,TrigMin_,TrigMax_);
01443 isSetup_ = true;
01444
01445 }
01446
01447
01448 for(PathInfoCollection::iterator v = hltPathsAllTriggerSummary_.begin(); v!= hltPathsAllTriggerSummary_.end(); ++v ){
01449 std::string labelnm("dummy");
01450 labelnm = v->getPath();
01451 int nbins = rate_All->getTH1()->GetNbinsX();
01452 for(int ibin=1; ibin<nbins+1; ibin++)
01453 {
01454 const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
01455 std::string binLabel_str = string(binLabel);
01456 if(binLabel_str.compare(labelnm)==0)break;
01457 if(binLabel[0]=='\0')
01458 {
01459 rate_All->setBinLabel(ibin,labelnm);
01460 rate_AllWrtMu->setBinLabel(ibin,labelnm);
01461 rate_AllWrtMB->setBinLabel(ibin,labelnm);
01462 correlation_All->setBinLabel(ibin,labelnm,1);
01463 correlation_AllWrtMu->setBinLabel(ibin,labelnm,1);
01464 correlation_AllWrtMB->setBinLabel(ibin,labelnm,1);
01465 correlation_All->setBinLabel(ibin,labelnm,2);
01466 correlation_AllWrtMu->setBinLabel(ibin,labelnm,2);
01467 correlation_AllWrtMB->setBinLabel(ibin,labelnm,2);
01468 break;
01469 }
01470 }
01471
01472 }
01473
01474
01475 if(plotAll_)
01476 {
01477 int Nbins_ = 10;
01478 int Nmin_ = -0.5;
01479 int Nmax_ = 9.5;
01480 int Ptbins_ = 40;
01481 int Etabins_ = 40;
01482 int Phibins_ = 35;
01483 int Resbins_ = 30;
01484 double PtMin_ = 0.;
01485 double PtMax_ = 200.;
01486 double EtaMin_ = -5.;
01487 double EtaMax_ = 5.;
01488 double PhiMin_ = -3.14159;
01489 double PhiMax_ = 3.14159;
01490 double ResMin_ = -1.5;
01491 double ResMax_ = 1.5;
01492 std::string dirName = dirname_ + "/MonitorAllTriggers/";
01493 for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
01494
01495 std::string subdirName = dirName + v->getPath();
01496 std::string trigPath = "("+v->getPath()+")";
01497 dbe->setCurrentFolder(subdirName);
01498
01499 MonitorElement *dummy, *N, *Pt, *PtBarrel, *PtEndcap, *PtForward, *Eta, *Phi, *EtaPhi,
01500 *N_L1, *Pt_L1, *PtBarrel_L1, *PtEndcap_L1, *PtForward_L1, *Eta_L1, *Phi_L1, *EtaPhi_L1,
01501 *N_HLT, *Pt_HLT, *PtBarrel_HLT, *PtEndcap_HLT, *PtForward_HLT, *Eta_HLT, *Phi_HLT, *EtaPhi_HLT,
01502 *PtResolution_L1HLT, *EtaResolution_L1HLT,*PhiResolution_L1HLT,
01503 *PtResolution_HLTRecObj, *EtaResolution_HLTRecObj,*PhiResolution_HLTRecObj,
01504 *PtCorrelation_L1HLT,*EtaCorrelation_L1HLT,*PhiCorrelation_L1HLT,
01505 *PtCorrelation_HLTRecObj,*EtaCorrelation_HLTRecObj,*PhiCorrelation_HLTRecObj,
01506 *jetAveragePt, *jetAverageEta, *jetPhiDifference, *hltAveragePt, *hltAverageEta, *hltPhiDifference;
01507
01508 dummy = dbe->bookFloat("dummy");
01509 N = dbe->bookFloat("N");
01510 Pt = dbe->bookFloat("Pt");
01511 PtBarrel = dbe->bookFloat("PtBarrel");
01512 PtEndcap = dbe->bookFloat("PtEndcap");
01513 PtForward = dbe->bookFloat("PtForward");
01514 Eta = dbe->bookFloat("Eta");
01515 Phi = dbe->bookFloat("Phi");
01516 EtaPhi = dbe->bookFloat("EtaPhi");
01517 N_L1 = dbe->bookFloat("N_L1");
01518 Pt_L1 = dbe->bookFloat("Pt_L1");
01519 PtBarrel_L1 = dbe->bookFloat("PtBarrel_L1");
01520 PtEndcap_L1 = dbe->bookFloat("PtEndcap_L1");
01521 PtForward_L1 = dbe->bookFloat("PtForward_L1");
01522 Eta_L1 = dbe->bookFloat("Eta_L1");
01523 Phi_L1 = dbe->bookFloat("Phi_L1");
01524 EtaPhi_L1 = dbe->bookFloat("EtaPhi_L1");
01525
01526 N_HLT = dbe->bookFloat("N_HLT");
01527 Pt_HLT = dbe->bookFloat("Pt_HLT");
01528 PtBarrel_HLT = dbe->bookFloat("PtBarrel_HLT");
01529 PtEndcap_HLT = dbe->bookFloat("PtEndcap_HLT");
01530 PtForward_HLT = dbe->bookFloat("PtForward_HLT");
01531 Eta_HLT = dbe->bookFloat("Eta_HLT");
01532 Phi_HLT = dbe->bookFloat("Phi_HLT");
01533 EtaPhi_HLT = dbe->bookFloat("EtaPhi_HLT");
01534
01535 PtResolution_L1HLT = dbe->bookFloat("PtResolution_L1HLT");
01536 EtaResolution_L1HLT = dbe->bookFloat("EtaResolution_L1HLT");
01537 PhiResolution_L1HLT = dbe->bookFloat("PhiResolution_L1HLT");
01538 PtResolution_HLTRecObj = dbe->bookFloat("PtResolution_HLTRecObj");
01539 EtaResolution_HLTRecObj = dbe->bookFloat("EtaResolution_HLTRecObj");
01540 PhiResolution_HLTRecObj = dbe->bookFloat("PhiResolution_HLTRecObj");
01541 PtCorrelation_L1HLT = dbe->bookFloat("PtCorrelation_L1HLT");
01542 EtaCorrelation_L1HLT = dbe->bookFloat("EtaCorrelation_L1HLT");
01543 PhiCorrelation_L1HLT = dbe->bookFloat("PhiCorrelation_L1HLT");
01544 PtCorrelation_HLTRecObj = dbe->bookFloat("PtCorrelation_HLTRecObj");
01545 EtaCorrelation_HLTRecObj = dbe->bookFloat("EtaCorrelation_HLTRecObj");
01546 PhiCorrelation_HLTRecObj = dbe->bookFloat("PhiCorrelation_HLTRecObj");
01547
01548 jetAveragePt = dbe->bookFloat("jetAveragePt");
01549 jetAverageEta = dbe->bookFloat("jetAverageEta");
01550 jetPhiDifference = dbe->bookFloat("jetPhiDifference");
01551 hltAveragePt = dbe->bookFloat("hltAveragePt");
01552 hltAverageEta = dbe->bookFloat("hltAverageEta");
01553 hltPhiDifference = dbe->bookFloat("hltPhiDifference");
01554
01555 std::string labelname("ME");
01556 std::string histoname(labelname+"");
01557 std::string title(labelname+"");
01558 if(v->getObjectType() == trigger::TriggerJet)
01559 {
01560
01561 histoname = labelname+"_recObjN";
01562 title = labelname+"_recObjN;Reco multiplicity()"+trigPath;
01563 N = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
01564 TH1 *h = N->getTH1();
01565
01566
01567 histoname = labelname+"_recObjPt";
01568 title = labelname+"_recObjPt; Reco Pt[GeV/c]"+trigPath;
01569 Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01570 h = Pt->getTH1();
01571
01572
01573 histoname = labelname+"_recObjPtBarrel";
01574 title = labelname+"_recObjPtBarrel;Reco Pt[GeV/c]"+trigPath;
01575 PtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01576 h = PtBarrel->getTH1();
01577
01578
01579 histoname = labelname+"_recObjPtEndcap";
01580 title = labelname+"_recObjPtEndcap;Reco Pt[GeV/c]"+trigPath;
01581 PtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01582 h = PtEndcap->getTH1();
01583
01584
01585 histoname = labelname+"_recObjPtForward";
01586 title = labelname+"_recObjPtForward;Reco Pt[GeV/c]"+trigPath;
01587 PtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01588 h = PtForward->getTH1();
01589
01590
01591 histoname = labelname+"_recObjEta";
01592 title = labelname+"_recObjEta;Reco #eta"+trigPath;
01593 Eta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
01594 h = Eta->getTH1();
01595
01596
01597 histoname = labelname+"_recObjPhi";
01598 title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
01599 Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
01600 h = Phi->getTH1();
01601
01602
01603 histoname = labelname+"_recObjEtaPhi";
01604 title = labelname+"_recObjEtaPhi;Reco #eta;Reco #Phi"+trigPath;
01605 EtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
01606 h = EtaPhi->getTH1();
01607
01608
01609
01610 histoname = labelname+"_l1ObjN";
01611 title = labelname+"_l1ObjN;L1 multiplicity"+trigPath;
01612 N_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
01613 h = N_L1->getTH1();
01614
01615
01616 histoname = labelname+"_l1ObjPt";
01617 title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
01618 Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01619 h = Pt_L1->getTH1();
01620
01621
01622 histoname = labelname+"_l1ObjPtBarrel";
01623 title = labelname+"_l1ObjPtBarrel;L1 Pt[GeV/c]"+trigPath;
01624 PtBarrel_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01625 h = PtBarrel_L1->getTH1();
01626
01627
01628 histoname = labelname+"_l1ObjPtEndcap";
01629 title = labelname+"_l1ObjPtEndcap;L1 Pt[GeV/c]"+trigPath;
01630 PtEndcap_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01631 h = PtEndcap_L1->getTH1();
01632
01633
01634 histoname = labelname+"_l1ObjPtForward";
01635 title = labelname+"_l1ObjPtForward;L1 Pt[GeV/c]"+trigPath;
01636 PtForward_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01637 h = PtForward_L1->getTH1();
01638
01639
01640 histoname = labelname+"_l1ObjEta";
01641 title = labelname+"_l1ObjEta;L1 #eta"+trigPath;
01642 Eta_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
01643 h = Eta_L1->getTH1();
01644
01645
01646 histoname = labelname+"_l1ObjPhi";
01647 title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
01648 Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
01649 h = Phi_L1->getTH1();
01650
01651
01652 histoname = labelname+"_l1ObjEtaPhi";
01653 title = labelname+"_l1ObjEtaPhi;L1 #eta;L1 #Phi"+trigPath;
01654 EtaPhi_L1 = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
01655 h = EtaPhi_L1->getTH1();
01656
01657
01658 histoname = labelname+"_hltObjN";
01659 title = labelname+"_hltObjN;HLT multiplicity"+trigPath;
01660 N_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
01661 h = N_HLT->getTH1();
01662
01663
01664 histoname = labelname+"_hltObjPt";
01665 title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
01666 Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01667 h = Pt_HLT->getTH1();
01668
01669
01670 histoname = labelname+"_hltObjPtBarrel";
01671 title = labelname+"_hltObjPtBarrel;HLT Pt[GeV/c]"+trigPath;
01672 PtBarrel_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01673 h = PtBarrel_HLT->getTH1();
01674
01675
01676 histoname = labelname+"_hltObjPtEndcap";
01677 title = labelname+"_hltObjPtEndcap;HLT Pt[GeV/c]"+trigPath;
01678 PtEndcap_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01679 h = PtEndcap_HLT->getTH1();
01680
01681
01682 histoname = labelname+"_hltObjPtForward";
01683 title = labelname+"_hltObjPtForward;HLT Pt[GeV/c]"+trigPath;
01684 PtForward_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01685 h = PtForward_HLT->getTH1();
01686
01687
01688 histoname = labelname+"_hltObjEta";
01689 title = labelname+"_hltObjEta;HLT #eta"+trigPath;
01690 Eta_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
01691 h = Eta_HLT->getTH1();
01692
01693
01694 histoname = labelname+"_hltObjPhi";
01695 title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
01696 Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
01697 h = Phi_HLT->getTH1();
01698
01699
01700 histoname = labelname+"_hltObjEtaPhi";
01701 title = labelname+"_hltObjEtaPhi;HLT #eta;HLT #Phi"+trigPath;
01702 EtaPhi_HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
01703 h = EtaPhi_HLT->getTH1();
01704
01705
01706 histoname = labelname+"_l1HLTPtResolution";
01707 title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
01708 PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01709 h = PtResolution_L1HLT->getTH1();
01710
01711
01712 histoname = labelname+"_l1HLTEtaResolution";
01713 title = labelname+"_l1HLTEtaResolution;(#eta(L1)-#eta(HLT))/#eta(L1)"+trigPath;
01714 EtaResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01715 h = EtaResolution_L1HLT->getTH1();
01716
01717
01718 histoname = labelname+"_l1HLTPhiResolution";
01719 title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
01720 PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01721 h = PhiResolution_L1HLT->getTH1();
01722
01723
01724 histoname = labelname+"_l1HLTPtCorrelation";
01725 title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
01726 PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
01727 h = PtCorrelation_L1HLT->getTH1();
01728
01729
01730 histoname = labelname+"_l1HLTEtaCorrelation";
01731 title = labelname+"_l1HLTEtaCorrelation;#eta(L1);#eta(HLT)"+trigPath;
01732 EtaCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
01733 h = EtaCorrelation_L1HLT->getTH1();
01734
01735
01736 histoname = labelname+"_l1HLTPhiCorrelation";
01737 title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
01738 PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
01739 h = PhiCorrelation_L1HLT->getTH1();
01740
01741
01742
01743 histoname = labelname+"_hltRecObjPtResolution";
01744 title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
01745 PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01746 h = PtResolution_HLTRecObj->getTH1();
01747
01748
01749 histoname = labelname+"_hltRecObjEtaResolution";
01750 title = labelname+"_hltRecObjEtaResolution;(#eta(HLT)-#eta(Reco))/#eta(HLT)"+trigPath;
01751 EtaResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01752 h = EtaResolution_HLTRecObj->getTH1();
01753
01754
01755 histoname = labelname+"_hltRecObjPhiResolution";
01756 title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
01757 PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01758 h = PhiResolution_HLTRecObj->getTH1();
01759
01760
01761
01762 histoname = labelname+"_hltRecObjPtCorrelation";
01763 title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
01764 PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
01765 h = PtCorrelation_HLTRecObj->getTH1();
01766
01767
01768 histoname = labelname+"_hltRecObjEtaCorrelation";
01769 title = labelname+"_hltRecObjEtaCorrelation;#eta(HLT);#eta(Reco)"+trigPath;
01770 EtaCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
01771 h = EtaCorrelation_HLTRecObj->getTH1();
01772
01773
01774 histoname = labelname+"_hltRecObjPhiCorrelation";
01775 title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
01776 PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
01777 h = PhiCorrelation_HLTRecObj->getTH1();
01778
01779
01780 if((v->getTriggerType().compare("DiJet_Trigger") == 0))
01781 {
01782 histoname = labelname+"_RecObjAveragePt";
01783 title = labelname+"_RecObjAveragePt;Reco Average Pt[GeV/c]"+trigPath;
01784 jetAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01785 h = jetAveragePt->getTH1();
01786
01787
01788 histoname = labelname+"_RecObjAverageEta";
01789 title = labelname+"_RecObjAverageEta;Reco Average #eta"+trigPath;
01790 jetAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
01791 h = jetAverageEta->getTH1();
01792
01793
01794 histoname = labelname+"_RecObjPhiDifference";
01795 title = labelname+"_RecObjPhiDifference;Reco #Delta#Phi"+trigPath;
01796 jetPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
01797 h = jetPhiDifference->getTH1();
01798
01799
01800 histoname = labelname+"_hltObjAveragePt";
01801 title = labelname+"_hltObjAveragePt;HLT Average Pt[GeV/c]"+trigPath;
01802 hltAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01803 h = hltAveragePt->getTH1();
01804
01805
01806 histoname = labelname+"_hltObjAverageEta";
01807 title = labelname+"_hltObjAverageEta;HLT Average #eta"+trigPath;
01808 hltAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
01809 h = hltAverageEta->getTH1();
01810
01811
01812 histoname = labelname+"_hltObjPhiDifference";
01813 title = labelname+"_hltObjPhiDifference;Reco #Delta#Phi"+trigPath;
01814 hltPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
01815 h = hltPhiDifference->getTH1();
01816
01817
01818 }
01819
01820 }
01821
01822
01823 if(v->getObjectType() == trigger::TriggerMET)
01824 {
01825 histoname = labelname+"_recObjPt";
01826 title = labelname+"_recObjPt;Reco Pt[GeV/c]"+trigPath;
01827 Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01828 TH1 *h = Pt->getTH1();
01829
01830
01831
01832 histoname = labelname+"_recObjPhi";
01833 title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
01834 Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
01835 h = Phi->getTH1();
01836
01837
01838 histoname = labelname+"_l1ObjPt";
01839 title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
01840 Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01841 h = Pt_L1->getTH1();
01842
01843
01844
01845 histoname = labelname+"_l1ObjPhi";
01846 title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
01847 Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
01848 h = Phi_L1->getTH1();
01849
01850
01851
01852 histoname = labelname+"_hltObjPt";
01853 title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
01854 Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
01855 h = Pt_HLT->getTH1();
01856
01857
01858
01859 histoname = labelname+"_hltObjPhi";
01860 title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
01861 Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
01862 h = Phi_HLT->getTH1();
01863
01864
01865
01866 histoname = labelname+"_l1HLTPtResolution";
01867 title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
01868 PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01869 h = PtResolution_L1HLT->getTH1();
01870
01871
01872
01873 histoname = labelname+"_l1HLTPhiResolution";
01874 title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
01875 PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01876 h = PhiResolution_L1HLT->getTH1();
01877
01878
01879
01880
01881 histoname = labelname+"_l1HLTPtCorrelation";
01882 title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
01883 PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
01884 h = PtCorrelation_L1HLT->getTH1();
01885
01886
01887
01888 histoname = labelname+"_l1HLTPhiCorrelation";
01889 title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
01890 PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
01891 h = PhiCorrelation_L1HLT->getTH1();
01892
01893
01894
01895 histoname = labelname+"_hltRecObjPtResolution";
01896 title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
01897 PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01898 h = PtResolution_HLTRecObj->getTH1();
01899
01900
01901
01902 histoname = labelname+"_hltRecObjPhiResolution";
01903 title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
01904 PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
01905 h = PhiResolution_HLTRecObj->getTH1();
01906
01907
01908
01909
01910 histoname = labelname+"_hltRecObjPtCorrelation";
01911 title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
01912 PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
01913 h = PtCorrelation_HLTRecObj->getTH1();
01914
01915
01916
01917 histoname = labelname+"_hltRecObjPhiCorrelation";
01918 title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
01919 PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
01920 h = PhiCorrelation_HLTRecObj->getTH1();
01921
01922
01923
01924 }
01925
01926 v->setHistos( N, Pt, PtBarrel, PtEndcap, PtForward, Eta, Phi, EtaPhi,
01927 N_L1, Pt_L1, PtBarrel_L1, PtEndcap_L1, PtForward_L1, Eta_L1, Phi_L1, EtaPhi_L1,
01928 N_HLT, Pt_HLT, PtBarrel_HLT, PtEndcap_HLT, PtForward_HLT, Eta_HLT, Phi_HLT, EtaPhi_HLT,
01929 PtResolution_L1HLT, EtaResolution_L1HLT,PhiResolution_L1HLT,
01930 PtResolution_HLTRecObj,EtaResolution_HLTRecObj,PhiResolution_HLTRecObj,
01931 PtCorrelation_L1HLT,EtaCorrelation_L1HLT,PhiCorrelation_L1HLT,
01932 PtCorrelation_HLTRecObj,EtaCorrelation_HLTRecObj,PhiCorrelation_HLTRecObj,
01933 jetAveragePt, jetAverageEta, jetPhiDifference, hltAveragePt, hltAverageEta, hltPhiDifference,
01934 dummy, dummy, dummy);
01935
01936 }
01937
01938 }
01939 if(plotAllwrtMu_)
01940 {
01941 int Nbins_ = 10;
01942 int Nmin_ = -0.5;
01943 int Nmax_ = 9.5;
01944 int Ptbins_ = 40;
01945 int Etabins_ = 40;
01946 int Phibins_ = 35;
01947 int Resbins_ = 30;
01948 double PtMin_ = 0.;
01949 double PtMax_ = 200.;
01950 double EtaMin_ = -5.;
01951 double EtaMax_ = 5.;
01952 double PhiMin_ = -3.14159;
01953 double PhiMax_ = 3.14159;
01954 double ResMin_ = -1.5;
01955 double ResMax_ = 1.5;
01956
01957 std::string dirName = dirname_ + "/MonitorAllTriggersWrtMuonTrigger/";
01958 for(PathInfoCollection::iterator v = hltPathsAllWrtMu_.begin(); v!= hltPathsAllWrtMu_.end(); ++v ){
01959
01960 std::string subdirName = dirName + v->getPath();
01961 std::string trigPath = "("+v->getPath()+")";
01962 dbe->setCurrentFolder(subdirName);
01963
01964
01965 MonitorElement *dummy, *N, *Pt, *PtBarrel, *PtEndcap, *PtForward, *Eta, *Phi, *EtaPhi,
01966 *N_L1, *Pt_L1, *PtBarrel_L1, *PtEndcap_L1, *PtForward_L1, *Eta_L1, *Phi_L1, *EtaPhi_L1,
01967 *N_HLT, *Pt_HLT, *PtBarrel_HLT, *PtEndcap_HLT, *PtForward_HLT, *Eta_HLT, *Phi_HLT, *EtaPhi_HLT,
01968 *PtResolution_L1HLT, *EtaResolution_L1HLT,*PhiResolution_L1HLT,
01969 *PtResolution_HLTRecObj, *EtaResolution_HLTRecObj,*PhiResolution_HLTRecObj,
01970 *PtCorrelation_L1HLT,*EtaCorrelation_L1HLT,*PhiCorrelation_L1HLT,
01971 *PtCorrelation_HLTRecObj,*EtaCorrelation_HLTRecObj,*PhiCorrelation_HLTRecObj,
01972 *jetAveragePt, *jetAverageEta, *jetPhiDifference, *hltAveragePt, *hltAverageEta, *hltPhiDifference;
01973
01974 dummy = dbe->bookFloat("dummy");
01975 N = dbe->bookFloat("N");
01976 Pt = dbe->bookFloat("Pt");
01977 PtBarrel = dbe->bookFloat("PtBarrel");
01978 PtEndcap = dbe->bookFloat("PtEndcap");
01979 PtForward = dbe->bookFloat("PtForward");
01980 Eta = dbe->bookFloat("Eta");
01981 Phi = dbe->bookFloat("Phi");
01982 EtaPhi = dbe->bookFloat("EtaPhi");
01983 N_L1 = dbe->bookFloat("N_L1");
01984 Pt_L1 = dbe->bookFloat("Pt_L1");
01985 PtBarrel_L1 = dbe->bookFloat("PtBarrel_L1");
01986 PtEndcap_L1 = dbe->bookFloat("PtEndcap_L1");
01987 PtForward_L1 = dbe->bookFloat("PtForward_L1");
01988 Eta_L1 = dbe->bookFloat("Eta_L1");
01989 Phi_L1 = dbe->bookFloat("Phi_L1");
01990 EtaPhi_L1 = dbe->bookFloat("EtaPhi_L1");
01991
01992 N_HLT = dbe->bookFloat("N_HLT");
01993 Pt_HLT = dbe->bookFloat("Pt_HLT");
01994 PtBarrel_HLT = dbe->bookFloat("PtBarrel_HLT");
01995 PtEndcap_HLT = dbe->bookFloat("PtEndcap_HLT");
01996 PtForward_HLT = dbe->bookFloat("PtForward_HLT");
01997 Eta_HLT = dbe->bookFloat("Eta_HLT");
01998 Phi_HLT = dbe->bookFloat("Phi_HLT");
01999 EtaPhi_HLT = dbe->bookFloat("EtaPhi_HLT");
02000
02001 PtResolution_L1HLT = dbe->bookFloat("PtResolution_L1HLT");
02002 EtaResolution_L1HLT = dbe->bookFloat("EtaResolution_L1HLT");
02003 PhiResolution_L1HLT = dbe->bookFloat("PhiResolution_L1HLT");
02004 PtResolution_HLTRecObj = dbe->bookFloat("PtResolution_HLTRecObj");
02005 EtaResolution_HLTRecObj = dbe->bookFloat("EtaResolution_HLTRecObj");
02006 PhiResolution_HLTRecObj = dbe->bookFloat("PhiResolution_HLTRecObj");
02007 PtCorrelation_L1HLT = dbe->bookFloat("PtCorrelation_L1HLT");
02008 EtaCorrelation_L1HLT = dbe->bookFloat("EtaCorrelation_L1HLT");
02009 PhiCorrelation_L1HLT = dbe->bookFloat("PhiCorrelation_L1HLT");
02010 PtCorrelation_HLTRecObj = dbe->bookFloat("PtCorrelation_HLTRecObj");
02011 EtaCorrelation_HLTRecObj = dbe->bookFloat("EtaCorrelation_HLTRecObj");
02012 PhiCorrelation_HLTRecObj = dbe->bookFloat("PhiCorrelation_HLTRecObj");
02013
02014 jetAveragePt = dbe->bookFloat("jetAveragePt");
02015 jetAverageEta = dbe->bookFloat("jetAverageEta");
02016 jetPhiDifference = dbe->bookFloat("jetPhiDifference");
02017 hltAveragePt = dbe->bookFloat("hltAveragePt");
02018 hltAverageEta = dbe->bookFloat("hltAverageEta");
02019 hltPhiDifference = dbe->bookFloat("hltPhiDifference");
02020 std::string labelname("ME");
02021 std::string histoname(labelname+"");
02022 std::string title(labelname+"");
02023 if(v->getObjectType() == trigger::TriggerJet)
02024 {
02025
02026 histoname = labelname+"_recObjN";
02027 title = labelname+"_recObjN;Reco multiplicity()"+trigPath;
02028 N = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
02029 TH1 *h = N->getTH1();
02030
02031
02032 histoname = labelname+"_recObjPt";
02033 title = labelname+"_recObjPt; Reco Pt[GeV/c]"+trigPath;
02034 Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02035 h = Pt->getTH1();
02036
02037
02038 histoname = labelname+"_recObjPtBarrel";
02039 title = labelname+"_recObjPtBarrel;Reco Pt[GeV/c]"+trigPath;
02040 PtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02041 h = PtBarrel->getTH1();
02042
02043
02044 histoname = labelname+"_recObjPtEndcap";
02045 title = labelname+"_recObjPtEndcap;Reco Pt[GeV/c]"+trigPath;
02046 PtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02047 h = PtEndcap->getTH1();
02048
02049
02050 histoname = labelname+"_recObjPtForward";
02051 title = labelname+"_recObjPtForward;Reco Pt[GeV/c]"+trigPath;
02052 PtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02053 h = PtForward->getTH1();
02054
02055
02056 histoname = labelname+"_recObjEta";
02057 title = labelname+"_recObjEta;Reco #eta"+trigPath;
02058 Eta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02059 h = Eta->getTH1();
02060
02061
02062 histoname = labelname+"_recObjPhi";
02063 title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
02064 Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02065 h = Phi->getTH1();
02066
02067
02068 histoname = labelname+"_recObjEtaPhi";
02069 title = labelname+"_recObjEtaPhi;Reco #eta;Reco #Phi"+trigPath;
02070 EtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
02071 h = EtaPhi->getTH1();
02072
02073
02074
02075 histoname = labelname+"_l1ObjN";
02076 title = labelname+"_l1ObjN;L1 multiplicity"+trigPath;
02077 N_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
02078 h = N_L1->getTH1();
02079
02080
02081 histoname = labelname+"_l1ObjPt";
02082 title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
02083 Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02084 h = Pt_L1->getTH1();
02085
02086
02087 histoname = labelname+"_l1ObjPtBarrel";
02088 title = labelname+"_l1ObjPtBarrel;L1 Pt[GeV/c]"+trigPath;
02089 PtBarrel_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02090 h = PtBarrel_L1->getTH1();
02091
02092
02093 histoname = labelname+"_l1ObjPtEndcap";
02094 title = labelname+"_l1ObjPtEndcap;L1 Pt[GeV/c]"+trigPath;
02095 PtEndcap_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02096 h = PtEndcap_L1->getTH1();
02097
02098
02099 histoname = labelname+"_l1ObjPtForward";
02100 title = labelname+"_l1ObjPtForward;L1 Pt[GeV/c]"+trigPath;
02101 PtForward_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02102 h = PtForward_L1->getTH1();
02103
02104
02105 histoname = labelname+"_l1ObjEta";
02106 title = labelname+"_l1ObjEta;L1 #eta"+trigPath;
02107 Eta_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02108 h = Eta_L1->getTH1();
02109
02110
02111 histoname = labelname+"_l1ObjPhi";
02112 title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
02113 Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02114 h = Phi_L1->getTH1();
02115
02116
02117 histoname = labelname+"_l1ObjEtaPhi";
02118 title = labelname+"_l1ObjEtaPhi;L1 #eta;L1 #Phi"+trigPath;
02119 EtaPhi_L1 = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
02120 h = EtaPhi_L1->getTH1();
02121
02122
02123 histoname = labelname+"_hltObjN";
02124 title = labelname+"_hltObjN;HLT multiplicity"+trigPath;
02125 N_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
02126 h = N_HLT->getTH1();
02127
02128
02129 histoname = labelname+"_hltObjPt";
02130 title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
02131 Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02132 h = Pt_HLT->getTH1();
02133
02134
02135 histoname = labelname+"_hltObjPtBarrel";
02136 title = labelname+"_hltObjPtBarrel;HLT Pt[GeV/c]"+trigPath;
02137 PtBarrel_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02138 h = PtBarrel_HLT->getTH1();
02139
02140
02141 histoname = labelname+"_hltObjPtEndcap";
02142 title = labelname+"_hltObjPtEndcap;HLT Pt[GeV/c]"+trigPath;
02143 PtEndcap_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02144 h = PtEndcap_HLT->getTH1();
02145
02146
02147 histoname = labelname+"_hltObjPtForward";
02148 title = labelname+"_hltObjPtForward;HLT Pt[GeV/c]"+trigPath;
02149 PtForward_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02150 h = PtForward_HLT->getTH1();
02151
02152
02153 histoname = labelname+"_hltObjEta";
02154 title = labelname+"_hltObjEta;HLT #eta"+trigPath;
02155 Eta_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02156 h = Eta_HLT->getTH1();
02157
02158
02159 histoname = labelname+"_hltObjPhi";
02160 title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
02161 Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02162 h = Phi_HLT->getTH1();
02163
02164
02165 histoname = labelname+"_hltObjEtaPhi";
02166 title = labelname+"_hltObjEtaPhi;HLT #eta;HLT #Phi"+trigPath;
02167 EtaPhi_HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
02168 h = EtaPhi_HLT->getTH1();
02169
02170
02171 histoname = labelname+"_l1HLTPtResolution";
02172 title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
02173 PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02174 h = PtResolution_L1HLT->getTH1();
02175
02176
02177 histoname = labelname+"_l1HLTEtaResolution";
02178 title = labelname+"_l1HLTEtaResolution;(#eta(L1)-#eta(HLT))/#eta(L1)"+trigPath;
02179 EtaResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02180 h = EtaResolution_L1HLT->getTH1();
02181
02182
02183 histoname = labelname+"_l1HLTPhiResolution";
02184 title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
02185 PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02186 h = PhiResolution_L1HLT->getTH1();
02187
02188
02189 histoname = labelname+"_l1HLTPtCorrelation";
02190 title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
02191 PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
02192 h = PtCorrelation_L1HLT->getTH1();
02193
02194
02195 histoname = labelname+"_l1HLTEtaCorrelation";
02196 title = labelname+"_l1HLTEtaCorrelation;#eta(L1);#eta(HLT)"+trigPath;
02197 EtaCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
02198 h = EtaCorrelation_L1HLT->getTH1();
02199
02200
02201 histoname = labelname+"_l1HLTPhiCorrelation";
02202 title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
02203 PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
02204 h = PhiCorrelation_L1HLT->getTH1();
02205
02206
02207
02208 histoname = labelname+"_hltRecObjPtResolution";
02209 title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
02210 PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02211 h = PtResolution_HLTRecObj->getTH1();
02212
02213
02214 histoname = labelname+"_hltRecObjEtaResolution";
02215 title = labelname+"_hltRecObjEtaResolution;(#eta(HLT)-#eta(Reco))/#eta(HLT)"+trigPath;
02216 EtaResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02217 h = EtaResolution_HLTRecObj->getTH1();
02218
02219
02220 histoname = labelname+"_hltRecObjPhiResolution";
02221 title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
02222 PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02223 h = PhiResolution_HLTRecObj->getTH1();
02224
02225
02226
02227 histoname = labelname+"_hltRecObjPtCorrelation";
02228 title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
02229 PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
02230 h = PtCorrelation_HLTRecObj->getTH1();
02231
02232
02233 histoname = labelname+"_hltRecObjEtaCorrelation";
02234 title = labelname+"_hltRecObjEtaCorrelation;#eta(HLT);#eta(Reco)"+trigPath;
02235 EtaCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Etabins_,EtaMin_,EtaMax_);
02236 h = EtaCorrelation_HLTRecObj->getTH1();
02237
02238
02239 histoname = labelname+"_hltRecObjPhiCorrelation";
02240 title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
02241 PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
02242 h = PhiCorrelation_HLTRecObj->getTH1();
02243
02244
02245 if((v->getTriggerType().compare("DiJet_Trigger") == 0))
02246 {
02247 histoname = labelname+"_RecObjAveragePt";
02248 title = labelname+"_RecObjAveragePt;Reco Average Pt[GeV/c]"+trigPath;
02249 jetAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02250 h = jetAveragePt->getTH1();
02251
02252
02253 histoname = labelname+"_RecObjAverageEta";
02254 title = labelname+"_RecObjAverageEta;Reco Average #eta"+trigPath;
02255 jetAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02256 h = jetAverageEta->getTH1();
02257
02258
02259 histoname = labelname+"_RecObjPhiDifference";
02260 title = labelname+"_RecObjPhiDifference;Reco #Delta#Phi"+trigPath;
02261 jetPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02262 h = jetPhiDifference->getTH1();
02263
02264
02265 histoname = labelname+"_hltObjAveragePt";
02266 title = labelname+"_hltObjAveragePt;HLT Average Pt[GeV/c]"+trigPath;
02267 hltAveragePt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02268 h = hltAveragePt->getTH1();
02269
02270
02271 histoname = labelname+"_hltObjAverageEta";
02272 title = labelname+"_hltObjAverageEta;HLT Average #eta"+trigPath;
02273 hltAverageEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02274 h = hltAverageEta->getTH1();
02275
02276
02277 histoname = labelname+"_hltObjPhiDifference";
02278 title = labelname+"_hltObjPhiDifference;Reco #Delta#Phi"+trigPath;
02279 hltPhiDifference = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02280 h = hltPhiDifference->getTH1();
02281
02282
02283 }
02284
02285 }
02286
02287
02288 if(v->getObjectType() == trigger::TriggerMET)
02289 {
02290 histoname = labelname+"_recObjPt";
02291 title = labelname+"_recObjPt;Reco Pt[GeV/c]"+trigPath;
02292 Pt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02293 TH1 *h = Pt->getTH1();
02294
02295
02296
02297 histoname = labelname+"_recObjPhi";
02298 title = labelname+"_recObjPhi;Reco #Phi"+trigPath;
02299 Phi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02300 h = Phi->getTH1();
02301
02302
02303 histoname = labelname+"_l1ObjPt";
02304 title = labelname+"_l1ObjPt;L1 Pt[GeV/c]"+trigPath;
02305 Pt_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02306 h = Pt_L1->getTH1();
02307
02308
02309
02310 histoname = labelname+"_l1ObjPhi";
02311 title = labelname+"_l1ObjPhi;L1 #Phi"+trigPath;
02312 Phi_L1 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02313 h = Phi_L1->getTH1();
02314
02315
02316
02317 histoname = labelname+"_hltObjPt";
02318 title = labelname+"_hltObjPt;HLT Pt[GeV/c]"+trigPath;
02319 Pt_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02320 h = Pt_HLT->getTH1();
02321
02322
02323
02324 histoname = labelname+"_hltObjPhi";
02325 title = labelname+"_hltObjPhi;HLT #Phi"+trigPath;
02326 Phi_HLT = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02327 h = Phi_HLT->getTH1();
02328
02329
02330
02331 histoname = labelname+"_l1HLTPtResolution";
02332 title = labelname+"_l1HLTPtResolution;(Pt(L1)-Pt(HLT))/Pt(L1)"+trigPath;
02333 PtResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02334 h = PtResolution_L1HLT->getTH1();
02335
02336
02337
02338 histoname = labelname+"_l1HLTPhiResolution";
02339 title = labelname+"_l1HLTPhiResolution;(#Phi(L1)-#Phi(HLT))/#Phi(L1)"+trigPath;
02340 PhiResolution_L1HLT = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02341 h = PhiResolution_L1HLT->getTH1();
02342
02343
02344
02345
02346 histoname = labelname+"_l1HLTPtCorrelation";
02347 title = labelname+"_l1HLTPtCorrelation;Pt(L1)[GeV/c];Pt(HLT)[GeV/c]"+trigPath;
02348 PtCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
02349 h = PtCorrelation_L1HLT->getTH1();
02350
02351
02352
02353 histoname = labelname+"_l1HLTPhiCorrelation";
02354 title = labelname+"_l1HLTPhiCorrelation;#Phi(L1);#Phi(HLT)"+trigPath;
02355 PhiCorrelation_L1HLT = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
02356 h = PhiCorrelation_L1HLT->getTH1();
02357
02358
02359
02360 histoname = labelname+"_hltRecObjPtResolution";
02361 title = labelname+"_hltRecObjPtResolution;(Pt(HLT)-Pt(Reco))/Pt(HLT)"+trigPath;
02362 PtResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02363 h = PtResolution_HLTRecObj->getTH1();
02364
02365
02366
02367 histoname = labelname+"_hltRecObjPhiResolution";
02368 title = labelname+"_hltRecObjPhiResolution;(#Phi(HLT)-#Phi(Reco))/#Phi(HLT)"+trigPath;
02369 PhiResolution_HLTRecObj = dbe->book1D(histoname.c_str(),title.c_str(),Resbins_,ResMin_,ResMax_);
02370 h = PhiResolution_HLTRecObj->getTH1();
02371
02372
02373
02374
02375 histoname = labelname+"_hltRecObjPtCorrelation";
02376 title = labelname+"_hltRecObjPtCorrelation;Pt(HLT)[GeV/c];Pt(Reco)[GeV/c]"+trigPath;
02377 PtCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
02378 h = PtCorrelation_HLTRecObj->getTH1();
02379
02380
02381
02382 histoname = labelname+"_hltRecObjPhiCorrelation";
02383 title = labelname+"_hltRecObjPhiCorrelation;#Phi(HLT);#Phi(Reco)"+trigPath;
02384 PhiCorrelation_HLTRecObj = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Phibins_,PhiMin_,PhiMax_);
02385 h = PhiCorrelation_HLTRecObj->getTH1();
02386
02387
02388
02389 }
02390 v->setHistos( N, Pt, PtBarrel, PtEndcap, PtForward, Eta, Phi, EtaPhi,
02391 N_L1, Pt_L1, PtBarrel_L1, PtEndcap_L1, PtForward_L1, Eta_L1, Phi_L1, EtaPhi_L1,
02392 N_HLT, Pt_HLT, PtBarrel_HLT, PtEndcap_HLT, PtForward_HLT, Eta_HLT, Phi_HLT, EtaPhi_HLT,
02393 PtResolution_L1HLT, EtaResolution_L1HLT,PhiResolution_L1HLT,
02394 PtResolution_HLTRecObj,EtaResolution_HLTRecObj,PhiResolution_HLTRecObj,
02395 PtCorrelation_L1HLT,EtaCorrelation_L1HLT,PhiCorrelation_L1HLT,
02396 PtCorrelation_HLTRecObj,EtaCorrelation_HLTRecObj,PhiCorrelation_HLTRecObj,
02397 jetAveragePt, jetAverageEta, jetPhiDifference, hltAveragePt, hltAverageEta, hltPhiDifference,
02398 dummy, dummy, dummy);
02399
02400 }
02401
02402 }
02403
02404 if(plotEff_)
02405 {
02406 int Ptbins_ = 100;
02407 int Etabins_ = 40;
02408 int Phibins_ = 35;
02409 double PtMin_ = 0.;
02410 double PtMax_ = 200.;
02411 double EtaMin_ = -5.;
02412 double EtaMax_ = 5.;
02413 double PhiMin_ = -3.14159;
02414 double PhiMax_ = 3.14159;
02415
02416 std::string dirName1 = dirname_ + "/RelativeTriggerEff/";
02417 for(PathInfoCollection::iterator v = hltPathsEff_.begin(); v!= hltPathsEff_.end(); ++v ){
02418 std::string labelname("ME") ;
02419 std::string subdirName = dirName1 + v->getPath() + "_wrt_" + v->getDenomPath();
02420 dbe->setCurrentFolder(subdirName);
02421 std::string histoname(labelname+"");
02422 std::string title(labelname+"");
02423
02424 MonitorElement *dummy;
02425 dummy = dbe->bookFloat("dummy");
02426
02427 if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0))
02428 {
02429 histoname = labelname+"_NumeratorPt";
02430 title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
02431 MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02432 TH1 * h = NumeratorPt->getTH1();
02433
02434
02435 histoname = labelname+"_NumeratorPtBarrel";
02436 title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c] ";
02437 MonitorElement * NumeratorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02438 h = NumeratorPtBarrel->getTH1();
02439
02440
02441 histoname = labelname+"_NumeratorPtEndcap";
02442 title = labelname+"NumeratorPtEndcap;Calo Pt[GeV/c]";
02443 MonitorElement * NumeratorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02444 h = NumeratorPtEndcap->getTH1();
02445
02446
02447 histoname = labelname+"_NumeratorPtForward";
02448 title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
02449 MonitorElement * NumeratorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02450 h = NumeratorPtForward->getTH1();
02451
02452
02453 histoname = labelname+"_NumeratorEta";
02454 title = labelname+"NumeratorEta;Calo #eta ";
02455 MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02456 h = NumeratorEta->getTH1();
02457
02458
02459 histoname = labelname+"_NumeratorPhi";
02460 title = labelname+"NumeratorPhi;Calo #Phi";
02461 MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02462 h = NumeratorPhi->getTH1();
02463
02464
02465 histoname = labelname+"_NumeratorEtaPhi";
02466 title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi";
02467 MonitorElement * NumeratorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
02468 h = NumeratorEtaPhi->getTH1();
02469
02470
02471 histoname = labelname+"_DenominatorPt";
02472 title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
02473 MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02474 h = DenominatorPt->getTH1();
02475
02476
02477 histoname = labelname+"_DenominatorPtBarrel";
02478 title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
02479 MonitorElement * DenominatorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02480 h = DenominatorPtBarrel->getTH1();
02481
02482
02483 histoname = labelname+"_DenominatorPtEndcap";
02484 title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
02485 MonitorElement * DenominatorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02486 h = DenominatorPtEndcap->getTH1();
02487
02488
02489 histoname = labelname+"_DenominatorPtForward";
02490 title = labelname+"DenominatorPtForward;Calo Pt[GeV/c] ";
02491 MonitorElement * DenominatorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02492 h = DenominatorPtForward->getTH1();
02493
02494
02495 histoname = labelname+"_DenominatorEta";
02496 title = labelname+"DenominatorEta;Calo #eta ";
02497 MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02498 h = DenominatorEta->getTH1();
02499
02500
02501 histoname = labelname+"_DenominatorPhi";
02502 title = labelname+"DenominatorPhi;Calo #Phi";
02503 MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02504 h = DenominatorPhi->getTH1();
02505
02506
02507 histoname = labelname+"_DenominatorEtaPhi";
02508 title = labelname+"DenominatorEtaPhi;Calo #eta; Calo #Phi";
02509 MonitorElement * DenominatorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
02510 h = DenominatorEtaPhi->getTH1();
02511
02512
02513
02514 v->setEffHistos( NumeratorPt, NumeratorPtBarrel, NumeratorPtEndcap, NumeratorPtForward, NumeratorEta, NumeratorPhi, NumeratorEtaPhi,
02515 DenominatorPt, DenominatorPtBarrel, DenominatorPtEndcap, DenominatorPtForward, DenominatorEta, DenominatorPhi, DenominatorEtaPhi);
02516 }
02517
02518 if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0))
02519 {
02520
02521 histoname = labelname+"_NumeratorAvrgPt";
02522 title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c]";
02523 MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02524 TH1 * h = NumeratorPt->getTH1();
02525
02526
02527 histoname = labelname+"_NumeratorAvrgEta";
02528 title = labelname+"NumeratorAvrgEta;Calo #eta";
02529 MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02530 h = NumeratorEta->getTH1();
02531
02532
02533 histoname = labelname+"_DenominatorAvrgPt";
02534 title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c] ";
02535 MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02536 h = DenominatorPt->getTH1();
02537
02538
02539 histoname = labelname+"_DenominatorAvrgEta";
02540 title = labelname+"DenominatorAvrgEta;Calo #eta";
02541 MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02542 h = DenominatorEta->getTH1();
02543
02544
02545 v->setEffHistos( NumeratorPt, dummy, dummy, dummy, NumeratorEta, dummy, dummy,
02546 DenominatorPt, dummy, dummy, dummy, DenominatorEta, dummy, dummy);
02547
02548
02549 }
02550
02551 if(v->getObjectType() == trigger::TriggerMET)
02552 {
02553 histoname = labelname+"_NumeratorPt";
02554 title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
02555 MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02556 TH1 * h = NumeratorPt->getTH1();
02557
02558
02559
02560 histoname = labelname+"_NumeratorPhi";
02561 title = labelname+"NumeratorPhi;Calo #Phi";
02562 MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02563 h = NumeratorPhi->getTH1();
02564
02565
02566
02567 histoname = labelname+"_DenominatorPt";
02568 title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
02569 MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02570 h = DenominatorPt->getTH1();
02571
02572
02573
02574 histoname = labelname+"_DenominatorPhi";
02575 title = labelname+"DenominatorPhi;Calo #Phi";
02576 MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02577 h = DenominatorPhi->getTH1();
02578
02579
02580
02581 v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy,
02582 DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy);
02583
02584
02585 }
02586 }
02587
02588
02589 std::string dirName2 = dirname_ + "/EffWrtMuonTrigger/";
02590 for(PathInfoCollection::iterator v = hltPathsEffWrtMu_.begin(); v!= hltPathsEffWrtMu_.end(); ++v ){
02591 std::string labelname("ME") ;
02592 std::string subdirName = dirName2 + v->getPath();
02593 std::string histoname(labelname+"");
02594 std::string title(labelname+"");
02595 dbe->setCurrentFolder(subdirName);
02596
02597 MonitorElement *dummy;
02598 dummy = dbe->bookFloat("dummy");
02599 if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0))
02600 {
02601 histoname = labelname+"_NumeratorPt";
02602 title = labelname+"NumeratorPt;Pt[GeV/c]";
02603 MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02604 TH1 * h = NumeratorPt->getTH1();
02605
02606
02607 histoname = labelname+"_NumeratorPtBarrel";
02608 title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c]";
02609 MonitorElement * NumeratorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02610 h = NumeratorPtBarrel->getTH1();
02611
02612
02613 histoname = labelname+"_NumeratorPtEndcap";
02614 title = labelname+"NumeratorPtEndcap;Calo Pt[GeV/c]";
02615 MonitorElement * NumeratorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02616 h = NumeratorPtEndcap->getTH1();
02617
02618
02619 histoname = labelname+"_NumeratorPtForward";
02620 title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
02621 MonitorElement * NumeratorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02622 h = NumeratorPtForward->getTH1();
02623
02624
02625 histoname = labelname+"_NumeratorEta";
02626 title = labelname+"NumeratorEta;Calo #eta ";
02627 MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02628 h = NumeratorEta->getTH1();
02629
02630
02631 histoname = labelname+"_NumeratorPhi";
02632 title = labelname+"NumeratorPhi;Calo #Phi";
02633 MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02634 h = NumeratorPhi->getTH1();
02635
02636
02637 histoname = labelname+"_NumeratorEtaPhi";
02638 title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi";
02639 MonitorElement * NumeratorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
02640 h = NumeratorEtaPhi->getTH1();
02641
02642
02643 histoname = labelname+"_DenominatorPt";
02644 title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
02645 MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02646 h = DenominatorPt->getTH1();
02647
02648
02649 histoname = labelname+"_DenominatorPtBarrel";
02650 title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
02651 MonitorElement * DenominatorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02652 h = DenominatorPtBarrel->getTH1();
02653
02654
02655 histoname = labelname+"_DenominatorPtEndcap";
02656 title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
02657 MonitorElement * DenominatorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02658 h = DenominatorPtEndcap->getTH1();
02659
02660
02661 histoname = labelname+"_DenominatorPtForward";
02662 title = labelname+"DenominatorPtForward;Calo Pt[GeV/c] ";
02663 MonitorElement * DenominatorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02664 h = DenominatorPtForward->getTH1();
02665
02666
02667 histoname = labelname+"_DenominatorEta";
02668 title = labelname+"DenominatorEta;Calo #eta";
02669 MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02670 h = DenominatorEta->getTH1();
02671
02672
02673 histoname = labelname+"_DenominatorPhi";
02674 title = labelname+"DenominatorPhi;Calo #Phi";
02675 MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02676 h = DenominatorPhi->getTH1();
02677
02678
02679 histoname = labelname+"_DenominatorEtaPhi";
02680 title = labelname+"DenominatorEtaPhi;Calo #eta (IC5);Calo #Phi ";
02681 MonitorElement * DenominatorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
02682 h = DenominatorEtaPhi->getTH1();
02683
02684
02685
02686 v->setEffHistos( NumeratorPt, NumeratorPtBarrel, NumeratorPtEndcap, NumeratorPtForward, NumeratorEta, NumeratorPhi, NumeratorEtaPhi,
02687 DenominatorPt, DenominatorPtBarrel, DenominatorPtEndcap, DenominatorPtForward, DenominatorEta, DenominatorPhi, DenominatorEtaPhi);
02688 }
02689
02690 if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0))
02691 {
02692 histoname = labelname+"_NumeratorAvrgPt";
02693 title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c] ";
02694 MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02695 TH1 * h = NumeratorPt->getTH1();
02696
02697
02698 histoname = labelname+"_NumeratorAvrgEta";
02699 title = labelname+"NumeratorAvrgEta;Calo #eta";
02700 MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02701 h = NumeratorEta->getTH1();
02702
02703
02704 histoname = labelname+"_DenominatorAvrgPt";
02705 title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c]";
02706 MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02707 h = DenominatorPt->getTH1();
02708
02709
02710 histoname = labelname+"_DenominatorAvrgEta";
02711 title = labelname+"DenominatorAvrgEta;Calo #eta ";
02712 MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02713 h = DenominatorEta->getTH1();
02714
02715
02716 v->setEffHistos( NumeratorPt, dummy, dummy, dummy, NumeratorEta, dummy, dummy,
02717 DenominatorPt, dummy, dummy, dummy, DenominatorEta, dummy, dummy);
02718
02719
02720 }
02721 if(v->getObjectType() == trigger::TriggerMET)
02722 {
02723 histoname = labelname+"_NumeratorPt";
02724 title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
02725 MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02726 TH1 * h = NumeratorPt->getTH1();
02727
02728
02729
02730 histoname = labelname+"_NumeratorPhi";
02731 title = labelname+"NumeratorPhi;Calo #Phi";
02732 MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02733 h = NumeratorPhi->getTH1();
02734
02735
02736
02737 histoname = labelname+"_DenominatorPt";
02738 title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
02739 MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02740 h = DenominatorPt->getTH1();
02741
02742
02743
02744 histoname = labelname+"_DenominatorPhi";
02745 title = labelname+"DenominatorPhi;Calo #Phi";
02746 MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02747 h = DenominatorPhi->getTH1();
02748
02749
02750
02751 v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy,
02752 DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy);
02753
02754
02755 }
02756 }
02757
02758 std::string dirName3 = dirname_ + "/EffWrtMBTrigger/";
02759 for(PathInfoCollection::iterator v = hltPathsEffWrtMB_.begin(); v!= hltPathsEffWrtMB_.end(); ++v ){
02760 std::string labelname("ME") ;
02761 std::string subdirName = dirName3 + v->getPath() ;
02762 std::string histoname(labelname+"");
02763 std::string title(labelname+"");
02764 dbe->setCurrentFolder(subdirName);
02765 MonitorElement *dummy;
02766 dummy = dbe->bookFloat("dummy");
02767 if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("SingleJet_Trigger") == 0))
02768 {
02769 histoname = labelname+"_NumeratorPt";
02770 title = labelname+"NumeratorPt;Calo Pt[GeV/c] ";
02771 MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02772 TH1 * h = NumeratorPt->getTH1();
02773
02774
02775 histoname = labelname+"_NumeratorPtBarrel";
02776 title = labelname+"NumeratorPtBarrel;Calo Pt[GeV/c]";
02777 MonitorElement * NumeratorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02778 h = NumeratorPtBarrel->getTH1();
02779
02780
02781 histoname = labelname+"_NumeratorPtEndcap";
02782 title = labelname+"NumeratorPtEndcap; Calo Pt[GeV/c] ";
02783 MonitorElement * NumeratorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02784 h = NumeratorPtEndcap->getTH1();
02785
02786
02787 histoname = labelname+"_NumeratorPtForward";
02788 title = labelname+"NumeratorPtForward;Calo Pt[GeV/c]";
02789 MonitorElement * NumeratorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02790 h = NumeratorPtForward->getTH1();
02791
02792
02793 histoname = labelname+"_NumeratorEta";
02794 title = labelname+"NumeratorEta;Calo #eta ";
02795 MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02796 h = NumeratorEta->getTH1();
02797
02798
02799 histoname = labelname+"_NumeratorPhi";
02800 title = labelname+"NumeratorPhi;Calo #Phi";
02801 MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02802 h = NumeratorPhi->getTH1();
02803
02804
02805 histoname = labelname+"_NumeratorEtaPhi";
02806 title = labelname+"NumeratorEtaPhi;Calo #eta;Calo #Phi ";
02807 MonitorElement * NumeratorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
02808 h = NumeratorEtaPhi->getTH1();
02809
02810
02811 histoname = labelname+"_DenominatorPt";
02812 title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
02813 MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02814 h = DenominatorPt->getTH1();
02815
02816
02817 histoname = labelname+"_DenominatorPtBarrel";
02818 title = labelname+"DenominatorPtBarrel;Calo Pt[GeV/c]";
02819 MonitorElement * DenominatorPtBarrel = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02820 h = DenominatorPtBarrel->getTH1();
02821
02822
02823 histoname = labelname+"_DenominatorPtEndcap";
02824 title = labelname+"DenominatorPtEndcap;Calo Pt[GeV/c]";
02825 MonitorElement * DenominatorPtEndcap = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02826 h = DenominatorPtEndcap->getTH1();
02827
02828
02829 histoname = labelname+"_DenominatorPtForward";
02830 title = labelname+"DenominatorPtForward;Calo Pt[GeV/c]";
02831 MonitorElement * DenominatorPtForward = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02832 h = DenominatorPtForward->getTH1();
02833
02834
02835 histoname = labelname+"_DenominatorEta";
02836 title = labelname+"DenominatorEta;Calo #eta ";
02837 MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02838 h = DenominatorEta->getTH1();
02839
02840
02841 histoname = labelname+"_DenominatorPhi";
02842 title = labelname+"DenominatorPhi;Calo #Phi";
02843 MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02844 h = DenominatorPhi->getTH1();
02845
02846
02847 histoname = labelname+"_DenominatorEtaPhi";
02848 title = labelname+"DenominatorEtaPhi;Calo #eta ;Calo #Phi ";
02849 MonitorElement * DenominatorEtaPhi = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Phibins_,PhiMin_,PhiMax_);
02850 h = DenominatorEtaPhi->getTH1();
02851
02852
02853
02854 v->setEffHistos( NumeratorPt, NumeratorPtBarrel, NumeratorPtEndcap, NumeratorPtForward, NumeratorEta, NumeratorPhi, NumeratorEtaPhi,
02855 DenominatorPt, DenominatorPtBarrel, DenominatorPtEndcap, DenominatorPtForward, DenominatorEta, DenominatorPhi, DenominatorEtaPhi);
02856 }
02857
02858
02859 if((v->getObjectType() == trigger::TriggerJet) && (v->getTriggerType().compare("DiJet_Trigger") == 0))
02860 {
02861
02862 histoname = labelname+"_NumeratorAvrgPt";
02863 title = labelname+"NumeratorAvrgPt;Calo Pt[GeV/c] ";
02864 MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02865 TH1 * h = NumeratorPt->getTH1();
02866
02867
02868 histoname = labelname+"_NumeratorAvrgEta";
02869 title = labelname+"NumeratorAvrgEta;Calo #eta ";
02870 MonitorElement * NumeratorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02871 h = NumeratorEta->getTH1();
02872
02873
02874 histoname = labelname+"_DenominatorAvrgPt";
02875 title = labelname+"DenominatorAvrgPt;Calo Pt[GeV/c] ";
02876 MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02877 h = DenominatorPt->getTH1();
02878
02879
02880 histoname = labelname+"_DenominatorAvrgEta";
02881 title = labelname+"DenominatorAvrgEta;Calo #eta ";
02882 MonitorElement * DenominatorEta = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
02883 h = DenominatorEta->getTH1();
02884
02885
02886 v->setEffHistos( NumeratorPt, dummy, dummy, dummy, NumeratorEta, dummy, dummy,
02887 DenominatorPt, dummy, dummy, dummy, DenominatorEta, dummy, dummy);
02888
02889
02890
02891 }
02892 if(v->getObjectType() == trigger::TriggerMET)
02893 {
02894 histoname = labelname+"_NumeratorPt";
02895 title = labelname+"NumeratorPt;Calo Pt[GeV/c]";
02896 MonitorElement * NumeratorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02897 TH1 * h = NumeratorPt->getTH1();
02898
02899
02900
02901 histoname = labelname+"_NumeratorPhi";
02902 title = labelname+"NumeratorPhi;Calo #Phi";
02903 MonitorElement * NumeratorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02904 h = NumeratorPhi->getTH1();
02905
02906
02907
02908 histoname = labelname+"_DenominatorPt";
02909 title = labelname+"DenominatorPt;Calo Pt[GeV/c]";
02910 MonitorElement * DenominatorPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02911 h = DenominatorPt->getTH1();
02912
02913
02914
02915 histoname = labelname+"_DenominatorPhi";
02916 title = labelname+"DenominatorPhi;Calo #Phi";
02917 MonitorElement * DenominatorPhi = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
02918 h = DenominatorPhi->getTH1();
02919
02920
02921
02922
02923
02924 v->setEffHistos( NumeratorPt, dummy, dummy, dummy, dummy, NumeratorPhi, dummy,
02925 DenominatorPt, dummy, dummy, dummy, dummy, DenominatorPhi, dummy);
02926
02927
02928 }
02929 }
02930
02931
02932 }
02933
02934 int Nbins_ = 10;
02935 int Nmin_ = 0;
02936 int Nmax_ = 10;
02937 int Ptbins_ = 100;
02938 int Etabins_ = 40;
02939 int Phibins_ = 35;
02940 double PtMin_ = 0.;
02941 double PtMax_ = 200.;
02942 double EtaMin_ = -5.;
02943 double EtaMax_ = 5.;
02944 double PhiMin_ = -3.14159;
02945 double PhiMax_ = 3.14159;
02946
02947 std::string dirName4_ = dirname_ + "/TriggerNotFired/";
02948 for(PathInfoCollection::iterator v = hltPathsAll_.begin(); v!= hltPathsAll_.end(); ++v ){
02949
02950 MonitorElement *dummy;
02951 dummy = dbe->bookFloat("dummy");
02952
02953
02954 std::string labelname("ME") ;
02955 std::string histoname(labelname+"");
02956 std::string title(labelname+"");
02957 dbe->setCurrentFolder(dirName4_ + v->getPath());
02958
02959 histoname = labelname+"_TriggerSummary";
02960 title = labelname+"Summary of trigger levels";
02961 MonitorElement * TriggerSummary = dbe->book1D(histoname.c_str(),title.c_str(),7, -0.5,6.5);
02962
02963 std::vector<std::string> trigger;
02964 trigger.push_back("Nevt");
02965 trigger.push_back("L1 failed");
02966 trigger.push_back("L1 & HLT failed");
02967 trigger.push_back("L1 failed but not HLT");
02968 trigger.push_back("L1 passed");
02969 trigger.push_back("L1 & HLT passed");
02970 trigger.push_back("L1 passed but not HLT");
02971 for(unsigned int i =0; i < trigger.size(); i++)TriggerSummary->setBinLabel(i+1, trigger[i]);
02972
02973 if((v->getTriggerType().compare("SingleJet_Trigger") == 0))
02974 {
02975 histoname = labelname+"_JetPt";
02976 title = labelname+"Leading jet pT;Pt[GeV/c]";
02977 MonitorElement * JetPt = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
02978 TH1 * h = JetPt->getTH1();
02979
02980
02981 histoname = labelname+"_JetEtaVsPt";
02982 title = labelname+"Leading jet #eta vs pT;#eta;Pt[GeV/c]";
02983 MonitorElement * JetEtaVsPt = dbe->book2D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_,Ptbins_,PtMin_,PtMax_);
02984 h = JetEtaVsPt->getTH1();
02985
02986
02987 histoname = labelname+"_JetPhiVsPt";
02988 title = labelname+"Leading jet #Phi vs pT;#Phi;Pt[GeV/c]";
02989 MonitorElement * JetPhiVsPt = dbe->book2D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_,Ptbins_,PtMin_,PtMax_);
02990 h = JetPhiVsPt->getTH1();
02991
02992
02993
02994
02995 v->setDgnsHistos( TriggerSummary, dummy, JetPt, JetEtaVsPt, JetPhiVsPt, dummy, dummy, dummy, dummy, dummy, dummy);
02996 }
02997
02998 if((v->getTriggerType().compare("DiJet_Trigger") == 0))
02999 {
03000 histoname = labelname+"_JetSize";
03001 title = labelname+"Jet Size;multiplicity";
03002 MonitorElement * JetSize = dbe->book1D(histoname.c_str(),title.c_str(),Nbins_,Nmin_,Nmax_);
03003 TH1 * h = JetSize->getTH1();
03004
03005
03006
03007 histoname = labelname+"_AvergPt";
03008 title = labelname+"Average Pt;Pt[GeV/c]";
03009 MonitorElement * Pt12 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
03010 h = Pt12->getTH1();
03011
03012
03013 histoname = labelname+"_AvergEta";
03014 title = labelname+"Average Eta;#eta";
03015 MonitorElement * Eta12 = dbe->book1D(histoname.c_str(),title.c_str(),Etabins_,EtaMin_,EtaMax_);
03016 h = Eta12->getTH1();
03017
03018
03019 histoname = labelname+"_PhiDifference";
03020 title = labelname+"#Delta#Phi;#Delta#Phi";
03021 MonitorElement * Phi12 = dbe->book1D(histoname.c_str(),title.c_str(),Phibins_,PhiMin_,PhiMax_);
03022 h = Phi12->getTH1();
03023
03024
03025 histoname = labelname+"_Pt3Jet";
03026 title = labelname+"Pt of 3rd Jet;Pt[GeV/c]";
03027 MonitorElement * Pt3 = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
03028 h = Pt3->getTH1();
03029
03030
03031 histoname = labelname+"_Pt12VsPt3Jet";
03032 title = labelname+"Pt of 3rd Jet vs Average Pt of leading jets;Avergage Pt[GeV/c]; Pt of 3rd Jet [GeV/c]";
03033 MonitorElement * Pt12Pt3 = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Ptbins_,PtMin_,PtMax_);
03034 h = Pt12Pt3->getTH1();
03035
03036
03037 histoname = labelname+"_Pt12VsPhi12";
03038 title = labelname+"Average Pt of leading jets vs #Delta#Phi between leading jets;Avergage Pt[GeV/c]; #Delta#Phi";
03039 MonitorElement * Pt12Phi12 = dbe->book2D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_,Phibins_,PhiMin_,PhiMax_);
03040 h = Pt12Phi12->getTH1();
03041
03042
03043 v->setDgnsHistos( TriggerSummary, JetSize, dummy, dummy, dummy, Pt12, Eta12, Phi12, Pt3, Pt12Pt3, Pt12Phi12);
03044
03045 }
03046
03047 if((v->getTriggerType().compare("MET_Trigger") == 0))
03048 {
03049 histoname = labelname+"_MET";
03050 title = labelname+"MET;Pt[GeV/c]";
03051 MonitorElement * MET = dbe->book1D(histoname.c_str(),title.c_str(),Ptbins_,PtMin_,PtMax_);
03052
03053
03054 v->setDgnsHistos(TriggerSummary, dummy, MET, dummy, dummy, dummy, dummy, dummy,dummy,dummy,dummy);
03055 }
03056
03057
03058 }
03059
03060 }
03061 }
03062
03063
03064 void JetMETHLTOfflineSource::beginLuminosityBlock(const LuminosityBlock& lumiSeg,
03065 const EventSetup& context) {
03066 }
03067
03068 void JetMETHLTOfflineSource::endLuminosityBlock(const LuminosityBlock& lumiSeg,
03069 const EventSetup& context) {
03070 }
03071
03072 void
03073 JetMETHLTOfflineSource::endJob() {
03074 delete jetID;
03075 }
03076
03078 void JetMETHLTOfflineSource::endRun(const edm::Run& run, const edm::EventSetup& c){
03079 if (verbose_) std::cout << "endRun, run " << run.id() << std::endl;
03080 }
03081
03082 bool JetMETHLTOfflineSource::isBarrel(double eta){
03083 bool output = false;
03084 if (fabs(eta)<=1.3) output=true;
03085 return output;
03086 }
03087
03088
03089 bool JetMETHLTOfflineSource::isEndCap(double eta){
03090 bool output = false;
03091 if (fabs(eta)<=3.0 && fabs(eta)>1.3) output=true;
03092 return output;
03093 }
03094
03095
03096 bool JetMETHLTOfflineSource::isForward(double eta){
03097 bool output = false;
03098 if (fabs(eta)>3.0) output=true;
03099 return output;
03100 }
03101
03102
03103 bool JetMETHLTOfflineSource::validPathHLT(std::string pathname){
03104
03105 bool output=false;
03106 for (unsigned int j=0; j!=hltConfig_.size(); ++j) {
03107 if (hltConfig_.triggerName(j) == pathname )
03108 output=true;
03109 }
03110 return output;
03111 }
03112
03113 bool JetMETHLTOfflineSource::isHLTPathAccepted(std::string pathName){
03114
03115 bool output=false;
03116 if(&triggerResults_) {
03117 unsigned index = triggerNames_.triggerIndex(pathName);
03118 if(index < triggerNames_.size() && triggerResults_->accept(index)) output = true;
03119 }
03120 return output;
03121 }
03122
03123 double JetMETHLTOfflineSource::TriggerPosition(std::string trigName){
03124 int nbins = rate_All->getTH1()->GetNbinsX();
03125 double binVal = -100;
03126 for(int ibin=1; ibin<nbins+1; ibin++)
03127 {
03128 const char * binLabel = rate_All->getTH1()->GetXaxis()->GetBinLabel(ibin);
03129 if(binLabel[0]=='\0')continue;
03130
03131
03132 if(trigName.compare(binLabel)!=0)continue;
03133
03134 if(trigName.compare(binLabel)==0){
03135 binVal = rate_All->getTH1()->GetBinCenter(ibin);
03136 break;
03137 }
03138 }
03139 return binVal;
03140 }
03141 bool JetMETHLTOfflineSource::isTriggerObjectFound(std::string objectName){
03142
03143 bool output=false;
03144 edm::InputTag testTag(objectName,"",processname_);
03145 const int index = triggerObj_->filterIndex(testTag);
03146 if ( index >= triggerObj_->sizeFilters() ) {
03147 edm::LogInfo("JetMETHLTOfflineSource") << "no index "<< index << " of that name ";
03148 } else {
03149 const trigger::Keys & k = triggerObj_->filterKeys(index);
03150 if (k.size()) output=true;
03151 }
03152 return output;
03153 }
03154
03155