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 &)
 
void initializeEvent ()
 
bool killBadFEDChannels () const
 
void setSimAccumulator (const std::map< uint32_t, std::map< int, int > > &signalMap)
 
 SiPixelDigitizerAlgorithm (const edm::ParameterSet &conf, edm::ConsumesCollector iC)
 
 ~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 size_t FirstHitIndex, 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
 
const TrackerGeometrygeom_ = nullptr
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomToken_
 
const float GeVperElectron
 
const bool KillBadFEDChannels
 
const bool makeDigiSimLinks_
 
const SiPixelFedCablingMapmap_ = nullptr
 
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcdmapToken_
 
const int NumberOfBarrelLayers
 
const int NumberOfEndcapDisks
 
const PixelAging pixelAging_
 
PixelEfficiencies pixelEfficiencies_
 
edm::ESGetToken< PixelFEDChannelCollectionMap, SiPixelFEDChannelContainerESProducerRcdPixelFEDChannelCollectionMapToken_
 
const SiPixelQualityProbabilitiesscenarioProbability_ = nullptr
 
edm::ESGetToken< SiPixelQualityProbabilities, SiPixelStatusScenarioProbabilityRcdscenarioProbabilityToken_
 
const float Sigma0
 
const SiPixelQualitySiPixelBadModule_ = nullptr
 
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcdSiPixelBadModuleToken_
 
const SiPixelDynamicInefficiencySiPixelDynamicInefficiency_ = nullptr
 
edm::ESGetToken< SiPixelDynamicInefficiency, SiPixelDynamicInefficiencyRcdSiPixelDynamicInefficiencyToken_
 
const SiPixelLorentzAngleSiPixelLorentzAngle_ = nullptr
 
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleSimRcdSiPixelLorentzAngleToken_
 
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 56 of file SiPixelDigitizerAlgorithm.h.

Member Typedef Documentation

◆ array_2d

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

Definition at line 309 of file SiPixelDigitizerAlgorithm.h.

◆ Frame

Definition at line 307 of file SiPixelDigitizerAlgorithm.h.

◆ Parameters

Definition at line 308 of file SiPixelDigitizerAlgorithm.h.

◆ PixelFEDChannelCollectionMap

Definition at line 92 of file SiPixelDigitizerAlgorithm.h.

◆ signal_map_const_iterator

typedef signal_map_type::const_iterator SiPixelDigitizerAlgorithm::signal_map_const_iterator
private

Definition at line 305 of file SiPixelDigitizerAlgorithm.h.

◆ signal_map_iterator

typedef signal_map_type::iterator SiPixelDigitizerAlgorithm::signal_map_iterator
private

Definition at line 304 of file SiPixelDigitizerAlgorithm.h.

◆ signal_map_type

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

Definition at line 303 of file SiPixelDigitizerAlgorithm.h.

◆ signalMaps

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

Definition at line 306 of file SiPixelDigitizerAlgorithm.h.

Constructor & Destructor Documentation

◆ SiPixelDigitizerAlgorithm()

SiPixelDigitizerAlgorithm::SiPixelDigitizerAlgorithm ( const edm::ParameterSet conf,
edm::ConsumesCollector  iC 
)

Definition at line 173 of file SiPixelDigitizerAlgorithm.cc.

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

References AddPixelInefficiency, edm::ConsumesCollector::esConsumes(), SiPixelDigitizerAlgorithm::PixelEfficiencies::FromConfig, edm::ParameterSet::getParameter(), KillBadFEDChannels, pixelEfficiencies_, PixelFEDChannelCollectionMapToken_, scenarioProbabilityToken_, SiPixelBadModuleToken_, SiPixelDynamicInefficiencyToken_, SiPixelLorentzAngleToken_, AlCaHLTBitMon_QueryRunRegistry::string, theAdcFullScale, theElectronPerADC, TheNewSiPixelChargeReweightingAlgorithmClass, theThresholdInE_BPix, theThresholdInE_BPix_L1, theThresholdInE_BPix_L2, theThresholdInE_FPix, tMax, use_deadmodule_DB_, and use_LorentzAngle_DB_.

◆ ~SiPixelDigitizerAlgorithm()

SiPixelDigitizerAlgorithm::~SiPixelDigitizerAlgorithm ( )

Definition at line 441 of file SiPixelDigitizerAlgorithm.cc.

441  {
442  LogDebug("PixelDigitizer") << "SiPixelDigitizerAlgorithm deleted";
443 }

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 794 of file SiPixelDigitizerAlgorithm.cc.

801  {
802  // produce SignalPoint's for all SimHit's in detector
803  // Loop over hits
804 
805  uint32_t detId = pixdet->geographicalId().rawId();
806  size_t simHitGlobalIndex = inputBeginGlobalIndex; // This needs to stored to create the digi-sim link later
807  for (std::vector<PSimHit>::const_iterator ssbegin = inputBegin; ssbegin != inputEnd; ++ssbegin, ++simHitGlobalIndex) {
808  // skip hits not in this detector.
809  if ((*ssbegin).detUnitId() != detId) {
810  continue;
811  }
812 
813 #ifdef TP_DEBUG
814  LogDebug("Pixel Digitizer") << (*ssbegin).particleType() << " " << (*ssbegin).pabs() << " "
815  << (*ssbegin).energyLoss() << " " << (*ssbegin).tof() << " " << (*ssbegin).trackId()
816  << " " << (*ssbegin).processType() << " " << (*ssbegin).detUnitId()
817  << (*ssbegin).entryPoint() << " " << (*ssbegin).exitPoint();
818 #endif
819 
820  std::vector<EnergyDepositUnit> ionization_points;
821  std::vector<SignalPoint> collection_points;
822 
823  // fill collection_points for this SimHit, indpendent of topology
824  // Check the TOF cut
825  if (((*ssbegin).tof() - pixdet->surface().toGlobal((*ssbegin).localPosition()).mag() / 30.) >= theTofLowerCut &&
826  ((*ssbegin).tof() - pixdet->surface().toGlobal((*ssbegin).localPosition()).mag() / 30.) <= theTofUpperCut) {
827  primary_ionization(*ssbegin, ionization_points, engine); // fills _ionization_points
828  drift(*ssbegin,
829  pixdet,
830  bfield,
831  tTopo,
832  ionization_points,
833  collection_points); // transforms _ionization_points to collection_points
834  // compute induced signal on readout elements and add to _signal
835  induce_signal(inputBegin,
836  inputEnd,
837  *ssbegin,
838  simHitGlobalIndex,
839  inputBeginGlobalIndex,
840  tofBin,
841  pixdet,
842  collection_points); // 1st 3 args needed only for SimHit<-->Digi link
843  } // end if
844  } // end for
845 }

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 1692 of file SiPixelDigitizerAlgorithm.cc.

1694  {
1695 #ifdef TP_DEBUG
1696  LogDebug("Pixel Digitizer") << " enter add_noise " << theNoiseInElectrons;
1697 #endif
1698 
1699  uint32_t detID = pixdet->geographicalId().rawId();
1700  signal_map_type& theSignal = _signal[detID];
1701 
1702  // First add noise to hit pixels
1703  float theSmearedChargeRMS = 0.0;
1704 
1705  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); i++) {
1706  if (addChargeVCALSmearing) {
1707  if ((*i).second < 3000) {
1708  theSmearedChargeRMS = 543.6 - (*i).second * 0.093;
1709  } else if ((*i).second < 6000) {
1710  theSmearedChargeRMS = 307.6 - (*i).second * 0.01;
1711  } else {
1712  theSmearedChargeRMS = -432.4 + (*i).second * 0.123;
1713  }
1714 
1715  // Noise from Vcal smearing:
1716  float noise_ChargeVCALSmearing = theSmearedChargeRMS * CLHEP::RandGaussQ::shoot(engine, 0., 1.);
1717  // Noise from full readout:
1718  float noise = CLHEP::RandGaussQ::shoot(engine, 0., theReadoutNoise);
1719 
1720  if (((*i).second + Amplitude(noise + noise_ChargeVCALSmearing, -1.)) < 0.) {
1721  (*i).second.set(0);
1722  } else {
1723  (*i).second += Amplitude(noise + noise_ChargeVCALSmearing, -1.);
1724  }
1725 
1726  } // End if addChargeVCalSmearing
1727  else {
1728  // Noise: ONLY full READOUT Noise.
1729  // Use here the FULL readout noise, including TBM,ALT,AOH,OPT-REC.
1730  float noise = CLHEP::RandGaussQ::shoot(engine, 0., theReadoutNoise);
1731 
1732  if (((*i).second + Amplitude(noise, -1.)) < 0.) {
1733  (*i).second.set(0);
1734  } else {
1735  (*i).second += Amplitude(noise, -1.);
1736  }
1737  } // end if only Noise from full readout
1738  }
1739 
1740  if (!addNoisyPixels) // Option to skip noise in non-hit pixels
1741  return;
1742 
1743  const PixelTopology* topol = &pixdet->specificTopology();
1744  int numColumns = topol->ncolumns(); // det module number of cols&rows
1745  int numRows = topol->nrows();
1746 
1747  // Add noise on non-hit pixels
1748  // Use here the pixel noise
1749  int numberOfPixels = (numRows * numColumns);
1750  std::map<int, float, std::less<int> > otherPixels;
1751  std::map<int, float, std::less<int> >::iterator mapI;
1752 
1753  theNoiser->generate(numberOfPixels,
1754  thePixelThreshold, //thr. in un. of nois
1755  theNoiseInElectrons, // noise in elec.
1756  otherPixels,
1757  engine);
1758 
1759 #ifdef TP_DEBUG
1760  LogDebug("Pixel Digitizer") << " Add noisy pixels " << numRows << " " << numColumns << " " << theNoiseInElectrons
1761  << " " << theThresholdInE_FPix << theThresholdInE_BPix << " " << numberOfPixels << " "
1762  << otherPixels.size();
1763 #endif
1764 
1765  // Add noisy pixels
1766  for (mapI = otherPixels.begin(); mapI != otherPixels.end(); mapI++) {
1767  int iy = ((*mapI).first) / numRows;
1768  int ix = ((*mapI).first) - (iy * numRows);
1769 
1770  // Keep for a while for testing.
1771  if (iy < 0 || iy > (numColumns - 1))
1772  LogWarning("Pixel Geometry") << " error in iy " << iy;
1773  if (ix < 0 || ix > (numRows - 1))
1774  LogWarning("Pixel Geometry") << " error in ix " << ix;
1775 
1776  int chan = PixelDigi::pixelToChannel(ix, iy);
1777 
1778 #ifdef TP_DEBUG
1779  LogDebug("Pixel Digitizer") << " Storing noise = " << (*mapI).first << " " << (*mapI).second << " " << ix << " "
1780  << iy << " " << chan;
1781 #endif
1782 
1783  if (theSignal[chan] == 0) {
1784  // float noise = float( (*mapI).second );
1785  int noise = int((*mapI).second);
1786  theSignal[chan] = Amplitude(noise, -1.);
1787  }
1788  }
1789 }

References _signal, addChargeVCALSmearing, addNoisyPixels, LaserClient_cfi::Amplitude, officialStyle::chan, GeomDet::geographicalId(), mps_fire::i, createfilelist::int, LogDebug, PixelTopology::ncolumns(), gpuVertexFinder::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 469 of file SiPixelDigitizerAlgorithm.h.

469  {
470  // need erf(x/sqrt2)
471  //float x2=0.5*x*x;
472  //float a=0.147;
473  //double erf=sqrt(1.0f-exp( -1.0f*x2*( (4/M_PI)+a*x2)/(1.0+a*x2)));
474  //if (x<0.) erf*=-1.0;
475  //return 0.5*(1.0-erf);
476 
477  auto xx = std::min(0.5f * x * x, 12.5f);
478  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));
479  }

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 886 of file SiPixelDigitizerAlgorithm.cc.

886  {
887  int p = -1;
888  for (unsigned int i = 0; i < ps.size(); i++)
889  if (ps[i].getBunchCrossing() == 0)
890  p = i;
891 
892  if (p >= 0) {
893  for (size_t i = 0, n = pixelEfficiencies_.thePUEfficiency.size(); i < n; i++) {
894  double instlumi = ps[p].getTrueNumInteractions() * pixelEfficiencies_.theInstLumiScaleFactor;
895  double instlumi_pow = 1.;
897  for (size_t j = 0; j < pixelEfficiencies_.thePUEfficiency[i].size(); j++) {
899  instlumi_pow *= instlumi;
900  }
901  }
902  } else {
903  for (int i = 0, n = pixelEfficiencies_.thePUEfficiency.size(); i < n; i++) {
905  }
906  }
907 }

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 848 of file SiPixelDigitizerAlgorithm.cc.

848  {
849  //Instlumi scalefactor calculating for dynamic inefficiency
850 
851  if (puInfo) {
852  const std::vector<int>& bunchCrossing = puInfo->getMix_bunchCrossing();
853  const std::vector<float>& TrueInteractionList = puInfo->getMix_TrueInteractions();
854  //const int bunchSpacing = puInfo->getMix_bunchSpacing();
855 
856  int pui = 0, p = 0;
857  std::vector<int>::const_iterator pu;
858  std::vector<int>::const_iterator pu0 = bunchCrossing.end();
859 
860  for (pu = bunchCrossing.begin(); pu != bunchCrossing.end(); ++pu) {
861  if (*pu == 0) {
862  pu0 = pu;
863  p = pui;
864  }
865  pui++;
866  }
867  if (pu0 != bunchCrossing.end()) {
868  for (size_t i = 0, n = pixelEfficiencies_.thePUEfficiency.size(); i < n; i++) {
869  double instlumi = TrueInteractionList.at(p) * pixelEfficiencies_.theInstLumiScaleFactor;
870  double instlumi_pow = 1.;
872  for (size_t j = 0; j < pixelEfficiencies_.thePUEfficiency[i].size(); j++) {
874  instlumi_pow *= instlumi;
875  }
876  }
877  }
878  } else {
879  for (int i = 0, n = pixelEfficiencies_.thePUEfficiency.size(); i < n; i++) {
881  }
882  }
883 }

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 913 of file SiPixelDigitizerAlgorithm.cc.

