]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoSimpleAnalysis.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemto / AliFemtoSimpleAnalysis.h
1 /**************************************************************************
2  AliFemtoSimpleAnalysis - the most basic analysis there is.
3  Most others (e.g. AliFemtoVertexAnalysis) wrap this one.
4 **************************************************************************/
5
6 #ifndef ALIFEMTO_SIMPLE_ANALYSIS_H
7 #define ALIFEMTO_SIMPLE_ANALYSIS_H
8 //#ifndef StMaker_H
9 //#include "StMaker.h"
10 //#endif
11
12 #include "AliFemtoAnalysis.h"        // base analysis class
13 #include "AliFemtoPairCut.h"     
14 #include "AliFemtoEventCut.h"
15 #include "AliFemtoParticleCut.h"
16 #include "AliFemtoCorrFctn.h"
17 #include "AliFemtoCorrFctnCollection.h"
18 #include "AliFemtoPicoEventCollection.h"
19 #include "AliFemtoParticleCollection.h"
20 #include "AliFemtoPicoEvent.h"
21 #include "AliFemtoV0SharedDaughterCut.h"
22
23 class AliFemtoPicoEventCollectionVectorHideAway;
24
25 class AliFemtoSimpleAnalysis : public AliFemtoAnalysis {
26
27   // friend class AliFemtoLikeSignAnalysis;
28
29  public:
30   AliFemtoSimpleAnalysis();
31   AliFemtoSimpleAnalysis(const AliFemtoSimpleAnalysis& OriginalAnalysis);  // copy constructor
32   virtual ~AliFemtoSimpleAnalysis();
33
34   AliFemtoSimpleAnalysis& operator=(const AliFemtoSimpleAnalysis& aAna);
35
36   // Gets and Sets
37
38   virtual AliFemtoPairCut*       PairCut();
39   virtual AliFemtoEventCut*      EventCut();
40   virtual AliFemtoParticleCut*   FirstParticleCut();
41   virtual AliFemtoParticleCut*   SecondParticleCut();
42
43   AliFemtoCorrFctnCollection* CorrFctnCollection();
44   virtual AliFemtoCorrFctn* CorrFctn(int n);     // Access to CFs within the collection
45   void AddCorrFctn(AliFemtoCorrFctn* AnotherCorrFctn);
46
47   void SetPairCut(AliFemtoPairCut* ThePairCut);
48   void SetEventCut(AliFemtoEventCut* TheEventCut);
49   void SetFirstParticleCut(AliFemtoParticleCut* TheFirstParticleCut);
50   void SetSecondParticleCut(AliFemtoParticleCut* TheSecondParticleCut);
51
52   void SetMinSizePartCollection(unsigned int minSize);
53
54   void SetVerboseMode(Bool_t aVerbose);
55   
56   void SetV0SharedDaughterCut(Bool_t aPerform);
57   bool V0SharedDaughterCut();
58
59   void SetEnablePairMonitors(Bool_t aEnable);
60   Bool_t EnablePairMonitors();
61
62   unsigned int NumEventsToMix() const;
63   void SetNumEventsToMix(const unsigned int& NumberOfEventsToMix);
64   AliFemtoPicoEvent* CurrentPicoEvent();
65   AliFemtoPicoEventCollection* MixingBuffer();
66   bool MixingBufferFull();
67
68   bool AnalyzeIdenticalParticles() const;
69   virtual AliFemtoString Report();       //! returns reports of all cuts applied and correlation functions being done
70   virtual TList* ListSettings();         // return list of cut settings for the analysis
71   virtual TList* GetOutputList();        // Return a TList of objects to be written as output
72   
73   virtual void EventBegin(const AliFemtoEvent* TheEventToBegin); // startup for EbyE
74   virtual void ProcessEvent(const AliFemtoEvent* EventToProcess);
75   virtual void EventEnd(const AliFemtoEvent* TheEventToWrapUp);   // cleanup for EbyE
76   int GetNeventsProcessed() const;
77
78   virtual void Finish();
79
80 #ifdef __ROOT__
81   ClassDef(AliFemtoSimpleAnalysis, 0)
82 #endif 
83
84
85  protected:
86
87   void AddEventProcessed();
88   void MakePairs(const char* type, 
89                  AliFemtoParticleCollection* ParticlesPassingCut1,
90                  AliFemtoParticleCollection* ParticlesPssingCut2=0,
91                  Bool_t enablePairMonitors=kFALSE);
92
93   AliFemtoPicoEventCollectionVectorHideAway* fPicoEventCollectionVectorHideAway; //! Mixing Buffer used for Analyses which wrap this one 
94
95   AliFemtoPairCut*             fPairCut;             //  cut applied to pairs 
96   AliFemtoCorrFctnCollection*  fCorrFctnCollection;  //  correlation functions of this analysis 
97   AliFemtoEventCut*            fEventCut;            //  cut to select events 
98   AliFemtoParticleCut*         fFirstParticleCut;    //  select particles of type #1 
99   AliFemtoParticleCut*         fSecondParticleCut;   //  select particles of type #2 
100   AliFemtoPicoEventCollection* fMixingBuffer;        //  mixing buffer used in this simplest analysis 
101   AliFemtoPicoEvent*           fPicoEvent;           //! The current event, in the small (pico) form 
102   unsigned int fNumEventsToMix;                      //  How many "previous" events get mixed with this one, to make background 
103   unsigned int fNeventsProcessed;                    //  How many events processed so far 
104
105   unsigned int fMinSizePartCollection;               //  Don't use event if it has fewer than this many particles passing ParticleCuts default 0
106
107   Bool_t fVerbose;
108   Bool_t fPerformSharedDaughterCut;
109   Bool_t fEnablePairMonitors;
110
111 #ifdef __ROOT__
112   ClassDef(AliFemtoSimpleAnalysis, 0)
113 #endif
114
115     };
116
117 // Get's
118 inline AliFemtoPairCut*              AliFemtoSimpleAnalysis::PairCut() {return fPairCut;}
119 inline AliFemtoEventCut*             AliFemtoSimpleAnalysis::EventCut() {return fEventCut;}
120 inline AliFemtoParticleCut*          AliFemtoSimpleAnalysis::FirstParticleCut() {return fFirstParticleCut;}
121 inline AliFemtoParticleCut*          AliFemtoSimpleAnalysis::SecondParticleCut() {return fSecondParticleCut;}
122 inline AliFemtoCorrFctnCollection*   AliFemtoSimpleAnalysis::CorrFctnCollection() {return fCorrFctnCollection;}
123 inline unsigned int                  AliFemtoSimpleAnalysis::NumEventsToMix() const {return fNumEventsToMix;}
124 inline AliFemtoPicoEvent*            AliFemtoSimpleAnalysis::CurrentPicoEvent() {return fPicoEvent;}
125
126 inline AliFemtoPicoEventCollection*  AliFemtoSimpleAnalysis::MixingBuffer() {return fMixingBuffer;}
127
128 inline bool AliFemtoSimpleAnalysis::AnalyzeIdenticalParticles() const { return (fFirstParticleCut==fSecondParticleCut); }
129 inline bool AliFemtoSimpleAnalysis::V0SharedDaughterCut() { return fPerformSharedDaughterCut; }
130 inline bool AliFemtoSimpleAnalysis::EnablePairMonitors() { return fEnablePairMonitors; }
131
132 // Set's
133 inline void AliFemtoSimpleAnalysis::SetPairCut(AliFemtoPairCut* x) { fPairCut = x; x->SetAnalysis((AliFemtoAnalysis*)this);}
134 inline void AliFemtoSimpleAnalysis::AddCorrFctn(AliFemtoCorrFctn* cf) {fCorrFctnCollection->push_back(cf); cf->SetAnalysis((AliFemtoAnalysis*)this);}
135 inline void AliFemtoSimpleAnalysis::SetEventCut(AliFemtoEventCut* x) {fEventCut = x; x->SetAnalysis((AliFemtoAnalysis*)this);}
136 inline void AliFemtoSimpleAnalysis::SetFirstParticleCut(AliFemtoParticleCut* x) {fFirstParticleCut = x; x->SetAnalysis((AliFemtoAnalysis*)this);}
137 inline void AliFemtoSimpleAnalysis::SetSecondParticleCut(AliFemtoParticleCut* x) {fSecondParticleCut = x; x->SetAnalysis((AliFemtoAnalysis*)this);}
138
139 inline void AliFemtoSimpleAnalysis::SetNumEventsToMix(const unsigned int& nmix){ fNumEventsToMix = nmix;}
140 inline bool AliFemtoSimpleAnalysis::MixingBufferFull(){return (fMixingBuffer->size() >= fNumEventsToMix);}
141 inline int AliFemtoSimpleAnalysis::GetNeventsProcessed() const {return fNeventsProcessed;}
142
143 inline void AliFemtoSimpleAnalysis::SetMinSizePartCollection(unsigned int minSize){fMinSizePartCollection = minSize;}
144
145 inline void AliFemtoSimpleAnalysis::SetVerboseMode(Bool_t aVerbose){fVerbose = aVerbose;}
146 inline void AliFemtoSimpleAnalysis::SetV0SharedDaughterCut(Bool_t aPerform) { fPerformSharedDaughterCut = aPerform; }
147 inline void AliFemtoSimpleAnalysis::SetEnablePairMonitors(Bool_t aEnable) { fEnablePairMonitors = aEnable; }
148 #endif