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

◆ 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)
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 16 of file SuperClusterToCandidate.h.

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);
25  c.setPdgId(particle_.pdgId());
26  }

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

PdtEntry::pdgId
int pdgId() const
PDG id.
Definition: PdtEntry.cc:7
reco::SuperCluster
Definition: SuperCluster.h:18
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
findQualityFiles.v
v
Definition: findQualityFiles.py:179
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
OrderedSet.t
t
Definition: OrderedSet.py:90
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
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:297
converter::MassiveCandidateConverter::MassiveCandidateConverter
MassiveCandidateConverter(const edm::ParameterSet &)
Definition: MassiveCandidateConverter.cc:10
converter::MassiveCandidateConverter::massSqr_
double massSqr_
Definition: MassiveCandidateConverter.h:17
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
converter::MassiveCandidateConverter::particle_
PdtEntry particle_
Definition: MassiveCandidateConverter.h:18