914  {
915  std::unique_ptr<PixelFEDChannelCollection> PixelFEDChannelCollection_ = nullptr;
917 
918  std::vector<int> bunchCrossing;
919  std::vector<float> TrueInteractionList;
920 
921  for (unsigned int i = 0; i < ps.size(); i++) {
922  bunchCrossing.push_back(ps[i].getBunchCrossing());
923  TrueInteractionList.push_back(ps[i].getTrueNumInteractions());
924  }
925 
926  int pui = 0, p = 0;
927  std::vector<int>::const_iterator pu;
928  std::vector<int>::const_iterator pu0 = bunchCrossing.end();
929 
930  for (pu = bunchCrossing.begin(); pu != bunchCrossing.end(); ++pu) {
931  if (*pu == 0) {
932  pu0 = pu;
933  p = pui;
934  }
935  pui++;
936  }
937 
938  if (pu0 != bunchCrossing.end()) {
939  unsigned int PUBin = TrueInteractionList.at(p); // case delta PU=1, fix me
940  const auto& theProbabilitiesPerScenario = scenarioProbability_->getProbabilities(PUBin);
941  std::vector<double> probabilities;
942  probabilities.reserve(theProbabilitiesPerScenario.size());
943  for (auto it = theProbabilitiesPerScenario.begin(); it != theProbabilitiesPerScenario.end(); it++) {
944  probabilities.push_back(it->second);
945  }
946 
947  CLHEP::RandGeneral randGeneral(*engine, &(probabilities.front()), probabilities.size());
948  double x = randGeneral.shoot();
949  unsigned int index = x * probabilities.size() - 1;
950  const std::string& scenario = theProbabilitiesPerScenario.at(index).first;
951 
952  PixelFEDChannelCollection_ = std::make_unique<PixelFEDChannelCollection>(quality_map->at(scenario));
954  std::make_unique<PixelFEDChannelCollection>(quality_map->at(scenario));
955  }
956 
957  return PixelFEDChannelCollection_;
958 }

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

◆ chooseScenario() [2/2]

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

Definition at line 960 of file SiPixelDigitizerAlgorithm.cc.

961  {
962  //Determine scenario to use for the current event based on pileup information
963 
964  std::unique_ptr<PixelFEDChannelCollection> PixelFEDChannelCollection_ = nullptr;
966  if (puInfo) {
967  const std::vector<int>& bunchCrossing = puInfo->getMix_bunchCrossing();
968  const std::vector<float>& TrueInteractionList = puInfo->getMix_TrueInteractions();
969 
970  int pui = 0, p = 0;
971  std::vector<int>::const_iterator pu;
972  std::vector<int>::const_iterator pu0 = bunchCrossing.end();
973 
974  for (pu = bunchCrossing.begin(); pu != bunchCrossing.end(); ++pu) {
975  if (*pu == 0) {
976  pu0 = pu;
977  p = pui;
978  }
979  pui++;
980  }
981 
982  if (pu0 != bunchCrossing.end()) {
983  unsigned int PUBin = TrueInteractionList.at(p); // case delta PU=1, fix me
984  const auto& theProbabilitiesPerScenario = scenarioProbability_->getProbabilities(PUBin);
985  std::vector<double> probabilities;
986  probabilities.reserve(theProbabilitiesPerScenario.size());
987  for (auto it = theProbabilitiesPerScenario.begin(); it != theProbabilitiesPerScenario.end(); it++) {
988  probabilities.push_back(it->second);
989  }
990 
991  CLHEP::RandGeneral randGeneral(*engine, &(probabilities.front()), probabilities.size());
992  double x = randGeneral.shoot();
993  unsigned int index = x * probabilities.size() - 1;
994  const std::string& scenario = theProbabilitiesPerScenario.at(index).first;
995 
996  PixelFEDChannelCollection_ = std::make_unique<PixelFEDChannelCollection>(quality_map->at(scenario));
998  std::make_unique<PixelFEDChannelCollection>(quality_map->at(scenario));
999  }
1000  }
1001  return PixelFEDChannelCollection_;
1002 }

References PileupMixingContent::getMix_bunchCrossing(), PileupMixingContent::getMix_TrueInteractions(), SiPixelQualityProbabilities::getProbabilities(), AlCaHLTBitMon_ParallelJobs::p, pixelEfficiencies_, SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelFEDChannelCollection_, muons2muons_cfi::pu, quality_map, scenarioProbability_, 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 1016 of file SiPixelDigitizerAlgorithm.cc.

1020  {
1021  // Pixel Efficiency moved from the constructor to this method because
1022  // the information of the det are not available in the constructor
1023  // Efficiency parameters. 0 - no inefficiency, 1-low lumi, 10-high lumi
1024 
1025  uint32_t detID = pixdet->geographicalId().rawId();
1026  const signal_map_type& theSignal = _signal[detID];
1027 
1028  // Noise already defined in electrons
1029  // thePixelThresholdInE = thePixelThreshold * theNoiseInElectrons ;
1030  // Find the threshold in noise units, needed for the noiser.
1031 
1032  float thePixelThresholdInE = 0.;
1033 
1034  if (theNoiseInElectrons > 0.) {
1035  if (pixdet->type().isTrackerPixel() && pixdet->type().isBarrel()) { // Barrel modules
1036  int lay = tTopo->layer(detID);
1037  if (addThresholdSmearing) {
1040  if (lay == 1) {
1041  thePixelThresholdInE = CLHEP::RandGaussQ::shoot(
1042  engine, theThresholdInE_BPix_L1, theThresholdSmearing_BPix_L1); // gaussian smearing
1043  } else if (lay == 2) {
1044  thePixelThresholdInE = CLHEP::RandGaussQ::shoot(
1045  engine, theThresholdInE_BPix_L2, theThresholdSmearing_BPix_L2); // gaussian smearing
1046  } else {
1047  thePixelThresholdInE =
1048  CLHEP::RandGaussQ::shoot(engine, theThresholdInE_BPix, theThresholdSmearing_BPix); // gaussian smearing
1049  }
1050  }
1051  } else {
1054  if (lay == 1) {
1055  thePixelThresholdInE = theThresholdInE_BPix_L1;
1056  } else if (lay == 2) {
1057  thePixelThresholdInE = theThresholdInE_BPix_L2;
1058  } else {
1059  thePixelThresholdInE = theThresholdInE_BPix; // no smearing
1060  }
1061  }
1062  }
1063  } else if (pixdet->type().isTrackerPixel()) { // Forward disks modules
1064  if (addThresholdSmearing) {
1065  thePixelThresholdInE =
1066  CLHEP::RandGaussQ::shoot(engine, theThresholdInE_FPix, theThresholdSmearing_FPix); // gaussian smearing
1067  } else {
1068  thePixelThresholdInE = theThresholdInE_FPix; // no smearing
1069  }
1070  } else {
1071  throw cms::Exception("NotAPixelGeomDetUnit") << "Not a pixel geomdet unit" << detID;
1072  }
1073  }
1074 
1075 #ifdef TP_DEBUG
1076  const PixelTopology* topol = &pixdet->specificTopology();
1077  int numColumns = topol->ncolumns(); // det module number of cols&rows
1078  int numRows = topol->nrows();
1079  // full detector thickness
1080  float moduleThickness = pixdet->specificSurface().bounds().thickness();
1081  LogDebug("PixelDigitizer") << " PixelDigitizer " << numColumns << " " << numRows << " " << moduleThickness;
1082 #endif
1083 
1084  if (addNoise)
1085  add_noise(pixdet, thePixelThresholdInE / theNoiseInElectrons, engine); // generate noise
1086 
1087  // Do only if needed
1088 
1089  if ((AddPixelInefficiency) && (!theSignal.empty()))
1090  pixel_inefficiency(pixelEfficiencies_, pixdet, tTopo, engine); // Kill some pixels
1091 
1092  if (use_ineff_from_db_ && (!theSignal.empty()))
1093  pixel_inefficiency_db(detID);
1094 
1095  if (use_module_killing_) {
1096  if (use_deadmodule_DB_) { // remove dead modules using DB
1097  module_killing_DB(detID);
1098  } else { // remove dead modules using the list in cfg file
1099  module_killing_conf(detID);
1100  }
1101  }
1102 
1103  make_digis(thePixelThresholdInE, detID, pixdet, digis, simlinks, tTopo);
1104 
1105 #ifdef TP_DEBUG
1106  LogDebug("PixelDigitizer") << "[SiPixelDigitizerAlgorithm] converted " << digis.size() << " PixelDigis in DetUnit"
1107  << detID;
1108 #endif
1109 }

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 1246 of file SiPixelDigitizerAlgorithm.cc.

1251  {
1252 #ifdef TP_DEBUG
1253  LogDebug("Pixel Digitizer") << " enter drift ";
1254 #endif
1255 
1256  collection_points.resize(ionization_points.size()); // set size
1257 
1258  LocalVector driftDir = DriftDirection(pixdet, bfield, hit.detUnitId()); // get the charge drift direction
1259  if (driftDir.z() == 0.) {
1260  LogWarning("Magnetic field") << " pxlx: drift in z is zero ";
1261  return;
1262  }
1263 
1264  // tangent of Lorentz angle
1265  //float TanLorenzAngleX = driftDir.x()/driftDir.z();
1266  //float TanLorenzAngleY = 0.; // force to 0, driftDir.y()/driftDir.z();
1267 
1268  float TanLorenzAngleX, TanLorenzAngleY, dir_z, CosLorenzAngleX, CosLorenzAngleY;
1269  if (alpha2Order) {
1270  TanLorenzAngleX = driftDir.x(); // tangen of Lorentz angle
1271  TanLorenzAngleY = driftDir.y();
1272  dir_z = driftDir.z(); // The z drift direction
1273  CosLorenzAngleX = 1. / sqrt(1. + TanLorenzAngleX * TanLorenzAngleX); //cosine
1274  CosLorenzAngleY = 1. / sqrt(1. + TanLorenzAngleY * TanLorenzAngleY); //cosine;
1275 
1276  } else {
1277  TanLorenzAngleX = driftDir.x();
1278  TanLorenzAngleY = 0.; // force to 0, driftDir.y()/driftDir.z();
1279  dir_z = driftDir.z(); // The z drift direction
1280  CosLorenzAngleX = 1. / sqrt(1. + TanLorenzAngleX * TanLorenzAngleX); //cosine to estimate the path length
1281  CosLorenzAngleY = 1.;
1282  }
1283 
1284  float moduleThickness = pixdet->specificSurface().bounds().thickness();
1285 #ifdef TP_DEBUG
1286  LogDebug("Pixel Digitizer") << " Lorentz Tan " << TanLorenzAngleX << " " << TanLorenzAngleY << " " << CosLorenzAngleX
1287  << " " << CosLorenzAngleY << " " << moduleThickness * TanLorenzAngleX << " " << driftDir;
1288 #endif
1289 
1290  float Sigma_x = 1.; // Charge spread
1291  float Sigma_y = 1.;
1292  float DriftDistance; // Distance between charge generation and collection
1293  float DriftLength; // Actual Drift Lentgh
1294  float Sigma;
1295 
1296  for (unsigned int i = 0; i != ionization_points.size(); i++) {
1297  float SegX, SegY, SegZ; // position
1298  SegX = ionization_points[i].x();
1299  SegY = ionization_points[i].y();
1300  SegZ = ionization_points[i].z();
1301 
1302  // Distance from the collection plane
1303  //DriftDistance = (moduleThickness/2. + SegZ); // Drift to -z
1304  // Include explixitely the E drift direction (for CMS dir_z=-1)
1305  DriftDistance = moduleThickness / 2. - (dir_z * SegZ); // Drift to -z
1306 
1307  if (DriftDistance <= 0.)
1308  LogDebug("PixelDigitizer ") << " <=0 " << DriftDistance << " " << i << " " << SegZ << " " << dir_z << " " << SegX
1309  << " " << SegY << " " << (moduleThickness / 2) << " " << ionization_points[i].energy()
1310  << " " << hit.particleType() << " " << hit.pabs() << " " << hit.energyLoss() << " "
1311  << hit.entryPoint() << " " << hit.exitPoint() << "\n";
1312 
1313  if (DriftDistance < 0.) {
1314  DriftDistance = 0.;
1315  } else if (DriftDistance > moduleThickness)
1316  DriftDistance = moduleThickness;
1317 
1318  // Assume full depletion now, partial depletion will come later.
1319  float XDriftDueToMagField = DriftDistance * TanLorenzAngleX;
1320  float YDriftDueToMagField = DriftDistance * TanLorenzAngleY;
1321 
1322  // Shift cloud center
1323  float CloudCenterX = SegX + XDriftDueToMagField;
1324  float CloudCenterY = SegY + YDriftDueToMagField;
1325 
1326  // Calculate how long is the charge drift path
1327  DriftLength = sqrt(DriftDistance * DriftDistance + XDriftDueToMagField * XDriftDueToMagField +
1328  YDriftDueToMagField * YDriftDueToMagField);
1329 
1330  // What is the charge diffusion after this path
1331  Sigma = sqrt(DriftLength / Dist300) * Sigma0;
1332 
1333  // Project the diffusion sigma on the collection plane
1334  Sigma_x = Sigma / CosLorenzAngleX;
1335  Sigma_y = Sigma / CosLorenzAngleY;
1336 
1337  // Insert a charge loss due to Rad Damage here
1338  float energyOnCollector = ionization_points[i].energy(); // The energy that reaches the collector
1339 
1340  // add pixel aging
1341  if (AddPixelAging) {
1342  float kValue = pixel_aging(pixelAging_, pixdet, tTopo);
1343  energyOnCollector *= exp(-1 * kValue * DriftDistance / moduleThickness);
1344  }
1345 
1346 #ifdef TP_DEBUG
1347  LogDebug("Pixel Digitizer") << " Dift DistanceZ= " << DriftDistance << " module thickness= " << moduleThickness
1348  << " Start Energy= " << ionization_points[i].energy()
1349  << " Energy after loss= " << energyOnCollector;
1350 #endif
1351  SignalPoint sp(CloudCenterX, CloudCenterY, Sigma_x, Sigma_y, hit.tof(), energyOnCollector);
1352 
1353  // Load the Charge distribution parameters
1354  collection_points[i] = (sp);
1355 
1356  } // loop over ionization points, i.
1357 
1358 } // end drift

