CMS 3D CMS Logo

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

#include <TransientTrackBuilder.h>

Public Member Functions

reco::TransientTrack build (const reco::Track *p) const
 
reco::TransientTrack build (const reco::Track &p) const
 
reco::TransientTrack build (const reco::GsfTrack *p) const
 
reco::TransientTrack build (const reco::GsfTrack &p) const
 
reco::TransientTrack build (const reco::TrackRef *p) const
 
reco::TransientTrack build (const reco::TrackRef &p) const
 
reco::TransientTrack build (const reco::GsfTrackRef *p) const
 
reco::TransientTrack build (const reco::GsfTrackRef &p) const
 
reco::TransientTrack build (const reco::CandidatePtr *p) const
 
reco::TransientTrack build (const reco::CandidatePtr &p) const
 
std::vector< reco::TransientTrackbuild (const edm::Handle< reco::TrackCollection > &trkColl) const
 
std::vector< reco::TransientTrackbuild (const edm::Handle< reco::GsfTrackCollection > &trkColl) const
 
std::vector< reco::TransientTrackbuild (const edm::Handle< edm::View< reco::Track > > &trkColl) const
 
std::vector< reco::TransientTrackbuild (const edm::Handle< reco::TrackCollection > &trkColl, const reco::BeamSpot &beamSpot) const
 
std::vector< reco::TransientTrackbuild (const edm::Handle< reco::GsfTrackCollection > &trkColl, const reco::BeamSpot &beamSpot) const
 
std::vector< reco::TransientTrackbuild (const edm::Handle< edm::View< reco::Track > > &trkColl, const reco::BeamSpot &beamSpot) const
 
reco::TransientTrack build (const FreeTrajectoryState &fts) const
 
const MagneticFieldfield () const
 
const edm::ESHandle
< GlobalTrackingGeometry
trackingGeometry () const
 
 TransientTrackBuilder (const MagneticField *field, const edm::ESHandle< GlobalTrackingGeometry > &trackingGeometry)
 

Private Attributes

const MagneticFieldtheField
 
edm::ESHandle
< GlobalTrackingGeometry
theTrackingGeometry
 

Detailed Description

Helper class to build TransientTrack from the persistent Track. This is obtained from the eventSetup, as given in the example in the test directory.

Definition at line 15 of file TransientTrackBuilder.h.

Constructor & Destructor Documentation

TransientTrackBuilder::TransientTrackBuilder ( const MagneticField field,
const edm::ESHandle< GlobalTrackingGeometry > &  trackingGeometry 
)
inline

Definition at line 17 of file TransientTrackBuilder.h.

18  :
19  theField(field) , theTrackingGeometry(trackingGeometry) {}
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry

Member Function Documentation

TransientTrack TransientTrackBuilder::build ( const reco::Track p) const
TransientTrack TransientTrackBuilder::build ( const reco::Track p) const

Definition at line 14 of file TransientTrackBuilder.cc.

14  {
16 }
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
TransientTrack TransientTrackBuilder::build ( const reco::GsfTrack p) const

Definition at line 18 of file TransientTrackBuilder.cc.

18  {
20 }
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
TransientTrack TransientTrackBuilder::build ( const reco::GsfTrack p) const

Definition at line 22 of file TransientTrackBuilder.cc.

22  {
24 }
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
TransientTrack TransientTrackBuilder::build ( const reco::TrackRef p) const

Definition at line 34 of file TransientTrackBuilder.cc.

34  {
36 }
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
TransientTrack TransientTrackBuilder::build ( const reco::TrackRef p) const

Definition at line 38 of file TransientTrackBuilder.cc.

38  {
40 }
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
TransientTrack TransientTrackBuilder::build ( const reco::GsfTrackRef p) const

Definition at line 43 of file TransientTrackBuilder.cc.

43  {
45 }
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
TransientTrack TransientTrackBuilder::build ( const reco::GsfTrackRef p) const

Definition at line 47 of file TransientTrackBuilder.cc.

47  {
49 }
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
TransientTrack TransientTrackBuilder::build ( const reco::CandidatePtr p) const

Definition at line 26 of file TransientTrackBuilder.cc.

26  {
28 }
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
TransientTrack TransientTrackBuilder::build ( const reco::CandidatePtr p) const

Definition at line 30 of file TransientTrackBuilder.cc.

30  {
32 }
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
vector< TransientTrack > TransientTrackBuilder::build ( const edm::Handle< reco::TrackCollection > &  trkColl) const

Definition at line 52 of file TransientTrackBuilder.cc.

References i.

