00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ST_MCTRUTH_H
00025 #define ST_MCTRUTH_H
00026 #include "Rtypes.h"
00027 #if ROOT_VERSION_CODE <= 333312
00028 typedef Long_t LongKey_t;
00029 #else
00030 typedef Long64_t LongKey_t;
00031 #endif
00032 struct StMCTruth {
00033 StMCTruth(int id,int wt) {trackId=(short)id; trackWt=(short)wt;}
00034 StMCTruth(int word=0) {*this=word;}
00035 StMCTruth &operator=(int word);
00036 operator int() const;
00037
00038 short trackId;
00039 short trackWt;
00040
00041 };
00042
00043
00044 class StMCPivotTruth {
00045 public:
00046 StMCPivotTruth(int normInput=0);
00047 void Reset() {fN=0;}
00048 void Add(int trackId, double wt);
00049 void Add(StMCTruth Id,double wt);
00050 void Add(StMCTruth Id);
00051 int Size() const {return fN;}
00052 StMCTruth Get(int byCount=0) const;
00053 private:
00054 enum {HOWMANY=20};
00055 int fN;
00056 int fNorm;
00057 int mTrackIds[HOWMANY];
00058 float mTrackWts[HOWMANY];
00059 float mTrackNum[HOWMANY];
00060 int qwe;
00061 };
00062
00063 class TExMap;
00064 class TExMapIter;
00065 class StMCPivotTruthMap {
00066
00067 public:
00068 StMCPivotTruthMap(int normInput=0);
00069 ~StMCPivotTruthMap();
00070
00071 void Add(LongKey_t token, int trackId, double wt);
00072 void Add(LongKey_t token, StMCTruth truth);
00073 StMCTruth Get(LongKey_t token,int byCount=0) const;
00074 StMCTruth Iter(LongKey_t &token) const;
00075
00076 private:
00077 int fNorm;
00078 TExMap *fMap;
00079 mutable TExMapIter *fIter;
00080 };
00081
00082
00083
00084
00085 #endif