CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
Pixel3DDigitizerAlgorithm Class Reference

#include <Pixel3DDigitizerAlgorithm.h>

Inheritance diagram for Pixel3DDigitizerAlgorithm:
Phase2TrackerDigitizerAlgorithm

Public Member Functions

void accumulateSimHits (const std::vector< PSimHit >::const_iterator inputBegin, const std::vector< PSimHit >::const_iterator inputEnd, const size_t inputBeginGlobalIndex, const unsigned int tofBin, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield) override
 
std::vector< DigitizerUtility::EnergyDepositUnitdiffusion (const LocalPoint &pos, const float &ncarriers, const std::function< LocalVector(float, float)> &u_drift, const std::pair< float, float > pitches, const float &thickness)
 
std::vector< DigitizerUtility::SignalPointdrift (const PSimHit &hit, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points, bool diffusion_activated)
 
void induce_signal (const PSimHit &hit, const size_t hitIndex, const unsigned int tofBin, const Phase2TrackerGeomDetUnit *pixdet, const std::vector< DigitizerUtility::SignalPoint > &collection_points)
 
void init (const edm::EventSetup &es) override
 
 Pixel3DDigitizerAlgorithm (const edm::ParameterSet &conf)
 
 ~Pixel3DDigitizerAlgorithm () override
 
- Public Member Functions inherited from Phase2TrackerDigitizerAlgorithm
virtual void accumulateSimHits (const std::vector< PSimHit >::const_iterator inputBegin, const std::vector< PSimHit >::const_iterator inputEnd, const size_t inputBeginGlobalIndex, const uint32_t tofBin, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield)=0
 
virtual void digitize (const Phase2TrackerGeomDetUnit *pixdet, std::map< int, DigitizerUtility::DigiSimInfo > &digi_map, const TrackerTopology *tTopo)
 
virtual void initializeEvent (CLHEP::HepRandomEngine &eng)
 
virtual bool isAboveThreshold (const DigitizerUtility::SimHitInfo *hitInfo, float charge, float thr)
 
void loadAccumulator (uint32_t detId, const std::map< int, float > &accumulator)
 
 Phase2TrackerDigitizerAlgorithm (const edm::ParameterSet &conf_common, const edm::ParameterSet &conf_specific)
 
virtual bool select_hit (const PSimHit &hit, double tCorr, double &sigScale)
 
virtual ~Phase2TrackerDigitizerAlgorithm ()
 

Private Member Functions

const bool _is_inside_n_column (const LocalPoint &p) const
 
const bool _is_inside_ohmic_column (const LocalPoint &p, const std::pair< float, float > &pitch) const
 

Private Attributes

float _np_column_radius
 
float _ohm_column_radius
 

Additional Inherited Members

- Protected Types inherited from Phase2TrackerDigitizerAlgorithm
using Frame = GloballyPositioned< double >
 
using Parameters = std::vector< edm::ParameterSet >
 
using signal_map_type = std::map< int, DigitizerUtility::Amplitude, std::less< int > >
 
using signalMaps = std::map< uint32_t, signal_map_type >
 
- Protected Member Functions inherited from Phase2TrackerDigitizerAlgorithm
virtual void add_cross_talk (const Phase2TrackerGeomDetUnit *pixdet)
 
virtual void add_noise (const Phase2TrackerGeomDetUnit *pixdet)
 
virtual void add_noisy_cells (const Phase2TrackerGeomDetUnit *pixdet, float thePixelThreshold)
 
double calcQ (float x) const
 
int convertSignalToAdc (uint32_t detID, float signal_in_elec, float threshold)
 
void drift (const PSimHit &hit, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points, std::vector< DigitizerUtility::SignalPoint > &collection_points) const
 
