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  }
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:126
Definition: helper.py:1
virtual void setPdgId(int pdgId) final
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
T sqrt(T t)
Definition: SSEVec.h:18
reco::SuperClusterCollection Components
virtual void setCharge(Charge q) final
set electric charge
Definition: LeafCandidate.h:93
double energy() const
cluster energy
Definition: CaloCluster.h:121
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
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
fixed size matrix
SuperClusterToCandidate(const edm::ParameterSet &cfg)
int pdgId() const
PDG id.
Definition: PdtEntry.cc:7