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