CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
ParametersDefinerForTP Class Reference

#include <ParametersDefinerForTP.h>

Inheritance diagram for ParametersDefinerForTP:
CosmicParametersDefinerForTP

Public Types

typedef int Charge
 electric charge type More...
 
typedef math::XYZTLorentzVectorD LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPointD Point
 point in the space More...
 

Public Member Functions

virtual std::unique_ptr< ParametersDefinerForTPclone () const
 
virtual void initEvent (edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitsTPAssocToSet)
 
virtual TrackingParticle::Vector momentum (const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
 
virtual TrackingParticle::Vector momentum (const edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::Candidate &tp) const
 
virtual TrackingParticle::Vector momentum (const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrackingParticleRef &tpr) const
 
 ParametersDefinerForTP ()
 
 ParametersDefinerForTP (const edm::ParameterSet &iConfig)
 
virtual TrackingParticle::Point vertex (const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
 
virtual TrackingParticle::Point vertex (const edm::Event &iEvent, const edm::EventSetup &iSetup, const reco::Candidate &tp) const
 
virtual TrackingParticle::Point vertex (const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrackingParticleRef &tpr) const
 
virtual ~ParametersDefinerForTP ()
 

Public Attributes

edm::InputTag beamSpotInputTag_
 

Detailed Description

Author
Boris Mangano (UCSD) 5/7/2009

Definition at line 19 of file ParametersDefinerForTP.h.

Member Typedef Documentation

◆ Charge

electric charge type

Definition at line 23 of file ParametersDefinerForTP.h.

◆ LorentzVector

Lorentz vector.

Definition at line 27 of file ParametersDefinerForTP.h.

◆ Point

point in the space

Definition at line 26 of file ParametersDefinerForTP.h.

Constructor & Destructor Documentation

◆ ParametersDefinerForTP() [1/2]

ParametersDefinerForTP::ParametersDefinerForTP ( )
inline

Definition at line 21 of file ParametersDefinerForTP.h.

21 {};

Referenced by clone().

◆ ParametersDefinerForTP() [2/2]

ParametersDefinerForTP::ParametersDefinerForTP ( const edm::ParameterSet iConfig)

Definition at line 14 of file ParametersDefinerForTP.cc.

15  : beamSpotInputTag_(iConfig.getUntrackedParameter<edm::InputTag>("beamSpot", edm::InputTag("offlineBeamSpot"))) {}

◆ ~ParametersDefinerForTP()

virtual ParametersDefinerForTP::~ParametersDefinerForTP ( )
inlinevirtual

Definition at line 23 of file ParametersDefinerForTP.h.

23 {};

Member Function Documentation

◆ clone()

virtual std::unique_ptr<ParametersDefinerForTP> ParametersDefinerForTP::clone ( void  ) const
inlinevirtual

Reimplemented in CosmicParametersDefinerForTP.

Definition at line 67 of file ParametersDefinerForTP.h.

67  {
68  return std::unique_ptr<ParametersDefinerForTP>(new ParametersDefinerForTP(*this));
69  }

References ParametersDefinerForTP().

Referenced by MultiTrackValidator::dqmAnalyze().

◆ initEvent()

virtual void ParametersDefinerForTP::initEvent ( edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList simHitsTPAssocToSet)
inlinevirtual

Reimplemented in CosmicParametersDefinerForTP.

Definition at line 65 of file ParametersDefinerForTP.h.

65 {}

◆ momentum() [1/3]

TrackingParticle::Vector ParametersDefinerForTP::momentum ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const Charge  ch,
const Point vtx,
const LorentzVector lv 
) const
virtual

Reimplemented in CosmicParametersDefinerForTP.

Definition at line 17 of file ParametersDefinerForTP.cc.

21  {
22  // to add a new implementation for cosmic. For the moment, it is just as for
23  // the base class:
24 
25  using namespace edm;
26 
28  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
29 
31  iEvent.getByLabel(beamSpotInputTag_, bs);
32 
34 
35  FreeTrajectoryState ftsAtProduction(GlobalPoint(vtx.x(), vtx.y(), vtx.z()),
36  GlobalVector(lv.x(), lv.y(), lv.z()),
38  theMF.product());
39 
40  TSCBLBuilderNoMaterial tscblBuilder;
41  TrajectoryStateClosestToBeamLine tsAtClosestApproach =
42  tscblBuilder(ftsAtProduction, *bs); // as in TrackProducerAlgorithm
43  if (tsAtClosestApproach.isValid()) {
44  GlobalVector p = tsAtClosestApproach.trackStateAtPCA().momentum();
45  momentum = TrackingParticle::Vector(p.x(), p.y(), p.z());
46  }
47  return momentum;
48 }

References beamSpotInputTag_, cms::cuda::bs, ALCARECOTkAlJpsiMuMu_cff::charge, edm::EventSetup::get(), get, iEvent, TrajectoryStateClosestToBeamLine::isValid(), FreeTrajectoryState::momentum(), AlCaHLTBitMon_ParallelJobs::p, edm::ESHandle< T >::product(), TrajectoryStateClosestToBeamLine::trackStateAtPCA(), and extraflags_cff::vtx.

Referenced by MuonTrackValidator::analyze(), MultiTrackValidatorGenPs::dqmAnalyze(), momentum(), and MultiTrackValidator::tpParametersAndSelection().

◆ momentum() [2/3]

virtual TrackingParticle::Vector ParametersDefinerForTP::momentum ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const reco::Candidate tp 
) const
inlinevirtual

Definition at line 41 of file ParametersDefinerForTP.h.

43  {
44  return momentum(iEvent, iSetup, tp.charge(), tp.vertex(), tp.p4());
45  }

