test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
36  public:
37  // --------------------- Member Functions --------------------------
38  static FWPFTrackSingleton *Instance();
39 
40  inline TEveTrackPropagator *getTrackerTrackPropagator() { return m_trackerTrackPropagator; }
41  inline TEveTrackPropagator *getTrackPropagator() { return m_trackPropagator; }
42  inline FWMagField *getField() { return m_magField; }
43 
44  protected:
45  FWPFTrackSingleton( const FWPFTrackSingleton& ); // Stop default copy constructor
46  const FWPFTrackSingleton& operator=( const FWPFTrackSingleton& ); // Stop default assignment operator
47 
48  // ---------------- Constructor(s)/Destructor ----------------------
50  virtual ~FWPFTrackSingleton(){ instanceFlag = false; }
51 
52  private:
53  // --------------------- Member Functions --------------------------
54  void initPropagator();
55 
56  // ----------------------- Data Members ----------------------------
57  static FWPFTrackSingleton *pInstance; // Pointer to instance if one exists
58  static bool instanceFlag;
59 
60  TEveTrackPropagator *m_trackerTrackPropagator;
61  TEveTrackPropagator *m_trackPropagator;
63 };
64 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
65 
66 
67 //-----------------------------------------------------------------------------
68 // FWPFTrackUtils
69 //-----------------------------------------------------------------------------
71 {
72  public:
73  // ---------------- Constructor(s)/Destructor ----------------------
75  virtual ~FWPFTrackUtils(){}
76 
77  // --------------------- Member Functions --------------------------
78  TEveStraightLineSet *setupLegoTrack( const reco::Track& );
79  TEveTrack *setupTrack( const reco::Track& );
80  TEvePointSet *getCollisionMarkers( const TEveTrack* );
81 
82  private:
83  FWPFTrackUtils( const FWPFTrackUtils& ); // Stop default copy constructor
84  const FWPFTrackUtils& operator=( const FWPFTrackUtils& ); // Stop default assignment operator
85 
86  TEveTrack *getTrack( const reco::Track& );
87 
89 };
90 #endif
91 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
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 &)
TEveTrackPropagator * m_trackPropagator
TEveTrackPropagator * getTrackerTrackPropagator()
FWMagField * m_magField
const FWPFTrackUtils & operator=(const FWPFTrackUtils &)