53 {
54  vector<TransientTrack> ttVect;
55  ttVect.reserve((*trkColl).size());
56  for (unsigned int i = 0; i < (*trkColl).size() ; i++) {
57  ttVect.push_back(TransientTrack(TrackRef(trkColl, i), theField, theTrackingGeometry));
58  }
59  return ttVect;
60 }
int i
Definition: DBlmapReader.cc:9
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
vector< TransientTrack > TransientTrackBuilder::build ( const edm::Handle< reco::GsfTrackCollection > &  trkColl) const

Definition at line 63 of file TransientTrackBuilder.cc.

References i.

64 {
65  vector<TransientTrack> ttVect;
66  ttVect.reserve((*trkColl).size());
67  for (unsigned int i = 0; i < (*trkColl).size() ; i++) {
68  ttVect.push_back( TransientTrack(
70  }
71  return ttVect;
72 }
edm::Ref< GsfTrackCollection > GsfTrackRef
persistent reference to a GsfTrack
Definition: GsfTrackFwd.h:13
int i
Definition: DBlmapReader.cc:9
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
vector< TransientTrack > TransientTrackBuilder::build ( const edm::Handle< edm::View< reco::Track > > &  trkColl) const

Definition at line 75 of file TransientTrackBuilder.cc.

References i.

76 {
77  vector<TransientTrack> ttVect;
78  ttVect.reserve((*trkColl).size());
79  for (unsigned int i = 0; i < (*trkColl).size() ; i++) {
80  const Track * trk = &(*trkColl)[i];
81  const GsfTrack * gsfTrack = dynamic_cast<const GsfTrack *>(trk);
82  if (gsfTrack) {
83  ttVect.push_back( TransientTrack(
84  new GsfTransientTrack(RefToBase<Track>(trkColl, i).castTo<GsfTrackRef>(), theField, theTrackingGeometry)) );
85  } else { // gsf
86  ttVect.push_back(TransientTrack(RefToBase<Track>(trkColl, i).castTo<TrackRef>(), theField, theTrackingGeometry));
87  }
88  }
89  return ttVect;
90 }
int i
Definition: DBlmapReader.cc:9
const MagneticField * theField
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
vector< TransientTrack > TransientTrackBuilder::build ( const edm::Handle< reco::TrackCollection > &  trkColl,
const reco::BeamSpot beamSpot 
) const

Definition at line 93 of file TransientTrackBuilder.cc.

References newFWLiteAna::build, and i.

95 {
96  vector<TransientTrack> ttVect = build(trkColl);
97  for (unsigned int i = 0; i < ttVect.size() ; i++) {
98  ttVect[i].setBeamSpot(beamSpot);
99  }
100  return ttVect;
101 }
int i
Definition: DBlmapReader.cc:9
reco::TransientTrack build(const reco::Track *p) const
vector< TransientTrack > TransientTrackBuilder::build ( const edm::Handle< reco::GsfTrackCollection > &  trkColl,
const reco::BeamSpot beamSpot 
) const

Definition at line 104 of file TransientTrackBuilder.cc.

References newFWLiteAna::build, and i.

106 {
107  vector<TransientTrack> ttVect = build(trkColl);
108  for (unsigned int i = 0; i < ttVect.size() ; i++) {
109  ttVect[i].setBeamSpot(beamSpot);
110  }
111  return ttVect;
112 }
int i
Definition: DBlmapReader.cc:9
reco::TransientTrack build(const reco::Track *p) const
vector< TransientTrack > TransientTrackBuilder::build ( const edm::Handle< edm::View< reco::Track > > &  trkColl,
const reco::BeamSpot beamSpot 
) const

Definition at line 115 of file TransientTrackBuilder.cc.

References newFWLiteAna::build, and i.

117 {
118  vector<TransientTrack> ttVect = build(trkColl);
119  for (unsigned int i = 0; i < ttVect.size() ; i++) {
120  ttVect[i].setBeamSpot(beamSpot);
121  }
122  return ttVect;
123 }
int i
Definition: DBlmapReader.cc:9
reco::TransientTrack build(const reco::Track *p) const
TransientTrack TransientTrackBuilder::build ( const FreeTrajectoryState fts) const
const MagneticField* TransientTrackBuilder::field ( ) const
inline

Definition at line 47 of file TransientTrackBuilder.h.

References theField.

47 {return theField;}
const MagneticField * theField
const edm::ESHandle<GlobalTrackingGeometry> TransientTrackBuilder::trackingGeometry ( ) const
inline

Definition at line 48 of file TransientTrackBuilder.h.

References theTrackingGeometry.

48 {return theTrackingGeometry;}
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry

Member Data Documentation

const MagneticField* TransientTrackBuilder::theField
private

Definition at line 51 of file TransientTrackBuilder.h.

Referenced by field().

edm::ESHandle<GlobalTrackingGeometry> TransientTrackBuilder::theTrackingGeometry
private

Definition at line 52 of file TransientTrackBuilder.h.

Referenced by trackingGeometry().