StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTriggerData2004.h
1 /***************************************************************************
2  *
3  * $Id: StTriggerData2004.h,v 2.12 2009/02/11 23:33:55 jeromel Exp $
4  *
5  * Author: Akio Ogawa, Feb 2004
6  ***************************************************************************
7  *
8  * Description: Concrete implementation of StTriggerData.
9  * For year 2004 only.
10  *
11  ***************************************************************************
12  *
13  * $Log: StTriggerData2004.h,v $
14  * Revision 2.12 2009/02/11 23:33:55 jeromel
15  * Modifications by Akio to support getDsm0_BEMCE and getDsm0_BEMCW as well as
16  * getDsm1_BEMC. However, use of const=0 impose implementation (was not done
17  * in years < 2009). Added methods with return 0.
18  *
19  * Revision 2.11 2006/09/20 00:44:56 ullrich
20  * Modified method to return length of L2 results.
21  *
22  * Revision 2.10 2006/09/19 22:53:55 ullrich
23  * Added access method to L2 results.
24  *
25  * Revision 2.9 2006/09/13 23:59:55 ullrich
26  * Added new data member mRun. Removed arg run from ctb(), ctbTraySlat(), zdcSMD()
27  *
28  * Revision 2.8 2006/08/21 19:41:51 ullrich
29  * Add run number as argument to ctb(), ctbTray(), and zdcSMD(). Used 2005 only. (Akio)
30  *
31  * Revision 2.7 2004/11/30 19:19:12 ullrich
32  * Added new access function for EEMC data (Akio).
33  *
34  * Revision 2.6 2004/10/20 18:56:22 ullrich
35  * Add method getRawSize().
36  *
37  * Revision 2.5 2004/08/03 17:22:16 ullrich
38  * Major update by Akio and Marco.
39  *
40  * Revision 2.4 2004/07/20 18:02:26 jeromel
41  * Updates from Akio to fix CTB issues.
42  *
43  * Revision 2.3 2004/02/11 01:39:52 ullrich
44  * Use enumeration StBeamDirector for east/west. Add member for ZDC vertex.
45  *
46  * Revision 2.2 2004/01/28 00:29:49 ullrich
47  * Methods to retrieve ZDC data added.
48  *
49  * Revision 2.1 2003/12/23 21:56:52 ullrich
50  * Initial Revision.
51  *
52  *
53  **************************************************************************/
54 #ifndef StTriggerData2004_hh
55 #define StTriggerData2004_hh
56 
57 #include "StTriggerData.h"
58 
59 struct TrgDataType2004;
60 
62 public:
64  StTriggerData2004(const TrgDataType2004*, int run);
66 
67  void dump() const; //dump data into text
68 
69  // versison and data type information
70  unsigned int version() const;
71  unsigned int numberOfPreXing() const;
72  unsigned int numberOfPostXing() const;
73 
74  // generic Trigger infomations
75  unsigned int token() const;
76  unsigned int triggerWord() const;
77  unsigned int actionWord() const;
78  unsigned short busyStatus() const;
79  unsigned short dsmInput() const;
80  unsigned short trgToken() const;
81  unsigned short dsmAddress() const;
82  unsigned short mAddBits() const;
83  unsigned short bcData(int channel) const;
84 
85  // bunch and spin bits
86  unsigned int bunchCounterHigh() const;
87  unsigned int bunchCounterLow() const;
88  unsigned int bunchId48Bit() const;
89  unsigned int bunchId7Bit() const;
90  unsigned int spinBit() const;
91  unsigned int spinBitYellowFilled() const;
92  unsigned int spinBitYellowUp() const;
93  unsigned int spinBitYellowDown() const;
94  unsigned int spinBitYellowUnpol() const;
95  unsigned int spinBitBlueFilled() const;
96  unsigned int spinBitBlueUp() const;
97  unsigned int spinBitBlueDown() const;
98  unsigned int spinBitBlueUnpol() const;
99 
100  // High Level Trigger info
101  unsigned short tcuBits() const;
102  unsigned short lastDSM(int address) const;
103  unsigned short bemcLayer1DSM(int channel, int prepost=0) const;
104  unsigned short eemcLayer1DSM(int channel, int prepost=0) const;
105  unsigned short emcLayer2DSM(int channel) const;
106  unsigned short fpdLayer1DSMRaw(StBeamDirection eastwest, int channel, int prepost=0) const;
107  unsigned short fpdLayer1DSM(StBeamDirection eastwest, int module, int board, int prepost=0) const;
108  unsigned short fpdLayer2DSMRaw(int channel) const;
109  unsigned short fpdLayer2DSM(StBeamDirection eastwest, int module) const;
110 
111  // CTB
112  unsigned short ctbRaw(int address, int prepost=0) const;
113  unsigned short ctb(int pmt, int prepost=0) const;
114  unsigned short ctbTraySlat(int tray, int slat, int prepost=0) const;
115  unsigned short ctbSum(int prepost=0) const;
116 
117  // MWC
118  unsigned short mwc(int pmt, int prepost=0) const;
119 
120  // BBC
121  unsigned short bbcADC(StBeamDirection eastwest, int pmt, int prepost=0) const;
122  unsigned short bbcTDC(StBeamDirection eastwest, int pmt, int prepost=0) const;
123  unsigned short bbcADCSum(StBeamDirection eastwest, int prepost=0) const;
124  unsigned short bbcADCSumLargeTile(StBeamDirection eastwest, int prepost=0) const;
125  unsigned short bbcEarliestTDC(StBeamDirection eastwest, int prepost=0) const;
126  unsigned short bbcTimeDifference() const;
127 
128  // FPD
129  unsigned short fpd(StBeamDirection eastwest, int module, int pmt, int prepost=0) const;
130  unsigned short fpdSum(StBeamDirection eastwest, int module) const;
131 
132  //ZDC
133  unsigned short zdcAtChannel(int channel, int prepost=0) const;
134  unsigned short zdcAtAddress(int address, int prepost=0) const;
135  unsigned short zdcUnAttenuated(StBeamDirection eastwest, int prepost=0) const;
136  unsigned short zdcAttenuated(StBeamDirection eastwest, int prepost=0) const;
137  unsigned short zdcADC(StBeamDirection eastwest, int pmt, int prepost=0) const;
138  unsigned short zdcTDC(StBeamDirection eastwest, int prepost=0) const;
139  unsigned short zdcHardwareSum(int prepost=0) const;
140 
141  //ZDCSMD
142  unsigned short zdcSMD(StBeamDirection eastwest, int verthori, int strip, int prepost=0) const;
143 
144  // EMC
145  unsigned char bemcHighTower(int patch_id, int prepost=0) const;
146  unsigned char bemcJetPatch (int patch_id, int prepost=0) const;
147  unsigned char eemcHighTower(int patch_id, int prepost=0) const;
148  unsigned char eemcJetPatch (int patch_id, int prepost=0) const;
149  unsigned char bemcHighestTowerADC(int prepost=0) const;
150  unsigned char eemcHighestTowerADC(int prepost=0) const;
151 
152  // experts only
153  char* getTriggerStructure();
154  TrgDataType2004* getTriggerStructure2004();
155  int getRawSize() const;
156 
157  unsigned char* getDsm0_BEMCE(int prepost=0) const { return 0;}
158  unsigned char* getDsm0_BEMCW(int prepost=0) const { return 0;}
159  unsigned char * getDsm0_EEMC(int prepost=0) const;
160  unsigned short int* getDsm1_BEMC(int prepost=0) const { return 0;}
161  unsigned short int * getDsm1_EEMC(int prepost=0) const;
162  unsigned short int * getDsm2_EMC() const;
163  unsigned short int * getDsm3() const;
164  unsigned int l2ResultLength() const;
165  const unsigned int* l2Result() const;
166 
167 protected:
168  TrgDataType2004 *mData;
169 
170  ClassDef(StTriggerData2004,1)
171 };
172 
173 #endif
174 
175 
176 
177 
178