#include <SUSYDQMAnalyzer.h>
Definition at line 18 of file SUSYDQMAnalyzer.h.
SUSYDQMAnalyzer::SUSYDQMAnalyzer | ( | const edm::ParameterSet & | pSet | ) | [explicit] |
Definition at line 72 of file SUSYDQMAnalyzer.cc.
References edm::ParameterSet::getParameter(), and cmsCodeRules::cppFunctionSkipper::operator.
{ iConfig = pSet; SUSYFolder = iConfig.getParameter<std::string>("folderName"); dqm = edm::Service<DQMStore>().operator->(); //std::cout<<"here 1!"<<std::endl; }
SUSYDQMAnalyzer::~SUSYDQMAnalyzer | ( | ) |
Definition at line 305 of file SUSYDQMAnalyzer.cc.
{ }
void SUSYDQMAnalyzer::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 149 of file SUSYDQMAnalyzer.cc.
References abs, gather_cfg::cout, edm::Event::getByLabel(), edm::HandleBase::isValid(), metsig::jet, edm::Handle< T >::product(), reco::LeafCandidate::pt(), HT< T >::ScalarSum, and HT< T >::v.
{ //std::cout<<"here 7!"<<std::endl; // Commenting out unused but initialized variables. [Suchandra Dutta] // EventID TheEvent = iEvent.id(); //int BXN = iEvent.bunchCrossing() ; //bool Dump = TextFileName.size(); //int TheEventNumber = TheEvent.event(); //int Lumi = iEvent.luminosityBlock(); //int Run = iEvent.run(); //########################################################### // HTand MHT //=========================================================== // Calo HT, MHT and alpha_T edm::Handle<reco::CaloJetCollection> CaloJetcoll; iEvent.getByLabel(theCaloJetCollectionLabel, CaloJetcoll); if(!CaloJetcoll.isValid()) return; std::vector<math::XYZTLorentzVector> Ps; for (reco::CaloJetCollection::const_iterator jet = CaloJetcoll->begin(); jet!=CaloJetcoll->end(); ++jet){ if ((jet->pt()>_ptThreshold) && (abs(jet->eta()) < _maxAbsEta)){ if(Ps.size()>_maxNJets) { std::cout<<"NMax Jets exceded.."<<std::endl; break; } Ps.push_back(jet->p4()); } } hCaloAlpha_T->Fill( alpha_T()(Ps)); //std::cout<<"Calo Alpha_T "<<alpha_T()(Ps)<<std::endl; HT< reco::CaloJetCollection > CaloHT(CaloJetcoll, _ptThreshold, _maxAbsEta); //std::cout << "Calo MHT " << CaloHT.v.Mod() << std::endl; //std::cout << "Calo HT " << CaloHT.ScalarSum << std::endl; hCaloHT->Fill(CaloHT.ScalarSum); hCaloMHT->Fill(CaloHT.v.Mod()); //=========================================================== // PF HT, MHT and alpha_T edm::Handle<reco::PFJetCollection> PFjetcoll; iEvent.getByLabel(thePFJetCollectionLabel, PFjetcoll); if(!PFjetcoll.isValid()) return; Ps.clear(); for (reco::PFJetCollection::const_iterator jet = PFjetcoll->begin(); jet!=PFjetcoll->end(); ++jet){ if ((jet->pt()>_ptThreshold) && (abs(jet->eta()) < _maxAbsEta)){ if(Ps.size()>_maxNJets) { std::cout<<"NMax Jets exceded.."<<std::endl; break; } Ps.push_back(jet->p4()); } } //std::cout<<Ps.size()<<" "<<Ps.max_size()<<std::endl; hPFAlpha_T->Fill( alpha_T()(Ps)); //std::cout<<"PF Alpha_T "<<alpha_T()(Ps)<<std::endl; HT<reco::PFJetCollection> PFHT(PFjetcoll, _ptThreshold, _maxAbsEta); //std::cout << "PF MHT " << PFHT.v.Mod() << std::endl; //std::cout << "PF HT " << PFHT.ScalarSum << std::endl; hPFHT->Fill(PFHT.ScalarSum); hPFMHT->Fill(PFHT.v.Mod()); //=========================================================== // JPT HT, MHT and alpha_T edm::Handle<reco::JPTJetCollection> JPTjetcoll; iEvent.getByLabel(theJPTJetCollectionLabel, JPTjetcoll); if(!JPTjetcoll.isValid()) return; Ps.clear(); for (reco::JPTJetCollection::const_iterator jet = JPTjetcoll->begin(); jet!=JPTjetcoll->end(); ++jet){ if ((jet->pt()>_ptThreshold) && (abs(jet->eta())<_maxAbsEta)){ if(Ps.size()>_maxNJets) { std::cout<<"NMax Jets exceded..."<<std::endl; break; } Ps.push_back(jet->p4()); } } hJPTAlpha_T->Fill( alpha_T()(Ps)); //std::cout<<"JPT Alpha_T "<<alpha_T()(Ps)<<std::endl; HT<reco::JPTJetCollection> JPTHT(JPTjetcoll, _ptThreshold, _maxAbsEta); //std::cout << "JPT MHT " << JPTHT.v.Mod() << std::endl; //std::cout << "JPT HT " << JPTHT.ScalarSum << std::endl; hJPTHT->Fill(JPTHT.ScalarSum); hJPTMHT->Fill(JPTHT.v.Mod()); //########################################################### // MET //=========================================================== // Calo MET edm::Handle<reco::CaloMETCollection> calometcoll; iEvent.getByLabel(theCaloMETCollectionLabel, calometcoll); if(!calometcoll.isValid()) return; const CaloMETCollection *calometcol = calometcoll.product(); const CaloMET *calomet; calomet = &(calometcol->front()); hCaloMET->Fill(calomet->pt()); //std::cout<<"Calo MET "<<calomet->pt()<<std::endl; //=========================================================== // PF MET edm::Handle<reco::PFMETCollection> pfmetcoll; iEvent.getByLabel(thePFMETCollectionLabel, pfmetcoll); if(!pfmetcoll.isValid()) return; const PFMETCollection *pfmetcol = pfmetcoll.product(); const PFMET *pfmet; pfmet = &(pfmetcol->front()); hPFMET->Fill(pfmet->pt()); //std::cout<<"PF MET "<<pfmet->pt()<<std::endl; //=========================================================== // TC MET edm::Handle<reco::METCollection> tcmetcoll; iEvent.getByLabel(theTCMETCollectionLabel, tcmetcoll); if(!tcmetcoll.isValid()) return; const METCollection *tcmetcol = tcmetcoll.product(); const MET *tcmet; tcmet = &(tcmetcol->front()); hTCMET->Fill(tcmet->pt()); //std::cout<<"TC MET "<<tcmet->pt()<<std::endl; }
void SUSYDQMAnalyzer::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 82 of file SUSYDQMAnalyzer.cc.
{ // Load parameters //std::cout<<"here 2!"<<std::endl; thePFMETCollectionLabel = iConfig.getParameter<edm::InputTag>("PFMETCollectionLabel"); theCaloMETCollectionLabel = iConfig.getParameter<edm::InputTag>("CaloMETCollectionLabel"); theTCMETCollectionLabel = iConfig.getParameter<edm::InputTag>("TCMETCollectionLabel"); theCaloJetCollectionLabel = iConfig.getParameter<edm::InputTag>("CaloJetCollectionLabel"); theJPTJetCollectionLabel = iConfig.getParameter<edm::InputTag>("JPTJetCollectionLabel"); thePFJetCollectionLabel = iConfig.getParameter<edm::InputTag>("PFJetCollectionLabel"); _ptThreshold = iConfig.getParameter<double>("ptThreshold"); _maxNJets = iConfig.getParameter<double>("maxNJets"); _maxAbsEta = iConfig.getParameter<double>("maxAbsEta"); //std::cout<<"here 3!"<<std::endl; //std::cout<<thePFJetCollectionLabel<<std::endl; }
void SUSYDQMAnalyzer::beginRun | ( | const edm::Run & | iRun, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 102 of file SUSYDQMAnalyzer.cc.
References dir.
{ //std::cout<<"here 4!"<<std::endl; if( dqm ) { //std::cout<<"here 5!"<<std::endl; //=========================================================== // book HT histos. std::string dir=SUSYFolder; dir+="HT"; dqm->setCurrentFolder(dir); hCaloHT = dqm->book1D("Calo_HT", "", 500, 0., 2000); hPFHT = dqm->book1D("PF_HT" , "", 500, 0., 2000); hJPTHT = dqm->book1D("JPT_HT" , "", 500, 0., 2000); //=========================================================== // book MET histos. dir=SUSYFolder; dir+="MET"; dqm->setCurrentFolder(dir); hCaloMET = dqm->book1D("Calo_MET", "", 500, 0., 1000); hPFMET = dqm->book1D("PF_MET" , "", 500, 0., 1000); hTCMET = dqm->book1D("TC_MET" , "", 500, 0., 1000); //=========================================================== // book MHT histos. dir=SUSYFolder; dir+="MHT"; dqm->setCurrentFolder(dir); hCaloMHT = dqm->book1D("Calo_MHT", "", 500, 0., 1000); hPFMHT = dqm->book1D("PF_MHT" , "", 500, 0., 1000); hJPTMHT = dqm->book1D("JPT_MHT" , "", 500, 0., 1000); //=========================================================== // book alpha_T histos. dir=SUSYFolder; dir+="Alpha_T"; dqm->setCurrentFolder(dir); hCaloAlpha_T = dqm->book1D("Calo_AlphaT", "", 100, 0., 1.); hJPTAlpha_T = dqm->book1D("PF_AlphaT" , "", 100, 0., 1.); hPFAlpha_T = dqm->book1D("JPT_AlphaT" , "", 100, 0., 1.); //std::cout<<"here 6!"<<std::endl; } }
void SUSYDQMAnalyzer::endRun | ( | const edm::Run & | , |
const edm::EventSetup & | |||
) | [private, virtual] |
double SUSYDQMAnalyzer::_maxAbsEta [private] |
Definition at line 44 of file SUSYDQMAnalyzer.h.
double SUSYDQMAnalyzer::_maxNJets [private] |
Definition at line 43 of file SUSYDQMAnalyzer.h.
double SUSYDQMAnalyzer::_ptThreshold [private] |
Definition at line 42 of file SUSYDQMAnalyzer.h.
DQMStore* SUSYDQMAnalyzer::dqm [private] |
Definition at line 57 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hCaloAlpha_T [private] |
Definition at line 74 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hCaloHT [private] |
Definition at line 62 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hCaloMET [private] |
Definition at line 66 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hCaloMHT [private] |
Definition at line 70 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hJPTAlpha_T [private] |
Definition at line 75 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hJPTHT [private] |
Definition at line 63 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hJPTMHT [private] |
Definition at line 71 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hPFAlpha_T [private] |
Definition at line 76 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hPFHT [private] |
Definition at line 64 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hPFMET [private] |
Definition at line 67 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hPFMHT [private] |
Definition at line 72 of file SUSYDQMAnalyzer.h.
MonitorElement* SUSYDQMAnalyzer::hTCMET [private] |
Definition at line 68 of file SUSYDQMAnalyzer.h.
edm::ParameterSet SUSYDQMAnalyzer::iConfig [private] |
Definition at line 24 of file SUSYDQMAnalyzer.h.
std::string SUSYDQMAnalyzer::SUSYFolder [private] |
Definition at line 48 of file SUSYDQMAnalyzer.h.
Definition at line 38 of file SUSYDQMAnalyzer.h.
Definition at line 34 of file SUSYDQMAnalyzer.h.
Definition at line 40 of file SUSYDQMAnalyzer.h.
Definition at line 39 of file SUSYDQMAnalyzer.h.
Definition at line 35 of file SUSYDQMAnalyzer.h.
Definition at line 36 of file SUSYDQMAnalyzer.h.