CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
SeedFromProtoTrack Class Reference

#include <SeedFromProtoTrack.h>

Classes

struct  Config
 

Public Member Functions

bool isValid () const
 
 SeedFromProtoTrack (const Config &, const reco::Track &proto, const edm::EventSetup &)
 
 SeedFromProtoTrack (const Config &, const reco::Track &proto, const SeedingHitSet &hits, const edm::EventSetup &es)
 
TrajectorySeed trajectorySeed () const
 
 ~SeedFromProtoTrack ()
 

Private Types

typedef edm::OwnVector
< TrackingRecHit
RecHitContainer
 

Private Member Functions

PropagationDirection direction () const
 
const RecHitContainerhits () const
 
void init (const Config &, const reco::Track &proto, const edm::EventSetup &es)
 
PTrajectoryStateOnDet const & trajectoryState () const
 

Private Attributes

RecHitContainer theHits
 
PTrajectoryStateOnDet thePTraj
 
bool theValid
 

Detailed Description

Definition at line 25 of file SeedFromProtoTrack.h.

Member Typedef Documentation

Definition at line 51 of file SeedFromProtoTrack.h.

Constructor & Destructor Documentation

SeedFromProtoTrack::SeedFromProtoTrack ( const Config config,
const reco::Track proto,
const edm::EventSetup es 
)

Definition at line 39 of file SeedFromProtoTrack.cc.

References TrackingRecHit::clone(), init(), nHits, edm::OwnVector< T, P >::push_back(), reco::Track::recHit(), reco::Track::recHitsSize(), and theHits.

40  : theValid(true) {
41  const TrackingRecHit* hit = nullptr;
42  for (unsigned int iHit = 0, nHits = proto.recHitsSize(); iHit < nHits; ++iHit) {
43  TrackingRecHitRef refHit = proto.recHit(iHit);
44  hit = &(*refHit);
45  theHits.push_back(hit->clone());
46  }
47  init(config, proto, es);
48 }
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
Definition: Track.h:97
void push_back(D *&d)
Definition: OwnVector.h:326
RecHitContainer theHits
virtual TrackingRecHit * clone() const =0
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t nHits
tuple config
parse the configuration file
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
Definition: Track.h:94
void init(const Config &, const reco::Track &proto, const edm::EventSetup &es)
SeedFromProtoTrack::SeedFromProtoTrack ( const Config config,
const reco::Track proto,
const SeedingHitSet hits,
const edm::EventSetup es 
)

Definition at line 27 of file SeedFromProtoTrack.cc.

References TrackingRecHit::clone(), mps_fire::i, init(), dqmiodumpmetadata::n, edm::OwnVector< T, P >::push_back(), SeedingHitSet::size(), and theHits.

31  : theValid(true) {
32  for (unsigned int i = 0, n = hits.size(); i < n; ++i) {
33  const TrackingRecHit* trh = hits[i]->hit();
34  theHits.push_back(trh->clone());
35  }
36  init(config, proto, es);
37 }
void push_back(D *&d)
Definition: OwnVector.h:326
RecHitContainer theHits
virtual TrackingRecHit * clone() const =0
tuple config
parse the configuration file
unsigned int size() const
Definition: SeedingHitSet.h:41
void init(const Config &, const reco::Track &proto, const edm::EventSetup &es)
SeedFromProtoTrack::~SeedFromProtoTrack ( )
inline

Definition at line 38 of file SeedFromProtoTrack.h.

38 {}

Member Function Documentation

PropagationDirection SeedFromProtoTrack::direction ( ) const
inlineprivate

Definition at line 47 of file SeedFromProtoTrack.h.

References alongMomentum.

Referenced by trajectorySeed().

const RecHitContainer& SeedFromProtoTrack::hits ( void  ) const
inlineprivate

Definition at line 52 of file SeedFromProtoTrack.h.

References theHits.

Referenced by trajectorySeed().

52 { return theHits; }
RecHitContainer theHits
void SeedFromProtoTrack::init ( const Config config,
const reco::Track proto,
const edm::EventSetup es 
)
private

Definition at line 50 of file SeedFromProtoTrack.cc.