LocalVector DriftDirection (const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
 
void fluctuateEloss (int particleId, float momentum, float eloss, float length, int NumberOfSegments, std::vector< float > &elossVector) const
 
void induce_signal (const PSimHit &hit, const size_t hitIndex, const uint32_t tofBin, const Phase2TrackerGeomDetUnit *pixdet, const std::vector< DigitizerUtility::SignalPoint > &collection_points)
 
virtual void module_killing_conf (uint32_t detID)
 
virtual void module_killing_DB (const Phase2TrackerGeomDetUnit *pixdet)
 
virtual void pixel_inefficiency (const SubdetEfficiencies &eff, const Phase2TrackerGeomDetUnit *pixdet, const TrackerTopology *tTopo)
 
virtual void pixel_inefficiency_db (uint32_t detID)
 
void primary_ionization (const PSimHit &hit, std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points) const
 
- Protected Attributes inherited from Phase2TrackerDigitizerAlgorithm
signalMaps _signal
 
const bool addNoise_
 
const bool addNoisyPixels_
 
const bool addPixelInefficiency_
 
const bool addThresholdSmearing_
 
const bool addXtalk_
 
const bool alpha2Order_
 
Parameters badPixels_
 
const float clusterWidth_
 
const Parameters deadModules_
 
edm::ESHandle< SiPixelFedCablingMapfedCablingMap_
 
const std::unique_ptr< SiG4UniversalFluctuationfluctuate_
 
const bool fluctuateCharge_
 
std::unique_ptr< CLHEP::RandGaussQ > gaussDistribution_
 
edm::ESHandle< TrackerGeometrygeom_
 
const float GeVperElectron_
 
const float interstripCoupling_
 
const bool makeDigiSimLinks_
 
bool pixelFlag_
 
const double pseudoRadDamage_
 
const double pseudoRadDamageRadius_
 
CLHEP::HepRandomEngine * rengine_
 
const float Sigma0_
 
const float SigmaCoeff_
 
edm::ESHandle< SiPixelQualitySiPixelBadModule_
 
edm::ESHandle< SiPixelLorentzAngleSiPixelLorentzAngle_
 
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Barrel_
 
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Endcap_
 
const SubdetEfficiencies subdetEfficiencies_
 
const float tanLorentzAnglePerTesla_Barrel_
 
const float tanLorentzAnglePerTesla_Endcap_
 
const int theAdcFullScale_
 
const float theElectronPerADC_
 
const double theHIPThresholdInE_Barrel_
 
const double theHIPThresholdInE_Endcap_
 
const float theNoiseInElectrons_
 
const std::unique_ptr< GaussianTailNoiseGeneratortheNoiser_
 
const int thePhase2ReadoutMode_
 
const float theReadoutNoise_
 
const std::unique_ptr< SiPixelGainCalibrationOfflineSimServicetheSiPixelGainCalibrationService_
 
const float theThresholdInE_Barrel_
 
const float theThresholdInE_Endcap_
 
const double theThresholdSmearing_Barrel_
 
const double theThresholdSmearing_Endcap_
 
const float theTofLowerCut_
 
const float theTofUpperCut_
 
const double tMax_
 
const bool use_deadmodule_DB_
 
const bool use_ineff_from_db_
 
const bool use_LorentzAngle_DB_
 
const bool use_module_killing_
 

Detailed Description

Definition at line 23 of file Pixel3DDigitizerAlgorithm.h.

Constructor & Destructor Documentation

◆ Pixel3DDigitizerAlgorithm()

Pixel3DDigitizerAlgorithm::Pixel3DDigitizerAlgorithm ( const edm::ParameterSet conf)

Definition at line 53 of file Pixel3DDigitizerAlgorithm.cc.

55  conf.getParameter<edm::ParameterSet>("Pixel3DDigitizerAlgorithm")),
56  // The size of the column np-junction (XXX: to be included via config)
57  _np_column_radius(5.0_um),
58  _ohm_column_radius(5.0_um) {
59  // XXX - NEEDED?
60  pixelFlag_ = true;
61 
62  edm::LogInfo("Pixel3DDigitizerAlgorithm")
63  << "Algorithm constructed \n"
64  << "Configuration parameters:\n"
65  << "\n*** Threshold"
66  << "\n Endcap = " << theThresholdInE_Endcap_ << " electrons"
67  << "\n Barrel = " << theThresholdInE_Barrel_ << " electrons"
68  << "\n*** Gain"
69  << "\n Electrons per ADC:" << theElectronPerADC_ << "\n ADC Full Scale: " << theAdcFullScale_
70  << "\n*** The delta cut-off is set to " << tMax_ << "\n*** Pixel-inefficiency: " << addPixelInefficiency_;
71 }

References Phase2TrackerDigitizerAlgorithm::addPixelInefficiency_, Phase2TrackerDigitizerAlgorithm::pixelFlag_, Phase2TrackerDigitizerAlgorithm::theAdcFullScale_, Phase2TrackerDigitizerAlgorithm::theElectronPerADC_, Phase2TrackerDigitizerAlgorithm::theThresholdInE_Barrel_, Phase2TrackerDigitizerAlgorithm::theThresholdInE_Endcap_, and Phase2TrackerDigitizerAlgorithm::tMax_.

◆ ~Pixel3DDigitizerAlgorithm()

Pixel3DDigitizerAlgorithm::~Pixel3DDigitizerAlgorithm ( )
override

Definition at line 73 of file Pixel3DDigitizerAlgorithm.cc.

73 {}

Member Function Documentation

◆ _is_inside_n_column()

const bool Pixel3DDigitizerAlgorithm::_is_inside_n_column ( const LocalPoint p) const
private

Definition at line 122 of file Pixel3DDigitizerAlgorithm.cc.

122  {
123  return (p.perp() <= _np_column_radius);
124 }

References _np_column_radius, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by drift().

◆ _is_inside_ohmic_column()

const bool Pixel3DDigitizerAlgorithm::_is_inside_ohmic_column ( const LocalPoint p,
const std::pair< float, float > &  pitch 
) const
private

Definition at line 126 of file Pixel3DDigitizerAlgorithm.cc.

