CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SuperClusterToCandidate.h
Go to the documentation of this file.
1 #ifndef RecoAlgos_SuperClusterToCandidate_h
2 #define RecoAlgos_SuperClusterToCandidate_h
9 
10 namespace converter {
17  }
19  const reco::SuperCluster & sc = * scRef;
20  math::XYZPoint v(0, 0, 0); // this should be taken from something else...
21  math::XYZVector p = sc.energy() * (sc.position() - v).unit();
22  double t = sqrt(massSqr_ + p.mag2());
23  c.setCharge(0);
24  c.setVertex(v);
25  c.setP4(reco::Candidate::LorentzVector(p.x(), p.y(), p.z(), t));
26  c.setSuperCluster(scRef);
28  }
29  };
30 
31  namespace helper {
32  template<>
33  struct CandConverter<reco::SuperCluster> {
35  };
36  }
37 }
38 
39 #endif
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:124
virtual void setCharge(Charge q) GCC11_FINAL
set electric charge
void setSuperCluster(const reco::SuperClusterRef &r)
set reference to superCluster
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
void convert(reco::SuperClusterRef scRef, reco::RecoEcalCandidate &c) const
string unit
Definition: csvLumiCalc.py:46
T sqrt(T t)
Definition: SSEVec.h:48
reco::SuperClusterCollection Components
double energy() const
cluster energy
Definition: CaloCluster.h:120
virtual void setVertex(const Point &vertex)
set vertex
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:41
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
virtual void setPdgId(int pdgId) GCC11_FINAL
SuperClusterToCandidate(const edm::ParameterSet &cfg)
int pdgId() const
PDG id.
Definition: PdtEntry.cc:7