00001
00002
00003
00004
00005 #include "stdlib.h"
00006 #include "math.h"
00007
00008 #include "StExampleFilter.h"
00009 #include "StGenParticle.h"
00010
00021
00022 static StExampleFilter qwerty;
00023
00085
00086
00087
00088
00089 int StExampleFilter::RejectEG(const StGenParticleMaster &ptl) const
00090 {
00091 ptl.Print("************** In RejectEG ************** ");
00092
00093 const static double etaGate[3]={0.8,1.2, 3};
00094 const StGenParticle *tk=0;
00095 int n = ptl.Size();
00096 int ntk=0;
00097 for (int i=0;i<n;i++) {
00098 tk = ptl(i); if (!tk) continue;
00099 if (tk->GetStatusCode()!=1) continue;
00100 if (tk->Eta() < etaGate[0]) continue;
00101 if (tk->Eta() > etaGate[1]) continue;
00102 ntk++;
00103 }
00104
00105 if (ntk<etaGate[2]) return 1;
00106 return 0;
00107 }
00108
00109 int StExampleFilter::RejectGT(const StGenParticleMaster &ptl) const
00110 {
00111 ptl.Print("************** In RejectGT ************** ");
00112 return 0;
00113 }
00114
00115 int StExampleFilter::RejectGE(const StGenParticleMaster &ptl) const
00116 {
00117 ptl.Print("************** In RejectGE ************** ");
00118 return 0;
00119 }