1 #ifndef SiPixelDigitizerAlgorithm_h 2 #define SiPixelDigitizerAlgorithm_h 22 class HepRandomEngine;
57 void accumulateSimHits(
const std::vector<PSimHit>::const_iterator inputBegin,
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*);
96 _amp(amp), _frac(1, frac) {
105 _amp(amp), _frac(1, frac) {
113 _hitInfos.emplace_back(hitp, hitIndex, tofBin);
118 operator float()
const {
return _amp;}
119 float ampl()
const {
return _amp;}
121 const std::vector<SimHitInfoForLinks>&
hitInfos()
const {
return _hitInfos; }
127 if (other.
_frac[0]>-0.5){
131 _frac.insert(_frac.end(), other.
_frac.begin(), other.
_frac.end());
169 _energy(energy),_position(x,y,z){}
171 _energy(energy),_position(position){}
172 float x()
const{
return _position.x();}
173 float y()
const{
return _position.y();}
174 float z()
const{
return _position.z();}
191 _sigma_x(1.), _sigma_y(1.), _hitp(0) {}
194 float t,
float a=1.0) :
195 _pos(x,y), _time(t), _amplitude(
a), _sigma_x(sigma_x),
196 _sigma_y(sigma_y), _hitp(0) {}
200 _pos(x,y), _time(t), _amplitude(
a), _sigma_x(sigma_x),
201 _sigma_y(sigma_y),_hitp(&hit) {}
204 float x()
const {
return _pos.x();}
205 float y()
const {
return _pos.y();}
208 float time()
const {
return _time;}
239 double thePixelEfficiency[20];
240 double thePixelColEfficiency[20];
241 double thePixelChipEfficiency[20];
242 std::vector<double> theLadderEfficiency_BPix[20];
243 std::vector<double> theModuleEfficiency_BPix[20];
244 double theInnerEfficiency_FPix[20];
245 double theOuterEfficiency_FPix[20];
252 std::map<uint32_t, size_t >
iPU;
266 float thePixelPseudoRadDamage[20];
370 const std::unique_ptr<SiG4UniversalFluctuation>
fluctuate;
371 const std::unique_ptr<GaussianTailNoiseGenerator>
theNoiser;
374 const std::map<int,CalParameters,std::less<int> >
calmap;
379 std::map<int,CalParameters,std::less<int> > initCal()
const;
380 void primary_ionization(
const PSimHit&
hit, std::vector<EnergyDepositUnit>& ionization_points, CLHEP::HepRandomEngine*)
const;
385 const std::vector<EnergyDepositUnit>& ionization_points,
386 std::vector<SignalPoint>& collection_points)
const;
388 const size_t hitIndex,
389 const unsigned int tofBin,
391 const std::vector<SignalPoint>& collection_points);
392 void fluctuateEloss(
int particleId,
float momentum,
float eloss,
393 float length,
int NumberOfSegments,
395 CLHEP::HepRandomEngine*)
const;
397 float thePixelThreshold,
398 CLHEP::HepRandomEngine*);
399 void make_digis(
float thePixelThresholdInE,
402 std::vector<PixelDigi>& digis,
403 std::vector<PixelDigiSimLink>& simlinks,
408 CLHEP::HepRandomEngine*);
410 void pixel_inefficiency_db(uint32_t detID);
418 float missCalibrate(uint32_t detID,
const PixelGeomDetUnit* pixdet,
int col,
int row,
float amp)
const;
421 const DetId& detId)
const;
423 void module_killing_conf(uint32_t detID);
424 void module_killing_DB(uint32_t detID);
438 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 operator+=(const Amplitude &other)
Amplitude(float amp, const PSimHit *hitp, size_t hitIndex, unsigned int tofBin, float frac)
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)
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
const std::vector< float > & individualampl() const
EnergyDepositUnit(float energy, Local3DPoint position)
const float tanLorentzAnglePerTesla_FPix
PixelEfficiencies pixelEfficiencies_
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate
const int theAdcFullScale
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
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
const float theThresholdInE_FPix
const double theThresholdSmearing_BPix
std::vector< std::vector< double > > thePUEfficiency
const bool addThresholdSmearing
Amplitude(float amp, float frac)
const bool fluctuateCharge
edm::ESHandle< TrackerGeometry > geom_
double calcQ(float x) const
const float GeVperElectron
const bool use_ineff_from_db_
const bool use_LorentzAngle_DB_
const std::map< int, CalParameters, std::less< int > > calmap
double theInstLumiScaleFactor
const Parameters DeadModules
const float theTofUpperCut
const bool use_module_killing_
std::vector< double > pu_scale
const float theThresholdInE_BPix
const int NumberOfEndcapDisks
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 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_
const int theAdcFullScaleStack
GloballyPositioned< double > Frame
const float tanLorentzAnglePerTesla_BPix
edm::ESHandle< SiPixelDynamicInefficiency > SiPixelDynamicInefficiency_
std::vector< edm::ParameterSet > Parameters
const std::vector< SimHitInfoForLinks > & hitInfos() const
const float theGainSmearing
std::vector< SimHitInfoForLinks > _hitInfos
void operator+=(const float &)
static int position[264][3]
const float theReadoutNoise
const double electronsPerVCAL
std::map< uint32_t, double > ColGeomFactors
const float theTofLowerCut
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