References AddPixelAging, alpha2Order, Surface::bounds(), Dist300, DriftDirection(), HCALHighEnergyHPDFilter_cfi::energy, 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 2172 of file SiPixelDigitizerAlgorithm.cc.

2174  {
2175  Frame detFrame(pixdet->surface().position(), pixdet->surface().rotation());
2176  LocalVector Bfield = detFrame.toLocal(bfield);
2177 
2178  float alpha2_FPix;
2179  float alpha2_BPix;
2180  float alpha2;
2181 
2182  //float dir_x = -tanLorentzAnglePerTesla * Bfield.y();
2183  //float dir_y = +tanLorentzAnglePerTesla * Bfield.x();
2184  //float dir_z = -1.; // E field always in z direction, so electrons go to -z
2185  // The dir_z has to be +/- 1. !
2186  // LocalVector theDriftDirection = LocalVector(dir_x,dir_y,dir_z);
2187 
2188  float dir_x = 0.0f;
2189  float dir_y = 0.0f;
2190  float dir_z = 0.0f;
2191  float scale = 0.0f;
2192 
2193  uint32_t detID = pixdet->geographicalId().rawId();
2194 
2195  // Read Lorentz angle from cfg file:**************************************************************
2196 
2197  if (!use_LorentzAngle_DB_) {
2198  if (alpha2Order) {
2201  } else {
2202  alpha2_FPix = 0.0f;
2203  alpha2_BPix = 0.0f;
2204  }
2205 
2206  if (pixdet->type().isTrackerPixel() && pixdet->type().isBarrel()) { // barrel layers
2207  dir_x = -(tanLorentzAnglePerTesla_BPix * Bfield.y() + alpha2_BPix * Bfield.z() * Bfield.x());
2208  dir_y = +(tanLorentzAnglePerTesla_BPix * Bfield.x() - alpha2_BPix * Bfield.z() * Bfield.y());
2209  dir_z = -(1 + alpha2_BPix * Bfield.z() * Bfield.z());
2210  scale = -dir_z;
2211  } else if (pixdet->type().isTrackerPixel()) { // forward disks
2212  dir_x = -(tanLorentzAnglePerTesla_FPix * Bfield.y() + alpha2_FPix * Bfield.z() * Bfield.x());
2213  dir_y = +(tanLorentzAnglePerTesla_FPix * Bfield.x() - alpha2_FPix * Bfield.z() * Bfield.y());
2214  dir_z = -(1 + alpha2_FPix * Bfield.z() * Bfield.z());
2215  scale = -dir_z;
2216  } else {
2217  throw cms::Exception("NotAPixelGeomDetUnit") << "Not a pixel geomdet unit" << detID;
2218  }
2219  } // end: Read LA from cfg file.
2220 
2221  //Read Lorentz angle from DB:********************************************************************
2222  if (use_LorentzAngle_DB_) {
2223  float lorentzAngle = SiPixelLorentzAngle_->getLorentzAngle(detId);
2224  alpha2 = lorentzAngle * lorentzAngle;
2225  dir_x = -(lorentzAngle * Bfield.y() + alpha2 * Bfield.z() * Bfield.x());
2226  dir_y = +(lorentzAngle * Bfield.x() - alpha2 * Bfield.z() * Bfield.y());
2227  dir_z = -(1 + alpha2 * Bfield.z() * Bfield.z());
2228  scale = -dir_z;
2229  } // end: Read LA from DataBase.
2230 
2231  LocalVector theDriftDirection = LocalVector(dir_x / scale, dir_y / scale, dir_z / scale);
2232 
2233 #ifdef TP_DEBUG
2234  LogDebug("Pixel Digitizer") << " The drift direction in local coordinate is " << theDriftDirection;
2235 #endif
2236 
2237  return theDriftDirection;
2238 }

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 1180 of file SiPixelDigitizerAlgorithm.cc.

1186  {
1187  // Get dedx for this track
1188  //float dedx;
1189  //if( length > 0.) dedx = eloss/length;
1190  //else dedx = eloss;
1191 
1192  double particleMass = 139.6; // Mass in MeV, Assume pion
1193  pid = std::abs(pid);
1194  if (pid != 211) { // Mass in MeV
1195  if (pid == 11)
1196  particleMass = 0.511;
1197  else if (pid == 13)
1198  particleMass = 105.7;
1199  else if (pid == 321)
1200  particleMass = 493.7;
1201  else if (pid == 2212)
1202  particleMass = 938.3;
1203  }
1204  // What is the track segment length.
1205  float segmentLength = length / NumberOfSegs;
1206 
1207  // Generate charge fluctuations.
1208  float de = 0.;
1209  float sum = 0.;
1210  double segmentEloss = (1000. * eloss) / NumberOfSegs; //eloss in MeV
1211  for (int i = 0; i < NumberOfSegs; i++) {
1212  // material,*, momentum,energy,*, *, mass
1213  //myglandz_(14.,segmentLength,2.,2.,dedx,de,0.14);
1214  // The G4 routine needs momentum in MeV, mass in Mev, delta-cut in MeV,
1215  // track segment length in mm, segment eloss in MeV
1216  // Returns fluctuated eloss in MeV
1217  double deltaCutoff = tMax; // the cutoff is sometimes redefined inside, so fix it.
1218  de = fluctuate->SampleFluctuations(double(particleMomentum * 1000.),
1219  particleMass,
1220  deltaCutoff,
1221  double(segmentLength * 10.),
1222  segmentEloss,
1223  engine) /
1224  1000.; //convert to GeV
1225  elossVector[i] = de;
1226  sum += de;
1227  }
1228 
1229  if (sum > 0.) { // If fluctuations give eloss>0.
1230  // Rescale to the same total eloss
1231  float ratio = eloss / sum;
1232 
1233  for (int ii = 0; ii < NumberOfSegs; ii++)
1234  elossVector[ii] = ratio * elossVector[ii];
1235  } else { // If fluctuations gives 0 eloss
1236  float averageEloss = eloss / NumberOfSegs;
1237  for (int ii = 0; ii < NumberOfSegs; ii++)
1238  elossVector[ii] = averageEloss;
1239  }
1240  return;
1241 }

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 size_t  FirstHitIndex,
const unsigned int  tofBin,
const PixelGeomDetUnit pixdet,
const std::vector< SignalPoint > &  collection_points 
)
private

Definition at line 1362 of file SiPixelDigitizerAlgorithm.cc.

1369  {
1370  // X - Rows, Left-Right, 160, (1.6cm) for barrel
1371  // Y - Columns, Down-Up, 416, (6.4cm)
1372 
1373  const PixelTopology* topol = &pixdet->specificTopology();
1374  uint32_t detID = pixdet->geographicalId().rawId();
1375  signal_map_type& theSignal = _signal[detID];
1376 
1377 #ifdef TP_DEBUG
1378  LogDebug("Pixel Digitizer") << " enter induce_signal, " << topol->pitch().first << " " << topol->pitch().second; //OK
1379 #endif
1380 
1381  // local map to store pixels hit by 1 Hit.
1382  typedef std::map<int, float, std::less<int> > hit_map_type;
1383  hit_map_type hit_signal;
1384 
1385  // map to store pixel integrals in the x and in the y directions
1386  std::map<int, float, std::less<int> > x, y;
1387 
1388  // Assign signals to readout channels and store sorted by channel number
1389 
1390  // Iterate over collection points on the collection plane
1391  for (std::vector<SignalPoint>::const_iterator i = collection_points.begin(); i != collection_points.end(); ++i) {
1392  float CloudCenterX = i->position().x(); // Charge position in x
1393  float CloudCenterY = i->position().y(); // in y
1394  float SigmaX = i->sigma_x(); // Charge spread in x
1395  float SigmaY = i->sigma_y(); // in y
1396  float Charge = i->amplitude(); // Charge amplitude
1397 
1398  if (SigmaX == 0 || SigmaY == 0) {
1399  LogDebug("Pixel Digitizer") << SigmaX << " " << SigmaY << " cloud " << i->position().x() << " "
1400  << i->position().y() << " " << i->sigma_x() << " " << i->sigma_y() << " "
1401  << i->amplitude() << "\n";
1402  }
1403 
1404 #ifdef TP_DEBUG
1405  LogDebug("Pixel Digitizer") << " cloud " << i->position().x() << " " << i->position().y() << " " << i->sigma_x()
1406  << " " << i->sigma_y() << " " << i->amplitude();
1407 #endif
1408 
1409  // Find the maximum cloud spread in 2D plane , assume 3*sigma
1410  float CloudRight = CloudCenterX + ClusterWidth * SigmaX;
1411  float CloudLeft = CloudCenterX - ClusterWidth * SigmaX;
1412  float CloudUp = CloudCenterY + ClusterWidth * SigmaY;
1413  float CloudDown = CloudCenterY - ClusterWidth * SigmaY;
1414 
1415  // Define 2D cloud limit points
1416  LocalPoint PointRightUp = LocalPoint(CloudRight, CloudUp);
1417  LocalPoint PointLeftDown = LocalPoint(CloudLeft, CloudDown);
1418 
1419  // This points can be located outside the sensor area.
1420  // The conversion to measurement point does not check for that
1421  // so the returned pixel index might be wrong (outside range).
1422  // We rely on the limits check below to fix this.
1423  // But remember whatever we do here THE CHARGE OUTSIDE THE ACTIVE
1424  // PIXEL AREA IS LOST, it should not be collected.
1425 
1426  // Convert the 2D points to pixel indices
1427  MeasurementPoint mp = topol->measurementPosition(PointRightUp); //OK
1428 
1429  int IPixRightUpX = int(floor(mp.x()));
1430  int IPixRightUpY = int(floor(mp.y()));
1431 
1432 #ifdef TP_DEBUG
1433  LogDebug("Pixel Digitizer") << " right-up " << PointRightUp << " " << mp.x() << " " << mp.y() << " " << IPixRightUpX
1434  << " " << IPixRightUpY;
1435 #endif
1436 
1437  mp = topol->measurementPosition(PointLeftDown); //OK
1438 
1439  int IPixLeftDownX = int(floor(mp.x()));
1440  int IPixLeftDownY = int(floor(mp.y()));
1441 
1442 #ifdef TP_DEBUG
1443  emd::LogDebug("Pixel Digitizer") << " left-down " << PointLeftDown << " " << mp.x() << " " << mp.y() << " "
1444  << IPixLeftDownX << " " << IPixLeftDownY;
1445 #endif
1446 
1447  // Check detector limits to correct for pixels outside range.
1448  int numColumns = topol->ncolumns(); // det module number of cols&rows
1449  int numRows = topol->nrows();
1450 
1451  IPixRightUpX = numRows > IPixRightUpX ? IPixRightUpX : numRows - 1;
1452  IPixRightUpY = numColumns > IPixRightUpY ? IPixRightUpY : numColumns - 1;
1453  IPixLeftDownX = 0 < IPixLeftDownX ? IPixLeftDownX : 0;
1454  IPixLeftDownY = 0 < IPixLeftDownY ? IPixLeftDownY : 0;
1455 
1456  x.clear(); // clear temporary integration array
1457  y.clear();
1458 
1459  // First integrate charge strips in x
1460  int ix; // TT for compatibility
1461  for (ix = IPixLeftDownX; ix <= IPixRightUpX; ix++) { // loop over x index
1462  float xUB, xLB, UpperBound, LowerBound;
1463 
1464  // Why is set to 0 if ix=0, does it meen that we accept charge
1465  // outside the sensor? CHeck How it was done in ORCA?
1466  //if(ix == 0) LowerBound = 0.;
1467  if (ix == 0 || SigmaX == 0.) // skip for surface segemnts
1468  LowerBound = 0.;
1469  else {
1470  mp = MeasurementPoint(float(ix), 0.0);
1471  xLB = topol->localPosition(mp).x();
1472  LowerBound = 1 - calcQ((xLB - CloudCenterX) / SigmaX);
1473  }
1474 
1475  if (ix == numRows - 1 || SigmaX == 0.)
1476  UpperBound = 1.;
1477  else {
1478  mp = MeasurementPoint(float(ix + 1), 0.0);
1479  xUB = topol->localPosition(mp).x();
1480  UpperBound = 1. - calcQ((xUB - CloudCenterX) / SigmaX);
1481  }
1482 
1483  float TotalIntegrationRange = UpperBound - LowerBound; // get strip
1484  x[ix] = TotalIntegrationRange; // save strip integral
1485  if (SigmaX == 0 || SigmaY == 0)
1486  LogDebug("Pixel Digitizer") << TotalIntegrationRange << " " << ix << "\n";
1487  }
1488 
1489  // Now integrate strips in y
1490  int iy; // TT for compatibility
1491  for (iy = IPixLeftDownY; iy <= IPixRightUpY; iy++) { //loope over y ind
1492  float yUB, yLB, UpperBound, LowerBound;
1493 
1494  if (iy == 0 || SigmaY == 0.)
1495  LowerBound = 0.;
1496  else {
1497  mp = MeasurementPoint(0.0, float(iy));
1498  yLB = topol->localPosition(mp).y();
1499  LowerBound = 1. - calcQ((yLB - CloudCenterY) / SigmaY);
1500  }
1501 
1502  if (iy == numColumns - 1 || SigmaY == 0.)
1503  UpperBound = 1.;
1504  else {
1505  mp = MeasurementPoint(0.0, float(iy + 1));
1506  yUB = topol->localPosition(mp).y();
1507  UpperBound = 1. - calcQ((yUB - CloudCenterY) / SigmaY);
1508  }
1509 
1510  float TotalIntegrationRange = UpperBound - LowerBound;
1511  y[iy] = TotalIntegrationRange; // save strip integral
1512  if (SigmaX == 0 || SigmaY == 0)
1513  LogDebug("Pixel Digitizer") << TotalIntegrationRange << " " << iy << "\n";
1514  }
1515 
1516  // Get the 2D charge integrals by folding x and y strips
1517  int chan;
1518  for (ix = IPixLeftDownX; ix <= IPixRightUpX; ix++) { // loop over x index
1519  for (iy = IPixLeftDownY; iy <= IPixRightUpY; iy++) { //loope over y ind
1520 
1521  float ChargeFraction = Charge * x[ix] * y[iy];
1522 
1523  if (ChargeFraction > 0.) {
1524  chan = PixelDigi::pixelToChannel(ix, iy); // Get index
1525  // Load the amplitude
1526  hit_signal[chan] += ChargeFraction;
1527  } // endif
1528 
1529 #ifdef TP_DEBUG
1530  mp = MeasurementPoint(float(ix), float(iy));
1531  LocalPoint lp = topol->localPosition(mp);
1532  chan = topol->channel(lp);
1533  LogDebug("Pixel Digitizer") << " pixel " << ix << " " << iy << " - "
1534  << " " << chan << " " << ChargeFraction << " " << mp.x() << " " << mp.y() << " "
1535  << lp.x() << " " << lp.y() << " " // givex edge position
1536  << chan; // edge belongs to previous ?
1537 #endif
1538 
1539  } // endfor iy
1540  } //endfor ix
1541 
1542  } // loop over charge distributions
1543 
1544  // Fill the global map with all hit pixels from this event
1545 
1546  bool reweighted = false;
1547  // size_t ReferenceIndex4CR=0;
1548  if (UseReweighting) {
1549  if (hit.processType() == 0) {
1550  // ReferenceIndex4CR=hitIndex;
1551  reweighted = TheNewSiPixelChargeReweightingAlgorithmClass->hitSignalReweight(
1552  hit, hit_signal, hitIndex, tofBin, topol, detID, theSignal, hit.processType(), makeDigiSimLinks_);
1553  } else {
1554  std::vector<PSimHit>::const_iterator crSimHit = inputBegin;
1555  // ReferenceIndex4CR=FirstHitIndex;
1556  // if the first hit in the same detId is not associated to the same trackId, try to find a better match
1557  if ((*inputBegin).trackId() != hit.trackId()) {
1558  // loop over all the hit from the 1st in the same detId to the hit itself to find the primary particle of the same trackId
1559  uint32_t detId = pixdet->geographicalId().rawId();
1560  size_t localIndex = FirstHitIndex;
1561  for (std::vector<PSimHit>::const_iterator ssbegin = inputBegin; localIndex < hitIndex;
1562  ++ssbegin, ++localIndex) {
1563  if ((*ssbegin).detUnitId() != detId) {
1564  continue;
1565  }
1566  if ((*ssbegin).trackId() == hit.trackId() && (*ssbegin).processType() == 0) {
1567  crSimHit = ssbegin;
1568  // ReferenceIndex4CR=localIndex;
1569  break;
1570  }
1571  }
1572  }
1573 
1574  reweighted = TheNewSiPixelChargeReweightingAlgorithmClass->hitSignalReweight(
1575  (*crSimHit), hit_signal, hitIndex, tofBin, topol, detID, theSignal, hit.processType(), makeDigiSimLinks_);
1576  }
1577  }
1578  if (!reweighted) {
1579  for (hit_map_type::const_iterator im = hit_signal.begin(); im != hit_signal.end(); ++im) {
1580  int chan = (*im).first;
1581  theSignal[chan] += (makeDigiSimLinks_ ? Amplitude((*im).second, &hit, hitIndex, tofBin, (*im).second)
1582  : Amplitude((*im).second, (*im).second));
1583 
1584 #ifdef TP_DEBUG
1585  std::pair<int, int> ip = PixelDigi::channelToPixel(chan);
1586  LogDebug("Pixel Digitizer") << " pixel " << ip.first << " " << ip.second << " " << theSignal[chan];
1587 #endif
1588  }
1589  }
1590 
1591 } // 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 107 of file SiPixelDigitizerAlgorithm.cc.

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

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

