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

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) const
 
std::vector< DigitizerUtility::SignalPointdrift (const PSimHit &hit, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points) const override
 
std::vector< DigitizerUtility::SignalPointdrift (const PSimHit &hit, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points, bool diffusion_activated) 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) override
 
void init (const edm::EventSetup &es) override
 
 Pixel3DDigitizerAlgorithm (const edm::ParameterSet &conf)
 
bool select_hit (const PSimHit &hit, double tCorr, double &sigScale) const override
 
 ~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)
 
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) const
 
void loadAccumulator (uint32_t detId, const std::map< int, float > &accumulator)
 
 Phase2TrackerDigitizerAlgorithm (const edm::ParameterSet &conf_common, const edm::ParameterSet &conf_specific)
 
virtual ~Phase2TrackerDigitizerAlgorithm ()
 

Private Member Functions

const bool is_inside_n_column_ (const LocalPoint &p, const float &sensor_thickness) const
 
const bool is_inside_ohmic_column_ (const LocalPoint &p, const std::pair< float, float > &pitch) const
 

Private Attributes

const float np_column_gap_
 
const float np_column_radius_
 
const 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)
 
int convertSignalToAdc (uint32_t detID, float signal_in_elec, float threshold)
 
LocalVector DriftDirection (const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
 
virtual std::vector< float > fluctuateEloss (int particleId, float momentum, float eloss, float length, int NumberOfSegments) const
 
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)
 
virtual std::vector< DigitizerUtility::EnergyDepositUnitprimary_ionization (const PSimHit &hit) 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< SiPhase2OuterTrackerLorentzAnglesiPhase2OTLorentzAngle_
 
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")),
57  (conf.getParameter<edm::ParameterSet>("Pixel3DDigitizerAlgorithm").getParameter<double>("NPColumnRadius")) *
58  1.0_um),
60  (conf.getParameter<edm::ParameterSet>("Pixel3DDigitizerAlgorithm").getParameter<double>("OhmicColumnRadius")) *
61  1.0_um),
63  (conf.getParameter<edm::ParameterSet>("Pixel3DDigitizerAlgorithm").getParameter<double>("NPColumnGap")) *
64  1.0_um) {
65  // XXX - NEEDED?
66  pixelFlag_ = true;
67 
68  edm::LogInfo("Pixel3DDigitizerAlgorithm")
69  << "Algorithm constructed \n"
70  << "Configuration parameters:\n"
71  << "\n*** Threshold"
72  << "\n Endcap = " << theThresholdInE_Endcap_ << " electrons"
73  << "\n Barrel = " << theThresholdInE_Barrel_ << " electrons"
74  << "\n*** Gain"
75  << "\n Electrons per ADC:" << theElectronPerADC_ << "\n ADC Full Scale: " << theAdcFullScale_
76  << "\n*** The delta cut-off is set to " << tMax_ << "\n*** Pixel-inefficiency: " << addPixelInefficiency_;
77 }

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 79 of file Pixel3DDigitizerAlgorithm.cc.

79 {}

Member Function Documentation

◆ 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 
) const

Definition at line 112 of file Pixel3DDigitizerAlgorithm.cc.

