StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StStrangeEvMuDst.hh
1 
10 #ifndef StStrangeEvMuDst_hh
11 #define StStrangeEvMuDst_hh
12 #include "StStrangeMuDst.hh"
13 #include "TMath.h"
14 #include "stdlib.h"
15 
16 
17 class StEvent;
18 class StMcEvent;
19 
21  friend class StMuMomentumShiftMaker;
22 
23 public:
28  void Clear();
29  void Clear(Option_t* option) {TObject::Clear(option);}
30 
31  static void SetCorrectionFile(char*);
32  static void SetFractionFile(char*);
33 
35 
36  Int_t run() const;
39  Int_t event() const;
41  Bool_t unbiasedTrigger() const;
43  UInt_t l0TriggerWord() const;
45  Bool_t ftpcGoodRun();
46  Float_t primaryVertexX() const;
47  Float_t primaryVertexY() const;
48  Float_t primaryVertexZ() const;
50  Float_t magneticField() const;
52 
54 
55  Int_t globalTracks() const;
56  Int_t tpcTracks() const;
57  Int_t ftpcEastTracks() const;
58  Int_t ftpcWestTracks() const;
59  Int_t primaryTracks() const;
60  Int_t tpcPrimTracks() const;
61  Int_t ftpcEastPrimTracks() const;
62  Int_t ftpcWestPrimTracks() const;
63  Int_t primaryNegTracks() const;
64  Float_t primaryCorrectedTracks() const;
66  UInt_t zdcWestADC() const;
68  Float_t fractionSigma() const;
70 
72 
73  void Fill(StEvent&);
74  void Fill(StMcEvent&);
75  void setMagneticField(Float_t);
76  void setL0TriggerWord(UInt_t);
77  void setGlobalTracks(Int_t);
78  void setPrimaryTracks(Int_t);
80  void tagRunNumber(Int_t);
82 
83 
84 protected:
85  // These are written out
87  Int_t mRun;
89  Int_t mEvent;
90  Float_t mPrimaryVertexX;
91  Float_t mPrimaryVertexY;
92  Float_t mPrimaryVertexZ;
93  Int_t mGlobalTracks;
94  Int_t mPrimaryTracks;
95  Int_t mPrimaryNegTracks;
96  Float_t mMagneticField;
97  UInt_t mL0TriggerWord;
98 
99 private:
100 
101  Int_t FTPC(const Int_t) const;
102 
103  ClassDef(StStrangeEvMuDst,8)
104 };
105 
106 inline StStrangeEvMuDst::StStrangeEvMuDst(StEvent& event)
107  { Fill(event); }
108 inline StStrangeEvMuDst::StStrangeEvMuDst(StMcEvent& event)
109  { Fill(event); }
110 
111 inline void StStrangeEvMuDst::tagRunNumber(Int_t r)
112  { mRun = - TMath::Abs(r); }
114  { return (mRun > 0); }
115 
116 inline Int_t StStrangeEvMuDst::run() const
117  { return TMath::Abs(mRun); }
118 inline Int_t StStrangeEvMuDst::event() const
119  { return TMath::Abs(mEvent); }
121  { return (mEvent > 0); }
122 inline UInt_t StStrangeEvMuDst::l0TriggerWord() const
123  { return ((run() < 3999999) ? mL0TriggerWord :
124  (UInt_t) mL0TriggerWord%100000); }
125 inline UInt_t StStrangeEvMuDst::zdcWestADC() const
126  { return ((run() < 3999999) ? 0U :
127  (UInt_t) mL0TriggerWord/100000); }
128 inline Float_t StStrangeEvMuDst::magneticField() const
129  { return mMagneticField; }
130 
131 inline Float_t StStrangeEvMuDst::primaryVertexX() const
132  { return mPrimaryVertexX; }
133 inline Float_t StStrangeEvMuDst::primaryVertexY() const
134  { return mPrimaryVertexY; }
135 inline Float_t StStrangeEvMuDst::primaryVertexZ() const
136  { return mPrimaryVertexZ; }
137 
138 // Store FTPCwest*724 + FTPCeast in most significant 19 bits (max = 723 each)
139 // Store main TPC in least significant 13 bits (max = 8191)
140 inline Int_t StStrangeEvMuDst::FTPC(const Int_t x) const
141  { return ((Int_t) (((UInt_t) x)>>13)); }
142 
143 inline Int_t StStrangeEvMuDst::globalTracks() const
144  { div_t ftpc = div(FTPC(mGlobalTracks),724);
145  return (tpcTracks() + ftpc.quot + ftpc.rem); }
146 inline Int_t StStrangeEvMuDst::tpcTracks() const
147  { return mGlobalTracks & 0x1fff; }
148 inline Int_t StStrangeEvMuDst::ftpcEastTracks() const
149  { return FTPC(mGlobalTracks)%724; }
150 inline Int_t StStrangeEvMuDst::ftpcWestTracks() const
151  { return FTPC(mGlobalTracks)/724; }
152 
153 inline Int_t StStrangeEvMuDst::primaryTracks() const
154  { div_t ftpc = div(FTPC(mPrimaryTracks),724);
155  return (tpcPrimTracks() + ftpc.quot + ftpc.rem); }
156 inline Int_t StStrangeEvMuDst::tpcPrimTracks() const
157  { return mPrimaryTracks & 0x1fff; }
158 inline Int_t StStrangeEvMuDst::ftpcEastPrimTracks() const
159  { return FTPC(mPrimaryTracks)%724; }
160 inline Int_t StStrangeEvMuDst::ftpcWestPrimTracks() const
161  { return FTPC(mPrimaryTracks)/724; }
162 inline Int_t StStrangeEvMuDst::primaryNegTracks() const
163  { return mPrimaryNegTracks; }
164 
165 inline void StStrangeEvMuDst::setMagneticField(Float_t b)
166  { mMagneticField = b; }
167 inline void StStrangeEvMuDst::setL0TriggerWord(UInt_t trgWrd)
168  { mL0TriggerWord = trgWrd; }
169 inline void StStrangeEvMuDst::setGlobalTracks(Int_t newGlob)
170  { mGlobalTracks = newGlob;}
171 inline void StStrangeEvMuDst::setPrimaryTracks(Int_t newPrim)
172  { mPrimaryTracks = newPrim;}
173 
174 #endif
175 
176 
177 /***********************************************************************
178  * $Id: StStrangeEvMuDst.hh,v 3.9 2005/03/17 05:06:51 genevb Exp $
179  * $Log: StStrangeEvMuDst.hh,v $
180  * Revision 3.9 2005/03/17 05:06:51 genevb
181  * Add StMuMomentumShiftMaker friend
182  *
183  * Revision 3.8 2003/05/30 21:20:19 genevb
184  * doxygen savvy, encoding of FTPC mults, change virtual funcs
185  *
186  * Revision 3.7 2003/02/10 16:00:29 genevb
187  * Implement cleared events
188  *
189  * Revision 3.6 2002/05/17 14:05:28 genevb
190  * Added L3 unbiased trigger info
191  *
192  * Revision 3.5 2002/04/30 16:02:48 genevb
193  * Common muDst, improved MC code, better kinks, StrangeCuts now a branch
194  *
195  * Revision 3.4 2001/11/05 23:41:06 genevb
196  * Add more dEdx, B field info, careful of changes to TTree unrolling
197  *
198  * Revision 3.3 2001/09/14 21:22:26 genevb
199  * Avoid hiding TObject::Clear()
200  *
201  * Revision 3.2 2001/08/23 13:20:54 genevb
202  * Many bug workarounds...
203  *
204  * Revision 3.1 2001/05/04 20:15:14 genevb
205  * Common interfaces and reorganization of components, add MC event info
206  *
207  * Revision 3.0 2000/07/14 12:56:49 genevb
208  * Revision 3 has event multiplicities and dedx information for vertex tracks
209  *
210  * Revision 2.1 2000/06/09 22:17:10 genevb
211  * Allow MC data to be copied between DSTs, other small improvements
212  *
213  * Revision 2.0 2000/06/02 22:11:54 genevb
214  * New version of Strangeness micro DST package
215  *
216  * Revision 1.3 2000/03/31 03:20:24 jones
217  * Added topology map to V0/Xi; access funcs for each data member
218  *
219  * Revision 1.2 2000/03/29 20:52:13 genevb
220  * Added StKinkMuDst, replaced arrays
221  *
222  * Revision 1.1 2000/03/29 03:10:07 genevb
223  * Int_troduction of Strangeness Micro DST package
224  *
225  ***********************************************************************/
static void SetFractionFile(char *)
Set files to use.
Int_t mRun
Negative mRun value for bad FTPC run (set via tagRunNumber())
Bool_t ftpcGoodRun()
Return whether FTPC information is good.
Float_t magneticField() const
Magnetic field.
virtual void Clear(Option_t *option="")
User defined functions.
Definition: StMaker.cxx:634
UInt_t l0TriggerWord() const
L0 trigger word.
void tagRunNumber(Int_t)
Set a neg value of the run number if FTPC information is bad.
Int_t mEvent
Negative mEvent value for L3Bias (automatic during Fill())
Bool_t unbiasedTrigger() const
Trigger bias.
Int_t run() const
Run number.
Float_t primaryVertexZ() const
Primary vtx position coordinates.
Float_t fractionSigma() const
Cross section fraction.
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
Definition: StMcEvent.hh:169
Int_t event() const
Event number.
UInt_t zdcWestADC() const
ADC value given by ZDC west (for pAu event tagging)