CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes
SiPixelDigitizerAlgorithm Class Reference

#include <SiPixelDigitizerAlgorithm.h>

Classes

class  Amplitude
 
class  CalParameters
 
class  EnergyDepositUnit
 
struct  PixelAging
 
struct  PixelEfficiencies
 
class  SignalPoint
 

Public Types

typedef std::unordered_map< std::string, PixelFEDChannelCollectionPixelFEDChannelCollectionMap
 

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 PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
 
void calculateInstlumiFactor (const std::vector< PileupSummaryInfo > &ps, int bunchSpacing)
 
void calculateInstlumiFactor (PileupMixingContent *puInfo)
 
std::unique_ptr< PixelFEDChannelCollectionchooseScenario (const std::vector< PileupSummaryInfo > &ps, CLHEP::HepRandomEngine *engine)
 
std::unique_ptr< PixelFEDChannelCollectionchooseScenario (PileupMixingContent *puInfo, CLHEP::HepRandomEngine *)
 
void digitize (const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
 
void init (const edm::EventSetup &es)
 
void init_DynIneffDB (const edm::EventSetup &, const unsigned int &)
 
void initializeEvent ()
 
bool killBadFEDChannels () const
 
void setSimAccumulator (const std::map< uint32_t, std::map< int, int > > &signalMap)
 
 SiPixelDigitizerAlgorithm (const edm::ParameterSet &conf)
 
 ~SiPixelDigitizerAlgorithm ()
 

Public Attributes

const PixelFEDChannelCollectionMapquality_map
 

Private Types

typedef boost::multi_array< float, 2 > array_2d
 
typedef GloballyPositioned< double > Frame
 
typedef std::vector< edm::ParameterSetParameters
 
typedef signal_map_type::const_iterator signal_map_const_iterator
 
typedef signal_map_type::iterator signal_map_iterator
 
typedef std::map< int, Amplitude, std::less< int > > signal_map_type
 
typedef std::map< uint32_t, signal_map_typesignalMaps
 

Private Member Functions

void add_noise (const PixelGeomDetUnit *pixdet, float thePixelThreshold, CLHEP::HepRandomEngine *)
 
double calcQ (float x) const
 
void drift (const PSimHit &hit, const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const TrackerTopology *tTopo, const std::vector< EnergyDepositUnit > &ionization_points, std::vector< SignalPoint > &collection_points) const
 
LocalVector DriftDirection (const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
 
void fluctuateEloss (int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[], CLHEP::HepRandomEngine *) const
 
void induce_signal (std::vector< PSimHit >::const_iterator inputBegin, std::vector< PSimHit >::const_iterator inputEnd, const PSimHit &hit, const size_t hitIndex, const unsigned int tofBin, const PixelGeomDetUnit *pixdet, const std::vector< SignalPoint > &collection_points)
 
std::map< int, CalParameters, std::less< int > > initCal () const
 
void make_digis (float thePixelThresholdInE, uint32_t detID, const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo) const
 
float missCalibrate (uint32_t detID, const TrackerTopology *tTopo, const PixelGeomDetUnit *pixdet, int col, int row, float amp) const
 
void module_killing_conf (uint32_t detID)
 
void module_killing_DB (uint32_t detID)
 
float pixel_aging (const PixelAging &aging, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo) const
 
void pixel_inefficiency (const PixelEfficiencies &eff, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
 
void pixel_inefficiency_db (uint32_t detID)
 
void primary_ionization (const PSimHit &hit, std::vector< EnergyDepositUnit > &ionization_points, CLHEP::HepRandomEngine *) const
 

Private Attributes

signalMaps _signal
 
const bool addChargeVCALSmearing
 
const bool addNoise
 
const bool addNoisyPixels
 
const bool AddPixelAging
 
const bool AddPixelInefficiency
 
const bool addThresholdSmearing
 
const bool alpha2Order
 
const float BPix_p0
 
const float BPix_p1
 
const float BPix_p2
 
const float BPix_p3
 
const std::map< int, CalParameters, std::less< int > > calmap
 
const float ClusterWidth
 
const Parameters DeadModules
 
const float Dist300
 
const bool doMissCalibrate
 
const float electronsPerVCAL
 
const float electronsPerVCAL_L1
 
const float electronsPerVCAL_L1_Offset
 
const float electronsPerVCAL_Offset
 
const std::unique_ptr< SiG4UniversalFluctuationfluctuate
 
const bool fluctuateCharge
 
const float FPix_p0
 
const float FPix_p1
 
const float FPix_p2
 
const float FPix_p3
 
edm::ESHandle< TrackerGeometrygeom_
 
const float GeVperElectron
 
const bool KillBadFEDChannels
 
const bool makeDigiSimLinks_
 
edm::ESHandle< SiPixelFedCablingMapmap_
 
const int NumberOfBarrelLayers
 
const int NumberOfEndcapDisks
 
const PixelAging pixelAging_
 
PixelEfficiencies pixelEfficiencies_
 
edm::ESHandle< PixelFEDChannelCollectionMapPixelFEDChannelCollectionMapHandle
 
edm::ESHandle< SiPixelQualityProbabilitiesscenarioProbabilityHandle
 
const float Sigma0
 
edm::ESHandle< SiPixelQualitySiPixelBadModule_
 
edm::ESHandle< SiPixelDynamicInefficiencySiPixelDynamicInefficiency_
 
edm::ESHandle< SiPixelLorentzAngleSiPixelLorentzAngle_
 
std::string siPixelQualityLabel
 
const float tanLorentzAnglePerTesla_BPix
 
const float tanLorentzAnglePerTesla_FPix
 
const int theAdcFullScale
 
const float theElectronPerADC
 
const float theGainSmearing
 
std::unique_ptr< SiPixelChargeReweightingAlgorithmTheNewSiPixelChargeReweightingAlgorithmClass
 
const float theNoiseInElectrons
 
const std::unique_ptr< GaussianTailNoiseGeneratortheNoiser
 
const float theOffsetSmearing
 
const float theReadoutNoise
 
const std::unique_ptr< SiPixelGainCalibrationOfflineSimServicetheSiPixelGainCalibrationService_
 
const float theThresholdInE_BPix
 
const float theThresholdInE_BPix_L1
 
const float theThresholdInE_BPix_L2
 
const float theThresholdInE_FPix
 
const double theThresholdSmearing_BPix
 
const double theThresholdSmearing_BPix_L1
 
const double theThresholdSmearing_BPix_L2
 
const double theThresholdSmearing_FPix
 
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_
 
const bool UseReweighting
 

Detailed Description

Definition at line 55 of file SiPixelDigitizerAlgorithm.h.

Member Typedef Documentation

◆ array_2d

typedef boost::multi_array<float, 2> SiPixelDigitizerAlgorithm::array_2d
private

Definition at line 302 of file SiPixelDigitizerAlgorithm.h.

◆ Frame

Definition at line 300 of file SiPixelDigitizerAlgorithm.h.

◆ Parameters

Definition at line 301 of file SiPixelDigitizerAlgorithm.h.

◆ PixelFEDChannelCollectionMap

Definition at line 91 of file SiPixelDigitizerAlgorithm.h.

◆ signal_map_const_iterator

typedef signal_map_type::const_iterator SiPixelDigitizerAlgorithm::signal_map_const_iterator
private

Definition at line 298 of file SiPixelDigitizerAlgorithm.h.

◆ signal_map_iterator

typedef signal_map_type::iterator SiPixelDigitizerAlgorithm::signal_map_iterator
private

Definition at line 297 of file SiPixelDigitizerAlgorithm.h.

◆ signal_map_type

typedef std::map<int, Amplitude, std::less<int> > SiPixelDigitizerAlgorithm::signal_map_type
private

Definition at line 296 of file SiPixelDigitizerAlgorithm.h.

◆ signalMaps

typedef std::map<uint32_t, signal_map_type> SiPixelDigitizerAlgorithm::signalMaps
private

Definition at line 299 of file SiPixelDigitizerAlgorithm.h.

Constructor & Destructor Documentation

◆ SiPixelDigitizerAlgorithm()

SiPixelDigitizerAlgorithm::SiPixelDigitizerAlgorithm ( const edm::ParameterSet conf)

Definition at line 183 of file SiPixelDigitizerAlgorithm.cc.

184  :
185 
187  conf.getParameter<std::string>("SiPixelQualityLabel")), //string to specify SiPixelQuality label
188  _signal(),
189  makeDigiSimLinks_(conf.getUntrackedParameter<bool>("makeDigiSimLinks", true)),
190  use_ineff_from_db_(conf.getParameter<bool>("useDB")),
191  use_module_killing_(conf.getParameter<bool>("killModules")), // boolean to kill or not modules
192  use_deadmodule_DB_(conf.getParameter<bool>("DeadModules_DB")), // boolean to access dead modules from DB
193  use_LorentzAngle_DB_(conf.getParameter<bool>("LorentzAngle_DB")), // boolean to access Lorentz angle from DB
194 
196  : conf.getParameter<Parameters>("DeadModules")), // get dead module from cfg file
197 
199 
200  // Common pixel parameters
201  // These are parameters which are not likely to be changed
202  GeVperElectron(3.61E-09), // 1 electron(3.61eV, 1keV(277e, mod 9/06 d.k.
203  Sigma0(0.00037), // Charge diffusion constant 7->3.7
204  Dist300(0.0300), // normalized to 300micron Silicon
205  alpha2Order(conf.getParameter<bool>("Alpha2Order")), // switch on/off of E.B effect
206  ClusterWidth(3.), // Charge integration spread on the collection plane
207 
208  // get external parameters:
209  // To account for upgrade geometries do not assume the number
210  // of layers or disks.
211  NumberOfBarrelLayers(conf.exists("NumPixelBarrel") ? conf.getParameter<int>("NumPixelBarrel") : 3),
212  NumberOfEndcapDisks(conf.exists("NumPixelEndcap") ? conf.getParameter<int>("NumPixelEndcap") : 2),
213 
214  // ADC calibration 1adc count(135e.
215  // Corresponds to 2adc/kev, 270[e/kev]/135[e/adc](2[adc/kev]
216  // Be carefull, this parameter is also used in SiPixelDet.cc to
217  // calculate the noise in adc counts from noise in electrons.
218  // Both defaults should be the same.
219  theElectronPerADC(conf.getParameter<double>("ElectronPerAdc")),
220 
221  // ADC saturation value, 255(8bit adc.
222  //theAdcFullScale(conf.getUntrackedParameter<int>("AdcFullScale",255)),
223  theAdcFullScale(conf.getParameter<int>("AdcFullScale")),
224 
225  // Noise in electrons:
226  // Pixel cell noise, relevant for generating noisy pixels
227  theNoiseInElectrons(conf.getParameter<double>("NoiseInElectrons")),
228 
229  // Fill readout noise, including all readout chain, relevant for smearing
230  //theReadoutNoise(conf.getUntrackedParameter<double>("ReadoutNoiseInElec",500.)),
231  theReadoutNoise(conf.getParameter<double>("ReadoutNoiseInElec")),
232 
233  // Pixel threshold in units of noise:
234  // thePixelThreshold(conf.getParameter<double>("ThresholdInNoiseUnits")),
235  // Pixel threshold in electron units.
236  theThresholdInE_FPix(conf.getParameter<double>("ThresholdInElectrons_FPix")),
237  theThresholdInE_BPix(conf.getParameter<double>("ThresholdInElectrons_BPix")),
238  theThresholdInE_BPix_L1(conf.exists("ThresholdInElectrons_BPix_L1")
239  ? conf.getParameter<double>("ThresholdInElectrons_BPix_L1")
241  theThresholdInE_BPix_L2(conf.exists("ThresholdInElectrons_BPix_L2")
242  ? conf.getParameter<double>("ThresholdInElectrons_BPix_L2")
244 
245  // Add threshold gaussian smearing:
246  theThresholdSmearing_FPix(conf.getParameter<double>("ThresholdSmearing_FPix")),
247  theThresholdSmearing_BPix(conf.getParameter<double>("ThresholdSmearing_BPix")),
248  theThresholdSmearing_BPix_L1(conf.exists("ThresholdSmearing_BPix_L1")
249  ? conf.getParameter<double>("ThresholdSmearing_BPix_L1")
251  theThresholdSmearing_BPix_L2(conf.exists("ThresholdSmearing_BPix_L2")
252  ? conf.getParameter<double>("ThresholdSmearing_BPix_L2")
254 
255  // electrons to VCAL conversion needed in misscalibrate()
256  electronsPerVCAL(conf.getParameter<double>("ElectronsPerVcal")),
257  electronsPerVCAL_Offset(conf.getParameter<double>("ElectronsPerVcal_Offset")),
258  electronsPerVCAL_L1(conf.exists("ElectronsPerVcal_L1") ? conf.getParameter<double>("ElectronsPerVcal_L1")
259  : electronsPerVCAL),
260  electronsPerVCAL_L1_Offset(conf.exists("ElectronsPerVcal_L1_Offset")
261  ? conf.getParameter<double>("ElectronsPerVcal_L1_Offset")
263 
264  //theTofCut 12.5, cut in particle TOD +/- 12.5ns
265  //theTofCut(conf.getUntrackedParameter<double>("TofCut",12.5)),
266  theTofLowerCut(conf.getParameter<double>("TofLowerCut")),
267  theTofUpperCut(conf.getParameter<double>("TofUpperCut")),
268 
269  // Get the Lorentz angle from the cfg file:
271  : conf.getParameter<double>("TanLorentzAnglePerTesla_FPix")),
273  : conf.getParameter<double>("TanLorentzAnglePerTesla_BPix")),
274 
275  // signal response new parameterization: split Fpix and BPix
276  FPix_p0(conf.getParameter<double>("FPix_SignalResponse_p0")),
277  FPix_p1(conf.getParameter<double>("FPix_SignalResponse_p1")),
278  FPix_p2(conf.getParameter<double>("FPix_SignalResponse_p2")),
279  FPix_p3(conf.getParameter<double>("FPix_SignalResponse_p3")),
280 
281  BPix_p0(conf.getParameter<double>("BPix_SignalResponse_p0")),
282  BPix_p1(conf.getParameter<double>("BPix_SignalResponse_p1")),
283  BPix_p2(conf.getParameter<double>("BPix_SignalResponse_p2")),
284  BPix_p3(conf.getParameter<double>("BPix_SignalResponse_p3")),
285 
286  // Add noise
287  addNoise(conf.getParameter<bool>("AddNoise")),
288 
289  // Smear the pixel charge with a gaussian which RMS is a function of the
290  // pixel charge (Danek's study)
291  addChargeVCALSmearing(conf.getParameter<bool>("ChargeVCALSmearing")),
292 
293  // Add noisy pixels
294  addNoisyPixels(conf.getParameter<bool>("AddNoisyPixels")),
295 
296  // Fluctuate charge in track subsegments
297  fluctuateCharge(conf.getUntrackedParameter<bool>("FluctuateCharge", true)),
298 
299  // Control the pixel inefficiency
300  AddPixelInefficiency(conf.getParameter<bool>("AddPixelInefficiency")),
301  KillBadFEDChannels(conf.getParameter<bool>("KillBadFEDChannels")),
302 
303  // Add threshold gaussian smearing:
304  addThresholdSmearing(conf.getParameter<bool>("AddThresholdSmearing")),
305 
306  // Get the constants for the miss-calibration studies
307  doMissCalibrate(conf.getParameter<bool>("MissCalibrate")), // Enable miss-calibration
308  theGainSmearing(conf.getParameter<double>("GainSmearing")), // sigma of the gain smearing
309  theOffsetSmearing(conf.getParameter<double>("OffsetSmearing")), //sigma of the offset smearing
310 
311  // Add pixel radiation damage for upgrade studies
312  AddPixelAging(conf.getParameter<bool>("DoPixelAging")),
313  UseReweighting(conf.getParameter<bool>("UseReweighting")),
314 
315  // delta cutoff in MeV, has to be same as in OSCAR(0.030/cmsim=1.0 MeV
316  //tMax(0.030), // In MeV.
317  //tMax(conf.getUntrackedParameter<double>("deltaProductionCut",0.030)),
318  tMax(conf.getParameter<double>("deltaProductionCut")),
319 
321  theNoiser(addNoise ? new GaussianTailNoiseGenerator() : nullptr),
322  calmap(doMissCalibrate ? initCal() : std::map<int, CalParameters, std::less<int> >()),
324  : nullptr),
327  LogInfo("PixelDigitizer ") << "SiPixelDigitizerAlgorithm constructed"
328  << "Configuration parameters:"
329  << "Threshold/Gain = "
330  << "threshold in electron FPix = " << theThresholdInE_FPix
331  << "threshold in electron BPix = " << theThresholdInE_BPix
332  << "threshold in electron BPix Layer1 = " << theThresholdInE_BPix_L1
333  << "threshold in electron BPix Layer2 = " << theThresholdInE_BPix_L2 << " "
334  << theElectronPerADC << " " << theAdcFullScale << " The delta cut-off is set to " << tMax
335  << " pix-inefficiency " << AddPixelInefficiency;
336 
337  TheNewSiPixelChargeReweightingAlgorithmClass = std::make_unique<SiPixelChargeReweightingAlgorithm>(conf);
338 }

References AddPixelInefficiency, theAdcFullScale, theElectronPerADC, TheNewSiPixelChargeReweightingAlgorithmClass, theThresholdInE_BPix, theThresholdInE_BPix_L1, theThresholdInE_BPix_L2, theThresholdInE_FPix, and tMax.

◆ ~SiPixelDigitizerAlgorithm()

SiPixelDigitizerAlgorithm::~SiPixelDigitizerAlgorithm ( )

Definition at line 430 of file SiPixelDigitizerAlgorithm.cc.

430  {
431  LogDebug("PixelDigitizer") << "SiPixelDigitizerAlgorithm deleted";
432 }

References LogDebug.

Member Function Documentation

◆ accumulateSimHits()

void SiPixelDigitizerAlgorithm::accumulateSimHits ( const std::vector< PSimHit >::const_iterator  inputBegin,
const std::vector< PSimHit >::const_iterator  inputEnd,
const size_t  inputBeginGlobalIndex,
const unsigned int  tofBin,
const PixelGeomDetUnit pixdet,
const GlobalVector bfield,
const TrackerTopology tTopo,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 761 of file SiPixelDigitizerAlgorithm.cc.

768  {
769  // produce SignalPoint's for all SimHit's in detector
770  // Loop over hits
771 
772  uint32_t detId = pixdet->geographicalId().rawId();
773  size_t simHitGlobalIndex = inputBeginGlobalIndex; // This needs to stored to create the digi-sim link later
774  for (std::vector<PSimHit>::const_iterator ssbegin = inputBegin; ssbegin != inputEnd; ++ssbegin, ++simHitGlobalIndex) {
775  // skip hits not in this detector.
776  if ((*ssbegin).detUnitId() != detId) {
777  continue;
778  }
779 
780 #ifdef TP_DEBUG
781  LogDebug("Pixel Digitizer") << (*ssbegin).particleType() << " " << (*ssbegin).pabs() << " "
782  << (*ssbegin).energyLoss() << " " << (*ssbegin).tof() << " " << (*ssbegin).trackId()
783  << " " << (*ssbegin).processType() << " " << (*ssbegin).detUnitId()
784  << (*ssbegin).entryPoint() << " " << (*ssbegin).exitPoint();
785 #endif
786 
787  std::vector<EnergyDepositUnit> ionization_points;
788  std::vector<SignalPoint> collection_points;
789 
790  // fill collection_points for this SimHit, indpendent of topology
791  // Check the TOF cut
792  if (((*ssbegin).tof() - pixdet->surface().toGlobal((*ssbegin).localPosition()).mag() / 30.) >= theTofLowerCut &&
793  ((*ssbegin).tof() - pixdet->surface().toGlobal((*ssbegin).localPosition()).mag() / 30.) <= theTofUpperCut) {
794  primary_ionization(*ssbegin, ionization_points, engine); // fills _ionization_points
795  drift(*ssbegin,
796  pixdet,
797  bfield,
798  tTopo,
799  ionization_points,
800  collection_points); // transforms _ionization_points to collection_points
801  // compute induced signal on readout elements and add to _signal
802  induce_signal(inputBegin,
803  inputEnd,
804  *ssbegin,
805  simHitGlobalIndex,
806  tofBin,
807  pixdet,
808  collection_points); // 1st 3 args needed only for SimHit<-->Digi link
809  } // end if
810  } // end for
811 }

References drift(), GeomDet::geographicalId(), induce_signal(), LogDebug, mag(), primary_ionization(), DetId::rawId(), GeomDet::surface(), theTofLowerCut, theTofUpperCut, and Surface::toGlobal().

◆ add_noise()

void SiPixelDigitizerAlgorithm::add_noise ( const PixelGeomDetUnit pixdet,
float  thePixelThreshold,
CLHEP::HepRandomEngine *  engine 
)
private

Definition at line 1638 of file SiPixelDigitizerAlgorithm.cc.

1640  {
1641 #ifdef TP_DEBUG
1642  LogDebug("Pixel Digitizer") << " enter add_noise " << theNoiseInElectrons;
1643 #endif
1644 
1645  uint32_t detID = pixdet->geographicalId().rawId();
1646  signal_map_type& theSignal = _signal[detID];
1647 
1648  // First add noise to hit pixels
1649  float theSmearedChargeRMS = 0.0;
1650 
1651  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); i++) {
1652  if (addChargeVCALSmearing) {
1653  if ((*i).second < 3000) {
1654  theSmearedChargeRMS = 543.6 - (*i).second * 0.093;
1655  } else if ((*i).second < 6000) {
1656  theSmearedChargeRMS = 307.6 - (*i).second * 0.01;
1657  } else {
1658  theSmearedChargeRMS = -432.4 + (*i).second * 0.123;
1659  }
1660 
1661  // Noise from Vcal smearing:
1662  float noise_ChargeVCALSmearing = theSmearedChargeRMS * CLHEP::RandGaussQ::shoot(engine, 0., 1.);
1663  // Noise from full readout:
1664  float noise = CLHEP::RandGaussQ::shoot(engine, 0., theReadoutNoise);
1665 
1666  if (((*i).second + Amplitude(noise + noise_ChargeVCALSmearing, -1.)) < 0.) {
1667  (*i).second.set(0);
1668  } else {
1669  (*i).second += Amplitude(noise + noise_ChargeVCALSmearing, -1.);
1670  }
1671 
1672  } // End if addChargeVCalSmearing
1673  else {
1674  // Noise: ONLY full READOUT Noise.
1675  // Use here the FULL readout noise, including TBM,ALT,AOH,OPT-REC.
1676  float noise = CLHEP::RandGaussQ::shoot(engine, 0., theReadoutNoise);
1677 
1678  if (((*i).second + Amplitude(noise, -1.)) < 0.) {
1679  (*i).second.set(0);
1680  } else {
1681  (*i).second += Amplitude(noise, -1.);
1682  }
1683  } // end if only Noise from full readout
1684  }
1685 
1686  if (!addNoisyPixels) // Option to skip noise in non-hit pixels
1687  return;
1688 
1689  const PixelTopology* topol = &pixdet->specificTopology();
1690  int numColumns = topol->ncolumns(); // det module number of cols&rows
1691  int numRows = topol->nrows();
1692 
1693  // Add noise on non-hit pixels
1694  // Use here the pixel noise
1695  int numberOfPixels = (numRows * numColumns);
1696  std::map<int, float, std::less<int> > otherPixels;
1697  std::map<int, float, std::less<int> >::iterator mapI;
1698 
1699  theNoiser->generate(numberOfPixels,
1700  thePixelThreshold, //thr. in un. of nois
1701  theNoiseInElectrons, // noise in elec.
1702  otherPixels,
1703  engine);
1704 
1705 #ifdef TP_DEBUG
1706  LogDebug("Pixel Digitizer") << " Add noisy pixels " << numRows << " " << numColumns << " " << theNoiseInElectrons
1707  << " " << theThresholdInE_FPix << theThresholdInE_BPix << " " << numberOfPixels << " "
1708  << otherPixels.size();
1709 #endif
1710 
1711  // Add noisy pixels
1712  for (mapI = otherPixels.begin(); mapI != otherPixels.end(); mapI++) {
1713  int iy = ((*mapI).first) / numRows;
1714  int ix = ((*mapI).first) - (iy * numRows);
1715 
1716  // Keep for a while for testing.
1717  if (iy < 0 || iy > (numColumns - 1))
1718  LogWarning("Pixel Geometry") << " error in iy " << iy;
1719  if (ix < 0 || ix > (numRows - 1))
1720  LogWarning("Pixel Geometry") << " error in ix " << ix;
1721 
1722  int chan = PixelDigi::pixelToChannel(ix, iy);
1723 
1724 #ifdef TP_DEBUG
1725  LogDebug("Pixel Digitizer") << " Storing noise = " << (*mapI).first << " " << (*mapI).second << " " << ix << " "
1726  << iy << " " << chan;
1727 #endif
1728 
1729  if (theSignal[chan] == 0) {
1730  // float noise = float( (*mapI).second );
1731  int noise = int((*mapI).second);
1732  theSignal[chan] = Amplitude(noise, -1.);
1733  }
1734  }
1735 }

References _signal, addChargeVCALSmearing, addNoisyPixels, LaserClient_cfi::Amplitude, officialStyle::chan, GeomDet::geographicalId(), mps_fire::i, createfilelist::int, LogDebug, PixelTopology::ncolumns(), hgcalDigitizer_cfi::noise, PixelTopology::nrows(), PixelDigi::pixelToChannel(), DetId::rawId(), PixelGeomDetUnit::specificTopology(), theNoiseInElectrons, theNoiser, theReadoutNoise, theThresholdInE_BPix, and theThresholdInE_FPix.

Referenced by digitize().

◆ calcQ()

double SiPixelDigitizerAlgorithm::calcQ ( float  x) const
inlineprivate

Definition at line 461 of file SiPixelDigitizerAlgorithm.h.

461  {
462  // need erf(x/sqrt2)
463  //float x2=0.5*x*x;
464  //float a=0.147;
465  //double erf=sqrt(1.0f-exp( -1.0f*x2*( (4/M_PI)+a*x2)/(1.0+a*x2)));
466  //if (x<0.) erf*=-1.0;
467  //return 0.5*(1.0-erf);
468 
469  auto xx = std::min(0.5f * x * x, 12.5f);
470  return 0.5 * (1.0 - std::copysign(std::sqrt(1.f - unsafe_expf<4>(-xx * (1.f + 0.2733f / (1.f + 0.147f * xx)))), x));
471  }

References f, min(), mathSSE::sqrt(), x, and geometryCSVtoXML::xx.

Referenced by induce_signal().

◆ calculateInstlumiFactor() [1/2]

void SiPixelDigitizerAlgorithm::calculateInstlumiFactor ( const std::vector< PileupSummaryInfo > &  ps,
int  bunchSpacing 
)

Definition at line 852 of file SiPixelDigitizerAlgorithm.cc.

852  {
853  int p = -1;
854  for (unsigned int i = 0; i < ps.size(); i++)
855  if (ps[i].getBunchCrossing() == 0)
856  p = i;
857 
858  if (p >= 0) {
859  for (size_t i = 0, n = pixelEfficiencies_.thePUEfficiency.size(); i < n; i++) {
860  double instlumi = ps[p].getTrueNumInteractions() * pixelEfficiencies_.theInstLumiScaleFactor;
861  double instlumi_pow = 1.;
863  for (size_t j = 0; j < pixelEfficiencies_.thePUEfficiency[i].size(); j++) {
865  instlumi_pow *= instlumi;
866  }
867  }
868  } else {
869  for (int i = 0, n = pixelEfficiencies_.thePUEfficiency.size(); i < n; i++) {
871  }
872  }
873 }

References mps_fire::i, dqmiolumiharvest::j, dqmiodumpmetadata::n, AlCaHLTBitMon_ParallelJobs::p, pixelEfficiencies_, SiPixelDigitizerAlgorithm::PixelEfficiencies::pu_scale, SiPixelDigitizerAlgorithm::PixelEfficiencies::theInstLumiScaleFactor, and SiPixelDigitizerAlgorithm::PixelEfficiencies::thePUEfficiency.

◆ calculateInstlumiFactor() [2/2]

void SiPixelDigitizerAlgorithm::calculateInstlumiFactor ( PileupMixingContent puInfo)

Definition at line 814 of file SiPixelDigitizerAlgorithm.cc.

814  {
815  //Instlumi scalefactor calculating for dynamic inefficiency
816 
817  if (puInfo) {
818  const std::vector<int>& bunchCrossing = puInfo->getMix_bunchCrossing();
819  const std::vector<float>& TrueInteractionList = puInfo->getMix_TrueInteractions();
820  //const int bunchSpacing = puInfo->getMix_bunchSpacing();
821 
822  int pui = 0, p = 0;
823  std::vector<int>::const_iterator pu;
824  std::vector<int>::const_iterator pu0 = bunchCrossing.end();
825 
826  for (pu = bunchCrossing.begin(); pu != bunchCrossing.end(); ++pu) {
827  if (*pu == 0) {
828  pu0 = pu;
829  p = pui;
830  }
831  pui++;
832  }
833  if (pu0 != bunchCrossing.end()) {
834  for (size_t i = 0, n = pixelEfficiencies_.thePUEfficiency.size(); i < n; i++) {
835  double instlumi = TrueInteractionList.at(p) * pixelEfficiencies_.theInstLumiScaleFactor;
836  double instlumi_pow = 1.;
838  for (size_t j = 0; j < pixelEfficiencies_.thePUEfficiency[i].size(); j++) {
840  instlumi_pow *= instlumi;
841  }
842  }
843  }
844  } else {
845  for (int i = 0, n = pixelEfficiencies_.thePUEfficiency.size(); i < n; i++) {
847  }
848  }
849 }

References PileupMixingContent::getMix_bunchCrossing(), PileupMixingContent::getMix_TrueInteractions(), mps_fire::i, dqmiolumiharvest::j, dqmiodumpmetadata::n, AlCaHLTBitMon_ParallelJobs::p, pixelEfficiencies_, muons2muons_cfi::pu, SiPixelDigitizerAlgorithm::PixelEfficiencies::pu_scale, SiPixelDigitizerAlgorithm::PixelEfficiencies::theInstLumiScaleFactor, and SiPixelDigitizerAlgorithm::PixelEfficiencies::thePUEfficiency.

Referenced by PreMixingSiPixelWorker::put().

◆ chooseScenario() [1/2]

std::unique_ptr< PixelFEDChannelCollection > SiPixelDigitizerAlgorithm::chooseScenario ( const std::vector< PileupSummaryInfo > &  ps,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 879 of file SiPixelDigitizerAlgorithm.cc.

880  {
881  std::unique_ptr<PixelFEDChannelCollection> PixelFEDChannelCollection_ = nullptr;
883 
884  std::vector<int> bunchCrossing;
885  std::vector<float> TrueInteractionList;
886 
887  for (unsigned int i = 0; i < ps.size(); i++) {
888  bunchCrossing.push_back(ps[i].getBunchCrossing());
889  TrueInteractionList.push_back(ps[i].getTrueNumInteractions());
890  }
891 
892  int pui = 0, p = 0;
893  std::vector<int>::const_iterator pu;
894  std::vector<int>::const_iterator pu0 = bunchCrossing.end();
895 
896  for (pu = bunchCrossing.begin(); pu != bunchCrossing.end(); ++pu) {
897  if (*pu == 0) {
898  pu0 = pu;
899  p = pui;
900  }
901  pui++;
902  }
903 
904  if (pu0 != bunchCrossing.end()) {
905  unsigned int PUBin = TrueInteractionList.at(p); // case delta PU=1, fix me
906  const auto& theProbabilitiesPerScenario = scenarioProbabilityHandle->getProbabilities(PUBin);
907  std::vector<double> probabilities;
908  probabilities.reserve(theProbabilitiesPerScenario.size());
909  for (auto it = theProbabilitiesPerScenario.begin(); it != theProbabilitiesPerScenario.end(); it++) {
910  probabilities.push_back(it->second);
911  }
912 
913  CLHEP::RandGeneral randGeneral(*engine, &(probabilities.front()), probabilities.size());
914  double x = randGeneral.shoot();
915  unsigned int index = x * probabilities.size() - 1;
916  const std::string& scenario = theProbabilitiesPerScenario.at(index).first;
917 
918  PixelFEDChannelCollection_ = std::make_unique<PixelFEDChannelCollection>(quality_map->at(scenario));
920  std::make_unique<PixelFEDChannelCollection>(quality_map->at(scenario));
921  }
922 
923  return PixelFEDChannelCollection_;
924 }

References SiPixelQualityProbabilities::getProbabilities(), mps_fire::i, AlCaHLTBitMon_ParallelJobs::p, pixelEfficiencies_, SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelFEDChannelCollection_, muons2muons_cfi::pu, quality_map, scenarioProbabilityHandle, AlCaHLTBitMon_QueryRunRegistry::string, and x.

◆ chooseScenario() [2/2]

std::unique_ptr< PixelFEDChannelCollection > SiPixelDigitizerAlgorithm::chooseScenario ( PileupMixingContent puInfo,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 926 of file SiPixelDigitizerAlgorithm.cc.

927  {
928  //Determine scenario to use for the current event based on pileup information
929 
930  std::unique_ptr<PixelFEDChannelCollection> PixelFEDChannelCollection_ = nullptr;
932  if (puInfo) {
933  const std::vector<int>& bunchCrossing = puInfo->getMix_bunchCrossing();
934  const std::vector<float>& TrueInteractionList = puInfo->getMix_TrueInteractions();
935 
936  int pui = 0, p = 0;
937  std::vector<int>::const_iterator pu;
938  std::vector<int>::const_iterator pu0 = bunchCrossing.end();
939 
940  for (pu = bunchCrossing.begin(); pu != bunchCrossing.end(); ++pu) {
941  if (*pu == 0) {
942  pu0 = pu;
943  p = pui;
944  }
945  pui++;
946  }
947 
948  if (pu0 != bunchCrossing.end()) {
949  unsigned int PUBin = TrueInteractionList.at(p); // case delta PU=1, fix me
950  const auto& theProbabilitiesPerScenario = scenarioProbabilityHandle->getProbabilities(PUBin);
951  std::vector<double> probabilities;
952  probabilities.reserve(theProbabilitiesPerScenario.size());
953  for (auto it = theProbabilitiesPerScenario.begin(); it != theProbabilitiesPerScenario.end(); it++) {
954  probabilities.push_back(it->second);
955  }
956 
957  CLHEP::RandGeneral randGeneral(*engine, &(probabilities.front()), probabilities.size());
958  double x = randGeneral.shoot();
959  unsigned int index = x * probabilities.size() - 1;
960  const std::string& scenario = theProbabilitiesPerScenario.at(index).first;
961 
962  PixelFEDChannelCollection_ = std::make_unique<PixelFEDChannelCollection>(quality_map->at(scenario));
964  std::make_unique<PixelFEDChannelCollection>(quality_map->at(scenario));
965  }
966  }
967  return PixelFEDChannelCollection_;
968 }

References PileupMixingContent::getMix_bunchCrossing(), PileupMixingContent::getMix_TrueInteractions(), SiPixelQualityProbabilities::getProbabilities(), AlCaHLTBitMon_ParallelJobs::p, pixelEfficiencies_, SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelFEDChannelCollection_, muons2muons_cfi::pu, quality_map, scenarioProbabilityHandle, AlCaHLTBitMon_QueryRunRegistry::string, and x.

Referenced by PreMixingSiPixelWorker::put().

◆ digitize()

void SiPixelDigitizerAlgorithm::digitize ( const PixelGeomDetUnit pixdet,
std::vector< PixelDigi > &  digis,
std::vector< PixelDigiSimLink > &  simlinks,
const TrackerTopology tTopo,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 982 of file SiPixelDigitizerAlgorithm.cc.

986  {
987  // Pixel Efficiency moved from the constructor to this method because
988  // the information of the det are not available in the constructor
989  // Efficiency parameters. 0 - no inefficiency, 1-low lumi, 10-high lumi
990 
991  uint32_t detID = pixdet->geographicalId().rawId();
992  const signal_map_type& theSignal = _signal[detID];
993 
994  // Noise already defined in electrons
995  // thePixelThresholdInE = thePixelThreshold * theNoiseInElectrons ;
996  // Find the threshold in noise units, needed for the noiser.
997 
998  float thePixelThresholdInE = 0.;
999 
1000  if (theNoiseInElectrons > 0.) {
1001  if (pixdet->type().isTrackerPixel() && pixdet->type().isBarrel()) { // Barrel modules
1002  int lay = tTopo->layer(detID);
1003  if (addThresholdSmearing) {
1006  if (lay == 1) {
1007  thePixelThresholdInE = CLHEP::RandGaussQ::shoot(
1008  engine, theThresholdInE_BPix_L1, theThresholdSmearing_BPix_L1); // gaussian smearing
1009  } else if (lay == 2) {
1010  thePixelThresholdInE = CLHEP::RandGaussQ::shoot(
1011  engine, theThresholdInE_BPix_L2, theThresholdSmearing_BPix_L2); // gaussian smearing
1012  } else {
1013  thePixelThresholdInE =
1014  CLHEP::RandGaussQ::shoot(engine, theThresholdInE_BPix, theThresholdSmearing_BPix); // gaussian smearing
1015  }
1016  }
1017  } else {
1020  if (lay == 1) {
1021  thePixelThresholdInE = theThresholdInE_BPix_L1;
1022  } else if (lay == 2) {
1023  thePixelThresholdInE = theThresholdInE_BPix_L2;
1024  } else {
1025  thePixelThresholdInE = theThresholdInE_BPix; // no smearing
1026  }
1027  }
1028  }
1029  } else if (pixdet->type().isTrackerPixel()) { // Forward disks modules
1030  if (addThresholdSmearing) {
1031  thePixelThresholdInE =
1032  CLHEP::RandGaussQ::shoot(engine, theThresholdInE_FPix, theThresholdSmearing_FPix); // gaussian smearing
1033  } else {
1034  thePixelThresholdInE = theThresholdInE_FPix; // no smearing
1035  }
1036  } else {
1037  throw cms::Exception("NotAPixelGeomDetUnit") << "Not a pixel geomdet unit" << detID;
1038  }
1039  }
1040 
1041 #ifdef TP_DEBUG
1042  const PixelTopology* topol = &pixdet->specificTopology();
1043  int numColumns = topol->ncolumns(); // det module number of cols&rows
1044  int numRows = topol->nrows();
1045  // full detector thickness
1046  float moduleThickness = pixdet->specificSurface().bounds().thickness();
1047  LogDebug("PixelDigitizer") << " PixelDigitizer " << numColumns << " " << numRows << " " << moduleThickness;
1048 #endif
1049 
1050  if (addNoise)
1051  add_noise(pixdet, thePixelThresholdInE / theNoiseInElectrons, engine); // generate noise
1052 
1053  // Do only if needed
1054 
1055  if ((AddPixelInefficiency) && (!theSignal.empty()))
1056  pixel_inefficiency(pixelEfficiencies_, pixdet, tTopo, engine); // Kill some pixels
1057 
1058  if (use_ineff_from_db_ && (!theSignal.empty()))
1059  pixel_inefficiency_db(detID);
1060 
1061  if (use_module_killing_) {
1062  if (use_deadmodule_DB_) { // remove dead modules using DB
1063  module_killing_DB(detID);
1064  } else { // remove dead modules using the list in cfg file
1065  module_killing_conf(detID);
1066  }
1067  }
1068 
1069  make_digis(thePixelThresholdInE, detID, pixdet, digis, simlinks, tTopo);
1070 
1071 #ifdef TP_DEBUG
1072  LogDebug("PixelDigitizer") << "[SiPixelDigitizerAlgorithm] converted " << digis.size() << " PixelDigis in DetUnit"
1073  << detID;
1074 #endif
1075 }

References _signal, add_noise(), addNoise, AddPixelInefficiency, addThresholdSmearing, Surface::bounds(), Exception, GeomDet::geographicalId(), GeomDetType::isBarrel(), GeomDetType::isTrackerPixel(), TrackerTopology::layer(), LogDebug, make_digis(), module_killing_conf(), module_killing_DB(), PixelTopology::ncolumns(), PixelTopology::nrows(), GeomDetEnumerators::P1PXB, pixel_inefficiency(), pixel_inefficiency_db(), GeomDetEnumerators::PixelBarrel, pixelEfficiencies_, DetId::rawId(), GeomDet::specificSurface(), PixelGeomDetUnit::specificTopology(), GeomDet::subDetector(), theNoiseInElectrons, theThresholdInE_BPix, theThresholdInE_BPix_L1, theThresholdInE_BPix_L2, theThresholdInE_FPix, theThresholdSmearing_BPix, theThresholdSmearing_BPix_L1, theThresholdSmearing_BPix_L2, theThresholdSmearing_FPix, Bounds::thickness(), PixelGeomDetUnit::type(), use_deadmodule_DB_, use_ineff_from_db_, and use_module_killing_.

Referenced by PreMixingSiPixelWorker::put().

◆ drift()

void SiPixelDigitizerAlgorithm::drift ( const PSimHit hit,
const PixelGeomDetUnit pixdet,
const GlobalVector bfield,
const TrackerTopology tTopo,
const std::vector< EnergyDepositUnit > &  ionization_points,
std::vector< SignalPoint > &  collection_points 
) const
private

Definition at line 1212 of file SiPixelDigitizerAlgorithm.cc.

1217  {
1218 #ifdef TP_DEBUG
1219  LogDebug("Pixel Digitizer") << " enter drift ";
1220 #endif
1221 
1222  collection_points.resize(ionization_points.size()); // set size
1223 
1224  LocalVector driftDir = DriftDirection(pixdet, bfield, hit.detUnitId()); // get the charge drift direction
1225  if (driftDir.z() == 0.) {
1226  LogWarning("Magnetic field") << " pxlx: drift in z is zero ";
1227  return;
1228  }
1229 
1230  // tangent of Lorentz angle
1231  //float TanLorenzAngleX = driftDir.x()/driftDir.z();
1232  //float TanLorenzAngleY = 0.; // force to 0, driftDir.y()/driftDir.z();
1233 
1234  float TanLorenzAngleX, TanLorenzAngleY, dir_z, CosLorenzAngleX, CosLorenzAngleY;
1235  if (alpha2Order) {
1236  TanLorenzAngleX = driftDir.x(); // tangen of Lorentz angle
1237  TanLorenzAngleY = driftDir.y();
1238  dir_z = driftDir.z(); // The z drift direction
1239  CosLorenzAngleX = 1. / sqrt(1. + TanLorenzAngleX * TanLorenzAngleX); //cosine
1240  CosLorenzAngleY = 1. / sqrt(1. + TanLorenzAngleY * TanLorenzAngleY); //cosine;
1241 
1242  } else {
1243  TanLorenzAngleX = driftDir.x();
1244  TanLorenzAngleY = 0.; // force to 0, driftDir.y()/driftDir.z();
1245  dir_z = driftDir.z(); // The z drift direction
1246  CosLorenzAngleX = 1. / sqrt(1. + TanLorenzAngleX * TanLorenzAngleX); //cosine to estimate the path length
1247  CosLorenzAngleY = 1.;
1248  }
1249 
1250  float moduleThickness = pixdet->specificSurface().bounds().thickness();
1251 #ifdef TP_DEBUG
1252  LogDebug("Pixel Digitizer") << " Lorentz Tan " << TanLorenzAngleX << " " << TanLorenzAngleY << " " << CosLorenzAngleX
1253  << " " << CosLorenzAngleY << " " << moduleThickness * TanLorenzAngleX << " " << driftDir;
1254 #endif
1255 
1256  float Sigma_x = 1.; // Charge spread
1257  float Sigma_y = 1.;
1258  float DriftDistance; // Distance between charge generation and collection
1259  float DriftLength; // Actual Drift Lentgh
1260  float Sigma;
1261 
1262  for (unsigned int i = 0; i != ionization_points.size(); i++) {
1263  float SegX, SegY, SegZ; // position
1264  SegX = ionization_points[i].x();
1265  SegY = ionization_points[i].y();
1266  SegZ = ionization_points[i].z();
1267 
1268  // Distance from the collection plane
1269  //DriftDistance = (moduleThickness/2. + SegZ); // Drift to -z
1270  // Include explixitely the E drift direction (for CMS dir_z=-1)
1271  DriftDistance = moduleThickness / 2. - (dir_z * SegZ); // Drift to -z
1272 
1273  //if( DriftDistance <= 0.)
1274  //cout<<" <=0 "<<DriftDistance<<" "<<i<<" "<<SegZ<<" "<<dir_z<<" "
1275  // <<SegX<<" "<<SegY<<" "<<(moduleThickness/2)<<" "
1276  // <<ionization_points[i].energy()<<" "
1277  // <<hit.particleType()<<" "<<hit.pabs()<<" "<<hit.energyLoss()<<" "
1278  // <<hit.entryPoint()<<" "<<hit.exitPoint()
1279  // <<std::endl;
1280 
1281  if (DriftDistance < 0.) {
1282  DriftDistance = 0.;
1283  } else if (DriftDistance > moduleThickness)
1284  DriftDistance = moduleThickness;
1285 
1286  // Assume full depletion now, partial depletion will come later.
1287  float XDriftDueToMagField = DriftDistance * TanLorenzAngleX;
1288  float YDriftDueToMagField = DriftDistance * TanLorenzAngleY;
1289 
1290  // Shift cloud center
1291  float CloudCenterX = SegX + XDriftDueToMagField;
1292  float CloudCenterY = SegY + YDriftDueToMagField;
1293 
1294  // Calculate how long is the charge drift path
1295  DriftLength = sqrt(DriftDistance * DriftDistance + XDriftDueToMagField * XDriftDueToMagField +
1296  YDriftDueToMagField * YDriftDueToMagField);
1297 
1298  // What is the charge diffusion after this path
1299  Sigma = sqrt(DriftLength / Dist300) * Sigma0;
1300 
1301  // Project the diffusion sigma on the collection plane
1302  Sigma_x = Sigma / CosLorenzAngleX;
1303  Sigma_y = Sigma / CosLorenzAngleY;
1304 
1305  // Insert a charge loss due to Rad Damage here
1306  float energyOnCollector = ionization_points[i].energy(); // The energy that reaches the collector
1307 
1308  // add pixel aging
1309  if (AddPixelAging) {
1310  float kValue = pixel_aging(pixelAging_, pixdet, tTopo);
1311  energyOnCollector *= exp(-1 * kValue * DriftDistance / moduleThickness);
1312  }
1313 
1314 #ifdef TP_DEBUG
1315  LogDebug("Pixel Digitizer") << " Dift DistanceZ= " << DriftDistance << " module thickness= " << moduleThickness
1316  << " Start Energy= " << ionization_points[i].energy()
1317  << " Energy after loss= " << energyOnCollector;
1318 #endif
1319  SignalPoint sp(CloudCenterX, CloudCenterY, Sigma_x, Sigma_y, hit.tof(), energyOnCollector);
1320 
1321  // Load the Charge distribution parameters
1322  collection_points[i] = (sp);
1323 
1324  } // loop over ionization points, i.
1325 
1326 } // end drift

References AddPixelAging, alpha2Order, Surface::bounds(), Dist300, DriftDirection(), JetChargeProducer_cfi::exp, mps_fire::i, LogDebug, pixel_aging(), pixelAging_, Sigma0, GeomDet::specificSurface(), mathSSE::sqrt(), Bounds::thickness(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by accumulateSimHits().

◆ DriftDirection()

LocalVector SiPixelDigitizerAlgorithm::DriftDirection ( const PixelGeomDetUnit pixdet,
const GlobalVector bfield,
const DetId detId 
) const
private

Definition at line 2110 of file SiPixelDigitizerAlgorithm.cc.

2112  {
2113  Frame detFrame(pixdet->surface().position(), pixdet->surface().rotation());
2114  LocalVector Bfield = detFrame.toLocal(bfield);
2115 
2116  float alpha2_FPix;
2117  float alpha2_BPix;
2118  float alpha2;
2119 
2120  //float dir_x = -tanLorentzAnglePerTesla * Bfield.y();
2121  //float dir_y = +tanLorentzAnglePerTesla * Bfield.x();
2122  //float dir_z = -1.; // E field always in z direction, so electrons go to -z
2123  // The dir_z has to be +/- 1. !
2124  // LocalVector theDriftDirection = LocalVector(dir_x,dir_y,dir_z);
2125 
2126  float dir_x = 0.0f;
2127  float dir_y = 0.0f;
2128  float dir_z = 0.0f;
2129  float scale = 0.0f;
2130 
2131  uint32_t detID = pixdet->geographicalId().rawId();
2132 
2133  // Read Lorentz angle from cfg file:**************************************************************
2134 
2135  if (!use_LorentzAngle_DB_) {
2136  if (alpha2Order) {
2139  } else {
2140  alpha2_FPix = 0.0f;
2141  alpha2_BPix = 0.0f;
2142  }
2143 
2144  if (pixdet->type().isTrackerPixel() && pixdet->type().isBarrel()) { // barrel layers
2145  dir_x = -(tanLorentzAnglePerTesla_BPix * Bfield.y() + alpha2_BPix * Bfield.z() * Bfield.x());
2146  dir_y = +(tanLorentzAnglePerTesla_BPix * Bfield.x() - alpha2_BPix * Bfield.z() * Bfield.y());
2147  dir_z = -(1 + alpha2_BPix * Bfield.z() * Bfield.z());
2148  scale = -dir_z;
2149  } else if (pixdet->type().isTrackerPixel()) { // forward disks
2150  dir_x = -(tanLorentzAnglePerTesla_FPix * Bfield.y() + alpha2_FPix * Bfield.z() * Bfield.x());
2151  dir_y = +(tanLorentzAnglePerTesla_FPix * Bfield.x() - alpha2_FPix * Bfield.z() * Bfield.y());
2152  dir_z = -(1 + alpha2_FPix * Bfield.z() * Bfield.z());
2153  scale = -dir_z;
2154  } else {
2155  throw cms::Exception("NotAPixelGeomDetUnit") << "Not a pixel geomdet unit" << detID;
2156  }
2157  } // end: Read LA from cfg file.
2158 
2159  //Read Lorentz angle from DB:********************************************************************
2160  if (use_LorentzAngle_DB_) {
2161  float lorentzAngle = SiPixelLorentzAngle_->getLorentzAngle(detId);
2162  alpha2 = lorentzAngle * lorentzAngle;
2163  //std::cout << "detID is: "<< it->first <<"The LA per tesla is: "<< it->second << std::std::endl;
2164  dir_x = -(lorentzAngle * Bfield.y() + alpha2 * Bfield.z() * Bfield.x());
2165  dir_y = +(lorentzAngle * Bfield.x() - alpha2 * Bfield.z() * Bfield.y());
2166  dir_z = -(1 + alpha2 * Bfield.z() * Bfield.z());
2167  scale = -dir_z;
2168  } // end: Read LA from DataBase.
2169 
2170  LocalVector theDriftDirection = LocalVector(dir_x / scale, dir_y / scale, dir_z / scale);
2171 
2172 #ifdef TP_DEBUG
2173  LogDebug("Pixel Digitizer") << " The drift direction in local coordinate is " << theDriftDirection;
2174 #endif
2175 
2176  return theDriftDirection;
2177 }

References alpha2Order, Exception, GeomDet::geographicalId(), SiPixelLorentzAngle::getLorentzAngle(), GeomDetType::isBarrel(), GeomDetType::isTrackerPixel(), LogDebug, GloballyPositioned< T >::position(), DetId::rawId(), GloballyPositioned< T >::rotation(), L1EGammaCrystalsEmulatorProducer_cfi::scale, SiPixelLorentzAngle_, GeomDet::surface(), tanLorentzAnglePerTesla_BPix, tanLorentzAnglePerTesla_FPix, PixelGeomDetUnit::type(), and use_LorentzAngle_DB_.

Referenced by drift().

◆ fluctuateEloss()

void SiPixelDigitizerAlgorithm::fluctuateEloss ( int  particleId,
float  momentum,
float  eloss,
float  length,
int  NumberOfSegments,
float  elossVector[],
CLHEP::HepRandomEngine *  engine 
) const
private

Definition at line 1146 of file SiPixelDigitizerAlgorithm.cc.

1152  {
1153  // Get dedx for this track
1154  //float dedx;
1155  //if( length > 0.) dedx = eloss/length;
1156  //else dedx = eloss;
1157 
1158  double particleMass = 139.6; // Mass in MeV, Assume pion
1159  pid = std::abs(pid);
1160  if (pid != 211) { // Mass in MeV
1161  if (pid == 11)
1162  particleMass = 0.511;
1163  else if (pid == 13)
1164  particleMass = 105.7;
1165  else if (pid == 321)
1166  particleMass = 493.7;
1167  else if (pid == 2212)
1168  particleMass = 938.3;
1169  }
1170  // What is the track segment length.
1171  float segmentLength = length / NumberOfSegs;
1172 
1173  // Generate charge fluctuations.
1174  float de = 0.;
1175  float sum = 0.;
1176  double segmentEloss = (1000. * eloss) / NumberOfSegs; //eloss in MeV
1177  for (int i = 0; i < NumberOfSegs; i++) {
1178  // material,*, momentum,energy,*, *, mass
1179  //myglandz_(14.,segmentLength,2.,2.,dedx,de,0.14);
1180  // The G4 routine needs momentum in MeV, mass in Mev, delta-cut in MeV,
1181  // track segment length in mm, segment eloss in MeV
1182  // Returns fluctuated eloss in MeV
1183  double deltaCutoff = tMax; // the cutoff is sometimes redefined inside, so fix it.
1184  de = fluctuate->SampleFluctuations(double(particleMomentum * 1000.),
1185  particleMass,
1186  deltaCutoff,
1187  double(segmentLength * 10.),
1188  segmentEloss,
1189  engine) /
1190  1000.; //convert to GeV
1191  elossVector[i] = de;
1192  sum += de;
1193  }
1194 
1195  if (sum > 0.) { // If fluctuations give eloss>0.
1196  // Rescale to the same total eloss
1197  float ratio = eloss / sum;
1198 
1199  for (int ii = 0; ii < NumberOfSegs; ii++)
1200  elossVector[ii] = ratio * elossVector[ii];
1201  } else { // If fluctuations gives 0 eloss
1202  float averageEloss = eloss / NumberOfSegs;
1203  for (int ii = 0; ii < NumberOfSegs; ii++)
1204  elossVector[ii] = averageEloss;
1205  }
1206  return;
1207 }

References funct::abs(), fluctuate, mps_fire::i, cuy::ii, particleFlowDisplacedVertex_cfi::ratio, and tMax.

Referenced by primary_ionization().

◆ induce_signal()

void SiPixelDigitizerAlgorithm::induce_signal ( std::vector< PSimHit >::const_iterator  inputBegin,
std::vector< PSimHit >::const_iterator  inputEnd,
const PSimHit hit,
const size_t  hitIndex,
const unsigned int  tofBin,
const PixelGeomDetUnit pixdet,
const std::vector< SignalPoint > &  collection_points 
)
private

Definition at line 1330 of file SiPixelDigitizerAlgorithm.cc.

1336  {
1337  // X - Rows, Left-Right, 160, (1.6cm) for barrel
1338  // Y - Columns, Down-Up, 416, (6.4cm)
1339 
1340  const PixelTopology* topol = &pixdet->specificTopology();
1341  uint32_t detID = pixdet->geographicalId().rawId();
1342  signal_map_type& theSignal = _signal[detID];
1343 
1344 #ifdef TP_DEBUG
1345  LogDebug("Pixel Digitizer") << " enter induce_signal, " << topol->pitch().first << " " << topol->pitch().second; //OK
1346 #endif
1347 
1348  // local map to store pixels hit by 1 Hit.
1349  typedef std::map<int, float, std::less<int> > hit_map_type;
1350  hit_map_type hit_signal;
1351 
1352  // map to store pixel integrals in the x and in the y directions
1353  std::map<int, float, std::less<int> > x, y;
1354 
1355  // Assign signals to readout channels and store sorted by channel number
1356 
1357  // Iterate over collection points on the collection plane
1358  for (std::vector<SignalPoint>::const_iterator i = collection_points.begin(); i != collection_points.end(); ++i) {
1359  float CloudCenterX = i->position().x(); // Charge position in x
1360  float CloudCenterY = i->position().y(); // in y
1361  float SigmaX = i->sigma_x(); // Charge spread in x
1362  float SigmaY = i->sigma_y(); // in y
1363  float Charge = i->amplitude(); // Charge amplitude
1364 
1365  //if(SigmaX==0 || SigmaY==0) {
1366  //cout<<SigmaX<<" "<<SigmaY
1367  // << " cloud " << i->position().x() << " " << i->position().y() << " "
1368  // << i->sigma_x() << " " << i->sigma_y() << " " << i->amplitude()<<std::endl;
1369  //}
1370 
1371 #ifdef TP_DEBUG
1372  LogDebug("Pixel Digitizer") << " cloud " << i->position().x() << " " << i->position().y() << " " << i->sigma_x()
1373  << " " << i->sigma_y() << " " << i->amplitude();
1374 #endif
1375 
1376  // Find the maximum cloud spread in 2D plane , assume 3*sigma
1377  float CloudRight = CloudCenterX + ClusterWidth * SigmaX;
1378  float CloudLeft = CloudCenterX - ClusterWidth * SigmaX;
1379  float CloudUp = CloudCenterY + ClusterWidth * SigmaY;
1380  float CloudDown = CloudCenterY - ClusterWidth * SigmaY;
1381 
1382  // Define 2D cloud limit points
1383  LocalPoint PointRightUp = LocalPoint(CloudRight, CloudUp);
1384  LocalPoint PointLeftDown = LocalPoint(CloudLeft, CloudDown);
1385 
1386  // This points can be located outside the sensor area.
1387  // The conversion to measurement point does not check for that
1388  // so the returned pixel index might be wrong (outside range).
1389  // We rely on the limits check below to fix this.
1390  // But remember whatever we do here THE CHARGE OUTSIDE THE ACTIVE
1391  // PIXEL AREA IS LOST, it should not be collected.
1392 
1393  // Convert the 2D points to pixel indices
1394  MeasurementPoint mp = topol->measurementPosition(PointRightUp); //OK
1395 
1396  int IPixRightUpX = int(floor(mp.x()));
1397  int IPixRightUpY = int(floor(mp.y()));
1398 
1399 #ifdef TP_DEBUG
1400  LogDebug("Pixel Digitizer") << " right-up " << PointRightUp << " " << mp.x() << " " << mp.y() << " " << IPixRightUpX
1401  << " " << IPixRightUpY;
1402 #endif
1403 
1404  mp = topol->measurementPosition(PointLeftDown); //OK
1405 
1406  int IPixLeftDownX = int(floor(mp.x()));
1407  int IPixLeftDownY = int(floor(mp.y()));
1408 
1409 #ifdef TP_DEBUG
1410  LogDebug("Pixel Digitizer") << " left-down " << PointLeftDown << " " << mp.x() << " " << mp.y() << " "
1411  << IPixLeftDownX << " " << IPixLeftDownY;
1412 #endif
1413 
1414  // Check detector limits to correct for pixels outside range.
1415  int numColumns = topol->ncolumns(); // det module number of cols&rows
1416  int numRows = topol->nrows();
1417 
1418  IPixRightUpX = numRows > IPixRightUpX ? IPixRightUpX : numRows - 1;
1419  IPixRightUpY = numColumns > IPixRightUpY ? IPixRightUpY : numColumns - 1;
1420  IPixLeftDownX = 0 < IPixLeftDownX ? IPixLeftDownX : 0;
1421  IPixLeftDownY = 0 < IPixLeftDownY ? IPixLeftDownY : 0;
1422 
1423  x.clear(); // clear temporary integration array
1424  y.clear();
1425 
1426  // First integrate charge strips in x
1427  int ix; // TT for compatibility
1428  for (ix = IPixLeftDownX; ix <= IPixRightUpX; ix++) { // loop over x index
1429  float xUB, xLB, UpperBound, LowerBound;
1430 
1431  // Why is set to 0 if ix=0, does it meen that we accept charge
1432  // outside the sensor? CHeck How it was done in ORCA?
1433  //if(ix == 0) LowerBound = 0.;
1434  if (ix == 0 || SigmaX == 0.) // skip for surface segemnts
1435  LowerBound = 0.;
1436  else {
1437  mp = MeasurementPoint(float(ix), 0.0);
1438  xLB = topol->localPosition(mp).x();
1439  LowerBound = 1 - calcQ((xLB - CloudCenterX) / SigmaX);
1440  }
1441 
1442  if (ix == numRows - 1 || SigmaX == 0.)
1443  UpperBound = 1.;
1444  else {
1445  mp = MeasurementPoint(float(ix + 1), 0.0);
1446  xUB = topol->localPosition(mp).x();
1447  UpperBound = 1. - calcQ((xUB - CloudCenterX) / SigmaX);
1448  }
1449 
1450  float TotalIntegrationRange = UpperBound - LowerBound; // get strip
1451  x[ix] = TotalIntegrationRange; // save strip integral
1452  //if(SigmaX==0 || SigmaY==0)
1453  //cout<<TotalIntegrationRange<<" "<<ix<<std::endl;
1454  }
1455 
1456  // Now integrate strips in y
1457  int iy; // TT for compatibility
1458  for (iy = IPixLeftDownY; iy <= IPixRightUpY; iy++) { //loope over y ind
1459  float yUB, yLB, UpperBound, LowerBound;
1460 
1461  if (iy == 0 || SigmaY == 0.)
1462  LowerBound = 0.;
1463  else {
1464  mp = MeasurementPoint(0.0, float(iy));
1465  yLB = topol->localPosition(mp).y();
1466  LowerBound = 1. - calcQ((yLB - CloudCenterY) / SigmaY);
1467  }
1468 
1469  if (iy == numColumns - 1 || SigmaY == 0.)
1470  UpperBound = 1.;
1471  else {
1472  mp = MeasurementPoint(0.0, float(iy + 1));
1473  yUB = topol->localPosition(mp).y();
1474  UpperBound = 1. - calcQ((yUB - CloudCenterY) / SigmaY);
1475  }
1476 
1477  float TotalIntegrationRange = UpperBound - LowerBound;
1478  y[iy] = TotalIntegrationRange; // save strip integral
1479  //if(SigmaX==0 || SigmaY==0)
1480  //cout<<TotalIntegrationRange<<" "<<iy<<std::endl;
1481  }
1482 
1483  // Get the 2D charge integrals by folding x and y strips
1484  int chan;
1485  for (ix = IPixLeftDownX; ix <= IPixRightUpX; ix++) { // loop over x index
1486  for (iy = IPixLeftDownY; iy <= IPixRightUpY; iy++) { //loope over y ind
1487 
1488  float ChargeFraction = Charge * x[ix] * y[iy];
1489 
1490  if (ChargeFraction > 0.) {
1491  chan = PixelDigi::pixelToChannel(ix, iy); // Get index
1492  // Load the amplitude
1493  hit_signal[chan] += ChargeFraction;
1494  } // endif
1495 
1496 #ifdef TP_DEBUG
1497  mp = MeasurementPoint(float(ix), float(iy));
1498  LocalPoint lp = topol->localPosition(mp);
1499  chan = topol->channel(lp);
1500  LogDebug("Pixel Digitizer") << " pixel " << ix << " " << iy << " - "
1501  << " " << chan << " " << ChargeFraction << " " << mp.x() << " " << mp.y() << " "
1502  << lp.x() << " " << lp.y() << " " // givex edge position
1503  << chan; // edge belongs to previous ?
1504 #endif
1505 
1506  } // endfor iy
1507  } //endfor ix
1508 
1509  } // loop over charge distributions
1510 
1511  // Fill the global map with all hit pixels from this event
1512 
1513  bool reweighted = false;
1514  if (UseReweighting) {
1515  if (hit.processType() == 0) {
1516  reweighted = TheNewSiPixelChargeReweightingAlgorithmClass->hitSignalReweight(
1517  hit, hit_signal, hitIndex, tofBin, topol, detID, theSignal, hit.processType(), makeDigiSimLinks_);
1518  } else {
1519  // If it's not the primary particle, use the first hit in the collection as SimHit, which should be the corresponding primary.
1520  reweighted = TheNewSiPixelChargeReweightingAlgorithmClass->hitSignalReweight(
1521  (*inputBegin), hit_signal, hitIndex, tofBin, topol, detID, theSignal, hit.processType(), makeDigiSimLinks_);
1522  }
1523  }
1524  if (!reweighted) {
1525  for (hit_map_type::const_iterator im = hit_signal.begin(); im != hit_signal.end(); ++im) {
1526  int chan = (*im).first;
1527  theSignal[chan] += (makeDigiSimLinks_ ? Amplitude((*im).second, &hit, hitIndex, tofBin, (*im).second)
1528  : Amplitude((*im).second, (*im).second));
1529 
1530 #ifdef TP_DEBUG
1531  std::pair<int, int> ip = PixelDigi::channelToPixel(chan);
1532  LogDebug("Pixel Digitizer") << " pixel " << ip.first << " " << ip.second << " " << theSignal[chan];
1533 #endif
1534  }
1535  }
1536 
1537 } // end induce_signal

References _signal, LaserClient_cfi::Amplitude, calcQ(), officialStyle::chan, Topology::channel(), PixelDigi::channelToPixel(), PixelTestBeamValidation_cfi::Charge, ClusterWidth, GeomDet::geographicalId(), mps_fire::i, createfilelist::int, Topology::localPosition(), LogDebug, makeDigiSimLinks_, Topology::measurementPosition(), PixelTopology::ncolumns(), PixelTopology::nrows(), PixelTopology::pitch(), PixelDigi::pixelToChannel(), DetId::rawId(), VtxSmearedParameters_cfi::SigmaX, VtxSmearedParameters_cfi::SigmaY, PixelGeomDetUnit::specificTopology(), TheNewSiPixelChargeReweightingAlgorithmClass, UseReweighting, x, PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::x(), y, PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by accumulateSimHits().

◆ init()

void SiPixelDigitizerAlgorithm::init ( const edm::EventSetup es)

Definition at line 116 of file SiPixelDigitizerAlgorithm.cc.

116  {
117  if (use_ineff_from_db_) { // load gain calibration service fromdb...
118  theSiPixelGainCalibrationService_->setESObjects(es);
119  }
120  if (use_deadmodule_DB_) {
122  }
123  if (use_LorentzAngle_DB_) {
124  // Get Lorentz angle from DB record
126  }
127  //gets the map and geometry from the DB (to kill ROCs)
130 
131  if (KillBadFEDChannels) {
135 
137  std::vector<std::string> allScenarios;
138 
139  std::transform(quality_map->begin(),
140  quality_map->end(),
141  std::back_inserter(allScenarios),
142  [](const PixelFEDChannelCollectionMap::value_type& pair) { return pair.first; });
143 
144  std::vector<std::string> allScenariosInProb;
145 
146  for (auto it = m_probabilities.begin(); it != m_probabilities.end(); ++it) {
147  //int PUbin = it->first;
148  for (const auto& entry : it->second) {
149  auto scenario = entry.first;
150  auto probability = entry.second;
151  if (probability != 0) {
152  if (std::find(allScenariosInProb.begin(), allScenariosInProb.end(), scenario) == allScenariosInProb.end()) {
153  allScenariosInProb.push_back(scenario);
154  }
155  } // if prob!=0
156  } // loop on the scenarios for that PU bin
157  } // loop on PU bins
158 
159  std::vector<std::string> notFound;
160  std::copy_if(allScenariosInProb.begin(),
161  allScenariosInProb.end(),
162  std::back_inserter(notFound),
163  [&allScenarios](const std::string& arg) {
164  return (std::find(allScenarios.begin(), allScenarios.end(), arg) == allScenarios.end());
165  });
166 
167  if (!notFound.empty()) {
168  for (const auto& entry : notFound) {
169  edm::LogError("SiPixelFEDChannelContainer")
170  << "The requested scenario: " << entry << " is not found in the map!!" << std::endl;
171  }
172  throw cms::Exception("SiPixelDigitizerAlgorithm") << "Found: " << notFound.size()
173  << " missing scenario(s) in SiPixelStatusScenariosRcd while "
174  "present in SiPixelStatusScenarioProbabilityRcd \n";
175  }
176  }
177 
179 }

References mps_splice::entry, Exception, spr::find(), edm::EventSetup::get(), edm::get(), SiPixelSimParameters_cfi::KillBadFEDChannels, notFound, HLT_FULL_cff::siPixelQualityLabel, AlCaHLTBitMon_QueryRunRegistry::string, and HcalDetIdTransform::transform().

Referenced by PreMixingSiPixelWorker::initializeEvent().

◆ init_DynIneffDB()

void SiPixelDigitizerAlgorithm::init_DynIneffDB ( const edm::EventSetup es,
const unsigned int &  bunchspace 
)

◆ initCal()

std::map< int, SiPixelDigitizerAlgorithm::CalParameters, std::less< int > > SiPixelDigitizerAlgorithm::initCal ( ) const
private

Definition at line 340 of file SiPixelDigitizerAlgorithm.cc.

340  {
341  using std::cerr;
342  using std::cout;
343  using std::endl;
344 
345  std::map<int, SiPixelDigitizerAlgorithm::CalParameters, std::less<int> > calmap;
346  // Prepare for the analog amplitude miss-calibration
347  LogDebug("PixelDigitizer ") << " miss-calibrate the pixel amplitude ";
348 
349  const bool ReadCalParameters = false;
350  if (ReadCalParameters) { // Read the calibration files from file
351  // read the calibration constants from a file (testing only)
352  std::ifstream in_file; // data file pointer
353  char filename[80] = "phCalibrationFit_C0.dat";
354 
355  in_file.open(filename, std::ios::in); // in C++
356  if (in_file.bad()) {
357  cout << " File not found " << endl;
358  return calmap; // signal error
359  }
360  cout << " file opened : " << filename << endl;
361 
362  char line[500];
363  for (int i = 0; i < 3; i++) {
364  in_file.getline(line, 500, '\n');
365  cout << line << endl;
366  }
367 
368  cout << " test map" << endl;
369 
370  float par0, par1, par2, par3;
371  int colid, rowid;
373  // Read MC tracks
374  for (int i = 0; i < (52 * 80); i++) { // loop over tracks
375  in_file >> par0 >> par1 >> par2 >> par3 >> name >> colid >> rowid;
376  if (in_file.bad()) { // check for errors
377  cerr << "Cannot read data file" << endl;
378  return calmap;
379  }
380  if (in_file.eof() != 0) {
381  cerr << in_file.eof() << " " << in_file.gcount() << " " << in_file.fail() << " " << in_file.good()
382  << " end of file " << endl;
383  return calmap;
384  }
385 
386  //cout << " line " << i << " " <<par0<<" "<<par1<<" "<<par2<<" "<<par3<<" "
387  // <<colid<<" "<<rowid<<endl;
388 
389  CalParameters onePix;
390  onePix.p0 = par0;
391  onePix.p1 = par1;
392  onePix.p2 = par2;
393  onePix.p3 = par3;
394 
395  // Convert ROC pixel index to channel
396  int chan = PixelIndices::pixelToChannelROC(rowid, colid);
397  calmap.insert(std::pair<int, CalParameters>(chan, onePix));
398 
399  // Testing the index conversion, can be skipped
400  std::pair<int, int> p = PixelIndices::channelToPixelROC(chan);
401  if (rowid != p.first)
402  cout << " wrong channel row " << rowid << " " << p.first << endl;
403  if (colid != p.second)
404  cout << " wrong channel col " << colid << " " << p.second << endl;
405 
406  } // pixel loop in a ROC
407 
408  cout << " map size " << calmap.size() << " max " << calmap.max_size() << " " << calmap.empty() << endl;
409 
410  // cout << " map size " << calmap.size() << endl;
411  // map<int,CalParameters,std::less<int> >::iterator ix,it;
412  // map<int,CalParameters,std::less<int> >::const_iterator ip;
413  // for (ix = calmap.begin(); ix != calmap.end(); ++ix) {
414  // int i = (*ix).first;
415  // std::pair<int,int> p = channelToPixelROC(i);
416  // it = calmap.find(i);
417  // CalParameters y = (*it).second;
418  // CalParameters z = (*ix).second;
419  // cout << i <<" "<<p.first<<" "<<p.second<<" "<<y.p0<<" "<<z.p0<<" "<<calmap[i].p0<<endl;
420 
421  // //int dummy=0;
422  // //cin>>dummy;
423  // }
424 
425  } // end if readparameters
426  return calmap;
427 } // end initCal()

References calmap, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, officialStyle::chan, PixelIndices::channelToPixelROC(), gather_cfg::cout, corrVsCorr::filename, mps_fire::i, recoMuon::in, runGCPTkAlMap::in_file, mps_splice::line, LogDebug, Skims_PA_cff::name, AlCaHLTBitMon_ParallelJobs::p, SiPixelDigitizerAlgorithm::CalParameters::p0, SiPixelDigitizerAlgorithm::CalParameters::p1, SiPixelDigitizerAlgorithm::CalParameters::p2, SiPixelDigitizerAlgorithm::CalParameters::p3, fitWZ::par0, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, pfMETCorrectionType0_cfi::par3, PixelIndices::pixelToChannelROC(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ initializeEvent()

void SiPixelDigitizerAlgorithm::initializeEvent ( )
inline

Definition at line 63 of file SiPixelDigitizerAlgorithm.h.

63 { _signal.clear(); }

References _signal.

Referenced by PreMixingSiPixelWorker::initializeEvent().

◆ killBadFEDChannels()

bool SiPixelDigitizerAlgorithm::killBadFEDChannels ( ) const

Definition at line 877 of file SiPixelDigitizerAlgorithm.cc.

877 { return KillBadFEDChannels; }

References KillBadFEDChannels.

Referenced by PreMixingSiPixelWorker::put().

◆ make_digis()

void SiPixelDigitizerAlgorithm::make_digis ( float  thePixelThresholdInE,
uint32_t  detID,
const PixelGeomDetUnit pixdet,
std::vector< PixelDigi > &  digis,
std::vector< PixelDigiSimLink > &  simlinks,
const TrackerTopology tTopo 
) const
private

Definition at line 1542 of file SiPixelDigitizerAlgorithm.cc.

1547  {
1548 #ifdef TP_DEBUG
1549  LogDebug("Pixel Digitizer") << " make digis "
1550  << " "
1551  << " pixel threshold FPix" << theThresholdInE_FPix << " "
1552  << " pixel threshold BPix" << theThresholdInE_BPix << " "
1553  << " pixel threshold BPix Layer1" << theThresholdInE_BPix_L1 << " "
1554  << " pixel threshold BPix Layer2" << theThresholdInE_BPix_L2 << " "
1555  << " List pixels passing threshold ";
1556 #endif
1557 
1558  // Loop over hit pixels
1559 
1560  signalMaps::const_iterator it = _signal.find(detID);
1561  if (it == _signal.end()) {
1562  return;
1563  }
1564 
1565  const signal_map_type& theSignal = (*it).second;
1566 
1567  // unsigned long is enough to store SimTrack id and EncodedEventId
1568  using TrackEventId = std::pair<decltype(SimTrack().trackId()), decltype(EncodedEventId().rawId())>;
1569  std::map<TrackEventId, float> simi; // re-used
1570 
1571  for (signal_map_const_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
1572  float signalInElectrons = (*i).second; // signal in electrons
1573 
1574  // Do the miss calibration for calibration studies only.
1575  //if(doMissCalibrate) signalInElectrons = missCalibrate(signalInElectrons)
1576 
1577  // Do only for pixels above threshold
1578 
1579  if (signalInElectrons >= thePixelThresholdInE &&
1580  signalInElectrons > 0.) { // check threshold, always reject killed (0-charge) digis
1581 
1582  int chan = (*i).first; // channel number
1583  std::pair<int, int> ip = PixelDigi::channelToPixel(chan);
1584  int adc = 0; // ADC count as integer
1585 
1586  // Do the miss calibration for calibration studies only.
1587  if (doMissCalibrate) {
1588  int row = ip.first; // X in row
1589  int col = ip.second; // Y is in col
1590  adc = int(missCalibrate(detID, tTopo, pixdet, col, row, signalInElectrons)); //full misscalib.
1591  } else { // Just do a simple electron->adc conversion
1592  adc = int(signalInElectrons / theElectronPerADC); // calibrate gain
1593  }
1594  adc = std::min(adc, theAdcFullScale); // Check maximum value
1595 #ifdef TP_DEBUG
1596  LogDebug("Pixel Digitizer") << (*i).first << " " << (*i).second << " " << signalInElectrons << " " << adc
1597  << ip.first << " " << ip.second;
1598 #endif
1599 
1600  // Load digis
1601  digis.emplace_back(ip.first, ip.second, adc);
1602 
1603  if (makeDigiSimLinks_ && !(*i).second.hitInfos().empty()) {
1604  //digilink
1605  unsigned int il = 0;
1606  for (const auto& info : (*i).second.hitInfos()) {
1607  // note: according to C++ standard operator[] does
1608  // value-initializiation, which for float means initial value of 0
1609  simi[std::make_pair(info.trackId(), info.eventId().rawId())] += (*i).second.individualampl()[il];
1610  il++;
1611  }
1612 
1613  //sum the contribution of the same trackid
1614  for (const auto& info : (*i).second.hitInfos()) {
1615  // skip if track already processed
1616  auto found = simi.find(std::make_pair(info.trackId(), info.eventId().rawId()));
1617  if (found == simi.end())
1618  continue;
1619 
1620  float sum_samechannel = found->second;
1621  float fraction = sum_samechannel / (*i).second;
1622  if (fraction > 1.f)
1623  fraction = 1.f;
1624 
1625  // Approximation: pick hitIndex and tofBin only from the first SimHit
1626  simlinks.emplace_back((*i).first, info.trackId(), info.hitIndex(), info.tofBin(), info.eventId(), fraction);
1627  simi.erase(found);
1628  }
1629  simi.clear(); // although should be empty already
1630  }
1631  }
1632  }
1633 }

References _signal, ecalLiteDTU::adc(), officialStyle::chan, PixelDigi::channelToPixel(), cuy::col, doMissCalibrate, f, newFWLiteAna::found, HLT_FULL_cff::fraction, mps_fire::i, info(), createfilelist::int, LogDebug, makeDigiSimLinks_, min(), missCalibrate(), mcMuonSeeds_cfi::SimTrack, theAdcFullScale, theElectronPerADC, theThresholdInE_BPix, theThresholdInE_BPix_L1, theThresholdInE_BPix_L2, and theThresholdInE_FPix.

Referenced by digitize().

◆ missCalibrate()

float SiPixelDigitizerAlgorithm::missCalibrate ( uint32_t  detID,
const TrackerTopology tTopo,
const PixelGeomDetUnit pixdet,
int  col,
int  row,
float  amp 
) const
private

Definition at line 2020 of file SiPixelDigitizerAlgorithm.cc.

2025  {
2026  // Central values
2027  //const float p0=0.00352, p1=0.868, p2=112., p3=113.; // pix(0,0,0)
2028  // const float p0=0.00382, p1=0.886, p2=112.7, p3=113.0; // average roc=0
2029  //const float p0=0.00492, p1=1.998, p2=90.6, p3=134.1; // average roc=6
2030  // Smeared (rms)
2031  //const float s0=0.00020, s1=0.051, s2=5.4, s3=4.4; // average roc=0
2032  //const float s0=0.00015, s1=0.043, s2=3.2, s3=3.1; // col average roc=0
2033 
2034  // Make 2 sets of parameters for Fpix and BPIx:
2035 
2036  float p0 = 0.0f;
2037  float p1 = 0.0f;
2038  float p2 = 0.0f;
2039  float p3 = 0.0f;
2040 
2041  if (pixdet->type().isTrackerPixel() && pixdet->type().isBarrel()) { // barrel layers
2042  p0 = BPix_p0;
2043  p1 = BPix_p1;
2044  p2 = BPix_p2;
2045  p3 = BPix_p3;
2046  } else if (pixdet->type().isTrackerPixel()) { // forward disks
2047  p0 = FPix_p0;
2048  p1 = FPix_p1;
2049  p2 = FPix_p2;
2050  p3 = FPix_p3;
2051  } else {
2052  throw cms::Exception("NotAPixelGeomDetUnit") << "Not a pixel geomdet unit" << detID;
2053  }
2054 
2055  float newAmp = 0.f; //Modified signal
2056 
2057  // Convert electrons to VCAL units
2058  float signal = (signalInElectrons - electronsPerVCAL_Offset) / electronsPerVCAL;
2059 
2060  // New gains/offsets are needed for phase1 L1
2061  int layer = 0;
2062  if (DetId(detID).subdetId() == 1)
2063  layer = tTopo->pxbLayer(detID);
2064  if (layer == 1)
2065  signal = (signalInElectrons - electronsPerVCAL_L1_Offset) / electronsPerVCAL_L1;
2066 
2067  // Simulate the analog response with fixed parametrization
2068  newAmp = p3 + p2 * tanh(p0 * signal - p1);
2069 
2070  // Use the pixel-by-pixel calibrations
2071  //transform to ROC index coordinates
2072  //int chipIndex=0, colROC=0, rowROC=0;
2073  //std::unique_ptr<PixelIndices> pIndexConverter(new PixelIndices(numColumns,numRows));
2074  //pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
2075 
2076  // Use calibration from a file
2077  //int chanROC = PixelIndices::pixelToChannelROC(rowROC,colROC); // use ROC coordinates
2078  //float pp0=0, pp1=0,pp2=0,pp3=0;
2079  //map<int,CalParameters,std::less<int> >::const_iterator it=calmap.find(chanROC);
2080  //CalParameters y = (*it).second;
2081  //pp0 = y.p0;
2082  //pp1 = y.p1;
2083  //pp2 = y.p2;
2084  //pp3 = y.p3;
2085 
2086  //
2087  // Use random smearing
2088  // Randomize the pixel response
2089  //float pp0 = RandGaussQ::shoot(p0,s0);
2090  //float pp1 = RandGaussQ::shoot(p1,s1);
2091  //float pp2 = RandGaussQ::shoot(p2,s2);
2092  //float pp3 = RandGaussQ::shoot(p3,s3);
2093 
2094  //newAmp = pp3 + pp2 * tanh(pp0*signal - pp1); // Final signal
2095 
2096  //cout<<" misscalibrate "<<col<<" "<<row<<" "<<chipIndex<<" "<<colROC<<" "
2097  // <<rowROC<<" "<<signalInElectrons<<" "<<signal<<" "<<newAmp<<" "
2098  // <<(signalInElectrons/theElectronPerADC)<<std::endl;
2099 
2100  return newAmp;
2101 }

References BPix_p0, BPix_p1, BPix_p2, BPix_p3, electronsPerVCAL, electronsPerVCAL_L1, electronsPerVCAL_L1_Offset, electronsPerVCAL_Offset, Exception, FPix_p0, FPix_p1, FPix_p2, FPix_p3, GeomDetType::isBarrel(), GeomDetType::isTrackerPixel(), p1, p2, p3, TrackerTopology::pxbLayer(), DetId::subdetId(), and PixelGeomDetUnit::type().

Referenced by make_digis().

◆ module_killing_conf()

void SiPixelDigitizerAlgorithm::module_killing_conf ( uint32_t  detID)
private

Definition at line 2201 of file SiPixelDigitizerAlgorithm.cc.

2201  {
2202  bool isbad = false;
2203 
2204  Parameters::const_iterator itDeadModules = DeadModules.begin();
2205 
2206  int detid = detID;
2207  for (; itDeadModules != DeadModules.end(); ++itDeadModules) {
2208  int Dead_detID = itDeadModules->getParameter<int>("Dead_detID");
2209  if (detid == Dead_detID) {
2210  isbad = true;
2211  break;
2212  }
2213  }
2214 
2215  if (!isbad)
2216  return;
2217 
2218  signal_map_type& theSignal = _signal[detID];
2219 
2220  std::string Module = itDeadModules->getParameter<std::string>("Module");
2221 
2222  if (Module == "whole") {
2223  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
2224  i->second.set(0.); // reset amplitude
2225  }
2226  }
2227 
2228  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
2229  std::pair<int, int> ip = PixelDigi::channelToPixel(i->first); //get pixel pos
2230 
2231  if (Module == "tbmA" && ip.first >= 80 && ip.first <= 159) {
2232  i->second.set(0.);
2233  }
2234 
2235  if (Module == "tbmB" && ip.first <= 79) {
2236  i->second.set(0.);
2237  }
2238  }
2239 }

References _signal, PixelDigi::channelToPixel(), DeadModules, mps_fire::i, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by digitize().

◆ module_killing_DB()

void SiPixelDigitizerAlgorithm::module_killing_DB ( uint32_t  detID)
private

Definition at line 2241 of file SiPixelDigitizerAlgorithm.cc.

2241  {
2242  // Not SLHC safe for now
2243 
2244  bool isbad = false;
2245 
2246  std::vector<SiPixelQuality::disabledModuleType> disabledModules = SiPixelBadModule_->getBadComponentList();
2247 
2249 
2250  for (size_t id = 0; id < disabledModules.size(); id++) {
2251  if (detID == disabledModules[id].DetID) {
2252  isbad = true;
2253  badmodule = disabledModules[id];
2254  break;
2255  }
2256  }
2257 
2258  if (!isbad)
2259  return;
2260 
2261  signal_map_type& theSignal = _signal[detID];
2262 
2263  //std::cout<<"Hit in: "<< detID <<" errorType "<< badmodule.errorType<<" BadRocs="<<std::hex<<SiPixelBadModule_->getBadRocs(detID)<<dec<<" "<<std::endl;
2264  if (badmodule.errorType == 0) { // this is a whole dead module.
2265 
2266  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
2267  i->second.set(0.); // reset amplitude
2268  }
2269  } else { // all other module types: half-modules and single ROCs.
2270  // Get Bad ROC position:
2271  //follow the example of getBadRocPositions in CondFormats/SiPixelObjects/src/SiPixelQuality.cc
2272  std::vector<GlobalPixel> badrocpositions(0);
2273  for (unsigned int j = 0; j < 16; j++) {
2274  if (SiPixelBadModule_->IsRocBad(detID, j) == true) {
2275  std::vector<CablingPathToDetUnit> path = map_.product()->pathToDetUnit(detID);
2276  typedef std::vector<CablingPathToDetUnit>::const_iterator IT;
2277  for (IT it = path.begin(); it != path.end(); ++it) {
2278  const PixelROC* myroc = map_.product()->findItem(*it);
2279  if (myroc->idInDetUnit() == j) {
2280  LocalPixel::RocRowCol local = {39, 25}; //corresponding to center of ROC row, col
2281  GlobalPixel global = myroc->toGlobal(LocalPixel(local));
2282  badrocpositions.push_back(global);
2283  break;
2284  }
2285  }
2286  }
2287  } // end of getBadRocPositions
2288 
2289  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
2290  std::pair<int, int> ip = PixelDigi::channelToPixel(i->first); //get pixel pos
2291 
2292  for (std::vector<GlobalPixel>::const_iterator it = badrocpositions.begin(); it != badrocpositions.end(); ++it) {
2293  if (it->row >= 80 && ip.first >= 80) {
2294  if ((std::abs(ip.second - it->col) < 26)) {
2295  i->second.set(0.);
2296  } else if (it->row == 120 && ip.second - it->col == 26) {
2297  i->second.set(0.);
2298  } else if (it->row == 119 && it->col - ip.second == 26) {
2299  i->second.set(0.);
2300  }
2301  } else if (it->row < 80 && ip.first < 80) {
2302  if ((std::abs(ip.second - it->col) < 26)) {
2303  i->second.set(0.);
2304  } else if (it->row == 40 && ip.second - it->col == 26) {
2305  i->second.set(0.);
2306  } else if (it->row == 39 && it->col - ip.second == 26) {
2307  i->second.set(0.);
2308  }
2309  }
2310  }
2311  }
2312  }
2313 }