117  {
118  // FIXME -- DM : Note that with a 0.3 will be enough (if using current sigma formulae)
119  // With the current sigma, this value is dependent of the thickness,
120  // Note that this formulae is coming from planar sensors, a similar
121  // study with data will be needed to extract the sigma for 3D
122  const float max_migration_radius = 0.4_um;
123  // Need to know which axis is the relevant one
124  int displ_ind = -1;
125  float pitch = 0.0;
126 
127  // Check the group is near the edge of the pixel, so diffusion will
128  // be relevant in order to migrate between pixel cells
129  if (hpitches.first - std::abs(pos.x()) < max_migration_radius) {
130  displ_ind = 0;
131  pitch = hpitches.first;
132  } else if (hpitches.second - std::abs(pos.y()) < max_migration_radius) {
133  displ_ind = 1;
134  pitch = hpitches.second;
135  } else {
136  // Nothing to do, too far away
137  return std::vector<DigitizerUtility::EnergyDepositUnit>();
138  }
139 
140  // The new EnergyDeposits in the neighbour pixels
141  // (defined by +1 to the right (first axis) and +1 to the up (second axis)) <-- XXX
142  std::vector<DigitizerUtility::EnergyDepositUnit> migrated_charge;
143 
144  // FIXME -- DM
145  const float diffusion_step = 0.1_um;
146 
147  // The position while drifting
148  std::vector<float> pos_moving({pos.x(), pos.y(), pos.z()});
149  // The drifting: drift field and steps
150  std::function<std::vector<float>(int)> do_step =
151  [&pos_moving, &u_drift, diffusion_step](int i) -> std::vector<float> {
152  auto dd = u_drift(pos_moving[0], pos_moving[1]);
153  return std::vector<float>({i * diffusion_step * dd.x(), i * diffusion_step * dd.y(), i * diffusion_step * dd.z()});
154  };
155 
156  LogDebug("Pixel3DDigitizerAlgorithm::diffusion")
157  << "\nMax. radius from the pixel edge to migrate charge: " << max_migration_radius * 1.0_um_inv << " [um]"
158  << "\nMigration axis: " << displ_ind
159  << "\n(super-)Charge distance to the pixel edge: " << (pitch - pos_moving[displ_ind]) * 1.0_um_inv << " [um]";
160 
161  // FIXME -- Sigma reference, DM?
162  const float distance0 = 300.0_um;
163  const float sigma0 = 3.4_um;
164  // FIXME -- Tolerance, DM?
165  const float TOL = 1e-6;
166  // How many sigmas (probably a configurable, to be decided not now)
167  const float N_SIGMA = 3.0;
168 
169  // Start the drift and check every step
170  // initial position
171  int i = 0;
172  // Some variables needed
173  float current_carriers = ncarriers;
174  std::vector<float> newpos({pos_moving[0], pos_moving[1], pos_moving[2]});
175  float distance_edge = 0.0_um;
176  do {
177  std::transform(pos_moving.begin(), pos_moving.end(), do_step(i).begin(), pos_moving.begin(), std::plus<float>());
178  distance_edge = pitch - std::abs(pos_moving[displ_ind]);
179  // current diffusion value
180  double sigma = std::sqrt(i * diffusion_step / distance0) * (distance0 / thickness) * sigma0;
181  // Get the amount of charge on the neighbor pixel: note the
182  // transformation to a Normal
183  float migrated_e = current_carriers * 0.5 * (1.0 - std::erf(distance_edge / sigma));
184 
185  LogDebug("(super-)charge diffusion") << "step-" << i << ", Initial Ne= " << ncarriers << ", "
186  << "r=(" << pos_moving[0] * 1.0_um_inv << ", " << pos_moving[1] * 1.0_um_inv
187  << ", " << pos_moving[2] * 1.0_um_inv << ") [um], "
188  << "Migrated charge: " << migrated_e;
189 
190  // No charge was migrated (ignore creation time)
191  if (i != 0) {
192  // At least 1 electron migrated
193  if ((migrated_e - TOL) < 1.0) {
194  break;
195  }
196  // Move the migrated charge
197  current_carriers -= migrated_e;
198  // Create the ionization point:
199  // First update the newpos vector: the new charge positions at the neighbourg pixels
200  // are created in the same position that its "parent carriers"
201  // except the direction of migration
202  std::vector<float> newpos(pos_moving);
203  // Lest create the new charges around 3 sigmas away
204  newpos[displ_ind] += std::copysign(N_SIGMA * sigma, newpos[displ_ind]);
205  migrated_charge.push_back(DigitizerUtility::EnergyDepositUnit(migrated_e, newpos[0], newpos[1], newpos[2]));
206  }
207  // Next step
208  ++i;
209  } while (std::abs(distance_edge) < max_migration_radius && current_carriers > 0.5 * ncarriers);
210 
211  return migrated_charge;
212 }

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

Referenced by drift().

◆ drift() [1/2]

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

Reimplemented from Phase2TrackerDigitizerAlgorithm.

