CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HFRecoEcalCandidateAlgo Class Reference

#include <HFRecoEcalCandidateAlgo.h>

Public Member Functions

 HFRecoEcalCandidateAlgo (bool correct, double e9e25Cut, double intercept2DCut, const std::vector< double > &e1e9Cut, const std::vector< double > &eCOREe9Cut, const std::vector< double > &eSeLCut)
 
void produce (const edm::Handle< reco::SuperClusterCollection > &SuperClusters, const reco::HFEMClusterShapeAssociationCollection &AssocShapes, reco::RecoEcalCandidateCollection &RecoECand)
 

Private Member Functions

reco::RecoEcalCandidate correctEPosition (const reco::SuperCluster &original, const reco::HFEMClusterShape &shape)
 

Private Attributes

bool m_correct
 
double m_e1e9Cuthi
 
double m_e1e9Cutlo
 
double m_e9e25Cut
 
double m_eCOREe9Cuthi
 
double m_eCOREe9Cutlo
 
double m_eSeLCuthi
 
double m_eSeLCutlo
 
double m_intercept2DCut
 

Detailed Description

Author
K. Klapoetke – Minnesota

Definition at line 22 of file HFRecoEcalCandidateAlgo.h.

Constructor & Destructor Documentation

HFRecoEcalCandidateAlgo::HFRecoEcalCandidateAlgo ( bool  correct,
double  e9e25Cut,
double  intercept2DCut,
const std::vector< double > &  e1e9Cut,
const std::vector< double > &  eCOREe9Cut,
const std::vector< double > &  eSeLCut 
)

Definition at line 20 of file HFRecoEcalCandidateAlgo.cc.

23  :
24 
25  m_correct(correct),
26  m_e9e25Cut(e9e25Cut),
27  m_intercept2DCut(intercept2DCut),
28  m_e1e9Cuthi(e1e9Cut[1]),
29  m_eCOREe9Cuthi(eCOREe9Cut[1]),
30  m_eSeLCuthi(eSeLCut[1]),
31  m_e1e9Cutlo(e1e9Cut[0]),
32  m_eCOREe9Cutlo(eCOREe9Cut[0]),
33  m_eSeLCutlo(eSeLCut[0]){
34 
35 }

Member Function Documentation

RecoEcalCandidate HFRecoEcalCandidateAlgo::correctEPosition ( const reco::SuperCluster original,
const reco::HFEMClusterShape shape 
)
private

Definition at line 37 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().