127  {
128  // The four corners of the cell
129  return ((p - LocalVector(half_pitch.first, half_pitch.second, 0)).perp() <= _ohm_column_radius) ||
130  ((p - LocalVector(-half_pitch.first, half_pitch.second, 0)).perp() <= _ohm_column_radius) ||
131  ((p - LocalVector(half_pitch.first, -half_pitch.second, 0)).perp() <= _ohm_column_radius) ||
132  ((p - LocalVector(-half_pitch.first, -half_pitch.second, 0)).perp() <= _ohm_column_radius);
133 }

References _ohm_column_radius, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by drift().

◆ accumulateSimHits()

void Pixel3DDigitizerAlgorithm::accumulateSimHits ( const std::vector< PSimHit >::const_iterator  inputBegin,
const std::vector< PSimHit >::const_iterator  inputEnd,
const size_t  inputBeginGlobalIndex,
const unsigned int  tofBin,
const Phase2TrackerGeomDetUnit pixdet,
const GlobalVector bfield 
)
override

Definition at line 75 of file Pixel3DDigitizerAlgorithm.cc.

80  {
81  // produce SignalPoint's for all SimHit's in detector
82 
83  const uint32_t detId = pix3Ddet->geographicalId().rawId();
84  // This needs to be stored to create the digi-sim link later
85  size_t simHitGlobalIndex = inputBeginGlobalIndex;
86 
87  // Loop over hits
88  for (auto it = inputBegin; it != inputEnd; ++it, ++simHitGlobalIndex) {
89  // skip hit: not in this detector.
90  if (it->detUnitId() != detId) {
91  continue;
92  }
93 
94  LogDebug("Pixel3DDigitizerAlgorithm:: Geant4 hit info: ")
95  << (*it).particleType() << " " << (*it).pabs() << " " << (*it).energyLoss() << " " << (*it).tof() << " "
96  << (*it).trackId() << " " << (*it).processType() << " " << (*it).detUnitId() << (*it).entryPoint() << " "
97  << (*it).exitPoint();
98 
99  // Convert the simhit position into global to check if the simhit was
100  // produced within a given time-window
101  const auto global_hit_position = pix3Ddet->surface().toGlobal(it->localPosition()).mag();
102 
103  // Only accept those sim hits produced inside a time window (same bunch-crossing)
104  if ((it->tof() - global_hit_position * c_inv >= theTofLowerCut_) &&
105  (it->tof() - global_hit_position * c_inv <= theTofUpperCut_)) {
106  // XXX: this vectors are the output of the next methods, the methods should
107  // return them, instead of an input argument
108  std::vector<DigitizerUtility::EnergyDepositUnit> ionization_points;
109 
110  // For each sim hit, super-charges (electron-holes) are created every 10um
111  primary_ionization(*it, ionization_points);
112  // Drift the super-charges (only electrons) to the collecting electrodes
113  const auto collection_points = drift(*it, pix3Ddet, bfield, ionization_points, true);
114 
115  // compute induced signal on readout elements and add to _signal
116  // *ihit needed only for SimHit<-->Digi link
117  induce_signal(*it, simHitGlobalIndex, tofBin, pix3Ddet, collection_points);
118  }
119  }
120 }

References c_inv, drift(), GeomDet::geographicalId(), induce_signal(), LogDebug, mag(), Phase2TrackerDigitizerAlgorithm::primary_ionization(), DetId::rawId(), GeomDet::surface(), Phase2TrackerDigitizerAlgorithm::theTofLowerCut_, Phase2TrackerDigitizerAlgorithm::theTofUpperCut_, and Surface::toGlobal().

◆ diffusion()

std::vector< DigitizerUtility::EnergyDepositUnit > Pixel3DDigitizerAlgorithm::diffusion ( const LocalPoint pos,
const float &  ncarriers,
const std::function< LocalVector(float, float)> &  u_drift,
const std::pair< float, float >  pitches,
const float &  thickness 
)

Definition at line 144 of file Pixel3DDigitizerAlgorithm.cc.

