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  FWPFTrackUtils(const FWPFTrackUtils &) = delete; // Stop default copy constructor
80  const FWPFTrackUtils &operator=(const FWPFTrackUtils &) = delete; // Stop default assignment operator
81 
82 private:
83  TEveTrack *getTrack(const reco::Track &);
84 
86 };
87 #endif
88 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
TEvePointSet * getCollisionMarkers(const TEveTrack *)
TEveTrack * setupTrack(const reco::Track &)
FWPFTrackSingleton * m_singleton
virtual ~FWPFTrackSingleton()
const FWPFTrackSingleton & operator=(const FWPFTrackSingleton &)
virtual ~FWPFTrackUtils()
TEveTrackPropagator * m_trackerTrackPropagator
static FWPFTrackSingleton * pInstance
TEveTrackPropagator * getTrackPropagator()
TEveStraightLineSet * setupLegoTrack(const reco::Track &)
static FWPFTrackSingleton * Instance()
static bool instanceFlag
FWMagField * getField()
TEveTrack * getTrack(const reco::Track &)
const FWPFTrackUtils & operator=(const FWPFTrackUtils &)=delete
TEveTrackPropagator * m_trackPropagator
TEveTrackPropagator * getTrackerTrackPropagator()
FWMagField * m_magField