CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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.

15  :
17  }
MassiveCandidateConverter(const edm::ParameterSet &)

Member Function Documentation

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

Definition at line 18 of file SuperClusterToCandidate.h.

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

18  {
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  }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:124
virtual void setCharge(Charge q)
set electric charge
void setSuperCluster(const reco::SuperClusterRef &r)
set reference to superCluster
virtual void setP4(const LorentzVector &p4)
set 4-momentum
string unit
Definition: csvLumiCalc.py:46
T sqrt(T t)
Definition: SSEVec.h:48
double energy() const
cluster energy
Definition: CaloCluster.h:120
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
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:41
virtual void setPdgId(int pdgId)
int pdgId() const
PDG id.
Definition: PdtEntry.cc:7