149  {
150  // FIXME -- DM : Note that with a 0.3 will be enough (if using current sigma formulae)
151  // With the current sigma, this value is dependent of the thickness,
152  // Note that this formulae is coming from planar sensors, a similar
153  // study with data will be needed to extract the sigma for 3D
154  const float _max_migration_radius = 0.4_um;
155  // Need to know which axis is the relevant one
156  int displ_ind = -1;
157  float pitch = 0.0;
158 
159  // Check the group is near the edge of the pixel, so diffusion will
160  // be relevant in order to migrate between pixel cells
161  if (std::abs(pos.x() - hpitches.first) < _max_migration_radius) {
162  displ_ind = 0;
163  pitch = hpitches.first;
164  } else if (std::abs(pos.y() - hpitches.second) < _max_migration_radius) {
165  displ_ind = 1;
166  pitch = hpitches.second;
167  } else {
168  // Nothing to do, too far away
169  return std::vector<DigitizerUtility::EnergyDepositUnit>();
170  }
171 
172  // The new EnergyDeposits in the neighbour pixels
173  // (defined by +1 to the right (first axis) and +1 to the up (second axis)) <-- XXX
174  std::vector<DigitizerUtility::EnergyDepositUnit> migrated_charge;
175 
176  // FIXME -- DM
177  const float _diffusion_step = 0.1_um;
178 
179  // The position while drifting
180  std::vector<float> pos_moving({pos.x(), pos.y(), pos.z()});
181  // The drifting: drift field and steps
182  std::function<std::vector<float>(int)> do_step =
183  [&pos_moving, &u_drift, _diffusion_step](int i) -> std::vector<float> {
184  auto dd = u_drift(pos_moving[0], pos_moving[1]);
185  return std::vector<float>(
186  {i * _diffusion_step * dd.x(), i * _diffusion_step * dd.y(), i * _diffusion_step * dd.z()});
187  };
188 
189  LogDebug("Pixel3DDigitizerAlgorithm::diffusion")
190  << "\nMax. radius from the pixel edge to migrate charge: " << _max_migration_radius * 1.0_um_inv << " [um]"
191  << "\nMigration axis: " << displ_ind
192  << "\n(super-)Charge distance to the pixel edge: " << (pitch - pos_moving[displ_ind]) * 1.0_um_inv << " [um]";
193 
194  // FIXME -- Sigma reference, DM?
195  const float _distance0 = 300.0_um;
196  const float _sigma0 = 3.4_um;
197  // FIXME -- Tolerance, DM?
198  const float _TOL = 1e-6;
199  // How many sigmas (probably a configurable, to be decided not now)
200  const float _N_SIGMA = 3.0;
201 
202  // Start the drift and check every step
203  // initial position
204  int i = 0;
205  // Some variables needed
206  float current_carriers = ncarriers;
207  std::vector<float> newpos({pos_moving[0], pos_moving[1], pos_moving[2]});
208  float distance_edge = 0.0_um;
209  do {
210  std::transform(pos_moving.begin(), pos_moving.end(), do_step(i).begin(), pos_moving.begin(), std::plus<float>());
211  distance_edge = std::abs(pos_moving[displ_ind] - pitch);
212  // current diffusion value
213  double sigma = std::sqrt(i * _diffusion_step / _distance0) * (_distance0 / thickness) * _sigma0;
214  // Get the amount of charge on the neighbor pixel: note the
215  // transformation to a Normal
216  float migrated_e = current_carriers * (1.0 - std::erf(distance_edge / sigma));
217 
218  LogDebug("(super-)charge diffusion") << "step-" << i << ", Initial Ne= " << ncarriers << ", "
219  << "r=(" << pos_moving[0] * 1.0_um_inv << ", " << pos_moving[1] * 1.0_um_inv
220  << ", " << pos_moving[2] * 1.0_um_inv << ") [um], "
221  << "Migrated charge: " << migrated_e;
222 
223  // No charge was migrated (ignore creation time)
224  if (i != 0) {
225  // At least 1 electron migrated
226  if ((migrated_e - _TOL) < 1.0) {
227  break;
228  }
229  // Move the migrated charge
230  current_carriers -= migrated_e;
231  // Create the ionization point:
232  // First update the newpos vector: the new charge positions at the neighbourg pixels
233  // are created in the same position that its "parent carriers"
234  // except the direction of migration
235  std::vector<float> newpos(pos_moving);
236  // Lest create the new charges around 3 sigmas away
237  newpos[displ_ind] += std::copysign(_N_SIGMA * sigma, newpos[displ_ind]);
238  migrated_charge.push_back(DigitizerUtility::EnergyDepositUnit(migrated_e, newpos[0], newpos[1], newpos[2]));
239  }
240  // Next step
241  ++i;
242  } while (std::abs(distance_edge) < _max_migration_radius);
243 
244  return migrated_charge;
245 }

References funct::abs(), createTree::dd, MillePedeFileConverter_cfg::e, mps_fire::i, LogDebug, PixelTopology::pitch(), mathSSE::sqrt(), Calorimetry_cff::thickness, and HcalDetIdTransform::transform().

Referenced by drift().

◆ drift()

std::vector< DigitizerUtility::SignalPoint > Pixel3DDigitizerAlgorithm::drift ( const PSimHit hit,
const Phase2TrackerGeomDetUnit pixdet,
const GlobalVector bfield,
const std::vector< DigitizerUtility::EnergyDepositUnit > &  ionization_points,
bool  diffusion_activated 
)

Definition at line 254 of file Pixel3DDigitizerAlgorithm.cc.

