StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StMCFilter
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
//______________________________________________________________________________
89
int
StExampleFilter::RejectEG
(
const
StGenParticleMaster
&ptl)
const
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
//______________________________________________________________________________
109
int
StExampleFilter::RejectGT
(
const
StGenParticleMaster
&ptl)
const
110
{
111
ptl.Print(
"************** In RejectGT ************** "
);
112
return
0;
113
}
114
//______________________________________________________________________________
115
int
StExampleFilter::RejectGE
(
const
StGenParticleMaster
&ptl)
const
116
{
117
ptl.Print(
"************** In RejectGE ************** "
);
118
return
0;
119
}
StExampleFilter
Definition:
StExampleFilter.h:17
StGenParticleMaster
Definition:
StGenParticle.h:176
StGenParticle
Abstract base class for particles related to common /HEPEVT/.
Definition:
StGenParticle.h:133
StExampleFilter::RejectGT
int RejectGT(const StGenParticleMaster &ptl) const
Definition:
StExampleFilter.cxx:109
StExampleFilter::RejectEG
int RejectEG(const StGenParticleMaster &ptl) const
Definition:
StExampleFilter.cxx:89
StExampleFilter::RejectGE
int RejectGE(const StGenParticleMaster &ptl) const
Definition:
StExampleFilter.cxx:115
Generated by
1.8.5