References _signal, funct::abs(), PixelDigi::channelToPixel(), SiPixelQuality::disabledModuleType::errorType, SiPixelFedCablingMap::findItem(), SiPixelQuality::getBadComponentList(), mps_fire::i, triggerObjects_cff::id, sipixelobjects::PixelROC::idInDetUnit(), SiPixelQuality::IsRocBad(), dqmiolumiharvest::j, DTRecHitClients_cfi::local, map_, castor_dqm_sourceclient_file_cfg::path, SiPixelFedCablingMap::pathToDetUnit(), edm::ESHandle< T >::product(), SiPixelBadModule_, and sipixelobjects::PixelROC::toGlobal().

Referenced by digitize().

◆ pixel_aging()

float SiPixelDigitizerAlgorithm::pixel_aging ( const PixelAging aging,
const PixelGeomDetUnit pixdet,
const TrackerTopology tTopo 
) const
private

Definition at line 1968 of file SiPixelDigitizerAlgorithm.cc.

1970  {
1971  uint32_t detID = pixdet->geographicalId().rawId();
1972 
1973  // Predefined damage parameter (no aging)
1974  float pseudoRadDamage = 0.0f;
1975 
1976  // setup the chip indices conversion
1978  pixdet->subDetector() == GeomDetEnumerators::SubDetector::P1PXB) { // barrel layers
1979  int layerIndex = tTopo->layer(detID);
1980 
1981  pseudoRadDamage = aging.thePixelPseudoRadDamage[layerIndex - 1];
1982 
1983  // std::cout << "pixel_aging: " << std::endl;
1984  // std::cout << "Subid " << Subid << " layerIndex " << layerIndex << " ladder " << tTopo->pxbLadder(detID) << " module " << tTopo->pxbModule(detID) << std::endl;
1985 
1988  pixdet->subDetector() == GeomDetEnumerators::SubDetector::P2PXEC) { // forward disks
1989  unsigned int diskIndex =
1990  tTopo->layer(detID) + aging.FPixIndex; // Use diskIndex-1 later to stay consistent with BPix
1991 
1992  pseudoRadDamage = aging.thePixelPseudoRadDamage[diskIndex - 1];
1993 
1994  // std::cout << "pixel_aging: " << std::endl;
1995  // std::cout << "Subid " << Subid << " diskIndex " << diskIndex << std::endl;
1996  } else if (pixdet->subDetector() == GeomDetEnumerators::SubDetector::P2OTB ||
1998  // if phase 2 OT hardcoded value as it has always been
1999  pseudoRadDamage = 0.f;
2000  } // if barrel/forward
2001 
2002  // std::cout << " pseudoRadDamage " << pseudoRadDamage << std::endl;
2003  // std::cout << " end pixel_aging " << std::endl;
2004 
2005  return pseudoRadDamage;
2006 #ifdef TP_DEBUG
2007  LogDebug("Pixel Digitizer") << " enter pixel_aging " << pseudoRadDamage;
2008 #endif
2009 }

