StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcTpcHit.hh
1 /***************************************************************************
2  *
3  * $Id: StMcTpcHit.hh,v 2.16 2016/09/18 22:43:02 fisyak Exp $
4  * $Log: StMcTpcHit.hh,v $
5  * Revision 2.16 2016/09/18 22:43:02 fisyak
6  * increament version no.
7  *
8  * Revision 2.15 2016/09/18 22:41:39 fisyak
9  * Add no. of primary electrons
10  *
11  * Revision 2.14 2016/07/26 15:10:13 jwebb
12  * Initialize members in ctor / coverity
13  *
14  * Revision 2.13 2012/03/01 16:48:30 perev
15  * method Browse() added
16  *
17  * Revision 2.12 2011/10/17 00:24:01 fisyak
18  * Add time of flight for hits
19  *
20  * Revision 2.11 2005/11/22 21:44:52 fisyak
21  * Add compress Print for McEvent, add Ssd collections
22  *
23  * Revision 2.10 2005/09/28 21:30:15 fisyak
24  * Persistent StMcEvent
25  *
26  * Revision 2.9 2005/07/06 20:05:28 calderon
27  * Remove forward declaration of StThreeVectorF, use #include, and only in
28  * StMcHit base class. StThreeVectorF is not a class anymore, it is now
29  * only a typedef, only template version of StThreeVector exists now.
30  *
31  * Revision 2.8 2005/01/27 23:40:49 calderon
32  * Adding persistency to StMcEvent as a step for Virtual MonteCarlo.
33  *
34  * Revision 2.7 2000/06/06 02:58:42 calderon
35  * Introduction of Calorimeter classes. Modified several classes
36  * accordingly.
37  *
38  * Revision 2.6 2000/05/05 15:25:44 calderon
39  * Reduced dependencies and made constructors more efficient
40  *
41  * Revision 2.5 2000/03/06 18:05:23 calderon
42  * 1) Modified SVT Hits storage scheme from layer-ladder-wafer to
43  * barrel-ladder-wafer.
44  * 2) Added Rich Hit class and collection, and links to them in other
45  * classes.
46  *
47  * Revision 2.4 2000/01/18 20:52:31 calderon
48  * Works with CC5
49  *
50  * Revision 2.3 1999/12/14 07:04:49 calderon
51  * Numbering scheme as per SVT request.
52  *
53  * Revision 2.2 1999/12/03 00:51:53 calderon
54  * Tested with new StMcEventMaker. Added messages for
55  * diagnostics.
56  *
57  * Revision 2.1 1999/11/19 19:06:33 calderon
58  * Recommit after redoing the files.
59  *
60  * Revision 2.0 1999/11/17 02:12:16 calderon
61  * Completely revised for new StEvent
62  *
63  * Revision 1.4 1999/09/24 01:23:16 fisyak
64  * Reduced Include Path
65  *
66  * Revision 1.3 1999/09/23 21:25:53 calderon
67  * Added Log & Id
68  * Modified includes according to Yuri
69  *
70  *
71  **************************************************************************/
72 #ifndef StMcTpcHit_hh
73 #define StMcTpcHit_hh
74 
75 #include "StMcHit.hh"
76 #include "tables/St_g2t_tpc_hit_Table.h"
77 
78 class StMcTpcHit : public StMcHit {
79 public:
80  StMcTpcHit() : StMcHit(),
81  mLgamma(0),
82  mAdc(0),
83  mMcl_x(0),
84  mMcl_t(0),
85  mnP(0), mne(0), mAdc0(0), mAdc1(0), mAdc2(0), mdNdx(0)
86 
87  {}
88 // StMcTpcHit(const StThreeVectorF& x,const StThreeVectorF& p,
89 // Float_t de = 0, Float_t ds = 0, Float_t tof = 0, Long_t k = 0, Long_t volId = 0, StMcTrack* parent=0,
90 // Float_t adc = 0, Float_t cl_x = 0, Float_t cl_t = 0):
91 // StMcHit(x,p,de,ds,tof,k,volId,parent), mAdc(adc), mMcl_x(cl_x), mMcl_t(cl_t) {}
92  StMcTpcHit(g2t_tpc_hit_st* pt):
93  StMcHit(StThreeVectorF(pt->x[0], pt->x[1], pt->x[2]),
94  StThreeVectorF(pt->p[0], pt->p[1], pt->p[2]),
95  pt->de, pt->ds, pt->tof, pt->id, pt->volume_id, 0),
96  mLgamma(pt->lgam), mLength(pt->length), mAdc(pt->adc), mMcl_x(pt->pad), mMcl_t(pt->timebucket), mnP(pt->np),
97  mne(pt->ne) {
98  mAdc0 = pt->adcs[0];
99  mAdc1 = pt->adcs[1];
100  mAdc2 = pt->adcs[2];
101  mdNdx = pt->dNdx;
102  mdSSum = pt->dSSum;
103  mdESum = pt->dESum;;
104  }
105  virtual ~StMcTpcHit() {}
106  ULong_t sector() const { return (mVolumeId%10000)/100; }// 1-24
107  ULong_t padrow() const { return (mVolumeId%100); } // 1-45
108 
109  ULong_t isDet() const { return mVolumeId/100000; } // pseudo pad row
110  Float_t lgamma() const { return mLgamma;}
111  Float_t length() const { return mLength;}
112  Float_t adc() const { return mAdc;}
113  Float_t pad() const { return mMcl_x;}
114  Float_t timeBucket() const { return mMcl_t;}
115 
116  virtual void Print(Option_t *option="") const; // *MENU*
117 
118 private:
119  Float_t mLgamma; // ALOG10(GEKin/AMass) from g2t_tpc_hit
120  Float_t mLength; // track length up to this hit
121  Float_t mAdc;
122  Float_t mMcl_x; /* average pad */
123  Float_t mMcl_t; /* average timebucket */
124  Int_t mnP; /* no. of primary electrons */
125  Int_t mne; /* no. of conducting electrons */
126  Float_t mAdc0, mAdc1, mAdc2; /* adc signal in 0 => row - 1, 1 => row, 2 => row+1 */
127  Float_t mdNdx;
128  Float_t mdSSum;
129  Float_t mdESum;
130  ClassDef(StMcTpcHit,5)
131 };
132 
133 ostream& operator<<(ostream& os, const StMcTpcHit&);
134 
135 #endif