StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTpcHit.cxx
1 /***************************************************************************
2  *
3  * $Id: StTpcHit.cxx,v 2.19 2011/10/17 00:13:49 fisyak Exp $
4  *
5  * Author: Thomas Ullrich, Jan 1999
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StTpcHit.cxx,v $
13  * Revision 2.19 2011/10/17 00:13:49 fisyak
14  * Add handles for IdTruth info
15  *
16  * Revision 2.18 2011/03/31 19:25:13 fisyak
17  * Keep ADC value for cluster
18  *
19  * Revision 2.17 2010/03/26 13:47:29 fisyak
20  * Add methods to modify hit content
21  *
22  * Revision 2.16 2010/03/05 16:30:19 fisyak
23  * Add hit id
24  *
25  * Revision 2.15 2009/11/23 16:34:07 fisyak
26  * Cleanup, remove dependence on dst tables, clean up software monitors
27  *
28  * Revision 2.14 2009/11/10 00:40:18 ullrich
29  * Changed print-out format.
30  *
31  * Revision 2.13 2007/10/03 21:47:35 ullrich
32  * Added several new member to hold hit length info.
33  *
34  * Revision 2.12 2004/08/06 15:37:09 fisyak
35  * Add clster id
36  *
37  * Revision 2.11 2004/07/15 16:36:25 ullrich
38  * Removed all clone() declerations and definitions. Use StObject::clone() only.
39  *
40  * Revision 2.10 2004/01/13 21:01:08 fisyak
41  * Add Truth and Quality information from simulation
42  *
43  * Revision 2.9 2001/04/05 04:00:57 ullrich
44  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
45  *
46  * Revision 2.8 2001/03/24 03:34:59 perev
47  * clone() -> clone() const
48  *
49  * Revision 2.7 2000/07/28 23:29:42 calderon
50  * Added handling of Fit Flag: use this flag to tell if the point
51  * is used in the fit.
52  *
53  * Revision 2.6 2000/06/01 21:39:07 ullrich
54  * Added member mFlag and access member flag() and setFlag().
55  *
56  * Revision 2.5 1999/12/01 15:56:28 ullrich
57  * Renamed xxxInCluster() methods to xxxInHit()
58  *
59  * Revision 2.4 1999/11/11 10:19:52 ullrich
60  * Inlined sector() and padrow().
61  *
62  * Revision 2.3 1999/11/09 19:35:25 ullrich
63  * Memory now allocated using StMemoryPool via overloaded new/delete
64  *
65  * Revision 2.2 1999/11/04 21:41:00 ullrich
66  * Added missing default constructor
67  *
68  * Revision 2.1 1999/10/28 22:27:07 ullrich
69  * Adapted new StArray version. First version to compile on Linux and Sun.
70  *
71  * Revision 2.0 1999/10/12 18:42:48 ullrich
72  * Completely Revised for New Version
73  *
74  **************************************************************************/
75 #include "StTpcHit.h"
76 #include "StTrack.h"
77 static const char rcsid[] = "$Id: StTpcHit.cxx,v 2.19 2011/10/17 00:13:49 fisyak Exp $";
78 
79 StMemoryPool StTpcHit::mPool(sizeof(StTpcHit));
80 
81 ClassImp(StTpcHit)
82 
83 void StTpcHit::setExtends(Float_t cl_x, Float_t cl_t, Short_t mnpad, Short_t mxpad, Short_t mntmbk, Short_t mxtmbk) {
84  setPadTmbk(cl_x, cl_t);
85  Short_t pad = TMath::Nint(mMcl_x/64.);
86  Short_t time = TMath::Nint(mMcl_t/64.);
87  mMinpad = pad - mnpad;
88  mMaxpad = mxpad - pad;
89  mMintmbk = time - mntmbk;
90  mMaxtmbk = mxtmbk - time;
91 }
92 
93 ostream& operator<<(ostream& os, const StTpcHit& v)
94 {
95  return os << Form("Tpc s/r %3i/%3i ",v.sector(),v.padrow())
96  << *((StHit *)&v)
97  << Form(" pmin/max %3i/%3i np %2i tmin/max %3i/%3i nt %2i tm %6.2f pad %6.2f adc %4i",
98  (Int_t) v.minPad(), (Int_t) v.maxPad(),(Int_t) v.padsInHit(),
99  (Int_t) v.minTmbk(), (Int_t) v.maxTmbk(),(Int_t) v.timeBucketsInHit(),
100  v.timeBucket(),v.pad(), v.adc());
101 }
102 void StTpcHit::Print(Option_t *option) const {cout << *this << endl;}
Definition: StHit.h:125