259  {
260  // -- Current reference system is placed in the center on the module
261  // -- The natural reference frame should be discribed taking advantatge of
262  // -- the cylindrical nature of the pixel geometry -->
263  // -- the new reference frame should be place in the center of the columncy, and in the
264  // -- surface of the ROC using cylindrical coordinates
265 
266  // Get ROC pitch, half_pitch and sensor thickness to be used to create the
267  // proxy pixel cell reference frame
268  const auto pitch = pixdet->specificTopology().pitch();
269  const auto half_pitch = std::make_pair<float, float>(pitch.first * 0.5, pitch.second * 0.5);
270  const float thickness = pixdet->specificSurface().bounds().thickness();
271 
272  // the maximum radial distance is going to be use to evaluate radiation damage XXX?
273  const float max_radial_distance =
274  std::sqrt(half_pitch.first * half_pitch.first + half_pitch.second * half_pitch.second);
275 
276  // All pixels are going to be translated to a proxy pixel cell (all pixels should behave
277  // equally no matter their position w.r.t. the module) and describe the movements there
278  // Define the center of the pixel local reference frame: the current cartesian local reference
279  // frame is centered at half_width_x,half_width_y,half_thickness
280  // XXX -- This info could be obtained at init/construction time?
281  LocalPoint center_proxy_cell(half_pitch.first, half_pitch.second, -0.5 * thickness);
282 
283  LogDebug("Pixel3DDigitizerAlgorithm::drift")
284  << "Pixel pitch:" << pitch.first * 1.0_um_inv << ", " << pitch.second * 1.0_um_inv << " [um]";
285 
286  // And the drift direction (assumed same for all the sensor)
287  // XXX call the function which will return a functional
288  std::function<LocalVector(float, float)> drift_direction = [](float x, float y) -> LocalVector {
289  const float theta = std::atan2(y, x);
290  return LocalVector(-std::cos(theta), -std::sin(theta), 0.0);
291  };
292  // The output
293  std::vector<DigitizerUtility::SignalPoint> collection_points;
294  //collection_points.resize(ionization_points.size());
295  collection_points.reserve(ionization_points.size());
296 
297  // Radiation damage limit of application
298  // (XXX: No sense for 3D, let this be until decided what algorithm to use)
299  const float _RAD_DAMAGE = 0.001;
300 
301  for (const auto& super_charge : ionization_points) {
302  // Extract the pixel cell
303  const auto current_pixel = pixdet->specificTopology().pixel(LocalPoint(super_charge.x(), super_charge.y()));
304  const auto current_pixel_int = std::make_pair(std::floor(current_pixel.first), std::floor(current_pixel.second));
305 
306  // Convert to the 1x1 proxy pixel cell (pc), where all calculations are going to be
307  // performed. The pixel is scaled to the actual pitch
308  const auto relative_position_at_pc =
309  std::make_pair((current_pixel.first - current_pixel_int.first) * pitch.first,
310  (current_pixel.second - current_pixel_int.second) * pitch.second);
311 
312  // Changing the reference frame to the proxy pixel cell
313  LocalPoint position_at_pc(relative_position_at_pc.first - center_proxy_cell.x(),
314  relative_position_at_pc.second - center_proxy_cell.y(),
315  super_charge.z());
316 
317  LogDebug("Pixel3DDigitizerAlgorithm::drift")
318  << "(super-)Charge\nlocal position: (" << super_charge.x() * 1.0_um_inv << ", " << super_charge.y() * 1.0_um_inv
319  << ", " << super_charge.z() * 1.0_um_inv << ") [um]"
320  << "\nMeasurement Point (row,column) (" << current_pixel.first << ", " << current_pixel.second << ")"
321  << "\nProxy pixel-cell frame (centered at left-down corner): (" << relative_position_at_pc.first * 1.0_um_inv
322  << ", " << relative_position_at_pc.second * 1.0_um_inv << ") [um]"
323  << "\nProxy pixel-cell frame (centered at n-column): (" << position_at_pc.x() * 1.0_um_inv << ", "
324  << position_at_pc.y() * 1.0_um_inv << ") [um] "
325  << "\nNe=" << super_charge.energy() << " electrons";
326 
327  // Check if the point is inside any of the column --> no charge was actually created then
328  if (_is_inside_n_column(position_at_pc) || _is_inside_ohmic_column(position_at_pc, half_pitch)) {
329  LogDebug("Pixel3DDigitizerAlgorithm::drift") << "Remove charge, inside the n-column or p-column!!";
330  continue;
331  }
332 
333  float nelectrons = super_charge.energy();
334  // XXX -- Diffusion: using the center frame
335  if (diffusion_activated) {
336  auto migrated_charges = diffusion(position_at_pc, super_charge.energy(), drift_direction, half_pitch, thickness);
337  // remove the migrated charges
338  for (auto& mc : migrated_charges) {
339  nelectrons -= mc.energy();
340  // and convert back to the pixel ref. system
341  // Low-left origin/pitch -> relative within the pixel (a)
342  // Adding the pixel
343  const float pixel_x = current_pixel_int.first + (mc.x() + center_proxy_cell.x()) / pitch.first;
344  const float pixel_y = current_pixel_int.second + (mc.y() + center_proxy_cell.y()) / pitch.second;
345  const auto lp = pixdet->specificTopology().localPosition(MeasurementPoint(pixel_x, pixel_y));
346  mc.migrate_position(LocalPoint(lp.x(), lp.y(), mc.z()));
347  }
348  if (!migrated_charges.empty()) {
349  LogDebug("Pixel3DDigitizerAlgorithm::drift") << "****************"
350  << "MIGRATING (super-)charges"
351  << "****************";
352  // Drift this charges on the other pixel
353  auto mig_colpoints = drift(hit, pixdet, bfield, migrated_charges, false);
354  LogDebug("Pixel3DDigitizerAlgorithm::drift") << "*****************"
355  << "DOME MIGRATION"
356  << "****************";
357  }
358  }
359 
360  // Perform the drift, and check a potential lost of carriers because
361  // they reach the pasivation region (-z < thickness/2)
362  // XXX: not doing nothing, the carriers reach the electrode surface,
363  const float drift_distance = position_at_pc.perp() - _np_column_radius;
364 
365  // Insert a charge loss due to Rad Damage here
366  // XXX: ??
367  float energyOnCollector = nelectrons;
368  // FIXME: is this correct? Not for 3D...
369 
370  if (pseudoRadDamage_ >= _RAD_DAMAGE) {
371  const float module_radius = pixdet->surface().position().perp();
372  if (module_radius <= pseudoRadDamageRadius_) {
373  const float kValue = pseudoRadDamage_ / (module_radius * module_radius);
374  energyOnCollector = energyOnCollector * std::exp(-1.0 * kValue * drift_distance / max_radial_distance);
375  }
376  }
377  LogDebug("Pixel3DDigitizerAlgorithm::drift")
378  << "Drift distance = " << drift_distance * 1.0_um_inv << " [um], "
379  << "Initial electrons = " << super_charge.energy()
380  << " [electrons], Electrons after loss/diff= " << energyOnCollector << " [electrons] ";
381  // Load the Charge distribution parameters
382  // XXX -- probably makes no sense the SignalPoint anymore...
383  collection_points.push_back(DigitizerUtility::SignalPoint(
384  current_pixel_int.first, current_pixel_int.second, 0.0, 0.0, hit.tof(), energyOnCollector));
385  }
386 
387  return collection_points;
388 }

