![]() |
![]() |
#include <ParametersDefinerForTP.h>
Definition at line 17 of file ParametersDefinerForTP.h.
typedef int ParametersDefinerForTP::Charge |
electric charge type
Definition at line 21 of file ParametersDefinerForTP.h.
Lorentz vector.
Definition at line 25 of file ParametersDefinerForTP.h.
point in the space
Definition at line 24 of file ParametersDefinerForTP.h.
ParametersDefinerForTP::ParametersDefinerForTP | ( | ) | [inline] |
Definition at line 20 of file ParametersDefinerForTP.h.
{};
virtual ParametersDefinerForTP::~ParametersDefinerForTP | ( | ) | [inline, virtual] |
Definition at line 21 of file ParametersDefinerForTP.h.
{};
virtual void ParametersDefinerForTP::initEvent | ( | edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > | simHitsTPAssocToSet | ) | const [inline, virtual] |
Reimplemented in CosmicParametersDefinerForTP.
Definition at line 49 of file ParametersDefinerForTP.h.
{ }
virtual TrackingParticle::Vector ParametersDefinerForTP::momentum | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
const reco::Candidate & | tp | ||
) | const [inline, virtual] |
Definition at line 34 of file ParametersDefinerForTP.h.
References reco::Candidate::charge(), momentum(), reco::Candidate::p4(), and reco::Candidate::vertex().
virtual TrackingParticle::Vector ParametersDefinerForTP::momentum | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
const TrackingParticleRef | tpr | ||
) | const [inline, virtual] |
Reimplemented in CosmicParametersDefinerForTP.
Definition at line 30 of file ParametersDefinerForTP.h.
References momentum().
{ return momentum(iEvent, iSetup, tpr->charge(),tpr->vertex(),tpr->p4()); }
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 15 of file ParametersDefinerForTP.cc.
References edm::EventSetup::get(), edm::Event::getByLabel(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by momentum().
{ // to add a new implementation for cosmic. For the moment, it is just as for the base class: using namespace edm; edm::ESHandle<MagneticField> theMF; iSetup.get<IdealMagneticFieldRecord>().get(theMF); edm::Handle<reco::BeamSpot> bs; iEvent.getByLabel(InputTag("offlineBeamSpot"),bs); TrackingParticle::Vector momentum(0, 0, 0); FreeTrajectoryState ftsAtProduction(GlobalPoint(vtx.x(),vtx.y(),vtx.z()), GlobalVector(lv.x(),lv.y(),lv.z()), TrackCharge(charge), theMF.product()); TSCBLBuilderNoMaterial tscblBuilder; TrajectoryStateClosestToBeamLine tsAtClosestApproach = tscblBuilder(ftsAtProduction,*bs);//as in TrackProducerAlgorithm if(tsAtClosestApproach.isValid()){ GlobalVector p = tsAtClosestApproach.trackStateAtPCA().momentum(); momentum = TrackingParticle::Vector(p.x(), p.y(), p.z()); } return momentum; }
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 43 of file ParametersDefinerForTP.cc.
References edm::EventSetup::get(), edm::Event::getByLabel(), findQualityFiles::v, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by vertex().
{ // to add a new implementation for cosmic. For the moment, it is just as for the base class: using namespace edm; edm::ESHandle<MagneticField> theMF; iSetup.get<IdealMagneticFieldRecord>().get(theMF); edm::Handle<reco::BeamSpot> bs; iEvent.getByLabel(InputTag("offlineBeamSpot"),bs); TrackingParticle::Point vertex(0, 0, 0); FreeTrajectoryState ftsAtProduction(GlobalPoint(vtx.x(),vtx.y(),vtx.z()), GlobalVector(lv.x(),lv.y(),lv.z()), TrackCharge(charge), theMF.product()); TSCBLBuilderNoMaterial tscblBuilder; TrajectoryStateClosestToBeamLine tsAtClosestApproach = tscblBuilder(ftsAtProduction,*bs);//as in TrackProducerAlgorithm if(tsAtClosestApproach.isValid()){ GlobalPoint v = tsAtClosestApproach.trackStateAtPCA().position(); vertex = TrackingParticle::Point(v.x()-bs->x0(),v.y()-bs->y0(),v.z()-bs->z0()); } return vertex; }
virtual TrackingParticle::Point ParametersDefinerForTP::vertex | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
const TrackingParticleRef & | tpr | ||
) | const [inline, virtual] |
Definition at line 41 of file ParametersDefinerForTP.h.
References vertex().
{ return vertex(iEvent, iSetup, tpr->charge(),tpr->vertex(),tpr->p4()); }
virtual TrackingParticle::Point ParametersDefinerForTP::vertex | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
const reco::Candidate & | tp | ||
) | const [inline, virtual] |
Definition at line 45 of file ParametersDefinerForTP.h.
References reco::Candidate::charge(), reco::Candidate::p4(), vertex(), and reco::Candidate::vertex().