CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
converter::SuperClusterToCandidate Struct Reference

#include <SuperClusterToCandidate.h>

Inheritance diagram for converter::SuperClusterToCandidate:
converter::MassiveCandidateConverter

Public Types

typedef reco::RecoEcalCandidate Candidate
 
typedef reco::SuperClusterCollection Components
 
typedef reco::SuperCluster value_type
 

Public Member Functions

void convert (reco::SuperClusterRef scRef, reco::RecoEcalCandidate &c) const
 
 SuperClusterToCandidate (const edm::ParameterSet &cfg)
 
- Public Member Functions inherited from converter::MassiveCandidateConverter
void beginFirstRun (const edm::EventSetup &)
 
 MassiveCandidateConverter (const edm::ParameterSet &)
 

Additional Inherited Members

- Protected Attributes inherited from converter::MassiveCandidateConverter
double massSqr_
 
PdtEntry particle_
 

Detailed Description

Definition at line 11 of file SuperClusterToCandidate.h.

Member Typedef Documentation

Definition at line 14 of file SuperClusterToCandidate.h.

Definition at line 13 of file SuperClusterToCandidate.h.

Definition at line 12 of file SuperClusterToCandidate.h.

Constructor & Destructor Documentation

converter::SuperClusterToCandidate::SuperClusterToCandidate ( const edm::ParameterSet cfg)
inline

Definition at line 15 of file SuperClusterToCandidate.h.

MassiveCandidateConverter(const edm::ParameterSet &)

Member Function Documentation

void converter::SuperClusterToCandidate::convert ( reco::SuperClusterRef  scRef,
reco::RecoEcalCandidate c 
) const
inline

Definition at line 16 of file SuperClusterToCandidate.h.

References reco::CaloCluster::energy(), converter::MassiveCandidateConverter::massSqr_, AlCaHLTBitMon_ParallelJobs::p, converter::MassiveCandidateConverter::particle_, PdtEntry::pdgId(), reco::CaloCluster::position(), SimDataFormats::CaloAnalysis::sc, reco::LeafCandidate::setCharge(), reco::LeafCandidate::setP4(), reco::LeafCandidate::setPdgId(), reco::RecoEcalCandidate::setSuperCluster(), reco::LeafCandidate::setVertex(), mathSSE::sqrt(), OrderedSet::t, unit(), and findQualityFiles::v.

16  {
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  }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:153
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
T sqrt(T t)
Definition: SSEVec.h:19
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
void setPdgId(int pdgId) final
void setP4(const LorentzVector &p4) final
set 4-momentum
int pdgId() const
PDG id.
Definition: PdtEntry.cc:7
Basic3DVector unit() const