StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPmdSimulatorMaker.h
1 
5 /******************************************************************
6  *
7  * $Id: StPmdSimulatorMaker.h,v 1.6 2003/11/27 12:33:37 subhasis Exp $
8  *
9  * Author: Subhasis Chattopadhyay
10  *
11  ******************************************************************
12  *
13  * Description: This is the Slow (fast) simulator for PMD
14  ******************************************************************
15  *
16  * $Log: StPmdSimulatorMaker.h,v $
17  * Revision 1.6 2003/11/27 12:33:37 subhasis
18  * calib constant values updated
19  *
20  * Revision 1.5 2003/10/15 10:40:12 subhasis
21  * Changes by Dipak (eg GeV to keV
22  *
23  ******************************************************************/
24 
25 #ifndef STAR_StPmdSimulatorMaker
26 #define STAR_StPmdSimulatorMaker
27 
28 #ifndef StMaker_H
29 #include "StMaker.h"
30 #endif
31 #include <TH2.h>
32 #include <TH1.h>
33 #include <TCanvas.h>
34 #include "StPmdUtil/StPmdGeom.h"
35 
36 class StPhmdCollection;
37 class StPmdCollection;
38 class StPmdHit;
39 class StPmdDetector;
40 
41 class StPmdSimulatorMaker : public StMaker {
42 private:
43  Float_t mlcon0;
44  Float_t mlcon1;
45  Float_t mlcon2;
46  Float_t mpcon0;
47  Float_t mpcon1;
48  Float_t mpcon2;
49  Bool_t mResFlag;
50 protected:
51  StPmdCollection * mPmdCollection;
53 
55  TH2F *m_pmdEdep2D;
56  TH2F *m_cpvEdep2D;
57 
58  TH1F *mEdepPmd;
59  TH1F *mEdepPmd_part;
60  TH1F *mPmdAdc;
61  TH1F *mHitPmd;
62  TH1F *mEdepCpv;
63  TH1F *mEdepCpv_part;
64  TH1F *mCpvAdc;
65  TH1F *mHitCpv;
66  TH1F *m_pmdsuper;
67  TH1F *m_cpvsuper;
68  TH2F *m_pmdrow;
69  TH2F *m_cpvrow;
70  TH2F *m_pmdcol;
71  TH2F *m_cpvcol;
72 
73 
74  void adcconstants();
75 
76 public:
78  StPmdSimulatorMaker(const char *name="PmdSimulator");
80  virtual Int_t Init();
81  virtual Int_t Make();
82  Int_t GetPmd();
83  Int_t makePmdHits();
84  Int_t Decode_VolId(Int_t&,Int_t&,Int_t&,Int_t&,Int_t&,Int_t&);
86 
87  void FinalEdep(StPmdDetector*,Int_t);
88  Float_t keV_ADC(Float_t,Float_t&);
89  Float_t ADC_Readout(Float_t,Int_t&);
90  void bookHistograms();
93  void SetResFlag(Bool_t);
94 
95  void Browse(TBrowser* b);
96 
97  ClassDef(StPmdSimulatorMaker, 1)
98 };
99 
100 inline void StPmdSimulatorMaker::SetResFlag(Bool_t val){mResFlag=val;}
101 
103 {
104 /*
105  mlcon0=7.12;
106  mlcon1=20.7;
107  mlcon2=0.029;
108 */
109 
110  mlcon0=14.01;
111  mlcon1=9.015;
112  mlcon2=0.08203;
113 
114  mpcon0=127.13;
115  mpcon1=-0.2182;
116  mpcon2=.0001159;
117 }
118 
119 #endif
120 
121 
Int_t GetPmd()
Getting GEANT tables from input file.
Int_t fillStEvent(StPmdDetector *, StPmdDetector *)
TH2F * m_cpvrow
Pmd super vs row.
Int_t Decode_VolId(Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &)
Making Pmd hits after slow simulation.
void FillHistograms(StPmdDetector *, StPmdDetector *, Int_t)
Booking histograms.
StPhmdCollection * mevtPmdCollection
Pmd and CPV collections.
TH1F * m_cpvsuper
total no of Supermodules for PMD
TH2F * m_pmdcol
Cpv super vs row.
TH1F * mHitPmd
total ADC on PMD
TH1F * mCpvAdc
Total edep on CPV.
StPmdSimulatorMaker(const char *name="PmdSimulator")
A constructor.
TH1F * mEdepPmd
2D-Edep Display of Cpv
TH2F * m_pmdEdep2D
Pmd and CPV collections for Stevent.
TH2F * m_cpvEdep2D
2D-Edep Display of Pmd
TH1F * m_pmdsuper
total no of hits on Cpv
void Browse(TBrowser *b)
Readout resolution is applied when Flag = 1.
virtual Int_t Init()
A destructor.
void adcconstants()
Cpv super vs col.
TH2F * m_cpvcol
Pmd super vs col.
Int_t makePmdHits()
Getting Pmdhits from geant.
TH1F * mEdepPmd_part
cell edep on Pmd
TH1F * mPmdAdc
total edep on Pmd
TH1F * mEdepCpv
total no of hits on Pmd
StPmdHit * Exist(StPmdHit *, StPmdDetector *, Int_t)
decoding
TH1F * mEdepCpv_part
cell edep on CPV
TH2F * m_pmdrow
total no of Supermodules for CPV
TH1F * mHitCpv
Total ADC on CPV.