StFms  0.0.0
FMS software in the STAR framework
StMuArrays.cxx
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * $Id: StMuArrays.cxx,v 1.31 2013/07/23 11:02:59 jeromel Exp $
4  * Author: Frank Laue, BNL, laue@bnl.gov
5  *
6  **************************************************************************/
7 #include "StMuArrays.h"
8 #include "stdio.h"
9 #include "assert.h"
10 
11 // ARRAY NAMES
12 //============================================================================================
13 const char* StMuArrays::arrayNames [__NALLARRAYS__ ] = {"MuEvent","PrimaryVertices",
14  "PrimaryTracks","GlobalTracks","OtherTracks","L3Tracks",
15  "RichSpectra","DetectorStates","L3AlgoAccept","L3AlgoReject",
16  "CovGlobTrack","CovPrimTrack","pp2pp","mtd",
17 #ifndef __NO_STRANGE_MUDST__
18 /*strangeArrayNames[__NSTRANGEARRAYS__]*/ "Event","McEvent",
19  "V0","McV0","V0Assoc",
20  "Xi","McXi","XiAssoc",
21  "Kink","McKink","KinkAssoc",
22  "StrangeCuts",
23 #endif
24 /*mcArrayNames[__NMCARRAYS__]*/ "StMuMcVertex","StMuMcTrack",
25 /*emcArrayNames [__NEMCARRAYS__ ]*/ "EmcTow",
26  "EmcPrs","EmcSmde",
27  "EmcSmdp",
28  "EEmcPrs","EEmcSmdu","EEmcSmdv",
29 /*pmdArrayNames [__NPMDARRAYS__ ]*/ "PmdHit","CpvHit",
30  "PmdCluster",
31  "CpvCluster",
32 /*fmsArrayNames [__NFMSARRAYS__ ]*/ "FmsHit","FmsCluster","FmsPoint",
33 /*tofArrayNames [__NTOFARRAYS__ ]*/ "TofHit","TofData",
34  "TofRawData",
35 /*btofArrayNames [__NBTOFARRAYS__ ]*/ "BTofHit","BTofRawHit","BTofHeader", // dongx
36 /*mtdArrayNames [__NMTDARRAYS__ ]*/ "MTDHit","MTDRawHit","MTDHeader",
37 /*fgtArrayNames [__NFGTARRAYS__ ]*/ "FgtStrip","FgtCluster","FgtStripAssociation","FgtAdc",
38  /*eztArrayNames [__NEZTARRAYS__ ]*/ "EztHead","EztTrig","EztETow","EztESmd","EztFpd"};
39 
40 #ifndef __NO_STRANGE_MUDST__
43 #else
45 #endif
54 
55 
56 // ARRAY TYPES
57 //============================================================================================
58 const char* StMuArrays::arrayTypes [__NALLARRAYS__ ] = {"StMuEvent","StMuPrimaryVertex",
59  "StMuTrack","StMuTrack","StMuTrack","StMuTrack",
60  "StRichSpectra","StDetectorState","StL3AlgorithmInfo","StL3AlgorithmInfo",
61  "StDcaGeometry","StMuPrimaryTrackCovariance","StMuRpsCollection","StMuMtdCollection",
62 #ifndef __NO_STRANGE_MUDST__
63 /*strangeArrayTypes[__NSTRANGEARRAYS__]*/ "StStrangeEvMuDst","StStrangeEvMuDst",
64  "StV0MuDst","StV0Mc","StStrangeAssoc",
65  "StXiMuDst","StXiMc","StStrangeAssoc",
66  "StKinkMuDst","StKinkMc","StStrangeAssoc",
67  "TCut",
68 #endif
69 /*mcArrayTypes[__NMCARRAYS__]*/ "StMuMcVertex","StMuMcTrack",
70 /*emcArrayTypes [__NEMCARRAYS__ ]*/ "StMuEmcTowerData","StMuEmcHit",
71  "StMuEmcHit","StMuEmcHit","StMuEmcHit","StMuEmcHit","StMuEmcHit",
72 /*pmdArrayTypes [__NPMDARRAYS__ ]*/ "StMuPmdHit","StMuPmdHit","StMuPmdCluster","StMuPmdCluster",
73 /*fmsArrayTypes [__NFMSARRAYS__ ]*/ "StMuFmsHit","StMuFmsCluster","StMuFmsPoint",
74 /*tofArrayTypes [__NTOFARRAYS__ ]*/ "StMuTofHit","StTofData","StTofRawData",
75 /*btofArrayTypes [__NBTOFARRAYS__ ]*/ "StMuBTofHit","StBTofRawHit","StBTofHeader", // dongx
76 /*mtdArrayNames [__NMTDARRAYS__ ]*/ "StMuMtdHit","StMuMtdRawHit","StMuMtdHeader",
77 /*fgtArrayTypes [__NFGTARRAYS__ ]*/ "StMuFgtStrip","StMuFgtCluster","StMuFgtStripAssociation","StMuFgtAdc",
78 /*eztArrayTypes [__NEZTARRAYS__ ]*/ "EztEventHeader","EztTrigBlob","EztEmcRawData","EztEmcRawData","EztFpdBlob"};
79 #ifndef __NO_STRANGE_MUDST__
82 #else
84 #endif
93 
94 // ARRAY SIZES
95 //============================================================================================
96 // These are intial sizes. Automatically resized if too small.
97 // Choosing too large initial values gives a performance penalty when reading
98 // only selected MuDst branches
99 int StMuArrays::arraySizes [__NALLARRAYS__ ] = {1,10,1000,1000,1000,1000,100,100,100,100, 1000,1000,1,1,
100 #ifndef __NO_STRANGE_MUDST__
101 /*strangeArraySizes[__NSTRANGEARRAYS__]*/ 1,1,1000,100,100,1000,100,100,1000,100,100,200,
102 #endif
103 /*mcArraySizes[__NMCARRAYS__]*/ 10,1000,
104 /*emcArraySizes [__NEMCARRAYS__ ]*/ 1,1000,1000,1000,1000,1000,1000,
105 /*pmdArraySizes [__NPMDARRAYS__ ]*/ 1000,1000,1000,1000,
106 /*fmsArraySizes [__NFMSARRAYS__ ]*/ 1,1,1,
107 /*tofArraySizes [__NTOFARRAYS__ ]*/ 100, 200, 1000,
108 /*btofArraySizes [__NBTOFARRAYS__ ]*/ 1000,1000,1, // dongx
109 /*mtdArraySizes [__NMTDARRAYS__ ]*/ 1000,1000,1,
110 /*fgtArraySizes [__NFGTARRAYS__ ]*/ 500, 50, 500, 2000,
111  /*eztArraySizes [__NEZTARRAYS__ ]*/ 1, 1, 1, 1, 1};
112 #ifndef __NO_STRANGE_MUDST__
115 #else
117 #endif
126 
127 // ARRAY COUNTERS
128 //============================================================================================
129 int StMuArrays::arrayCounters [__NALLARRAYS__ ] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,
130 #ifndef __NO_STRANGE_MUDST__
131 /*strangeArrayCounters[__NSTRANGEARRAYS__]*/ 0,0,0,0,0,0,0,0,0,0,0,0,
132 #endif
133 /*mcArrayCounterss [__NMCARRAYS__]*/ 0,0,
134 /*emcArrayCounters [__NEMCARRAYS__ ]*/ 0,0,0,0,0,0,0,
135 /*pmdArrayCounters [__NPMDARRAYS__ ]*/ 0,0,0,0,
136 /*fmsArrayCounters [__NFMSARRAYS__ ]*/ 0,0,0,
137 /*tofArrayCounters [__NTOFARRAYS__ ]*/ 0, 0, 0,
138 /*btofArrayCounters [__NBTOFARRAYS__ ]*/ 0, 0, 0, // dongx
139 /*mtdArrayCounters [__NMTDARRAYS__ ]*/ 0, 0, 0,
140 /*fgtArrayCounters [__NFGTARRAYS__ ]*/ 0, 0, 0, 0,
141  /*eztArrayCounters [__NEZTARRAYS__ ]*/ 0, 0, 0, 0, 0};
142 
144 #ifndef __NO_STRANGE_MUDST__
147 #else
149 #endif
158 
161 {
162 #ifndef __NO_STRANGE_MUDST__
164  printf("strangeArrayNames-arrayNames-__NARRAYS__ = %d\n",i);
165 #else
167  printf("mcArrayNames-arrayNames-__NARRAYS__ = %d\n",i);
168 #endif
169  assert(i==0);
170 }
171 
172 
173 
174 
175 
176 
177 
178 
179 
180 
181 
182 /***************************************************************************
183  *
184  * $Log: StMuArrays.cxx,v $
185  * Revision 1.31 2013/07/23 11:02:59 jeromel
186  * Undo changes (KF and other)
187  *
188  * Revision 1.29 2013/04/10 19:28:35 jeromel
189  * Step back to 04/04 version (van aware) - previous changes may be recoverred
190  *
191  * Revision 1.27 2013/01/08 22:57:33 sangalin
192  * Merged in FGT changes allowing for a variable number of timebins to be read out for each strip.
193  *
194  * Revision 1.26 2012/11/15 22:26:13 sangalin
195  * Added the FGT. Fixed bugs in array offsets for the MTD.
196  *
197  * Revision 1.25 2012/09/28 22:38:05 tone421
198  * Changed array stucture of MTD upon request of the TOF group. MTD arrays now on top level, rather than within __NARRAYS__
199  *
200  * Revision 1.24 2011/10/17 00:19:13 fisyak
201  * Active handing of IdTruth
202  *
203  * Revision 1.23 2011/05/04 19:51:31 tone421
204  * Added MTD infomation
205  *
206  * Revision 1.22 2011/04/08 01:25:50 fisyak
207  * Add branches for MC track and vertex information, add IdTruth to tracks and vertices, reserve a possiblity to remove Strange MuDst
208  *
209  * Revision 1.21 2010/05/26 04:25:50 tone421
210  * Added StTriggerData arrays in muevent and fixed an issue with PMD arrays being read....
211  *
212  * Revision 1.20 2010/01/25 03:57:39 tone421
213  * Added FMS and Roman pot arrays
214  *
215  * Revision 1.19 2009/02/20 16:37:43 tone421
216  * *** empty log message ***
217  *
218  * Revision 1.17 2008/03/19 14:51:03 fisyak
219  * Add two clone arrays for global and primary track covariance matrices, remove mSigmaDcaD and mSigmaDcaZ
220  *
221  * Revision 1.16 2005/07/15 21:45:08 mvl
222  * Added support for multiple primary vertices (StMuPrimaryVertex). Track Dcas are now calculated with repect to the first vertex in the list (highest rank), but another vertex number can be specified. Tarcks also store the index of the vertex they belong to (StMuTrack::vertexIndex())
223  *
224  * Revision 1.15 2005/04/12 21:56:29 mvl
225  * Changes by Xin Dong for year-5 TOF data format: extra TClonesArray and routines to fill it from StEvent (StTofRawData).
226  *
227  * Revision 1.14 2004/11/29 15:53:21 mvl
228  * Additions by Jan for Fpd ezTree
229  *
230  * Revision 1.13 2004/10/28 00:11:32 mvl
231  * Added stuff to support ezTree mode of MuDstMaker.
232  * This is a special mode for fast-online processing of fast-detector data.
233  *
234  * Revision 1.12 2004/10/19 01:43:05 mvl
235  * Changes for splitting Emc and Pmd collections
236  *
237  * Revision 1.11 2004/05/04 00:10:28 perev
238  * Cleanup
239  *
240  * Revision 1.10 2004/04/26 00:13:28 perev
241  * Cleanup+simplification
242  *
243  * Revision 1.9 2004/04/09 22:06:39 subhasis
244  * after tof createevent fix by Xin
245  *
246  * Revision 1.8 2004/04/09 03:36:14 jeromel
247  * Removed TOF support entirely for now as we need a working version ... Will
248  * revisit later.
249  *
250  * Revision 1.7 2004/04/02 03:24:53 jeromel
251  * Changes implements PMD and TOF. TOF is clearly incomplete.
252  *
253  * Revision 1.6 2003/01/09 18:59:45 laue
254  * initial check in of new EMC classes and the changes required
255  *
256  * Revision 1.5 2002/05/20 17:23:31 laue
257  * StStrangeCuts added
258  *
259  * Revision 1.4 2002/04/15 22:29:28 laue
260  * updates
261  *
262  * Revision 1.2 2002/04/11 14:19:30 laue
263  * - update for RH 7.2
264  * - decrease default arrays sizes
265  * - add data base readerfor number of events in a file
266  *
267  * Revision 1.1 2002/03/08 17:04:17 laue
268  * initial revision
269  *
270  *
271  **************************************************************************/
272 
273 
274 
275 
276 
277 
278 
279 
280 
281 
282 
283 
284 
285 
286 
287 
288 
289 
static int * mcArrayCounters
Definition: StMuArrays.h:126
static const char ** pmdArrayNames
Definition: StMuArrays.h:83
static int * strangeArraySizes
Definition: StMuArrays.h:109
static const char ** fgtArrayNames
Definition: StMuArrays.h:88
static int arraySizes[__NALLARRAYS__]
< maximum sizes of the TClonesArrays
Definition: StMuArrays.h:107
static int * btofArraySizes
Definition: StMuArrays.h:116
static const char ** btofArrayTypes
Definition: StMuArrays.h:101
static const char * arrayTypes[__NALLARRAYS__]
< names of the classes, the TClonesArrays are arrays of this type
Definition: StMuArrays.h:92
static int * tofArrayCounters
Definition: StMuArrays.h:130
static const char ** fmsArrayTypes
Definition: StMuArrays.h:99
static const char ** pmdArrayTypes
Definition: StMuArrays.h:98
size of the tof arrays >
Definition: StMuArrays.h:59
static int * emcArraySizes
Definition: StMuArrays.h:112
static const char ** fmsArrayNames
Definition: StMuArrays.h:84
static const char ** fgtArrayTypes
Definition: StMuArrays.h:103
static int * fgtArrayCounters
Definition: StMuArrays.h:133
static const char ** tofArrayNames
Definition: StMuArrays.h:85
static int * eztArrayCounters
Definition: StMuArrays.h:134
static const char ** eztArrayNames
Definition: StMuArrays.h:89
static const char ** eztArrayTypes
Definition: StMuArrays.h:104
static const char * arrayNames[__NALLARRAYS__]
Definition: StMuArrays.h:77
size of the fms arrays, i.e. number of TClonesArrays
Definition: StMuArrays.h:57
size of the pmd arrays, i.e. number of TClonesArrays
Definition: StMuArrays.h:56
static const char ** emcArrayTypes
Definition: StMuArrays.h:97
static int * btofArrayCounters
Definition: StMuArrays.h:131
static const char ** strangeArrayTypes
Definition: StMuArrays.h:94
static int * eztArraySizes
Definition: StMuArrays.h:119
static const char ** emcArrayNames
Definition: StMuArrays.h:82
static int * mcArraySizes
Definition: StMuArrays.h:111
static const char ** mcArrayTypes
Definition: StMuArrays.h:96
StMuArrays()
names of the TBranches in the TTree/File
Definition: StMuArrays.cxx:160
static const char ** mtdArrayNames
Definition: StMuArrays.h:87
static const char ** btofArrayNames
Definition: StMuArrays.h:86
static int arrayCounters[__NALLARRAYS__]
< number of entries in current event, currently not used
Definition: StMuArrays.h:122
size of the strangeness arrays, i.e. number of TClonesArrays
Definition: StMuArrays.h:52
static int * fmsArraySizes
Definition: StMuArrays.h:114
static int * fmsArrayCounters
Definition: StMuArrays.h:129
size of the fgt arrays, i.e. number of TClonesArrays
Definition: StMuArrays.h:62
StMuArrays test
Definition: StMuArrays.cxx:143
size of the 'regular stuff' arrays, i.e. number of TClonesArrays (add two more for global and primary...
Definition: StMuArrays.h:50
ClassImp(StMuArrays)
static int * mtdArrayCounters
Definition: StMuArrays.h:132
static int * fgtArraySizes
Definition: StMuArrays.h:118
size of the emc arrays, i.e. number of TClonesArrays
Definition: StMuArrays.h:55
static const char ** strangeArrayNames
Definition: StMuArrays.h:79
static const char ** mcArrayNames
Definition: StMuArrays.h:81
size of the MCness arrays, i.e. number of TClonesArrays
Definition: StMuArrays.h:54
static const char ** mtdArrayTypes
Definition: StMuArrays.h:102
static int * emcArrayCounters
Definition: StMuArrays.h:127
static int * pmdArrayCounters
Definition: StMuArrays.h:128
static int * pmdArraySizes
Definition: StMuArrays.h:113
static int * strangeArrayCounters
Definition: StMuArrays.h:124
static const char ** tofArrayTypes
Definition: StMuArrays.h:100
static int * tofArraySizes
Definition: StMuArrays.h:115
static int * mtdArraySizes
Definition: StMuArrays.h:117