]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoParticleCut.h
Merge branch 'master_patch'
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemto / AliFemtoParticleCut.h
CommitLineData
76ce4b5b 1////////////////////////////////////////////////////////////////////////////////
2// //
3// AliFemtoParticleCut - the pure virtual base class for the particle cut //
4// All particle cuts must inherit from this one //
5// //
6////////////////////////////////////////////////////////////////////////////////
7
8#ifndef ALIFEMTOPARTICLECUT_H
9#define ALIFEMTOPARTICLECUT_H
10
11#include "AliFemtoTypes.h"
12#include "AliFemtoCutMonitorHandler.h"
13#include <TObjString.h>
14#include <TList.h>
15
16class AliFemtoAnalysis;
17
18class AliFemtoParticleCut : public AliFemtoCutMonitorHandler {
19
20 friend class AliFemtoAnalysis;
21
22public:
23 AliFemtoParticleCut(); // default constructor. - Users should write their own
24 AliFemtoParticleCut(const AliFemtoParticleCut&); // copy constructor
25 virtual ~AliFemtoParticleCut(){/* no-op */}; // destructor
26 AliFemtoParticleCut& operator=(const AliFemtoParticleCut& aCut);
27
28 virtual AliFemtoString Report() =0; // user-written method to return string describing cuts
29 virtual TList* ListSettings(); // user-written list of settings which is stored in the result file
30
31 double Mass(){return fMass;}; // mass of the particle being selected
32 virtual void SetMass(const double& mass) {fMass = mass;};
33
34 virtual AliFemtoParticleCut* Clone() { return 0;}
35
36 virtual AliFemtoParticleType Type()=0;
37
38 // the following allows "back-pointing" from the CorrFctn to the "parent" Analysis
39 AliFemtoAnalysis* HbtAnalysis(){return fyAnalysis;};
40 void SetAnalysis(AliFemtoAnalysis*);
41
42protected:
43 AliFemtoAnalysis* fyAnalysis; // Link to the base analysis class
44 double fMass;
45
46#ifdef __ROOT__
47 ClassDef(AliFemtoParticleCut, 0)
48#endif
49};
50
51inline AliFemtoParticleCut::AliFemtoParticleCut(): AliFemtoCutMonitorHandler(), fyAnalysis(0), fMass(0){} // default constructor. - Users should write their own
52inline AliFemtoParticleCut::AliFemtoParticleCut(const AliFemtoParticleCut& c): AliFemtoCutMonitorHandler(), fyAnalysis(0), fMass(0) {
53 fMass = c.fMass; fyAnalysis = 0;
54#ifdef STHBTDEBUG
55 cout << " AliFemtoParticleCut::AliFemtoParticleCut(const AliFemtoParticleCut& c) - fMass: " << fMass << endl;
56#endif
57}
58inline void AliFemtoParticleCut::SetAnalysis(AliFemtoAnalysis* analysis) { fyAnalysis = analysis; }
59inline AliFemtoParticleCut& AliFemtoParticleCut::operator=(const AliFemtoParticleCut& aCut) { if (this == &aCut) return *this; fyAnalysis = aCut.fyAnalysis; fMass=aCut.fMass; return *this; }
60 inline TList *AliFemtoParticleCut::ListSettings() {
61 TList *tListSetttings = new TList();
62 char buf[100];
63 snprintf(buf, 100, "AliFemtoParticleCut.mass=%f", fMass);
64 TObjString *str = new TObjString(buf);
65 tListSetttings->Add(str);
66 return tListSetttings;
67 }
68
69#endif