StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFgtCluster.h
1 /***************************************************************************
2  *
3  * $Id: StMuFgtCluster.h,v 1.2 2012/12/12 00:36:03 sangalin Exp $
4  * Author: S. Gliske, Jan. 2012
5  *
6  ***************************************************************************
7  *
8  * Description: data for a 1D cluster. Contains subset of the
9  * information in the StEvent/StMuFgtCluster class.
10  *
11  ***************************************************************************
12  *
13  * $Log: StMuFgtCluster.h,v $
14  * Revision 1.2 2012/12/12 00:36:03 sangalin
15  * Merged in updated StMuFgtCluster class format from Anselm Vossen.
16  *
17  * Revision 1.5 2012/07/20 16:11:24 sgliske
18  * Added StFgtStripAssociation, and removed all dynamically
19  * allocated memory from StMuFgt* containers.
20  * Also removed StMuFgtInfo
21  *
22  * Revision 1.4 2012/01/30 16:38:03 sgliske
23  * updated class def number
24  *
25  * Revision 1.3 2012/01/28 10:47:12 sgliske
26  * Added cluster charge uncertainty to containers
27  *
28  * Revision 1.2 2012/01/04 22:34:56 sgliske
29  * Fixed some bugs
30  *
31  * Revision 1.1 2012/01/04 19:15:34 sgliske
32  * Reintroduced support for the FGT in MuDst
33  *
34  *
35  **************************************************************************/
36 
37 #ifndef _ST_MU_FGT_CLUSTER_H_
38 #define _ST_MU_FGT_CLUSTER_H_
39 
40 #include <TObject.h>
41 #include <TArrayI.h>
42 #include <TArrayF.h>
43 
44 class StFgtHit;
45 
46 class StMuFgtCluster : public TObject {
47  public:
48  // constructors
49  StMuFgtCluster( Int_t centralStripGeoId = -1, Int_t firstStripAssociationIdx = -1, Int_t maxTimeBin=-1, Int_t maxAdc=-9999, Int_t numStrips = 0,
50  Float_t charge = 0, Float_t chargeUncert = 1000,
51  Float_t r = 0, Float_t errR = 1e10,
52  Float_t phi = 0, Float_t errPhi = 1e10 , Float_t evenOddChargeAsy=-1);
53 
54  // converting from StFgtHit
55  StMuFgtCluster( const StFgtHit& fgtHit );
56 
57  // defaults
58  // StMuFgtCluster(const StMuFgtCluster&); --> use default
59  // StMuFgtCluster& operator=(const StMuFgtCluster&); --> use default
60  // ~StMuFgtCluster(); --> use default
61 
62  // accessors
63  Int_t getCentralStripGeoId() const;
64  Int_t getFirstStripAssociationIndex() const;
65  Int_t getMaxTimeBin() const;
66  Int_t getMaxAdc() const;
67  Int_t getNumStrips() const;
68  Float_t getCharge() const;
69  Float_t getChargeUncert() const;
70  Float_t getR() const;
71  Float_t getErrR() const;
72  Float_t getPhi() const;
73  Float_t getErrPhi() const;
74  Float_t getEvenOddChargeAsy() const;
75 
76  // modifiers
77  void setCentralStripGeoId( Int_t geoId );
78  void setCharge( Float_t val );
79  void setChargeUncert( Float_t val );
80  void setR( Float_t val );
81  void setErrR( Float_t val );
82  void setPhi( Float_t val );
83  void setErrPhi( Float_t val );
84  void setEvenOddChargeAsy(Float_t val);
85  void setMaxTimeBin( Int_t val );
86  void setMaxAdc( Int_t val );
87  void setNumStrips( Int_t numStrips );
88 
89  void setFirstStripAssociationIndex( Int_t idx );
90 
91 
92  protected:
93  // data members
94  Int_t mCentralStripGeoId; // obvious--also serves as a unique key, and
95  // identifies the physical quadrant of the cluster
96 
97  Int_t mFirstStripAssociationIdx; // Index in the MuDst mFgtStripAssociation
98  // TClonesArray. The associated strips are from index
99  // mFirstStripAssociationIdx to
100  // mFirstStripAssociationIdx+mNumStrips-1
101  Int_t mMaxTimeBin; // time bin for max adc
102  Int_t mMaxAdc; // max adc in all strips and timebin
103 
104  Int_t mNumStrips; // number of strips associated with this cluster
105 
106  Float_t mCharge, mChargeUncert; // associated charge for the cluster, and its uncertainty
107  Float_t mR, mErrR, mPhi, mErrPhi; // r, phi position and error
108  Float_t mEvenOddChargeAsy; // (even-odd)/sum charge for phi layer
109 
110  private:
111  ClassDef( StMuFgtCluster, 4 );
112 };
113 
114 // inline functions
115 
116 inline Int_t StMuFgtCluster::getCentralStripGeoId() const { return mCentralStripGeoId; };
117 inline Int_t StMuFgtCluster::getNumStrips() const { return mNumStrips; };
118 inline Int_t StMuFgtCluster::getMaxTimeBin() const { return mMaxTimeBin; };
119 inline Int_t StMuFgtCluster::getMaxAdc() const { return mMaxAdc; };
120 inline Int_t StMuFgtCluster::getFirstStripAssociationIndex() const { return mFirstStripAssociationIdx; };
121 inline Float_t StMuFgtCluster::getCharge() const { return mCharge; };
122 inline Float_t StMuFgtCluster::getChargeUncert() const { return mChargeUncert; };
123 inline Float_t StMuFgtCluster::getR() const { return mR; };
124 inline Float_t StMuFgtCluster::getErrR() const { return mErrR; };
125 inline Float_t StMuFgtCluster::getPhi() const { return mPhi; };
126 inline Float_t StMuFgtCluster::getErrPhi() const { return mErrPhi; };
127 inline Float_t StMuFgtCluster::getEvenOddChargeAsy() const { return mEvenOddChargeAsy; };
128 
129 inline void StMuFgtCluster::setCentralStripGeoId( Int_t val ){ mCentralStripGeoId = val; };
130 inline void StMuFgtCluster::setNumStrips( Int_t val ) { mNumStrips = val; };
131 inline void StMuFgtCluster::setMaxTimeBin( Int_t val ) { mMaxTimeBin = val; };
132 inline void StMuFgtCluster::setMaxAdc( Int_t val ) { mMaxAdc = val; };
133 inline void StMuFgtCluster::setFirstStripAssociationIndex( Int_t val ) { mFirstStripAssociationIdx = val; };
134 inline void StMuFgtCluster::setCharge( Float_t val ){ mCharge = val; };
135 inline void StMuFgtCluster::setChargeUncert( Float_t val ){ mChargeUncert = val; };
136 inline void StMuFgtCluster::setR( Float_t val ){ mR = val; };
137 inline void StMuFgtCluster::setErrR( Float_t val ){ mErrR = val; };
138 inline void StMuFgtCluster::setPhi( Float_t val ){ mPhi = val; };
139 inline void StMuFgtCluster::setErrPhi( Float_t val ){ mErrPhi = val; };
140 inline void StMuFgtCluster::setEvenOddChargeAsy( Float_t val ){ mEvenOddChargeAsy = val; };
141 
142 #endif