1 #ifndef SiPixelDigitizerAlgorithm_h
2 #define SiPixelDigitizerAlgorithm_h
22 class HepRandomEngine;
57 const std::vector<PSimHit>::const_iterator inputEnd,
60 CLHEP::HepRandomEngine*);
62 std::vector<PixelDigi>& digis,
63 std::vector<PixelDigiSimLink>& simlinks,
65 CLHEP::HepRandomEngine*);
108 operator float()
const {
return _amp;}
111 const std::vector<unsigned int>&
trackIds()
const {
120 if (other.
_frac[0]>-0.5){
122 std::vector<unsigned int>& otherTrackIds = other.
_hitInfo->trackIds_;
125 trackIds.insert(trackIds.end(), otherTrackIds.begin(), otherTrackIds.end());
140 void set (
const float amplitude) {
196 float t,
float a=1.0) :
252 typedef std::map<unsigned int, std::vector<float>,std::less<unsigned int> >
simlink_map;
349 const std::unique_ptr<SiG4UniversalFluctuation>
fluctuate;
350 const std::unique_ptr<GaussianTailNoiseGenerator>
theNoiser;
353 const std::map<int,CalParameters,std::less<int> >
calmap;
358 std::map<int,CalParameters,std::less<int> >
initCal()
const;
363 const std::vector<EnergyDepositUnit>& ionization_points,
364 std::vector<SignalPoint>& collection_points)
const;
367 const std::vector<SignalPoint>& collection_points);
369 float length,
int NumberOfSegments,
371 CLHEP::HepRandomEngine*)
const;
373 float thePixelThreshold,
374 CLHEP::HepRandomEngine*);
377 std::vector<PixelDigi>& digis,
378 std::vector<PixelDigiSimLink>& simlinks,
383 CLHEP::HepRandomEngine*);
392 const DetId& detId)
const;
408 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
SiPixelDigitizerAlgorithm(const edm::ParameterSet &conf)
EnergyDepositUnit(float energy, Local3DPoint position)
const float tanLorentzAnglePerTesla_FPix
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)
const LocalPoint & position() const
float missCalibrate(uint32_t detID, int col, int row, float amp) const
const double theThresholdSmearing_BPix_L1
const float theThresholdInE_FPix
const double theThresholdSmearing_BPix
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
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 digitize(const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo, CLHEP::HepRandomEngine *)
const float theThresholdInE_BPix
const int NumberOfEndcapDisks
const int theFirstStackLayer
void accumulateSimHits(const std::vector< PSimHit >::const_iterator inputBegin, const std::vector< PSimHit >::const_iterator inputEnd, const PixelGeomDetUnit *pixdet, const GlobalVector &bfield, CLHEP::HepRandomEngine *)
std::vector< double > theModuleEfficiency_BPix[20]
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_
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments, float elossVector[], CLHEP::HepRandomEngine *) const
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_
void primary_ionization(const PSimHit &hit, std::vector< EnergyDepositUnit > &ionization_points, CLHEP::HepRandomEngine *) const
void calculateInstlumiFactor(PileupMixingContent *puInfo)
const int theAdcFullScaleStack
GloballyPositioned< double > Frame
const float tanLorentzAnglePerTesla_BPix
float thePixelChipEfficiency[20]
float thePixelColEfficiency[20]
std::vector< edm::ParameterSet > Parameters
std::vector< double > theLadderEfficiency_BPix[20]
const float theGainSmearing
void operator+=(const float &)
static int position[264][3]
const float theReadoutNoise
const double electronsPerVCAL
void set(const float amplitude)
std::vector< double > thePUEfficiency_BPix[20]
float thePixelEfficiency[20]
const float theTofLowerCut
const bool addNoisyPixels
std::map< uint32_t, signal_map_type > signalMaps
const float theElectronPerADC
const bool makeDigiSimLinks_
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 *)