CMS 3D CMS Logo

FWPFTrackUtils.h
Go to the documentation of this file.
1 #ifndef _FWPFTRACKUTILS_H_
2 #define _FWPFTRACKUTILS_H_
3 
4 // -*- C++ -*-
5 //
6 // Package: ParticleFlow
7 // Class : FWPFTrackSingleton, FWPFTrackUtils
8 //
9 // Implementation:
10 // <Notes on implementation>
11 //
12 // Original Author: Simon Harris
13 // Created: 16/02/2011
14 //
15 
16 // System include files
17 #include "TEveTrack.h"
18 #include "TEvePointSet.h"
19 #include "TEveStraightLineSet.h"
20 
21 // User include files
28 
29 //-----------------------------------------------------------------------------
30 // FWPFTrackSingleton
31 //-----------------------------------------------------------------------------
32 /* Created as singleton because only 1 instance of propagators and magfield should be shared
33  * between track proxybuilder classes */
35 public:
36  // --------------------- Member Functions --------------------------
37  static FWPFTrackSingleton *Instance();
38 
39  inline TEveTrackPropagator *getTrackerTrackPropagator() { return m_trackerTrackPropagator; }
40  inline TEveTrackPropagator *getTrackPropagator() { return m_trackPropagator; }
41  inline FWMagField *getField() { return m_magField; }
42 
43 protected:
44  FWPFTrackSingleton(const FWPFTrackSingleton &); // Stop default copy constructor
45  const FWPFTrackSingleton &operator=(const FWPFTrackSingleton &); // Stop default assignment operator
46 
47  // ---------------- Constructor(s)/Destructor ----------------------
49  virtual ~FWPFTrackSingleton() { instanceFlag = false; }
50 
51 private:
52  // --------------------- Member Functions --------------------------
53  void initPropagator();
54 
55  // ----------------------- Data Members ----------------------------
56  static FWPFTrackSingleton *pInstance; // Pointer to instance if one exists
57  static bool instanceFlag;
58 
59  TEveTrackPropagator *m_trackerTrackPropagator;
60  TEveTrackPropagator *m_trackPropagator;
62 };
63 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
64 
65 //-----------------------------------------------------------------------------
66 // FWPFTrackUtils
67 //-----------------------------------------------------------------------------
69 public:
70  // ---------------- Constructor(s)/Destructor ----------------------
72  virtual ~FWPFTrackUtils() {}
73 
74  // --------------------- Member Functions --------------------------
75  TEveStraightLineSet *setupLegoTrack(const reco::Track &);
76  TEveTrack *setupTrack(const reco::Track &);
77  TEvePointSet *getCollisionMarkers(const TEveTrack *);
78 
79 private:
80  FWPFTrackUtils(const FWPFTrackUtils &) = delete; // Stop default copy constructor
81  const FWPFTrackUtils &operator=(const FWPFTrackUtils &) = delete; // Stop default assignment operator
82 
83  TEveTrack *getTrack(const reco::Track &);
84 
86 };
87 #endif
88 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
estimate_field.h
FWPFTrackUtils::m_singleton
FWPFTrackSingleton * m_singleton
Definition: FWPFTrackUtils.h:85
FWPFTrackUtils::FWPFTrackUtils
FWPFTrackUtils()
Definition: FWPFTrackUtils.cc:44
FWPFTrackSingleton::getField
FWMagField * getField()
Definition: FWPFTrackUtils.h:41
FWPFTrackSingleton::operator=
const FWPFTrackSingleton & operator=(const FWPFTrackSingleton &)
FWPFTrackSingleton::m_trackPropagator
TEveTrackPropagator * m_trackPropagator
Definition: FWPFTrackUtils.h:60
FWPFTrackUtils::setupLegoTrack
TEveStraightLineSet * setupLegoTrack(const reco::Track &)
Definition: FWPFTrackUtils.cc:63
FWPFTrackUtils::getTrack
TEveTrack * getTrack(const reco::Track &)
Definition: FWPFTrackUtils.cc:47
FWPFTrackSingleton::Instance
static FWPFTrackSingleton * Instance()
Definition: FWPFTrackUtils.cc:7
FWPFMaths.h
FWPFTrackUtils::~FWPFTrackUtils
virtual ~FWPFTrackUtils()
Definition: FWPFTrackUtils.h:72
FWPFTrackSingleton::initPropagator
void initPropagator()
Definition: FWPFTrackUtils.cc:18
FWPFTrackSingleton::getTrackerTrackPropagator
TEveTrackPropagator * getTrackerTrackPropagator()
Definition: FWPFTrackUtils.h:39
TrackUtils.h
FWPFTrackUtils::getCollisionMarkers
TEvePointSet * getCollisionMarkers(const TEveTrack *)
Definition: FWPFTrackUtils.cc:246
FWPFGeom.h
Track.h
FWMagField
Definition: FWMagField.h:14
reco::Track
Definition: Track.h:27
FWPFTrackSingleton::m_magField
FWMagField * m_magField
Definition: FWPFTrackUtils.h:61
FWPFTrackUtils::setupTrack
TEveTrack * setupTrack(const reco::Track &)
Definition: FWPFTrackUtils.cc:231
FWPFTrackSingleton::getTrackPropagator
TEveTrackPropagator * getTrackPropagator()
Definition: FWPFTrackUtils.h:40
FWMagField.h
FWPFTrackSingleton::~FWPFTrackSingleton
virtual ~FWPFTrackSingleton()
Definition: FWPFTrackUtils.h:49
FWPFTrackSingleton::instanceFlag
static bool instanceFlag
Definition: FWPFTrackUtils.h:57
FWPFTrackSingleton::pInstance
static FWPFTrackSingleton * pInstance
Definition: FWPFTrackUtils.h:56
FWPFTrackSingleton::FWPFTrackSingleton
FWPFTrackSingleton()
Definition: FWPFTrackUtils.h:48
FWPFTrackUtils::operator=
const FWPFTrackUtils & operator=(const FWPFTrackUtils &)=delete
FWPFTrackUtils
Definition: FWPFTrackUtils.h:68
FWPFTrackSingleton::m_trackerTrackPropagator
TEveTrackPropagator * m_trackerTrackPropagator
Definition: FWPFTrackUtils.h:59
FWPFTrackSingleton
Definition: FWPFTrackUtils.h:34