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