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 "StEEmcPool/StEEmcPointMaker/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]; }
47  StEEmcPair 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, StEEmcPair pair );
90  void fillQA( std::vector<TH2F *> &h, StEEmcPair 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;
122  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;
140  TString mMuDstMakerName;
145  TString mAnalysisName;
148 
150  StEEmcPointVec_t mPoints;
151 
152 
156  std::vector< StEEmcPointVec_t > mPool;
157 
159  StEEmcPairVec_t mCandidates;
161  StEEmcPairVec_t mBackground;
162 
163 
165  Bool_t accept(StMuEvent *);
166 
168  Bool_t accept( StEEmcPoint &p1, StEEmcPoint &p2 );
169 
171  Float_t mMinMass, mMaxMass;
173  Int_t mPoolSize;
174 
176  void mixReal();
178  void mixBackground();
179 
181  TRandom *mRandom;
182 
185 
186 };
187 
188 inline void StEEmcMixMaker::sector(Int_t s){ mSectorList.push_back(s); }
189 inline void StEEmcMixMaker::trigger(Int_t t){ mTriggerList.push_back(t); }
190 inline void StEEmcMixMaker::minET(Float_t et){ mETcut=et; }
191 inline void StEEmcMixMaker::maxZ(Float_t z){ mZcut=z; }
192 inline void StEEmcMixMaker::minEpoint(Float_t m){ mEpoint=m; }
193 
194 inline void StEEmcMixMaker::mudst( const Char_t *n ){mMuDstMakerName=n;}
195 inline void StEEmcMixMaker::analysis(const Char_t *a){mAnalysisName=a;}
196 inline void StEEmcMixMaker::points(const Char_t *n){mPointMakerName=n; }
197 
198 inline void StEEmcMixMaker::range( Float_t mn, Float_t mx ){ mMinMass=mn; mMaxMass=mx; }
199 
200 inline Int_t StEEmcMixMaker::numberOfCandidates(){ return (Int_t)mCandidates.size(); }
201 inline Int_t StEEmcMixMaker::numberOfMixedCandidates(){ return (Int_t)mBackground.size(); }
202 #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.
Base class for representing EEMC points.
Definition: StEEmcPoint.h:24
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
void mixLimit(Int_t m)
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.