37  {
38  double energyCorrect=0.7397;//.7515;
39  double etaCorrect=.00938422+0.00682824*sin(6.28318531*shape.CellEta());//.0144225-.00484597*sin(6.17851*shape.CellEta());//0.01139;
40  double phiAmpCorrect=0.00644091;//-0.006483;
41  double phiFreqCorrect=6.28318531;//6.45377;
42 
43  double corEnergy= original.energy()/energyCorrect;
44  double corEta=original.eta();
45  corEta+=(original.eta()>0)?(etaCorrect):(-etaCorrect);
46  double corPhi=original.phi()+phiAmpCorrect*sin(phiFreqCorrect*shape.CellPhi());
47  double corPx=corEnergy*cos(corPhi)/cosh(corEta);
48  double corPy=corEnergy*sin(corPhi)/cosh(corEta);
49  double corPz=corEnergy*tanh(corEta);
50  RecoEcalCandidate corCand(0,
51  math::XYZTLorentzVector(corPx,corPy,corPz,corEnergy),
52  math::XYZPoint(0,0,0));
53 
54  return corCand;
55 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double CellPhi() const
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:160
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double energy() const
cluster energy
Definition: CaloCluster.h:120
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:163
double CellEta() const
void HFRecoEcalCandidateAlgo::produce ( const edm::Handle< reco::SuperClusterCollection > &  SuperClusters,
const reco::HFEMClusterShapeAssociationCollection AssocShapes,
reco::RecoEcalCandidateCollection RecoECand 
)

Analyze the hits

Definition at line 57 of file HFRecoEcalCandidateAlgo.cc.

References correctEPosition(), funct::cos(), reco::HFEMClusterShape::eCOREe9(), reco::HFEMClusterShape::eLong1x1(), reco::HFEMClusterShape::eLong3x3(), reco::HFEMClusterShape::eLong5x5(), reco::CaloCluster::energy(), reco::HFEMClusterShape::eSeL(), reco::CaloCluster::eta(), edm::AssociationMap< Tag >::find(), i, m_correct, m_e1e9Cutlo, m_e9e25Cut, m_eCOREe9Cuthi, m_eCOREe9Cutlo, m_eSeLCuthi, m_eSeLCutlo, m_intercept2DCut, reco::CaloCluster::phi(), funct::sin(), and edm::helpers::KeyVal< K, V >::val.

Referenced by HFRecoEcalCandidateProducer::produce().

59  {
60 
61 
62 
63  //get super's and cluster shapes and associations
64  for (unsigned int i=0; i < SuperClusters->size(); ++i) {
65  const SuperCluster& supClus=(*SuperClusters)[i];
67  const HFEMClusterShapeRef clusShapeRef=AssocShapes.find(theClusRef)->val;
68  const HFEMClusterShape& clusShape=*clusShapeRef;
69 
70  // basic candidate
71  double px=supClus.energy()*cos(supClus.phi())/cosh(supClus.eta());
72  double py=supClus.energy()*sin(supClus.phi())/cosh(supClus.eta());
73  double pz=supClus.energy()*tanh(supClus.eta());
74  RecoEcalCandidate theCand(0,
75  math::XYZTLorentzVector(px,py,pz,supClus.energy()),
76  math::XYZPoint(0,0,0));
77 
78  // correct it?
79  if (m_correct)
80  theCand=correctEPosition(supClus,clusShape);
81 
82  double e9e25=clusShape.eLong3x3()/clusShape.eLong5x5();
83  double e1e9=clusShape.eLong1x1()/clusShape.eLong3x3();
84  // EMID cuts...
85  //if((clusShape.e9e25()> m_e9e25Cut)&&((clusShape.eCOREe9()-(clusShape.eSeL()*1.125)) > m_intercept2DCut)){
86  // if((e9e25> m_e9e25Cut)&&((clusShape.eCOREe9()-(clusShape.eSeL()*1.125)) > m_intercept2DCut)){
87  double var2d=(clusShape.eCOREe9()-(clusShape.eSeL()*1.125));
88 
89  bool isAcceptable=true;
90  isAcceptable=isAcceptable && (e9e25> m_e9e25Cut);
91  isAcceptable=isAcceptable && (var2d > m_intercept2DCut);
92  isAcceptable=isAcceptable && ((e1e9< m_e1e9Cuthi)&&(e1e9> m_e1e9Cutlo));
93  isAcceptable=isAcceptable && ((clusShape.eCOREe9()< m_eCOREe9Cuthi)&&(clusShape.eCOREe9()> m_eCOREe9Cutlo));
94  isAcceptable=isAcceptable && ((clusShape.eSeL()<m_eSeLCuthi)&&(clusShape.eSeL()> m_eSeLCutlo));
95 
96 
97  if(isAcceptable){
98 
99  theCand.setSuperCluster(theClusRef);
100  RecoECand.push_back(theCand);
101  }
102  }
103 }
reco::RecoEcalCandidate correctEPosition(const reco::SuperCluster &original, const reco::HFEMClusterShape &shape)
int i
Definition: DBlmapReader.cc:9
double eLong5x5() const
double eLong1x1() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
const_iterator find(const key_type &k) const
find element with specified reference key
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:160
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
double eLong3x3() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double energy() const
cluster energy
Definition: CaloCluster.h:120
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:163

Member Data Documentation

bool HFRecoEcalCandidateAlgo::m_correct
private

Definition at line 39 of file HFRecoEcalCandidateAlgo.h.

Referenced by produce().

double HFRecoEcalCandidateAlgo::m_e1e9Cuthi
private

Definition at line 42 of file HFRecoEcalCandidateAlgo.h.

double HFRecoEcalCandidateAlgo::m_e1e9Cutlo
private

Definition at line 45 of file HFRecoEcalCandidateAlgo.h.

Referenced by produce().

double HFRecoEcalCandidateAlgo::m_e9e25Cut
private

Definition at line 40 of file HFRecoEcalCandidateAlgo.h.

Referenced by produce().

double HFRecoEcalCandidateAlgo::m_eCOREe9Cuthi
private

Definition at line 43 of file HFRecoEcalCandidateAlgo.h.

Referenced by produce().

double HFRecoEcalCandidateAlgo::m_eCOREe9Cutlo
private

Definition at line 46 of file HFRecoEcalCandidateAlgo.h.

Referenced by produce().

double HFRecoEcalCandidateAlgo::m_eSeLCuthi
private

Definition at line 44 of file HFRecoEcalCandidateAlgo.h.

Referenced by produce().

double HFRecoEcalCandidateAlgo::m_eSeLCutlo
private

Definition at line 47 of file HFRecoEcalCandidateAlgo.h.

Referenced by produce().

double HFRecoEcalCandidateAlgo::m_intercept2DCut
private

Definition at line 41 of file HFRecoEcalCandidateAlgo.h.

Referenced by produce().