Referenced by PreMixingSiPixelWorker::initializeEvent().

◆ init_DynIneffDB()

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

◆ initCal()

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

Definition at line 351 of file SiPixelDigitizerAlgorithm.cc.

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

References calmap, officialStyle::chan, PixelIndices::channelToPixelROC(), 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, pfMETCorrectionType0_cfi::par0, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, pfMETCorrectionType0_cfi::par3, PixelIndices::pixelToChannelROC(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ initializeEvent()

void SiPixelDigitizerAlgorithm::initializeEvent ( )
inline

Definition at line 64 of file SiPixelDigitizerAlgorithm.h.

64 { _signal.clear(); }

References _signal.

Referenced by PreMixingSiPixelWorker::initializeEvent().

◆ killBadFEDChannels()

bool SiPixelDigitizerAlgorithm::killBadFEDChannels ( ) const

Definition at line 911 of file SiPixelDigitizerAlgorithm.cc.

911 { 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 1596 of file SiPixelDigitizerAlgorithm.cc.

1601  {
1602 #ifdef TP_DEBUG
1603  LogDebug("Pixel Digitizer") << " make digis "
1604  << " "
1605  << " pixel threshold FPix" << theThresholdInE_FPix << " "
1606  << " pixel threshold BPix" << theThresholdInE_BPix << " "
1607  << " pixel threshold BPix Layer1" << theThresholdInE_BPix_L1 << " "
1608  << " pixel threshold BPix Layer2" << theThresholdInE_BPix_L2 << " "
1609  << " List pixels passing threshold ";
1610 #endif
1611 
1612  // Loop over hit pixels
1613 
1614  signalMaps::const_iterator it = _signal.find(detID);
1615  if (it == _signal.end()) {
1616  return;
1617  }
1618 
1619  const signal_map_type& theSignal = (*it).second;
1620 
1621  // unsigned long is enough to store SimTrack id and EncodedEventId
1622  using TrackEventId = std::pair<decltype(SimTrack().trackId()), decltype(EncodedEventId().rawId())>;
1623  std::map<TrackEventId, float> simi; // re-used
1624 
1625  for (signal_map_const_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
1626  float signalInElectrons = (*i).second; // signal in electrons
1627 
1628  // Do the miss calibration for calibration studies only.
1629  //if(doMissCalibrate) signalInElectrons = missCalibrate(signalInElectrons)
1630 
1631  // Do only for pixels above threshold
1632 
1633  if (signalInElectrons >= thePixelThresholdInE &&
1634  signalInElectrons > 0.) { // check threshold, always reject killed (0-charge) digis
1635 
1636  int chan = (*i).first; // channel number
1637  std::pair<int, int> ip = PixelDigi::channelToPixel(chan);
1638  int adc = 0; // ADC count as integer
1639 
1640  // Do the miss calibration for calibration studies only.
1641  if (doMissCalibrate) {
1642  int row = ip.first; // X in row
1643  int col = ip.second; // Y is in col
1644  adc = int(missCalibrate(detID, tTopo, pixdet, col, row, signalInElectrons)); //full misscalib.
1645  } else { // Just do a simple electron->adc conversion
1646  adc = int(signalInElectrons / theElectronPerADC); // calibrate gain
1647  }
1648  adc = std::min(adc, theAdcFullScale); // Check maximum value
1649 #ifdef TP_DEBUG
1650  LogDebug("Pixel Digitizer") << (*i).first << " " << (*i).second << " " << signalInElectrons << " " << adc
1651  << ip.first << " " << ip.second;
1652 #endif
1653 
1654  // Load digis
1655  digis.emplace_back(ip.first, ip.second, adc);
1656 
1657  if (makeDigiSimLinks_ && !(*i).second.hitInfos().empty()) {
1658  //digilink
1659  unsigned int il = 0;
1660  for (const auto& info : (*i).second.hitInfos()) {
1661  // note: according to C++ standard operator[] does
1662  // value-initializiation, which for float means initial value of 0
1663  simi[std::make_pair(info.trackId(), info.eventId().rawId())] += (*i).second.individualampl()[il];
1664  il++;
1665  }
1666 
1667  //sum the contribution of the same trackid
1668  for (const auto& info : (*i).second.hitInfos()) {
1669  // skip if track already processed
1670  auto found = simi.find(std::make_pair(info.trackId(), info.eventId().rawId()));
1671  if (found == simi.end())
1672  continue;
1673 
1674  float sum_samechannel = found->second;
1675  float fraction = sum_samechannel / (*i).second;
1676  if (fraction > 1.f)
1677  fraction = 1.f;
1678 
1679  // Approximation: pick hitIndex and tofBin only from the first SimHit
1680  simlinks.emplace_back((*i).first, info.trackId(), info.hitIndex(), info.tofBin(), info.eventId(), fraction);
1681  simi.erase(found);
1682  }
1683  simi.clear(); // although should be empty already
1684  }
1685  }
1686  }
1687 }

References _signal, gpuClustering::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 2080 of file SiPixelDigitizerAlgorithm.cc.

2085  {
2086  // Central values
2087  //const float p0=0.00352, p1=0.868, p2=112., p3=113.; // pix(0,0,0)
2088  // const float p0=0.00382, p1=0.886, p2=112.7, p3=113.0; // average roc=0
2089  //const float p0=0.00492, p1=1.998, p2=90.6, p3=134.1; // average roc=6
2090  // Smeared (rms)
2091  //const float s0=0.00020, s1=0.051, s2=5.4, s3=4.4; // average roc=0
2092  //const float s0=0.00015, s1=0.043, s2=3.2, s3=3.1; // col average roc=0
2093 
2094  // Make 2 sets of parameters for Fpix and BPIx:
2095 
2096  float p0 = 0.0f;
2097  float p1 = 0.0f;
2098  float p2 = 0.0f;
2099  float p3 = 0.0f;
2100 
2101  if (pixdet->type().isTrackerPixel() && pixdet->type().isBarrel()) { // barrel layers
2102  p0 = BPix_p0;
2103  p1 = BPix_p1;
2104  p2 = BPix_p2;
2105  p3 = BPix_p3;
2106  } else if (pixdet->type().isTrackerPixel()) { // forward disks
2107  p0 = FPix_p0;
2108  p1 = FPix_p1;
2109  p2 = FPix_p2;
2110  p3 = FPix_p3;
2111  } else {
2112  throw cms::Exception("NotAPixelGeomDetUnit") << "Not a pixel geomdet unit" << detID;
2113  }
2114 
2115  float newAmp = 0.f; //Modified signal
2116 
2117  // Convert electrons to VCAL units
2118  float signal = (signalInElectrons - electronsPerVCAL_Offset) / electronsPerVCAL;
2119 
2120  // New gains/offsets are needed for phase1 L1
2121  int layer = 0;
2122  if (DetId(detID).subdetId() == 1)
2123  layer = tTopo->pxbLayer(detID);
2124  if (layer == 1)
2125  signal = (signalInElectrons - electronsPerVCAL_L1_Offset) / electronsPerVCAL_L1;
2126 
2127  // Simulate the analog response with fixed parametrization
2128  newAmp = p3 + p2 * tanh(p0 * signal - p1);
2129 
2130  // Use the pixel-by-pixel calibrations
2131  //transform to ROC index coordinates
2132  //int chipIndex=0, colROC=0, rowROC=0;
2133  //std::unique_ptr<PixelIndices> pIndexConverter(new PixelIndices(numColumns,numRows));
2134  //pIndexConverter->transformToROC(col,row,chipIndex,colROC,rowROC);
2135 
2136  // Use calibration from a file
2137  //int chanROC = PixelIndices::pixelToChannelROC(rowROC,colROC); // use ROC coordinates
2138  //float pp0=0, pp1=0,pp2=0,pp3=0;
2139  //map<int,CalParameters,std::less<int> >::const_iterator it=calmap.find(chanROC);
2140  //CalParameters y = (*it).second;
2141  //pp0 = y.p0;
2142  //pp1 = y.p1;
2143  //pp2 = y.p2;
2144  //pp3 = y.p3;
2145 
2146  //
2147  // Use random smearing
2148  // Randomize the pixel response
2149  //float pp0 = RandGaussQ::shoot(p0,s0);
2150  //float pp1 = RandGaussQ::shoot(p1,s1);
2151  //float pp2 = RandGaussQ::shoot(p2,s2);
2152  //float pp3 = RandGaussQ::shoot(p3,s3);
2153 
2154  //newAmp = pp3 + pp2 * tanh(pp0*signal - pp1); // Final signal
2155 
2156  LogDebug("Pixel Digitizer") << " misscalibrate " << col << " " << row
2157  << " "
2158  // <<chipIndex<<" " <<colROC<<" " <<rowROC<<" "
2159  << signalInElectrons << " " << signal << " " << newAmp << " "
2160  << (signalInElectrons / theElectronPerADC) << "\n";
2161 
2162  return newAmp;
2163 }

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

Referenced by make_digis().

◆ module_killing_conf()

void SiPixelDigitizerAlgorithm::module_killing_conf ( uint32_t  detID)
private

Definition at line 2262 of file SiPixelDigitizerAlgorithm.cc.

2262  {
2263  bool isbad = false;
2264 
2265  Parameters::const_iterator itDeadModules = DeadModules.begin();
2266 
2267  int detid = detID;
2268  for (; itDeadModules != DeadModules.end(); ++itDeadModules) {
2269  int Dead_detID = itDeadModules->getParameter<int>("Dead_detID");
2270  if (detid == Dead_detID) {
2271  isbad = true;
2272  break;
2273  }
2274  }
2275 
2276  if (!isbad)
2277  return;
2278 
2279  signal_map_type& theSignal = _signal[detID];
2280 
2281  std::string Module = itDeadModules->getParameter<std::string>("Module");
2282 
2283  if (Module == "whole") {
2284  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
2285  i->second.set(0.); // reset amplitude
2286  }
2287  }
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  if (Module == "tbmA" && ip.first >= 80 && ip.first <= 159) {
2293  i->second.set(0.);
2294  }
2295 
2296  if (Module == "tbmB" && ip.first <= 79) {
2297  i->second.set(0.);
2298  }
2299  }
2300 }

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 2302 of file SiPixelDigitizerAlgorithm.cc.

