23 #define CBOLTZ (1.38E-23)
24 #define e_SI (1.6E-19)
44 theCDividerFP420 =
new ChargeDividerFP420(moduleThickness, bz420, bzD2, bzD3, verbosity);
46 depletionVoltage=20.0;
50 chargeMobility=1350.0;
54 double diffusionConstant =
CBOLTZ/
e_SI * chargeMobility * temperature;
57 if (noDiffusion) diffusionConstant *= 1.0e-3;
59 chargeDistributionRMS=6.5e-10;
62 tanLorentzAnglePerTesla = 0. ;
67 double timeNormalisation =
pow(ldrift,2)/(2.*depletionVoltage*chargeMobility);
69 timeNormalisation = timeNormalisation*0.01;
74 double clusterWidth=5.;
75 gevperelectron= 3.61e-09;
79 std::cout <<
"HitDigitizerFP420: constructor ldrift= " << ldrift << std::endl;
80 std::cout <<
"ldriftY= " <<ldriftY <<
"ldriftX= " <<ldriftX << std::endl;
81 std::cout <<
"depletionVoltage" << depletionVoltage <<
"appliedVoltage" << appliedVoltage <<
"chargeMobility" << chargeMobility <<
"temperature" << temperature <<
"diffusionConstant" << diffusionConstant <<
"chargeDistributionRMS" << chargeDistributionRMS <<
"moduleThickness" << moduleThickness <<
"timeNormalisation" << timeNormalisation <<
"gevperelectron" << gevperelectron << std::endl;
90 chargeDistributionRMS,
103 delete theCDividerFP420;
104 delete theCDrifterFP420;
105 delete theIChargeFP420;
119 float chargePosition= -100.;
127 chargePosition = 0.5*(numStrips) + middlex/pitch ;
132 else if(xytype == 2) {
138 chargePosition = 0.5*(numStrips) + middley/pitch ;
143 std::cout <<
"================================================================"<<std::endl;
144 std::cout <<
"**** HitDigitizerFP420: !!! ERROR: you have not to be here !!! xytype=" << xytype << std::endl;
151 if(chargePosition > numStrips || chargePosition < 0) {
152 std::cout <<
"**** HitDigitizerFP420: !!! ERROR: check correspondence of XY detector dimensions in XML and here !!! chargePosition = " << chargePosition << std::endl;
157 std::cout <<
" ====== **** HitDigitizerFP420: !!! processHit !!! : input: xytype=" << xytype <<
" numStrips= " << numStrips <<
" pitch= " << pitch <<
" Calculated chargePosition= " << chargePosition << std::endl;
158 std::cout <<
"The middle of hit point on input was: middlex = " << middlex << std::endl;
159 std::cout <<
"The middle of hit point on input was: middley = " << middley << std::endl;
161 std::cout <<
" ====== **** HitDigitizerFP420:processHit: start CDrifterFP420 divide" << std::endl;
174 G4ThreeVector driftDir = DriftDirection(bfield,xytype,verbosity);
176 std::cout <<
" ====== **** HitDigitizerFP420:processHit: driftDir= " << driftDir << std::endl;
177 std::cout <<
" ====== **** HitDigitizerFP420:processHit: start induce , CDrifterFP420 drift " << std::endl;
185 return theIChargeFP420->induce(theCDrifterFP420->drift(ion,driftDir,xytype), numStrips, pitch, numStripsW, pitchW, xytype,
verbosity);
198 G4ThreeVector Bfield=_bfield;
199 float dir_x, dir_y, dir_z;
213 dir_y = +tanLorentzAnglePerTesla * Bfield.z();
214 dir_z = -tanLorentzAnglePerTesla * Bfield.y();
218 else if(xytype == 1) {
219 dir_x = +tanLorentzAnglePerTesla * Bfield.z();
221 dir_z = -tanLorentzAnglePerTesla * Bfield.x();
227 std::cout <<
"HitDigitizerFP420: ERROR - wrong xytype=" << xytype << std::endl;
232 G4ThreeVector theDriftDirection(dir_x,dir_y,dir_z);
235 std::cout <<
"HitDigitizerFP420:DriftDirection tanLorentzAnglePerTesla= " << tanLorentzAnglePerTesla << std::endl;
236 std::cout <<
"HitDigitizerFP420:DriftDirection The drift direction in local coordinate is " << theDriftDirection << std::endl;
239 return theDriftDirection;
std::map< int, float, std::less< int > > hit_map_type
G4ThreeVector DriftDirection(const G4ThreeVector &, int, int)
HitDigitizerFP420(float in, float ild, float ildx, float ildy, float in0, float in2, float in3, int verbosity)
Local3DPoint exitPoint() const
Exit point in the local Det frame.
std::vector< EnergySegmentFP420 > ionization_type
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Power< A, B >::type pow(const A &a, const B &b)
hit_map_type processHit(const PSimHit &, const G4ThreeVector &, int, int, double, int, double, double, int)