StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcIUMixMaker.h
1 #ifndef __StEEmcIUMixMaker_h__
2 #define __StEEmcIUMixMaker_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 "StEEmcIUPoint.h"
13 #include "StEEmcIUPair.h"
14 
15 class TRandom;
16 class StEEmcIUPointMaker;
17 class StMuDstMaker;
18 class StEEmcA2EMaker;
19 class StMuEvent;
20 class EEmcGeomSimple;
21 
22 class StEEmcIUMixMaker : public StMaker {
23 
24  public:
25 
29  StEEmcIUMixMaker( const Char_t *name, Int_t size=20 );
30  ~StEEmcIUMixMaker(){ /* 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  Int_t numberofFpoint();
45  StEEmcIUPair candidate(Int_t c){ return mCandidates[c]; }
47  StEEmcIUPair mixedCandidate(Int_t m) { return mBackground[m]; }
48 
50  Int_t Init();
52  Int_t Make();
54  void Clear( Option_t *opts="" );
55 
58  void sector( Int_t sector );
61  void trigger( Int_t trigger );
62 
64  void minET( Float_t et );
66  void maxZ( Float_t z );
68  void minEpoint( Float_t m );
69 
70 
80  void setTrigMode(Int_t m){ mTrigMode=m; }
81 
82 
84  void book();
86  void fill();
88  void fill ( std::vector<TH1F *> &h, StEEmcIUPair pair );
90  void fillQA( std::vector<TH2F *> &h, StEEmcIUPair pair );
92  void range( Float_t min, Float_t max );
93 
95  void fixedVertex(Float_t x, Float_t y, Float_t z){ mFixedVertex=TVector3(x,y,z); }
97  void floatVertex(Float_t x, Float_t y, Float_t z, Float_t s){ fixedVertex(x,y,z); mSigmaVertex=s; }
98 
102  void mixLimit(Int_t m){ mMixLimits=m; }
103 
104  private:
105  protected:
106 
107  TVector3 mFixedVertex;
108  Float_t mSigmaVertex;
110  Float_t mETcut;
111  Float_t mZcut;
112  Float_t mEpoint;
114  Int_t mTrigMode;
115  void fillPool();
117  Int_t mMixLimits;
119  std::vector<Int_t> mSectorList;
120  std::vector<Int_t> mTriggerList;
121  std::vector<Int_t> numberofFailpoint;
123  std::vector<TH1F*> mH1;
124  std::vector<TH2F*> mH2;
126  std::vector<TH1F*> mH1real;
128  std::vector<TH2F*> mH2real;
130  std::vector<TH1F*> mH1mix;
132  std::vector<TH2F*> mH2mix;
138 
141  TString mMuDstMakerName;
146  TString mAnalysisName;
149 
150 
151  TH1F *hZ1;
152  TH1F *hZ2;
153 
155  StEEmcIUPointVec_t mPoints;
156 
157 
161  std::vector< StEEmcIUPointVec_t > mPool;
162 
164  StEEmcIUPairVec_t mCandidates;
166  StEEmcIUPairVec_t mBackground;
167 
168 
170  Bool_t accept(StMuEvent *);
171 
173  Bool_t accept( StEEmcIUPoint &p1, StEEmcIUPoint &p2 );
174 
176  Float_t mMinMass, mMaxMass;
178  Int_t mPoolSize;
179 
181  void mixReal();
183  void mixBackground();
184 
186  TRandom *mRandom;
187 
190 
191 };
192 
193 inline void StEEmcIUMixMaker::sector(Int_t s){ mSectorList.push_back(s); }
194 inline void StEEmcIUMixMaker::trigger(Int_t t){ mTriggerList.push_back(t); }
195 inline void StEEmcIUMixMaker::minET(Float_t et){ mETcut=et; }
196 inline void StEEmcIUMixMaker::maxZ(Float_t z){ mZcut=z; }
197 inline void StEEmcIUMixMaker::minEpoint(Float_t m){ mEpoint=m; }
198 
199 inline void StEEmcIUMixMaker::mudst( const Char_t *n ){mMuDstMakerName=n;}
200 inline void StEEmcIUMixMaker::analysis(const Char_t *a){mAnalysisName=a;}
201 inline void StEEmcIUMixMaker::points(const Char_t *n){mPointMakerName=n; }
202 
203 inline void StEEmcIUMixMaker::range( Float_t mn, Float_t mx ){ mMinMass=mn; mMaxMass=mx; }
204 
205 inline Int_t StEEmcIUMixMaker::numberOfCandidates(){ return (Int_t)mCandidates.size(); }
206 inline Int_t StEEmcIUMixMaker::numberOfMixedCandidates(){ return (Int_t)mBackground.size(); }
207 #endif
208 inline Int_t StEEmcIUMixMaker::numberofFpoint(){return (Int_t) numberofFailpoint.size();}
StEEmcIUPair candidate(Int_t c)
Return a specified candidate pair.
void mixLimit(Int_t m)
EEmc ADC –&gt; energy maker.
A class for mixing pi0 candidates.
TString mPointMakerName
Point maker name.
TRandom * mRandom
Random number generator for event mixing.
Int_t numberOfMixedCandidates()
returns the number of mixed-background candidates
void fixedVertex(Float_t x, Float_t y, Float_t z)
Fix vertex for simple MC.
std::vector< TH2F * > mH2mix
2D mixed histos
void fillQA(std::vector< TH2F * > &h, StEEmcIUPair pair)
Fill qa distributions.
TString mMuDstMakerName
MuDst name.
void minET(Float_t et)
set minimum ET for pair of points
void setTrigMode(Int_t m)
StEEmcA2EMaker * mEEanalysis
Pointer to ADC 2 energy.
Int_t mPoolSize
Size of mixed event pool.
void fill()
fill 1d and 2d histograms
Class for building points from smd clusters.
Int_t numberOfCandidates()
returns the number of candidates
void range(Float_t min, Float_t max)
Mass range for qa histograms.
void mixBackground()
Mix combinatoric pairs.
std::vector< TH2F * > mH2real
2D real histos
Int_t Make()
Process.
StEEmcIUPairVec_t mBackground
Background pairs mixed on each event.
StEEmcIUPairVec_t mCandidates
Point pairs mixed on each event.
StEEmcIUMixMaker(const Char_t *name, Int_t size=20)
std::vector< TH1F * > mH1mix
1D mixed histos
void floatVertex(Float_t x, Float_t y, Float_t z, Float_t s)
Smear vertex.
std::vector< TH2F * > mH2
2D histos
StMuDstMaker * mMuDstMaker
Pointer to MuDst.
void book()
create 1d and 2d histograms
Int_t Init()
Initialize.
void trigger(Int_t trigger)
void mudst(const Char_t *name)
sets the name of the muDst maker
std::vector< StEEmcIUPointVec_t > mPool
void maxZ(Float_t z)
set maximum Zgg for pair of points
void analysis(const Char_t *name)
sets the name of the adc–&gt;energy maker
EEMC simple geometry.
std::vector< TH1F * > mH1
1D histos
Float_t mMinMass
Min and max mass for gated quantities.
void points(const Char_t *name)
sets the name of the point maker
Base class for representing EEMC points.
Definition: StEEmcIUPoint.h:12
void minEpoint(Float_t m)
minimum energy for a given point
void mixReal()
Mix real pairs.
void sector(Int_t sector)
std::vector< TH1F * > mH1real
1D real histos
Bool_t accept(StMuEvent *)
Accept or reject this event (trigger, qa, etc...)
TString mAnalysisName
Analaysis name.
StEEmcIUPair mixedCandidate(Int_t m)
Returns the specified mixed candidate pair.
void Clear(Option_t *opts="")
Clear.
ClassDef(StEEmcIUMixMaker, 1)
Makes class visible to root.
StEEmcIUPointVec_t mPoints
Vector of points to mix into X–&gt;gamma gamma.
EEmcGeomSimple * mEEmcTow
Pointer to tower geom.
std::vector< Int_t > mSectorList
StEEmcIUPointMaker * mEEpoints
Pointer to points.
std::vector< Int_t > mTriggerList