References iEvent, momentum(), and cmsswSequenceInfo::tp.

◆ momentum() [3/3]

virtual TrackingParticle::Vector ParametersDefinerForTP::momentum ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const TrackingParticleRef tpr 
) const
inlinevirtual

Reimplemented in CosmicParametersDefinerForTP.

Definition at line 35 of file ParametersDefinerForTP.h.

37  {
38  return momentum(iEvent, iSetup, tpr->charge(), tpr->vertex(), tpr->p4());
39  }

References iEvent, and momentum().

◆ vertex() [1/3]

TrackingParticle::Point ParametersDefinerForTP::vertex ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const Charge  ch,
const Point vtx,
const LorentzVector lv 
) const
virtual

Reimplemented in CosmicParametersDefinerForTP.

Definition at line 50 of file ParametersDefinerForTP.cc.

54  {
55  // to add a new implementation for cosmic. For the moment, it is just as for
56  // the base class:
57  using namespace edm;
58 
60  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
61 
63  iEvent.getByLabel(beamSpotInputTag_, bs);
64 
66 
67  FreeTrajectoryState ftsAtProduction(GlobalPoint(vtx.x(), vtx.y(), vtx.z()),
68  GlobalVector(lv.x(), lv.y(), lv.z()),
70  theMF.product());
71 
72  TSCBLBuilderNoMaterial tscblBuilder;
73  TrajectoryStateClosestToBeamLine tsAtClosestApproach =
74  tscblBuilder(ftsAtProduction, *bs); // as in TrackProducerAlgorithm
75  if (tsAtClosestApproach.isValid()) {
76  GlobalPoint v = tsAtClosestApproach.trackStateAtPCA().position();
77  vertex = TrackingParticle::Point(v.x(), v.y(), v.z());
78  } else {
79  // to preserve old behaviour
80  // would be better to flag this somehow to allow ignoring in downstream
81  vertex = TrackingParticle::Point(bs->x0(), bs->y0(), bs->z0());
82  }
83  return vertex;
84 }

References beamSpotInputTag_, cms::cuda::bs, ALCARECOTkAlJpsiMuMu_cff::charge, edm::EventSetup::get(), get, iEvent, TrajectoryStateClosestToBeamLine::isValid(), FreeTrajectoryState::position(), edm::ESHandle< T >::product(), TrajectoryStateClosestToBeamLine::trackStateAtPCA(), findQualityFiles::v, and extraflags_cff::vtx.

Referenced by MuonTrackValidator::analyze(), MultiTrackValidatorGenPs::dqmAnalyze(), Tau.Tau::dxy(), MultiTrackValidator::tpParametersAndSelection(), and vertex().

◆ vertex() [2/3]

virtual TrackingParticle::Point ParametersDefinerForTP::vertex ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const reco::Candidate tp 
) const
inlinevirtual

Definition at line 59 of file ParametersDefinerForTP.h.

61  {
62  return vertex(iEvent, iSetup, tp.charge(), tp.vertex(), tp.p4());
63  }

References iEvent, cmsswSequenceInfo::tp, and vertex().

Referenced by Tau.Tau::dxy().

◆ vertex() [3/3]

virtual TrackingParticle::Point ParametersDefinerForTP::vertex ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const TrackingParticleRef tpr 
) const
inlinevirtual

Reimplemented in CosmicParametersDefinerForTP.

Definition at line 53 of file ParametersDefinerForTP.h.

55  {
56  return vertex(iEvent, iSetup, tpr->charge(), tpr->vertex(), tpr->p4());
57  }

References iEvent, and vertex().

Referenced by Tau.Tau::dxy().

Member Data Documentation

◆ beamSpotInputTag_

edm::InputTag ParametersDefinerForTP::beamSpotInputTag_

Definition at line 71 of file ParametersDefinerForTP.h.

Referenced by momentum(), and vertex().

Vector3DBase
Definition: Vector3DBase.h:8
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
TrajectoryStateClosestToBeamLine
Definition: TrajectoryStateClosestToBeamLine.h:15
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
ParametersDefinerForTP::beamSpotInputTag_
edm::InputTag beamSpotInputTag_
Definition: ParametersDefinerForTP.h:71
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
TrackingParticle::Vector
math::XYZVectorD Vector
point in the space
Definition: TrackingParticle.h:37
ParametersDefinerForTP::momentum
virtual TrackingParticle::Vector momentum(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
Definition: ParametersDefinerForTP.cc:17
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
findQualityFiles.v
v
Definition: findQualityFiles.py:179
edm::Handle< reco::BeamSpot >
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
cms::cuda::bs
bs
Definition: HistoContainer.h:127
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
edm::ESHandle< MagneticField >
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
iEvent
int iEvent
Definition: GenABIO.cc:224
get
#define get
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
TSCBLBuilderNoMaterial
Definition: TSCBLBuilderNoMaterial.h:13
ParametersDefinerForTP::ParametersDefinerForTP
ParametersDefinerForTP()
Definition: ParametersDefinerForTP.h:21
TrajectoryStateClosestToBeamLine::isValid
bool isValid() const
Definition: TrajectoryStateClosestToBeamLine.h:50
TrajectoryStateClosestToBeamLine::trackStateAtPCA
FTS const & trackStateAtPCA() const
Definition: TrajectoryStateClosestToBeamLine.h:32
TrackingParticle::Point
math::XYZPointD Point
point in the space
Definition: TrackingParticle.h:36
edm::InputTag
Definition: InputTag.h:15
ParametersDefinerForTP::vertex
virtual TrackingParticle::Point vertex(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
Definition: ParametersDefinerForTP.cc:50