StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
diginitialize.h
1 #ifndef MAPS_DIGINITIALIZE_H
2 #define MAPS_DIGINITIALIZE_H
3 
4 #include <TNamed.h>
5 #include <TList.h>
6 #include <TGraph.h>
7 #include "Riostream.h"
8 #include "vector"
9 
10 // ROOT classes
11 #include "TString.h"
12 #include "TObject.h"
13 #include "TVector.h"
14 #include "TFile.h"
15 #include "TSystem.h"
16 #include "TRandom.h"
17 #include "TH1.h"
18 #include "TH2.h"
19 #include "TObjArray.h"
20 #include "TTree.h"
21 #include "TBranch.h"
22 #include "TClonesArray.h"
23 using namespace std;
24 
25 class DIGInitialize;
26 class DIGPlane;
27 class DIGADC;
28 class DIGBeam;
29 class DIGTransport;
30 class DIGParticle;
31 class DIGAction;
32 class DIGEvent;
33 class DIGMAPS;
34 
35 class DIGInitialize : public TNamed {
36  public:
37  DIGInitialize();
38  DIGInitialize(const char *name, const char *title, TString aCP, TString aCFN, TString action);
39  virtual ~DIGInitialize();
40  void SetConfigPath(TString aCP) ;
41  void SetConfigFileName(TString aCFN) ;
42  void SetConfigPathAndFileName() ;
43  void SetConfigPathAndFileName(TString aCP,TString aCFN) ;
44  TString GetConfigPath() ;
45  TString GetConfigFileName() ;
46  TString GetConfigPathAndFileName() ;
47 
48  void nextItem(Char_t delimiter);
49  // void read_r3(DR3 &arg);
50  void read_item(Int_t &arg);
51  void read_item(Float_t &arg);
52  void read_item(Double_t &arg);
53  void read_item(Bool_t &arg);
54 
55 
56  void PrintInfo();
57 
59  enum {actionnum = 200};
60  Char_t Doit[actionnum];
61  Char_t Model[actionnum];
62 
63  } ActionParameter;
64  ActionParameter_t& GetActionPar() {return ActionParameter;}
65 
66 
67  struct BeamParameter_t {
68  enum {beamnum = 50};
69  Int_t RunNumber; //You can set a run number to compare several configurations.
70  Int_t NumberOfEvents; //number of events to run per configuration
71  Float_t ParticleDensity; //number of particles per mm^2 per event
72  Int_t NAngles;
73  Float_t ThetaIncidentDeg[beamnum];
74  Float_t PhiIncidentDeg[beamnum];
75  Int_t BeamOption;
76 
77  } BeamParameter;
78  BeamParameter_t& GetBeamPar() {return BeamParameter;}
79 
81  enum {planenum = 100};
82  Int_t NADC;
83 
84  Int_t NTransport; // <20
85 
86  //Int_t NPitch;
87  Int_t NGeom;
88  Float_t PitchX[planenum];
89  Float_t PitchY[planenum];
90  //Int_t Nepitaxial;
91  Float_t EpitaxialThickness[planenum];
92  //Int_t NNoise;
93  Float_t NoiseElectrons[planenum];
94  Int_t NPixelsX;
95  Int_t NPixelsY;
96  Int_t NTemperature;
97  Float_t Temperature[planenum];
98  Float_t IonizationEnergy;
99  Float_t SegmentSize;
100  Float_t MaximumSegmentSize;
101  Float_t MaximumChargePerSegment;
102  Float_t DiffusionMaximumRangeInX;
103  Float_t DiffusionMaximumRangeInY;
104  Float_t ReflexionCoefficient;
105  Float_t BasicModel_SigmaTenMicrons;
106 
107  }PlaneParameter;
108  PlaneParameter_t& GetPlanePar() {return PlaneParameter;}
109 
111  //enum {transportnum = 20};
112  Int_t ChargeModel;
113  Float_t RangeLimit_InPitchUnit;
114  Float_t Lorentz2DModel_Cp0;
115  Float_t Lorentz2DModel_Cp1;
116  Float_t Gauss2DModel_sigma1_Cp0;
117  Float_t Gauss2DModel_sigma1_Cp1;
118  Float_t Gauss2DModel_sigma2_Cp0;
119  Float_t Gauss2DModel_sigma2_Cp1;
120  Float_t Gauss2DModel_weight;
121 
122  Float_t LorGaussModel_Norm1_Cp0;
123  Float_t LorGaussModel_Norm1_Cp1;
124  Float_t LorGaussModel_Norm1_Cp2;
125  Float_t LorGaussModel_sigma_Cp0;
126  Float_t LorGaussModel_sigma_Cp1;
127  Float_t LorGaussModel_C_Cp0;
128  Float_t LorGaussModel_C_Cp1;
129  Float_t LorGaussModel_Norm_Cp0;
130  Float_t LorGaussModel_Norm_Cp1;
131 
132  Float_t lorlorgausModel_Norm1_Cp0 ;
133  Float_t lorlorgausModel_Norm1_Cp1 ;
134  Float_t lorlorgausModel_x01_Cp0 ;
135  Float_t lorlorgausModel_x01_Cp1 ;
136  Float_t lorlorgausModel_sigmax1_Cp0 ;
137  Float_t lorlorgausModel_sigmax1_Cp1 ;
138  Float_t lorlorgausModel_y01_Cp0 ;
139  Float_t lorlorgausModel_y01_Cp1 ;
140  Float_t lorlorgausModel_sigmay1_Cp0 ;
141  Float_t lorlorgausModel_sigmay1_Cp1 ;
142  Float_t lorlorgausModel_Gamma_Cp0 ;
143  Float_t lorlorgausModel_Gamma_Cp1 ;
144  Float_t lorlorgausModel_x0_Cp0 ;
145  Float_t lorlorgausModel_x0_Cp1 ;
146  Float_t lorlorgausModel_y0_Cp0 ;
147  Float_t lorlorgausModel_y0_Cp1 ;
148  Float_t lorlorgausModel_norm_Cp0 ;
149  Float_t lorlorgausModel_norm_Cp1 ;
150  Float_t lorlorgausModel_normgaus2_Cp0 ;
151  Float_t lorlorgausModel_normgaus2_Cp1 ;
152  Float_t lorlorgausModel_sigma2_Cp0 ;
153  Float_t lorlorgausModel_sigma2_Cp1 ;
154 
155  Float_t l1dimgauslor_Norm_g_1st;
156  Float_t l1dimgauslor_x0_g_1st;
157  Float_t l1dimgauslor_sigma_g_1st;
158  Float_t l1dimgauslor_Gamma_lor_1st;
159  Float_t l1dimgauslor_x0_lor_1st;
160  Float_t l1dimgauslor_norm_lor_1st;
161  Float_t l1dimgauslor_Norm_g_2nd;
162  Float_t l1dimgauslor_x0_g_2nd;
163  Float_t l1dimgauslor_sigma_g_2nd;
164  Float_t l1dimgauslor_Gamma_lor_2nd;
165  Float_t l1dimgauslor_x0_lor_2nd;
166  Float_t l1dimgauslor_norm_lor_2nd;
167 
168 
169  //par[0] Norm_1
170  //par[1] x0_1
171  //par[2] sigma_x_1
172  //par[3] y0_1
173  //par[4] sigma_y_1
174  // par[5] = Gamma
175  // par[6] = x0
176  // par[7] = y0
177  // par[8] = norm
178  // par[9] = normgaus2
179  // par[10] = sigma_2
180 
181  };
182 
183  TransportParameter_t *pTransportParameter;
184  TransportParameter_t& GetTransportPar(Int_t aPN) {return pTransportParameter[aPN];}
185 
186 
187  struct ADCParameter_t {
188  enum {adcnum = 4096}; //12bits maximum
189  Int_t Nbits; //Nbits
190  Int_t NThresholds; // actually (2^Nbits)-1
191  Bool_t ADC_linear; // 1 if the ADC has a linear gain, 0 otherwise.
192  Float_t LSB; //if ADC is linear, threshold of the least significant bit (in Signal/Noise units)
193  Float_t Electron_Conversion; // if ADC is linear, the conversion factor for 1 bit beyond the first (ADC count/(Signal/Noise))
194  Float_t ADC_thresholds[adcnum]; //if ADC is NOT linear, All thresholds (in Signal/Noise units)
195 
196  //Int_t NumberOfPlanes;
197  // Int_t FileCountOut; // maximum number of files possible
198  };
199 
200  ADCParameter_t *pADCParameter;
201  ADCParameter_t& GetADCPar(Int_t aPN) {return pADCParameter[aPN];}
202 
203 
204  //---to add:
205  /*
206  Temperature
207  fluence (neq(1MeV)/cm2)
208  radiation dose (krad)
209  diodes number/surface
210  epi resistivity
211  CCE, transport, poisson law used
212  delta.
213  electronic Noise
214  nombre de segments
215  attenuation length
216  reflexion coeeficient
217  ionisation energiemaximum range of diffusion
218  maximum length of a segment
219  maximum charge of a segment
220  gain
221  suppression de zero
222  fake rate. pixels chauds.
223  */
224 
225  protected:
226 
227  TString fConfigPath; // name of the configuration path
228  TString fConfigFileName; // name of the configuration file
229  TString fConfigPathAndFileName; // both path and file name appended
230  ifstream fConfigFileStream;
231 
232 
233  ClassDef(DIGInitialize,1);
234 
235 };
236 //==============================================================================
237 #endif
Definition: digadc.h:36
ADCParameter_t & GetADCPar(Int_t aPN)
don&#39;&#39;t put in streamer