1 #ifndef SimTracker_SiPixelDigitizer_SiPixelDigitizerAlgorithm_h 2 #define SimTracker_SiPixelDigitizer_SiPixelDigitizerAlgorithm_h 30 #include "boost/multi_array.hpp" 38 class HepRandomEngine;
70 const std::vector<PSimHit>::const_iterator inputEnd,
71 const size_t inputBeginGlobalIndex,
72 const unsigned int tofBin,
76 CLHEP::HepRandomEngine*);
78 std::vector<PixelDigi>& digis,
79 std::vector<PixelDigiSimLink>& simlinks,
80 std::vector<PixelDigiAddTempInfo>& newClass_Digi_extra,
82 CLHEP::HepRandomEngine*);
90 std::vector<PixelDigi>& digis,
91 std::vector<PixelSimHitExtraInfo>& newClass_Sim_extra,
93 CLHEP::HepRandomEngine* engine);
99 std::unique_ptr<PixelFEDChannelCollection>
chooseScenario(
const std::vector<PileupSummaryInfo>& ps,
100 CLHEP::HepRandomEngine* engine);
237 std::map<uint32_t, size_t>
iPU;
270 typedef std::map<unsigned int, std::vector<PSimHit> >
simhit_map;
374 const std::unique_ptr<SiG4UniversalFluctuation>
fluctuate;
375 const std::unique_ptr<GaussianTailNoiseGenerator>
theNoiser;
378 const std::map<int, CalParameters, std::less<int> >
calmap;
382 std::map<int, CalParameters, std::less<int> >
initCal()
const;
384 std::vector<EnergyDepositUnit>& ionization_points,
385 CLHEP::HepRandomEngine*)
const;
390 const std::vector<EnergyDepositUnit>& ionization_points,
391 std::vector<SignalPoint>& collection_points)
const;
392 void induce_signal(std::vector<PSimHit>::const_iterator inputBegin,
393 std::vector<PSimHit>::const_iterator inputEnd,
395 const size_t hitIndex,
396 const size_t FirstHitIndex,
397 const unsigned int tofBin,
399 const std::vector<SignalPoint>& collection_points);
404 int NumberOfSegments,
406 CLHEP::HepRandomEngine*)
const;
411 std::vector<PixelDigi>& digis,
412 std::vector<PixelDigiSimLink>& simlinks,
413 std::vector<PixelDigiAddTempInfo>& newClass_Digi_extra,
418 CLHEP::HepRandomEngine*);
446 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));
void init(const edm::EventSetup &es)
void fillSimHitMaps(std::vector< PSimHit > simHits, const unsigned int tofBin)
const float theThresholdInE_BPix_L2
double theOuterEfficiency_FPix[20]
std::map< int, digitizerUtility::Amplitude, std::less< int > > signal_map_type
void pixel_inefficiency_db(uint32_t detID)
signal_map_type::const_iterator signal_map_const_iterator
const bool use_deadmodule_DB_
const float electronsPerVCAL
const double theThresholdSmearing_FPix
SignalPoint(float x, float y, float sigma_x, float sigma_y, float t, const PSimHit &hit, float a=1.0)
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
EnergyDepositUnit(float energy, Local3DPoint position)
const float tanLorentzAnglePerTesla_FPix
PixelEfficiencies pixelEfficiencies_
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate
const int theAdcFullScale
PixelEfficiencies(const edm::ParameterSet &conf, bool AddPixelInefficiency, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
SignalPoint(float x, float y, float sigma_x, float sigma_y, float t, float a=1.0)
static const int rocIdMaskBits
const double theThresholdSmearing_BPix_L1
edm::ESGetToken< SiPixelQualityProbabilities, SiPixelStatusScenarioProbabilityRcd > scenarioProbabilityToken_
const float theThresholdInE_FPix
std::unique_ptr< PixelFEDChannelCollection > PixelFEDChannelCollection_
const double theThresholdSmearing_BPix
std::vector< std::vector< double > > thePUEfficiency
const float electronsPerVCAL_Offset
void make_digis(float thePixelThresholdInE, uint32_t detID, const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, std::vector< PixelDigiAddTempInfo > &newClass_Digi_extra, const TrackerTopology *tTopo) const
const bool addThresholdSmearing
float pixel_aging(const PixelAging &aging, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo) const
void module_killing_conf(uint32_t detID)
const bool fluctuateCharge
std::map< uint32_t, size_t > iPU
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
std::map< unsigned int, std::vector< PSimHit > > simhit_map
float thePixelPseudoRadDamage[20]
~SiPixelDigitizerAlgorithm()
const float GeVperElectron
const double theThresholdSmearing_BPix_L2
const bool doMissCalInLateCR
const SiPixelDynamicInefficiency * SiPixelDynamicInefficiency_
std::unique_ptr< SiPixelChargeReweightingAlgorithm > TheNewSiPixelChargeReweightingAlgorithmClass
const bool use_ineff_from_db_
std::map< subDetTofBin, unsigned int > simhit_collectionMap
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 use_LorentzAngle_DB_
LocalVector DriftDirection(const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > SiPixelBadModuleToken_
SiPixelDigitizerAlgorithm(const edm::ParameterSet &conf, edm::ConsumesCollector iC)
const PixelFEDChannelCollectionMap * quality_map
const bool store_SimHitEntryExitPoints_
std::pair< unsigned int, unsigned int > subDetTofBin
void digitize(const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, std::vector< PixelDigiAddTempInfo > &newClass_Digi_extra, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
double theInstLumiScaleFactor
const Parameters DeadModules
boost::multi_array< float, 2 > array_2d
std::map< uint32_t, std::vector< double > > PixelGeomFactorsROCBigPixels
double thePixelChipEfficiency[20]
const float theTofUpperCut
void primary_ionization(const PSimHit &hit, std::vector< EnergyDepositUnit > &ionization_points, CLHEP::HepRandomEngine *) const
const bool use_module_killing_
std::vector< double > pu_scale
void module_killing_DB(uint32_t detID)
double calcQ(float x) const
const float theThresholdInE_BPix
double theInnerEfficiency_FPix[20]
const SiPixelLorentzAngle * SiPixelLorentzAngle_
const int NumberOfEndcapDisks
std::vector< double > theModuleEfficiency_BPix[20]
float missCalibrate(uint32_t detID, const TrackerTopology *tTopo, const PixelGeomDetUnit *pixdet, int col, int row, float amp) const
void init_from_db(const TrackerGeometry *, const SiPixelDynamicInefficiency *)
edm::ESGetToken< SiPixelLorentzAngle, SiPixelLorentzAngleSimRcd > SiPixelLorentzAngleToken_
signal_map_type::iterator signal_map_iterator
void init_DynIneffDB(const edm::EventSetup &)
SignalPoint & set_amplitude(float amp)
std::unique_ptr< PixelFEDChannelCollection > chooseScenario(PileupMixingContent *puInfo, CLHEP::HepRandomEngine *)
EnergyDepositUnit(float energy, float x, float y, float z)
const float theThresholdInE_BPix_L1
const float electronsPerVCAL_L1_Offset
boost::multi_array< float, 2 > array_2d
void setSimAccumulator(const std::map< uint32_t, std::map< int, int > > &signalMap)
const bool UseReweighting
edm::ESGetToken< PixelFEDChannelCollectionMap, SiPixelFEDChannelContainerESProducerRcd > PixelFEDChannelCollectionMapToken_
const std::map< int, CalParameters, std::less< int > > calmap
const bool doMissCalibrate
const bool AddPixelInefficiency
const bool addChargeVCALSmearing
const int theAdcFullScLateCR
const std::unique_ptr< GaussianTailNoiseGenerator > theNoiser
const float theNoiseInElectrons
const float theOffsetSmearing
const SiPixelQuality * SiPixelBadModule_
const SiPixelFedCablingMap * map_
const float electronsPerVCAL_L1
std::map< uint32_t, std::vector< double > > PixelGeomFactorsROCStdPixels
double thePixelColEfficiency[20]
const LocalPoint & position() const
void calculateInstlumiFactor(PileupMixingContent *puInfo)
std::unordered_map< std::string, PixelFEDChannelCollection > PixelFEDChannelCollectionMap
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 *)
GloballyPositioned< double > Frame
const float tanLorentzAnglePerTesla_BPix
const SiPixelQualityProbabilities * scenarioProbability_
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[], CLHEP::HepRandomEngine *) const
bool matches(const DetId &, const DetId &, const std::vector< uint32_t > &)
void lateSignalReweight(const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelSimHitExtraInfo > &newClass_Sim_extra, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *engine)
std::vector< edm::ParameterSet > Parameters
const bool KillBadFEDChannels
std::vector< double > theLadderEfficiency_BPix[20]
const float theGainSmearing
static int position[264][3]
const float theReadoutNoise
const TrackerGeometry * geom_
edm::ESGetToken< SiPixelDynamicInefficiency, SiPixelDynamicInefficiencyRcd > SiPixelDynamicInefficiencyToken_
std::map< uint32_t, double > ColGeomFactors
std::map< int, CalParameters, std::less< int > > initCal() const
double thePixelEfficiency[20]
simhit_collectionMap SimHitCollMap
PixelAging(const edm::ParameterSet &conf, bool AddPixelAging, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
const float theTofLowerCut
bool killBadFEDChannels() const
std::map< uint32_t, double > PixelGeomFactors
std::map< uint32_t, double > ChipGeomFactors
const bool addNoisyPixels
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > mapToken_
const PixelAging pixelAging_
std::map< uint32_t, signal_map_type > signalMaps
const float theElectronPerADC
const bool makeDigiSimLinks_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
const int NumberOfBarrelLayers
void add_noise(const PixelGeomDetUnit *pixdet, float thePixelThreshold, CLHEP::HepRandomEngine *)
void pixel_inefficiency(const PixelEfficiencies &eff, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)