StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StParityAnalysis.h
1 #ifndef StParityAnalysis_hh
2 #define StParityAnalysis_hh
3 //#ifndef StMaker_H
4 //#include "StMaker.h"
5 //#endif
6 
7 #include "StHbtMaker/Base/StHbtBaseAnalysis.h" // base analysis class
8 #include "StHbtMaker/Base/StHbtPairCut.h"
9 #include "StHbtMaker/Base/StHbtEventCut.h"
10 #include "StHbtMaker/Base/StHbtParticleCut.h"
11 #include "StHbtMaker/Base/StHbtCorrFctn.hh"
12 #include "StHbtMaker/CorrFctn/ParityDevCorrFctn.h"
13 #include "StHbtMaker/Infrastructure/StParityTypes.hh"
14 #include "StHbtMaker/Infrastructure/StHbtCorrFctnCollection.hh"
15 #include "StHbtMaker/Infrastructure/StHbtPicoEventCollection.hh"
16 
17 #define SAME 5
18 #define MIXED 6
19 
21  // int EvanTest;
22 public:
23 
25  StParityAnalysis(const StParityAnalysis&); // copy constructor
26  virtual ~StParityAnalysis();
27 
28  // Gets and Sets
29 
30  virtual StHbtPairCut* PairCut();
31  virtual StHbtEventCut* EventCut();
32  virtual StHbtParticleCut* FirstParticleCut();
33  virtual StHbtParticleCut* SecondParticleCut();
34 
35  StHbtCorrFctnCollection* CorrFctnCollection();
36  virtual StHbtCorrFctn* CorrFctn(int n); // Access to CFs within the collection
37  void AddCorrFctn(StHbtCorrFctn*);
38 
39  void SetPairCut(StHbtPairCut*);
40  void SetEventCut(StHbtEventCut*);
41  void SetFirstParticleCut(StHbtParticleCut*);
42  void SetSecondParticleCut(StHbtParticleCut*);
43 
44  unsigned int NumEventsToMix();
45  void SetNumEventsToMix(const unsigned int&);
46  StHbtPicoEventCollection* MixingBuffer();
47  bool MixingBufferFull();
48 
49  bool AnalyzeIdenticalParticles();
50  virtual StHbtString Report();
51 
52  virtual void ProcessEvent(const StHbtEvent*);
53  void EventBegin(const StHbtEvent*); //startup for EbyE
54  void EventEnd(const StHbtEvent*); // cleanup for EbyE
55  int GetNeventsProcessed();
56 
57  virtual void Finish();
58 
59  friend class StHbtLikeSignAnalysis;
60 
61 
62  private:
63 
64  void AddEventProcessed();
65 
66  StHbtPairCut* mPairCut;
67  StHbtCorrFctnCollection* mCorrFctnCollection;
68  StHbtEventCut* mEventCut;
69  StHbtParticleCut* mFirstParticleCut;
70  StHbtParticleCut* mSecondParticleCut;
71  StHbtPicoEventCollection* mMixingBuffer;
72  unsigned int mNumEventsToMix;
73  unsigned int mNeventsProcessed;
74 
75 
76 
77 #ifdef __ROOT__
78  ClassDef(StParityAnalysis, 0)
79 #endif
80 
81 };
82 // Get's
83 
84 inline StHbtPairCut* StParityAnalysis::PairCut() {return mPairCut;}
85 inline StHbtEventCut* StParityAnalysis::EventCut() {return mEventCut;}
86 inline StHbtParticleCut* StParityAnalysis::FirstParticleCut() {return mFirstParticleCut;}
87 inline StHbtParticleCut* StParityAnalysis::SecondParticleCut() {return mSecondParticleCut;}
88 inline StHbtCorrFctnCollection* StParityAnalysis::CorrFctnCollection() {return mCorrFctnCollection;}
89 inline unsigned int StParityAnalysis::NumEventsToMix(){return mNumEventsToMix;}
90 
91 inline StHbtPicoEventCollection* StParityAnalysis::MixingBuffer() {return mMixingBuffer;}
92 
93 // Set's
94 inline bool StParityAnalysis::AnalyzeIdenticalParticles(){return (mFirstParticleCut==mSecondParticleCut);}
95 inline void StParityAnalysis::SetPairCut(StHbtPairCut* x) { mPairCut = x; x->SetAnalysis((StHbtBaseAnalysis*)this);}
96 inline void StParityAnalysis::AddCorrFctn(StHbtCorrFctn* cf) {mCorrFctnCollection->push_back(cf); cf->SetAnalysis((StHbtBaseAnalysis*)this);}
97 inline void StParityAnalysis::SetEventCut(StHbtEventCut* x) {mEventCut = x; x->SetAnalysis((StHbtBaseAnalysis*)this);}
98 inline void StParityAnalysis::SetFirstParticleCut(StHbtParticleCut* x) {mFirstParticleCut = x; x->SetAnalysis((StHbtBaseAnalysis*)this);}
99 inline void StParityAnalysis::SetSecondParticleCut(StHbtParticleCut* x) {mSecondParticleCut = x; x->SetAnalysis((StHbtBaseAnalysis*)this);}
100 
101 inline void StParityAnalysis::SetNumEventsToMix(const unsigned int& nmix){ mNumEventsToMix = nmix;}
102 inline bool StParityAnalysis::MixingBufferFull(){return (mMixingBuffer->size() >= mNumEventsToMix);}
103 inline int StParityAnalysis::GetNeventsProcessed() {return mNeventsProcessed;}
104 
105 
106 #endif
virtual void ProcessEvent(const StHbtEvent *)
returns reports of all cuts applied and correlation functions being done