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.

Member Function Documentation

◆ convert()

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

Definition at line 17 of file SuperClusterToCandidate.h.

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  }

References 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.

PdtEntry::pdgId
int pdgId() const
PDG id.
Definition: PdtEntry.cc:5
reco::SuperCluster
Definition: SuperCluster.h:18
findQualityFiles.v
v
Definition: findQualityFiles.py:179
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
converter::MassiveCandidateConverter::MassiveCandidateConverter
MassiveCandidateConverter(const edm::ParameterSet &, edm::ConsumesCollector)
Definition: MassiveCandidateConverter.cc:12
reco::CaloCluster::position
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
unit
Basic3DVector unit() const
Definition: Basic3DVectorLD.h:162
looper.cfg
cfg
Definition: looper.py:296
converter::MassiveCandidateConverter::massSqr_
double massSqr_
Definition: MassiveCandidateConverter.h:20
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
converter::MassiveCandidateConverter::particle_
PdtEntry particle_
Definition: MassiveCandidateConverter.h:21