1 #ifndef SiPixelDigitizerAlgorithm_h
2 #define SiPixelDigitizerAlgorithm_h
22 class HepRandomEngine;
58 const std::vector<PSimHit>::const_iterator inputEnd,
59 const size_t inputBeginGlobalIndex,
60 const unsigned int tofBin,
64 CLHEP::HepRandomEngine*);
66 std::vector<PixelDigi>& digis,
67 std::vector<PixelDigiSimLink>& simlinks,
69 CLHEP::HepRandomEngine*);
116 operator float()
const {
return _amp;}
119 const std::vector<unsigned int>&
trackIds()
const {
128 if (other.
_frac[0]>-0.5){
130 std::vector<unsigned int>& otherTrackIds = other.
_hitInfo->trackIds_;
133 trackIds.insert(trackIds.end(), otherTrackIds.begin(), otherTrackIds.end());
154 void set (
const float amplitude) {
210 float t,
float a=1.0) :
268 std::map<uint32_t, size_t >
iPU;
291 typedef std::map<unsigned int, std::vector<float>,std::less<unsigned int> >
simlink_map;
387 const std::unique_ptr<SiG4UniversalFluctuation>
fluctuate;
388 const std::unique_ptr<GaussianTailNoiseGenerator>
theNoiser;
391 const std::map<int,CalParameters,std::less<int> >
calmap;
396 std::map<int,CalParameters,std::less<int> >
initCal()
const;
402 const std::vector<EnergyDepositUnit>& ionization_points,
403 std::vector<SignalPoint>& collection_points)
const;
405 const size_t hitIndex,
406 const unsigned int tofBin,
408 const std::vector<SignalPoint>& collection_points);
410 float length,
int NumberOfSegments,
412 CLHEP::HepRandomEngine*)
const;
414 float thePixelThreshold,
415 CLHEP::HepRandomEngine*);
419 std::vector<PixelDigi>& digis,
420 std::vector<PixelDigiSimLink>& simlinks,
425 CLHEP::HepRandomEngine*);
438 const DetId& detId)
const;
455 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_
void init_DynIneffDB(const edm::EventSetup &, const unsigned int &)
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
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)
const LocalPoint & position() const
const double theThresholdSmearing_BPix_L1
const float theThresholdInE_FPix
const double theThresholdSmearing_BPix
std::vector< std::vector< double > > thePUEfficiency
const bool addThresholdSmearing
Amplitude(float amp, float frac)
void module_killing_conf(uint32_t detID)
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
double theInstLumiScaleFactor
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_
std::vector< double > pu_scale
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 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 init_from_db(const edm::ESHandle< TrackerGeometry > &, const edm::ESHandle< SiPixelDynamicInefficiency > &)
double thePixelColEfficiency[20]
void calculateInstlumiFactor(PileupMixingContent *puInfo)
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
edm::ESHandle< SiPixelDynamicInefficiency > SiPixelDynamicInefficiency_
const unsigned int hitIndex() const
bool matches(const DetId &, const DetId &, const std::vector< uint32_t > &)
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::map< uint32_t, double > ColGeomFactors
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
std::map< uint32_t, double > PixelGeomFactors
std::map< uint32_t, double > ChipGeomFactors
const bool addNoisyPixels
const PixelAging pixelAging_
std::map< uint32_t, signal_map_type > signalMaps
std::map< uint32_t, size_t > iPU
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 *)