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;
31 //------------------------------
32 AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){
35 //------------------------------
36 bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){
37 // Pass events if they fall within the multiplicity and z-vertex
38 // position range. Fail otherwise
39 // int mult = event->NumberOfTracks();
40 int mult = (int) event->UncorrectedNumberOfPrimaries();
41 double vertexZPos = event->PrimVertPos().z();
42 // cout << "AliFemtoBasicEventCut:: mult: " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl;
43 // cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << vertexZPos << " < " << fVertZPos[1] << endl;
44 // cout << "AliFemtoBasicEventCut:: VertexZErr: " << event->PrimVertCov()[4] << endl;
46 ((mult >= fEventMult[0]) &&
47 (mult <= fEventMult[1]) &&
48 (vertexZPos > fVertZPos[0]) &&
49 (vertexZPos < fVertZPos[1]) &&
50 ((!fAcceptBadVertex) || (event->ZDCParticipants() > 1.0)) &&
51 ((!fAcceptOnlyPhysics) || (event->IsCollisionCandidate())) &&
52 ((!fSelectTrigger) || (event->TriggerCluster() == fSelectTrigger)));
53 goodEvent ? fNEventsPassed++ : fNEventsFailed++ ;
54 // cout << "AliFemtoBasicEventCut:: return : " << goodEvent << endl;
55 // (fAcceptBadVertex || (event->PrimVertCov()[4] > -1000.0)) &&
58 //------------------------------
59 AliFemtoString AliFemtoBasicEventCut::Report(){
63 snprintf(ctemp , 100, "\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]);
65 snprintf(ctemp , 100, "\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]);
67 snprintf(ctemp , 100, "\nNumber of events which passed:\t%ld Number which failed:\t%ld",fNEventsPassed,fNEventsFailed);
69 AliFemtoString returnThis = stemp;
72 void AliFemtoBasicEventCut::SetAcceptBadVertex(bool b)
76 bool AliFemtoBasicEventCut::GetAcceptBadVertex()
78 return fAcceptBadVertex;
80 void AliFemtoBasicEventCut::SetAcceptOnlyPhysics(bool b)
82 fAcceptOnlyPhysics = b;
84 bool AliFemtoBasicEventCut::GetAcceptOnlyPhysics()
86 return fAcceptOnlyPhysics;