StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcIstHit.hh
1 /***************************************************************************
2  *
3  * $Id: StMcIstHit.hh,v 2.13 2015/03/13 18:44:58 perev Exp $
4  * $Log: StMcIstHit.hh,v $
5  * Revision 2.13 2015/03/13 18:44:58 perev
6  * Roll back
7  *
8  * Revision 2.11 2012/12/18 21:01:18 perev
9  * Ist development (Jonathan)
10  *
11  * Revision 2.10 2011/10/17 00:24:00 fisyak
12  * Add time of flight for hits
13  *
14  * Revision 2.9 2009/02/06 15:38:13 fisyak
15  * Jonathan: decoding for upgr15 geometry
16  *
17  * Revision 2.8 2006/10/23 21:13:46 calderon
18  * Updates to layer(), wafer() and side() methods from Willie L.
19  *
20  * Revision 2.7 2005/11/22 21:44:52 fisyak
21  * Add compress Print for McEvent, add Ssd collections
22  *
23  * Revision 2.6 2005/09/28 21:30:15 fisyak
24  * Persistent StMcEvent
25  *
26  * Revision 2.5 2005/07/19 20:07:34 calderon
27  * Addition of default constructor, including base class StMcHit constructor.
28  * Bracket calls to StMemoryPool inside #ifdef.
29  *
30  * Revision 2.4 2005/07/06 20:05:28 calderon
31  * Remove forward declaration of StThreeVectorF, use #include, and only in
32  * StMcHit base class. StThreeVectorF is not a class anymore, it is now
33  * only a typedef, only template version of StThreeVector exists now.
34  *
35  * Revision 2.3 2005/05/12 22:38:30 potekhin
36  * Willie: Added function wafer() to return wafer number (1-7,1-10,1-13 for layers 1,2,3)
37  * and side() to return ladder side (1=inner,2=outer)
38  *
39  * Revision 2.2 2005/05/11 20:54:28 calderon
40  * Added persistency: ClassImp, ClassDef and inheritance from StObject.
41  *
42  * Revision 2.1 2004/09/14 05:00:29 calderon
43  * Added support for Ist, Ssd and changes to Pixel, from "El Kai".
44  *
45  * Revision 2.1 2003/08/20 18:50:21 calderon
46  * Addition of Tof classes and Pixel classes. Modified track, event, and
47  * container code to reflect this.
48  * Fix bug in StMcVertex and in clearing of some hit collections.
49  *
50  *
51  **************************************************************************/
52 #ifndef StMcIstHit_hh
53 #define StMcIstHit_hh
54 
55 #include "StMcHit.hh"
56 #include "tables/St_g2t_ist_hit_Table.h"
57 
58 
59 class StMcIstHit : public StMcHit {
60 public:
61  StMcIstHit() : StMcHit() {}
62  StMcIstHit(const StThreeVectorF& x,const StThreeVectorF& p,
63  Float_t de = 0, Float_t ds = 0, Float_t tof = 0, Long_t k = 0, Long_t volId = 0, StMcTrack* parent=0) :
64  StMcHit(x,p,de,ds,tof,k,volId,parent) {}
65  StMcIstHit(g2t_ist_hit_st* pt) :
66  StMcHit(StThreeVectorF(pt->x[0], pt->x[1], pt->x[2]),
67  StThreeVectorF(pt->p[0], pt->p[1], pt->p[2]),
68  pt->de, pt->ds, pt->tof, pt->id, pt->volume_id, 0) {}
69  ~StMcIstHit() {}
70 
71 #ifdef POOL
72  void* operator new(size_t) { return mPool.alloc(); }
73  void operator delete(void* p) { mPool.free(p); }
74 #endif
75 
76  ULong_t layer() const {return 1;} //
77  ULong_t ladder() const {return mVolumeId/1000000 -1;}
78  ULong_t wafer() const {return (mVolumeId%1000000)/10000;}
79  ULong_t side() {return (mVolumeId%10);} //1=inner; 2=outer;
80 
81  // Willie: Added function wafer() to return wafer number (1-12)
82  // unsigned long wafer() const;
83  // Willie: Added function wafer() to return wafer number (1-10,1-13 for layers 1,2)
84  // and side() to return ladder side (1=inner,2=outer)
85  // ULong_t wafer() {return ((mVolumeId/100)%20);}
86  // ULong_t side() {return (mVolumeId%10);} //1=inner; 2=outer;
87 
88  virtual void Print(Option_t *option="") const; // *MENU*
89 
90 private:
91 
92  ClassDef(StMcIstHit,2)
93 };
94 
95 ostream& operator<<(ostream& os, const StMcIstHit&);
96 #endif
Definition: tof.h:15
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144