2302  {
2303  // Not SLHC safe for now
2304 
2305  bool isbad = false;
2306 
2307  std::vector<SiPixelQuality::disabledModuleType> disabledModules = SiPixelBadModule_->getBadComponentList();
2308 
2310 
2311  for (size_t id = 0; id < disabledModules.size(); id++) {
2312  if (detID == disabledModules[id].DetID) {
2313  isbad = true;
2314  badmodule = disabledModules[id];
2315  break;
2316  }
2317  }
2318 
2319  if (!isbad)
2320  return;
2321 
2322  signal_map_type& theSignal = _signal[detID];
2323 
2324  LogDebug("Pixel Digitizer") << "Hit in: " << detID << " errorType " << badmodule.errorType << " BadRocs=" << std::hex
2325  << SiPixelBadModule_->getBadRocs(detID) << std::dec << " "
2326  << "\n";
2327  if (badmodule.errorType == 0) { // this is a whole dead module.
2328 
2329  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
2330  i->second.set(0.); // reset amplitude
2331  }
2332  } else { // all other module types: half-modules and single ROCs.
2333  // Get Bad ROC position:
2334  //follow the example of getBadRocPositions in CondFormats/SiPixelObjects/src/SiPixelQuality.cc
2335  std::vector<GlobalPixel> badrocpositions(0);
2336  for (unsigned int j = 0; j < 16; j++) {
2337  if (SiPixelBadModule_->IsRocBad(detID, j) == true) {
2338  std::vector<CablingPathToDetUnit> path = map_->pathToDetUnit(detID);
2339  typedef std::vector<CablingPathToDetUnit>::const_iterator IT;
2340  for (IT it = path.begin(); it != path.end(); ++it) {
2341  const PixelROC* myroc = map_->findItem(*it);
2342  if (myroc->idInDetUnit() == j) {
2343  LocalPixel::RocRowCol local = {39, 25}; //corresponding to center of ROC row, col
2344  GlobalPixel global = myroc->toGlobal(LocalPixel(local));
2345  badrocpositions.push_back(global);
2346  break;
2347  }
2348  }
2349  }
2350  } // end of getBadRocPositions
2351 
2352  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
2353  std::pair<int, int> ip = PixelDigi::channelToPixel(i->first); //get pixel pos
2354 
2355  for (std::vector<GlobalPixel>::const_iterator it = badrocpositions.begin(); it != badrocpositions.end(); ++it) {
2356  if (it->row >= 80 && ip.first >= 80) {
2357  if ((std::abs(ip.second - it->col) < 26)) {
2358  i->second.set(0.);
2359  } else if (it->row == 120 && ip.second - it->col == 26) {
2360  i->second.set(0.);
2361  } else if (it->row == 119 && it->col - ip.second == 26) {
2362  i->second.set(0.);
2363  }
2364  } else if (it->row < 80 && ip.first < 80) {
2365  if ((std::abs(ip.second - it->col) < 26)) {
2366  i->second.set(0.);
2367  } else if (it->row == 40 && ip.second - it->col == 26) {
2368  i->second.set(0.);
2369  } else if (it->row == 39 && it->col - ip.second == 26) {
2370  i->second.set(0.);
2371  }
2372  }
2373  }
2374  }
2375  }
2376 }

References _signal, funct::abs(), PixelDigi::channelToPixel(), TauDecayModes::dec, SiPixelQuality::disabledModuleType::errorType, SiPixelFedCablingMap::findItem(), SiPixelQuality::getBadComponentList(), SiPixelQuality::getBadRocs(), mps_fire::i, triggerObjects_cff::id, sipixelobjects::PixelROC::idInDetUnit(), SiPixelQuality::IsRocBad(), dqmiolumiharvest::j, DTRecHitClients_cfi::local, LogDebug, map_, castor_dqm_sourceclient_file_cfg::path, SiPixelFedCablingMap::pathToDetUnit(), 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 2024 of file SiPixelDigitizerAlgorithm.cc.

2026  {
2027  uint32_t detID = pixdet->geographicalId().rawId();
2028 
2029  // Predefined damage parameter (no aging)
2030  float pseudoRadDamage = 0.0f;
2031 
2032  // setup the chip indices conversion
2034  pixdet->subDetector() == GeomDetEnumerators::SubDetector::P1PXB) { // barrel layers
2035  int layerIndex = tTopo->layer(detID);
2036 
2037  pseudoRadDamage = aging.thePixelPseudoRadDamage[layerIndex - 1];
2038 
2039  LogDebug("Pixel Digitizer") << "pixel_aging: "
2040  << "\n";
2041  LogDebug("Pixel Digitizer") << "Subid " << pixdet->subDetector() << " layerIndex " << layerIndex << " ladder "
2042  << tTopo->pxbLadder(detID) << " module " << tTopo->pxbModule(detID) << "\n";
2043 
2046  pixdet->subDetector() == GeomDetEnumerators::SubDetector::P2PXEC) { // forward disks
2047  unsigned int diskIndex =
2048  tTopo->layer(detID) + aging.FPixIndex; // Use diskIndex-1 later to stay consistent with BPix
2049 
2050  pseudoRadDamage = aging.thePixelPseudoRadDamage[diskIndex - 1];
2051 
2052  LogDebug("Pixel Digitizer") << "pixel_aging: "
2053  << "\n";
2054  LogDebug("Pixel Digitizer") << "Subid " << pixdet->subDetector() << " diskIndex " << diskIndex << "\n";
2055  } else if (pixdet->subDetector() == GeomDetEnumerators::SubDetector::P2OTB ||
2057  // if phase 2 OT hardcoded value as it has always been
2058  pseudoRadDamage = 0.f;
2059  } // if barrel/forward
2060 
2061  LogDebug("Pixel Digitizer") << " pseudoRadDamage " << pseudoRadDamage << "\n";
2062  LogDebug("Pixel Digitizer") << " end pixel_aging "
2063  << "\n";
2064 
2065  return pseudoRadDamage;
2066 #ifdef TP_DEBUG
2067  LogDebug("Pixel Digitizer") << " enter pixel_aging " << pseudoRadDamage;
2068 #endif
2069 }

References GeomDet::geographicalId(), TrackerTopology::layer(), LogDebug, GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, GeomDetEnumerators::P2OTB, GeomDetEnumerators::P2OTEC, GeomDetEnumerators::P2PXEC, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, TrackerTopology::pxbLadder(), TrackerTopology::pxbModule(), 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 1795 of file SiPixelDigitizerAlgorithm.cc.