Definition at line 220 of file Pixel3DDigitizerAlgorithm.cc.

224  {
225  return drift(hit, pixdet, bfield, ionization_points, true);
226 }

Referenced by drift().

◆ drift() [2/2]

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 
) const

Definition at line 227 of file Pixel3DDigitizerAlgorithm.cc.

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

References Surface::bounds(), funct::cos(), diffusion(), drift(), mps_fire::end, JetChargeProducer_cfi::exp, HiBiasedCentrality_cfi::function, is_inside_n_column_(), is_inside_ohmic_column_(), Topology::localPosition(), LogDebug, CaloTowersParam_cfi::mc, PixelTopology::ncolumns(), B2GMonitoring_cff::nelectrons, np_column_radius_, PixelTopology::nrows(), 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, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ induce_signal()

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

Reimplemented from Phase2TrackerDigitizerAlgorithm.

Definition at line 382 of file Pixel3DDigitizerAlgorithm.cc.

386  {
387  // X - Rows, Left-Right
388  // Y - Columns, Down-Up
389  const uint32_t detId = pixdet->geographicalId().rawId();
390  // Accumulated signal at each channel of this detector
391  signal_map_type& the_signal = _signal[detId];
392 
393  // Choose the proper pixel-to-channel converter
394  std::function<int(int, int)> pixelToChannel =
396  : static_cast<std::function<int(int, int)> >(Phase2TrackerDigi::pixelToChannel);
397 
398  // Iterate over collection points on the collection plane
399  for (const auto& pt : collection_points) {
400  // Extract corresponding channel (position is already given in pixel indices)
401  const int channel = pixelToChannel(pt.position().x(), pt.position().y());
402 
403  float corr_time = hit.tof() - pixdet->surface().toGlobal(hit.localPosition()).mag() * c_inv;
404  if (makeDigiSimLinks_) {
405  the_signal[channel] +=
406  DigitizerUtility::Amplitude(pt.amplitude(), &hit, pt.amplitude(), corr_time, hitIndex, tofBin);
407  } else {
408  the_signal[channel] += DigitizerUtility::Amplitude(pt.amplitude(), nullptr, pt.amplitude());
409  }
410 
411  LogDebug("Pixel3DDigitizerAlgorithm::induce_signal")
412  << " Induce charge at row,col:" << pt.position() << " N_electrons:" << pt.amplitude() << " [Channel:" << channel
413  << "]\n [Accumulated signal in this channel:" << the_signal[channel].ampl() << "] "
414  << " Global index linked PSimHit:" << hitIndex;
415  ;
416  }
417 }

References Phase2TrackerDigitizerAlgorithm::_signal, LaserClient_cfi::Amplitude, c_inv, Topology::channel(), HiBiasedCentrality_cfi::function, GeomDet::geographicalId(), createfilelist::int, LogDebug, mag(), Phase2TrackerDigitizerAlgorithm::makeDigiSimLinks_, Phase2TrackerDigitizerAlgorithm::pixelFlag_, Phase2TrackerDigi::pixelToChannel(), PixelDigi::pixelToChannel(), pixelgpudetails::pixelToChannel(), DiDispStaMuonMonitor_cfi::pt, DetId::rawId(), GeomDet::surface(), and Surface::toGlobal().

◆ 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.

◆ is_inside_n_column_()

const bool Pixel3DDigitizerAlgorithm::is_inside_n_column_ ( const LocalPoint p,
const float &  sensor_thickness 
) const
private

Definition at line 89 of file Pixel3DDigitizerAlgorithm.cc.

89  {
90  // The insensitive volume of the column: sensor thickness - column gap distance
91  return (p.perp() <= np_column_radius_ && p.z() <= (sensor_thickness - np_column_gap_));
92 }

References np_column_gap_, 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 94 of file Pixel3DDigitizerAlgorithm.cc.

