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, edm::ConsumesCollector iC)
 
- Public Member Functions inherited from converter::MassiveCandidateConverter
void beginFirstRun (const edm::EventSetup &)
 
 MassiveCandidateConverter (const edm::ParameterSet &, edm::ConsumesCollector)
 

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

◆ Candidate

Definition at line 14 of file SuperClusterToCandidate.h.

◆ Components

Definition at line 13 of file SuperClusterToCandidate.h.

◆ value_type

Definition at line 12 of file SuperClusterToCandidate.h.

Constructor & Destructor Documentation

◆ SuperClusterToCandidate()

converter::SuperClusterToCandidate::SuperClusterToCandidate ( const edm::ParameterSet cfg,
edm::ConsumesCollector  iC 
)
inline

Definition at line 15 of file SuperClusterToCandidate.h.

MassiveCandidateConverter(const edm::ParameterSet &, edm::ConsumesCollector)

Member Function Documentation

◆ convert()

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

Definition at line 17 of file SuperClusterToCandidate.h.

References HltBtagPostValidation_cff::c, reco::CaloCluster::energy(), converter::MassiveCandidateConverter::massSqr_, AlCaHLTBitMon_ParallelJobs::p, converter::MassiveCandidateConverter::particle_, PdtEntry::pdgId(), reco::CaloCluster::position(), mathSSE::sqrt(), submitPVValidationJobs::t, unit(), and findQualityFiles::v.

17  {
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  }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
T sqrt(T t)
Definition: SSEVec.h:19
Basic3DVector unit() const
double energy() const
cluster energy
Definition: CaloCluster.h:149
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
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36