1798  {
1799  uint32_t detID = pixdet->geographicalId().rawId();
1800  signal_map_type& theSignal = _signal[detID];
1801  const PixelTopology* topol = &pixdet->specificTopology();
1802  int numColumns = topol->ncolumns(); // det module number of cols&rows
1803  int numRows = topol->nrows();
1806  // Predefined efficiencies
1807  double pixelEfficiency = 1.0;
1808  double columnEfficiency = 1.0;
1809  double chipEfficiency = 1.0;
1810  std::vector<double> pixelEfficiencyROCStdPixels(16, 1);
1811  std::vector<double> pixelEfficiencyROCBigPixels(16, 1);
1812 
1813  auto pIndexConverter = PixelIndices(numColumns, numRows);
1814 
1815  std::vector<int> badRocsFromFEDChannels(16, 0);
1816  if (eff.PixelFEDChannelCollection_ != nullptr) {
1817  PixelFEDChannelCollection::const_iterator it = eff.PixelFEDChannelCollection_->find(detID);
1818 
1819  if (it != eff.PixelFEDChannelCollection_->end()) {
1820  const std::vector<CablingPathToDetUnit>& path = map_->pathToDetUnit(detID);
1821  for (const auto& ch : *it) {
1822  for (unsigned int i_roc = ch.roc_first; i_roc <= ch.roc_last; ++i_roc) {
1823  for (const auto p : path) {
1824  const PixelROC* myroc = map_->findItem(p);
1825  if (myroc->idInDetUnit() == static_cast<unsigned int>(i_roc)) {
1826  LocalPixel::RocRowCol local = {39, 25}; //corresponding to center of ROC row,col
1827  GlobalPixel global = myroc->toGlobal(LocalPixel(local));
1828  int chipIndex(0), colROC(0), rowROC(0);
1829  pIndexConverter.transformToROC(global.col, global.row, chipIndex, colROC, rowROC);
1830  badRocsFromFEDChannels.at(chipIndex) = 1;
1831  }
1832  }
1833  }
1834  } // loop over channels
1835  } // detID in PixelFEDChannelCollection_
1836  } // has PixelFEDChannelCollection_
1837 
1838  if (eff.FromConfig) {
1839  // setup the chip indices conversion
1841  pixdet->subDetector() == GeomDetEnumerators::SubDetector::P1PXB) { // barrel layers
1842  int layerIndex = tTopo->layer(detID);
1843  pixelEfficiency = eff.thePixelEfficiency[layerIndex - 1];
1844  columnEfficiency = eff.thePixelColEfficiency[layerIndex - 1];
1845  chipEfficiency = eff.thePixelChipEfficiency[layerIndex - 1];
1846  LogDebug("Pixel Digitizer") << "Using BPix columnEfficiency = " << columnEfficiency
1847  << " for layer = " << layerIndex << "\n";
1848  // This should never happen, but only check if it is not an upgrade geometry
1849  if (NumberOfBarrelLayers == 3) {
1850  if (numColumns > 416)
1851  LogWarning("Pixel Geometry") << " wrong columns in barrel " << numColumns;
1852  if (numRows > 160)
1853  LogWarning("Pixel Geometry") << " wrong rows in barrel " << numRows;
1854 
1855  int ladder = tTopo->pxbLadder(detID);
1856  int module = tTopo->pxbModule(detID);
1857  if (module <= 4)
1858  module = 5 - module;
1859  else
1860  module -= 4;
1861 
1862  columnEfficiency *= eff.theLadderEfficiency_BPix[layerIndex - 1][ladder - 1] *
1863  eff.theModuleEfficiency_BPix[layerIndex - 1][module - 1] * eff.pu_scale[layerIndex - 1];
1864  }
1867  pixdet->subDetector() == GeomDetEnumerators::SubDetector::P2PXEC) { // forward disks
1868 
1869  unsigned int diskIndex =
1870  tTopo->layer(detID) + eff.FPixIndex; // Use diskIndex-1 later to stay consistent with BPix
1871  unsigned int panelIndex = tTopo->pxfPanel(detID);
1872  unsigned int moduleIndex = tTopo->pxfModule(detID);
1873  //if (eff.FPixIndex>diskIndex-1){throw cms::Exception("Configuration") <<"SiPixelDigitizer is using the wrong efficiency value. index = "
1874  // <<diskIndex-1<<" , MinIndex = "<<eff.FPixIndex<<" ... "<<tTopo->pxfDisk(detID);}
1875  pixelEfficiency = eff.thePixelEfficiency[diskIndex - 1];
1876  columnEfficiency = eff.thePixelColEfficiency[diskIndex - 1];
1877  chipEfficiency = eff.thePixelChipEfficiency[diskIndex - 1];
1878  LogDebug("Pixel Digitizer") << "Using FPix columnEfficiency = " << columnEfficiency
1879  << " for Disk = " << tTopo->pxfDisk(detID) << "\n";
1880  // Sometimes the forward pixels have wrong size,
1881  // this crashes the index conversion, so exit, but only check if it is not an upgrade geometry
1882  if (NumberOfBarrelLayers ==
1883  3) { // whether it is the present or the phase 1 detector can be checked using GeomDetEnumerators::SubDetector
1884  if (numColumns > 260 || numRows > 160) {
1885  if (numColumns > 260)
1886  LogWarning("Pixel Geometry") << " wrong columns in endcaps " << numColumns;
1887  if (numRows > 160)
1888  LogWarning("Pixel Geometry") << " wrong rows in endcaps " << numRows;
1889  return;
1890  }
1891  if ((panelIndex == 1 && (moduleIndex == 1 || moduleIndex == 2)) ||
1892  (panelIndex == 2 && moduleIndex == 1)) { //inner modules
1893  columnEfficiency *= eff.theInnerEfficiency_FPix[diskIndex - 1] * eff.pu_scale[3];
1894  } else { //outer modules
1895  columnEfficiency *= eff.theOuterEfficiency_FPix[diskIndex - 1] * eff.pu_scale[4];
1896  }
1897  } // current detector, forward
1898  } else if (pixdet->subDetector() == GeomDetEnumerators::SubDetector::P2OTB ||
1900  // If phase 2 outer tracker, hardcoded values as they have been so far
1901  pixelEfficiency = 0.999;
1902  columnEfficiency = 0.999;
1903  chipEfficiency = 0.999;
1904  } // if barrel/forward
1905  } else { // Load precomputed factors from Database
1906  pixelEfficiency = eff.PixelGeomFactors.at(detID);
1907  columnEfficiency = eff.ColGeomFactors.at(detID) * eff.pu_scale[eff.iPU.at(detID)];
1908  chipEfficiency = eff.ChipGeomFactors.at(detID);
1909  if (isPhase1) {
1910  for (unsigned int i_roc = 0; i_roc < eff.PixelGeomFactorsROCStdPixels.at(detID).size(); ++i_roc) {
1911  pixelEfficiencyROCStdPixels[i_roc] = eff.PixelGeomFactorsROCStdPixels.at(detID).at(i_roc);
1912  pixelEfficiencyROCBigPixels[i_roc] = eff.PixelGeomFactorsROCBigPixels.at(detID).at(i_roc);
1913  }
1914  } // is Phase 1
1915  }
1916 
1917 #ifdef TP_DEBUG
1918  LogDebug("Pixel Digitizer") << " enter pixel_inefficiency " << pixelEfficiency << " " << columnEfficiency << " "
1919  << chipEfficiency;
1920 #endif
1921 
1922  // Initilize the index converter
1923  //PixelIndices indexConverter(numColumns,numRows);
1924 
1925  int chipIndex = 0;
1926  int rowROC = 0;
1927  int colROC = 0;
1928  std::map<int, int, std::less<int> > chips, columns, pixelStd, pixelBig;
1929  std::map<int, int, std::less<int> >::iterator iter;
1930 
1931  // Find out the number of columns and rocs hits
1932  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1933  for (signal_map_const_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
1934  int chan = i->first;
1935  std::pair<int, int> ip = PixelDigi::channelToPixel(chan);
1936  int row = ip.first; // X in row
1937  int col = ip.second; // Y is in col
1938  //transform to ROC index coordinates
1939  pIndexConverter.transformToROC(col, row, chipIndex, colROC, rowROC);
1940  int dColInChip = pIndexConverter.DColumn(colROC); // get ROC dcol from ROC col
1941  //dcol in mod
1942  int dColInDet = pIndexConverter.DColumnInModule(dColInChip, chipIndex);
1943 
1944  chips[chipIndex]++;
1945  columns[dColInDet]++;
1946  if (isPhase1) {
1947  if (topol->isItBigPixelInX(row) || topol->isItBigPixelInY(col))
1948  pixelBig[chipIndex]++;
1949  else
1950  pixelStd[chipIndex]++;
1951  }
1952  }
1953 
1954  // Delete some ROC hits.
1955  for (iter = chips.begin(); iter != chips.end(); iter++) {
1956  //float rand = RandFlat::shoot();
1957  float rand = CLHEP::RandFlat::shoot(engine);
1958  if (rand > chipEfficiency)
1959  chips[iter->first] = 0;
1960  }
1961 
1962  // Delete some Dcol hits.
1963  for (iter = columns.begin(); iter != columns.end(); iter++) {
1964  //float rand = RandFlat::shoot();
1965  float rand = CLHEP::RandFlat::shoot(engine);
1966  if (rand > columnEfficiency)
1967  columns[iter->first] = 0;
1968  }
1969 
1970  // Delete some pixel hits based on DCDC issue damage.
1971  if (isPhase1) {
1972  for (iter = pixelStd.begin(); iter != pixelStd.end(); iter++) {
1973  float rand = CLHEP::RandFlat::shoot(engine);
1974  if (rand > pixelEfficiencyROCStdPixels[iter->first])
1975  pixelStd[iter->first] = 0;
1976  }
1977 
1978  for (iter = pixelBig.begin(); iter != pixelBig.end(); iter++) {
1979  float rand = CLHEP::RandFlat::shoot(engine);
1980  if (rand > pixelEfficiencyROCBigPixels[iter->first])
1981  pixelBig[iter->first] = 0;
1982  }
1983  }
1984 
1985  // Now loop again over pixels to kill some of them.
1986  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
1987  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
1988  // int chan = i->first;
1989  std::pair<int, int> ip = PixelDigi::channelToPixel(i->first); //get pixel pos
1990  int row = ip.first; // X in row
1991  int col = ip.second; // Y is in col
1992  //transform to ROC index coordinates
1993  pIndexConverter.transformToROC(col, row, chipIndex, colROC, rowROC);
1994  int dColInChip = pIndexConverter.DColumn(colROC); //get ROC dcol from ROC col
1995  //dcol in mod
1996  int dColInDet = pIndexConverter.DColumnInModule(dColInChip, chipIndex);
1997 
1998  //float rand = RandFlat::shoot();
1999  float rand = CLHEP::RandFlat::shoot(engine);
2000  if (chips[chipIndex] == 0 || columns[dColInDet] == 0 || rand > pixelEfficiency ||
2001  (pixelStd.count(chipIndex) && pixelStd[chipIndex] == 0) ||
2002  (pixelBig.count(chipIndex) && pixelBig[chipIndex] == 0)) {
2003  // make pixel amplitude =0, pixel will be lost at clusterization
2004  i->second.set(0.); // reset amplitude,
2005  } // end if
2006  if (isPhase1) {
2007  if ((pixelStd.count(chipIndex) && pixelStd[chipIndex] == 0) ||
2008  (pixelBig.count(chipIndex) && pixelBig[chipIndex] == 0) || (badRocsFromFEDChannels.at(chipIndex) == 1)) {
2009  //============================================================
2010  // make pixel amplitude =0, pixel will be lost at clusterization
2011  i->second.set(0.); // reset amplitude,
2012  } // end if
2013  } // is Phase 1
2014  if (KillBadFEDChannels && badRocsFromFEDChannels.at(chipIndex) == 1) {
2015  i->second.set(0.);
2016  }
2017  } // end pixel loop
2018 } // 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_, callgraph::module, 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, SiPixelDigitizerAlgorithm::PixelEfficiencies::pu_scale, TrackerTopology::pxbLadder(), TrackerTopology::pxbModule(), TrackerTopology::pxfDisk(), 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 2242 of file SiPixelDigitizerAlgorithm.cc.

2242  {
2243  signal_map_type& theSignal = _signal[detID];
2244 
2245  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
2246  for (signal_map_iterator i = theSignal.begin(); i != theSignal.end(); ++i) {
2247  // int chan = i->first;
2248  std::pair<int, int> ip = PixelDigi::channelToPixel(i->first); //get pixel pos
2249  int row = ip.first; // X in row
2250  int col = ip.second; // Y is in col
2251  //transform to ROC index coordinates
2252  if (theSiPixelGainCalibrationService_->isDead(detID, col, row)) {
2253  LogDebug("Pixel Digitizer") << "now in isdead check, row " << detID << " " << col << "," << row << "\n";
2254  // make pixel amplitude =0, pixel will be lost at clusterization
2255  i->second.set(0.); // reset amplitude,
2256  } // end if
2257  } // end pixel loop
2258 } // end pixel_indefficiency

References _signal, PixelDigi::channelToPixel(), cuy::col, mps_fire::i, LogDebug, 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 1114 of file SiPixelDigitizerAlgorithm.cc.

1116  {
1117  // Straight line approximation for trajectory inside active media
1118 
1119  const float SegmentLength = 0.0010; //10microns in cm
1120  float energy;
1121 
1122  // Get the 3D segment direction vector
1123  LocalVector direction = hit.exitPoint() - hit.entryPoint();
1124 
1125  float eLoss = hit.energyLoss(); // Eloss in GeV
1126  float length = direction.mag(); // Track length in Silicon
1127 
1128  int NumberOfSegments = int(length / SegmentLength); // Number of segments
1129  if (NumberOfSegments < 1)
1130  NumberOfSegments = 1;
1131 
1132 #ifdef TP_DEBUG
1133  LogDebug("Pixel Digitizer") << " enter primary_ionzation " << NumberOfSegments
1134  << " shift = " << (hit.exitPoint().x() - hit.entryPoint().x()) << " "
1135  << (hit.exitPoint().y() - hit.entryPoint().y()) << " "
1136  << (hit.exitPoint().z() - hit.entryPoint().z()) << " " << hit.particleType() << " "
1137  << hit.pabs();
1138 #endif
1139 
1140  float* elossVector = new float[NumberOfSegments]; // Eloss vector
1141 
1142  if (fluctuateCharge) {
1143  //MP DA RIMUOVERE ASSOLUTAMENTE
1144  int pid = hit.particleType();
1145  //int pid=211; // assume it is a pion
1146 
1147  float momentum = hit.pabs();
1148  // Generate fluctuated charge points
1149  fluctuateEloss(pid, momentum, eLoss, length, NumberOfSegments, elossVector, engine);
1150  }
1151 
1152  ionization_points.resize(NumberOfSegments); // set size
1153 
1154  // loop over segments
1155  for (int i = 0; i != NumberOfSegments; i++) {
1156  // Divide the segment into equal length subsegments
1157  Local3DPoint point = hit.entryPoint() + float((i + 0.5) / NumberOfSegments) * direction;
1158 
1159  if (fluctuateCharge)
1160  energy = elossVector[i] / GeVperElectron; // Convert charge to elec.
1161  else
1162  energy = hit.energyLoss() / GeVperElectron / float(NumberOfSegments);
1163 
1164  EnergyDepositUnit edu(energy, point); //define position,energy point
1165  ionization_points[i] = edu; // save
1166 
1167 #ifdef TP_DEBUG
1168  LogDebug("Pixel Digitizer") << i << " " << ionization_points[i].x() << " " << ionization_points[i].y() << " "
1169  << ionization_points[i].z() << " " << ionization_points[i].energy();
1170 #endif
1171 
1172  } // end for loop
1173 
1174  delete[] elossVector;
1175 }

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 1005 of file SiPixelDigitizerAlgorithm.cc.

1005  {
1006  for (const auto& det : signalMap) {
1007  auto& theSignal = _signal[det.first];
1008  for (const auto& chan : det.second) {
1009  theSignal[chan.first].set(chan.second *
1010  theElectronPerADC); // will get divided again by theElectronPerAdc in digitize...
1011  }
1012  }
1013 }

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 380 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise().

◆ addNoise

const bool SiPixelDigitizerAlgorithm::addNoise
private

Definition at line 379 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ addNoisyPixels

const bool SiPixelDigitizerAlgorithm::addNoisyPixels
private

Definition at line 381 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise().

◆ AddPixelAging

const bool SiPixelDigitizerAlgorithm::AddPixelAging
private

Definition at line 395 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift().

◆ AddPixelInefficiency

const bool SiPixelDigitizerAlgorithm::AddPixelInefficiency
private

◆ addThresholdSmearing

const bool SiPixelDigitizerAlgorithm::addThresholdSmearing
private

Definition at line 387 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ alpha2Order

const bool SiPixelDigitizerAlgorithm::alpha2Order
private

Definition at line 334 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift(), and DriftDirection().

◆ BPix_p0

const float SiPixelDigitizerAlgorithm::BPix_p0
private

Definition at line 373 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ BPix_p1

const float SiPixelDigitizerAlgorithm::BPix_p1
private

Definition at line 374 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ BPix_p2

const float SiPixelDigitizerAlgorithm::BPix_p2
private

Definition at line 375 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ BPix_p3

const float SiPixelDigitizerAlgorithm::BPix_p3
private

Definition at line 376 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ calmap

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

Definition at line 411 of file SiPixelDigitizerAlgorithm.h.

Referenced by initCal().

◆ ClusterWidth

const float SiPixelDigitizerAlgorithm::ClusterWidth
private

Definition at line 337 of file SiPixelDigitizerAlgorithm.h.

Referenced by induce_signal().

◆ DeadModules

const Parameters SiPixelDigitizerAlgorithm::DeadModules
private

Definition at line 321 of file SiPixelDigitizerAlgorithm.h.

Referenced by module_killing_conf().

◆ Dist300

const float SiPixelDigitizerAlgorithm::Dist300
private

Definition at line 333 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift().

◆ doMissCalibrate

const bool SiPixelDigitizerAlgorithm::doMissCalibrate
private

Definition at line 390 of file SiPixelDigitizerAlgorithm.h.

Referenced by make_digis().

◆ electronsPerVCAL

const float SiPixelDigitizerAlgorithm::electronsPerVCAL
private

Definition at line 359 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ electronsPerVCAL_L1

const float SiPixelDigitizerAlgorithm::electronsPerVCAL_L1
private

Definition at line 361 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ electronsPerVCAL_L1_Offset

const float SiPixelDigitizerAlgorithm::electronsPerVCAL_L1_Offset
private

Definition at line 362 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ electronsPerVCAL_Offset

const float SiPixelDigitizerAlgorithm::electronsPerVCAL_Offset
private

Definition at line 360 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ fluctuate

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

Definition at line 407 of file SiPixelDigitizerAlgorithm.h.

Referenced by fluctuateEloss().

◆ fluctuateCharge

const bool SiPixelDigitizerAlgorithm::fluctuateCharge
private