References GeomDet::geographicalId(), TrackerTopology::layer(), LogDebug, GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, GeomDetEnumerators::P2OTB, GeomDetEnumerators::P2OTEC, GeomDetEnumerators::P2PXEC, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, DetId::rawId(), and GeomDet::subDetector().

Referenced by drift().

◆ pixel_inefficiency()

void SiPixelDigitizerAlgorithm::pixel_inefficiency ( const PixelEfficiencies eff,
const PixelGeomDetUnit pixdet,
const TrackerTopology tTopo,
CLHEP::HepRandomEngine *  engine 
)
private

Definition at line 1741 of file SiPixelDigitizerAlgorithm.cc.

1744  {
1745  uint32_t detID = pixdet->geographicalId().rawId();
1746  signal_map_type& theSignal = _signal[detID];
1747  const PixelTopology* topol = &pixdet->specificTopology();
1748  int numColumns = topol->ncolumns(); // det module number of cols&rows
1749  int numRows = topol->nrows();
1752  // Predefined efficiencies
1753  double pixelEfficiency = 1.0;
1754  double columnEfficiency = 1.0;
1755  double chipEfficiency = 1.0;
1756  std::vector<double> pixelEfficiencyROCStdPixels(16, 1);
1757  std::vector<double> pixelEfficiencyROCBigPixels(16, 1);
1758 
1759  auto pIndexConverter = PixelIndices(numColumns, numRows);
1760 
1761  std::vector<int> badRocsFromFEDChannels(16, 0);
1762  if (eff.PixelFEDChannelCollection_ != nullptr) {
1763  PixelFEDChannelCollection::const_iterator it = eff.PixelFEDChannelCollection_->find(detID);
1764 
1765  if (it != eff.PixelFEDChannelCollection_->end()) {
1766  const std::vector<CablingPathToDetUnit>& path = map_->pathToDetUnit(detID);
1767  for (const auto& ch : *it) {
1768  for (unsigned int i_roc = ch.roc_first; i_roc <= ch.roc_last; ++i_roc) {
1769  for (const auto p : path) {
1770  const PixelROC* myroc = map_.product()->findItem(p);
1771  if (myroc->idInDetUnit() == static_cast<unsigned int>(i_roc)) {
1772  LocalPixel::RocRowCol local = {39, 25}; //corresponding to center of ROC row,col
1773  GlobalPixel global = myroc->toGlobal(LocalPixel(local));
1774  int chipIndex(0), colROC(0), rowROC(0);
1775  pIndexConverter.transformToROC(global.col, global.row, chipIndex, colROC, rowROC);
1776  badRocsFromFEDChannels.at(chipIndex) = 1;
1777  }
1778  }
1779  }
1780  } // loop over channels
1781  } // detID in PixelFEDChannelCollection_
1782  } // has PixelFEDChannelCollection_
1783 
1784  if (eff.FromConfig) {
1785  // setup the chip indices conversion
1787  pixdet->subDetector() == GeomDetEnumerators::SubDetector::P1PXB) { // barrel layers
1788  int layerIndex = tTopo->layer(detID);
1789  pixelEfficiency = eff.thePixelEfficiency[layerIndex - 1];
1790  columnEfficiency = eff.thePixelColEfficiency[layerIndex - 1];
1791  chipEfficiency = eff.thePixelChipEfficiency[layerIndex - 1];
1792  //std::cout <<"Using BPix columnEfficiency = "<<columnEfficiency<< " for layer = "<<layerIndex <<"\n";
1793  // This should never happen, but only check if it is not an upgrade geometry
1794  if (NumberOfBarrelLayers == 3) {
1795  if (numColumns > 416)
1796  LogWarning("Pixel Geometry") << " wrong columns in barrel " << numColumns;
1797  if (numRows > 160)
1798  LogWarning("Pixel Geometry") << " wrong rows in barrel " << numRows;
1799 
1800  int ladder = tTopo->pxbLadder(detID);
1801  int module = tTopo->pxbModule(detID);
1802  if (module <= 4)
1803  module = 5 - module;
1804  else
1805  module -= 4;
1806 
1807  columnEfficiency *= eff.theLadderEfficiency_BPix[layerIndex - 1][ladder - 1] *
1808  eff.theModuleEfficiency_BPix[layerIndex - 1][module - 1] * eff.pu_scale[layerIndex - 1];
1809  }
1812  pixdet->subDetector() == GeomDetEnumerators::SubDetector::P2PXEC) { // forward disks
1813 
1814  unsigned int diskIndex =
1815  tTopo->layer(detID) + eff.FPixIndex; // Use diskIndex-1 later to stay consistent with BPix
1816  unsigned int panelIndex = tTopo->pxfPanel(detID);
1817  unsigned int moduleIndex = tTopo->pxfModule(detID);
1818  //if (eff.FPixIndex>diskIndex-1){throw cms::Exception("Configuration") <<"SiPixelDigitizer is using the wrong efficiency value. index = "
1819  // <<diskIndex-1<<" , MinIndex = "<<eff.FPixIndex<<" ... "<<tTopo->pxfDisk(detID);}
1820  pixelEfficiency = eff.thePixelEfficiency[diskIndex - 1];
1821  columnEfficiency = eff.thePixelColEfficiency[diskIndex - 1];
1822  chipEfficiency = eff.thePixelChipEfficiency[diskIndex - 1];
1823  //std::cout <<"Using FPix columnEfficiency = "<<columnEfficiency<<" for Disk = "<< tTopo->pxfDisk(detID)<<"\n";
1824  // Sometimes the forward pixels have wrong size,
1825  // this crashes the index conversion, so exit, but only check if it is not an upgrade geometry
1826  if (NumberOfBarrelLayers ==
1827  3) { // whether it is the present or the phase 1 detector can be checked using GeomDetEnumerators::SubDetector
1828  if (numColumns > 260 || numRows > 160) {
1829  if (numColumns > 260)
1830  LogWarning("Pixel Geometry") << " wrong columns in endcaps " << numColumns;
1831  if (numRows > 160)
1832  LogWarning("Pixel Geometry") << " wrong rows in endcaps " << numRows;
1833  return;
1834  }
1835  if ((panelIndex == 1 && (moduleIndex == 1 || moduleIndex == 2)) ||
1836  (panelIndex == 2 && moduleIndex == 1)) { //inner modules
1837  columnEfficiency *= eff.theInnerEfficiency_FPix[diskIndex - 1] * eff.pu_scale[3];
1838  } else { //outer modules
1839  columnEfficiency *= eff.theOuterEfficiency_FPix[diskIndex - 1] * eff.pu_scale[4];
1840  }
1841  } // current detector, forward
1842  } else if (pixdet->subDetector() == GeomDetEnumerators::SubDetector::P2OTB ||
1844  // If phase 2 outer tracker, hardcoded values as they have been so far
1845  pixelEfficiency = 0.999;
1846  columnEfficiency = 0.999;
1847  chipEfficiency = 0.999;
1848  } // if barrel/forward
1849  } else { // Load precomputed factors from Database
1850  pixelEfficiency = eff.PixelGeomFactors.at(detID);
1851  columnEfficiency = eff.ColGeomFactors.at(detID) * eff.pu_scale[eff.iPU.at(detID)];
1852  chipEfficiency = eff.ChipGeomFactors.at(detID);
1853  if (isPhase1) {
1854  for (unsigned int i_roc = 0; i_roc < eff.PixelGeomFactorsROCStdPixels.at(detID).size(); ++i_roc) {
1855  pixelEfficiencyROCStdPixels[i_roc] = eff.PixelGeomFactorsROCStdPixels.at(detID).at(i_roc);
1856  pixelEfficiencyROCBigPixels[i_roc] = eff.PixelGeomFactorsROCBigPixels.at(detID).at(i_roc);
1857  }
1858  } // is Phase 1
1859  }
1860 
1861 #ifdef TP_DEBUG
1862  LogDebug("Pixel Digitizer") << " enter pixel_inefficiency " << pixelEfficiency << " " << columnEfficiency << " "
1863  << chipEfficiency;
1864 #endif
1865 
1866  // Initilize the index converter
1867  //PixelIndices indexConverter(numColumns,numRows);
1868 
1869  int chipIndex = 0;
1870  int rowROC = 0;
1871  int colROC = 0;
1872  std::map<int, int, std::less<int> > chips, columns, pixelStd, pixelBig;
1873  std::map<int, int, std::less<int> >::iterator iter;
1874 
1875  // Find out the number of columns and rocs hits
1876  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1877  for (signal_map_const_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
1878  int chan = i->first;
1879  std::pair<int, int> ip = PixelDigi::channelToPixel(chan);
1880  int row = ip.first; // X in row
1881  int col = ip.second; // Y is in col
1882  //transform to ROC index coordinates
1883  pIndexConverter.transformToROC(col, row, chipIndex, colROC, rowROC);
1884  int dColInChip = pIndexConverter.DColumn(colROC); // get ROC dcol from ROC col
1885  //dcol in mod
1886  int dColInDet = pIndexConverter.DColumnInModule(dColInChip, chipIndex);
1887 
1888  chips[chipIndex]++;
1889  columns[dColInDet]++;
1890  if (isPhase1) {
1891  if (topol->isItBigPixelInX(row) || topol->isItBigPixelInY(col))
1892  pixelBig[chipIndex]++;
1893  else
1894  pixelStd[chipIndex]++;
1895  }
1896  }
1897 
1898  // Delete some ROC hits.
1899  for (iter = chips.begin(); iter != chips.end(); iter++) {
1900  //float rand = RandFlat::shoot();
1901  float rand = CLHEP::RandFlat::shoot(engine);
1902  if (rand > chipEfficiency)
1903  chips[iter->first] = 0;
1904  }
1905 
1906  // Delete some Dcol hits.
1907  for (iter = columns.begin(); iter != columns.end(); iter++) {
1908  //float rand = RandFlat::shoot();
1909  float rand = CLHEP::RandFlat::shoot(engine);
1910  if (rand > columnEfficiency)
1911  columns[iter->first] = 0;
1912  }
1913 
1914  // Delete some pixel hits based on DCDC issue damage.
1915  if (isPhase1) {
1916  for (iter = pixelStd.begin(); iter != pixelStd.end(); iter++) {
1917  float rand = CLHEP::RandFlat::shoot(engine);
1918  if (rand > pixelEfficiencyROCStdPixels[iter->first])
1919  pixelStd[iter->first] = 0;
1920  }
1921 
1922  for (iter = pixelBig.begin(); iter != pixelBig.end(); iter++) {
1923  float rand = CLHEP::RandFlat::shoot(engine);
1924  if (rand > pixelEfficiencyROCBigPixels[iter->first])
1925  pixelBig[iter->first] = 0;
1926  }
1927  }
1928 
1929  // Now loop again over pixels to kill some of them.
1930  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1931  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
1932  // int chan = i->first;
1933  std::pair<int, int> ip = PixelDigi::channelToPixel(i->first); //get pixel pos
1934  int row = ip.first; // X in row
1935  int col = ip.second; // Y is in col
1936  //transform to ROC index coordinates
1937  pIndexConverter.transformToROC(col, row, chipIndex, colROC, rowROC);
1938  int dColInChip = pIndexConverter.DColumn(colROC); //get ROC dcol from ROC col
1939  //dcol in mod
1940  int dColInDet = pIndexConverter.DColumnInModule(dColInChip, chipIndex);
1941 
1942  //float rand = RandFlat::shoot();
1943  float rand = CLHEP::RandFlat::shoot(engine);
1944  if (chips[chipIndex] == 0 || columns[dColInDet] == 0 || rand > pixelEfficiency ||
1945  (pixelStd.count(chipIndex) && pixelStd[chipIndex] == 0) ||
1946  (pixelBig.count(chipIndex) && pixelBig[chipIndex] == 0)) {
1947  // make pixel amplitude =0, pixel will be lost at clusterization
1948  i->second.set(0.); // reset amplitude,
1949  } // end if
1950  if (isPhase1) {
1951  if ((pixelStd.count(chipIndex) && pixelStd[chipIndex] == 0) ||
1952  (pixelBig.count(chipIndex) && pixelBig[chipIndex] == 0) || (badRocsFromFEDChannels.at(chipIndex) == 1)) {
1953  //============================================================
1954  // make pixel amplitude =0, pixel will be lost at clusterization
1955  i->second.set(0.); // reset amplitude,
1956  } // end if
1957  } // is Phase 1
1958  if (KillBadFEDChannels && badRocsFromFEDChannels.at(chipIndex) == 1) {
1959  i->second.set(0.);
1960  }
1961  } // end pixel loop
1962 } // end pixel_indefficiency