References edm::OwnVector< T, P >::back(), reco::TrackBase::charge(), reco::TrackBase::covariance(), TauDecayModes::dec, submitPVValidationJobs::err, SeedFromProtoTrack::Config::fieldToken_, TrackingRecHit::geographicalId(), edm::EventSetup::getData(), TrackerGeometry::idToDet(), TrajectoryStateOnSurface::isValid(), reco::TrackBase::momentum(), trajectoryStateTransform::persistentState(), GloballyPositioned< T >::position(), Propagator::propagate(), HLT_FULL_cff::propagator, SeedFromProtoTrack::Config::propagatorToken_, DetId::rawId(), reco::TrackBase::referencePoint(), theHits, thePTraj, theValid, and SeedFromProtoTrack::Config::trackerToken_.

Referenced by SeedFromProtoTrack().

50  {
51  TrackerGeometry const& tracker = es.getData(config.trackerToken_);
52 
53  const Propagator* propagator = &es.getData(config.propagatorToken_);
54 
55  const MagneticField* field = &es.getData(config.fieldToken_);
56 
57  const reco::TrackBase::Point& vtx = proto.referencePoint();
58  const reco::TrackBase::Vector& mom = proto.momentum();
60  GlobalPoint(vtx.x(), vtx.y(), vtx.z()), GlobalVector(mom.x(), mom.y(), mom.z()), proto.charge(), field);
61 
63 
64  FreeTrajectoryState fts(gtp, err);
65 
66  const TrackingRecHit& lastHit = theHits.back();
67 
68  TrajectoryStateOnSurface outerState =
69  propagator->propagate(fts, tracker.idToDet(lastHit.geographicalId())->surface());
70 
71  if (!outerState.isValid()) {
72  const Surface& surface = tracker.idToDet(lastHit.geographicalId())->surface();
73  edm::LogError("SeedFromProtoTrack") << " was trying to create a seed from:\n"
74  << fts << "\n propagating to: " << std::hex << lastHit.geographicalId().rawId()
75  << std::dec << ' ' << surface.position();
76  theValid = false;
77  return;
78  }
79  theValid = true;
80 
82 }
tuple propagator
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:667
reference back()
Definition: OwnVector.h:431
PTrajectoryStateOnDet thePTraj
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
Log< level::Error, false > LogError
bool getData(T &iHolder) const
Definition: EventSetup.h:128
RecHitContainer theHits
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:716
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
const TrackerGeomDet * idToDet(DetId) const override
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
tuple config
parse the configuration file
int charge() const
track electric charge
Definition: TrackBase.h:596
DetId geographicalId() const
const PositionType & position() const
math::XYZVector Vector
spatial vector
Definition: TrackBase.h:77
Global3DVector GlobalVector
Definition: GlobalVector.h:10
bool SeedFromProtoTrack::isValid ( void  ) const
inline
TrajectorySeed SeedFromProtoTrack::trajectorySeed ( ) const

Definition at line 84 of file SeedFromProtoTrack.cc.

References direction(), hits(), and trajectoryState().

Referenced by SeedGeneratorFromProtoTracksEDProducer::produce(), and TSGFromL1Muon::produce().

84  {
86 }
PTrajectoryStateOnDet const & trajectoryState() const
const RecHitContainer & hits() const
PropagationDirection direction() const
PTrajectoryStateOnDet const& SeedFromProtoTrack::trajectoryState ( ) const
inlineprivate

Definition at line 49 of file SeedFromProtoTrack.h.

References thePTraj.

Referenced by trajectorySeed().

49 { return thePTraj; }
PTrajectoryStateOnDet thePTraj

Member Data Documentation

RecHitContainer SeedFromProtoTrack::theHits
private

Definition at line 56 of file SeedFromProtoTrack.h.

Referenced by hits(), init(), and SeedFromProtoTrack().

PTrajectoryStateOnDet SeedFromProtoTrack::thePTraj
private

Definition at line 57 of file SeedFromProtoTrack.h.

Referenced by init(), and trajectoryState().

bool SeedFromProtoTrack::theValid
private

Definition at line 55 of file SeedFromProtoTrack.h.

Referenced by init(), and isValid().