]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FEMTOSCOPY/AliFemto/Base/AliFemtoParticleCut.h
f1a0f23dd53b168085c01968f4d152cde166a4f5
[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(){/* no-op */};   // default constructor. - Users should write their own
20   AliFemtoParticleCut(const AliFemtoParticleCut&); // copy constructor
21   virtual ~AliFemtoParticleCut(){/* no-op */};  // destructor
22
23   virtual AliFemtoString Report() =0;    // user-written method to return string describing cuts
24
25   double Mass(){return fMass;};       // mass of the particle being selected
26   virtual void SetMass(const double& mass) {fMass = mass;};
27
28   virtual void EventBegin(const AliFemtoEvent* aEvent) { /* no-op */ }
29   virtual void EventEnd(const AliFemtoEvent* aEvent) { /* no-op */ }
30   virtual AliFemtoParticleCut* Clone() { return 0;}
31
32   virtual AliFemtoParticleType Type()=0;
33
34   // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
35   AliFemtoBaseAnalysis* HbtAnalysis(){return fyAnalysis;};
36   void SetAnalysis(AliFemtoBaseAnalysis*);
37
38 protected:
39   double fMass;
40   AliFemtoBaseAnalysis* fyAnalysis; // Link to the base analysis class
41
42 #ifdef __ROOT__
43   ClassDef(AliFemtoParticleCut, 0)
44 #endif
45 };
46
47 inline AliFemtoParticleCut::AliFemtoParticleCut(const AliFemtoParticleCut& c) : AliFemtoCutMonitorHandler() { 
48   fMass = c.fMass; fyAnalysis = 0; 
49 #ifdef STHBTDEBUG
50   cout << " AliFemtoParticleCut::AliFemtoParticleCut(const AliFemtoParticleCut& c) - fMass: " << fMass << endl;
51 #endif
52 }
53 inline void AliFemtoParticleCut::SetAnalysis(AliFemtoBaseAnalysis* analysis) { fyAnalysis = analysis; }
54 #endif