95  {
96  // The four corners of the cell
97  return ((p - LocalVector(half_pitch.first, half_pitch.second, 0)).perp() <= ohm_column_radius_) ||
98  ((p - LocalVector(-half_pitch.first, half_pitch.second, 0)).perp() <= ohm_column_radius_) ||
99  ((p - LocalVector(half_pitch.first, -half_pitch.second, 0)).perp() <= ohm_column_radius_) ||
100  ((p - LocalVector(-half_pitch.first, -half_pitch.second, 0)).perp() <= ohm_column_radius_);
101 }

References ohm_column_radius_, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by drift().

◆ select_hit()

bool Pixel3DDigitizerAlgorithm::select_hit ( const PSimHit hit,
double  tCorr,
double &  sigScale 
) const
overridevirtual

Member Data Documentation

◆ np_column_gap_

const float Pixel3DDigitizerAlgorithm::np_column_gap_
private

Definition at line 62 of file Pixel3DDigitizerAlgorithm.h.

Referenced by is_inside_n_column_().

◆ np_column_radius_

const float Pixel3DDigitizerAlgorithm::np_column_radius_
private

Definition at line 59 of file Pixel3DDigitizerAlgorithm.h.

Referenced by drift(), and is_inside_n_column_().

◆ ohm_column_radius_

const float Pixel3DDigitizerAlgorithm::ohm_column_radius_
private