References _is_inside_n_column(), _is_inside_ohmic_column(), _np_column_radius, Surface::bounds(), funct::cos(), diffusion(), JetChargeProducer_cfi::exp, HiBiasedCentrality_cfi::function, Topology::localPosition(), LogDebug, CaloTowersParam_cfi::mc, B2GMonitoring_cff::nelectrons, PV3DBase< T, PVType, FrameType >::perp(), PixelTopology::pitch(), PixelTopology::pixel(), GloballyPositioned< T >::position(), Phase2TrackerDigitizerAlgorithm::pseudoRadDamage_, Phase2TrackerDigitizerAlgorithm::pseudoRadDamageRadius_, funct::sin(), GeomDet::specificSurface(), PixelGeomDetUnit::specificTopology(), mathSSE::sqrt(), GeomDet::surface(), theta(), Bounds::thickness(), Calorimetry_cff::thickness, x, PV3DBase< T, PVType, FrameType >::x(), y, and PV3DBase< T, PVType, FrameType >::y().

Referenced by accumulateSimHits().

◆ induce_signal()

void Pixel3DDigitizerAlgorithm::induce_signal ( const PSimHit hit,
const size_t  hitIndex,
const unsigned int  tofBin,
const Phase2TrackerGeomDetUnit pixdet,
const std::vector< DigitizerUtility::SignalPoint > &  collection_points 
)

Definition at line 394 of file Pixel3DDigitizerAlgorithm.cc.

398  {
399  // X - Rows, Left-Right
400  // Y - Columns, Down-Up
401  const Phase2TrackerTopology& topo = pixdet->specificTopology();
402  const uint32_t detId = pixdet->geographicalId().rawId();
403  // Accumulated signal at each channel of this detector
404  signal_map_type& the_signal = _signal[detId];
405 
406  // Iterate over collection points on the collection plane
407  for (const auto& pt : collection_points) {
408  // Find the corresponding (ROC) channel to that pixel
409  MeasurementPoint rowcol(pt.position().x(), pt.position().y());
410  const int channel = topo.channel(topo.localPosition(rowcol));
411 
412  if (makeDigiSimLinks_) {
413  the_signal[channel] += DigitizerUtility::Amplitude(pt.amplitude(), &hit, pt.amplitude(), hitIndex, tofBin);
414  } else {
415  the_signal[channel] += DigitizerUtility::Amplitude(pt.amplitude(), nullptr, pt.amplitude());
416  }
417 
418  LogDebug("Pixel3DDigitizerAlgorithm::induce_signal")
419  << " Induce charge at row,col:" << rowcol << " N_electrons:" << pt.amplitude() << " [Channel:" << channel
420  << "]\n [Accumulated signal in this channel:" << the_signal[channel].ampl() << "]";
421  }
422 }

