StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcMixMaker.h
1 #ifndef __StEEmcMixMaker_h__
2 #define __StEEmcMixMaker_h__
3 
4 #include <StMaker.h>
5 #include <vector>
6 #include <algorithm>
7 #include "TString.h"
8 
9 class TH1F;
10 class TH2F;
11 
12 #include "StEEmcPoint.h"
13 #include "StEEmcPair.h"
14 
15 class TRandom;
16 class StEEmcPointMaker;
17 class StMuDstMaker;
18 class StEEmcA2EMaker;
19 class StMuEvent;
20 class EEmcGeomSimple;
21 
22 class StEEmcMixMaker : public StMaker {
23 
24  public:
25 
29  StEEmcMixMaker( const Char_t *name, Int_t size=20 );
30  ~StEEmcMixMaker(){ /* nada */ };
31 
33  void mudst( const Char_t *name );
35  void points( const Char_t *name );
37  void analysis( const Char_t *name );
38 
40  Int_t numberOfCandidates();
42  Int_t numberOfMixedCandidates();
43 
45  StEEmcPair candidate(Int_t c){ return mCandidates[c]; }
46  StEEmcPair mixedCandidate(Int_t m) { return mBackground[m]; }
47 
48  Int_t Init();
49  Int_t Make();
50  void Clear( Option_t *opts="" );
51 
54  void sector( Int_t sector );
57  void trigger( Int_t trigger );
58 
60  void minET( Float_t et );
62  void maxZ( Float_t z );
64  void minEpoint( Float_t m );
65 
66 
76  void setTrigMode(Int_t m){ mTrigMode=m; }
77 
78 
80  void book();
82  void fill();
84  void fill ( std::vector<TH1F *> &h, StEEmcPair pair );
86  void fillQA( std::vector<TH2F *> &h, StEEmcPair pair );
87 
88  void range( Float_t min, Float_t max );
89 
90 
91  void fixedVertex(Float_t x, Float_t y, Float_t z){ mFixedVertex=TVector3(x,y,z); }
92  void floatVertex(Float_t x, Float_t y, Float_t z, Float_t s){ fixedVertex(x,y,z); mSigmaVertex=s; }
93 
94  private:
95  protected:
96 
97  TVector3 mFixedVertex;
98  Float_t mSigmaVertex;
99 
100  Float_t mETcut;
101  Float_t mZcut;
102  Float_t mEpoint;
103 
104  Int_t mTrigMode;
105  void fillPool();
106 
107  std::vector<Int_t> mSectorList;
108  std::vector<Int_t> mTriggerList;
109 
110  std::vector<TH1F*> mH1;
111  std::vector<TH2F*> mH2;
112 
113  std::vector<TH1F*> mH1real;
114  std::vector<TH2F*> mH2real;
115 
116  std::vector<TH1F*> mH1mix;
117  std::vector<TH2F*> mH2mix;
118 
122 
123  TString mMuDstMakerName;
124  TString mPointMakerName;
125  TString mAnalysisName;
126 
128 
130  StEEmcPointVec_t mPoints;
131 
132 
136  std::vector< StEEmcPointVec_t > mPool;
137 
139  StEEmcPairVec_t mCandidates;
141  StEEmcPairVec_t mBackground;
142 
143 
145  Bool_t accept(StMuEvent *);
146 
147  Float_t mMinMass, mMaxMass;
148  Int_t mPoolSize;
149 
151  void mixReal();
153  void mixBackground();
154 
155 
156  TRandom *mRandom;
157 
159 
160 };
161 
162 inline void StEEmcMixMaker::sector(Int_t s){ mSectorList.push_back(s); }
163 inline void StEEmcMixMaker::trigger(Int_t t){ mTriggerList.push_back(t); }
164 inline void StEEmcMixMaker::minET(Float_t et){ mETcut=et; }
165 inline void StEEmcMixMaker::maxZ(Float_t z){ mZcut=z; }
166 inline void StEEmcMixMaker::minEpoint(Float_t m){ mEpoint=m; }
167 
168 inline void StEEmcMixMaker::mudst( const Char_t *n ){mMuDstMakerName=n;}
169 inline void StEEmcMixMaker::analysis(const Char_t *a){mAnalysisName=a;}
170 inline void StEEmcMixMaker::points(const Char_t *n){mPointMakerName=n; }
171 
172 inline void StEEmcMixMaker::range( Float_t mn, Float_t mx ){ mMinMass=mn; mMaxMass=mx; }
173 
174 inline Int_t StEEmcMixMaker::numberOfCandidates(){ return (Int_t)mCandidates.size(); }
175 inline Int_t StEEmcMixMaker::numberOfMixedCandidates(){ return (Int_t)mBackground.size(); }
176 #endif
TString mPointMakerName
Point maker name.
std::vector< TH1F * > mH1mix
1D mixed histos
void mudst(const Char_t *name)
sets the name of the muDst maker
Int_t Init()
Initialize.
EEmc ADC –&gt; energy maker.
void fixedVertex(Float_t x, Float_t y, Float_t z)
Fix vertex for simple MC.
void setTrigMode(Int_t m)
EEmcGeomSimple * mEEmcTow
Pointer to tower geom.
void book()
create 1d and 2d histograms
void minEpoint(Float_t m)
minimum energy for a given point
TRandom * mRandom
Random number generator for event mixing.
void fill()
fill 1d and 2d histograms
void Clear(Option_t *opts="")
Clear.
std::vector< StEEmcPointVec_t > mPool
void trigger(Int_t trigger)
Int_t numberOfCandidates()
returns the number of candidates
void sector(Int_t sector)
ClassDef(StEEmcMixMaker, 1)
Makes class visible to root.
void analysis(const Char_t *name)
sets the name of the adc–&gt;energy maker
StEEmcPair mixedCandidate(Int_t m)
Returns the specified mixed candidate pair.
Class for building points from smd clusters.
std::vector< TH1F * > mH1real
1D real histos
TString mAnalysisName
Analaysis name.
void mixBackground()
Mix combinatoric pairs.
void mixReal()
Mix real pairs.
std::vector< TH2F * > mH2
2D histos
TVector3 mFixedVertex
StEEmcPointMaker * mEEpoints
Pointer to points.
Int_t numberOfMixedCandidates()
returns the number of mixed-background candidates
void minET(Float_t et)
set minimum ET for pair of points
StMuDstMaker * mMuDstMaker
Pointer to MuDst.
Int_t Make()
Process.
void floatVertex(Float_t x, Float_t y, Float_t z, Float_t s)
Smear vertex.
void maxZ(Float_t z)
set maximum Zgg for pair of points
std::vector< Int_t > mTriggerList
EEMC simple geometry.
std::vector< TH2F * > mH2real
2D real histos
Int_t mPoolSize
Size of mixed event pool.
std::vector< TH2F * > mH2mix
2D mixed histos
std::vector< TH1F * > mH1
1D histos
A class for mixing pi0 candidates.
void range(Float_t min, Float_t max)
Mass range for qa histograms.
StEEmcPair candidate(Int_t c)
Return a specified candidate pair.
Float_t mSigmaVertex
TString mMuDstMakerName
MuDst name.
StEEmcPairVec_t mBackground
Background pairs mixed on each event.
StEEmcPairVec_t mCandidates
Point pairs mixed on each event.
Bool_t accept(StMuEvent *)
Accept or reject this event (trigger, qa, etc...)
void points(const Char_t *name)
sets the name of the point maker
A class to represent pairs of points.
Definition: StEEmcPair.h:9
StEEmcMixMaker(const Char_t *name, Int_t size=20)
StEEmcA2EMaker * mEEanalysis
Pointer to ADC 2 energy.
void fillQA(std::vector< TH2F * > &h, StEEmcPair pair)
Fill qa distributions.
std::vector< Int_t > mSectorList
Float_t mMinMass
Min and max mass for gated quantities.
StEEmcPointVec_t mPoints
Vector of points to mix into X–&gt;gamma gamma.