13 #include "CLHEP/Vector/LorentzVector.h"
21 const std::vector<double>& e1e9Cut,
22 const std::vector<double>& eCOREe9Cut,
23 const std::vector<double>& eSeLCut) :
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]){
38 double energyCorrect=0.7397;
39 double etaCorrect=.00938422+0.00682824*
sin(6.28318531*shape.
CellEta());
40 double phiAmpCorrect=0.00644091;
41 double phiFreqCorrect=6.28318531;
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);
64 for (
unsigned int i=0;
i < SuperClusters->size(); ++
i) {
73 double pz=supClus.
energy()*tanh(supClus.
eta());
87 double var2d=(clusShape.
eCOREe9()-(clusShape.
eSeL()*1.125));
89 bool isAcceptable=
true;
90 isAcceptable=isAcceptable && (e9e25>
m_e9e25Cut);
92 isAcceptable=isAcceptable && ((e1e9< m_e1e9Cuthi)&&(e1e9>
m_e1e9Cutlo));
99 theCand.setSuperCluster(theClusRef);
100 RecoECand.push_back(theCand);
reco::RecoEcalCandidate correctEPosition(const reco::SuperCluster &original, const reco::HFEMClusterShape &shape)
Sin< T >::type sin(const T &t)
const_iterator find(const key_type &k) const
find element with specified reference key
double eta() const
pseudorapidity of cluster centroid
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Cos< T >::type cos(const T &t)
double energy() const
cluster energy
HFRecoEcalCandidateAlgo(bool correct, double e9e25Cut, double intercept2DCut, const std::vector< double > &e1e9Cut, const std::vector< double > &eCOREe9Cut, const std::vector< double > &eSeLCut)
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< RecoEcalCandidate > RecoEcalCandidateCollection
collectin of RecoEcalCandidate objects
double phi() const
azimuthal angle of cluster centroid
void produce(const edm::Handle< reco::SuperClusterCollection > &SuperClusters, const reco::HFEMClusterShapeAssociationCollection &AssocShapes, reco::RecoEcalCandidateCollection &RecoECand)