References Phase2TrackerDigitizerAlgorithm::_signal, LaserClient_cfi::Amplitude, Topology::channel(), GeomDet::geographicalId(), Topology::localPosition(), LogDebug, Phase2TrackerDigitizerAlgorithm::makeDigiSimLinks_, DiDispStaMuonMonitor_cfi::pt, DetId::rawId(), and PixelGeomDetUnit::specificTopology().

Referenced by accumulateSimHits().

◆ init()

void Pixel3DDigitizerAlgorithm::init ( const edm::EventSetup es)
overridevirtual

Implements Phase2TrackerDigitizerAlgorithm.

Definition at line 30 of file Pixel3DDigitizerAlgorithm.cc.

30  {
31  // XXX: Just copied from PixelDigitizer Algorithm
32  // CHECK if all these is needed
33 
34  if (use_ineff_from_db_) {
35  // load gain calibration service fromdb...
36  theSiPixelGainCalibrationService_->setESObjects(es);
37  }
38 
39  if (use_deadmodule_DB_) {
41  }
42 
44  // Get Lorentz angle from DB record
46  }
47 
48  // gets the map and geometry from the DB (to kill ROCs)
51 }

References edm::EventSetup::get(), and get.

Member Data Documentation

◆ _np_column_radius

float Pixel3DDigitizerAlgorithm::_np_column_radius
private

Definition at line 61 of file Pixel3DDigitizerAlgorithm.h.

Referenced by _is_inside_n_column(), and drift().

◆ _ohm_column_radius

float Pixel3DDigitizerAlgorithm::_ohm_column_radius
private

Definition at line 62 of file Pixel3DDigitizerAlgorithm.h.

Referenced by _is_inside_ohmic_column().

