StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPrepEmbedMaker.h
1 
66 #ifndef StPrepEmbedMaker_hh
67 #define StPrepEmbedMaker_hh
68 
69 #include "StMaker.h"
70 #include "TGiant3.h"
71 #include "TString.h"
72 
73 class StEvent;
74 class StEvtHddr ;
75 class StTrack;
76 class TFile;
77 class TGiant3;
78 class TTree;
79 
80 class StPrepEmbedMaker : public StMaker {
81  public:
82 
83  StPrepEmbedMaker(const Char_t *name="PrepEmbed"); // constructor
84  ~StPrepEmbedMaker(); // destructor
85 
86  Int_t Init(); // called once at the beginning of your job
87  Int_t Make(); // invoked for every event
88  Int_t Finish();
89  Int_t InitRun(const int runnum);
90  virtual void Do(const Char_t *option = "dcut cave x 0.1 10 10 0.03 0.03"); // *MENU
91  virtual const char *GetCVS() const {
92  static const char cvs[]="Tag $Name: $ $Id: StPrepEmbedMaker.h,v 1.9 2014/08/06 11:43:55 jeromel Exp $ built " __DATE__ " " __TIME__ ;
93  return cvs;
94  }
95 
96  void SetPartOpt(const Int_t pid, const Double_t mult);
97 
105  void SetOpt(const Double_t ptlow, const Double_t pthigh,
106  const Double_t etalow, const Double_t etahigh, const Double_t philow,
107  const Double_t phihigh, const TString type="FlatPt");
108  void SetTemp(const double t);
109  void SetTagFile(const Char_t *file) ;
110  void SetSkipMode(const Bool_t flag=kTRUE) ;
111  void SetSpreadMode(const Bool_t flag=kFALSE) ;
112  void SetTrgOpt(const Int_t TrgId); // Set trigger id cut
113  void SetZVertexCut(const Double_t vzlow, const Double_t vzhigh); // Set z-vertex cut
114  void SetVrCut(const Double_t vr) ; // Set vr = sqrt{vx^2 + vy^2} cut
115  void SetVpdVzCut(const Double_t vpdvz) ; // Set |vpdvz-vz| cut
116  void SetPVRankCut(const Double_t pvrank) ; // Set cut on P.V. rank > pvrank
117  void OpenFzFile() ;
118  void SetPrimeMode(const Bool_t flag=kFALSE) ; //Switch to prime mode for nucleus (with geantID > 10000) embedding
119  void SetVpdVzCutMode(const Bool_t flag=kFALSE) ; //Switch to turn on cut for |VpdVz-Vz|
120  void SetPVRankCutMode(const Bool_t flag=kFALSE) ; //Switch to turn on cut for P.V. rank
121 
122  void SetRapidityMode(const Bool_t flag=kTRUE) ; //Switch to assigin input kinematic range to rapidity (true) or pseudorapidity(false)
123 
126  void phasespace(const Int_t mult) ;
127 
130  void gkine(const Int_t mult, const Double_t vzmin, const Double_t vzmax) ;
131 
132  private:
133  static const Double_t mRapidityMaximumCut ;
134 
138  Int_t getMultiplicity(const StEvtHddr& EvtHddr, const Int_t nprimarytracks) const ;
139 
140  TGiant3 *mGeant3;
141  TString mTagFile;
142  TString mMoreTagsFile;
143  TString mFzFile ;
144  Int_t mEventCounter;
145  TFile *mFile;
146  TFile *mMoreFile;
147  TTree *mTree;
148  TTree *mMoreTree;
149  Bool_t mSkipMode;
150  Bool_t mSpreadMode;
151  Bool_t mOpenFzFile;
152 
153  Bool_t mRapidityMode;
154 
155  Bool_t mPrimeMode;
156  Int_t mSavePid;
157  Bool_t mPrimed; //
158 
159  Bool_t mVpdVzCutMode;
160  Bool_t mPVRankCutMode;
161 
162  ClassDef(StPrepEmbedMaker,0)
163 };
164 #endif
Prepare GEANT Maker with input from embedding settings and DAQ event.
void phasespace(const Int_t mult)
StPrepEmbedMaker(const Char_t *name="PrepEmbed")
void SetOpt(const Double_t ptlow, const Double_t pthigh, const Double_t etalow, const Double_t etahigh, const Double_t philow, const Double_t phihigh, const TString type="FlatPt")
Set geantid(pid) and multiplicity.
void SetPrimeMode(const Bool_t flag=kFALSE)
Switch to enable writing .fz file.
void gkine(const Int_t mult, const Double_t vzmin, const Double_t vzmax)