Definition at line 382 of file SiPixelDigitizerAlgorithm.h.

Referenced by primary_ionization().

◆ FPix_p0

const float SiPixelDigitizerAlgorithm::FPix_p0
private

Definition at line 369 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ FPix_p1

const float SiPixelDigitizerAlgorithm::FPix_p1
private

Definition at line 370 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ FPix_p2

const float SiPixelDigitizerAlgorithm::FPix_p2
private

Definition at line 371 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ FPix_p3

const float SiPixelDigitizerAlgorithm::FPix_p3
private

Definition at line 372 of file SiPixelDigitizerAlgorithm.h.

Referenced by missCalibrate().

◆ geom_

const TrackerGeometry* SiPixelDigitizerAlgorithm::geom_ = nullptr
private

Definition at line 161 of file SiPixelDigitizerAlgorithm.h.

Referenced by init_DynIneffDB().

◆ geomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiPixelDigitizerAlgorithm::geomToken_
private

Definition at line 159 of file SiPixelDigitizerAlgorithm.h.

◆ GeVperElectron

const float SiPixelDigitizerAlgorithm::GeVperElectron
private

Definition at line 329 of file SiPixelDigitizerAlgorithm.h.

Referenced by primary_ionization().

◆ KillBadFEDChannels

const bool SiPixelDigitizerAlgorithm::KillBadFEDChannels
private

◆ makeDigiSimLinks_

const bool SiPixelDigitizerAlgorithm::makeDigiSimLinks_
private

Definition at line 314 of file SiPixelDigitizerAlgorithm.h.

Referenced by induce_signal(), and make_digis().

◆ map_

const SiPixelFedCablingMap* SiPixelDigitizerAlgorithm::map_ = nullptr
private

Definition at line 160 of file SiPixelDigitizerAlgorithm.h.

Referenced by module_killing_DB(), and pixel_inefficiency().

◆ mapToken_

const edm::ESGetToken<SiPixelFedCablingMap, SiPixelFedCablingMapRcd> SiPixelDigitizerAlgorithm::mapToken_
private

Definition at line 158 of file SiPixelDigitizerAlgorithm.h.

◆ NumberOfBarrelLayers

const int SiPixelDigitizerAlgorithm::NumberOfBarrelLayers
private

◆ NumberOfEndcapDisks

const int SiPixelDigitizerAlgorithm::NumberOfEndcapDisks
private

◆ pixelAging_

const PixelAging SiPixelDigitizerAlgorithm::pixelAging_
private

Definition at line 467 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift().

◆ pixelEfficiencies_

PixelEfficiencies SiPixelDigitizerAlgorithm::pixelEfficiencies_
private

◆ PixelFEDChannelCollectionMapToken_

edm::ESGetToken<PixelFEDChannelCollectionMap, SiPixelFEDChannelContainerESProducerRcd> SiPixelDigitizerAlgorithm::PixelFEDChannelCollectionMapToken_
private

Definition at line 170 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

◆ quality_map

const PixelFEDChannelCollectionMap* SiPixelDigitizerAlgorithm::quality_map

Definition at line 93 of file SiPixelDigitizerAlgorithm.h.

Referenced by chooseScenario().

◆ scenarioProbability_

const SiPixelQualityProbabilities* SiPixelDigitizerAlgorithm::scenarioProbability_ = nullptr
private

Definition at line 171 of file SiPixelDigitizerAlgorithm.h.

Referenced by chooseScenario().

◆ scenarioProbabilityToken_

edm::ESGetToken<SiPixelQualityProbabilities, SiPixelStatusScenarioProbabilityRcd> SiPixelDigitizerAlgorithm::scenarioProbabilityToken_
private

Definition at line 168 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

◆ Sigma0

const float SiPixelDigitizerAlgorithm::Sigma0
private

Definition at line 332 of file SiPixelDigitizerAlgorithm.h.

Referenced by drift().

◆ SiPixelBadModule_

const SiPixelQuality* SiPixelDigitizerAlgorithm::SiPixelBadModule_ = nullptr
private

Definition at line 155 of file SiPixelDigitizerAlgorithm.h.

Referenced by module_killing_DB().

◆ SiPixelBadModuleToken_

edm::ESGetToken<SiPixelQuality, SiPixelQualityRcd> SiPixelDigitizerAlgorithm::SiPixelBadModuleToken_
private

Definition at line 154 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

◆ SiPixelDynamicInefficiency_

const SiPixelDynamicInefficiency* SiPixelDigitizerAlgorithm::SiPixelDynamicInefficiency_ = nullptr
private

Definition at line 165 of file SiPixelDigitizerAlgorithm.h.

Referenced by init_DynIneffDB().

◆ SiPixelDynamicInefficiencyToken_

edm::ESGetToken<SiPixelDynamicInefficiency, SiPixelDynamicInefficiencyRcd> SiPixelDigitizerAlgorithm::SiPixelDynamicInefficiencyToken_
private

Definition at line 164 of file SiPixelDigitizerAlgorithm.h.

Referenced by init_DynIneffDB(), and SiPixelDigitizerAlgorithm().

◆ SiPixelLorentzAngle_

const SiPixelLorentzAngle* SiPixelDigitizerAlgorithm::SiPixelLorentzAngle_ = nullptr
private

Definition at line 151 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

◆ SiPixelLorentzAngleToken_

edm::ESGetToken<SiPixelLorentzAngle, SiPixelLorentzAngleSimRcd> SiPixelDigitizerAlgorithm::SiPixelLorentzAngleToken_
private

Definition at line 150 of file SiPixelDigitizerAlgorithm.h.

Referenced by SiPixelDigitizerAlgorithm().

◆ tanLorentzAnglePerTesla_BPix

const float SiPixelDigitizerAlgorithm::tanLorentzAnglePerTesla_BPix
private

Definition at line 367 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

◆ tanLorentzAnglePerTesla_FPix

const float SiPixelDigitizerAlgorithm::tanLorentzAnglePerTesla_FPix
private

Definition at line 366 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection().

◆ theAdcFullScale

const int SiPixelDigitizerAlgorithm::theAdcFullScale
private

Definition at line 344 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 391 of file SiPixelDigitizerAlgorithm.h.

◆ TheNewSiPixelChargeReweightingAlgorithmClass

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

Definition at line 323 of file SiPixelDigitizerAlgorithm.h.

Referenced by induce_signal(), and SiPixelDigitizerAlgorithm().

◆ theNoiseInElectrons

const float SiPixelDigitizerAlgorithm::theNoiseInElectrons
private

Definition at line 345 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise(), and digitize().

◆ theNoiser

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

Definition at line 408 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise().

◆ theOffsetSmearing

const float SiPixelDigitizerAlgorithm::theOffsetSmearing
private

Definition at line 392 of file SiPixelDigitizerAlgorithm.h.

◆ theReadoutNoise

const float SiPixelDigitizerAlgorithm::theReadoutNoise
private

Definition at line 346 of file SiPixelDigitizerAlgorithm.h.

Referenced by add_noise().

◆ theSiPixelGainCalibrationService_

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

Definition at line 457 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 351 of file SiPixelDigitizerAlgorithm.h.

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

◆ theThresholdInE_BPix_L2

const float SiPixelDigitizerAlgorithm::theThresholdInE_BPix_L2
private

Definition at line 352 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 355 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ theThresholdSmearing_BPix_L1

const double SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix_L1
private

Definition at line 356 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ theThresholdSmearing_BPix_L2

const double SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix_L2
private

Definition at line 357 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ theThresholdSmearing_FPix

const double SiPixelDigitizerAlgorithm::theThresholdSmearing_FPix
private

Definition at line 354 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ theTofLowerCut

const float SiPixelDigitizerAlgorithm::theTofLowerCut
private

Definition at line 364 of file SiPixelDigitizerAlgorithm.h.

Referenced by accumulateSimHits().

◆ theTofUpperCut

const float SiPixelDigitizerAlgorithm::theTofUpperCut
private

Definition at line 365 of file SiPixelDigitizerAlgorithm.h.

Referenced by accumulateSimHits().

◆ tMax

const double SiPixelDigitizerAlgorithm::tMax
private

Definition at line 403 of file SiPixelDigitizerAlgorithm.h.

Referenced by fluctuateEloss(), and SiPixelDigitizerAlgorithm().

◆ use_deadmodule_DB_

const bool SiPixelDigitizerAlgorithm::use_deadmodule_DB_
private

Definition at line 318 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize(), and SiPixelDigitizerAlgorithm().

◆ use_ineff_from_db_

const bool SiPixelDigitizerAlgorithm::use_ineff_from_db_
private

Definition at line 316 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ use_LorentzAngle_DB_

const bool SiPixelDigitizerAlgorithm::use_LorentzAngle_DB_
private

Definition at line 319 of file SiPixelDigitizerAlgorithm.h.

Referenced by DriftDirection(), and SiPixelDigitizerAlgorithm().

◆ use_module_killing_

const bool SiPixelDigitizerAlgorithm::use_module_killing_
private

Definition at line 317 of file SiPixelDigitizerAlgorithm.h.

Referenced by digitize().

◆ UseReweighting

const bool SiPixelDigitizerAlgorithm::UseReweighting
private