References _signal, officialStyle::chan, PixelDigi::channelToPixel(), SiPixelDigitizerAlgorithm::PixelEfficiencies::ChipGeomFactors, sipixelobjects::GlobalPixel::col, cuy::col, SiPixelDigitizerAlgorithm::PixelEfficiencies::ColGeomFactors, mps_check::columns, SiPixelFedCablingMap::findItem(), SiPixelDigitizerAlgorithm::PixelEfficiencies::FPixIndex, SiPixelDigitizerAlgorithm::PixelEfficiencies::FromConfig, GeomDet::geographicalId(), mps_fire::i, sipixelobjects::PixelROC::idInDetUnit(), SiPixelDigitizerAlgorithm::PixelEfficiencies::iPU, PixelTopology::isItBigPixelInX(), PixelTopology::isItBigPixelInY(), pixelClusterTagInfos_cfi::isPhase1, KillBadFEDChannels, PVValHelper::ladder, TrackerTopology::layer(), DTRecHitClients_cfi::local, LogDebug, map_, PixelTopology::ncolumns(), PixelTopology::nrows(), NumberOfBarrelLayers, AlCaHLTBitMon_ParallelJobs::p, GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, GeomDetEnumerators::P2OTB, GeomDetEnumerators::P2OTEC, GeomDetEnumerators::P2PXEC, castor_dqm_sourceclient_file_cfg::path, SiPixelFedCablingMap::pathToDetUnit(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelFEDChannelCollection_, SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelGeomFactors, SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelGeomFactorsROCBigPixels, SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelGeomFactorsROCStdPixels, edm::ESHandle< T >::product(), SiPixelDigitizerAlgorithm::PixelEfficiencies::pu_scale, TrackerTopology::pxbLadder(), TrackerTopology::pxbModule(), TrackerTopology::pxfModule(), TrackerTopology::pxfPanel(), DetId::rawId(), sipixelobjects::GlobalPixel::row, PixelGeomDetUnit::specificTopology(), GeomDet::subDetector(), SiPixelDigitizerAlgorithm::PixelEfficiencies::theInnerEfficiency_FPix, SiPixelDigitizerAlgorithm::PixelEfficiencies::theLadderEfficiency_BPix, SiPixelDigitizerAlgorithm::PixelEfficiencies::theModuleEfficiency_BPix, SiPixelDigitizerAlgorithm::PixelEfficiencies::theOuterEfficiency_FPix, SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelChipEfficiency, SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelColEfficiency, SiPixelDigitizerAlgorithm::PixelEfficiencies::thePixelEfficiency, and sipixelobjects::PixelROC::toGlobal().

Referenced by digitize().

◆ pixel_inefficiency_db()

void SiPixelDigitizerAlgorithm::pixel_inefficiency_db ( uint32_t  detID)
private

Definition at line 2181 of file SiPixelDigitizerAlgorithm.cc.

2181  {
2182  signal_map_type& theSignal = _signal[detID];
2183 
2184  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
2185  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
2186  // int chan = i->first;
2187  std::pair<int, int> ip = PixelDigi::channelToPixel(i->first); //get pixel pos
2188  int row = ip.first; // X in row
2189  int col = ip.second; // Y is in col
2190  //transform to ROC index coordinates
2191  if (theSiPixelGainCalibrationService_->isDead(detID, col, row)) {
2192  // std::cout << "now in isdead check, row " << detID << " " << col << "," << row << std::std::endl;
2193  // make pixel amplitude =0, pixel will be lost at clusterization
2194  i->second.set(0.); // reset amplitude,
2195  } // end if
2196  } // end pixel loop
2197 } // end pixel_indefficiency

