Modifications needed for the compilation of the femtoscopy code (Adam-Mike)
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / Cut / AliFemtoBasicEventCut.cxx
CommitLineData
67427ff7 1/***************************************************************************
2 *
3 * $Id$
4 *
5 * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu
6 ***************************************************************************
7 *
8 * Description: part of STAR HBT Framework: AliFemtoMaker package
9 * A simple event-wise cut that selects on multiplicity and z-position
10 * of primary vertex
11 *
12 ***************************************************************************
13 *
14 * $Log$
15 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
16 * First version on CVS
17 *
18 * Revision 1.7 2000/02/18 21:27:10 laue
19 * franksTrackCut changed. If mCharge is set to '0' there will be no cut
20 * on charge. This is important for front-loaded cuts.
21 *
22 * Revision 1.6 2000/01/25 17:35:02 laue
23 * I. In order to run the stand alone version of the AliFemtoMaker the following
24 * changes have been done:
25 * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements
26 * b) unnecessary includes of StMaker.h have been removed
27 * c) the subdirectory AliFemtoMaker/doc/Make has been created including everything
28 * needed for the stand alone version
29 *
30 * II. To reduce the amount of compiler warning
31 * a) some variables have been type casted
32 * b) some destructors have been declared as virtual
33 *
34 * Revision 1.5 1999/10/15 01:57:03 lisa
35 * Important enhancement of AliFemtoMaker - implement Franks CutMonitors
36 * ----------------------------------------------------------
37 * This means 3 new files in Infrastructure area (CutMonitor),
38 * several specific CutMonitor classes in the Cut area
39 * and a new base class in the Base area (AliFemtoCutMonitor).
40 * This means also changing all Cut Base class header files from .h to .h
41 * so we have access to CutMonitor methods from Cint command line.
42 * This last means
43 * 1) files which include these header files are slightly modified
44 * 2) a side benefit: the TrackCuts and V0Cuts no longer need
45 * a SetMass() implementation in each Cut class, which was stupid.
46 * Also:
47 * -----
48 * Include Franks AliFemtoAssociationReader
49 * ** None of these changes should affect any user **
50 *
51 * Revision 1.4 1999/07/24 16:24:20 lisa
52 * adapt AliFemtoMaker to dev version of library - solaris still gives problems with strings
53 *
54 * Revision 1.3 1999/07/19 14:24:04 hardtke
55 * modifications to implement uDST
56 *
57 * Revision 1.2 1999/07/06 22:33:21 lisa
58 * Adjusted all to work in pro and new - dev itself is broken
59 *
60 * Revision 1.1.1.1 1999/06/29 16:02:56 lisa
61 * Installation of AliFemtoMaker
62 *
63 **************************************************************************/
64
65#include "Cut/AliFemtoBasicEventCut.h"
66#include <cstdio>
67
68#ifdef __ROOT__
69ClassImp(AliFemtoBasicEventCut)
70#endif
71
72AliFemtoBasicEventCut::AliFemtoBasicEventCut(){
73 fNEventsPassed = fNEventsFailed = 0;
74}
75//------------------------------
76//AliFemtoBasicEventCut::~AliFemtoBasicEventCut(){
77// /* noop */
78//}
79//------------------------------
80bool AliFemtoBasicEventCut::Pass(const AliFemtoEvent* event){
81 int mult = event->NumberOfTracks();
82 double VertexZPos = event->PrimVertPos().z();
83 cout << "AliFemtoBasicEventCut:: mult: " << fEventMult[0] << " < " << mult << " < " << fEventMult[1] << endl;
84 cout << "AliFemtoBasicEventCut:: VertexZPos: " << fVertZPos[0] << " < " << VertexZPos << " < " << fVertZPos[1] << endl;
85 bool goodEvent =
86 ((mult > fEventMult[0]) &&
87 (mult < fEventMult[1]) &&
88 (VertexZPos > fVertZPos[0]) &&
89 (VertexZPos < fVertZPos[1]));
90 goodEvent ? fNEventsPassed++ : fNEventsFailed++ ;
91 cout << "AliFemtoBasicEventCut:: return : " << goodEvent << endl;
92 return (goodEvent);
93}
94//------------------------------
95AliFemtoString AliFemtoBasicEventCut::Report(){
96 string Stemp;
97 char Ctemp[100];
98 sprintf(Ctemp,"\nMultiplicity:\t %d-%d",fEventMult[0],fEventMult[1]);
99 Stemp = Ctemp;
100 sprintf(Ctemp,"\nVertex Z-position:\t %E-%E",fVertZPos[0],fVertZPos[1]);
101 Stemp += Ctemp;
102 sprintf(Ctemp,"\nNumber of events which passed:\t%ld Number which failed:\t%ld",fNEventsPassed,fNEventsFailed);
103 Stemp += Ctemp;
104 AliFemtoString returnThis = Stemp;
105 return returnThis;
106}