Initial check-in of the model classes
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / Analysis / AliFemtoAnalysis.h
CommitLineData
67427ff7 1/**************************************************************************
2 AliFemtoAnalysis - the most basic analysis there is.
3 Most others (e.g. AliFemtoVertexAnalysis) wrap this one.
4**************************************************************************/
5
6#ifndef AliFemtoAnalysis_hh
7#define AliFemtoAnalysis_hh
8//#ifndef StMaker_H
9//#include "StMaker.h"
10//#endif
11
12#include "Base/AliFemtoBaseAnalysis.h" // base analysis class
13#include "Base/AliFemtoPairCut.h"
14#include "Base/AliFemtoEventCut.h"
15#include "Base/AliFemtoParticleCut.h"
16#include "Base/AliFemtoCorrFctn.h"
17#include "Infrastructure/AliFemtoCorrFctnCollection.h"
18#include "Infrastructure/AliFemtoPicoEventCollection.h"
19#include "Infrastructure/AliFemtoParticleCollection.h"
20#include "Infrastructure/AliFemtoPicoEvent.h"
21
22class AliFemtoPicoEventCollectionVectorHideAway;
23
24
25class AliFemtoAnalysis : public AliFemtoBaseAnalysis {
26
27 friend class AliFemtoLikeSignAnalysis;
28
29 public:
30 AliFemtoAnalysis();
31 AliFemtoAnalysis(const AliFemtoAnalysis& OriginalAnalysis); // copy constructor
32 virtual ~AliFemtoAnalysis();
33
0215f606 34 AliFemtoAnalysis& operator=(const AliFemtoAnalysis& aAna);
35
67427ff7 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 unsigned int NumEventsToMix();
55 void SetNumEventsToMix(const unsigned int& NumberOfEventsToMix);
56 AliFemtoPicoEvent* CurrentPicoEvent();
57 AliFemtoPicoEventCollection* MixingBuffer();
58 bool MixingBufferFull();
59
60 bool AnalyzeIdenticalParticles();
61 virtual AliFemtoString Report(); //! returns reports of all cuts applied and correlation functions being done
62
63 virtual void EventBegin(const AliFemtoEvent* TheEventToBegin); // startup for EbyE
64 virtual void ProcessEvent(const AliFemtoEvent* EventToProcess);
65 virtual void EventEnd(const AliFemtoEvent* TheEventToWrapUp); // cleanup for EbyE
66 int GetNeventsProcessed();
67
68 virtual void Finish();
69
70 protected:
71
72 void AddEventProcessed();
73 void MakePairs(const char* type,
74 AliFemtoParticleCollection* ParticlesPassingCut1,
75 AliFemtoParticleCollection* ParticlesPssingCut2=0);
76
77 AliFemtoPicoEventCollectionVectorHideAway* fPicoEventCollectionVectorHideAway; /* Mixing Buffer used for Analyses which wrap this one */
78
79 AliFemtoPairCut* fPairCut; /* cut applied to pairs */
80 AliFemtoCorrFctnCollection* fCorrFctnCollection; /* correlation functions of this analysis */
81 AliFemtoEventCut* fEventCut; /* cut to select events */
82 AliFemtoParticleCut* fFirstParticleCut; /* select particles of type #1 */
83 AliFemtoParticleCut* fSecondParticleCut; /* select particles of type #2 */
84 AliFemtoPicoEventCollection* fMixingBuffer; /* mixing buffer used in this simplest analysis */
85 AliFemtoPicoEvent* fPicoEvent; /* The current event, in the small (pico) form */
86 unsigned int fNumEventsToMix; /* How many "previous" events get mixed with this one, to make background */
87 unsigned int fNeventsProcessed; /* How many events processed so far */
88
89 unsigned int fMinSizePartCollection; /* Don't use event if it has fewer than this many particles passing ParticleCuts default 0*/
90
91#ifdef __ROOT__
92 ClassDef(AliFemtoAnalysis, 0)
93#endif
94
95 };
96
97// Get's
98inline AliFemtoPairCut* AliFemtoAnalysis::PairCut() {return fPairCut;}
99inline AliFemtoEventCut* AliFemtoAnalysis::EventCut() {return fEventCut;}
100inline AliFemtoParticleCut* AliFemtoAnalysis::FirstParticleCut() {return fFirstParticleCut;}
101inline AliFemtoParticleCut* AliFemtoAnalysis::SecondParticleCut() {return fSecondParticleCut;}
102inline AliFemtoCorrFctnCollection* AliFemtoAnalysis::CorrFctnCollection() {return fCorrFctnCollection;}
103inline unsigned int AliFemtoAnalysis::NumEventsToMix(){return fNumEventsToMix;}
104inline AliFemtoPicoEvent* AliFemtoAnalysis::CurrentPicoEvent() {return fPicoEvent;}
105
106inline AliFemtoPicoEventCollection* AliFemtoAnalysis::MixingBuffer() {return fMixingBuffer;}
107
108// Set's
109inline bool AliFemtoAnalysis::AnalyzeIdenticalParticles(){return (fFirstParticleCut==fSecondParticleCut);}
110inline void AliFemtoAnalysis::SetPairCut(AliFemtoPairCut* x) { fPairCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);}
111inline void AliFemtoAnalysis::AddCorrFctn(AliFemtoCorrFctn* cf) {fCorrFctnCollection->push_back(cf); cf->SetAnalysis((AliFemtoBaseAnalysis*)this);}
112inline void AliFemtoAnalysis::SetEventCut(AliFemtoEventCut* x) {fEventCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);}
113inline void AliFemtoAnalysis::SetFirstParticleCut(AliFemtoParticleCut* x) {fFirstParticleCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);}
114inline void AliFemtoAnalysis::SetSecondParticleCut(AliFemtoParticleCut* x) {fSecondParticleCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);}
115
116inline void AliFemtoAnalysis::SetNumEventsToMix(const unsigned int& nmix){ fNumEventsToMix = nmix;}
117inline bool AliFemtoAnalysis::MixingBufferFull(){return (fMixingBuffer->size() >= fNumEventsToMix);}
118inline int AliFemtoAnalysis::GetNeventsProcessed() {return fNeventsProcessed;}
119
120inline void AliFemtoAnalysis::SetMinSizePartCollection(unsigned int minSize){fMinSizePartCollection = minSize;}
121
122#endif