00001 #ifndef _AsciiData_h_ 00002 #define _AsciiData_h_ 00003 00004 #include <string> 00005 #include <iostream> 00006 #include <vector> 00007 00008 #include "dmplib.hh" 00009 00010 using std::string; 00011 00012 class FRMTVERSION : public Tagged { 00013 public: 00014 FRMTVERSION() {} ; 00015 public: 00016 int major; 00017 int minor; 00018 friend std::istream& operator>>(std::istream&, FRMTVERSION& x); 00019 friend std::ostream& operator<<(std::ostream&, const FRMTVERSION& x); 00020 }; 00021 00022 class EVHEAD : public Tagged { 00023 public: 00024 EVHEAD() {}; 00025 public: 00026 int runNo; 00027 int eventNo; 00028 friend std::istream& operator>>(std::istream&, EVHEAD& x); 00029 friend std::ostream& operator<<(std::ostream&, const EVHEAD& x); 00030 }; 00031 00032 class DECAYMODE : public Tagged { 00033 public: 00034 DECAYMODE () {}; 00035 public: 00036 int size; 00037 int data[10]; 00038 friend std::istream& operator>>(std::istream&, DECAYMODE& x); 00039 friend std::ostream& operator<<(std::ostream&, const DECAYMODE& x); 00040 }; 00041 00042 class TrackTruthType { 00043 public: 00044 TrackTruthType() {}; 00045 public: 00046 int trackIndex; 00047 int PDGCode; 00048 float PDGCharge; 00049 int v0Index; 00050 int v1Index; 00051 float px; 00052 float py; 00053 float pz; 00054 float E; 00055 int minDaughterIndex; 00056 int maxDaughterIndex; 00057 }; 00058 00059 class TRACKTRUTH : public Tagged { 00060 public: 00061 TRACKTRUTH() {}; 00062 public: 00063 int nTruth; 00064 std::vector<TrackTruthType> truthCol; 00065 friend std::istream& operator>>(std::istream&, TRACKTRUTH& x); 00066 friend std::ostream& operator<<(std::ostream&, const TRACKTRUTH& x); 00067 }; 00068 00069 class VertexTruthType { 00070 public: 00071 VertexTruthType() {}; 00072 public: 00073 int vertexIndex; 00074 int parentTrackIndex; 00075 float posX; 00076 float posY; 00077 float posZ; 00078 float time; 00079 }; 00080 00081 class VERTEXTRUTH : public Tagged { 00082 public: 00083 VERTEXTRUTH() {}; 00084 public: 00085 int nTruth; 00086 std::vector<VertexTruthType> truthCol; 00087 friend std::istream& operator>>(std::istream&, VERTEXTRUTH& x); 00088 friend std::ostream& operator<<(std::ostream&, const VERTEXTRUTH& x); 00089 }; 00090 00091 00092 class MdcTruthType { 00093 public: 00094 MdcTruthType() {}; 00095 public: 00096 int trackIndex; 00097 int layerNo; 00098 int cellNo; 00099 float edep; 00100 float driftD; 00101 float posX; 00102 float posY; 00103 float posZ; 00104 int posFlag; 00105 friend std::istream& operator>>(std::istream&, MdcTruthType& x); 00106 friend std::ostream& operator<<(std::ostream&, const MdcTruthType& x); 00107 }; 00108 00109 class MDCTRUTH : public Tagged { 00110 public: 00111 MDCTRUTH() {}; 00112 public: 00113 int nTruth; 00114 std::vector<MdcTruthType> truthCol; 00115 friend std::istream& operator>>(std::istream&, MDCTRUTH& x); 00116 friend std::ostream& operator<<(std::ostream&, const MDCTRUTH& x); 00117 }; 00118 00119 class TofTruthType { 00120 public: 00121 TofTruthType() {}; 00122 public: 00123 int trackIndex; 00124 int partId; 00125 int scinNb; 00126 float posX; 00127 float posY; 00128 float posZ; 00129 float px; 00130 float py; 00131 float pz; 00132 float trackL; 00133 float time; 00134 friend std::istream& operator>>(std::istream&, TofTruthType& x); 00135 friend std::ostream& operator<<(std::ostream&, const TofTruthType& x); 00136 }; 00137 00138 class TOFTRUTH : public Tagged { 00139 public: 00140 TOFTRUTH() {}; 00141 public: 00142 int nTruth; 00143 std::vector<TofTruthType> truthCol; 00144 friend std::istream& operator>>(std::istream&, TOFTRUTH& x); 00145 friend std::ostream& operator<<(std::ostream&, const TOFTRUTH& x); 00146 }; 00147 00148 class EmcTruthType { 00149 public: 00150 EmcTruthType() {}; 00151 public: 00152 int trackIndex; 00153 int partId; 00154 int numTheta; 00155 int numPhi; 00156 float posX; 00157 float posY; 00158 float posZ; 00159 float px; 00160 float py; 00161 float pz; 00162 float totalEdep; 00163 friend std::istream& operator>>(std::istream&, EmcTruthType& x); 00164 friend std::ostream& operator<<(std::ostream&, const EmcTruthType& x); 00165 }; 00166 00167 class EMCTRUTH : public Tagged { 00168 public: 00169 EMCTRUTH() {}; 00170 public: 00171 int nTruth; 00172 std::vector<EmcTruthType> truthCol; 00173 friend std::istream& operator>>(std::istream&, EMCTRUTH& x); 00174 friend std::ostream& operator<<(std::ostream&, const EMCTRUTH& x); 00175 }; 00176 00177 class MucTruthType { 00178 public: 00179 MucTruthType() {}; 00180 public: 00181 int trackIndex; 00182 int partId; 00183 int segId; 00184 int gapId; 00185 int stripId; 00186 float posX; 00187 float posY; 00188 float posZ; 00189 float px; 00190 float py; 00191 float pz; 00192 friend std::istream& operator>>(std::istream&, MucTruthType& x); 00193 friend std::ostream& operator<<(std::ostream&, const MucTruthType& x); 00194 }; 00195 00196 class MUCTRUTH : public Tagged { 00197 public: 00198 MUCTRUTH() {}; 00199 public: 00200 int nTruth; 00201 std::vector<MucTruthType> truthCol; 00202 friend std::istream& operator>>(std::istream&, MUCTRUTH& x); 00203 friend std::ostream& operator<<(std::ostream&, const MUCTRUTH& x); 00204 }; 00205 00206 class MdcDigiType { 00207 public: 00208 MdcDigiType() {}; 00209 public: 00210 int trackIndex; 00211 int layerNo; 00212 int cellNo; 00213 float energyDeposit; 00214 float driftTime; 00215 friend std::istream& operator>>(std::istream&, MdcDigiType& x); 00216 friend std::ostream& operator<<(std::ostream&, const MdcDigiType& x); 00217 }; 00218 00219 class MDCDIGI : public Tagged { 00220 public: 00221 MDCDIGI() {}; 00222 public: 00223 int nDigi; 00224 std::vector<MdcDigiType> digiCol; 00225 friend std::istream& operator>>(std::istream&, MDCDIGI& x); 00226 friend std::ostream& operator<<(std::ostream&, const MDCDIGI& x); 00227 }; 00228 00229 class MdcHitType { 00230 public: 00231 MdcHitType() {}; 00232 public: 00233 int trackIndex; 00234 int layerNo; 00235 int cellNo; 00236 float posX; 00237 float posY; 00238 float posZ; 00239 float energyDeposit; 00240 float driftDistance; 00241 float globalT; 00242 float theta; 00243 float enterAngle; 00244 float posFlag; 00245 friend std::istream& operator>>(std::istream&, MdcHitType& x); 00246 friend std::ostream& operator<<(std::ostream&, const MdcHitType& x); 00247 }; 00248 00249 class MDCHIT : public Tagged { 00250 public: 00251 MDCHIT() {}; 00252 public: 00253 int nHit; 00254 std::vector<MdcHitType> hitCol; 00255 friend std::istream& operator>>(std::istream&, MDCHIT& x); 00256 friend std::ostream& operator<<(std::ostream&, const MDCHIT& x); 00257 }; 00258 00259 class TofDigiType { 00260 public: 00261 TofDigiType() {}; 00262 public: 00263 int trackIndex; 00264 int partId; 00265 int scinNb; 00266 float forwADC; 00267 float forwTDC; 00268 float backADC; 00269 float backTDC; 00270 00271 friend std::istream& operator>>(std::istream&, TofDigiType& x); 00272 friend std::ostream& operator<<(std::ostream&, const TofDigiType& x); 00273 }; 00274 00275 class TOFDIGI : public Tagged { 00276 public: 00277 TOFDIGI() {}; 00278 public: 00279 int nDigi; 00280 std::vector<TofDigiType> digiCol; 00281 friend std::istream& operator>>(std::istream&, TOFDIGI& x); 00282 friend std::ostream& operator<<(std::ostream&, const TOFDIGI& x); 00283 }; 00284 00285 class TofHitType { 00286 public: 00287 TofHitType() {}; 00288 public: 00289 00290 friend std::istream& operator>>(std::istream&, TofHitType& x); 00291 friend std::ostream& operator<<(std::ostream&, const TofHitType& x); 00292 }; 00293 00294 class TOFHIT : public Tagged { 00295 public: 00296 TOFHIT() {}; 00297 public: 00298 int nHit; 00299 std::vector<TofHitType> hitCol; 00300 friend std::istream& operator>>(std::istream&, TOFHIT& x); 00301 friend std::ostream& operator<<(std::ostream&, const TOFHIT& x); 00302 }; 00303 00304 class EmcDigiType { 00305 public: 00306 EmcDigiType() {}; 00307 public: 00308 int trackIndex; 00309 int partId; 00310 int numTheta; 00311 int numPhi; 00312 float energyDeposit; 00313 float hitTime; 00314 friend std::istream& operator>>(std::istream&, EmcDigiType& x); 00315 friend std::ostream& operator<<(std::ostream&, const EmcDigiType& x); 00316 }; 00317 00318 class EMCDIGI : public Tagged { 00319 public: 00320 EMCDIGI() {}; 00321 public: 00322 int nDigi; 00323 std::vector<EmcDigiType> digiCol; 00324 friend std::istream& operator>>(std::istream&, EMCDIGI& x); 00325 friend std::ostream& operator<<(std::ostream&, const EMCDIGI& x); 00326 }; 00327 00328 class EmcHitType { 00329 public: 00330 EmcHitType() {}; 00331 public: 00332 00333 friend std::istream& operator>>(std::istream&, EmcHitType& x); 00334 friend std::ostream& operator<<(std::ostream&, const EmcHitType& x); 00335 }; 00336 00337 class EMCHIT : public Tagged { 00338 public: 00339 EMCHIT() {}; 00340 public: 00341 int nHit; 00342 std::vector<EmcHitType> hitCol; 00343 friend std::istream& operator>>(std::istream&, EMCHIT& x); 00344 friend std::ostream& operator<<(std::ostream&, const EMCHIT& x); 00345 }; 00346 00347 class MucDigiType { 00348 public: 00349 MucDigiType() {}; 00350 public: 00351 int trackIndex; 00352 int partNo; 00353 int segNo; 00354 int gapNo; 00355 int stripNo; 00356 friend std::istream& operator>>(std::istream&, MucDigiType& x); 00357 friend std::ostream& operator<<(std::ostream&, const MucDigiType& x); 00358 }; 00359 00360 class MUCDIGI : public Tagged { 00361 public: 00362 MUCDIGI() {}; 00363 public: 00364 int nDigi; 00365 std::vector<MucDigiType> digiCol; 00366 friend std::istream& operator>>(std::istream&, MUCDIGI& x); 00367 friend std::ostream& operator<<(std::ostream&, const MUCDIGI& x); 00368 }; 00369 00370 class MucHitType { 00371 public: 00372 MucHitType() {}; 00373 public: 00374 00375 friend std::istream& operator>>(std::istream&, MucHitType& x); 00376 friend std::ostream& operator<<(std::ostream&, const MucHitType& x); 00377 }; 00378 00379 class MUCHIT : public Tagged { 00380 public: 00381 MUCHIT() {}; 00382 public: 00383 int nHit; 00384 std::vector<MucHitType> hitCol; 00385 friend std::istream& operator>>(std::istream&, MUCHIT& x); 00386 friend std::ostream& operator<<(std::ostream&, const MUCHIT& x); 00387 }; 00388 00389 class EVENT : public Tagged { 00390 public: 00391 EVENT() {}; 00392 public: 00393 EVHEAD header; 00394 DECAYMODE decayMode; 00395 TRACKTRUTH trackTruth; 00396 VERTEXTRUTH vertexTruth; 00397 MDCTRUTH mdcTruth; 00398 MDCDIGI mdcDigi; 00399 TOFTRUTH tofTruth; 00400 TOFDIGI tofDigi; 00401 EMCTRUTH emcTruth; 00402 EMCDIGI emcDigi; 00403 MUCTRUTH mucTruth; 00404 MUCDIGI mucDigi; 00405 friend std::istream& operator>>(std::istream&, EVENT& x); 00406 friend std::ostream& operator<<(std::ostream&, const EVENT& x); 00407 }; 00408 00409 class HitEVENT : public Tagged { 00410 public: 00411 HitEVENT() {}; 00412 public: 00413 EVHEAD header; 00414 DECAYMODE decayMode; 00415 TRACKTRUTH trackTruth; 00416 VERTEXTRUTH vertexTruth; 00417 MDCTRUTH mdcTruth; 00418 MDCHIT mdcHit; 00419 TOFTRUTH tofTruth; 00420 TOFHIT tofHit; 00421 EMCTRUTH emcTruth; 00422 EMCHIT emcHit; 00423 MUCTRUTH mucTruth; 00424 MUCHIT mucHit; 00425 friend std::istream& operator>>(std::istream&, HitEVENT& x); 00426 friend std::ostream& operator<<(std::ostream&, const HitEVENT& x); 00427 }; 00428 00429 #endif // _AsciiData_h_