References _signal, PixelDigi::channelToPixel(), cuy::col, mps_fire::i, and theSiPixelGainCalibrationService_.

Referenced by digitize().

◆ primary_ionization()

void SiPixelDigitizerAlgorithm::primary_ionization ( const PSimHit hit,
std::vector< EnergyDepositUnit > &  ionization_points,
CLHEP::HepRandomEngine *  engine 
) const
private

Definition at line 1080 of file SiPixelDigitizerAlgorithm.cc.

1082  {
1083  // Straight line approximation for trajectory inside active media
1084 
1085  const float SegmentLength = 0.0010; //10microns in cm
1086  float energy;
1087 
1088  // Get the 3D segment direction vector
1089  LocalVector direction = hit.exitPoint() - hit.entryPoint();
1090 
1091  float eLoss = hit.energyLoss(); // Eloss in GeV
1092  float length = direction.mag(); // Track length in Silicon
1093 
1094  int NumberOfSegments = int(length / SegmentLength); // Number of segments
1095  if (NumberOfSegments < 1)
1096  NumberOfSegments = 1;
1097 
1098 #ifdef TP_DEBUG
1099  LogDebug("Pixel Digitizer") << " enter primary_ionzation " << NumberOfSegments
1100  << " shift = " << (hit.exitPoint().x() - hit.entryPoint().x()) << " "
1101  << (hit.exitPoint().y() - hit.entryPoint().y()) << " "
1102  << (hit.exitPoint().z() - hit.entryPoint().z()) << " " << hit.particleType() << " "
1103  << hit.pabs();
1104 #endif
1105 
1106  float* elossVector = new float[NumberOfSegments]; // Eloss vector
1107 
1108  if (fluctuateCharge) {
1109  //MP DA RIMUOVERE ASSOLUTAMENTE
1110  int pid = hit.particleType();
1111  //int pid=211; // assume it is a pion
1112 
1113  float momentum = hit.pabs();
1114  // Generate fluctuated charge points
1115  fluctuateEloss(pid, momentum, eLoss, length, NumberOfSegments, elossVector, engine);
1116  }
1117 
1118  ionization_points.resize(NumberOfSegments); // set size
1119 
1120  // loop over segments
1121  for (int i = 0; i != NumberOfSegments; i++) {
1122  // Divide the segment into equal length subsegments
1123  Local3DPoint point = hit.entryPoint() + float((i + 0.5) / NumberOfSegments) * direction;
1124 
1125  if (fluctuateCharge)
1126  energy = elossVector[i] / GeVperElectron; // Convert charge to elec.
1127  else
1128  energy = hit.energyLoss() / GeVperElectron / float(NumberOfSegments);
1129 
1130  EnergyDepositUnit edu(energy, point); //define position,energy point
1131  ionization_points[i] = edu; // save
1132 
1133 #ifdef TP_DEBUG
1134  LogDebug("Pixel Digitizer") << i << " " << ionization_points[i].x() << " " << ionization_points[i].y() << " "
1135  << ionization_points[i].z() << " " << ionization_points[i].energy();
1136 #endif
1137 
1138  } // end for loop
1139 
1140  delete[] elossVector;
1141 }

