CMS 3D CMS Logo

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