1 #include "FcsDYFilter.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 + 1.5*5.542;
14 static const float XFCSMax = 16.69 + 22.0 * 5.542 - 1.5*5.542;
15 static const float YFCS = 34.0/2.0 * 5.542 - 1.5*5.542;
16 static const float ETCUT = 1.0;
17 static const float MASSCUT = 4.0;
25 cout<<
"FCS DY filter is used!!!"<<endl;
37 TIter Iterator =
event.
IterAll();
39 vector<StarGenParticle*> forwardParticles;
42 int pid = abs(p->
GetId());
44 if(p->
GetPz()<0.0)
continue;
45 if(p->
pt()<ETCUT)
continue;
48 if(x<XFCSMin || x>XFCSMax)
continue;
51 forwardParticles.push_back(p);
53 unsigned int size=forwardParticles.size();
54 if(size<2)
return StarGenEvent::kReject;
55 for(
unsigned int i=0; i<size-1; i++){
58 for(
unsigned int j=i + 1; j<size; j++){
63 if(pair.M()>MASSCUT && xx_ep < 0) {
65 cout << Form(
"FcsDYFilter : N_Genearted=%6d N_Accepted=%6d R=%6.4f x1=%.3f x2=%.3f xx=%.3f",
66 ntot,ngood,
float(ngood)/
float(ntot), x1, x2, xx_ep) <<endl;
67 return (StarGenEvent::kAccept | 0x08);
71 return StarGenEvent::kReject;
Float_t GetVz()
Get the z-component of the start vertex.
Int_t GetNumberOfParticles()
Obtain the number of particles in the event record.
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.
Float_t GetPz()
Get the z-component of the momentum.
Int_t Filter(StarGenEvent *mEvent)
destructor
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.
TLorentzVector momentum()
Return the 4-momentum of the particle.
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.
TIter IterAll(Bool_t dir=kIterForward)