StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TpcHitUtilities.h
1 // $Id: TpcHitUtilities.h,v 1.6 2006/05/20 03:17:21 genevb Exp $
3 //
4 // Author: M.L. Miller, Yale
5 //
7 //
8 // Description: TPC sector gains hit utilities class
9 //
11 //
12 // $Log: TpcHitUtilities.h,v $
13 // Revision 1.6 2006/05/20 03:17:21 genevb
14 // Changed MapKey to MapQAKey to make it unique for QA
15 //
16 // Revision 1.5 2005/07/06 23:21:04 fisyak
17 // use templated StThreeVectorD
18 //
19 // Revision 1.4 2001/04/25 18:16:20 perev
20 // HPcorrs
21 //
22 // Revision 1.3 2000/08/09 18:57:44 lansdell
23 // improvements in TPC gains code reduces CPU time per event by factor of 2
24 //
25 //
27 
28 #ifndef TpcHitUtilities_H
29 #define TpcHitUtilities_H
30 
31 class StTrack;
32 class StTpcHit;
33 #include "StThreeVectorD.hh"
34 
35 #include <vector>
36 #include <map>
37 
38 #ifndef ST_NO_NAMESPACES
39 using std::vector;
40 using std::map;
41 using std::pair;
42 #endif
43 
44 #include "TpcMapUtilities.h"
45 
46 typedef map<HitMapQAKey, PadrowLocation, MapQAKeyLessThan>::value_type padrowMapValType;
47 
49 public:
51  TpcHitUtilities(StTrack*, double MagneticField);
52  virtual ~TpcHitUtilities();
53 
54  //Access--------------------------------
55  void clear();
56  void setTrack(StTrack*);
57  void setBField(double);
58 
59  const vector<StTpcHit*>& tpcHitVec() const;
60 
61  //Methods-----------------------------
62  void findHits(); //Get the tpc hits from Track
63  double dx(StTpcHit*); //Calculate the pathlength of a hit
64 
65 protected:
66  //Implementation Details----------------
67  void buildMaps(); //Build the maps for dx calculation
68  bool keepHit(StTpcHit*); //Cut on hit flags
69  const StThreeVectorD sectorNormal(int sector); //Return the normal vector to a given sector
70 
71  map<int, StThreeVectorD> m_SectorNormalMap;
72  map<HitMapQAKey, PadrowLocation, MapQAKeyLessThan> m_PadrowMap;
73 
74  //Members-------------------------------
75  vector<StTpcHit*> m_tpcHitVec;
76  StTrack* m_StTrack;
77  double m_BField; //We need this for the crossing angle calculation
78 };
79 
80 #endif
map< HitMapQAKey, PadrowLocation, MapQAKeyLessThan > m_PadrowMap
Map of normal vectors to a sector.
vector< StTpcHit * > m_tpcHitVec
Map of 3 points in each padrow.