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