00001
00002
00013 #ifndef STAR_StMCFilter
00014 #define STAR_StMCFilter
00015 #include <string>
00016 class StHepParticleMaster;
00017 class StG3ParticleMaster;
00018 class StGenParticleMaster;
00019
00020 class StMCFilter
00021 {
00022 public:
00023
00024 StMCFilter(const char *name);
00025 virtual ~StMCFilter();
00027 virtual int RejectEG(const StGenParticleMaster &ptl) const {return 0;}
00029 virtual int RejectGT(const StGenParticleMaster &ptl) const {return 0;}
00031 virtual int RejectGE(const StGenParticleMaster &ptl) const {return 0;}
00033 virtual void Finish() const{;}
00034
00035 const std::string &GetName() const { return fName;}
00036
00037 private:
00040 static int Select(const char *name);
00042 static int REJECTEG();
00044 static int REJECTGT();
00046 static int REJECTGE();
00048 static void SetEG(void *hepEvt);
00050 static void SetG3(void *gfKine,void *gfVert);
00053 static int Action(int kase, void *par1,void *par2);
00054
00055 protected:
00057 static int GetNTotEG() { return fgSelected->fCnt[0][0];}
00059 static int GetNTotGT() { return fgSelected->fCnt[1][0];}
00061 static int GetNTotGE() { return fgSelected->fCnt[2][0];}
00063 static int GetNRejEG() { return fgSelected->fCnt[0][1];}
00065 static int GetNRejGT() { return fgSelected->fCnt[1][1];}
00067 static int GetNRejGE() { return fgSelected->fCnt[2][1];}
00069 static void FINISH();
00070
00071 private:
00072
00075 static StMCFilter *fgSelected;
00077 static StHepParticleMaster *fgHepParticle;
00079 static StG3ParticleMaster *fgG3Particle;
00080
00081 protected:
00082 std::string fName;
00083 char fBeg[1];
00084 int fCnt[3][2];
00085 char fEnd[1];
00086
00087 };
00088
00089 #endif
00090