References simKBmtfDigis_cfi::eLoss, HCALHighEnergyHPDFilter_cfi::energy, dqmMemoryStats::float, fluctuateCharge, fluctuateEloss(), GeVperElectron, mps_fire::i, createfilelist::int, LogDebug, PV3DBase< T, PVType, FrameType >::mag(), point, hit::x, hit::y, and hit::z.

Referenced by accumulateSimHits().

◆ setSimAccumulator()

void SiPixelDigitizerAlgorithm::setSimAccumulator ( const std::map< uint32_t, std::map< int, int > > &  signalMap)

Definition at line 971 of file SiPixelDigitizerAlgorithm.cc.

971  {
972  for (const auto& det : signalMap) {
973  auto& theSignal = _signal[det.first];
974  for (const auto& chan : det.second) {
975  theSignal[chan.first].set(chan.second *
976  theElectronPerADC); // will get divided again by theElectronPerAdc in digitize...
977  }
978  }
979 }

References _signal, officialStyle::chan, and theElectronPerADC.

Referenced by PreMixingSiPixelWorker::put().

Member Data Documentation

◆ _signal

signalMaps SiPixelDigitizerAlgorithm::_signal
private

◆ addChargeVCALSmearing

const bool SiPixelDigitizerAlgorithm::addChargeVCALSmearing
private

Definition at line 373 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise().

◆ addNoise

const bool SiPixelDigitizerAlgorithm::addNoise
private

Definition at line 372 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ addNoisyPixels

const bool SiPixelDigitizerAlgorithm::addNoisyPixels
private

Definition at line 374 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise().

◆ AddPixelAging

const bool SiPixelDigitizerAlgorithm::AddPixelAging
private

Definition at line 388 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift().

◆ AddPixelInefficiency

const bool SiPixelDigitizerAlgorithm::AddPixelInefficiency
private

◆ addThresholdSmearing

const bool SiPixelDigitizerAlgorithm::addThresholdSmearing
private

Definition at line 380 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ alpha2Order

const bool SiPixelDigitizerAlgorithm::alpha2Order
private

Definition at line 327 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift(), and DriftDirection().

◆ BPix_p0

const float SiPixelDigitizerAlgorithm::BPix_p0
private

Definition at line 366 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ BPix_p1

const float SiPixelDigitizerAlgorithm::BPix_p1
private

Definition at line 367 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ BPix_p2

const float SiPixelDigitizerAlgorithm::BPix_p2
private

Definition at line 368 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ BPix_p3

const float SiPixelDigitizerAlgorithm::BPix_p3
private

