1 #include "FcsDYBGFilterSingle.h"
3 #include "StarGenerator/EVENT/StarGenParticle.h"
4 #include "StarGenerator/EVENT/StarGenEvent.h"
12 static const float ZFCS = 710.16 + 13.9 + 15.0;
13 static const float XFCSMin = 16.69;
14 static const float XFCSMax = 16.69 + 22.0 * 5.542;
15 static const float YFCS = 34.0/2.0 * 5.542;
16 static const float FVCUT = 0;
17 static const float ETCUT = 0.8;
18 static const float DRCUT = 40.0;
19 static const float DYETCUT = 1.0;
20 static const float DYMASSCUT= 2.5;
28 FcsDYBGFilterSingle::FcsDYBGFilterSingle():
StarFilterMaker(
"fcsDYBGFilterSingle") {
29 cout<<
"FCS DYBG filter is used!!!"<<endl;
30 cout<<
"FCS DYBG filter swap particles="<<mSwap<<endl;
33 FcsDYBGFilterSingle::FcsDYBGFilterSingle(
int dy,
int check,
int swap):
StarFilterMaker(
"fcsDYBGFilterSingle"), mDYmode(dy), mCheckmode(check), mSwap(swap){
34 cout<<
"FCS DYBG filter is used!!!"<<endl;
35 cout<<
"FCS DYBG filter DYMode="<<mDYmode<<endl;
36 cout<<
"FCS DYBG filter Checkmode="<<mCheckmode<<endl;
37 cout<<
"FCS DYBG filter swap particles="<<mSwap<<endl;
46 int np=
event.GetNumberOfParticles();
47 if(np <= 0) {
return kError;}
50 TIter Iterator =
event.IterAll();
52 vector<StarGenParticle*> forwardParticles;
54 int pid = abs(p->
GetId());
57 if(p->
GetPz()<0.0)
continue;
58 if(p->
pt()<ETCUT)
continue;
59 forwardParticles.push_back(p);
61 unsigned int size=forwardParticles.size();
62 if(size<1)
return StarGenEvent::kReject;
65 for(
unsigned int i=0; i<size; i++){
69 if(x > XFCSMin && x < XFCSMax && y<YFCS) isInSouth=1;
73 for(
unsigned int i=0; i<size; i++){
79 if(xabs > XFCSMin && xabs < XFCSMax && y<YFCS) isInNorth=1;
82 if(isInSouth && !isInNorth) {
84 cout << Form(
"FcsDYBGFilterSingle : N_Genearted=%6d N_Accepted=%6d R=%6.4f",
85 ntot,ngood,
float(ngood)/
float(ntot)) <<endl;
86 return (StarGenEvent::kAccept);
88 return StarGenEvent::kReject;
Float_t GetVz()
Get the z-component of the start vertex.
Float_t pt()
Returns the transverse momentum of the particle.
Yet another particle class.
Int_t GetStatus()
Get the status code of the particle according to the HEPEVT standard.
Int_t Filter(StarGenEvent *mEvent)
destructor
Float_t GetPz()
Get the z-component of the momentum.
Int_t GetId()
Get the id code of the particle according to the PDG standard.
Main filter class. Goes anywhere in the chain, filters StarGenEvent objects.
Float_t GetPx()
Get the x-component of the momentum.
Float_t GetVy()
Get the y-component of the start vertex.
Float_t GetPy()
Get the y-component of the momentum.
Base class for event records.
Float_t GetVx()
Get the x-component of the start vertex.