|
|
Go to the documentation of this file. 1 #ifndef SiPixelDigitizerAlgorithm_h
2 #define SiPixelDigitizerAlgorithm_h
28 #include "boost/multi_array.hpp"
36 class HepRandomEngine;
68 const std::vector<PSimHit>::const_iterator inputEnd,
69 const size_t inputBeginGlobalIndex,
70 const unsigned int tofBin,
74 CLHEP::HepRandomEngine*);
76 std::vector<PixelDigi>& digis,
77 std::vector<PixelDigiSimLink>& simlinks,
79 CLHEP::HepRandomEngine*);
88 std::unique_ptr<PixelFEDChannelCollection>
chooseScenario(
const std::vector<PileupSummaryInfo>& ps,
89 CLHEP::HepRandomEngine* engine);
101 if (
_frac[0] < -0.5) {
110 if (
_frac[0] < -0.5) {
113 _hitInfos.emplace_back(hitp, hitIndex, tofBin);
127 if (
other._frac[0] > -0.5) {
128 if (!
other._hitInfos.empty()) {
279 std::map<uint32_t, size_t>
iPU;
407 const std::unique_ptr<SiG4UniversalFluctuation>
fluctuate;
408 const std::unique_ptr<GaussianTailNoiseGenerator>
theNoiser;
411 const std::map<int, CalParameters, std::less<int> >
calmap;
415 std::map<int, CalParameters, std::less<int> >
initCal()
const;
417 std::vector<EnergyDepositUnit>& ionization_points,
418 CLHEP::HepRandomEngine*)
const;
423 const std::vector<EnergyDepositUnit>& ionization_points,
424 std::vector<SignalPoint>& collection_points)
const;
425 void induce_signal(std::vector<PSimHit>::const_iterator inputBegin,
426 std::vector<PSimHit>::const_iterator inputEnd,
428 const size_t hitIndex,
429 const size_t FirstHitIndex,
430 const unsigned int tofBin,
432 const std::vector<SignalPoint>& collection_points);
437 int NumberOfSegments,
439 CLHEP::HepRandomEngine*)
const;
444 std::vector<PixelDigi>& digis,
445 std::vector<PixelDigiSimLink>& simlinks,
450 CLHEP::HepRandomEngine*);
478 return 0.5 * (1.0 - std::copysign(
std::sqrt(1.
f - unsafe_expf<4>(-
xx * (1.
f + 0.2733
f / (1.
f + 0.147
f *
xx)))),
x));
const float electronsPerVCAL_L1
void set(const float amplitude)
const bool addChargeVCALSmearing
std::vector< edm::ParameterSet > Parameters
const float theGainSmearing
boost::multi_array< float, 2 > array_2d
std::unordered_map< std::string, PixelFEDChannelCollection > PixelFEDChannelCollectionMap
GloballyPositioned< double > Frame
float missCalibrate(uint32_t detID, const TrackerTopology *tTopo, const PixelGeomDetUnit *pixdet, int col, int row, float amp) const
edm::ESGetToken< PixelFEDChannelCollectionMap, SiPixelFEDChannelContainerESProducerRcd > PixelFEDChannelCollectionMapToken_
boost::multi_array< float, 2 > array_2d
const float theOffsetSmearing
const bool AddPixelInefficiency
signal_map_type::iterator signal_map_iterator
double theOuterEfficiency_FPix[20]
bool killBadFEDChannels() const
const PixelAging pixelAging_
std::map< uint32_t, signal_map_type > signalMaps
const bool KillBadFEDChannels
const float theThresholdInE_BPix_L1
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
const bool use_module_killing_
EnergyDepositUnit(float energy, Local3DPoint position)
const std::unique_ptr< GaussianTailNoiseGenerator > theNoiser
void pixel_inefficiency(const PixelEfficiencies &eff, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
std::vector< float > _frac
PixelEfficiencies(const edm::ParameterSet &conf, bool AddPixelInefficiency, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
PixelEfficiencies pixelEfficiencies_
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[], CLHEP::HepRandomEngine *) const
static const int rocIdMaskBits
const double theThresholdSmearing_FPix
Amplitude(float amp, float frac)
std::unique_ptr< SiPixelChargeReweightingAlgorithm > TheNewSiPixelChargeReweightingAlgorithmClass
SiPixelDigitizerAlgorithm(const edm::ParameterSet &conf, edm::ConsumesCollector iC)
void pixel_inefficiency_db(uint32_t detID)
float thePixelPseudoRadDamage[20]
const SiPixelQuality * SiPixelBadModule_
std::unique_ptr< PixelFEDChannelCollection > PixelFEDChannelCollection_
const float theTofLowerCut
std::map< int, CalParameters, std::less< int > > initCal() const
const bool doMissCalibrate
std::vector< std::vector< double > > thePUEfficiency
std::map< uint32_t, size_t > iPU
const std::vector< SimHitInfoForLinks > & hitInfos() const
const bool use_ineff_from_db_
const float theThresholdInE_BPix_L2
void init(const edm::EventSetup &es)
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 *)
const std::map< int, CalParameters, std::less< int > > calmap
std::map< uint32_t, std::vector< double > > PixelGeomFactorsROCBigPixels
const int NumberOfBarrelLayers
void init_DynIneffDB(const edm::EventSetup &)
double thePixelChipEfficiency[20]
const PixelFEDChannelCollectionMap * quality_map
void module_killing_conf(uint32_t detID)
std::unique_ptr< PixelFEDChannelCollection > chooseScenario(PileupMixingContent *puInfo, CLHEP::HepRandomEngine *)
const float theNoiseInElectrons
std::vector< double > theModuleEfficiency_BPix[20]
SignalPoint(float x, float y, float sigma_x, float sigma_y, float t, float a=1.0)
double theInstLumiScaleFactor
const bool addThresholdSmearing
signal_map_type::const_iterator signal_map_const_iterator
void module_killing_DB(uint32_t detID)
edm::ESGetToken< SiPixelDynamicInefficiency, SiPixelDynamicInefficiencyRcd > SiPixelDynamicInefficiencyToken_
Amplitude(float amp, const PSimHit *hitp, size_t hitIndex, unsigned int tofBin, float frac)
std::vector< double > pu_scale
const SiPixelLorentzAngle * SiPixelLorentzAngle_
void calculateInstlumiFactor(PileupMixingContent *puInfo)
SignalPoint(float x, float y, float sigma_x, float sigma_y, float t, const PSimHit &hit, float a=1.0)
double theInnerEfficiency_FPix[20]
const double theThresholdSmearing_BPix_L1
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleSimRcd > SiPixelLorentzAngleToken_
~SiPixelDigitizerAlgorithm()
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)
const bool makeDigiSimLinks_
edm::ESGetToken< SiPixelQualityProbabilities, SiPixelStatusScenarioProbabilityRcd > scenarioProbabilityToken_
void operator+=(const float &)
const double theThresholdSmearing_BPix_L2
static int position[264][3]
const float theThresholdInE_BPix
std::vector< SimHitInfoForLinks > _hitInfos
void init_from_db(const TrackerGeometry *, const SiPixelDynamicInefficiency *)
PixelAging(const edm::ParameterSet &conf, bool AddPixelAging, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
const float theTofUpperCut
const float theElectronPerADC
const bool fluctuateCharge
void operator+=(const Amplitude &other)
const float theReadoutNoise
const SiPixelQualityProbabilities * scenarioProbability_
const bool addNoisyPixels
EnergyDepositUnit(float energy, float x, float y, float z)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
const float electronsPerVCAL_Offset
void make_digis(float thePixelThresholdInE, uint32_t detID, const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo) 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
const float electronsPerVCAL_L1_Offset
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate
LocalVector DriftDirection(const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
const float tanLorentzAnglePerTesla_FPix
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > SiPixelBadModuleToken_
std::map< int, Amplitude, std::less< int > > signal_map_type
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > mapToken_
std::map< uint32_t, std::vector< double > > PixelGeomFactorsROCStdPixels
const bool use_deadmodule_DB_
SignalPoint & set_amplitude(float amp)
const TrackerGeometry * geom_
std::vector< double > theLadderEfficiency_BPix[20]
const float GeVperElectron
const float electronsPerVCAL
double thePixelColEfficiency[20]
const int theAdcFullScale
const int NumberOfEndcapDisks
float pixel_aging(const PixelAging &aging, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo) const
const float theThresholdInE_FPix
bool matches(const DetId &, const DetId &, const std::vector< uint32_t > &)
std::map< uint32_t, double > ColGeomFactors
const double theThresholdSmearing_BPix
void primary_ionization(const PSimHit &hit, std::vector< EnergyDepositUnit > &ionization_points, CLHEP::HepRandomEngine *) const
const float tanLorentzAnglePerTesla_BPix
const bool UseReweighting
const SiPixelFedCablingMap * map_
void setSimAccumulator(const std::map< uint32_t, std::map< int, int > > &signalMap)
const SiPixelDynamicInefficiency * SiPixelDynamicInefficiency_
void digitize(const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
const LocalPoint & position() const
const Parameters DeadModules
double thePixelEfficiency[20]
double calcQ(float x) const
std::map< uint32_t, double > PixelGeomFactors
std::map< uint32_t, double > ChipGeomFactors
void add_noise(const PixelGeomDetUnit *pixdet, float thePixelThreshold, CLHEP::HepRandomEngine *)
const std::vector< float > & individualampl() const
const bool use_LorentzAngle_DB_