StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StExampleFilter.cxx
1 // @(#)root/eg:$Id: StExampleFilter.cxx,v 1.7 2010/07/29 19:19:41 jwebb Exp $
2 // Author: Victor Perev 17/03/2009
3 
4 //______________________________________________________________________________
5 #include "stdlib.h"
6 #include "math.h"
7 
8 #include "StExampleFilter.h"
9 #include "StGenParticle.h"
10 
21 
22 static StExampleFilter qwerty;
23 
85 
86 
87 
88 //______________________________________________________________________________
90 {
91  ptl.Print("************** In RejectEG ************** ");
92 // Condition: number of tracks etaGate[0]<eta<= etaGate[1] must be bigger etaGate[2]
93 const static double etaGate[3]={0.8,1.2, 3};
94  const StGenParticle *tk=0;
95  int n = ptl.Size();
96  int ntk=0;
97  for (int i=0;i<n;i++) {
98  tk = ptl(i); if (!tk) continue;
99  if (tk->GetStatusCode()!=1) continue;
100  if (tk->Eta() < etaGate[0]) continue;
101  if (tk->Eta() > etaGate[1]) continue;
102  ntk++;
103  }
104 
105  if (ntk<etaGate[2]) return 1;
106  return 0;
107 }
108 //______________________________________________________________________________
110 {
111  ptl.Print("************** In RejectGT ************** ");
112  return 0;
113 }
114 //______________________________________________________________________________
116 {
117  ptl.Print("************** In RejectGE ************** ");
118  return 0;
119 }
Abstract base class for particles related to common /HEPEVT/.
int RejectGT(const StGenParticleMaster &ptl) const
int RejectEG(const StGenParticleMaster &ptl) const
int RejectGE(const StGenParticleMaster &ptl) const