Definition at line 396 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:361
Point2DBase
Definition: Point2DBase.h:9
SiPixelDigitizerAlgorithm::addChargeVCALSmearing
const bool addChargeVCALSmearing
Definition: SiPixelDigitizerAlgorithm.h:380
SiPixelDigitizerAlgorithm::Parameters
std::vector< edm::ParameterSet > Parameters
Definition: SiPixelDigitizerAlgorithm.h:308
DDAxes::y
PileupMixingContent::getMix_bunchCrossing
const std::vector< int > & getMix_bunchCrossing() const
Definition: PileupMixingContent.h:65
SiPixelDigitizerAlgorithm::theGainSmearing
const float theGainSmearing
Definition: SiPixelDigitizerAlgorithm.h:391
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
SiPixelDigitizerAlgorithm::Frame
GloballyPositioned< double > Frame
Definition: SiPixelDigitizerAlgorithm.h:307
SiPixelDigitizerAlgorithm::missCalibrate
float missCalibrate(uint32_t detID, const TrackerTopology *tTopo, const PixelGeomDetUnit *pixdet, int col, int row, float amp) const
Definition: SiPixelDigitizerAlgorithm.cc:2080
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
SiPixelDigitizerAlgorithm::PixelFEDChannelCollectionMapToken_
edm::ESGetToken< PixelFEDChannelCollectionMap, SiPixelFEDChannelContainerESProducerRcd > PixelFEDChannelCollectionMapToken_
Definition: SiPixelDigitizerAlgorithm.h:170
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
SiPixelDigitizerAlgorithm::theOffsetSmearing
const float theOffsetSmearing
Definition: SiPixelDigitizerAlgorithm.h:392
SiPixelDigitizerAlgorithm::AddPixelInefficiency
const bool AddPixelInefficiency
Definition: SiPixelDigitizerAlgorithm.h:385
SiPixelDigitizerAlgorithm::signal_map_iterator
signal_map_type::iterator signal_map_iterator
Definition: SiPixelDigitizerAlgorithm.h:304
SiPixelQuality::getBadRocs
short getBadRocs(const uint32_t &detid) const
Definition: SiPixelQuality.cc:122
hit::y
double y
Definition: SiStripHitEffFromCalibTree.cc:90
SiPixelDigitizerAlgorithm::pixelAging_
const PixelAging pixelAging_
Definition: SiPixelDigitizerAlgorithm.h:467
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:386
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
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:351
SiPixelDigitizerAlgorithm::theSiPixelGainCalibrationService_
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
Definition: SiPixelDigitizerAlgorithm.h:457
pixelClusterTagInfos_cfi.isPhase1
isPhase1
Definition: pixelClusterTagInfos_cfi.py:7
SiPixelDigitizerAlgorithm::use_module_killing_
const bool use_module_killing_
Definition: SiPixelDigitizerAlgorithm.h:317
TrackerTopology::pxbLadder
unsigned int pxbLadder(const DetId &id) const
Definition: TrackerTopology.h:155
cuy.col
col
Definition: cuy.py:1009
GaussianTailNoiseGenerator
Definition: GaussianTailNoiseGenerator.h:24
SiPixelDigitizerAlgorithm::theNoiser
const std::unique_ptr< GaussianTailNoiseGenerator > theNoiser
Definition: SiPixelDigitizerAlgorithm.h:408
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:1795
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:466
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:1180
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::theThresholdSmearing_FPix
const double theThresholdSmearing_FPix
Definition: SiPixelDigitizerAlgorithm.h:354
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
SiPixelDigitizerAlgorithm::TheNewSiPixelChargeReweightingAlgorithmClass
std::unique_ptr< SiPixelChargeReweightingAlgorithm > TheNewSiPixelChargeReweightingAlgorithmClass
Definition: SiPixelDigitizerAlgorithm.h:323
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:2242
simKBmtfDigis_cfi.eLoss
eLoss
Definition: simKBmtfDigis_cfi.py:9
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
SiPixelDigitizerAlgorithm::SiPixelBadModule_
const SiPixelQuality * SiPixelBadModule_
Definition: SiPixelDigitizerAlgorithm.h:155
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:286
SiPixelDigitizerAlgorithm::theTofLowerCut
const float theTofLowerCut
Definition: SiPixelDigitizerAlgorithm.h:364
GeomDetType::isTrackerPixel
bool isTrackerPixel() const
Definition: GeomDetType.cc:15
SiPixelDigitizerAlgorithm::initCal
std::map< int, CalParameters, std::less< int > > initCal() const
Definition: SiPixelDigitizerAlgorithm.cc:351
SiPixelDigitizerAlgorithm::doMissCalibrate
const bool doMissCalibrate
Definition: SiPixelDigitizerAlgorithm.h:390
SiPixelDigitizerAlgorithm::FPix_p3
const float FPix_p3
Definition: SiPixelDigitizerAlgorithm.h:372
sipixelobjects::LocalPixel
identify pixel inside single ROC
Definition: LocalPixel.h:7
SiPixelDigitizerAlgorithm::addNoise
const bool addNoise
Definition: SiPixelDigitizerAlgorithm.h:379
SiPixelDigitizerAlgorithm::PixelEfficiencies::thePUEfficiency
std::vector< std::vector< double > > thePUEfficiency
Definition: SiPixelDigitizerAlgorithm.h:261
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
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:316
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:352
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:373
SiPixelDigitizerAlgorithm::FPix_p0
const float FPix_p0
Definition: SiPixelDigitizerAlgorithm.h:369
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:411
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:52823
SiPixelDigitizerAlgorithm::NumberOfBarrelLayers
const int NumberOfBarrelLayers
Definition: SiPixelDigitizerAlgorithm.h:339
GeomDetEnumerators::P1PXEC
Definition: GeomDetEnumerators.h:26
SiPixelDigitizerAlgorithm::tMax
const double tMax
Definition: SiPixelDigitizerAlgorithm.h:403
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:332
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:93
SiPixelDigitizerAlgorithm::module_killing_conf
void module_killing_conf(uint32_t detID)
Definition: SiPixelDigitizerAlgorithm.cc:2262
SiPixelDigitizerAlgorithm::Dist300
const float Dist300
Definition: SiPixelDigitizerAlgorithm.h:333
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
SiPixelGainCalibrationOfflineSimService
Definition: SiPixelGainCalibrationOfflineSimService.h:22
GeomDetEnumerators::P2OTEC
Definition: GeomDetEnumerators.h:24
PixelDigi::pixelToChannel
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:75
Point3DBase< float, LocalTag >
cmsdt::scenario
scenario
Definition: constants.h:173
PixelTopology
Definition: PixelTopology.h:10
SiPixelDigitizerAlgorithm::theNoiseInElectrons
const float theNoiseInElectrons
Definition: SiPixelDigitizerAlgorithm.h:345
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:259
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
SiPixelDigitizerAlgorithm::addThresholdSmearing
const bool addThresholdSmearing
Definition: SiPixelDigitizerAlgorithm.h:387
SiPixelDigitizerAlgorithm::signal_map_const_iterator
signal_map_type::const_iterator signal_map_const_iterator
Definition: SiPixelDigitizerAlgorithm.h:305
SiPixelDigitizerAlgorithm::module_killing_DB
void module_killing_DB(uint32_t detID)
Definition: SiPixelDigitizerAlgorithm.cc:2302
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
SiPixelDigitizerAlgorithm::SiPixelDynamicInefficiencyToken_
edm::ESGetToken< SiPixelDynamicInefficiency, SiPixelDynamicInefficiencyRcd > SiPixelDynamicInefficiencyToken_
Definition: SiPixelDigitizerAlgorithm.h:164
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:260
SiPixelDigitizerAlgorithm::SiPixelLorentzAngle_
const SiPixelLorentzAngle * SiPixelLorentzAngle_
Definition: SiPixelDigitizerAlgorithm.h:151
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
SignalPoint
Definition: SignalPoint.h:11
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SiPixelDigitizerAlgorithm::BPix_p2
const float BPix_p2
Definition: SiPixelDigitizerAlgorithm.h:375
PixelIndices::pixelToChannelROC
static int pixelToChannelROC(const int rowROC, const int colROC)
Definition: PixelIndices.h:233
SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix_L1
const double theThresholdSmearing_BPix_L1
Definition: SiPixelDigitizerAlgorithm.h:356
SiPixelDigitizerAlgorithm::alpha2Order
const bool alpha2Order
Definition: SiPixelDigitizerAlgorithm.h:334
SiPixelQualityProbabilities::probabilityMap
std::map< unsigned int, probabilityVec > probabilityMap
Definition: SiPixelQualityProbabilities.h:13
SiPixelDigitizerAlgorithm::SiPixelLorentzAngleToken_
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleSimRcd > SiPixelLorentzAngleToken_
Definition: SiPixelDigitizerAlgorithm.h:150
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
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 size_t FirstHitIndex, const unsigned int tofBin, const PixelGeomDetUnit *pixdet, const std::vector< SignalPoint > &collection_points)
Definition: SiPixelDigitizerAlgorithm.cc:1362
PV2DBase::x
T x() const
Definition: PV2DBase.h:43
recoMuon::in
Definition: RecoMuonEnumerators.h:6
SiPixelDigitizerAlgorithm::makeDigiSimLinks_
const bool makeDigiSimLinks_
Definition: SiPixelDigitizerAlgorithm.h:314
SiPixelDigitizerAlgorithm::scenarioProbabilityToken_
edm::ESGetToken< SiPixelQualityProbabilities, SiPixelStatusScenarioProbabilityRcd > scenarioProbabilityToken_
Definition: SiPixelDigitizerAlgorithm.h:168
pfMETCorrectionType0_cfi.par0
par0
Definition: pfMETCorrectionType0_cfi.py:47
pfMETCorrectionType0_cfi.par2
par2
Definition: pfMETCorrectionType0_cfi.py:49
SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix_L2
const double theThresholdSmearing_BPix_L2
Definition: SiPixelDigitizerAlgorithm.h:357
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:350
LocalVector
Local3DVector LocalVector
Definition: LocalVector.h:12
createfilelist.int
int
Definition: createfilelist.py:10
SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db
void init_from_db(const TrackerGeometry *, const SiPixelDynamicInefficiency *)
Definition: SiPixelDigitizerAlgorithm.cc:607
SiPixelDigitizerAlgorithm::PixelEfficiencies::FromConfig
bool FromConfig
Definition: SiPixelDigitizerAlgorithm.h:257
TrackerTopology::pxfModule
unsigned int pxfModule(const DetId &id) const
Definition: TrackerTopology.h:163
SiPixelDigitizerAlgorithm::theTofUpperCut
const float theTofUpperCut
Definition: SiPixelDigitizerAlgorithm.h:365
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
SiPixelDigitizerAlgorithm::theElectronPerADC
const float theElectronPerADC
Definition: SiPixelDigitizerAlgorithm.h:343
SiPixelDigitizerAlgorithm::fluctuateCharge
const bool fluctuateCharge
Definition: SiPixelDigitizerAlgorithm.h:382
SiPixelDigitizerAlgorithm::theReadoutNoise
const float theReadoutNoise
Definition: SiPixelDigitizerAlgorithm.h:346
SiPixelDigitizerAlgorithm::scenarioProbability_
const SiPixelQualityProbabilities * scenarioProbability_
Definition: SiPixelDigitizerAlgorithm.h:171
p1
double p1[4]
Definition: TauolaWrapper.h:89
SiPixelDigitizerAlgorithm::addNoisyPixels
const bool addNoisyPixels
Definition: SiPixelDigitizerAlgorithm.h:381
SiPixelDigitizerAlgorithm::geomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: SiPixelDigitizerAlgorithm.h:159
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
gpuVertexFinder::noise
__shared__ int noise
Definition: gpuFitVertices.h:50
SiPixelDigitizerAlgorithm::electronsPerVCAL_Offset
const float electronsPerVCAL_Offset
Definition: SiPixelDigitizerAlgorithm.h:360
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:1596
SiPixelDigitizerAlgorithm::_signal
signalMaps _signal
Definition: SiPixelDigitizerAlgorithm.h:312
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:1246
IT
std::vector< LinkConnSpec >::const_iterator IT
Definition: TriggerBoardSpec.cc:5
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiPixelDigitizerAlgorithm::electronsPerVCAL_L1_Offset
const float electronsPerVCAL_L1_Offset
Definition: SiPixelDigitizerAlgorithm.h:362
SiPixelDigitizerAlgorithm::fluctuate
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate
Definition: SiPixelDigitizerAlgorithm.h:407
SiPixelDigitizerAlgorithm::DriftDirection
LocalVector DriftDirection(const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
Definition: SiPixelDigitizerAlgorithm.cc:2172
SiPixelDigitizerAlgorithm::tanLorentzAnglePerTesla_FPix
const float tanLorentzAnglePerTesla_FPix
Definition: SiPixelDigitizerAlgorithm.h:366
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
SiPixelQuality::getBadComponentList
const std::vector< disabledModuleType > getBadComponentList() const
Definition: SiPixelQuality.h:100
SiPixelDigitizerAlgorithm::BPix_p3
const float BPix_p3
Definition: SiPixelDigitizerAlgorithm.h:376
SiPixelDigitizerAlgorithm::SiPixelBadModuleToken_
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > SiPixelBadModuleToken_
Definition: SiPixelDigitizerAlgorithm.h:154
callgraph.module
module
Definition: callgraph.py:61
SiPixelDigitizerAlgorithm::signal_map_type
std::map< int, Amplitude, std::less< int > > signal_map_type
Definition: SiPixelDigitizerAlgorithm.h:303
SiPixelDigitizerAlgorithm::mapToken_
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > mapToken_
Definition: SiPixelDigitizerAlgorithm.h:158
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
SiPixelDigitizerAlgorithm::use_deadmodule_DB_
const bool use_deadmodule_DB_
Definition: SiPixelDigitizerAlgorithm.h:318
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
SiPixelDigitizerAlgorithm::geom_
const TrackerGeometry * geom_
Definition: SiPixelDigitizerAlgorithm.h:161
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:329
SiPixelDigitizerAlgorithm::electronsPerVCAL
const float electronsPerVCAL
Definition: SiPixelDigitizerAlgorithm.h:359
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
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
SiPixelDigitizerAlgorithm::theAdcFullScale
const int theAdcFullScale
Definition: SiPixelDigitizerAlgorithm.h:344
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:340
mps_check.columns
columns
Definition: mps_check.py:244
Exception
Definition: hltDiff.cc:245
SiPixelDigitizerAlgorithm::pixel_aging
float pixel_aging(const PixelAging &aging, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo) const
Definition: SiPixelDigitizerAlgorithm.cc:2024
SiPixelDigitizerAlgorithm::theThresholdInE_FPix
const float theThresholdInE_FPix
Definition: SiPixelDigitizerAlgorithm.h:349
PVValHelper::ladder
Definition: PVValidationHelpers.h:73
SiG4UniversalFluctuation
Definition: SiG4UniversalFluctuation.h:25
SiPixelDigitizerAlgorithm::BPix_p1
const float BPix_p1
Definition: SiPixelDigitizerAlgorithm.h:374
SiPixelDigitizerAlgorithm::theThresholdSmearing_BPix
const double theThresholdSmearing_BPix
Definition: SiPixelDigitizerAlgorithm.h:355
PixelTestBeamValidation_cfi.Charge
Charge
Definition: PixelTestBeamValidation_cfi.py:99
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:1114
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:367
SiPixelDigitizerAlgorithm::AddPixelAging
const bool AddPixelAging
Definition: SiPixelDigitizerAlgorithm.h:395
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
SiPixelDigitizerAlgorithm::FPix_p2
const float FPix_p2
Definition: SiPixelDigitizerAlgorithm.h:371
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
SiPixelDigitizerAlgorithm::UseReweighting
const bool UseReweighting
Definition: SiPixelDigitizerAlgorithm.h:396
muons2muons_cfi.pu
pu
Definition: muons2muons_cfi.py:31
funct::arg
A arg
Definition: Factorize.h:31
SiPixelDigitizerAlgorithm::map_
const SiPixelFedCablingMap * map_
Definition: SiPixelDigitizerAlgorithm.h:160
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::SiPixelDynamicInefficiency_
const SiPixelDynamicInefficiency * SiPixelDynamicInefficiency_
Definition: SiPixelDigitizerAlgorithm.h:165
aging
Definition: aging.py:1
SiPixelQuality::IsRocBad
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
Definition: SiPixelQuality.cc:107
GloballyPositioned::rotation
const RotationType & rotation() const
Definition: GloballyPositioned.h:38
SiPixelDigitizerAlgorithm::FPix_p1
const float FPix_p1
Definition: SiPixelDigitizerAlgorithm.h:370
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
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:321
PixelTopology::nrows
virtual int nrows() const =0
mps_splice.line
line
Definition: mps_splice.py:76
Parameters
vector< ParameterSet > Parameters
Definition: HLTMuonPlotter.cc:25
SiPixelFedCablingMap::findItem
const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const final
Definition: SiPixelFedCablingMap.cc:124
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
PileupMixingContent::getMix_TrueInteractions
const std::vector< float > & getMix_TrueInteractions() const
Definition: PileupMixingContent.h:64
SiPixelDigitizerAlgorithm::calcQ
double calcQ(float x) const
Definition: SiPixelDigitizerAlgorithm.h:469
cuy.ii
ii
Definition: cuy.py:589
SiPixelDigitizerAlgorithm::ClusterWidth
const float ClusterWidth
Definition: SiPixelDigitizerAlgorithm.h:337
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:69
SiPixelDigitizerAlgorithm::add_noise
void add_noise(const PixelGeomDetUnit *pixdet, float thePixelThreshold, CLHEP::HepRandomEngine *)
Definition: SiPixelDigitizerAlgorithm.cc:1692
PixelIndices
Definition: PixelIndices.h:40
GeomDetEnumerators::P2PXEC
Definition: GeomDetEnumerators.h:28
SiPixelDigitizerAlgorithm::use_LorentzAngle_DB_
const bool use_LorentzAngle_DB_
Definition: SiPixelDigitizerAlgorithm.h:319