This commit was generated by cvs2svn to compensate for changes in r18145,
[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
34 // Gets and Sets
35
36 virtual AliFemtoPairCut* PairCut();
37 virtual AliFemtoEventCut* EventCut();
38 virtual AliFemtoParticleCut* FirstParticleCut();
39 virtual AliFemtoParticleCut* SecondParticleCut();
40
41 AliFemtoCorrFctnCollection* CorrFctnCollection();
42 virtual AliFemtoCorrFctn* CorrFctn(int n); // Access to CFs within the collection
43 void AddCorrFctn(AliFemtoCorrFctn* AnotherCorrFctn);
44
45 void SetPairCut(AliFemtoPairCut* ThePairCut);
46 void SetEventCut(AliFemtoEventCut* TheEventCut);
47 void SetFirstParticleCut(AliFemtoParticleCut* TheFirstParticleCut);
48 void SetSecondParticleCut(AliFemtoParticleCut* TheSecondParticleCut);
49
50 void SetMinSizePartCollection(unsigned int minSize);
51
52 unsigned int NumEventsToMix();
53 void SetNumEventsToMix(const unsigned int& NumberOfEventsToMix);
54 AliFemtoPicoEvent* CurrentPicoEvent();
55 AliFemtoPicoEventCollection* MixingBuffer();
56 bool MixingBufferFull();
57
58 bool AnalyzeIdenticalParticles();
59 virtual AliFemtoString Report(); //! returns reports of all cuts applied and correlation functions being done
60
61 virtual void EventBegin(const AliFemtoEvent* TheEventToBegin); // startup for EbyE
62 virtual void ProcessEvent(const AliFemtoEvent* EventToProcess);
63 virtual void EventEnd(const AliFemtoEvent* TheEventToWrapUp); // cleanup for EbyE
64 int GetNeventsProcessed();
65
66 virtual void Finish();
67
68 protected:
69
70 void AddEventProcessed();
71 void MakePairs(const char* type,
72 AliFemtoParticleCollection* ParticlesPassingCut1,
73 AliFemtoParticleCollection* ParticlesPssingCut2=0);
74
75 AliFemtoPicoEventCollectionVectorHideAway* fPicoEventCollectionVectorHideAway; /* Mixing Buffer used for Analyses which wrap this one */
76
77 AliFemtoPairCut* fPairCut; /* cut applied to pairs */
78 AliFemtoCorrFctnCollection* fCorrFctnCollection; /* correlation functions of this analysis */
79 AliFemtoEventCut* fEventCut; /* cut to select events */
80 AliFemtoParticleCut* fFirstParticleCut; /* select particles of type #1 */
81 AliFemtoParticleCut* fSecondParticleCut; /* select particles of type #2 */
82 AliFemtoPicoEventCollection* fMixingBuffer; /* mixing buffer used in this simplest analysis */
83 AliFemtoPicoEvent* fPicoEvent; /* The current event, in the small (pico) form */
84 unsigned int fNumEventsToMix; /* How many "previous" events get mixed with this one, to make background */
85 unsigned int fNeventsProcessed; /* How many events processed so far */
86
87 unsigned int fMinSizePartCollection; /* Don't use event if it has fewer than this many particles passing ParticleCuts default 0*/
88
89#ifdef __ROOT__
90 ClassDef(AliFemtoAnalysis, 0)
91#endif
92
93 };
94
95// Get's
96inline AliFemtoPairCut* AliFemtoAnalysis::PairCut() {return fPairCut;}
97inline AliFemtoEventCut* AliFemtoAnalysis::EventCut() {return fEventCut;}
98inline AliFemtoParticleCut* AliFemtoAnalysis::FirstParticleCut() {return fFirstParticleCut;}
99inline AliFemtoParticleCut* AliFemtoAnalysis::SecondParticleCut() {return fSecondParticleCut;}
100inline AliFemtoCorrFctnCollection* AliFemtoAnalysis::CorrFctnCollection() {return fCorrFctnCollection;}
101inline unsigned int AliFemtoAnalysis::NumEventsToMix(){return fNumEventsToMix;}
102inline AliFemtoPicoEvent* AliFemtoAnalysis::CurrentPicoEvent() {return fPicoEvent;}
103
104inline AliFemtoPicoEventCollection* AliFemtoAnalysis::MixingBuffer() {return fMixingBuffer;}
105
106// Set's
107inline bool AliFemtoAnalysis::AnalyzeIdenticalParticles(){return (fFirstParticleCut==fSecondParticleCut);}
108inline void AliFemtoAnalysis::SetPairCut(AliFemtoPairCut* x) { fPairCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);}
109inline void AliFemtoAnalysis::AddCorrFctn(AliFemtoCorrFctn* cf) {fCorrFctnCollection->push_back(cf); cf->SetAnalysis((AliFemtoBaseAnalysis*)this);}
110inline void AliFemtoAnalysis::SetEventCut(AliFemtoEventCut* x) {fEventCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);}
111inline void AliFemtoAnalysis::SetFirstParticleCut(AliFemtoParticleCut* x) {fFirstParticleCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);}
112inline void AliFemtoAnalysis::SetSecondParticleCut(AliFemtoParticleCut* x) {fSecondParticleCut = x; x->SetAnalysis((AliFemtoBaseAnalysis*)this);}
113
114inline void AliFemtoAnalysis::SetNumEventsToMix(const unsigned int& nmix){ fNumEventsToMix = nmix;}
115inline bool AliFemtoAnalysis::MixingBufferFull(){return (fMixingBuffer->size() >= fNumEventsToMix);}
116inline int AliFemtoAnalysis::GetNeventsProcessed() {return fNeventsProcessed;}
117
118inline void AliFemtoAnalysis::SetMinSizePartCollection(unsigned int minSize){fMinSizePartCollection = minSize;}
119
120#endif