48 #include "StFtpcSlowSimCluster.hh"
49 #include "StFtpcSlowSimField.hh"
50 #include "StFtpcClusterMaker/StFtpcParamReader.hh"
51 #include "StFtpcClusterMaker/StFtpcDbReader.hh"
52 #include "StMessMgr.h"
53 #include "StMessMgr.h"
58 const float el,
const float rad_offset,
59 const float pad_offset,
const float r,
60 const float ph,
const float time,
61 const int call_padrow)
63 outerRadius=dbReader->sensitiveVolumeOuterRadius();
64 mIntDiffCoarseness=paramReader->diffusionCoarseness();
65 mFlDiffCoarseness=(float) mIntDiffCoarseness;
67 radialDipWidth = rad_offset;
68 azimuthalCrossWidth = pad_offset;
69 sigma_rad_squared = 0;
70 sigma_phi_squared = 0;
75 original_padrow = call_padrow;
83 deltaRadius = field->GetDeltaRadius();
84 twoDeltaRadius = field->GetTwoDeltaRadius();
85 electronLoss = -deltaRadius * dbReader->gasAttenuation();
89 StFtpcSlowSimCluster::~StFtpcSlowSimCluster() {}
97 while(currentRadius < outerRadius )
99 float inverseRadius = 1/currentRadius;
100 float deltaRadiusRelative = deltaRadius * inverseRadius;
102 int index = field->GetGridIndex(currentRadius);
105 float lorentz, inverseVelocity;
106 field->GetVelocityZ(inverseRadius, padrow, currentPhi, &inverseVelocity, &lorentz);
107 currentPhi += deltaRadiusRelative * lorentz;
110 drift_time += deltaRadius * inverseVelocity;
113 if(i==mIntDiffCoarseness)
116 sigma_rad_squared = field->GetDiffusionZSqr(index)
117 *deltaRadius*mFlDiffCoarseness+
118 sigma_rad_squared*(1.+field->GetDlnvDr(index)
119 *twoDeltaRadius*mFlDiffCoarseness);
122 float divergenceFactor= 1.+deltaRadiusRelative*mFlDiffCoarseness;
123 sigma_phi_squared =field->GetDiffusionXSqr(index)
124 *mFlDiffCoarseness*deltaRadius +
125 sigma_phi_squared*divergenceFactor*divergenceFactor;
128 electron += mFlDiffCoarseness*electronLoss;
134 currentRadius += deltaRadius;
140 void StFtpcSlowSimCluster::Print()
const
142 LOG_INFO <<
" Cluster parameter : " << endm;
143 LOG_INFO <<
"number of electrons = " << electron << endm;
144 LOG_INFO <<
"sigma_rad [um] = " << ::sqrt(sigma_rad_squared) << endm;
145 LOG_INFO <<
"sigma_phi [um] = " << ::sqrt(sigma_phi_squared) << endm;
146 LOG_INFO <<
"currentPhi [deg] = " << currentPhi << endm;
147 LOG_INFO <<
"currentRadius [cm] = " << currentRadius << endm;
148 LOG_INFO <<
"Td [usec] = " << drift_time << endm;