Definition at line 369 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ calmap

const std::map<int, CalParameters, std::less<int> > SiPixelDigitizerAlgorithm::calmap
private

Definition at line 404 of file SiPixelDigitizerAlgorithm.h.

Referenced by initCal().

◆ ClusterWidth

const float SiPixelDigitizerAlgorithm::ClusterWidth
private

Definition at line 330 of file SiPixelDigitizerAlgorithm.h.

Referenced by induce_signal().

◆ DeadModules

const Parameters SiPixelDigitizerAlgorithm::DeadModules
private

Definition at line 314 of file SiPixelDigitizerAlgorithm.h.

Referenced by module_killing_conf().

◆ Dist300

const float SiPixelDigitizerAlgorithm::Dist300
private

Definition at line 326 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift().

◆ doMissCalibrate

const bool SiPixelDigitizerAlgorithm::doMissCalibrate
private

Definition at line 383 of file SiPixelDigitizerAlgorithm.h.

Referenced by make_digis().

◆ electronsPerVCAL

const float SiPixelDigitizerAlgorithm::electronsPerVCAL
private

Definition at line 352 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ electronsPerVCAL_L1

const float SiPixelDigitizerAlgorithm::electronsPerVCAL_L1
private

Definition at line 354 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ electronsPerVCAL_L1_Offset

const float SiPixelDigitizerAlgorithm::electronsPerVCAL_L1_Offset
private

Definition at line 355 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ electronsPerVCAL_Offset

const float SiPixelDigitizerAlgorithm::electronsPerVCAL_Offset
private

Definition at line 353 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ fluctuate

const std::unique_ptr<SiG4UniversalFluctuation> SiPixelDigitizerAlgorithm::fluctuate
private

Definition at line 400 of file SiPixelDigitizerAlgorithm.h.

Referenced by fluctuateEloss().

◆ fluctuateCharge

const bool SiPixelDigitizerAlgorithm::fluctuateCharge
private

Definition at line 375 of file SiPixelDigitizerAlgorithm.h.

Referenced by primary_ionization().

◆ FPix_p0

const float SiPixelDigitizerAlgorithm::FPix_p0
private

Definition at line 362 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ FPix_p1

const float SiPixelDigitizerAlgorithm::FPix_p1
private

Definition at line 363 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ FPix_p2

const float SiPixelDigitizerAlgorithm::FPix_p2
private

Definition at line 364 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ FPix_p3

const float SiPixelDigitizerAlgorithm::FPix_p3
private

Definition at line 365 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ geom_

edm::ESHandle<TrackerGeometry> SiPixelDigitizerAlgorithm::geom_
private

Definition at line 157 of file SiPixelDigitizerAlgorithm.h.

Referenced by init_DynIneffDB().

◆ GeVperElectron

const float SiPixelDigitizerAlgorithm::GeVperElectron
private

Definition at line 322 of file SiPixelDigitizerAlgorithm.h.

Referenced by primary_ionization().

◆ KillBadFEDChannels

const bool SiPixelDigitizerAlgorithm::KillBadFEDChannels
private

Definition at line 379 of file SiPixelDigitizerAlgorithm.h.

Referenced by killBadFEDChannels(), and pixel_inefficiency().

◆ makeDigiSimLinks_

const bool SiPixelDigitizerAlgorithm::makeDigiSimLinks_
private

Definition at line 307 of file SiPixelDigitizerAlgorithm.h.

Referenced by induce_signal(), and make_digis().

◆ map_

edm::ESHandle<SiPixelFedCablingMap> SiPixelDigitizerAlgorithm::map_
private

Definition at line 156 of file SiPixelDigitizerAlgorithm.h.

Referenced by module_killing_DB(), and pixel_inefficiency().

◆ NumberOfBarrelLayers

const int SiPixelDigitizerAlgorithm::NumberOfBarrelLayers
private

◆ NumberOfEndcapDisks

const int SiPixelDigitizerAlgorithm::NumberOfEndcapDisks
private

◆ pixelAging_

const PixelAging SiPixelDigitizerAlgorithm::pixelAging_
private

Definition at line 459 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift().

◆ pixelEfficiencies_

PixelEfficiencies SiPixelDigitizerAlgorithm::pixelEfficiencies_
private

◆ PixelFEDChannelCollectionMapHandle

edm::ESHandle<PixelFEDChannelCollectionMap> SiPixelDigitizerAlgorithm::PixelFEDChannelCollectionMapHandle
private

Definition at line 164 of file SiPixelDigitizerAlgorithm.h.

◆ quality_map

const PixelFEDChannelCollectionMap* SiPixelDigitizerAlgorithm::quality_map

Definition at line 92 of file SiPixelDigitizerAlgorithm.h.

Referenced by chooseScenario().

◆ scenarioProbabilityHandle

edm::ESHandle<SiPixelQualityProbabilities> SiPixelDigitizerAlgorithm::scenarioProbabilityHandle
private

Definition at line 163 of file SiPixelDigitizerAlgorithm.h.

Referenced by chooseScenario().

◆ Sigma0

const float SiPixelDigitizerAlgorithm::Sigma0
private

Definition at line 325 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift().

◆ SiPixelBadModule_

edm::ESHandle<SiPixelQuality> SiPixelDigitizerAlgorithm::SiPixelBadModule_
private

Definition at line 153 of file SiPixelDigitizerAlgorithm.h.

Referenced by module_killing_DB().

◆ SiPixelDynamicInefficiency_

edm::ESHandle<SiPixelDynamicInefficiency> SiPixelDigitizerAlgorithm::SiPixelDynamicInefficiency_
private

Definition at line 160 of file SiPixelDigitizerAlgorithm.h.

Referenced by init_DynIneffDB().

◆ SiPixelLorentzAngle_

edm::ESHandle<SiPixelLorentzAngle> SiPixelDigitizerAlgorithm::SiPixelLorentzAngle_
private

Definition at line 149 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

◆ siPixelQualityLabel

std::string SiPixelDigitizerAlgorithm::siPixelQualityLabel
private

Definition at line 152 of file SiPixelDigitizerAlgorithm.h.

◆ tanLorentzAnglePerTesla_BPix

const float SiPixelDigitizerAlgorithm::tanLorentzAnglePerTesla_BPix
private

Definition at line 360 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

◆ tanLorentzAnglePerTesla_FPix

const float SiPixelDigitizerAlgorithm::tanLorentzAnglePerTesla_FPix
private

Definition at line 359 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

◆ theAdcFullScale

const int SiPixelDigitizerAlgorithm::theAdcFullScale
private

Definition at line 337 of file SiPixelDigitizerAlgorithm.h.

Referenced by make_digis(), and SiPixelDigitizerAlgorithm().

◆ theElectronPerADC

const float SiPixelDigitizerAlgorithm::theElectronPerADC
private

◆ theGainSmearing

const float SiPixelDigitizerAlgorithm::theGainSmearing
private

Definition at line 384 of file SiPixelDigitizerAlgorithm.h.

◆ TheNewSiPixelChargeReweightingAlgorithmClass

std::unique_ptr<SiPixelChargeReweightingAlgorithm> SiPixelDigitizerAlgorithm::TheNewSiPixelChargeReweightingAlgorithmClass
private

Definition at line 316 of file SiPixelDigitizerAlgorithm.h.

Referenced by induce_signal(), and SiPixelDigitizerAlgorithm().

◆ theNoiseInElectrons

const float SiPixelDigitizerAlgorithm::theNoiseInElectrons
private

Definition at line 338 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise(), and digitize().

◆ theNoiser

const std::unique_ptr<GaussianTailNoiseGenerator> SiPixelDigitizerAlgorithm::theNoiser
private

Definition at line 401 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise().

◆ theOffsetSmearing

const float SiPixelDigitizerAlgorithm::theOffsetSmearing
private

Definition at line 385 of file SiPixelDigitizerAlgorithm.h.

◆ theReadoutNoise

const float SiPixelDigitizerAlgorithm::theReadoutNoise
private

Definition at line 339 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise().

◆ theSiPixelGainCalibrationService_

const std::unique_ptr<SiPixelGainCalibrationOfflineSimService> SiPixelDigitizerAlgorithm::theSiPixelGainCalibrationService_
private

Definition at line 449 of file SiPixelDigitizerAlgorithm.h.

Referenced by pixel_inefficiency_db().

◆ theThresholdInE_BPix

const float SiPixelDigitizerAlgorithm::theThresholdInE_BPix
private

◆ theThresholdInE_BPix_L1

const float SiPixelDigitizerAlgorithm::theThresholdInE_BPix_L1
private

Definition at line 344 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), make_digis(), and SiPixelDigitizerAlgorithm().

◆ theThresholdInE_BPix_L2

const float SiPixelDigitizerAlgorithm::theThresholdInE_BPix_L2
private

Definition at line 345 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), make_digis(), and SiPixelDigitizerAlgorithm().

◆ theThresholdInE_FPix

const float SiPixelDigitizerAlgorithm::theThresholdInE_FPix
private

◆ theThresholdSmearing_BPix

const double SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix
private

Definition at line 348 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ theThresholdSmearing_BPix_L1

const double SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix_L1
private

Definition at line 349 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ theThresholdSmearing_BPix_L2

const double SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix_L2
private

Definition at line 350 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ theThresholdSmearing_FPix

const double SiPixelDigitizerAlgorithm::theThresholdSmearing_FPix
private

Definition at line 347 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ theTofLowerCut

const float SiPixelDigitizerAlgorithm::theTofLowerCut
private

Definition at line 357 of file SiPixelDigitizerAlgorithm.h.

Referenced by accumulateSimHits().

◆ theTofUpperCut

const float SiPixelDigitizerAlgorithm::theTofUpperCut
private

Definition at line 358 of file SiPixelDigitizerAlgorithm.h.

Referenced by accumulateSimHits().

◆ tMax

const double SiPixelDigitizerAlgorithm::tMax
private

Definition at line 396 of file SiPixelDigitizerAlgorithm.h.

Referenced by fluctuateEloss(), and SiPixelDigitizerAlgorithm().

◆ use_deadmodule_DB_

const bool SiPixelDigitizerAlgorithm::use_deadmodule_DB_
private

Definition at line 311 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ use_ineff_from_db_

const bool SiPixelDigitizerAlgorithm::use_ineff_from_db_
private

Definition at line 309 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ use_LorentzAngle_DB_

const bool SiPixelDigitizerAlgorithm::use_LorentzAngle_DB_
private

Definition at line 312 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

◆ use_module_killing_

const bool SiPixelDigitizerAlgorithm::use_module_killing_
private

Definition at line 310 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ UseReweighting

const bool SiPixelDigitizerAlgorithm::UseReweighting
private

Definition at line 389 of file SiPixelDigitizerAlgorithm.h.

Referenced by induce_signal().

