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 {
18  const reco::SuperCluster& sc = *scRef;
19  math::XYZPoint v(0, 0, 0); // this should be taken from something else...
20  math::XYZVector p = sc.energy() * (sc.position() - v).unit();
21  double t = sqrt(massSqr_ + p.mag2());
22  c.setCharge(0);
23  c.setVertex(v);
24  c.setP4(reco::Candidate::LorentzVector(p.x(), p.y(), p.z(), t));
25  c.setSuperCluster(scRef);
26  c.setPdgId(particle_.pdgId());
27  }
28  };
29 
30  namespace helper {
31  template <>
32  struct CandConverter<reco::SuperCluster> {
34  };
35  } // namespace helper
36 } // namespace converter
37 
38 #endif
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:153
Definition: helper.py:1
void convert(reco::SuperClusterRef scRef, reco::RecoEcalCandidate &c) const
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
T sqrt(T t)
Definition: SSEVec.h:19
reco::SuperClusterCollection Components
Basic3DVector unit() const
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
int pdgId() const
PDG id.
Definition: PdtEntry.cc:5
SuperClusterToCandidate(const edm::ParameterSet &cfg, edm::ConsumesCollector iC)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
fixed size matrix