]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoQAEventCut.h
Fix Coverity
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemtoUser / AliFemtoQAEventCut.h
CommitLineData
f9210de7 1////////////////////////////////////////////////////////////////////////////////
2// //
3// AliFemtoQAEventCut - the basic cut to check QA for event cuts. //
4// Only cuts on event multiplicity and z-vertex position //
5// //
6////////////////////////////////////////////////////////////////////////////////
7
8#ifndef ALIFEMTOQAEVENTCUT_H
9#define ALIFEMTOQAEVENTCUT_H
10
11// do I need these lines ?
12//#ifndef StMaker_H
13//#include "StMaker.h"
14//#endif
15
16#include "AliFemtoEventCut.h"
17
18class AliFemtoQAEventCut : public AliFemtoEventCut {
19
20public:
21
22 AliFemtoQAEventCut();
23 AliFemtoQAEventCut(AliFemtoQAEventCut& c);
24 virtual ~AliFemtoQAEventCut();
580153ad 25 AliFemtoQAEventCut& operator=(AliFemtoQAEventCut& c);
26
f9210de7 27
28 void SetEventMult(const int& lo,const int& hi);
29 void SetEventMultQASwitch(const bool Switch);
30 void SetEventMultQAExclusionZone(const int& lo, const int& hi);
31 void SetVertZPos(const float& lo, const float& hi);
32 void SetEventZPosQASwitch(const bool Switch);
33 void SetEventZPosQAExclusionZone(const float& lo, const float& hi);
34 void SetAcceptBadVertex(bool b);
35 int NEventsPassed() const;
36 int NEventsFailed() const;
37 bool GetAcceptBadVertex();
38
39 virtual AliFemtoString Report();
40 virtual bool Pass(const AliFemtoEvent* event);
41
42 AliFemtoQAEventCut* Clone();
43
44private: // here are the quantities I want to cut on...
45
46 int fEventMult[2]; // range of multiplicity
47 float fVertZPos[2]; // range of z-position of vertex
48 bool fAcceptBadVertex; // Set to true to accept events with bad vertex
49 long fNEventsPassed; // Number of events checked by this cut that passed
50 long fNEventsFailed; // Number of events checked by this cut that failed
51
52 int fHighOrLowSwitch; // if 1, then previous hbtEvent was high; if -1, then previous event was low.
53 bool fEventMultQASwitch; // Turn on multiplicity exclusion zone (true=on)
54 int fEventMultQAExclusionZone[2]; // Set limits of the multiplicity exclusion zone
55 bool fEventZPosQASwitch; // Turn on Zpos exclusion zone (true=on)
56 float fEventZPosQAExclusionZone[2]; // Set limits of the Zpos exclusion zone
57
58#ifdef __ROOT__
59 ClassDef(AliFemtoQAEventCut, 1)
60#endif
61
62};
63
64inline void AliFemtoQAEventCut::SetEventMult(const int& lo, const int& hi){fEventMult[0]=lo; fEventMult[1]=hi;}
65inline void AliFemtoQAEventCut::SetEventMultQASwitch(const bool Switch) { fEventMultQASwitch = Switch; }
66inline void AliFemtoQAEventCut::SetEventMultQAExclusionZone(const int& lo, const int& hi) { fEventMultQAExclusionZone[0]=lo; fEventMultQAExclusionZone[1]=hi; }
67inline void AliFemtoQAEventCut::SetVertZPos(const float& lo, const float& hi){fVertZPos[0]=lo; fVertZPos[1]=hi;}
68inline void AliFemtoQAEventCut::SetEventZPosQASwitch(const bool Switch) { fEventZPosQASwitch = Switch; }
69inline void AliFemtoQAEventCut::SetEventZPosQAExclusionZone(const float& lo, const float& hi) { fEventZPosQAExclusionZone[0]=lo; fEventZPosQAExclusionZone[1]=hi; }
70inline int AliFemtoQAEventCut::NEventsPassed() const {return fNEventsPassed;}
71inline int AliFemtoQAEventCut::NEventsFailed() const {return fNEventsFailed;}
72inline AliFemtoQAEventCut* AliFemtoQAEventCut::Clone() { AliFemtoQAEventCut* c = new AliFemtoQAEventCut(*this); return c;}
1e79fae4 73inline AliFemtoQAEventCut::AliFemtoQAEventCut(AliFemtoQAEventCut& c) : AliFemtoEventCut(c), fAcceptBadVertex(kFALSE), fNEventsPassed(0), fNEventsFailed(0), fHighOrLowSwitch(0), fEventMultQASwitch(kFALSE), fEventZPosQASwitch(kFALSE) {
f9210de7 74 fEventMult[0] = c.fEventMult[0];
75 fEventMult[1] = c.fEventMult[1];
76 fVertZPos[0] = c.fVertZPos[0];
77 fVertZPos[1] = c.fVertZPos[1];
78
79 fHighOrLowSwitch = c.fHighOrLowSwitch;
80 fEventMultQASwitch = c.fEventMultQASwitch;
81 fEventZPosQASwitch = c.fEventZPosQASwitch;
82 fEventMultQAExclusionZone[0] = c.fEventMultQAExclusionZone[0];
83 fEventMultQAExclusionZone[1] = c.fEventMultQAExclusionZone[1];
84 fEventZPosQAExclusionZone[0] = c.fEventZPosQAExclusionZone[0];
85 fEventZPosQAExclusionZone[1] = c.fEventZPosQAExclusionZone[1];
86}
87
88
89#endif