#include <DQMOffline/JetMET/src/CaloMETAnalyzer.h>
Definition at line 34 of file CaloMETAnalyzer.h.
CaloMETAnalyzer::CaloMETAnalyzer | ( | const edm::ParameterSet & | pSet | ) |
Constructor.
Definition at line 28 of file CaloMETAnalyzer.cc.
References parameters.
00028 { 00029 00030 parameters = pSet; 00031 00032 }
CaloMETAnalyzer::~CaloMETAnalyzer | ( | ) | [virtual] |
void CaloMETAnalyzer::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup, | |||
const edm::TriggerResults & | triggerResults, | |||
const reco::CaloMET & | caloMET, | |||
const reco::CaloMET & | caloMETNoHF | |||
) |
Get the analysis.
Definition at line 91 of file CaloMETAnalyzer.cc.
References edm::HLTGlobalStatus::accept(), reco::MET::e_longitudinal(), reco::CaloMET::emEtFraction(), reco::CaloMET::emEtInEB(), reco::CaloMET::emEtInEE(), reco::CaloMET::emEtInHF(), reco::CaloMET::etFractionHadronic(), MonitorElement::Fill(), reco::CaloMET::hadEtInHB(), reco::CaloMET::hadEtInHE(), reco::CaloMET::hadEtInHF(), reco::CaloMET::hadEtInHO(), hCaloEmEtFraction, hCaloEmEtInEB, hCaloEmEtInEE, hCaloEmEtInHF, hCaloEtFractionHadronic, hCaloEz, hCaloEzNoHF, hCaloHadEtInHB, hCaloHadEtInHE, hCaloHadEtInHF, hCaloHadEtInHO, hCaloMaxEtInEmTowers, hCaloMaxEtInHadTowers, hCaloMET, hCaloMETNoHF, hCaloMETPhi, hCaloMETPhiNoHF, hCaloMETSig, hCaloMETSigNoHF, hCaloMEx, hCaloMExLS, hCaloMExNoHF, hCaloMExNoHFLS, hCaloMEy, hCaloMEyLS, hCaloMEyNoHF, hCaloMEyNoHFLS, hCaloSumET, hCaloSumETNoHF, HLTPathsJetMBByIndex_, HLTPathsJetMBByName_, i, edm::TriggerNames::init(), jetME, LogTrace, edm::Event::luminosityBlock(), reco::CaloMET::maxEtInEmTowers(), reco::CaloMET::maxEtInHadTowers(), metname, reco::MET::mEtSig(), n, nHLTPathsJetMB_, reco::Particle::phi(), reco::Particle::pt(), reco::Particle::px(), reco::Particle::py(), edm::HLTGlobalStatus::size(), reco::MET::sumEt(), edm::TriggerNames::triggerIndex(), and edm::TriggerNames::triggerName().
Referenced by JetMETAnalyzer::analyze().
00093 { 00094 00095 LogTrace(metname)<<"[CaloMETAnalyzer] Analyze CaloMET"; 00096 00097 jetME->Fill(1); 00098 00099 // ========================================================== 00100 // Trigger information 00101 // 00102 if(&triggerResults) { 00103 00105 00106 // 00107 // 00108 // Check how many HLT triggers are in triggerResults 00109 int ntrigs = triggerResults.size(); 00110 //std::cout << "ntrigs=" << ntrigs << std::endl; 00111 00112 // 00113 // 00114 // Fill HLTPathsJetMBByIndex_[i] 00115 // If index=ntrigs, this HLT trigger doesn't exist in the HLT table for this data. 00116 edm::TriggerNames triggerNames; // TriggerNames class 00117 triggerNames.init(triggerResults); 00118 unsigned int n(nHLTPathsJetMB_); 00119 for (unsigned int i=0; i!=n; i++) { 00120 HLTPathsJetMBByIndex_[i]=triggerNames.triggerIndex(HLTPathsJetMBByName_[i]); 00121 } 00122 00123 // 00124 // 00125 // for empty input vectors (n==0), use all HLT trigger paths! 00126 if (n==0) { 00127 n=triggerResults.size(); 00128 HLTPathsJetMBByName_.resize(n); 00129 HLTPathsJetMBByIndex_.resize(n); 00130 for (unsigned int i=0; i!=n; i++) { 00131 HLTPathsJetMBByName_[i]=triggerNames.triggerName(i); 00132 HLTPathsJetMBByIndex_[i]=i; 00133 } 00134 } 00135 00136 // 00137 // 00138 // Check if each HLT trigger defined in jetMETAnalyzer_cfi is accepted or not 00139 // 00140 /* 00141 const string invalid("@@invalid@@"); 00142 if (n>0) { 00143 std::cout << " HLT trigger paths requested: index, name and valididty:" << std::endl; 00144 for (unsigned int i=0; i!=n; i++) { 00145 bool validity ( (HLTPathsJetMBByIndex_[i]<triggerResults.size()) && (HLTPathsJetMBByName_[i]!=invalid) ); 00146 std::cout << " " << HLTPathsJetMBByIndex_[i] 00147 << " " << HLTPathsJetMBByName_[i] 00148 << " " << validity << std::endl; 00149 } 00150 } 00151 */ 00152 00153 // count number of requested Jet or MB HLT paths which have fired 00154 unsigned int fired(0); 00155 for (unsigned int i=0; i!=n; i++) { 00156 if (HLTPathsJetMBByIndex_[i]<triggerResults.size()) { 00157 if (triggerResults.accept(HLTPathsJetMBByIndex_[i])) { 00158 fired++; 00159 } 00160 } 00161 } 00162 00163 // ...Loop over trigger paths and check bits for jet triggers 00164 /* 00165 for (int itrig = 0; itrig != ntrigs; ++itrig){ 00166 string trigName=triggerNames.triggerName(itrig); 00167 bool accept = triggerResults.accept(itrig); 00168 std::cout << trigName << " " << accept << std::endl; 00169 } 00170 */ 00171 00172 if (fired==0) return; 00173 00174 } else { 00175 00176 edm::LogInfo("CaloMetAnalyzer") << "TriggerResults::HLT not found, " 00177 "automatically select events"; 00178 //return; 00179 00180 } 00181 00182 // ========================================================== 00183 // Reconstructed MET Information 00184 double caloSumET = calomet.sumEt(); 00185 double caloMETSig = calomet.mEtSig(); 00186 double caloEz = calomet.e_longitudinal(); 00187 double caloMET = calomet.pt(); 00188 double caloMEx = calomet.px(); 00189 double caloMEy = calomet.py(); 00190 double caloMETPhi = calomet.phi(); 00191 00192 double caloMaxEtInEMTowers = calomet.maxEtInEmTowers(); 00193 double caloMaxEtInHadTowers = calomet.maxEtInHadTowers(); 00194 double caloEtFractionHadronic = calomet.etFractionHadronic(); 00195 double caloEmEtFraction = calomet.emEtFraction(); 00196 00197 double caloHadEtInHB = calomet.hadEtInHB(); 00198 double caloHadEtInHO = calomet.hadEtInHO(); 00199 double caloHadEtInHE = calomet.hadEtInHE(); 00200 double caloHadEtInHF = calomet.hadEtInHF(); 00201 double caloEmEtInEB = calomet.emEtInEB(); 00202 double caloEmEtInEE = calomet.emEtInEE(); 00203 double caloEmEtInHF = calomet.emEtInHF(); 00204 00205 double caloSumETNoHF = calometNoHF.sumEt(); 00206 double caloMETSigNoHF = calometNoHF.mEtSig(); 00207 double caloEzNoHF = calometNoHF.e_longitudinal(); 00208 double caloMETNoHF = calometNoHF.pt(); 00209 double caloMExNoHF = calometNoHF.px(); 00210 double caloMEyNoHF = calometNoHF.py(); 00211 double caloMETPhiNoHF = calometNoHF.phi(); 00212 00213 // 00214 int myLuminosityBlock; 00215 // myLuminosityBlock = (evtCounter++)/1000; 00216 myLuminosityBlock = iEvent.luminosityBlock(); 00217 /**** 00218 cout << " Run: " << iEvent.id().run() 00219 << " Event: " << iEvent.id().event() 00220 << " LumiSection: " << iEvent.luminosityBlock() 00221 << " evtCounter: " << evtCounter 00222 << " myLumiosityBlock: " << myLuminosityBlock 00223 << endl; 00224 ***/ 00225 // 00226 00227 hCaloMEx->Fill(caloMEx); 00228 hCaloMEy->Fill(caloMEy); 00229 hCaloMET->Fill(caloMET); 00230 hCaloMETPhi->Fill(caloMETPhi); 00231 hCaloSumET->Fill(caloSumET); 00232 hCaloMETSig->Fill(caloMETSig); 00233 hCaloEz->Fill(caloEz); 00234 hCaloMExLS->Fill(caloMEx,myLuminosityBlock); 00235 hCaloMEyLS->Fill(caloMEy,myLuminosityBlock); 00236 00237 hCaloMaxEtInEmTowers->Fill(caloMaxEtInEMTowers); 00238 hCaloMaxEtInHadTowers->Fill(caloMaxEtInHadTowers); 00239 hCaloEtFractionHadronic->Fill(caloEtFractionHadronic); 00240 hCaloEmEtFraction->Fill(caloEmEtFraction); 00241 00242 hCaloHadEtInHB->Fill(caloHadEtInHB); 00243 hCaloHadEtInHO->Fill(caloHadEtInHO); 00244 hCaloHadEtInHE->Fill(caloHadEtInHE); 00245 hCaloHadEtInHF->Fill(caloHadEtInHF); 00246 hCaloEmEtInEB->Fill(caloEmEtInEB); 00247 hCaloEmEtInEE->Fill(caloEmEtInEE); 00248 hCaloEmEtInHF->Fill(caloEmEtInHF); 00249 00250 hCaloMExNoHF->Fill(caloMExNoHF); 00251 hCaloMEyNoHF->Fill(caloMEyNoHF); 00252 hCaloMETNoHF->Fill(caloMETNoHF); 00253 hCaloMETPhiNoHF->Fill(caloMETPhiNoHF); 00254 hCaloSumETNoHF->Fill(caloSumETNoHF); 00255 hCaloMETSigNoHF->Fill(caloMETSigNoHF); 00256 hCaloEzNoHF->Fill(caloEzNoHF); 00257 hCaloMExNoHFLS->Fill(caloMExNoHF,myLuminosityBlock); 00258 hCaloMEyNoHFLS->Fill(caloMEyNoHF,myLuminosityBlock); 00259 00260 }
void CaloMETAnalyzer::beginJob | ( | edm::EventSetup const & | iSetup, | |
DQMStore * | dbe | |||
) | [virtual] |
Inizialize parameters for histo binning.
Implements CaloMETAnalyzerBase.
Definition at line 38 of file CaloMETAnalyzer.cc.
References DQMStore::book1D(), DQMStore::book2D(), evtCounter, edm::ParameterSet::getParameter(), hCaloEmEtFraction, hCaloEmEtInEB, hCaloEmEtInEE, hCaloEmEtInHF, hCaloEtFractionHadronic, hCaloEz, hCaloEzNoHF, hCaloHadEtInHB, hCaloHadEtInHE, hCaloHadEtInHF, hCaloHadEtInHO, hCaloMaxEtInEmTowers, hCaloMaxEtInHadTowers, hCaloMET, hCaloMETNoHF, hCaloMETPhi, hCaloMETPhiNoHF, hCaloMETSig, hCaloMETSigNoHF, hCaloMEx, hCaloMExLS, hCaloMExNoHF, hCaloMExNoHFLS, hCaloMEy, hCaloMEyLS, hCaloMEyNoHF, hCaloMEyNoHFLS, hCaloSumET, hCaloSumETNoHF, HLTPathsJetMBByIndex_, HLTPathsJetMBByName_, hNevents, jetME, LogTrace, metname, nHLTPathsJetMB_, parameters, MonitorElement::setBinLabel(), and DQMStore::setCurrentFolder().
Referenced by JetMETAnalyzer::beginJob().
00038 { 00039 00040 evtCounter = 0; 00041 metname = "caloMETAnalyzer"; 00042 00043 LogTrace(metname)<<"[CaloMETAnalyzer] Parameters initialization"; 00044 dbe->setCurrentFolder("JetMET/CaloMETAnalyzer"); 00045 00046 HLTPathsJetMBByName_ = parameters.getParameter<std::vector<std::string > >("HLTPathsJetMB"); 00047 nHLTPathsJetMB_=HLTPathsJetMBByName_.size(); 00048 HLTPathsJetMBByIndex_.resize(nHLTPathsJetMB_); 00049 00050 jetME = dbe->book1D("caloMETReco", "caloMETReco", 3, 1, 4); 00051 jetME->setBinLabel(1,"CaloMET",1); 00052 00053 hNevents = dbe->book1D("METTask_Nevents", "METTask_Nevents" ,1,0,1); 00054 hCaloMEx = dbe->book1D("METTask_CaloMEx", "METTask_CaloMEx" ,500,-500,500); 00055 hCaloMEy = dbe->book1D("METTask_CaloMEy", "METTask_CaloMEy" ,500,-500,500); 00056 hCaloEz = dbe->book1D("METTask_CaloEz", "METTask_CaloEz" ,500,-500,500); 00057 hCaloMETSig = dbe->book1D("METTask_CaloMETSig","METTask_CaloMETSig",51,0,51); 00058 hCaloMET = dbe->book1D("METTask_CaloMET", "METTask_CaloMET" ,500,0,1000); 00059 hCaloMETPhi = dbe->book1D("METTask_CaloMETPhi","METTask_CaloMETPhi",80,-4,4); 00060 hCaloSumET = dbe->book1D("METTask_CaloSumET", "METTask_CaloSumET" ,1000,0,2000); 00061 hCaloMExLS = dbe->book2D("METTask_CaloMEx_LS","METTask_CaloMEx_LS",200,-200,200,500,0.,500.); 00062 hCaloMEyLS = dbe->book2D("METTask_CaloMEy_LS","METTask_CaloMEy_LS",200,-200,200,500,0.,500.); 00063 00064 hCaloMaxEtInEmTowers = dbe->book1D("METTask_CaloMaxEtInEmTowers", "METTask_CaloMaxEtInEmTowers" ,1000,0,2000); 00065 hCaloMaxEtInHadTowers = dbe->book1D("METTask_CaloMaxEtInHadTowers", "METTask_CaloMaxEtInHadTowers" ,1000,0,2000); 00066 hCaloEtFractionHadronic = dbe->book1D("METTask_CaloEtFractionHadronic","METTask_CaloEtFractionHadronic",100,0,1); 00067 hCaloEmEtFraction = dbe->book1D("METTask_CaloEmEtFraction", "METTask_CaloEmEtFraction" ,100,0,1); 00068 00069 hCaloHadEtInHB = dbe->book1D("METTask_CaloHadEtInHB","METTask_CaloHadEtInHB",1000,0,2000); 00070 hCaloHadEtInHO = dbe->book1D("METTask_CaloHadEtInHO","METTask_CaloHadEtInHO",1000,0,2000); 00071 hCaloHadEtInHE = dbe->book1D("METTask_CaloHadEtInHE","METTask_CaloHadEtInHE",1000,0,2000); 00072 hCaloHadEtInHF = dbe->book1D("METTask_CaloHadEtInHF","METTask_CaloHadEtInHF",1000,0,2000); 00073 //hCaloHadEtInEB = dbe->book1D("METTask_CaloHadEtInEB","METTask_CaloHadEtInEB",1000,0,2000); 00074 //hCaloHadEtInEE = dbe->book1D("METTask_CaloHadEtInEE","METTask_CaloHadEtInEE",1000,0,2000); 00075 hCaloEmEtInHF = dbe->book1D("METTask_CaloEmEtInHF" ,"METTask_CaloEmEtInHF" ,1000,0,2000); 00076 hCaloEmEtInEE = dbe->book1D("METTask_CaloEmEtInEE" ,"METTask_CaloEmEtInEE" ,1000,0,2000); 00077 hCaloEmEtInEB = dbe->book1D("METTask_CaloEmEtInEB" ,"METTask_CaloEmEtInEB" ,1000,0,2000); 00078 00079 hCaloMExNoHF = dbe->book1D("METTask_CaloMExNoHF", "METTask_CaloMExNoHF" ,500,-500,500); 00080 hCaloMEyNoHF = dbe->book1D("METTask_CaloMEyNoHF", "METTask_CaloMEyNoHF" ,500,-500,500); 00081 hCaloEzNoHF = dbe->book1D("METTask_CaloEzNoHF", "METTask_CaloEzNoHF" ,500,-500,500); 00082 hCaloMETSigNoHF = dbe->book1D("METTask_CaloMETSigNoHF","METTask_CaloMETSigNoHF",51,0,51); 00083 hCaloMETNoHF = dbe->book1D("METTask_CaloMETNoHF", "METTask_CaloMETNoHF" ,1000,0,1000); 00084 hCaloMETPhiNoHF = dbe->book1D("METTask_CaloMETPhiNoHF","METTask_CaloMETPhiNoHF",80,-4,4); 00085 hCaloSumETNoHF = dbe->book1D("METTask_CaloSumETNoHF", "METTask_CaloSumETNoHF" ,1000,0,2000); 00086 hCaloMExNoHFLS = dbe->book2D("METTask_CaloMExNoHF_LS","METTask_CaloMExNoHF_LS",200,-200,200,500,0.,500.); 00087 hCaloMEyNoHFLS = dbe->book2D("METTask_CaloMEyNoHF_LS","METTask_CaloMEyNoHF_LS",200,-200,200,500,0.,500.); 00088 00089 }
int CaloMETAnalyzer::etaBin [private] |
Definition at line 71 of file CaloMETAnalyzer.h.
double CaloMETAnalyzer::etaMax [private] |
Definition at line 73 of file CaloMETAnalyzer.h.
double CaloMETAnalyzer::etaMin [private] |
Definition at line 72 of file CaloMETAnalyzer.h.
MonitorElement* CaloMETAnalyzer::hCaloEmEtFraction [private] |
MonitorElement* CaloMETAnalyzer::hCaloEmEtInEB [private] |
MonitorElement* CaloMETAnalyzer::hCaloEmEtInEE [private] |
MonitorElement* CaloMETAnalyzer::hCaloEmEtInHF [private] |
MonitorElement* CaloMETAnalyzer::hCaloEz [private] |
MonitorElement* CaloMETAnalyzer::hCaloEzNoHF [private] |
MonitorElement* CaloMETAnalyzer::hCaloHadEtInEB [private] |
Definition at line 106 of file CaloMETAnalyzer.h.
MonitorElement* CaloMETAnalyzer::hCaloHadEtInEE [private] |
Definition at line 107 of file CaloMETAnalyzer.h.
MonitorElement* CaloMETAnalyzer::hCaloHadEtInHB [private] |
MonitorElement* CaloMETAnalyzer::hCaloHadEtInHE [private] |
MonitorElement* CaloMETAnalyzer::hCaloHadEtInHF [private] |
MonitorElement* CaloMETAnalyzer::hCaloHadEtInHO [private] |
MonitorElement* CaloMETAnalyzer::hCaloMET [private] |
MonitorElement* CaloMETAnalyzer::hCaloMETNoHF [private] |
MonitorElement* CaloMETAnalyzer::hCaloMETPhi [private] |
MonitorElement* CaloMETAnalyzer::hCaloMETPhiNoHF [private] |
MonitorElement* CaloMETAnalyzer::hCaloMETSig [private] |
MonitorElement* CaloMETAnalyzer::hCaloMETSigNoHF [private] |
MonitorElement* CaloMETAnalyzer::hCaloMEx [private] |
MonitorElement* CaloMETAnalyzer::hCaloMExLS [private] |
MonitorElement* CaloMETAnalyzer::hCaloMExNoHF [private] |
MonitorElement* CaloMETAnalyzer::hCaloMExNoHFLS [private] |
MonitorElement* CaloMETAnalyzer::hCaloMEy [private] |
MonitorElement* CaloMETAnalyzer::hCaloMEyLS [private] |
MonitorElement* CaloMETAnalyzer::hCaloMEyNoHF [private] |
MonitorElement* CaloMETAnalyzer::hCaloMEyNoHFLS [private] |
MonitorElement* CaloMETAnalyzer::hCaloSumET [private] |
MonitorElement* CaloMETAnalyzer::hCaloSumETNoHF [private] |
std::vector<unsigned int> CaloMETAnalyzer::HLTPathsJetMBByIndex_ [private] |
std::vector<std::string > CaloMETAnalyzer::HLTPathsJetMBByName_ [private] |
MonitorElement* CaloMETAnalyzer::hNevents [private] |
MonitorElement* CaloMETAnalyzer::jetME [private] |
std::string CaloMETAnalyzer::metname [private] |
unsigned int CaloMETAnalyzer::nHLTPathsJetMB_ [private] |
number of Jet or MB HLT trigger paths
Definition at line 64 of file CaloMETAnalyzer.h.
Referenced by analyze(), and beginJob().
edm::ParameterSet CaloMETAnalyzer::parameters [private] |
int CaloMETAnalyzer::phiBin [private] |
Definition at line 75 of file CaloMETAnalyzer.h.
double CaloMETAnalyzer::phiMax [private] |
Definition at line 77 of file CaloMETAnalyzer.h.
double CaloMETAnalyzer::phiMin [private] |
Definition at line 76 of file CaloMETAnalyzer.h.
int CaloMETAnalyzer::ptBin [private] |
Definition at line 79 of file CaloMETAnalyzer.h.
double CaloMETAnalyzer::ptMax [private] |
Definition at line 81 of file CaloMETAnalyzer.h.
double CaloMETAnalyzer::ptMin [private] |
Definition at line 80 of file CaloMETAnalyzer.h.