StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetSkimEvent.h
1 // -*- mode:c++ -*-
2 //StJetSkimEvent
3 //M.L. Miller (MIT)
4 //12/06
5 
6 #ifndef StJetSkimEvent_HH
7 #define StJetSkimEvent_HH
8 
9 #include "TObject.h"
10 #include "TClonesArray.h"
11 #include "TArrayI.h"
12 #include "TObjString.h"
13 #include "TRef.h"
14 #include "TLorentzVector.h"
15 #include "TDatime.h"
16 #include "TTimeStamp.h"
17 
18 class StPythiaEvent;
19 
20 #include <map>
21 
22 using namespace std;
23 
24 class StJetSkimTrigHeader : public TObject
25 {
26 public:
29  virtual ~StJetSkimTrigHeader();
30  StJetSkimTrigHeader& operator=(const StJetSkimTrigHeader & rhs);
31 
32  void Clear(const char *option="");
33 
34  Int_t runId;
35  Int_t trigId;
36 
37  Float_t prescale;
38 
39  Int_t eastBarrelTowerThreshold;
40  Int_t eastBarrelTriggerPatchThreshold;
41  Int_t eastBarrelJetPatchThreshold;
42 
43  Int_t westBarrelTowerThreshold;
44  Int_t westBarrelTriggerPatchThreshold;
45  Int_t westBarrelJetPatchThreshold;
46 
47  Int_t endcapTowerThreshold;
48  Int_t endcapTriggerPatchThreshold;
49  Int_t endcapJetPatchThreshold;
50 
51  Int_t totalEnergyThreshold;
52 
53 private:
54  void init();
55 
56  ClassDef(StJetSkimTrigHeader,1);
57 };
58 
59 class StJetSkimTrig : public TObject
60 {
61 public:
62  StJetSkimTrig();
63  StJetSkimTrig(const StJetSkimTrig& other);
64  virtual ~StJetSkimTrig();
65  StJetSkimTrig& operator=(const StJetSkimTrig& rhs);
66 
67  void clear();
68  void Clear(const char *option="");
69 
70  int trigId() const;
71  bool didFire() const;
72  int shouldFire() const;
73  int shouldFireBBC() const;
74  int shouldFireBemc() const;
75  int shouldFireEemc() const;
76  int shouldFireL2() const;
77 
78  //detector: 0 == BEMC, 1 == EEMC
79  map<int,int>& towersAboveThreshold(int detector) const;
80  map<int,int>& triggerPatchesAboveThreshold(int detector) const;
81  map<int,int>& jetPatchesAboveThreshold(int detector) const;
82 
83  int totalEnergy() const;
84 
85  const int* L2ResultEmulated() const;
86 
87  //setters
88  void setTrigId(int aTrigId);
89  void setDidFire(bool aFire);
90  void setShouldFire(int aFire);
91  void setShouldFireBBC(int aFireBBC);
92  void setShouldFireBemc(int aFireBemc);
93  void setShouldFireEemc(int aFireEemc);
94  void setShouldFireL2(int aFireL2);
95 
96  //detector: 0 == BEMC, 1 == EEMC
97  void addTowerAboveThreshold(int detector, int aID, int aADC);
98  void addTriggerPatchAboveThreshold(int detector, int aID, int aADC);
99  void addJetPatchAboveThreshold(int detector, int aID, int aADC);
100 
101  void setTotalEnergy(int aEnergy);
102 
103  void setL2ResultEmulated(const int* rhs);
104 
105 private:
106  void init();
107 
108  Int_t mTrigId;
109  Int_t mDidFire;
110  Int_t mShouldFire;
111  Int_t mShouldFireBBC;
112  Int_t mShouldFireBemc;
113  Int_t mShouldFireEemc;
114  Int_t mShouldFireL2;
115 
116  map<int,int> mTowers;
117  map<int,int> mTriggerPatches;
118  map<int,int> mJetPatches;
119 
120  Int_t mTotalEnergy;
121 
122  int mL2ResultEmulated[64];
123 
124  ClassDef(StJetSkimTrig,5);
125 };
126 
127 inline int StJetSkimTrig::trigId() const {return mTrigId;}
128 inline bool StJetSkimTrig::didFire() const {return mDidFire > 0;}
129 inline int StJetSkimTrig::shouldFire() const {return mShouldFire;}
130 inline int StJetSkimTrig::shouldFireBBC() const {return mShouldFireBBC;}
131 inline int StJetSkimTrig::shouldFireBemc() const {return mShouldFireBemc;}
132 inline int StJetSkimTrig::shouldFireEemc() const {return mShouldFireEemc;}
133 inline int StJetSkimTrig::shouldFireL2() const {return mShouldFireL2;}
134 inline int StJetSkimTrig::totalEnergy() const {return mTotalEnergy;}
135 inline const int* StJetSkimTrig::L2ResultEmulated() const {return mL2ResultEmulated;}
136 
137 inline void StJetSkimTrig::setTrigId(int aTrigId) {mTrigId = aTrigId;}
138 inline void StJetSkimTrig::setDidFire(bool aFire) {mDidFire = aFire;}
139 inline void StJetSkimTrig::setShouldFire(int aFire) {mShouldFire = aFire;}
140 inline void StJetSkimTrig::setShouldFireBBC(int aFireBBC) {mShouldFireBBC = aFireBBC;}
141 inline void StJetSkimTrig::setShouldFireBemc(int aFireBemc) {mShouldFireBemc = aFireBemc;}
142 inline void StJetSkimTrig::setShouldFireEemc(int aFireEemc) {mShouldFireEemc = aFireEemc;}
143 inline void StJetSkimTrig::setShouldFireL2(int aFireL2) {mShouldFireL2 = aFireL2;}
144 inline void StJetSkimTrig::setTotalEnergy(int aEnergy) {mTotalEnergy = aEnergy;}
145 
146 class StJetSkimVert : public TObject {
147 
148 public:
149  StJetSkimVert();
150  virtual ~StJetSkimVert() {};
151 
152  //action
153  void clear();
154  void Clear(const char *option="");
155  bool operator==(const StJetSkimVert &rhs) const;
156 
157  //sets
158  void setPosition(float* x);
159  void setError(float* y);
160 
161  void setVertexFinderId(int i) {mVertexFinderId = i;}
162  void setRanking(Float_t i) { mRanking = i;}
163  void setNTracksUsed(UShort_t i) {mNTracksUsed = i;}
164  void setNBTOFMatch(UShort_t i) { mNBTOFMatch = i;}
165  void setNCTBMatch(UShort_t i) { mNCTBMatch = i;}
166  void setNBEMCMatch(UShort_t i) { mNBEMCMatch = i;}
167  void setNEEMCMatch(UShort_t i) { mNEEMCMatch = i;}
168  void setNCrossingCentralMembrane(UShort_t i) { mNCrossCentralMembrane = i;}
169  void setSumTrackPt(Float_t i) { mSumTrackPt = i;}
170  void setMeanDip(Float_t i) { mMeanDip = i;}
171  void setChiSquared(Float_t i) { mChiSquared = i;}
172 
173  // RefMult fields
174  void setRefMultNeg( UShort_t i) { mRefMultNeg = i;}
175  void setRefMultPos(UShort_t i) { mRefMultPos = i;}
176  void setRefMultFtpcWest(UShort_t i) { mRefMultFtpcWest = i;}
177  void setRefMultFtpcEast( UShort_t i) { mRefMultFtpcEast = i;}
178 
179  //gets
180  float x() const { return mPosition[0]; }
181  float y() const { return mPosition[1]; }
182  float z() const { return mPosition[2]; }
183  float dx() const { return mPosError[0]; }
184  float dy() const { return mPosError[1]; }
185  float dz() const { return mPosError[2]; }
186  const float* position() const { return mPosition;}
187  const float* posError() const { return mPosError;}
188  int vertexFinderId() const { return mVertexFinderId;}
189  Float_t ranking() const { return mRanking;}
190  UShort_t nTracksUsed() const { return mNTracksUsed;}
191  UShort_t nBTOFMatch() const { return mNBTOFMatch;}
192  UShort_t nCTBMatch() const { return mNCTBMatch;}
193  UShort_t nBEMCMatch() const { return mNBEMCMatch;}
194  UShort_t nEEMCMatch() const { return mNEEMCMatch;}
195  UShort_t nCrossCentralMembrane() const {return mNCrossCentralMembrane;}
196  Float_t sumTrackPt() const { return mSumTrackPt; }
197  Float_t meanDip() const { return mMeanDip; }
198  Float_t chiSquared() const { return mChiSquared; }
199 
200  UShort_t refMultPos() const { return mRefMultPos; }
201  UShort_t refMultNeg() const { return mRefMultNeg; }
202  UShort_t refMult() const { return refMultPos() + refMultNeg(); }
203  UShort_t refMultFtpcEast() const { return mRefMultFtpcEast; }
204  UShort_t refMultFtpcWest() const { return mRefMultFtpcWest; }
205  UShort_t refMultFtpc() const { return refMultFtpcEast() + refMultFtpcWest(); }
206 
207 private:
208 
209  float mPosition[3];
210  float mPosError[3];
211 
212  int mVertexFinderId;
213  Float_t mRanking;
214  UShort_t mNTracksUsed;
215  UShort_t mNBTOFMatch;
216  UShort_t mNCTBMatch;
217  UShort_t mNBEMCMatch;
218  UShort_t mNEEMCMatch;
219  UShort_t mNCrossCentralMembrane;
220  Float_t mSumTrackPt;
221  Float_t mMeanDip;
222  Float_t mChiSquared;
223 
224  // RefMult fields
225  UShort_t mRefMultNeg;
226  UShort_t mRefMultPos;
227  UShort_t mRefMultFtpcWest;
228  UShort_t mRefMultFtpcEast;
229 
230  ClassDef(StJetSkimVert,2);
231 };
232 
233 class StJetSkimEvent : public TObject {
234 public:
235  StJetSkimEvent();
236  StJetSkimEvent(const StJetSkimEvent &other);
237  virtual ~StJetSkimEvent();
238  StJetSkimEvent& operator=(const StJetSkimEvent &rhs);
239 
240  //action
241  void clear();
242  void Clear(const char *option="");
243 
244  //sets
245  void setTrig(const StJetSkimTrig& );
246  void setVert(const StJetSkimVert& );
247 
248  void setTrigHeaderArray(TClonesArray* array) {mTrigHeaderArrayRef = array;}
249  void setTrigHeaderArray(TRef arrayRef) {mTrigHeaderArrayRef = arrayRef;}
250 
251  //these require vertices clones array to be filled first
252  void setBestVert(const StJetSkimVert & v);
253  void setBestVert(int clonesArrayIndex);
254 
255  void setFill(float i) {mFill = i;}
256  void setRunId(int i) {mRunId = i;}
257  void setEventId(int i) {mEventId = i;}
258  void setMudstFileName(const TObjString& i) {mMudstFileName = i;}
259 
260  void setBx7(int i) {mbx7 = i;}
261  void setBx48(int i) {mbx48 = i;}
262  void setSpinBits(int i) {mSpinBits = i;}
263 
264  void setEbbc(int i) {mEbbc = i;}
265  void setWbbc(int i) {mWbbc = i;}
266  void setBbcTimeBin(int i) {mBbcTimeBin = i;}
267 
268  void setVpdTdiff (float x) {mVpdTdiff = x;}
269  void setVpdZvertex(float x) {mVpdZvertex = x;}
270  void setVpdEastHits(int i) {mVpdEastHits = i;}
271  void setVpdWestHits(int i) {mVpdWestHits = i;}
272 
273  void setTstart (float x) {mTstart = x;}
274 
275  void setZdcWestRate(float x) { mZdcWestRate = x; }
276  void setZdcEastRate(float x) { mZdcEastRate = x; }
277  void setZdcCoincidenceRate(float x) { mZdcCoincidenceRate = x; }
278 
279  void setBbcWestRate(float x) { mBbcWestRate = x; }
280  void setBbcEastRate(float x) { mBbcEastRate = x; }
281  void setBbcCoincidenceRate(float x) { mBbcCoincidenceRate = x; }
282 
283  void setIsValid(int i) {mIsValid = i;}
284  void setIsPolLong(int i) {mIsPolLong = i;}
285  void setIsPolTrans(int i) {mIsPolTrans = i;}
286  void setIsMaskedUsingBx48(int i) {mIsMaskedUsingBx48 = i;}
287  void setOffsetBx48minusBX7(int i) {mOffsetBx48minusBX7 = i;}
288  void setSpin4UsingBx48(int i) {mSpin4usingBx48 = i;}
289  void setL2Result(const int* rhs);
290  void setMcEvent(const StPythiaEvent *ptr) {mMcEvent = ptr;}
291 
292  void setNTzero(short n) { mNTzero = n; }
293  void setNTzeroCan(short nCan) { mNTzeroCan = nCan; }
294  void setTCanFirst(double tFirst) { mTCanFirst = tFirst; }
295  void setTCanLast(double tLast) { mTCanLast = tLast; }
296  void setNVpdEGoodHits(int vpdEGoodHits) { mNVpdEGoodHits = vpdEGoodHits; }
297  void setNVpdWGoodHits(int vpdWGoodHits) { mNVpdWGoodHits = vpdWGoodHits; }
298  void setEarliestVpdEHit(int earliestVpdEHit) { mEarliestVpdEHit = earliestVpdEHit; }
299  void setEarliestVpdWHit(double earliestVpdWHit) { mEarliestVpdWHit = earliestVpdWHit; }
300  void setClosestVpdEHit(double closestVpdEHit) { mClosestVpdEHit = closestVpdEHit; }
301  void setClosestVpdWHit(double closestVpdWHit) { mClosestVpdWHit = closestVpdWHit; }
302  void setLatestVpdEHit(double latestVpdEHit) { mLatestVpdEHit = latestVpdEHit; }
303  void setLatestVpdWHit(double latestVpdWHit) { mLatestVpdWHit = latestVpdWHit; }
304 
305  //gets
306  float fill() const {return mFill;}
307  int runId() const {return mRunId;}
308  int eventId() const {return mEventId;}
309  TObjString mudstFileName() const {return mMudstFileName;}
310 
311  int bx7() const {return mbx7;}
312  int bx48() const {return mbx48;}
313  int spinBits() const {return mSpinBits;}
314 
315  int eBbc() const {return mEbbc;}
316  int wBbc() const {return mWbbc;}
317  int bbcTimeBin() const {return mBbcTimeBin;}
318 
319  float vpdTdiff() const {return mVpdTdiff;}
320  float vpdZvertex() const {return mVpdZvertex;}
321  int vpdEastHits() const {return mVpdEastHits;}
322  int vpdWestHits() const {return mVpdWestHits;}
323 
324  float zdcWestRate() const { return mZdcWestRate; }
325  float zdcEastRate() const { return mZdcEastRate; }
326  float zdcCoincidenceRate() const { return mZdcCoincidenceRate; }
327  float bbcWestRate() const { return mBbcWestRate; }
328  float bbcEastRate() const { return mBbcEastRate; }
329  float bbcCoincidenceRate() const { return mBbcCoincidenceRate; }
330 
331  int isValid() const {return mIsValid;}
332  int isPolLong() const {return mIsPolLong;}
333  int isPolTrans() const {return mIsPolTrans;}
334  int isMaskedUsingBx48() const {return mIsMaskedUsingBx48;}
335  int offsetBx48minusBX7() const {return mOffsetBx48minusBX7;}
336  int spin4usingBx48() const {return mSpin4usingBx48;}
337 
338  const TClonesArray* triggers() const {return mTriggers;}
339  TClonesArray* triggers() {return mTriggers;}
340  StJetSkimTrig* trigger(int trigId);
341 
342  TClonesArray* trigHeaders() {return (TClonesArray*)mTrigHeaderArrayRef.GetObject();}
343  StJetSkimTrigHeader* trigHeader(int trigId);
344 
345  const TClonesArray* vertices() const {return mVertices;}
346  StJetSkimVert* bestVert() const;
347 
348  const int* L2Result() const { return mL2Result; }
349 
350  const StPythiaEvent* mcEvent() const {return mMcEvent;}
351 
352  float tStart() const {return mTstart;}
353  short nTzero() const { return mNTzero; }
354  short nTzeroCan() const { return mNTzeroCan; }
355  double tCanFirst() const { return mTCanFirst; }
356  double tCanLast() const { return mTCanLast; }
357  int vpdEGoodHits() const { return mNVpdEGoodHits; }
358  int vpdWGoodHits() const { return mNVpdWGoodHits; }
359  double earliestVpdEHit() const { return mEarliestVpdEHit; }
360  double earliestVpdWHit() const { return mEarliestVpdWHit; }
361  double closestVpdEHit() const { return mClosestVpdEHit; }
362  double closestVpdWHit() const { return mClosestVpdWHit; }
363  double latestVpdEHit() const { return mLatestVpdEHit; }
364  double latestVpdWHit() const { return mLatestVpdWHit; }
365 
366  // Getters
367  int barrelJetPatchTh(int i) const;
368  int endcapJetPatchTh(int i) const;
369  int overlapJetPatchTh(int i) const;
370 
371  int barrelHighTowerTh(int i) const;
372  int endcapHighTowerTh(int i) const;
373 
374  int barrelJetPatchAdc(int jp) const;
375  int endcapJetPatchAdc(int jp) const;
376  int overlapJetPatchAdc(int jp) const;
377 
378  map<int,int> barrelJetPatchesAboveTh(int i) const;
379  map<int,int> endcapJetPatchesAboveTh(int i) const;
380  map<int,int> overlapJetPatchesAboveTh(int i) const;
381 
382  int emcLayer2() const;
383 
384  // See http://www.star.bnl.gov/public/trg/run2009/emc_recabling.pdf
385 
386  int BHT() const; // (Bit 0:3) Barrel HT bits (4 bits)
387  int EHT() const; // (Bit 4:5) Endcap HT bits (2 bits)
388  int JP1() const; // (Bit 6) JP1, unified over the BEMC+EEMC (1 bit)
389  int JP2() const; // (Bit 7) JP2, unified over the BEMC+EEMC (1 bit)
390  int BJP1() const; // (Bit 8) BJP1 for the 18 BEMC-only patches (1 bit)
391  int BJP2() const; // (Bit 9) BJP2 for the 18 BEMC-only patches (1 bit)
392  int EJP1() const; // (Bit 10) EJP1 for the 6 EEMC-only patches (1 bit)
393  int EJP2() const; // (Bit 11) EJP2 for the 6 EEMC-only patches (1 bit)
394  int AJP() const; // (Bit 12) AJP for BEMC and EEMC but NOT the boundary (1 bit)
395  int BAJP() const; // (Bit 13) BAJP for the BEMC-only patches (1 bit)
396  int EAJP() const; // (Bit 14) EAJP for the EEMC-only patches (1 bit)
397  int JP0() const; // (Bit 15) JP0, unified over the BEMC+EEMC
398 
399  // Changes for the run 13 Cabling
400  // See http://www.star.bnl.gov/public/trg/TSL/Software/EMC_032213.pdf
401  // Modified by Danny
402 
403  int EEMCdijet() const; // (Bit 9) EEMC-only JP0-based dijet trigger bit (1 bit)
404  int JP1dijet() const; // (Bit 11) JP1-based dijet trigger bit (1 bit)
405  int JP0dijet() const; // (Bit 12) JP0-based dijet trigger bit (1 bit)
406  int DAQ10k() const; // (Bit 14) DAQ10k trigger bit (1 bit)
407 
408  int BHT0() const;
409  int BHT1() const;
410  int BHT2() const;
411  int BHT3() const;
412 
413  int EHT0() const;
414  int EHT1() const;
415 
416  // Setters
417  void setBarrelJetPatchTh(int i, int value);
418  void setEndcapJetPatchTh(int i, int value);
419  void setOverlapJetPatchTh(int i, int value);
420 
421  void setBarrelHighTowerTh(int i, int value);
422  void setEndcapHighTowerTh(int i, int value);
423 
424  void setBarrelJetPatchAdc(int jp, int adc);
425  void setEndcapJetPatchAdc(int jp, int adc);
426  void setOverlapJetPatchAdc(int jp, int adc);
427 
428  void setEmcLayer2(int value);
429 
430  // Event time stamp (GMT)
431  const TDatime& dateTime() const { return mDatime; }
432  int year () const { return mDatime.GetYear (); }
433  int month () const { return mDatime.GetMonth (); }
434  int day () const { return mDatime.GetDay (); }
435  int hour () const { return mDatime.GetHour (); }
436  int minute() const { return mDatime.GetMinute(); }
437  int second() const { return mDatime.GetSecond(); }
438  //unsigned int unixTime() const { return mDatime.Convert(); }
439  time_t unixTime() const { TTimeStamp stamp(mDatime.GetYear(), mDatime.GetMonth(), mDatime.GetDay(), mDatime.GetHour(), mDatime.GetMinute(), mDatime.GetSecond()); return stamp.GetSec(); }
440 
441  void setDateTime(const TDatime& datime) { mDatime = datime; }
442 
443 private:
444  // returns value of bit from x at position pos
445  int btest(int x, int pos) const { return x >> pos & 1; }
446 
447  // returns n bits from x starting at position pos
448  int getbits(int x, int pos, int n) const { return x >> pos & ~(~0 << n); }
449 
450  // OR x with value starting at position pos
451  void setbits(int& x, int pos, int value) const { x |= value << pos; }
452 
453  float mFill;
454  int mRunId;
455  int mEventId;
456  TObjString mMudstFileName;
457  float mZdcWestRate;
458  float mZdcEastRate;
459  float mZdcCoincidenceRate;
460  float mBbcWestRate;
461  float mBbcEastRate;
462  float mBbcCoincidenceRate;
463 
464  TClonesArray* mTriggers;
465  TRef mTrigHeaderArrayRef;
466 
467  TClonesArray* mVertices;
468  StJetSkimVert* mBestVert;
469  TRef mBestVertRef;
470 
471  const StPythiaEvent* mMcEvent;
472 
473  //bunch x-ing info from MuDSt
474  int mbx7;
475  int mbx48;
476  int mSpinBits;
477 
478  //bbc info:
479  int mEbbc; //E-bbc summed ADC
480  int mWbbc; //W-bbc summed ADC
481  int mBbcTimeBin;
482 
483  //vpd info:
484  float mVpdTdiff;
485  float mVpdZvertex;
486  int mVpdEastHits;
487  int mVpdWestHits;
488 
489  int mNVpdEGoodHits;
490  int mNVpdWGoodHits;
491  double mEarliestVpdEHit;
492  double mEarliestVpdWHit;
493  double mClosestVpdEHit;
494  double mClosestVpdWHit;
495  double mLatestVpdEHit;
496  double mLatestVpdWHit;
497 
498  float mTstart; //start time either from VPD or start-less tof
499  short mNTzero; //Number of particles used for start-time calculations
500  short mNTzeroCan; //Number of candidate particles available for start-time calculations before outlier rejection
501  double mTCanFirst; //Earlies candidate particle in start-time calculations
502  double mTCanLast; //Latest candidat particle in start-time calculations
503 
504  //spin db
505  int mIsValid;
506  int mIsPolLong;
507  int mIsPolTrans;
508  int mIsMaskedUsingBx48;
509  int mOffsetBx48minusBX7;
510  int mSpin4usingBx48;
511 
514  int mL2Result[64];
515 
516  // For run 13 only saving a 4th JP threshold for the di-jet triggers
517  // For any other run this 4th space will be set to zero
518  // Care should be taken when calling the JP thresholds from the skim.root file
519  // in any additional code
520  // Modified by Danny
521 
522  //int mBarrelJetPatchTh[3];
523  //int mEndcapJetPatchTh[3];
524  int mBarrelJetPatchTh[4];
525  int mEndcapJetPatchTh[4];
526  int mOverlapJetPatchTh[3];
527 
528  int mBarrelHighTowerTh[4];
529  int mEndcapHighTowerTh[2];
530 
531  int mBarrelJetPatchAdc[18];
532  int mEndcapJetPatchAdc[6];
533  int mOverlapJetPatchAdc[6];
534 
535  int mEmcLayer2;
536 
537  TDatime mDatime;
538 
539  ClassDef(StJetSkimEvent,8);
540 };
541 
542 // Getters
543 inline int StJetSkimEvent::barrelJetPatchTh(int i) const { return mBarrelJetPatchTh[i]; }
544 inline int StJetSkimEvent::endcapJetPatchTh(int i) const { return mEndcapJetPatchTh[i]; }
545 inline int StJetSkimEvent::overlapJetPatchTh(int i) const { return mOverlapJetPatchTh[i]; }
546 
547 inline int StJetSkimEvent::barrelHighTowerTh(int i) const { return mBarrelHighTowerTh[i]; }
548 inline int StJetSkimEvent::endcapHighTowerTh(int i) const { return mEndcapHighTowerTh[i]; }
549 
550 inline int StJetSkimEvent::barrelJetPatchAdc(int jp) const { return mBarrelJetPatchAdc[jp]; }
551 inline int StJetSkimEvent::endcapJetPatchAdc(int jp) const { return mEndcapJetPatchAdc[jp]; }
552 inline int StJetSkimEvent::overlapJetPatchAdc(int jp) const { return mOverlapJetPatchAdc[jp]; }
553 
554 inline int StJetSkimEvent::emcLayer2() const { return mEmcLayer2; }
555 
556 inline int StJetSkimEvent::BHT() const { return getbits(mEmcLayer2,0,4); }
557 inline int StJetSkimEvent::EHT() const { return getbits(mEmcLayer2,4,2); }
558 inline int StJetSkimEvent::JP1() const { return btest(mEmcLayer2,6); }
559 inline int StJetSkimEvent::JP2() const { return btest(mEmcLayer2,7); }
560 inline int StJetSkimEvent::BJP1() const { return btest(mEmcLayer2,8); }
561 inline int StJetSkimEvent::BJP2() const { return btest(mEmcLayer2,9); }
562 inline int StJetSkimEvent::EJP1() const { return btest(mEmcLayer2,10); }
563 inline int StJetSkimEvent::EJP2() const { return btest(mEmcLayer2,11); }
564 inline int StJetSkimEvent::AJP() const { return btest(mEmcLayer2,12); }
565 inline int StJetSkimEvent::BAJP() const { return btest(mEmcLayer2,13); }
566 inline int StJetSkimEvent::EAJP() const { return btest(mEmcLayer2,14); }
567 inline int StJetSkimEvent::JP0() const { return btest(mEmcLayer2,15); }
568 
569 // Additions for run 13
570 // Modified by Danny
571 
572 inline int StJetSkimEvent::EEMCdijet() const { return btest(mEmcLayer2,9); }
573 inline int StJetSkimEvent::JP1dijet() const { return btest(mEmcLayer2,11); }
574 inline int StJetSkimEvent::JP0dijet() const { return btest(mEmcLayer2,12); }
575 inline int StJetSkimEvent::DAQ10k() const { return btest(mEmcLayer2,14); }
576 
577 inline int StJetSkimEvent::BHT0() const { return btest(mEmcLayer2,0); }
578 inline int StJetSkimEvent::BHT1() const { return btest(mEmcLayer2,1); }
579 inline int StJetSkimEvent::BHT2() const { return btest(mEmcLayer2,2); }
580 inline int StJetSkimEvent::BHT3() const { return btest(mEmcLayer2,3); }
581 
582 inline int StJetSkimEvent::EHT0() const { return btest(mEmcLayer2,4); }
583 inline int StJetSkimEvent::EHT1() const { return btest(mEmcLayer2,5); }
584 
585 // Setters
586 inline void StJetSkimEvent::setBarrelJetPatchTh(int i, int value) { mBarrelJetPatchTh[i] = value; }
587 inline void StJetSkimEvent::setEndcapJetPatchTh(int i, int value) { mEndcapJetPatchTh[i] = value; }
588 inline void StJetSkimEvent::setOverlapJetPatchTh(int i, int value) { mOverlapJetPatchTh[i] = value; }
589 
590 inline void StJetSkimEvent::setBarrelHighTowerTh(int i, int value) { mBarrelHighTowerTh[i] = value; }
591 inline void StJetSkimEvent::setEndcapHighTowerTh(int i, int value) { mEndcapHighTowerTh[i] = value; }
592 
593 inline void StJetSkimEvent::setBarrelJetPatchAdc(int jp, int adc) { mBarrelJetPatchAdc[jp] = adc; }
594 inline void StJetSkimEvent::setEndcapJetPatchAdc(int jp, int adc) { mEndcapJetPatchAdc[jp] = adc; }
595 inline void StJetSkimEvent::setOverlapJetPatchAdc(int jp, int adc) { mOverlapJetPatchAdc[jp] = adc; }
596 
597 inline void StJetSkimEvent::setEmcLayer2(int value) { mEmcLayer2 = value; }
598 
599 #endif