#include <RecoEgamma/EgammaHFProducers/interface/HFRecoEcalCandidateAlgo.h>
Public Member Functions | |
HFRecoEcalCandidateAlgo (bool correct, double e9e25Cut, double intercept2DCut) | |
void | produce (const edm::Handle< reco::SuperClusterCollection > &SuperClusters, const reco::HFEMClusterShapeAssociationCollection &AssocShapes, reco::RecoEcalCandidateCollection &RecoECand) |
Analyze the hits. | |
Private Member Functions | |
reco::RecoEcalCandidate | correctEPosition (const reco::SuperCluster &original, const reco::HFEMClusterShape &shape) |
Private Attributes | |
bool | m_correct |
double | m_e9e25Cut |
double | m_intercept2DCut |
Klapoetke -- Minnesota
Definition at line 22 of file HFRecoEcalCandidateAlgo.h.
HFRecoEcalCandidateAlgo::HFRecoEcalCandidateAlgo | ( | bool | correct, | |
double | e9e25Cut, | |||
double | intercept2DCut | |||
) |
Definition at line 20 of file HFRecoEcalCandidateAlgo.cc.
00020 : 00021 m_correct(correct), 00022 m_e9e25Cut(e9e25Cut), 00023 m_intercept2DCut(intercept2DCut){ 00024 00025 }
RecoEcalCandidate HFRecoEcalCandidateAlgo::correctEPosition | ( | const reco::SuperCluster & | original, | |
const reco::HFEMClusterShape & | shape | |||
) | [private] |
Definition at line 27 of file HFRecoEcalCandidateAlgo.cc.
References reco::HFEMClusterShape::CellEta(), reco::HFEMClusterShape::CellPhi(), funct::cos(), reco::CaloCluster::energy(), reco::CaloCluster::eta(), reco::CaloCluster::phi(), and funct::sin().
Referenced by produce().
00027 { 00028 double energyCorrect=0.811474; 00029 double etaCorrect=.0131-.00319*sin(5.08*shape.CellEta()); 00030 double phiAmpCorrect=-.00404; 00031 double phiFreqCorrect=6.331; 00032 00033 double corEnergy= original.energy()/energyCorrect; 00034 double corEta=original.eta(); 00035 corEta+=(original.eta()>0)?(etaCorrect):(-etaCorrect); 00036 double corPhi=original.phi()+phiAmpCorrect*sin(phiFreqCorrect*shape.CellPhi()); 00037 double corPx=corEnergy*cos(corPhi)/cosh(corEta); 00038 double corPy=corEnergy*sin(corPhi)/cosh(corEta); 00039 double corPz=corEnergy*tanh(corEta); 00040 RecoEcalCandidate corCand(0, 00041 math::XYZTLorentzVector(corPx,corPy,corPz,corEnergy), 00042 math::XYZPoint(0,0,0)); 00043 00044 return corCand; 00045 }
void HFRecoEcalCandidateAlgo::produce | ( | const edm::Handle< reco::SuperClusterCollection > & | SuperClusters, | |
const reco::HFEMClusterShapeAssociationCollection & | AssocShapes, | |||
reco::RecoEcalCandidateCollection & | RecoECand | |||
) |
Analyze the hits.
Definition at line 47 of file HFRecoEcalCandidateAlgo.cc.
References correctEPosition(), funct::cos(), reco::HFEMClusterShape::e9e25(), reco::HFEMClusterShape::eCOREe9(), reco::CaloCluster::energy(), reco::HFEMClusterShape::eSeL(), reco::CaloCluster::eta(), edm::AssociationMap< Tag >::find(), i, m_correct, m_e9e25Cut, m_intercept2DCut, reco::CaloCluster::phi(), and funct::sin().
Referenced by HFRecoEcalCandidateProducer::produce().
00049 { 00050 00051 00052 00053 //get super's and cluster shapes and associations 00054 for (unsigned int i=0; i < SuperClusters->size(); ++i) { 00055 const SuperCluster& supClus=(*SuperClusters)[i]; 00056 reco::SuperClusterRef theClusRef=edm::Ref<SuperClusterCollection>(SuperClusters,i); 00057 const HFEMClusterShapeRef clusShapeRef=AssocShapes.find(theClusRef)->val; 00058 const HFEMClusterShape& clusShape=*clusShapeRef; 00059 00060 // basic candidate 00061 double px=supClus.energy()*cos(supClus.phi())/cosh(supClus.eta()); 00062 double py=supClus.energy()*sin(supClus.phi())/cosh(supClus.eta()); 00063 double pz=supClus.energy()*tanh(supClus.eta()); 00064 RecoEcalCandidate theCand(0, 00065 math::XYZTLorentzVector(px,py,pz,supClus.energy()), 00066 math::XYZPoint(0,0,0)); 00067 00068 // correct it? 00069 if (m_correct) 00070 theCand=correctEPosition(supClus,clusShape); 00071 00072 00073 // EMID cuts... 00074 if((clusShape.e9e25()> m_e9e25Cut)&&((clusShape.eCOREe9()-(clusShape.eSeL()*1.125)) > m_intercept2DCut)){ 00075 theCand.setSuperCluster(theClusRef); 00076 RecoECand.push_back(theCand); 00077 } 00078 } 00079 }
bool HFRecoEcalCandidateAlgo::m_correct [private] |
double HFRecoEcalCandidateAlgo::m_e9e25Cut [private] |
double HFRecoEcalCandidateAlgo::m_intercept2DCut [private] |