00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef STAR_StPmdSimulatorMaker
00026 #define STAR_StPmdSimulatorMaker
00027
00028 #ifndef StMaker_H
00029 #include "StMaker.h"
00030 #endif
00031 #include <TH2.h>
00032 #include <TH1.h>
00033 #include <TCanvas.h>
00034 #include "StPmdUtil/StPmdGeom.h"
00035
00036 class StPhmdCollection;
00037 class StPmdCollection;
00038 class StPmdHit;
00039 class StPmdDetector;
00040
00041 class StPmdSimulatorMaker : public StMaker {
00042 private:
00043 Float_t mlcon0;
00044 Float_t mlcon1;
00045 Float_t mlcon2;
00046 Float_t mpcon0;
00047 Float_t mpcon1;
00048 Float_t mpcon2;
00049 Bool_t mResFlag;
00050 protected:
00051 StPmdCollection * mPmdCollection;
00052 StPhmdCollection * mevtPmdCollection;
00053
00055 TH2F *m_pmdEdep2D;
00056 TH2F *m_cpvEdep2D;
00057
00058 TH1F *mEdepPmd;
00059 TH1F *mEdepPmd_part;
00060 TH1F *mPmdAdc;
00061 TH1F *mHitPmd;
00062 TH1F *mEdepCpv;
00063 TH1F *mEdepCpv_part;
00064 TH1F *mCpvAdc;
00065 TH1F *mHitCpv;
00066 TH1F *m_pmdsuper;
00067 TH1F *m_cpvsuper;
00068 TH2F *m_pmdrow;
00069 TH2F *m_cpvrow;
00070 TH2F *m_pmdcol;
00071 TH2F *m_cpvcol;
00072
00073
00074 void adcconstants();
00075
00076 public:
00078 StPmdSimulatorMaker(const char *name="PmdSimulator");
00079 ~StPmdSimulatorMaker();
00080 virtual Int_t Init();
00081 virtual Int_t Make();
00082 Int_t GetPmd();
00083 Int_t makePmdHits();
00084 Int_t Decode_VolId(Int_t&,Int_t&,Int_t&,Int_t&,Int_t&,Int_t&);
00085 StPmdHit* Exist(StPmdHit*,StPmdDetector*,Int_t);
00086
00087 void FinalEdep(StPmdDetector*,Int_t);
00088 Float_t keV_ADC(Float_t,Float_t&);
00089 Float_t ADC_Readout(Float_t,Int_t&);
00090 void bookHistograms();
00091 void FillHistograms(StPmdDetector*,StPmdDetector*,Int_t);
00092 Int_t fillStEvent(StPmdDetector*, StPmdDetector*);
00093 void SetResFlag(Bool_t);
00094
00095 void Browse(TBrowser* b);
00096
00097 ClassDef(StPmdSimulatorMaker, 1)
00098 };
00099
00100 inline void StPmdSimulatorMaker::SetResFlag(Bool_t val){mResFlag=val;}
00101
00102 inline void StPmdSimulatorMaker::adcconstants()
00103 {
00104
00105
00106
00107
00108
00109
00110 mlcon0=14.01;
00111 mlcon1=9.015;
00112 mlcon2=0.08203;
00113
00114 mpcon0=127.13;
00115 mpcon1=-0.2182;
00116 mpcon2=.0001159;
00117 }
00118
00119 #endif
00120
00121