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),
22 fAcceptOnlyPhysics(true),
25 // Default constructor
27 fEventMult[1] = 100000;
28 fVertZPos[0] = -100.0;
33 //------------------------------
34 AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){
37 //------------------------------
38 bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){
40 // Pass events if they fall within the multiplicity and z-vertex
41 // position range. Fail otherwise
42 // int mult = event->NumberOfTracks();
43 int mult = (int) event->UncorrectedNumberOfPrimaries();
44 double vertexZPos = event->PrimVertPos().z();
47 // Double_t qxEPVZERO = 0, qyEPVZERO = 0;
48 // Double_t qVZERO = -999;
49 double epvzero = event->ReactionPlaneAngle();
51 // cout << "AliFemtoBasicEventCut:: epvzero: " << fPsiEP[0] << " < " << epvzero << " < " << fPsiEP[1] << endl;
52 // cout << "AliFemtoBasicEventCut:: mult: " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl;
53 // cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << vertexZPos << " < " << fVertZPos[1] << endl;
54 // cout << "AliFemtoBasicEventCut:: VertexZErr: " << event->PrimVertCov()[4] << endl;
55 // cout << "AliFemtoBasicEventCut:: MagneticField: " << event->MagneticField() << endl;
56 // cout << "AliFemtoBasicEventCut:: IsCollisionCandidate: " << event->IsCollisionCandidate() << endl;
57 // cout << "AliFemtoBasicEventCut:: TriggerCluster: " << event->TriggerCluster() << endl;
58 // cout << "AliFemtoBasicEventCut:: fSelectTrigger: " << fSelectTrigger << endl;
59 // cout << "AliFemtoBasicEventCut:: " << endl;
61 ((mult >= fEventMult[0]) &&
62 (mult <= fEventMult[1]) &&
63 (vertexZPos > fVertZPos[0]) &&
64 (vertexZPos < fVertZPos[1]) &&
65 (epvzero > fPsiEP[0]) &&
66 (epvzero < fPsiEP[1]) &&
67 ((!fAcceptBadVertex) || (event->ZDCParticipants() > 1.0)) &&
68 ((!fAcceptOnlyPhysics) || (event->IsCollisionCandidate())) &&
69 ((!fSelectTrigger) || (event->TriggerCluster() == fSelectTrigger))
72 // cout << "AliFemtoBasicEventCut:: goodEvent" <<goodEvent << endl;
74 goodEvent ? fNEventsPassed++ : fNEventsFailed++ ;
75 // cout << "AliFemtoBasicEventCut:: return : " << goodEvent << endl;
76 // (fAcceptBadVertex || (event->PrimVertCov()[4] > -1000.0)) &&
79 //------------------------------
80 AliFemtoString AliFemtoBasicEventCut::Report(){
84 snprintf(ctemp , 100, "\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]);
86 snprintf(ctemp , 100, "\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]);
88 snprintf(ctemp , 100, "\nNumber of events which passed:\t%ld Number which failed:\t%ld",fNEventsPassed,fNEventsFailed);
90 AliFemtoString returnThis = stemp;
93 void AliFemtoBasicEventCut::SetAcceptBadVertex(bool b)
97 bool AliFemtoBasicEventCut::GetAcceptBadVertex()
99 return fAcceptBadVertex;
101 void AliFemtoBasicEventCut::SetAcceptOnlyPhysics(bool b)
103 fAcceptOnlyPhysics = b;
105 bool AliFemtoBasicEventCut::GetAcceptOnlyPhysics()
107 return fAcceptOnlyPhysics;