1 /**************************************************************************
2 AliFemtoSimpleAnalysis - the most basic analysis there is.
3 Most others (e.g. AliFemtoVertexAnalysis) wrap this one.
4 **************************************************************************/
6 #ifndef ALIFEMTO_SIMPLE_ANALYSIS_H
7 #define ALIFEMTO_SIMPLE_ANALYSIS_H
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"
23 class AliFemtoPicoEventCollectionVectorHideAway;
25 class AliFemtoSimpleAnalysis : public AliFemtoAnalysis {
27 // friend class AliFemtoLikeSignAnalysis;
30 AliFemtoSimpleAnalysis();
31 AliFemtoSimpleAnalysis(const AliFemtoSimpleAnalysis& OriginalAnalysis); // copy constructor
32 virtual ~AliFemtoSimpleAnalysis();
34 AliFemtoSimpleAnalysis& operator=(const AliFemtoSimpleAnalysis& aAna);
38 virtual AliFemtoPairCut* PairCut();
39 virtual AliFemtoEventCut* EventCut();
40 virtual AliFemtoParticleCut* FirstParticleCut();
41 virtual AliFemtoParticleCut* SecondParticleCut();
43 AliFemtoCorrFctnCollection* CorrFctnCollection();
44 virtual AliFemtoCorrFctn* CorrFctn(int n); // Access to CFs within the collection
45 void AddCorrFctn(AliFemtoCorrFctn* AnotherCorrFctn);
47 void SetPairCut(AliFemtoPairCut* ThePairCut);
48 void SetEventCut(AliFemtoEventCut* TheEventCut);
49 void SetFirstParticleCut(AliFemtoParticleCut* TheFirstParticleCut);
50 void SetSecondParticleCut(AliFemtoParticleCut* TheSecondParticleCut);
52 void SetMinSizePartCollection(unsigned int minSize);
54 void SetVerboseMode(Bool_t aVerbose);
56 void SetV0SharedDaughterCut(Bool_t aPerform);
57 bool V0SharedDaughterCut();
59 void SetEnablePairMonitors(Bool_t aEnable);
60 Bool_t EnablePairMonitors();
62 unsigned int NumEventsToMix() const;
63 void SetNumEventsToMix(const unsigned int& NumberOfEventsToMix);
64 AliFemtoPicoEvent* CurrentPicoEvent();
65 AliFemtoPicoEventCollection* MixingBuffer();
66 bool MixingBufferFull();
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
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;
78 virtual void Finish();
81 ClassDef(AliFemtoSimpleAnalysis, 0)
87 void AddEventProcessed();
88 void MakePairs(const char* type,
89 AliFemtoParticleCollection* ParticlesPassingCut1,
90 AliFemtoParticleCollection* ParticlesPssingCut2=0,
91 Bool_t enablePairMonitors=kFALSE);
93 AliFemtoPicoEventCollectionVectorHideAway* fPicoEventCollectionVectorHideAway; //! Mixing Buffer used for Analyses which wrap this one
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
105 unsigned int fMinSizePartCollection; // Don't use event if it has fewer than this many particles passing ParticleCuts default 0
108 Bool_t fPerformSharedDaughterCut;
109 Bool_t fEnablePairMonitors;
112 ClassDef(AliFemtoSimpleAnalysis, 0)
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;}
126 inline AliFemtoPicoEventCollection* AliFemtoSimpleAnalysis::MixingBuffer() {return fMixingBuffer;}
128 inline bool AliFemtoSimpleAnalysis::AnalyzeIdenticalParticles() const { return (fFirstParticleCut==fSecondParticleCut); }
129 inline bool AliFemtoSimpleAnalysis::V0SharedDaughterCut() { return fPerformSharedDaughterCut; }
130 inline bool AliFemtoSimpleAnalysis::EnablePairMonitors() { return fEnablePairMonitors; }
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);}
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;}
143 inline void AliFemtoSimpleAnalysis::SetMinSizePartCollection(unsigned int minSize){fMinSizePartCollection = minSize;}
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; }