1 ////////////////////////////////////////////////////////////////////////////////
3 // AliFemtoBasicEventCut - the basic cut for events. //
4 // Only cuts on event multiplicity and z-vertex position //
6 ////////////////////////////////////////////////////////////////////////////////
8 #include "AliFemtoBasicEventCut.h"
12 ClassImp(AliFemtoBasicEventCut)
15 AliFemtoBasicEventCut::AliFemtoBasicEventCut() :
19 fAcceptBadVertex(false),
24 // Default constructor
26 fEventMult[1] = 100000;
27 fVertZPos[0] = -100.0;
32 //------------------------------
33 AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){
36 //------------------------------
37 bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){
39 // Pass events if they fall within the multiplicity and z-vertex
40 // position range. Fail otherwise
41 // int mult = event->NumberOfTracks();
42 int mult = (int) event->UncorrectedNumberOfPrimaries();
43 double vertexZPos = event->PrimVertPos().z();
45 // Double_t qxEPVZERO = 0, qyEPVZERO = 0;
46 // Double_t qVZERO = -999;
47 double epvzero = event->ReactionPlaneAngle();
49 // cout << "AliFemtoBasicEventCut:: epvzero: " << fPsiEP[0] << " < " << epvzero << " < " << fPsiEP[1] << endl;
50 // cout << "AliFemtoBasicEventCut:: mult: " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl;
51 // cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << vertexZPos << " < " << fVertZPos[1] << endl;
52 // cout << "AliFemtoBasicEventCut:: VertexZErr: " << event->PrimVertCov()[4] << endl;
54 // cout << "AliFemtoBasicEventCut:: MagneticField: " << event->MagneticField() << endl;
55 // cout << "AliFemtoBasicEventCut:: IsCollisionCandidate: " << event->IsCollisionCandidate() << endl;
56 // cout << "AliFemtoBasicEventCut:: TriggerCluster: " << event->TriggerCluster() << endl;
57 // cout << "AliFemtoBasicEventCut:: fSelectTrigger: " << fSelectTrigger << endl;
58 // cout << "AliFemtoBasicEventCut:: " << endl;
60 ((mult >= fEventMult[0]) &&
61 (mult <= fEventMult[1]) &&
62 (vertexZPos > fVertZPos[0]) &&
63 (vertexZPos < fVertZPos[1]) &&
64 (epvzero > fPsiEP[0]) &&
65 (epvzero < fPsiEP[1]) &&
66 ((!fAcceptBadVertex) || (event->ZDCParticipants() > 1.0)) &&
67 ((!fSelectTrigger) || (event->TriggerCluster() == fSelectTrigger))
70 // cout << "AliFemtoBasicEventCut:: goodEvent" <<goodEvent << endl;
72 goodEvent ? fNEventsPassed++ : fNEventsFailed++ ;
73 // cout << "AliFemtoBasicEventCut:: return : " << goodEvent << endl;
74 // (fAcceptBadVertex || (event->PrimVertCov()[4] > -1000.0)) &&
78 //------------------------------
79 AliFemtoString AliFemtoBasicEventCut::Report(){
83 snprintf(ctemp , 100, "\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]);
85 snprintf(ctemp , 100, "\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]);
87 snprintf(ctemp , 100, "\nNumber of events which passed:\t%ld Number which failed:\t%ld",fNEventsPassed,fNEventsFailed);
89 AliFemtoString returnThis = stemp;
92 void AliFemtoBasicEventCut::SetAcceptBadVertex(bool b)
96 bool AliFemtoBasicEventCut::GetAcceptBadVertex()
98 return fAcceptBadVertex;