]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicEventCut.cxx
Making the directory structure of AliFemto flat. All files go into one common directory
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / AliFemtoBasicEventCut.cxx
1 ////////////////////////////////////////////////////////////////////////////////
2 //                                                                            //
3 // AliFemtoBasicEventCut - the basic cut for events.                          //
4 // Only cuts on event multiplicity and z-vertex position                      //
5 //                                                                            //
6 ////////////////////////////////////////////////////////////////////////////////
7
8 #include "AliFemtoBasicEventCut.h"
9 #include <cstdio>
10
11 #ifdef __ROOT__
12 ClassImp(AliFemtoBasicEventCut)
13 #endif
14
15 AliFemtoBasicEventCut::AliFemtoBasicEventCut() :
16   fNEventsPassed(0), fNEventsFailed(0)
17 {
18   /* no-op */
19
20 //------------------------------
21 //AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){
22 //  /* noop */
23 //}
24 //------------------------------
25 bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){
26   int mult =  event->NumberOfTracks();
27   double VertexZPos = event->PrimVertPos().z();
28   cout << "AliFemtoBasicEventCut:: mult:       " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl;
29   cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << VertexZPos << " < " << fVertZPos[1] << endl;
30   bool goodEvent =
31     ((mult > fEventMult[0]) && 
32      (mult < fEventMult[1]) && 
33      (VertexZPos > fVertZPos[0]) &&
34      (VertexZPos < fVertZPos[1]));
35   goodEvent ? fNEventsPassed++ : fNEventsFailed++ ;
36   cout << "AliFemtoBasicEventCut:: return : " << goodEvent << endl;
37   return (goodEvent);
38 }
39 //------------------------------
40 AliFemtoString AliFemtoBasicEventCut::Report(){
41   string Stemp;
42   char Ctemp[100];
43   sprintf(Ctemp,"\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]);
44   Stemp = Ctemp;
45   sprintf(Ctemp,"\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]);
46   Stemp += Ctemp;
47   sprintf(Ctemp,"\nNumber of events which passed:\t%ld  Number which failed:\t%ld",fNEventsPassed,fNEventsFailed);
48   Stemp += Ctemp;
49   AliFemtoString returnThis = Stemp;
50   return returnThis;
51 }