#include <ChargeDividerFP420.h>
Definition at line 13 of file ChargeDividerFP420.h.
◆ ChargeDividerFP420()
ChargeDividerFP420::ChargeDividerFP420 |
( |
double |
pit, |
|
|
double |
az420, |
|
|
double |
azD2, |
|
|
double |
azD3, |
|
|
int |
ver |
|
) |
| |
|
explicit |
◆ ~ChargeDividerFP420()
ChargeDividerFP420::~ChargeDividerFP420 |
( |
| ) |
|
|
override |
◆ DeconvolutionShape()
float ChargeDividerFP420::DeconvolutionShape |
( |
const PSimHit & |
hit | ) |
|
|
private |
Definition at line 349 of file ChargeDividerFP420.cc.
References gather_cfg::cout, JetChargeProducer_cfi::exp, mathSSE::sqrt(), FrontierCondition_GT_autoExpress_cfi::t0, FP420NumberingScheme::unpackFP420Index(), ctppsCommonDQMSource_cfi::verbosity, and ecaldqm::zside().
358 float zEntry = 1000.;
361 unsigned int unitID =
hit.detUnitId();
363 int det,
zside, sector, zmodule;
370 float RRR =
sqrt(xEntry * xEntry + yEntry * yEntry + zEntry * zEntry);
371 float costheta = zEntry / RRR;
382 std::cout <<
"sector=" << sector << std::endl;
383 std::cout <<
"zmodule=" << zmodule << std::endl;
386 std::cout <<
"costheta=" << costheta << std::endl;
387 std::cout <<
"unitID=" << unitID << std::endl;
390 std::cout <<
"dist found =" << dist << std::endl;
393 float t0 = dist / 30.;
394 float SigmaShape = 12.;
398 float tofNorm = (
hit.tof() -
t0) / SigmaShape;
400 float readTimeNorm = -tofNorm;
405 std::cout <<
"ChargeDividerFP420:DeconvolutionShape::dist=" << dist << std::endl;
408 std::cout <<
"tofNorm=" << tofNorm << std::endl;
409 std::cout <<
"hit.getEnergyLoss()=" <<
hit.energyLoss() << std::endl;
410 std::cout <<
"exp(-0.5*readTimeNorm*readTimeNorm)=" <<
exp(-0.5 * readTimeNorm * readTimeNorm) << std::endl;
411 std::cout <<
"return=" <<
hit.energyLoss() *
exp(-0.5 * readTimeNorm * readTimeNorm) << std::endl;
413 return hit.energyLoss() *
exp(-0.5 * readTimeNorm * readTimeNorm);
static void unpackFP420Index(const unsigned int &idx, int &det, int &zside, int &station, int &superplane)
◆ divide()
Implements CDividerFP420.
Definition at line 74 of file ChargeDividerFP420.cc.
References gather_cfg::cout, simKBmtfDigis_cfi::eLoss, HCALHighEnergyHPDFilter_cfi::energy, dqmMemoryStats::float, mps_fire::i, createfilelist::int, PV3DBase< T, PVType, FrameType >::mag(), and ctppsCommonDQMSource_cfi::verbosity.
90 std::cout <<
" CDividerFP420::ChargeDividerFP420:divide: direction= " << direction << std::endl;
91 std::cout <<
" CDividerFP420::ChargeDividerFP420:divide: direction.mag = " << direction.
mag() << std::endl;
92 std::cout <<
" obtained as ExitLocalP = " <<
hit.exitPoint() <<
" - " 93 <<
" EntryLocalP = " <<
hit.entryPoint() << std::endl;
97 <<
" deltaCut= " <<
deltaCut << std::endl;
100 int NumberOfSegmentation =
110 std::cout <<
"NumberOfSegmentation= " << NumberOfSegmentation << std::endl;
117 std::cout <<
"CDividerFP420::ChargeDividerFP420:divide: eLoss= " <<
eLoss << std::endl;
126 std::cout <<
"CDividerFP420::ChargeDividerFP420:divide: decSignal= " << decSignal << std::endl;
131 _ionization_points.resize(NumberOfSegmentation);
136 float *eLossVector =
new float[NumberOfSegmentation];
139 std::cout <<
"CDividerFP420::ChargeDividerFP420:divide: resize done; " 140 "then, fluctuateCharge ? = " 146 int pid =
hit.particleType();
147 float momentum =
hit.pabs();
148 float length = direction.
mag();
151 std::cout <<
"pid= " << pid <<
"momentum= " << momentum <<
"eLoss= " <<
eLoss <<
"length= " << length
157 for (
int i = 0;
i != NumberOfSegmentation; ++
i) {
161 hit.entryPoint() +
float((
i + 0.5) / NumberOfSegmentation) *
166 _ionization_points[
i] = edu;
171 hit.entryPoint() +
float((
i + 0.5) / NumberOfSegmentation) * direction);
176 _ionization_points[
i] = edu;
181 std::cout <<
"CDividerFP420::ChargeDividerFP420:divide: !!! RESULT !!!" << std::endl;
182 std::cout <<
" _ionization_points size = " << _ionization_points.size() << std::endl;
183 for (
unsigned int i = 0;
i < _ionization_points.size(); ++
i) {
184 std::cout <<
" eLossVector[i] i = " <<
i << eLossVector[
i] << std::endl;
188 delete[] eLossVector;
189 return _ionization_points;
std::vector< EnergySegmentFP420 > ionization_type
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegmentation, float elossVector[])
int chargedivisionsPerHit
float TimeResponse(const PSimHit &)
◆ fluctuateEloss()
void ChargeDividerFP420::fluctuateEloss |
( |
int |
particleId, |
|
|
float |
momentum, |
|
|
float |
eloss, |
|
|
float |
length, |
|
|
int |
NumberOfSegmentation, |
|
|
float |
elossVector[] |
|
) |
| |
|
private |
Definition at line 192 of file ChargeDividerFP420.cc.
References funct::abs(), gather_cfg::cout, mps_fire::i, cuy::ii, particleFlowDisplacedVertex_cfi::ratio, and ctppsCommonDQMSource_cfi::verbosity.
195 std::cout <<
"fluctuateEloss: eloss= " << eloss <<
"length= " << length <<
"NumberOfSegs= " << NumberOfSegs
200 double particleMass = 938.271;
207 particleMass = 0.511;
209 particleMass = 105.658;
211 particleMass = 139.570;
214 float segmentLength = length / NumberOfSegs;
219 double segmentEloss = (1000. * eloss) / NumberOfSegs;
221 std::cout <<
"segmentLength= " << segmentLength <<
"segmentEloss= " << segmentEloss << std::endl;
224 for (
int i = 0;
i < NumberOfSegs; ++
i) {
234 double(segmentLength),
242 std::cout <<
"sum= " << sum << std::endl;
246 float ratio = eloss / sum;
247 for (
int ii = 0;
ii < NumberOfSegs; ++
ii)
248 elossVector[
ii] =
ratio * elossVector[
ii];
250 float averageEloss = eloss / NumberOfSegs;
251 for (
int ii = 0;
ii < NumberOfSegs; ++
ii)
252 elossVector[
ii] = averageEloss;
Abs< T >::type abs(const T &t)
double SampleFluctuations(const double momentum, const double mass, double &tmax, const double length, const double meanLoss)
◆ PeakShape()
float ChargeDividerFP420::PeakShape |
( |
const PSimHit & |
hit | ) |
|
|
private |
Definition at line 276 of file ChargeDividerFP420.cc.
References gather_cfg::cout, JetChargeProducer_cfi::exp, mathSSE::sqrt(), FrontierCondition_GT_autoExpress_cfi::t0, FP420NumberingScheme::unpackFP420Index(), ctppsCommonDQMSource_cfi::verbosity, and ecaldqm::zside().
286 float zEntry = 1000.;
289 unsigned int unitID =
hit.detUnitId();
291 int det,
zside, sector, zmodule;
298 float RRR =
sqrt(xEntry * xEntry + yEntry * yEntry + zEntry * zEntry);
299 float costheta = zEntry / RRR;
310 std::cout <<
"sector=" << sector << std::endl;
311 std::cout <<
"zmodule=" << zmodule << std::endl;
314 std::cout <<
"costheta=" << costheta << std::endl;
315 std::cout <<
"unitID=" << unitID << std::endl;
318 std::cout <<
"dist found =" << dist << std::endl;
322 float t0 = dist / 30.;
323 float SigmaShape = 52.17;
325 float tofNorm = (
hit.tof() -
t0) / SigmaShape;
327 float readTimeNorm = -tofNorm;
331 std::cout <<
"ChargeDividerFP420:PeakShape::dist=" << dist << std::endl;
334 std::cout <<
"tofNorm=" << tofNorm << std::endl;
335 std::cout <<
"1 + readTimeNorm=" << 1 + readTimeNorm << std::endl;
336 std::cout <<
"hit.getEnergyLoss()=" <<
hit.energyLoss() << std::endl;
337 std::cout <<
"(1 + readTimeNorm)*exp(-readTimeNorm)=" << (1 + readTimeNorm) *
exp(-readTimeNorm) << std::endl;
338 std::cout <<
"return=" <<
hit.energyLoss() * (1 + readTimeNorm) *
exp(-readTimeNorm) << std::endl;
340 if (1 + readTimeNorm > 0) {
342 return hit.energyLoss() * (1 + readTimeNorm) *
exp(-readTimeNorm);
static void unpackFP420Index(const unsigned int &idx, int &det, int &zside, int &station, int &superplane)
◆ TimeResponse()
float ChargeDividerFP420::TimeResponse |
( |
const PSimHit & |
hit | ) |
|
|
private |
◆ chargedivisionsPerHit
int ChargeDividerFP420::chargedivisionsPerHit |
|
private |
◆ decoMode
bool ChargeDividerFP420::decoMode |
|
private |
◆ deltaCut
double ChargeDividerFP420::deltaCut |
|
private |
◆ fluctuate
◆ fluctuateCharge
bool ChargeDividerFP420::fluctuateCharge |
|
private |
◆ peakMode
bool ChargeDividerFP420::peakMode |
|
private |
◆ pitchcur
double ChargeDividerFP420::pitchcur |
|
private |
◆ verbosity
int ChargeDividerFP420::verbosity |
|
private |
◆ z420
double ChargeDividerFP420::z420 |
|
private |
◆ zD2
double ChargeDividerFP420::zD2 |
|
private |
◆ zD3
double ChargeDividerFP420::zD3 |
|
private |
◆ zStationBegPos
float ChargeDividerFP420::zStationBegPos[4] |
|
private |