![]() |
![]() |
#include <SLHCUpgradeSimulations/L1CaloClusterAnalyzer/src/L1CaloClusterAnalyzer.cc>
Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 40 of file L1CaloClusterAnalyzer.h.
L1CaloClusterAnalyzer::L1CaloClusterAnalyzer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 25 of file L1CaloClusterAnalyzer.cc.
References CentralIso, centralPt, ClusterEnergy, ClusterPtMatch, RecoMatch, RecoPt, Ring1E, Ring2E, Ring3E, Ring4E, RRTree, TowerEnergy1, TowerEnergy2, TowerEnergy3, and TowerEnergy4.
: src_(iConfig.getParameter<edm::InputTag>("src")), electrons_(iConfig.getParameter<edm::InputTag>("electrons")) { //now do what ever initialization is needed edm::Service<TFileService> fs; RRTree = fs->make<TTree>("RRTree","Tree containing RAW RECO info"); //RRTree->Branch("coneEnergy",&coneE); RRTree->Branch("L1Pt",¢ralPt); RRTree->Branch("RecoPt",&RecoPt); RRTree->Branch("RecoMatch",&RecoMatch); RRTree->Branch("ClusterPtMatch",&ClusterPtMatch); RRTree->Branch("CentralIso",&CentralIso); RRTree->Branch("TowerEnergy1",&TowerEnergy1); RRTree->Branch("TowerEnergy2",&TowerEnergy2); RRTree->Branch("TowerEnergy3",&TowerEnergy3); RRTree->Branch("TowerEnergy4",&TowerEnergy4); RRTree->Branch("Ring1E",&Ring1E); RRTree->Branch("Ring2E",&Ring2E); RRTree->Branch("Ring3E",&Ring3E); RRTree->Branch("Ring4E",&Ring4E); RRTree->Branch("ClusterEnergy",&ClusterEnergy); }
L1CaloClusterAnalyzer::~L1CaloClusterAnalyzer | ( | ) |
Definition at line 55 of file L1CaloClusterAnalyzer.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void L1CaloClusterAnalyzer::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 69 of file L1CaloClusterAnalyzer.cc.
References CentralIso, centralPt, ClusterEnergy, ClusterPtMatch, coneE, HI_PhotonSkim_cff::electrons, electrons_, edm::Event::getByLabel(), i, j, RecoMatch, RecoPt, Ring1E, Ring2E, Ring3E, Ring4E, RRTree, src_, TowerEnergy1, TowerEnergy2, TowerEnergy3, and TowerEnergy4.
{ using namespace edm; Handle<l1slhc::L1CaloClusterCollection> clusters; iEvent.getByLabel(src_,clusters); edm::Handle<reco::GsfElectronCollection> electrons; bool gotRecoE = iEvent.getByLabel(electrons_,electrons); for(unsigned int j=0;j<clusters->size();++j) { if(clusters->at(j).isCentral() && clusters->at(j).isEGamma() ){ coneE = clusters->at(j).isoEnergyEG(); centralPt = clusters->at(j).p4().pt(); CentralIso = (float) (clusters->at(j).LeadTowerE())/(clusters->at(j).E()); TowerEnergy1 = clusters->at(j).LeadTowerE(); TowerEnergy2 = clusters->at(j).SecondTowerE(); TowerEnergy3 = clusters->at(j).ThirdTowerE(); TowerEnergy4 = clusters->at(j).FourthTowerE(); Ring1E = clusters->at(j).Ring1E(); Ring2E = clusters->at(j).Ring2E(); Ring3E = clusters->at(j).Ring3E(); Ring4E = clusters->at(j).Ring4E(); ClusterEnergy = clusters->at(j).E(); //printf("CentralIso: %f\n",CentralIso); // printf("Number of Clusters = %i \n",clusters->at(j).isoClusters()); bool passID = false; RecoPt = 0; if(gotRecoE) for( unsigned int i =1; i<electrons->size() && !passID; ++i){ if((electrons->at(i).dr04TkSumPt() + electrons->at(i).dr04EcalRecHitSumEt() + electrons->at(i).dr04HcalTowerSumEt())/(electrons->at(i).pt())<0.15)// if(electrons->at(i).isEB()||electrons->at(i).isEE()) if(fabs(electrons->at(i).sigmaIetaIeta())<0.025) //sigmaEtaEta_[type]) if(fabs(electrons->at(i).deltaEtaSuperClusterTrackAtVtx())<0.02) //deltaEta_[type]) if(fabs(electrons->at(i).deltaPhiSuperClusterTrackAtVtx())<0.1)//deltaPhi_[type]) if(fabs(electrons->at(i).hcalOverEcal())<0.01) //hoE_[type]) if((electrons->at(i).dr03TkSumPt()+electrons->at(i).dr03EcalRecHitSumEt()+electrons->at(i).dr03HcalDepth1TowerSumEt())/electrons->at(i).pt()<0.15) if(ROOT::Math::VectorUtil::DeltaR(clusters->at(j).p4(),electrons->at(i).p4())<0.3) { passID=true; RecoPt = electrons->at(i).pt(); } } if(passID){ ClusterPtMatch = fabs((clusters->at(j).p4().pt()-RecoPt)/RecoPt); RecoMatch = 1; } else{ ClusterPtMatch = -1; RecoMatch = -1; } RRTree->Fill(); } } }
void L1CaloClusterAnalyzer::beginJob | ( | void | ) | [private, virtual] |
void L1CaloClusterAnalyzer::beginLuminosityBlock | ( | edm::LuminosityBlock const & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
void L1CaloClusterAnalyzer::beginRun | ( | edm::Run const & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
void L1CaloClusterAnalyzer::endJob | ( | void | ) | [private, virtual] |
void L1CaloClusterAnalyzer::endLuminosityBlock | ( | edm::LuminosityBlock const & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
void L1CaloClusterAnalyzer::endRun | ( | edm::Run const & | , |
edm::EventSetup const & | |||
) | [private, virtual] |
void L1CaloClusterAnalyzer::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDAnalyzer.
Definition at line 175 of file L1CaloClusterAnalyzer.cc.
References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().
{ //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters edm::ParameterSetDescription desc; desc.setUnknown(); descriptions.addDefault(desc); }
float L1CaloClusterAnalyzer::CentralIso [private] |
Definition at line 88 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
float L1CaloClusterAnalyzer::centralPt [private] |
Definition at line 67 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
float L1CaloClusterAnalyzer::ClusterEnergy [private] |
Definition at line 81 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
float L1CaloClusterAnalyzer::ClusterMatch [private] |
Definition at line 70 of file L1CaloClusterAnalyzer.h.
float L1CaloClusterAnalyzer::ClusterPtMatch [private] |
Definition at line 83 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
float L1CaloClusterAnalyzer::coneE [private] |
Definition at line 66 of file L1CaloClusterAnalyzer.h.
Referenced by analyze().
Definition at line 65 of file L1CaloClusterAnalyzer.h.
Referenced by analyze().
float L1CaloClusterAnalyzer::RecoEeta [private] |
Definition at line 86 of file L1CaloClusterAnalyzer.h.
float L1CaloClusterAnalyzer::RecoEphi [private] |
Definition at line 87 of file L1CaloClusterAnalyzer.h.
float L1CaloClusterAnalyzer::RecoEpt [private] |
Definition at line 85 of file L1CaloClusterAnalyzer.h.
float L1CaloClusterAnalyzer::RecoMatch [private] |
Definition at line 69 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
float L1CaloClusterAnalyzer::RecoPt [private] |
Definition at line 68 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
int L1CaloClusterAnalyzer::Ring1E [private] |
Definition at line 76 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
int L1CaloClusterAnalyzer::Ring2E [private] |
Definition at line 77 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
int L1CaloClusterAnalyzer::Ring3E [private] |
Definition at line 78 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
int L1CaloClusterAnalyzer::Ring4E [private] |
Definition at line 79 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
TTree* L1CaloClusterAnalyzer::RRTree [private] |
Definition at line 62 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
edm::InputTag L1CaloClusterAnalyzer::src_ [private] |
Definition at line 64 of file L1CaloClusterAnalyzer.h.
Referenced by analyze().
int L1CaloClusterAnalyzer::TowerEnergy1 [private] |
Definition at line 72 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
int L1CaloClusterAnalyzer::TowerEnergy2 [private] |
Definition at line 73 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
int L1CaloClusterAnalyzer::TowerEnergy3 [private] |
Definition at line 74 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
int L1CaloClusterAnalyzer::TowerEnergy4 [private] |
Definition at line 75 of file L1CaloClusterAnalyzer.h.
Referenced by analyze(), and L1CaloClusterAnalyzer().
float L1CaloClusterAnalyzer::TwoLeadTowerEnergy [private] |
Definition at line 71 of file L1CaloClusterAnalyzer.h.