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