1 #ifndef SiPixelDigitizerAlgorithm_h
2 #define SiPixelDigitizerAlgorithm_h
21 class HepRandomEngine;
58 const std::vector<PSimHit>::const_iterator inputEnd,
62 std::vector<PixelDigi>& digis,
63 std::vector<PixelDigiSimLink>& simlinks,
106 operator float()
const {
return _amp;}
109 const std::vector<unsigned int>&
trackIds()
const {
118 if (other.
_frac[0]>-0.5){
120 std::vector<unsigned int>& otherTrackIds = other.
_hitInfo->trackIds_;
123 trackIds.insert(trackIds.end(), otherTrackIds.begin(), otherTrackIds.end());
138 void set (
const float amplitude) {
194 float t,
float a=1.0) :
244 typedef std::map<unsigned int, std::vector<float>,std::less<unsigned int> >
simlink_map;
341 const std::unique_ptr<SiG4UniversalFluctuation>
fluctuate;
342 const std::unique_ptr<GaussianTailNoiseGenerator>
theNoiser;
345 const std::map<int,CalParameters,std::less<int> >
calmap;
350 std::map<int,CalParameters,std::less<int> >
initCal()
const;
355 const std::vector<EnergyDepositUnit>& ionization_points,
356 std::vector<SignalPoint>& collection_points)
const;
359 const std::vector<SignalPoint>& collection_points);
361 float length,
int NumberOfSegments,
362 float elossVector[])
const;
364 float thePixelThreshold);
367 std::vector<PixelDigi>& digis,
368 std::vector<PixelDigiSimLink>& simlinks,
381 const DetId& detId)
const;
407 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 operator+=(const Amplitude &other)
std::vector< float > individualampl() const
void pixel_inefficiency_db(uint32_t detID)
const EncodedEventId & eventId() const
signal_map_type::const_iterator signal_map_const_iterator
const bool use_deadmodule_DB_
edm::ESHandle< SiPixelFedCablingMap > map_
const double theThresholdSmearing_FPix
SignalPoint(float x, float y, float sigma_x, float sigma_y, float t, const PSimHit &hit, float a=1.0)
std::map< int, CalParameters, std::less< int > > initCal() const
std::map< unsigned int, std::vector< float >, std::less< unsigned int > > simlink_map
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
LocalVector DriftDirection(const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
EnergyDepositUnit(float energy, Local3DPoint position)
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[]) const
const float tanLorentzAnglePerTesla_FPix
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate
const int theAdcFullScale
PixelEfficiencies(const edm::ParameterSet &conf, bool AddPixelInefficiency, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
const std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_BPix_
SignalPoint(float x, float y, float sigma_x, float sigma_y, float t, float a=1.0)
const std::unique_ptr< CLHEP::RandGaussQ > gaussDistribution_
const LocalPoint & position() const
float missCalibrate(uint32_t detID, int col, int row, float amp) const
const double theThresholdSmearing_BPix_L1
const std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_BPix_L1_
const float theThresholdInE_FPix
const double theThresholdSmearing_BPix
const std::unique_ptr< CLHEP::RandFlat > flatDistribution_
const bool addThresholdSmearing
Amplitude(float amp, float frac)
void module_killing_conf(uint32_t detID)
const bool fluctuateCharge
edm::ESHandle< TrackerGeometry > geom_
~SiPixelDigitizerAlgorithm()
double calcQ(float x) const
const float GeVperElectron
const std::shared_ptr< SimHitInfoForLinks > & hitInfo() const
static int position[TOTALCHAMBERS][3]
const bool use_ineff_from_db_
Amplitude(float amp, const PSimHit *hitp, float frac)
const double pseudoRadDamage
const bool use_LorentzAngle_DB_
void induce_signal(const PSimHit &hit, const PixelGeomDetUnit *pixdet, const std::vector< SignalPoint > &collection_points)
const std::map< int, CalParameters, std::less< int > > calmap
const Parameters DeadModules
void drift(const PSimHit &hit, const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< EnergyDepositUnit > &ionization_points, std::vector< SignalPoint > &collection_points) const
const float theTofUpperCut
const bool use_module_killing_
void module_killing_DB(uint32_t detID)
void accumulateSimHits(const std::vector< PSimHit >::const_iterator inputBegin, const std::vector< PSimHit >::const_iterator inputEnd, const PixelGeomDetUnit *pixdet, const GlobalVector &bfield)
const float theThresholdInE_BPix
const int NumberOfEndcapDisks
const int theFirstStackLayer
void add_noise(const PixelGeomDetUnit *pixdet, float thePixelThreshold)
std::shared_ptr< SimHitInfoForLinks > _hitInfo
const double pseudoRadDamageRadius
signal_map_type::iterator signal_map_iterator
SignalPoint & set_amplitude(float amp)
EnergyDepositUnit(float energy, float x, float y, float z)
const float theThresholdInE_BPix_L1
edm::ESHandle< SiPixelLorentzAngle > SiPixelLorentzAngle_
const bool doMissCalibrate
const bool AddPixelInefficiency
const bool addChargeVCALSmearing
const std::unique_ptr< GaussianTailNoiseGenerator > theNoiser
const std::vector< unsigned int > & trackIds() const
const float theNoiseInElectrons
std::map< int, Amplitude, std::less< int > > signal_map_type
void make_digis(float thePixelThresholdInE, uint32_t detID, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo) const
const float theOffsetSmearing
const PixelEfficiencies pixelEfficiencies_
const double electronsPerVCAL_Offset
std::vector< float > _frac
edm::ESHandle< SiPixelQuality > SiPixelBadModule_
const int theAdcFullScaleStack
void digitize(const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo)
GloballyPositioned< double > Frame
const float tanLorentzAnglePerTesla_BPix
float thePixelChipEfficiency[20]
float thePixelColEfficiency[20]
std::vector< edm::ParameterSet > Parameters
const std::unique_ptr< CLHEP::RandGaussQ > gaussDistributionVCALNoise_
const float theGainSmearing
void operator+=(const float &)
const float theReadoutNoise
const std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_FPix_
const double electronsPerVCAL
void set(const float amplitude)
void primary_ionization(const PSimHit &hit, std::vector< EnergyDepositUnit > &ionization_points) const
float thePixelEfficiency[20]
const float theTofLowerCut
SiPixelDigitizerAlgorithm(const edm::ParameterSet &conf, CLHEP::HepRandomEngine &)
const bool addNoisyPixels
std::map< uint32_t, signal_map_type > signalMaps
const float theElectronPerADC
const bool makeDigiSimLinks_
void pixel_inefficiency(const PixelEfficiencies &eff, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo)
const int NumberOfBarrelLayers