Vector3DBase< float, LocalTag >
Phase2TrackerDigitizerAlgorithm::signal_map_type
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
Definition: Phase2TrackerDigitizerAlgorithm.h:100
Point2DBase
Definition: Point2DBase.h:9
Phase2TrackerDigitizerAlgorithm::makeDigiSimLinks_
const bool makeDigiSimLinks_
Definition: Phase2TrackerDigitizerAlgorithm.h:108
Pixel3DDigitizerAlgorithm::_is_inside_n_column
const bool _is_inside_n_column(const LocalPoint &p) const
Definition: Pixel3DDigitizerAlgorithm.cc:122
DDAxes::y
Phase2TrackerDigitizerAlgorithm::theThresholdInE_Barrel_
const float theThresholdInE_Barrel_
Definition: Phase2TrackerDigitizerAlgorithm.h:141
mps_fire.i
i
Definition: mps_fire.py:355
Phase2TrackerDigitizerAlgorithm::pseudoRadDamage_
const double pseudoRadDamage_
Definition: Phase2TrackerDigitizerAlgorithm.h:165
SiPixelQualityRcd
Definition: SiPixelQualityRcd.h:13
Phase2TrackerDigitizerAlgorithm::theTofUpperCut_
const float theTofUpperCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:150
CaloTowersParam_cfi.mc
mc
Definition: CaloTowersParam_cfi.py:8
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
Pixel3DDigitizerAlgorithm::diffusion
std::vector< DigitizerUtility::EnergyDepositUnit > diffusion(const LocalPoint &pos, const float &ncarriers, const std::function< LocalVector(float, float)> &u_drift, const std::pair< float, float > pitches, const float &thickness)
Definition: Pixel3DDigitizerAlgorithm.cc:144
Phase2TrackerDigitizerAlgorithm::geom_
edm::ESHandle< TrackerGeometry > geom_
Definition: Phase2TrackerDigitizerAlgorithm.h:92
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
pos
Definition: PixelAliasList.h:18
edm::LogInfo
Definition: MessageLogger.h:254
PixelTopology::pitch
virtual std::pair< float, float > pitch() const =0
Phase2TrackerDigitizerAlgorithm::fedCablingMap_
edm::ESHandle< SiPixelFedCablingMap > fedCablingMap_
Definition: Phase2TrackerDigitizerAlgorithm.h:91
Phase2TrackerDigitizerAlgorithm::use_LorentzAngle_DB_
const bool use_LorentzAngle_DB_
Definition: Phase2TrackerDigitizerAlgorithm.h:113
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
DDAxes::x
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
B2GMonitoring_cff.nelectrons
nelectrons
Definition: B2GMonitoring_cff.py:145
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
DigitizerUtility::EnergyDepositUnit
Definition: DigitizerUtility.h:75
Phase2TrackerDigitizerAlgorithm::theTofLowerCut_
const float theTofLowerCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:149
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
Phase2TrackerDigitizerAlgorithm::primary_ionization
void primary_ionization(const PSimHit &hit, std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points) const
Definition: Phase2TrackerDigitizerAlgorithm.cc:183
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
Phase2TrackerDigitizerAlgorithm::theAdcFullScale_
const int theAdcFullScale_
Definition: Phase2TrackerDigitizerAlgorithm.h:135
Calorimetry_cff.thickness
thickness
Definition: Calorimetry_cff.py:114
Phase2TrackerDigitizerAlgorithm::pseudoRadDamageRadius_
const double pseudoRadDamageRadius_
Definition: Phase2TrackerDigitizerAlgorithm.h:166
SiPixelLorentzAngleSimRcd
Definition: SiPixelLorentzAngleSimRcd.h:24
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Topology::channel
virtual int channel(const LocalPoint &p) const =0
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
Pixel3DDigitizerAlgorithm::drift
std::vector< DigitizerUtility::SignalPoint > drift(const PSimHit &hit, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points, bool diffusion_activated)
Definition: Pixel3DDigitizerAlgorithm.cc:254
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
Phase2TrackerDigitizerAlgorithm::SiPixelBadModule_
edm::ESHandle< SiPixelQuality > SiPixelBadModule_
Definition: Phase2TrackerDigitizerAlgorithm.h:88
Point3DBase< float, LocalTag >
PixelTopology
Definition: PixelTopology.h:10
createTree.dd
string dd
Definition: createTree.py:154
MeasurementPoint
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Definition: MeasurementPoint.h:12
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
Bounds::thickness
virtual float thickness() const =0
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
Pixel3DDigitizerAlgorithm::induce_signal
void induce_signal(const PSimHit &hit, const size_t hitIndex, const unsigned int tofBin, const Phase2TrackerGeomDetUnit *pixdet, const std::vector< DigitizerUtility::SignalPoint > &collection_points)
Definition: Pixel3DDigitizerAlgorithm.cc:394
Phase2TrackerDigitizerAlgorithm::pixelFlag_
bool pixelFlag_
Definition: Phase2TrackerDigitizerAlgorithm.h:241
Phase2TrackerDigitizerAlgorithm::tMax_
const double tMax_
Definition: Phase2TrackerDigitizerAlgorithm.h:173
PixelGeomDetUnit::specificTopology
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
Definition: PixelGeomDetUnit.cc:17
Pixel3DDigitizerAlgorithm::_is_inside_ohmic_column
const bool _is_inside_ohmic_column(const LocalPoint &p, const std::pair< float, float > &pitch) const
Definition: Pixel3DDigitizerAlgorithm.cc:126
LocalVector
Local3DVector LocalVector
Definition: LocalVector.h:12
Pixel3DDigitizerAlgorithm::_ohm_column_radius
float _ohm_column_radius
Definition: Pixel3DDigitizerAlgorithm.h:62
Pixel3DDigitizerAlgorithm::_np_column_radius
float _np_column_radius
Definition: Pixel3DDigitizerAlgorithm.h:61
Phase2TrackerDigitizerAlgorithm::SiPixelLorentzAngle_
edm::ESHandle< SiPixelLorentzAngle > SiPixelLorentzAngle_
Definition: Phase2TrackerDigitizerAlgorithm.h:85
Phase2TrackerDigitizerAlgorithm::theElectronPerADC_
const float theElectronPerADC_
Definition: Phase2TrackerDigitizerAlgorithm.h:134
GeomDet::specificSurface
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:40
get
#define get
Phase2TrackerDigitizerAlgorithm::theThresholdInE_Endcap_
const float theThresholdInE_Endcap_
Definition: Phase2TrackerDigitizerAlgorithm.h:140
Phase2TrackerDigitizerAlgorithm::use_deadmodule_DB_
const bool use_deadmodule_DB_
Definition: Phase2TrackerDigitizerAlgorithm.h:112
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Phase2TrackerDigitizerAlgorithm::_signal
signalMaps _signal
Definition: Phase2TrackerDigitizerAlgorithm.h:106
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
LaserClient_cfi.Amplitude
Amplitude
Definition: LaserClient_cfi.py:39
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
c_inv
constexpr double c_inv
Definition: Phase2TrackerDigitizerAlgorithm.h:56
Phase2TrackerDigitizerAlgorithm::Phase2TrackerDigitizerAlgorithm
Phase2TrackerDigitizerAlgorithm(const edm::ParameterSet &conf_common, const edm::ParameterSet &conf_specific)
Definition: Phase2TrackerDigitizerAlgorithm.cc:48
DigitizerUtility::SignalPoint
Definition: DigitizerUtility.h:96
PixelTopology::pixel
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
HiBiasedCentrality_cfi.function
function
Definition: HiBiasedCentrality_cfi.py:4
Phase2TrackerDigitizerAlgorithm::theSiPixelGainCalibrationService_
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
Definition: Phase2TrackerDigitizerAlgorithm.h:212
Phase2TrackerDigitizerAlgorithm::use_ineff_from_db_
const bool use_ineff_from_db_
Definition: Phase2TrackerDigitizerAlgorithm.h:110
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
SiPixelFedCablingMapRcd
Definition: SiPixelFedCablingMapRcd.h:5
Phase2TrackerDigitizerAlgorithm::addPixelInefficiency_
const bool addPixelInefficiency_
Definition: Phase2TrackerDigitizerAlgorithm.h:160
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37