]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoParticleCut.h
Fixing Effective C++ warnings
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / Base / AliFemtoParticleCut.h
1 ////////////////////////////////////////////////////////////////////////////////
2 /// AliFemtoParticleCut - the pure virtual base class for the particle cut   ///
3 /// All particle cuts must inherit from this one                             ///
4 ////////////////////////////////////////////////////////////////////////////////
5
6 #ifndef AliFemtoParticleCut_hh
7 #define AliFemtoParticleCut_hh
8
9 #include "Infrastructure/AliFemtoTypes.h"
10 #include "Infrastructure/AliFemtoCutMonitorHandler.h"
11
12 class AliFemtoBaseAnalysis;
13
14 class AliFemtoParticleCut : public AliFemtoCutMonitorHandler {
15
16   friend class AliFemtoBaseAnalysis;
17
18 public:
19   AliFemtoParticleCut();   // default constructor. - Users should write their own
20   AliFemtoParticleCut(const AliFemtoParticleCut&); // copy constructor
21   virtual ~AliFemtoParticleCut(){/* no-op */};  // destructor
22   AliFemtoParticleCut& operator=(const AliFemtoParticleCut& aCut);
23
24   virtual AliFemtoString Report() =0;    // user-written method to return string describing cuts
25
26   double Mass(){return fMass;};       // mass of the particle being selected
27   virtual void SetMass(const double& mass) {fMass = mass;};
28
29   virtual void EventBegin(const AliFemtoEvent* aEvent) { /* no-op */ }
30   virtual void EventEnd(const AliFemtoEvent* aEvent) { /* no-op */ }
31   virtual AliFemtoParticleCut* Clone() { return 0;}
32
33   virtual AliFemtoParticleType Type()=0;
34
35   // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
36   AliFemtoBaseAnalysis* HbtAnalysis(){return fyAnalysis;};
37   void SetAnalysis(AliFemtoBaseAnalysis*);
38
39 protected:
40   AliFemtoBaseAnalysis* fyAnalysis; // Link to the base analysis class
41   double fMass;
42
43 #ifdef __ROOT__
44   ClassDef(AliFemtoParticleCut, 0)
45 #endif
46 };
47
48 inline AliFemtoParticleCut::AliFemtoParticleCut(): AliFemtoCutMonitorHandler(), fyAnalysis(0), fMass(0){};   // default constructor. - Users should write their own
49 inline AliFemtoParticleCut::AliFemtoParticleCut(const AliFemtoParticleCut& c): AliFemtoCutMonitorHandler(), fyAnalysis(0), fMass(0) { 
50   fMass = c.fMass; fyAnalysis = 0; 
51 #ifdef STHBTDEBUG
52   cout << " AliFemtoParticleCut::AliFemtoParticleCut(const AliFemtoParticleCut& c) - fMass: " << fMass << endl;
53 #endif
54 }
55 inline void AliFemtoParticleCut::SetAnalysis(AliFemtoBaseAnalysis* analysis) { fyAnalysis = analysis; }
56 inline AliFemtoParticleCut& AliFemtoParticleCut::operator=(const AliFemtoParticleCut& aCut) { if (this == &aCut) return *this; fyAnalysis = aCut.fyAnalysis; fMass=aCut.fMass; return *this; }
57 #endif