#include <CaloTriggerAnalyzerOnData.h>
Public Member Functions | |
CaloTriggerAnalyzerOnData (const edm::ParameterSet &) | |
~CaloTriggerAnalyzerOnData () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
Private Attributes | |
TH1F * | absEta |
TH1F * | dEta |
TH1F * | dPhi |
TH1F * | dPt |
TH1F * | dR |
double | DR_ |
TH1F * | eta |
TH1F * | etaDenom |
TH1F * | etaNum |
float | highestGenPt |
TH1F * | highestPt |
TH1F * | highestPtGen |
float | highPt |
double | iso_ |
TH1F * | LHChighestPt |
edm::InputTag | LHCisosrc_ |
TH1F * | LHCpt |
TH1F * | LHCsecondPt |
edm::InputTag | LHCsrc_ |
double | maxEta_ |
TH1F * | pt |
TH1F * | ptDenom |
TH1F * | ptNum |
TH1F * | RPt |
TProfile * | RPtEta |
TProfile * | RPtEtaFull |
float | secondGenPt |
TH1F * | secondPt |
float | secondPtf |
TH1F * | secondPtGen |
TH1F * | SLHChighestPt |
TH1F * | SLHCpt |
TH1F * | SLHCsecondPt |
edm::InputTag | SLHCsrc_ |
double | threshold_ |
Definition at line 24 of file CaloTriggerAnalyzerOnData.h.
CaloTriggerAnalyzerOnData::CaloTriggerAnalyzerOnData | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 8 of file CaloTriggerAnalyzerOnData.cc.
References highestPt, LHChighestPt, LHCpt, LHCsecondPt, pt, secondPt, SLHChighestPt, SLHCpt, and SLHCsecondPt.
: SLHCsrc_(iConfig.getParameter<edm::InputTag>("SLHCsrc")), LHCsrc_(iConfig.getParameter<edm::InputTag>("LHCsrc")), LHCisosrc_(iConfig.getParameter<edm::InputTag>("LHCisosrc")), iso_(iConfig.getParameter<double>("iso")) { //now do what ever initialization is needed edm::Service<TFileService> fs; LHCpt = fs->make<TH1F>( "LHCpt" , "LHCpt", 20 , 0. , 100. ); SLHCpt = fs->make<TH1F>( "SLHCpt" , "SLHCpt", 20 , 0. , 100. ); pt = fs->make<TH1F>( "pt" , "pt", 20 , 0. , 100. ); highestPt= fs->make<TH1F>( "highestPt" , "highestPt", 50 , 0. , 100. ); secondPt = fs->make<TH1F>( "secondHighestPt", "secondHighestPt", 50 , 0. , 100. ); SLHChighestPt= fs->make<TH1F>( "SLHChighestPt" , "SLHChighestPt", 50 , 0. , 100. ); SLHCsecondPt = fs->make<TH1F>( "SLHCsecondHighestPt", "SLHCsecondHighestPt", 50 , 0. , 100. ); LHChighestPt= fs->make<TH1F>( "LHChighestPt" , "LHChighestPt", 50 , 0. , 100. ); LHCsecondPt = fs->make<TH1F>( "LHCsecondHighestPt", "LHCsecondHighestPt", 50 , 0. , 100. ); }
CaloTriggerAnalyzerOnData::~CaloTriggerAnalyzerOnData | ( | ) |
Definition at line 33 of file CaloTriggerAnalyzerOnData.cc.
{ // do anything here that needs to be done at destruction time // (e.g. close files, deallocate resources etc.) }
void CaloTriggerAnalyzerOnData::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 48 of file CaloTriggerAnalyzerOnData.cc.
References edm::Event::getByLabel(), highPt, i, iso_, j, LHChighestPt, LHCisosrc_, LHCpt, LHCsecondPt, LHCsrc_, secondPtf, SLHChighestPt, SLHCpt, SLHCsecondPt, and SLHCsrc_.
{ // std::cout << src_ << std::endl; // edm::Handle<edm::View<reco::Candidate> > ref; //edm::Handle<edm::View<reco::Candidate> > src; edm::Handle<edm::View<reco::Candidate> > LHCsrc; edm::Handle<edm::View<reco::Candidate> > SLHCsrc; edm::Handle<edm::View<reco::Candidate> > LHCisosrc; //bool gotRef = iEvent.getByLabel(ref_,ref); //Bool gotSrc = iEvent.getByLabel(src_,src); bool gotLHCsrc = iEvent.getByLabel(LHCsrc_,LHCsrc); bool gotSLHCsrc = iEvent.getByLabel(SLHCsrc_,SLHCsrc); bool gotLHCisosrc = iEvent.getByLabel(LHCisosrc_,LHCisosrc); if(iso_==1){ if(gotLHCisosrc) { highPt=0; secondPtf=0; for(edm::View<reco::Candidate>::const_iterator i = LHCisosrc->begin(); i!= LHCisosrc->end();++i) { LHCpt->Fill(i->pt()); if (i->pt()>highPt){ secondPtf=highPt; highPt=i->pt(); } else if (i->pt()>secondPtf){ secondPtf=i->pt(); } } if(LHCisosrc->size()>0){ LHChighestPt->Fill(highPt); printf("LHCsrc highpt= %f \n",highPt); } else LHChighestPt->Fill(0.0); if(LHCisosrc->size()>1) LHCsecondPt->Fill(secondPtf); else LHCsecondPt->Fill(0.0); } } if(iso_==0){ highPt=0; secondPtf=0; if(gotLHCsrc) { for(edm::View<reco::Candidate>::const_iterator i = LHCsrc->begin(); i!= LHCsrc->end();++i) { LHCpt->Fill(i->pt()); if (i->pt()>highPt){ secondPtf=highPt; highPt=i->pt(); //printf("LHCsrc highpt= %f \n",highPt); } else if (i->pt()>secondPtf){ secondPtf=i->pt(); } } } if(gotLHCisosrc) { //printf("Got Isolated LHC \n"); for(edm::View<reco::Candidate>::const_iterator j = LHCisosrc->begin(); j!= LHCisosrc->end();++j) { //printf("LHCisosrc highpt= %f \n",highPt); if (j->pt()>highPt){ secondPtf=highPt; highPt=j->pt(); } else if (j->pt()>secondPtf){ secondPtf=j->pt(); } } } LHChighestPt->Fill(highPt); //printf("LHCsrc highpt= %f \n",highPt); LHCsecondPt->Fill(secondPtf); } if(iso_ == 1 ) printf("\n LHC ISO highPT:%f \n",highPt); else printf("\n LHC highPT:%f \n",highPt); if(gotSLHCsrc){ highPt=0; secondPtf=0; for(edm::View<reco::Candidate>::const_iterator i = SLHCsrc->begin(); i!= SLHCsrc->end();++i) { SLHCpt->Fill(i->pt()); if (i->pt()>highPt){ secondPtf=highPt; highPt=i->pt(); } else if (i->pt()>secondPtf){ secondPtf=i->pt(); } } //if(highPt != highPtold){ if(SLHCsrc->size()>0){ SLHChighestPt->Fill(highPt); } else SLHChighestPt->Fill(0.0); if(SLHCsrc->size()>1) SLHCsecondPt->Fill(secondPtf); else SLHCsecondPt->Fill(0.0); if(iso_ == 1 ) printf("\n SLHC ISO highPT:%f \n",highPt); else printf("\n SLHC highPT:%f \n",highPt); } }
TH1F* CaloTriggerAnalyzerOnData::absEta [private] |
Definition at line 71 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::dEta [private] |
Definition at line 58 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::dPhi [private] |
Definition at line 59 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::dPt [private] |
Definition at line 57 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::dR [private] |
Definition at line 72 of file CaloTriggerAnalyzerOnData.h.
double CaloTriggerAnalyzerOnData::DR_ [private] |
Definition at line 38 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::eta [private] |
Definition at line 50 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::etaDenom [private] |
Definition at line 55 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::etaNum [private] |
Definition at line 54 of file CaloTriggerAnalyzerOnData.h.
float CaloTriggerAnalyzerOnData::highestGenPt [private] |
Definition at line 42 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::highestPt [private] |
Definition at line 66 of file CaloTriggerAnalyzerOnData.h.
Referenced by CaloTriggerAnalyzerOnData().
TH1F* CaloTriggerAnalyzerOnData::highestPtGen [private] |
Definition at line 68 of file CaloTriggerAnalyzerOnData.h.
float CaloTriggerAnalyzerOnData::highPt [private] |
Definition at line 44 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze().
double CaloTriggerAnalyzerOnData::iso_ [private] |
Definition at line 37 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze().
TH1F* CaloTriggerAnalyzerOnData::LHChighestPt [private] |
Definition at line 61 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze(), and CaloTriggerAnalyzerOnData().
Definition at line 35 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze().
TH1F* CaloTriggerAnalyzerOnData::LHCpt [private] |
Definition at line 48 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze(), and CaloTriggerAnalyzerOnData().
TH1F* CaloTriggerAnalyzerOnData::LHCsecondPt [private] |
Definition at line 62 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze(), and CaloTriggerAnalyzerOnData().
Definition at line 34 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze().
double CaloTriggerAnalyzerOnData::maxEta_ [private] |
Definition at line 40 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::pt [private] |
Definition at line 56 of file CaloTriggerAnalyzerOnData.h.
Referenced by CaloTriggerAnalyzerOnData().
TH1F* CaloTriggerAnalyzerOnData::ptDenom [private] |
Definition at line 53 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::ptNum [private] |
Definition at line 52 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::RPt [private] |
Definition at line 70 of file CaloTriggerAnalyzerOnData.h.
TProfile* CaloTriggerAnalyzerOnData::RPtEta [private] |
Definition at line 73 of file CaloTriggerAnalyzerOnData.h.
TProfile* CaloTriggerAnalyzerOnData::RPtEtaFull [private] |
Definition at line 74 of file CaloTriggerAnalyzerOnData.h.
float CaloTriggerAnalyzerOnData::secondGenPt [private] |
Definition at line 43 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::secondPt [private] |
Definition at line 67 of file CaloTriggerAnalyzerOnData.h.
Referenced by CaloTriggerAnalyzerOnData().
float CaloTriggerAnalyzerOnData::secondPtf [private] |
Definition at line 45 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze().
TH1F* CaloTriggerAnalyzerOnData::secondPtGen [private] |
Definition at line 69 of file CaloTriggerAnalyzerOnData.h.
TH1F* CaloTriggerAnalyzerOnData::SLHChighestPt [private] |
Definition at line 63 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze(), and CaloTriggerAnalyzerOnData().
TH1F* CaloTriggerAnalyzerOnData::SLHCpt [private] |
Definition at line 47 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze(), and CaloTriggerAnalyzerOnData().
TH1F* CaloTriggerAnalyzerOnData::SLHCsecondPt [private] |
Definition at line 64 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze(), and CaloTriggerAnalyzerOnData().
Definition at line 33 of file CaloTriggerAnalyzerOnData.h.
Referenced by analyze().
double CaloTriggerAnalyzerOnData::threshold_ [private] |
Definition at line 39 of file CaloTriggerAnalyzerOnData.h.