#include <DQMOffline/Trigger/interface/HLTTauCaloDQMOfflineSource.h>
Public Member Functions | |
HLTTauCaloDQMOfflineSource (const edm::ParameterSet &) | |
~HLTTauCaloDQMOfflineSource () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob (const edm::EventSetup &) |
virtual void | endJob () |
bool | match (const reco::Jet &, const LVColl &) |
bool | matchJet (const reco::Jet &, const reco::CaloJetCollection &) |
Private Attributes | |
MonitorElement * | clusterDeltaRRMS |
MonitorElement * | clusterEtaRMS |
MonitorElement * | clusterPhiRMS |
bool | doRef_ |
MonitorElement * | ecalIsolEt |
MonitorElement * | EtEffDenom |
MonitorElement * | EtEffNum |
double | EtMax_ |
double | EtMin_ |
MonitorElement * | jetEt |
MonitorElement * | jetEta |
MonitorElement * | jetPhi |
edm::InputTag | l2Isolated_ |
edm::InputTag | l2TauInfoAssoc_ |
double | matchDeltaRMC_ |
edm::InputTag | mcColl_ |
MonitorElement * | MET |
edm::InputTag | met_ |
int | NBins_ |
MonitorElement * | nClusters |
std::string | outFile_ |
MonitorElement * | seedTowerEt |
DQMStore * | store |
MonitorElement * | towerIsolEt |
std::string | triggerTag_ |
Definition at line 44 of file HLTTauCaloDQMOfflineSource.h.
HLTTauCaloDQMOfflineSource::HLTTauCaloDQMOfflineSource | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 7 of file HLTTauCaloDQMOfflineSource.cc.
References DQMStore::book1D(), clusterDeltaRRMS, clusterEtaRMS, clusterPhiRMS, ecalIsolEt, EtEffDenom, EtEffNum, EtMax_, EtMin_, jetEt, jetEta, jetPhi, NBins_, nClusters, seedTowerEt, DQMStore::setCurrentFolder(), store, towerIsolEt, and triggerTag_.
00007 : 00008 l2TauInfoAssoc_(iConfig.getParameter<edm::InputTag>("L2InfoAssociationInput")), 00009 mcColl_(iConfig.getParameter<edm::InputTag>("refCollection")), 00010 met_(iConfig.getParameter<edm::InputTag >("MET")), 00011 doRef_(iConfig.getParameter<bool>("doReference")), 00012 matchDeltaRMC_(iConfig.getParameter<double>("MatchDeltaR")), 00013 triggerTag_((iConfig.getParameter<std::string>("DQMFolder"))), 00014 l2Isolated_(iConfig.getParameter<edm::InputTag>("L2IsolatedJets")), 00015 outFile_(iConfig.getParameter<std::string>("OutputFileName")), 00016 EtMin_(iConfig.getParameter<double>("EtMin")), 00017 EtMax_(iConfig.getParameter<double>("EtMax")), 00018 NBins_(iConfig.getParameter<int>("NBins")) 00019 00020 { 00021 00022 store = &*edm::Service<DQMStore>(); 00023 00024 if(store) 00025 { 00026 //Create the histograms 00027 store->setCurrentFolder(triggerTag_); 00028 jetEt= store->book1D("L2tauCandEt","tauCandEt",NBins_,EtMin_,EtMax_); 00029 jetEta= store->book1D("L2tauCandEta","tauCandEta",50,-2.5,2.5); 00030 jetPhi= store->book1D("L2tauCandPhi","tauCandPhi",63,-3.14,3.14); 00031 ecalIsolEt=store->book1D("L2ecalIsolEt","ecalIsolEt",40,0,20); 00032 towerIsolEt=store->book1D("L2towerIsolEt","towerIsolEt",40,0,20); 00033 seedTowerEt=store->book1D("L2seedTowerEt","seedTowerEt",40,0,80); 00034 nClusters=store->book1D("L2nClusters","nClusters",20,0,20); 00035 clusterEtaRMS=store->book1D("L2clusterEtaRMS","clusterEtaRMS",25,0,0.5); 00036 clusterPhiRMS=store->book1D("L2clusterPhiRMS","clusterPhiRMS",25,0,0.5); 00037 clusterDeltaRRMS=store->book1D("L2clusterDeltaRRMS","clusterDeltaRRMS",25,0,0.5); 00038 EtEffNum=store->book1D("L2EtEffNum","Efficiency vs E_{t}(Numerator)",NBins_,EtMin_,EtMax_); 00039 EtEffDenom=store->book1D("L2EtEffDenom","Efficiency vs E_{t}(Denominator)",NBins_,EtMin_,EtMax_); 00040 MET=store->book1D("MET","Missing E_{t}",NBins_,EtMin_,EtMax_); 00041 00042 } 00043 00044 }
HLTTauCaloDQMOfflineSource::~HLTTauCaloDQMOfflineSource | ( | ) |
void HLTTauCaloDQMOfflineSource::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 54 of file HLTTauCaloDQMOfflineSource.cc.
References clusterDeltaRRMS, clusterEtaRMS, clusterPhiRMS, doRef_, ecalIsolEt, EtEffDenom, EtEffNum, MonitorElement::Fill(), edm::Event::getByLabel(), metsig::jet, configurableAnalysis::Jet, jetEt, jetEta, jetPhi, l2Isolated_, l2TauInfoAssoc_, match(), matchJet(), mcColl_, CaloMET_cfi::met, met_, nClusters, p, HcalSimpleRecAlgoImpl::reco(), seedTowerEt, and towerIsolEt.
00055 { 00056 using namespace edm; 00057 using namespace reco; 00058 00059 Handle<L2TauInfoAssociation> l2TauInfoAssoc; //Handle to the input (L2 Tau Info Association) 00060 iEvent.getByLabel(l2TauInfoAssoc_,l2TauInfoAssoc); 00061 00062 Handle<LVColl> McInfo; //Handle To The Truth!!!! 00063 iEvent.getByLabel(mcColl_,McInfo); 00064 00065 Handle<reco::CaloJetCollection> l2Isolated; 00066 iEvent.getByLabel(l2Isolated_,l2Isolated); 00067 00068 if (!l2TauInfoAssoc.isValid() || !l2Isolated.isValid()) 00069 { 00070 edm::LogInfo("HLTTauCaloDQMOfflineSource") << "l2TauInfoAssoc object not found, " 00071 "skipping event"; 00072 return; 00073 } 00074 00075 00076 std::vector<l1extra::L1JetParticleRef> tauCandRefVec; 00077 00078 if(l2TauInfoAssoc.isValid())//get the Association class 00079 { 00080 00081 //Lets see if we have MC w matching or real data 00082 if(McInfo.isValid()) 00083 //If the Collection exists do work 00084 if(l2TauInfoAssoc->size()>0) 00085 for(L2TauInfoAssociation::const_iterator p = l2TauInfoAssoc->begin();p!=l2TauInfoAssoc->end();++p) 00086 { 00087 //Retrieve The L2TauIsolationInfo Class from the AssociationMap 00088 const L2TauIsolationInfo l2info = p->val; 00089 00090 //Retrieve the Jet From the AssociationMap 00091 const Jet& jet =*(p->key); 00092 00093 if((doRef_&&match(jet,*McInfo))||(!doRef_)) 00094 { 00095 ecalIsolEt->Fill(l2info.ECALIsolConeCut); 00096 towerIsolEt->Fill(l2info.TowerIsolConeCut); 00097 nClusters->Fill(l2info.ECALClusterNClusters); 00098 seedTowerEt->Fill(l2info.SeedTowerEt); 00099 clusterEtaRMS->Fill(l2info.ECALClusterEtaRMS); 00100 clusterPhiRMS->Fill(l2info.ECALClusterPhiRMS); 00101 clusterDeltaRRMS->Fill(l2info.ECALClusterDRRMS); 00102 jetEt->Fill(jet.et()); 00103 jetEta->Fill(jet.eta()); 00104 jetPhi->Fill(jet.phi()); 00105 00106 EtEffDenom->Fill(jet.et()); 00107 00108 if(l2Isolated.isValid()) 00109 { 00110 if(matchJet(jet,*l2Isolated)) 00111 EtEffNum->Fill(jet.et()); 00112 00113 } 00114 00115 } 00116 00117 00118 } 00119 00120 } 00121 00122 //Plot the missing Et. To be used in SingleTau mainly 00123 Handle<CaloMETCollection> met; iEvent.getByLabel(met_,met); 00124 if(met.isValid())//get the Association class 00125 { 00126 MET->Fill((*met)[0].pt()); 00127 } 00128 00129 00130 }
void HLTTauCaloDQMOfflineSource::beginJob | ( | const edm::EventSetup & | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 142 of file HLTTauCaloDQMOfflineSource.cc.
References EtEffDenom, EtEffNum, MonitorElement::getTH1F(), outFile_, DQMStore::save(), and store.
00142 { 00143 00144 //Get Efficiency 00145 00146 EtEffNum->getTH1F()->Sumw2(); 00147 EtEffDenom->getTH1F()->Sumw2(); 00148 00149 //Write file 00150 if(outFile_.size()>0) 00151 if (store) store->save (outFile_); 00152 00153 }
Definition at line 156 of file HLTTauCaloDQMOfflineSource.cc.
References it, matchDeltaRMC_, and reco::Particle::p4().
Referenced by analyze().
00157 { 00158 00159 //Loop On the Collection and see if your tau jet is matched to one there 00160 //Also find the nearest Matched MC Particle to your Jet (to be complete) 00161 00162 bool matched=false; 00163 00164 if(McInfo.size()>0) 00165 for(std::vector<LV>::const_iterator it = McInfo.begin();it!=McInfo.end();++it) 00166 { 00167 double delta = ROOT::Math::VectorUtil::DeltaR(jet.p4().Vect(),*it); 00168 if(delta<matchDeltaRMC_) 00169 { 00170 matched=true; 00171 00172 } 00173 } 00174 00175 00176 00177 return matched; 00178 }
bool HLTTauCaloDQMOfflineSource::matchJet | ( | const reco::Jet & | jet, | |
const reco::CaloJetCollection & | McInfo | |||
) | [private] |
Definition at line 181 of file HLTTauCaloDQMOfflineSource.cc.
References it, matchDeltaRMC_, and reco::Particle::p4().
Referenced by analyze().
00182 { 00183 00184 //Loop On the Collection and see if your tau jet is matched to one there 00185 //Also find the nearest Matched MC Particle to your Jet (to be complete) 00186 00187 bool matched=false; 00188 00189 if(McInfo.size()>0) 00190 for(reco::CaloJetCollection::const_iterator it = McInfo.begin();it!=McInfo.end();++it) 00191 { 00192 double delta = ROOT::Math::VectorUtil::DeltaR(jet.p4().Vect(),it->p4().Vect()); 00193 if(delta<matchDeltaRMC_) 00194 { 00195 matched=true; 00196 } 00197 } 00198 00199 00200 00201 return matched; 00202 }
Definition at line 84 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
Definition at line 82 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
Definition at line 83 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
bool HLTTauCaloDQMOfflineSource::doRef_ [private] |
Definition at line 79 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
Definition at line 87 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), endJob(), and HLTTauCaloDQMOfflineSource().
Definition at line 86 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), endJob(), and HLTTauCaloDQMOfflineSource().
double HLTTauCaloDQMOfflineSource::EtMax_ [private] |
Definition at line 70 of file HLTTauCaloDQMOfflineSource.h.
Referenced by HLTTauCaloDQMOfflineSource().
double HLTTauCaloDQMOfflineSource::EtMin_ [private] |
Definition at line 69 of file HLTTauCaloDQMOfflineSource.h.
Referenced by HLTTauCaloDQMOfflineSource().
MonitorElement* HLTTauCaloDQMOfflineSource::jetEt [private] |
Definition at line 76 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
MonitorElement* HLTTauCaloDQMOfflineSource::jetEta [private] |
Definition at line 77 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
MonitorElement* HLTTauCaloDQMOfflineSource::jetPhi [private] |
Definition at line 78 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
double HLTTauCaloDQMOfflineSource::matchDeltaRMC_ [private] |
MonitorElement* HLTTauCaloDQMOfflineSource::MET [private] |
Definition at line 89 of file HLTTauCaloDQMOfflineSource.h.
int HLTTauCaloDQMOfflineSource::NBins_ [private] |
Definition at line 71 of file HLTTauCaloDQMOfflineSource.h.
Referenced by HLTTauCaloDQMOfflineSource().
Definition at line 85 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
std::string HLTTauCaloDQMOfflineSource::outFile_ [private] |
Definition at line 81 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
DQMStore* HLTTauCaloDQMOfflineSource::store [private] |
Definition at line 73 of file HLTTauCaloDQMOfflineSource.h.
Referenced by endJob(), and HLTTauCaloDQMOfflineSource().
Definition at line 80 of file HLTTauCaloDQMOfflineSource.h.
Referenced by analyze(), and HLTTauCaloDQMOfflineSource().
std::string HLTTauCaloDQMOfflineSource::triggerTag_ [private] |
Definition at line 61 of file HLTTauCaloDQMOfflineSource.h.
Referenced by HLTTauCaloDQMOfflineSource().