Vector3DBase< float, LocalTag >
mcMuonSeeds_cfi.SimTrack
SimTrack
Definition: mcMuonSeeds_cfi.py:10
SiPixelDigitizerAlgorithm::electronsPerVCAL_L1
const float electronsPerVCAL_L1
Definition: SiPixelDigitizerAlgorithm.h:354
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
Point2DBase
Definition: Point2DBase.h:9
SiPixelDigitizerAlgorithm::addChargeVCALSmearing
const bool addChargeVCALSmearing
Definition: SiPixelDigitizerAlgorithm.h:373
SiPixelDigitizerAlgorithm::Parameters
std::vector< edm::ParameterSet > Parameters
Definition: SiPixelDigitizerAlgorithm.h:301
DDAxes::y
PileupMixingContent::getMix_bunchCrossing
const std::vector< int > & getMix_bunchCrossing() const
Definition: PileupMixingContent.h:65
SiPixelDigitizerAlgorithm::theGainSmearing
const float theGainSmearing
Definition: SiPixelDigitizerAlgorithm.h:384
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelDigitizerAlgorithm::Frame
GloballyPositioned< double > Frame
Definition: SiPixelDigitizerAlgorithm.h:300
SiPixelDigitizerAlgorithm::missCalibrate
float missCalibrate(uint32_t detID, const TrackerTopology *tTopo, const PixelGeomDetUnit *pixdet, int col, int row, float amp) const
Definition: SiPixelDigitizerAlgorithm.cc:2020
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
SiPixelQualityRcd
Definition: SiPixelQualityRcd.h:13
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
SiPixelDigitizerAlgorithm::theOffsetSmearing
const float theOffsetSmearing
Definition: SiPixelDigitizerAlgorithm.h:385
SiPixelDigitizerAlgorithm::AddPixelInefficiency
const bool AddPixelInefficiency
Definition: SiPixelDigitizerAlgorithm.h:378
SiPixelDigitizerAlgorithm::signal_map_iterator
signal_map_type::iterator signal_map_iterator
Definition: SiPixelDigitizerAlgorithm.h:297
hit::y
double y
Definition: SiStripHitEffFromCalibTree.cc:90
SiPixelDigitizerAlgorithm::pixelAging_
const PixelAging pixelAging_
Definition: SiPixelDigitizerAlgorithm.h:459
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
VtxSmearedParameters_cfi.SigmaX
SigmaX
Definition: VtxSmearedParameters_cfi.py:22
min
T min(T a, T b)
Definition: MathUtil.h:58
SiPixelDigitizerAlgorithm::KillBadFEDChannels
const bool KillBadFEDChannels
Definition: SiPixelDigitizerAlgorithm.h:379
mps_splice.entry
entry
Definition: mps_splice.py:68
SiPixelQualityProbabilities::getProbabilities
probabilityVec getProbabilities(const unsigned int puBin) const
Definition: SiPixelQualityProbabilities.cc:18
SiPixelDigitizerAlgorithm::theThresholdInE_BPix_L1
const float theThresholdInE_BPix_L1
Definition: SiPixelDigitizerAlgorithm.h:344
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SiPixelDigitizerAlgorithm::theSiPixelGainCalibrationService_
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
Definition: SiPixelDigitizerAlgorithm.h:449
pixelClusterTagInfos_cfi.isPhase1
isPhase1
Definition: pixelClusterTagInfos_cfi.py:7
SiPixelDigitizerAlgorithm::use_module_killing_
const bool use_module_killing_
Definition: SiPixelDigitizerAlgorithm.h:310
TrackerTopology::pxbLadder
unsigned int pxbLadder(const DetId &id) const
Definition: TrackerTopology.h:155
cuy.col
col
Definition: cuy.py:1010
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SiPixelFEDChannelContainerESProducerRcd
Definition: SiPixelFEDChannelContainerESProducerRcd.h:9
GaussianTailNoiseGenerator
Definition: GaussianTailNoiseGenerator.h:24
SiPixelDigitizerAlgorithm::theNoiser
const std::unique_ptr< GaussianTailNoiseGenerator > theNoiser
Definition: SiPixelDigitizerAlgorithm.h:401
SiPixelQuality::disabledModuleType
Definition: SiPixelQuality.h:29
PixelTopology::pitch
virtual std::pair< float, float > pitch() const =0
SiPixelDigitizerAlgorithm::pixel_inefficiency
void pixel_inefficiency(const PixelEfficiencies &eff, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
Definition: SiPixelDigitizerAlgorithm.cc:1741
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:197
GeomDetEnumerators::P2OTB
Definition: GeomDetEnumerators.h:23
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
SiPixelDigitizerAlgorithm::pixelEfficiencies_
PixelEfficiencies pixelEfficiencies_
Definition: SiPixelDigitizerAlgorithm.h:458
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
SiPixelDigitizerAlgorithm::fluctuateEloss
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[], CLHEP::HepRandomEngine *) const
Definition: SiPixelDigitizerAlgorithm.cc:1146
sipixelobjects::GlobalPixel::row
int row
Definition: GlobalPixel.h:7
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
SiPixelQuality::disabledModuleType::errorType
int errorType
Definition: SiPixelQuality.h:31
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
SiPixelDigitizerAlgorithm::SiPixelLorentzAngle_
edm::ESHandle< SiPixelLorentzAngle > SiPixelLorentzAngle_
Definition: SiPixelDigitizerAlgorithm.h:149
SiPixelDigitizerAlgorithm::theThresholdSmearing_FPix
const double theThresholdSmearing_FPix
Definition: SiPixelDigitizerAlgorithm.h:347
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
SiPixelDigitizerAlgorithm::TheNewSiPixelChargeReweightingAlgorithmClass
std::unique_ptr< SiPixelChargeReweightingAlgorithm > TheNewSiPixelChargeReweightingAlgorithmClass
Definition: SiPixelDigitizerAlgorithm.h:316
pfMETCorrectionType0_cfi.par1
par1
Definition: pfMETCorrectionType0_cfi.py:48
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
SiPixelDigitizerAlgorithm::pixel_inefficiency_db
void pixel_inefficiency_db(uint32_t detID)
Definition: SiPixelDigitizerAlgorithm.cc:2181
simKBmtfDigis_cfi.eLoss
eLoss
Definition: simKBmtfDigis_cfi.py:9
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
sipixelobjects::GlobalPixel::col
int col
Definition: GlobalPixel.h:8
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelFEDChannelCollection_
std::unique_ptr< PixelFEDChannelCollection > PixelFEDChannelCollection_
Definition: SiPixelDigitizerAlgorithm.h:279
SiPixelDigitizerAlgorithm::theTofLowerCut
const float theTofLowerCut
Definition: SiPixelDigitizerAlgorithm.h:357
GeomDetType::isTrackerPixel
bool isTrackerPixel() const
Definition: GeomDetType.cc:15
SiPixelDigitizerAlgorithm::initCal
std::map< int, CalParameters, std::less< int > > initCal() const
Definition: SiPixelDigitizerAlgorithm.cc:340
SiPixelDigitizerAlgorithm::doMissCalibrate
const bool doMissCalibrate
Definition: SiPixelDigitizerAlgorithm.h:383
SiPixelDigitizerAlgorithm::FPix_p3
const float FPix_p3
Definition: SiPixelDigitizerAlgorithm.h:365
sipixelobjects::LocalPixel
identify pixel inside single ROC
Definition: LocalPixel.h:7
SiPixelDigitizerAlgorithm::addNoise
const bool addNoise
Definition: SiPixelDigitizerAlgorithm.h:372
SiPixelDigitizerAlgorithm::PixelEfficiencies::thePUEfficiency
std::vector< std::vector< double > > thePUEfficiency
Definition: SiPixelDigitizerAlgorithm.h:254
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
hit::x
double x
Definition: SiStripHitEffFromCalibTree.cc:89
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ecalLiteDTU::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalLiteDTUSample.h:12
TrackerTopology::pxfPanel
unsigned int pxfPanel(const DetId &id) const
Definition: TrackerTopology.h:450
EncodedEventId
Definition: EncodedEventId.h:11
SiPixelLorentzAngle::getLorentzAngle
float getLorentzAngle(const uint32_t &) const
Definition: SiPixelLorentzAngle.cc:14
SiPixelDigitizerAlgorithm::use_ineff_from_db_
const bool use_ineff_from_db_
Definition: SiPixelDigitizerAlgorithm.h:309
PixelTopology::isItBigPixelInX
virtual bool isItBigPixelInX(int ixbin) const =0
DetId
Definition: DetId.h:17
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
SiPixelDigitizerAlgorithm::theThresholdInE_BPix_L2
const float theThresholdInE_BPix_L2
Definition: SiPixelDigitizerAlgorithm.h:345
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
SiPixelDigitizerAlgorithm::BPix_p0
const float BPix_p0
Definition: SiPixelDigitizerAlgorithm.h:366
SiPixelDigitizerAlgorithm::FPix_p0
const float FPix_p0
Definition: SiPixelDigitizerAlgorithm.h:362
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
sipixelobjects::GlobalPixel
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
SiPixelDigitizerAlgorithm::calmap
const std::map< int, CalParameters, std::less< int > > calmap
Definition: SiPixelDigitizerAlgorithm.h:404
pfMETCorrectionType0_cfi.par3
par3
Definition: pfMETCorrectionType0_cfi.py:50
PixelIndices::channelToPixelROC
static std::pair< int, int > channelToPixelROC(const int chan)
Definition: PixelIndices.h:236
HLT_FULL_cff.fraction
fraction
Definition: HLT_FULL_cff.py:52795
SiPixelDigitizerAlgorithm::NumberOfBarrelLayers
const int NumberOfBarrelLayers
Definition: SiPixelDigitizerAlgorithm.h:332
GeomDetEnumerators::P1PXEC
Definition: GeomDetEnumerators.h:26
SiPixelDigitizerAlgorithm::SiPixelBadModule_
edm::ESHandle< SiPixelQuality > SiPixelBadModule_
Definition: SiPixelDigitizerAlgorithm.h:153
SiPixelLorentzAngleSimRcd
Definition: SiPixelLorentzAngleSimRcd.h:24
SiPixelDigitizerAlgorithm::tMax
const double tMax
Definition: SiPixelDigitizerAlgorithm.h:396
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
SiPixelDigitizerAlgorithm::Sigma0
const float Sigma0
Definition: SiPixelDigitizerAlgorithm.h:325
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
p2
double p2[4]
Definition: TauolaWrapper.h:90
SiPixelFedCablingMap::pathToDetUnit
std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const final
Definition: SiPixelFedCablingMap.cc:150
PixelTopology::ncolumns
virtual int ncolumns() const =0
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
SiPixelDigitizerAlgorithm::quality_map
const PixelFEDChannelCollectionMap * quality_map
Definition: SiPixelDigitizerAlgorithm.h:92
SiPixelDigitizerAlgorithm::module_killing_conf
void module_killing_conf(uint32_t detID)
Definition: SiPixelDigitizerAlgorithm.cc:2201
SiPixelDigitizerAlgorithm::Dist300
const float Dist300
Definition: SiPixelDigitizerAlgorithm.h:326
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
SiPixelGainCalibrationOfflineSimService
Definition: SiPixelGainCalibrationOfflineSimService.h:22
GeomDetEnumerators::P2OTEC
Definition: GeomDetEnumerators.h:24
SiPixelDigitizerAlgorithm::siPixelQualityLabel
std::string siPixelQualityLabel
Definition: SiPixelDigitizerAlgorithm.h:152
PixelDigi::pixelToChannel
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:71
Point3DBase< float, LocalTag >
cmsdt::scenario
scenario
Definition: constants.h:166
PixelTopology
Definition: PixelTopology.h:10
SiPixelDigitizerAlgorithm::theNoiseInElectrons
const float theNoiseInElectrons
Definition: SiPixelDigitizerAlgorithm.h:338
SiPixelDigitizerAlgorithm::PixelFEDChannelCollectionMapHandle
edm::ESHandle< PixelFEDChannelCollectionMap > PixelFEDChannelCollectionMapHandle
Definition: SiPixelDigitizerAlgorithm.h:164
particleFlowDisplacedVertex_cfi.ratio
ratio
Definition: particleFlowDisplacedVertex_cfi.py:93
hit::z
double z
Definition: SiStripHitEffFromCalibTree.cc:91
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
SiPixelDigitizerAlgorithm::PixelEfficiencies::theInstLumiScaleFactor
double theInstLumiScaleFactor
Definition: SiPixelDigitizerAlgorithm.h:252
SiPixelDigitizerAlgorithm::geom_
edm::ESHandle< TrackerGeometry > geom_
Definition: SiPixelDigitizerAlgorithm.h:157
SiPixelDigitizerAlgorithm::addThresholdSmearing
const bool addThresholdSmearing
Definition: SiPixelDigitizerAlgorithm.h:380
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiPixelDigitizerAlgorithm::signal_map_const_iterator
signal_map_type::const_iterator signal_map_const_iterator
Definition: SiPixelDigitizerAlgorithm.h:298
SiPixelDigitizerAlgorithm::module_killing_DB
void module_killing_DB(uint32_t detID)
Definition: SiPixelDigitizerAlgorithm.cc:2241
runGCPTkAlMap.in_file
in_file
Definition: runGCPTkAlMap.py:74
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
MeasurementPoint
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Definition: MeasurementPoint.h:12
GeomDetEnumerators::P1PXB
Definition: GeomDetEnumerators.h:25
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
Bounds::thickness
virtual float thickness() const =0
SiPixelQualityProbabilities::getProbability_Map
const probabilityMap & getProbability_Map() const
Definition: SiPixelQualityProbabilities.h:21
SiPixelDigitizerAlgorithm::PixelEfficiencies::pu_scale
std::vector< double > pu_scale
Definition: SiPixelDigitizerAlgorithm.h:253
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
SignalPoint
Definition: SignalPoint.h:11
SiPixelDigitizerAlgorithm::BPix_p2
const float BPix_p2
Definition: SiPixelDigitizerAlgorithm.h:368
PixelIndices::pixelToChannelROC
static int pixelToChannelROC(const int rowROC, const int colROC)
Definition: PixelIndices.h:233
SiPixelDigitizerAlgorithm::map_
edm::ESHandle< SiPixelFedCablingMap > map_
Definition: SiPixelDigitizerAlgorithm.h:156
SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix_L1
const double theThresholdSmearing_BPix_L1
Definition: SiPixelDigitizerAlgorithm.h:349
SiPixelDigitizerAlgorithm::alpha2Order
const bool alpha2Order
Definition: SiPixelDigitizerAlgorithm.h:327
SiPixelQualityProbabilities::probabilityMap
std::map< unsigned int, probabilityVec > probabilityMap
Definition: SiPixelQualityProbabilities.h:13
PV2DBase::y
T y() const
Definition: PV2DBase.h:44
PixelGeomDetUnit::specificTopology
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
Definition: PixelGeomDetUnit.cc:17
PV2DBase::x
T x() const
Definition: PV2DBase.h:43
recoMuon::in
Definition: RecoMuonEnumerators.h:6
SiPixelDigitizerAlgorithm::makeDigiSimLinks_
const bool makeDigiSimLinks_
Definition: SiPixelDigitizerAlgorithm.h:307
hgcalDigitizer_cfi.noise
noise
Definition: hgcalDigitizer_cfi.py:155
pfMETCorrectionType0_cfi.par2
par2
Definition: pfMETCorrectionType0_cfi.py:49
SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix_L2
const double theThresholdSmearing_BPix_L2
Definition: SiPixelDigitizerAlgorithm.h:350
PixelTopology::isItBigPixelInY
virtual bool isItBigPixelInY(int iybin) const =0
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
notFound
static const GlobalPoint notFound(0, 0, 0)
SiPixelDigitizerAlgorithm::theThresholdInE_BPix
const float theThresholdInE_BPix
Definition: SiPixelDigitizerAlgorithm.h:343
LocalVector
Local3DVector LocalVector
Definition: LocalVector.h:12
createfilelist.int
int
Definition: createfilelist.py:10
SiPixelDigitizerAlgorithm::PixelEfficiencies::FromConfig
bool FromConfig
Definition: SiPixelDigitizerAlgorithm.h:250
TrackerTopology::pxfModule
unsigned int pxfModule(const DetId &id) const
Definition: TrackerTopology.h:163
SiPixelDigitizerAlgorithm::theTofUpperCut
const float theTofUpperCut
Definition: SiPixelDigitizerAlgorithm.h:358
SiPixelDigitizerAlgorithm::theElectronPerADC
const float theElectronPerADC
Definition: SiPixelDigitizerAlgorithm.h:336
SiPixelDigitizerAlgorithm::fluctuateCharge
const bool fluctuateCharge
Definition: SiPixelDigitizerAlgorithm.h:375
SiPixelDigitizerAlgorithm::theReadoutNoise
const float theReadoutNoise
Definition: SiPixelDigitizerAlgorithm.h:339
p1
double p1[4]
Definition: TauolaWrapper.h:89
SiPixelDynamicInefficiencyRcd
Definition: SiPixelDynamicInefficiencyRcd.h:23
SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db
void init_from_db(const edm::ESHandle< TrackerGeometry > &, const edm::ESHandle< SiPixelDynamicInefficiency > &)
Definition: SiPixelDigitizerAlgorithm.cc:597
SiPixelDigitizerAlgorithm::addNoisyPixels
const bool addNoisyPixels
Definition: SiPixelDigitizerAlgorithm.h:374
Topology::measurementPosition
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
sipixelobjects::PixelROC::toGlobal
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.h:55
GeomDet::specificSurface
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:40
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
SiPixelDigitizerAlgorithm::electronsPerVCAL_Offset
const float electronsPerVCAL_Offset
Definition: SiPixelDigitizerAlgorithm.h:353
get
#define get
SiPixelDigitizerAlgorithm::make_digis
void make_digis(float thePixelThresholdInE, uint32_t detID, const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo) const
Definition: SiPixelDigitizerAlgorithm.cc:1542
SiPixelDigitizerAlgorithm::_signal
signalMaps _signal
Definition: SiPixelDigitizerAlgorithm.h:305
SiPixelDigitizerAlgorithm::drift
void drift(const PSimHit &hit, const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const TrackerTopology *tTopo, const std::vector< EnergyDepositUnit > &ionization_points, std::vector< SignalPoint > &collection_points) const
Definition: SiPixelDigitizerAlgorithm.cc:1212
IT
std::vector< LinkConnSpec >::const_iterator IT
Definition: TriggerBoardSpec.cc:5
SiPixelDigitizerAlgorithm::electronsPerVCAL_L1_Offset
const float electronsPerVCAL_L1_Offset
Definition: SiPixelDigitizerAlgorithm.h:355
SiPixelDigitizerAlgorithm::fluctuate
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate
Definition: SiPixelDigitizerAlgorithm.h:400
SiPixelDigitizerAlgorithm::DriftDirection
LocalVector DriftDirection(const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
Definition: SiPixelDigitizerAlgorithm.cc:2110
SiPixelDigitizerAlgorithm::tanLorentzAnglePerTesla_FPix
const float tanLorentzAnglePerTesla_FPix
Definition: SiPixelDigitizerAlgorithm.h:359
SiPixelQuality::getBadComponentList
const std::vector< disabledModuleType > getBadComponentList() const
Definition: SiPixelQuality.h:100
MixingModule_cfi.bunchspace
bunchspace
Definition: MixingModule_cfi.py:41
SiPixelDigitizerAlgorithm::BPix_p3
const float BPix_p3
Definition: SiPixelDigitizerAlgorithm.h:369
SiPixelDigitizerAlgorithm::signal_map_type
std::map< int, Amplitude, std::less< int > > signal_map_type
Definition: SiPixelDigitizerAlgorithm.h:296
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
SiPixelDigitizerAlgorithm::use_deadmodule_DB_
const bool use_deadmodule_DB_
Definition: SiPixelDigitizerAlgorithm.h:311
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
PixelGeomDetUnit::type
const GeomDetType & type() const override
Definition: PixelGeomDetUnit.cc:11
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
sipixelobjects::PixelROC
Definition: PixelROC.h:23
LaserClient_cfi.Amplitude
Amplitude
Definition: LaserClient_cfi.py:39
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
VtxSmearedParameters_cfi.SigmaY
SigmaY
Definition: VtxSmearedParameters_cfi.py:21
SiPixelDigitizerAlgorithm::GeVperElectron
const float GeVperElectron
Definition: SiPixelDigitizerAlgorithm.h:322
SiPixelDigitizerAlgorithm::electronsPerVCAL
const float electronsPerVCAL
Definition: SiPixelDigitizerAlgorithm.h:352
sipixelobjects::LocalPixel::RocRowCol
row and collumn in ROC representation
Definition: LocalPixel.h:13
TrackerTopology::pxbModule
unsigned int pxbModule(const DetId &id) const
Definition: TrackerTopology.h:160
fitWZ.par0
par0
Definition: fitWZ.py:52
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
SiPixelDigitizerAlgorithm::theAdcFullScale
const int theAdcFullScale
Definition: SiPixelDigitizerAlgorithm.h:337
officialStyle.chan
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi....
Definition: officialStyle.py:106
SiPixelDigitizerAlgorithm::NumberOfEndcapDisks
const int NumberOfEndcapDisks
Definition: SiPixelDigitizerAlgorithm.h:333
mps_check.columns
columns
Definition: mps_check.py:244
Exception
Definition: hltDiff.cc:246
SiPixelDigitizerAlgorithm::pixel_aging
float pixel_aging(const PixelAging &aging, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo) const
Definition: SiPixelDigitizerAlgorithm.cc:1968
SiPixelDigitizerAlgorithm::theThresholdInE_FPix
const float theThresholdInE_FPix
Definition: SiPixelDigitizerAlgorithm.h:342
PVValHelper::ladder
Definition: PVValidationHelpers.h:72
SiPixelDigitizerAlgorithm::induce_signal
void induce_signal(std::vector< PSimHit >::const_iterator inputBegin, std::vector< PSimHit >::const_iterator inputEnd, const PSimHit &hit, const size_t hitIndex, const unsigned int tofBin, const PixelGeomDetUnit *pixdet, const std::vector< SignalPoint > &collection_points)
Definition: SiPixelDigitizerAlgorithm.cc:1330
SiG4UniversalFluctuation
Definition: SiG4UniversalFluctuation.h:25
SiPixelDigitizerAlgorithm::BPix_p1
const float BPix_p1
Definition: SiPixelDigitizerAlgorithm.h:367
SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix
const double theThresholdSmearing_BPix
Definition: SiPixelDigitizerAlgorithm.h:348
PixelTestBeamValidation_cfi.Charge
Charge
Definition: PixelTestBeamValidation_cfi.py:91
GeomDetType::isBarrel
bool isBarrel() const
Definition: GeomDetType.cc:9
SiPixelDigitizerAlgorithm::primary_ionization
void primary_ionization(const PSimHit &hit, std::vector< EnergyDepositUnit > &ionization_points, CLHEP::HepRandomEngine *) const
Definition: SiPixelDigitizerAlgorithm.cc:1080
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
p3
double p3[4]
Definition: TauolaWrapper.h:91
SiPixelDigitizerAlgorithm::tanLorentzAnglePerTesla_BPix
const float tanLorentzAnglePerTesla_BPix
Definition: SiPixelDigitizerAlgorithm.h:360
SiPixelDigitizerAlgorithm::AddPixelAging
const bool AddPixelAging
Definition: SiPixelDigitizerAlgorithm.h:388
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
SiPixelDigitizerAlgorithm::FPix_p2
const float FPix_p2
Definition: SiPixelDigitizerAlgorithm.h:364
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
SiPixelDigitizerAlgorithm::UseReweighting
const bool UseReweighting
Definition: SiPixelDigitizerAlgorithm.h:389
muons2muons_cfi.pu
pu
Definition: muons2muons_cfi.py:31
funct::arg
A arg
Definition: Factorize.h:31
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
DTRecHitClients_cfi.local
local
Definition: DTRecHitClients_cfi.py:10
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
genParticles_cff.map
map
Definition: genParticles_cff.py:11
SiPixelDigitizerAlgorithm::scenarioProbabilityHandle
edm::ESHandle< SiPixelQualityProbabilities > scenarioProbabilityHandle
Definition: SiPixelDigitizerAlgorithm.h:163
aging
Definition: aging.py:1
SiPixelQuality::IsRocBad
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
Definition: SiPixelQuality.cc:111
SiPixelFedCablingMapRcd
Definition: SiPixelFedCablingMapRcd.h:5
GloballyPositioned::rotation
const RotationType & rotation() const
Definition: GloballyPositioned.h:38
SiPixelDigitizerAlgorithm::FPix_p1
const float FPix_p1
Definition: SiPixelDigitizerAlgorithm.h:363
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
SiPixelDigitizerAlgorithm::SiPixelDynamicInefficiency_
edm::ESHandle< SiPixelDynamicInefficiency > SiPixelDynamicInefficiency_
Definition: SiPixelDigitizerAlgorithm.h:160
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
SiPixelDigitizerAlgorithm::DeadModules
const Parameters DeadModules
Definition: SiPixelDigitizerAlgorithm.h:314
PixelTopology::nrows
virtual int nrows() const =0
mps_splice.line
line
Definition: mps_splice.py:76
Parameters
vector< ParameterSet > Parameters
Definition: HLTMuonPlotter.cc:25
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
SiPixelFedCablingMap::findItem
const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const final
Definition: SiPixelFedCablingMap.cc:124
PileupMixingContent::getMix_TrueInteractions
const std::vector< float > & getMix_TrueInteractions() const
Definition: PileupMixingContent.h:64
SiPixelDigitizerAlgorithm::calcQ
double calcQ(float x) const
Definition: SiPixelDigitizerAlgorithm.h:461
cuy.ii
ii
Definition: cuy.py:590
SiPixelDigitizerAlgorithm::ClusterWidth
const float ClusterWidth
Definition: SiPixelDigitizerAlgorithm.h:330
SiPixelStatusScenarioProbabilityRcd
Definition: SiPixelStatusScenarioProbabilityRcd.h:18
EnergyDepositUnit
Definition: EnergyDepositUnit.h:10
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
GeomDet::subDetector
virtual SubDetector subDetector() const
Which subdetector.
Definition: GeomDet.cc:38
hit
Definition: SiStripHitEffFromCalibTree.cc:88
sipixelobjects::PixelROC::idInDetUnit
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:37
PixelDigi::channelToPixel
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:65
SiPixelDigitizerAlgorithm::add_noise
void add_noise(const PixelGeomDetUnit *pixdet, float thePixelThreshold, CLHEP::HepRandomEngine *)
Definition: SiPixelDigitizerAlgorithm.cc:1638
PixelIndices
Definition: PixelIndices.h:40
GeomDetEnumerators::P2PXEC
Definition: GeomDetEnumerators.h:28
SiPixelDigitizerAlgorithm::use_LorentzAngle_DB_
const bool use_LorentzAngle_DB_
Definition: SiPixelDigitizerAlgorithm.h:312