BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkExpectedTrk.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkExpectedTrk.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6// Class TrkExpectedTrack Stores lists of expected hits for a given
7// set of tracks.
8//
9// Environment:
10// Software developed for Babar experiment @ Slac B-factory.
11//
12// Author List:
13// Eric A Charles UW-Madison
14//
15//------------------------------------------------------------------------
16
17#ifndef TRKEXPECTEDTRACK_HH
18#define TRKEXPECTEDTRACK_HH
19
20//-------------
21// C Headers --
22//-------------
23extern "C" {
24}
25
26//---------------
27// C++ Headers --
28//---------------
29#include <map>
30#include <vector>
31#include <algorithm>
32#include <iostream>
33
34//----------------------
35// Base Class Headers --
36//----------------------
37
38//-------------------------------
39// Collaborating Class Headers --
40//-------------------------------
41
42#include "MdcRecoUtil/PdtPid.h"
44
45//------------------------------------
46// Collaborating Class Declarations --
47//------------------------------------
48
49class TrkRecoTrk;
50class TrkRep;
51class TrkFit;
53class TrkExpectedHot;
54class TrkHitOnTrk;
55class TrkFundHit;
56class TrkExpectedMap;
57class TrkDetElemId;
58class GTrack;
59
60// ---------------------
61// -- Class Interface --
62// ---------------------
63
65
66//--------------------
67// Instance Members --
68//--------------------
69
70public:
71
72 // Constructor
73
74 // c'tor from a track, uses the default fit unless overridden,
75 // this also registers the expected track in the map,
76 // finally, it sets the tracks fit type as the default type,
77 // it does not, however, actully make the TrkExpectedHotSets
78 TrkExpectedTrk( const TrkRecoTrk* aTrack,
80 const GTrack* gTrk = 0,
81 TrkExpectedMap* exMap = 0 );
82
83 // Destructor
84 virtual ~TrkExpectedTrk( );
85
86 // Operators
87 bool operator==( const TrkExpectedTrk& rhs ) const {
88 return this == &rhs;
89 }
90
91 // Selectors (const)
92 const TrkHitOnTrk* getHot( const TrkFundHit* hit,
93 const TrkFitTypeKey& key ) const;
94
95 const TrkRep* refRep() const{
96 return _refRep;
97 }
98
99 const GTrack* gTrack() const {
100 return _gTrk;
101 }
102
103 const TrkRecoTrk* track() const;
104
105 // these are ways of getting the hots sets
106 // by element id
107 const TrkExpectedHotSet* exHotSet( const TrkDetElemId& elemId ) const;
108 // by hot and fund hit
109 const TrkExpectedHotSet* exHotSet( const TrkHitOnTrk* hot ) const;
110 const TrkExpectedHotSet* exHotSet( const TrkFundHit* hit ) const;
111
112 // these are ways of getting the ex hots them-selves
113 // by element id
114 const TrkExpectedHot* exHot( const TrkDetElemId& elemId,
115 const TrkFitTypeKey key = TrkFitTypeKey(0) ) const;
116
117 // by hot and fund hit
118 const TrkExpectedHot* exHot( const TrkHitOnTrk* hot ) const;
119 const TrkExpectedHot* exHot( const TrkFundHit* hit,
120 const TrkFitTypeKey key = TrkFitTypeKey(0)) const;
121
122 void fillExHotSets( std::vector<TrkExpectedHotSet*>& hotSets ) const;
124 std::vector<TrkExpectedHot*>& hots ) const;
125
126 // get the number of overlaps with a rep
127 int overLap( const TrkRep* rep ) const
128 {
129 // FIXME: std::count doesn't work with the BaBar config of Sun WS6U1..
130 // return std::count(_reps.begin(),_reps.end(),rep);
131 typedef std::vector<const TrkRep*>::const_iterator i_t;
132 int j=0;
133 for (i_t i=_reps.begin(); i!=_reps.end();++i) {
134 if (*i == rep) ++j;
135 }
136 return j;
137 }
138
139 //Accessing methods for the class private members:
140 const std::map<TrkDetElemId, TrkExpectedHotSet*>& expectedHots() const
141 {
142 return _exHotTable;
143 }
144
145 // modifiers
147 std::ostream& os = std::cout ) const;
148
149protected:
150
151 // Helper functions
152 // add in the un-parsed hots from a rep
153 bool parseHotFromMap( const TrkHitOnTrk* hot, const bool fillGaps );
155 const TrkFitTypeKey& key );
159
160 const TrkRep* getRep( const TrkRecoTrk* aTrk,
161 const PdtPid::PidType type ) const;
162
163 bool addExHotSet( const TrkDetElemId& elemId,
164 TrkExpectedHotSet* val );
165
166private:
167 // friends
169
170 // Data members
171 std::vector<const TrkRep*> _reps;
172 const TrkExpectedMap* _parentMap;
173 std::map<TrkDetElemId,TrkExpectedHotSet*> _exHotTable;
174 const TrkRep* _refRep;
175 const GTrack* _gTrk;
176};
177
178#endif
*************DOUBLE PRECISION m_pi *DOUBLE PRECISION m_HvecTau2 DOUBLE PRECISION m_HvClone2 DOUBLE PRECISION m_gamma1 DOUBLE PRECISION m_gamma2 DOUBLE PRECISION m_thet1 DOUBLE PRECISION m_thet2 INTEGER m_IFPHOT *COMMON c_Taupair $ !Spin Polarimeter vector first Tau $ !Spin Polarimeter vector second Tau $ !Clone Spin Polarimeter vector first Tau $ !Clone Spin Polarimeter vector second Tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !phi of HvecTau1 $ !theta of HvecTau1 $ !phi of HvecTau2 $ !theta of HvecTau2 $ !super key
Definition: Taupair.h:42
PidType
Definition: PdtPid.h:11
@ null
Definition: PdtPid.h:12
bool addExHotSet(const TrkDetElemId &elemId, TrkExpectedHotSet *val)
int overLap(const TrkRep *rep) const
const TrkExpectedHot * exHot(const TrkHitOnTrk *hot) const
const TrkExpectedHotSet * exHotSet(const TrkFundHit *hit) const
const GTrack * gTrack() const
void fillExHotSets(std::vector< TrkExpectedHotSet * > &hotSets) const
virtual ~TrkExpectedTrk()
bool parseHotSetFromMap(TrkExpectedHotSet *hotSet)
friend class TrkExpectedHotFactory
const TrkExpectedHot * exHot(const TrkFundHit *hit, const TrkFitTypeKey key=TrkFitTypeKey(0)) const
bool parseHotsFromMap(const TrkFitTypeKey &key)
void printFit(const TrkFitTypeKey &key, std::ostream &os=std::cout) const
bool parseHotFromMap(const TrkHitOnTrk *hot, const bool fillGaps)
const TrkExpectedHotSet * exHotSet(const TrkHitOnTrk *hot) const
const TrkExpectedHot * exHot(const TrkDetElemId &elemId, const TrkFitTypeKey key=TrkFitTypeKey(0)) const
const TrkExpectedHotSet * exHotSet(const TrkDetElemId &elemId) const
bool parseHotsFromMap()
const TrkRep * refRep() const
void fillExHots(const TrkFitTypeKey &key, std::vector< TrkExpectedHot * > &hots) const
const TrkRep * getRep(const TrkRecoTrk *aTrk, const PdtPid::PidType type) const
TrkExpectedTrk(const TrkRecoTrk *aTrack, const PdtPid::PidType=PdtPid::null, const GTrack *gTrk=0, TrkExpectedMap *exMap=0)
bool operator==(const TrkExpectedTrk &rhs) const
const std::map< TrkDetElemId, TrkExpectedHotSet * > & expectedHots() const
const TrkHitOnTrk * getHot(const TrkFundHit *hit, const TrkFitTypeKey &key) const
bool parseHotSetFromMap(TrkExpectedHotSet *hotSet, const TrkFitTypeKey &key)
const TrkRecoTrk * track() const
Definition: TrkFit.h:23
Definition: TrkRep.h:43