Definition at line 60 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:106
Phase2TrackerDigitizerAlgorithm::makeDigiSimLinks_
const bool makeDigiSimLinks_
Definition: Phase2TrackerDigitizerAlgorithm.h:114
Pixel3DDigitizerAlgorithm::is_inside_n_column_
const bool is_inside_n_column_(const LocalPoint &p, const float &sensor_thickness) const
Definition: Pixel3DDigitizerAlgorithm.cc:89
DDAxes::y
Phase2TrackerDigitizerAlgorithm::theThresholdInE_Barrel_
const float theThresholdInE_Barrel_
Definition: Phase2TrackerDigitizerAlgorithm.h:147
mps_fire.i
i
Definition: mps_fire.py:428
Phase2TrackerDigitizerAlgorithm::pseudoRadDamage_
const double pseudoRadDamage_
Definition: Phase2TrackerDigitizerAlgorithm.h:171
SiPixelQualityRcd
Definition: SiPixelQualityRcd.h:13
Phase2TrackerDigitizerAlgorithm::theTofUpperCut_
const float theTofUpperCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:156
Pixel3DDigitizerAlgorithm::ohm_column_radius_
const float ohm_column_radius_
Definition: Pixel3DDigitizerAlgorithm.h:60
CaloTowersParam_cfi.mc
mc
Definition: CaloTowersParam_cfi.py:8
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
Phase2TrackerDigitizerAlgorithm::geom_
edm::ESHandle< TrackerGeometry > geom_
Definition: Phase2TrackerDigitizerAlgorithm.h:98
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
pos
Definition: PixelAliasList.h:18
PixelTopology::pitch
virtual std::pair< float, float > pitch() const =0
Phase2TrackerDigitizerAlgorithm::fedCablingMap_
edm::ESHandle< SiPixelFedCablingMap > fedCablingMap_
Definition: Phase2TrackerDigitizerAlgorithm.h:97
protons_cff.time
time
Definition: protons_cff.py:39
Phase2TrackerDigitizerAlgorithm::use_LorentzAngle_DB_
const bool use_LorentzAngle_DB_
Definition: Phase2TrackerDigitizerAlgorithm.h:119
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
DDAxes::x
Phase2TrackerDigitizerAlgorithm::siPixelLorentzAngle_
edm::ESHandle< SiPixelLorentzAngle > siPixelLorentzAngle_
Definition: Phase2TrackerDigitizerAlgorithm.h:88
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
B2GMonitoring_cff.nelectrons
nelectrons
Definition: B2GMonitoring_cff.py:145
Phase2TrackerDigi::pixelToChannel
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
Definition: Phase2TrackerDigi.h:43
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Pixel3DDigitizerAlgorithm::drift
std::vector< DigitizerUtility::SignalPoint > drift(const PSimHit &hit, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points) const override
Definition: Pixel3DDigitizerAlgorithm.cc:220
DigitizerUtility::EnergyDepositUnit
Definition: DigitizerUtility.h:72
Phase2TrackerDigitizerAlgorithm::theTofLowerCut_
const float theTofLowerCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:155
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
Phase2TrackerDigitizerAlgorithm::theAdcFullScale_
const int theAdcFullScale_
Definition: Phase2TrackerDigitizerAlgorithm.h:141
Calorimetry_cff.thickness
thickness
Definition: Calorimetry_cff.py:115
Phase2TrackerDigitizerAlgorithm::pseudoRadDamageRadius_
const double pseudoRadDamageRadius_
Definition: Phase2TrackerDigitizerAlgorithm.h:172
SiPixelLorentzAngleSimRcd
Definition: SiPixelLorentzAngleSimRcd.h:24
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
mps_fire.end
end
Definition: mps_fire.py:242
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
PixelTopology::ncolumns
virtual int ncolumns() const =0
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) const
Definition: Pixel3DDigitizerAlgorithm.cc:112
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
PixelDigi::pixelToChannel
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:71
Point3DBase< float, LocalTag >
createTree.dd
string dd
Definition: createTree.py:154
pixelgpudetails::pixelToChannel
constexpr uint32_t pixelToChannel(int row, int col)
Definition: SiPixelRawToClusterGPUKernel.h:145
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:233
edm::ParameterSet
Definition: ParameterSet.h:47
Phase2TrackerDigitizerAlgorithm::pixelFlag_
bool pixelFlag_
Definition: Phase2TrackerDigitizerAlgorithm.h:238
Phase2TrackerDigitizerAlgorithm::tMax_
const double tMax_
Definition: Phase2TrackerDigitizerAlgorithm.h:179
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:94
LocalVector
Local3DVector LocalVector
Definition: LocalVector.h:12
createfilelist.int
int
Definition: createfilelist.py:10
Phase2TrackerDigitizerAlgorithm::theElectronPerADC_
const float theElectronPerADC_
Definition: Phase2TrackerDigitizerAlgorithm.h:140
Phase2TrackerDigitizerAlgorithm::siPixelBadModule_
edm::ESHandle< SiPixelQuality > siPixelBadModule_
Definition: Phase2TrackerDigitizerAlgorithm.h:94
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:146
Phase2TrackerDigitizerAlgorithm::use_deadmodule_DB_
const bool use_deadmodule_DB_
Definition: Phase2TrackerDigitizerAlgorithm.h:118
Phase2TrackerDigitizerAlgorithm::_signal
signalMaps _signal
Definition: Phase2TrackerDigitizerAlgorithm.h:112
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:57
Phase2TrackerDigitizerAlgorithm::Phase2TrackerDigitizerAlgorithm
Phase2TrackerDigitizerAlgorithm(const edm::ParameterSet &conf_common, const edm::ParameterSet &conf_specific)
Definition: Phase2TrackerDigitizerAlgorithm.cc:59
DigitizerUtility::SignalPoint
Definition: DigitizerUtility.h:93
PixelTopology::pixel
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
HiBiasedCentrality_cfi.function
function
Definition: HiBiasedCentrality_cfi.py:4
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Phase2TrackerDigitizerAlgorithm::theSiPixelGainCalibrationService_
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
Definition: Phase2TrackerDigitizerAlgorithm.h:213
Phase2TrackerDigitizerAlgorithm::use_ineff_from_db_
const bool use_ineff_from_db_
Definition: Phase2TrackerDigitizerAlgorithm.h:116
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:166
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
PixelTopology::nrows
virtual int nrows() const =0
hcaltb::N_SIGMA
static const double N_SIGMA
Definition: HcalTBTDCUnpacker.cc:263
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
Pixel3DDigitizerAlgorithm::np_column_radius_
const float np_column_radius_
Definition: Pixel3DDigitizerAlgorithm.h:59
hit
Definition: SiStripHitEffFromCalibTree.cc:88
Pixel3DDigitizerAlgorithm::np_column_gap_
const float np_column_gap_
Definition: Pixel3DDigitizerAlgorithm.h:62
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37