1 #ifndef SiPixelDigitizerAlgorithm_h
2 #define SiPixelDigitizerAlgorithm_h
22 class HepRandomEngine;
57 const std::vector<PSimHit>::const_iterator inputEnd,
58 const size_t inputBeginGlobalIndex,
59 const unsigned int tofBin,
63 CLHEP::HepRandomEngine*);
65 std::vector<PixelDigi>& digis,
66 std::vector<PixelDigiSimLink>& simlinks,
68 CLHEP::HepRandomEngine*);
111 operator float()
const {
return _amp;}
114 const std::vector<unsigned int>&
trackIds()
const {
123 if (other.
_frac[0]>-0.5){
125 std::vector<unsigned int>& otherTrackIds = other.
_hitInfo->trackIds_;
128 trackIds.insert(trackIds.end(), otherTrackIds.begin(), otherTrackIds.end());
149 void set (
const float amplitude) {
205 float t,
float a=1.0) :
275 typedef std::map<unsigned int, std::vector<float>,std::less<unsigned int> >
simlink_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;
383 std::map<int,CalParameters,std::less<int> >
initCal()
const;
389 const std::vector<EnergyDepositUnit>& ionization_points,
390 std::vector<SignalPoint>& collection_points)
const;
392 const size_t hitIndex,
393 const unsigned int tofBin,
395 const std::vector<SignalPoint>& collection_points);
397 float length,
int NumberOfSegments,
399 CLHEP::HepRandomEngine*)
const;
401 float thePixelThreshold,
402 CLHEP::HepRandomEngine*);
406 std::vector<PixelDigi>& digis,
407 std::vector<PixelDigiSimLink>& simlinks,
412 CLHEP::HepRandomEngine*);
425 const DetId& detId)
const;
442 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)
Amplitude(float amp, const PSimHit *hitp, size_t hitIndex, unsigned int tofBin, float frac)
std::vector< float > individualampl() const
double theOuterEfficiency_FPix[20]
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
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)
std::vector< double > thePUEfficiency[20]
const bool fluctuateCharge
float thePixelPseudoRadDamage[20]
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_
void make_digis(float thePixelThresholdInE, uint32_t detID, const PixelGeomDetUnit *pixdet, std::vector< PixelDigi > &digis, std::vector< PixelDigiSimLink > &simlinks, const TrackerTopology *tTopo) const
void induce_signal(const PSimHit &hit, const size_t hitIndex, const unsigned int tofBin, const PixelGeomDetUnit *pixdet, const std::vector< SignalPoint > &collection_points)
const bool use_LorentzAngle_DB_
float missCalibrate(uint32_t detID, const PixelGeomDetUnit *pixdet, int col, int row, float amp) const
const std::map< int, CalParameters, std::less< int > > calmap
const Parameters DeadModules
float pixel_aging(const PixelAging &aging, const PixelGeomDetUnit *pixdet, const TrackerTopology *tTopo) const
double thePixelChipEfficiency[20]
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
double theInnerEfficiency_FPix[20]
const int NumberOfEndcapDisks
std::vector< double > theModuleEfficiency_BPix[20]
std::shared_ptr< SimHitInfoForLinks > _hitInfo
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 unsigned int tofBin() const
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
const float theOffsetSmearing
const PixelEfficiencies pixelEfficiencies_
const double electronsPerVCAL_Offset
std::vector< float > _frac
edm::ESHandle< SiPixelQuality > SiPixelBadModule_
const double theInstLumiScaleFactor
void primary_ionization(const PSimHit &hit, std::vector< EnergyDepositUnit > &ionization_points, CLHEP::HepRandomEngine *) const
double thePixelColEfficiency[20]
void calculateInstlumiFactor(PileupMixingContent *puInfo)
const double bunchScaleAt25
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 int theAdcFullScaleStack
GloballyPositioned< double > Frame
const float tanLorentzAnglePerTesla_BPix
const unsigned int hitIndex() const
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)
double thePixelEfficiency[20]
PixelAging(const edm::ParameterSet &conf, bool AddPixelAging, int NumberOfBarrelLayers, int NumberOfEndcapDisks)
const float theTofLowerCut
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 bool addNoisyPixels
const PixelAging pixelAging_
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 *)