CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
Phase2TrackerDigitizerAlgorithm Class Referenceabstract

#include <Phase2TrackerDigitizerAlgorithm.h>

Inheritance diagram for Phase2TrackerDigitizerAlgorithm:
PixelDigitizerAlgorithm PSPDigitizerAlgorithm PSSDigitizerAlgorithm SSDigitizerAlgorithm

Classes

struct  SubdetEfficiencies
 

Public Member Functions

virtual 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 Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield)=0
 
virtual void digitize (const Phase2TrackerGeomDetUnit *pixdet, std::map< int, DigitizerUtility::DigiSimInfo > &digi_map, const TrackerTopology *tTopo)
 
virtual void init (const edm::EventSetup &es)=0
 
virtual void initializeEvent (CLHEP::HepRandomEngine &eng)
 
void loadAccumulator (unsigned int detId, const std::map< int, float > &accumulator)
 
 Phase2TrackerDigitizerAlgorithm (const edm::ParameterSet &conf_common, const edm::ParameterSet &conf_specific)
 
virtual ~Phase2TrackerDigitizerAlgorithm ()
 

Protected Types

using Frame = GloballyPositioned< double >
 
using Parameters = std::vector< edm::ParameterSet >
 
using signal_map_const_iterator = signal_map_type::const_iterator
 
using signal_map_iterator = signal_map_type::iterator
 
using signal_map_type = std::map< int, DigitizerUtility::Amplitude, std::less< int > >
 
using signalMaps = std::map< uint32_t, signal_map_type >
 
using simlink_map = std::map< unsigned int, std::vector< float >, std::less< unsigned int > >
 

Protected Member Functions

virtual void add_noise (const Phase2TrackerGeomDetUnit *pixdet, float thePixelThreshold)
 
double calcQ (float x) const
 
void drift (const PSimHit &hit, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points, std::vector< DigitizerUtility::SignalPoint > &collection_points) const
 
LocalVector DriftDirection (const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
 
void fluctuateEloss (int particleId, float momentum, float eloss, float length, int NumberOfSegments, std::vector< float > &elossVector) const
 
void induce_signal (const PSimHit &hit, const size_t hitIndex, const unsigned int tofBin, const Phase2TrackerGeomDetUnit *pixdet, const std::vector< DigitizerUtility::SignalPoint > &collection_points)
 
virtual void module_killing_conf (uint32_t detID)
 
virtual void module_killing_DB (uint32_t detID)
 
virtual void pixel_inefficiency (const SubdetEfficiencies &eff, const Phase2TrackerGeomDetUnit *pixdet, const TrackerTopology *tTopo)
 
virtual void pixel_inefficiency_db (uint32_t detID)
 
void primary_ionization (const PSimHit &hit, std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points) const
 

Protected Attributes

signalMaps _signal
 
const bool addNoise
 
const bool addNoisyPixels
 
const bool AddPixelInefficiency
 
const bool addThresholdSmearing
 
const bool addXtalk
 
const bool alpha2Order
 
std::vector< edm::ParameterSetbadPixels
 
const float ClusterWidth
 
const Parameters DeadModules
 
const bool doDigitalReadout
 
const std::unique_ptr< SiG4UniversalFluctuationfluctuate
 
const bool fluctuateCharge
 
std::unique_ptr< CLHEP::RandGaussQ > gaussDistribution_
 
edm::ESHandle< TrackerGeometrygeom_
 
const float GeVperElectron
 
const float interstripCoupling
 
const bool makeDigiSimLinks_
 
edm::ESHandle< SiPixelFedCablingMapmap_
 
bool pixelFlag
 
const double pseudoRadDamage
 
const double pseudoRadDamageRadius
 
CLHEP::HepRandomEngine * rengine_
 
const float Sigma0
 
const float SigmaCoeff
 
edm::ESHandle< SiPixelQualitySiPixelBadModule_
 
edm::ESHandle< SiPixelLorentzAngleSiPixelLorentzAngle_
 
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Barrel_
 
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Endcap_
 
const SubdetEfficiencies subdetEfficiencies_
 
const float tanLorentzAnglePerTesla_Barrel
 
const float tanLorentzAnglePerTesla_Endcap
 
const int theAdcFullScale
 
const float theElectronPerADC
 
const double theHIPThresholdInE_Barrel
 
const double theHIPThresholdInE_Endcap
 
const float theNoiseInElectrons
 
const std::unique_ptr< GaussianTailNoiseGeneratortheNoiser
 
const float theReadoutNoise
 
const std::unique_ptr< SiPixelGainCalibrationOfflineSimServicetheSiPixelGainCalibrationService_
 
const float theThresholdInE_Barrel
 
const float theThresholdInE_Endcap
 
const double theThresholdSmearing_Barrel
 
const double theThresholdSmearing_Endcap
 
const float theTofLowerCut
 
const float theTofUpperCut
 
const double tMax
 
const bool use_deadmodule_DB_
 
const bool use_ineff_from_db_
 
const bool use_LorentzAngle_DB_
 
const bool use_module_killing_
 

Detailed Description

Definition at line 45 of file Phase2TrackerDigitizerAlgorithm.h.

Member Typedef Documentation

Definition at line 88 of file Phase2TrackerDigitizerAlgorithm.h.

Definition at line 89 of file Phase2TrackerDigitizerAlgorithm.h.

using Phase2TrackerDigitizerAlgorithm::signal_map_const_iterator = signal_map_type::const_iterator
protected

Definition at line 85 of file Phase2TrackerDigitizerAlgorithm.h.

using Phase2TrackerDigitizerAlgorithm::signal_map_iterator = signal_map_type::iterator
protected

Definition at line 84 of file Phase2TrackerDigitizerAlgorithm.h.

using Phase2TrackerDigitizerAlgorithm::signal_map_type = std::map<int, DigitizerUtility::Amplitude, std::less<int> >
protected

Definition at line 83 of file Phase2TrackerDigitizerAlgorithm.h.

using Phase2TrackerDigitizerAlgorithm::signalMaps = std::map<uint32_t, signal_map_type>
protected

Definition at line 87 of file Phase2TrackerDigitizerAlgorithm.h.

using Phase2TrackerDigitizerAlgorithm::simlink_map = std::map<unsigned int, std::vector<float>,std::less<unsigned int> >
protected

Definition at line 86 of file Phase2TrackerDigitizerAlgorithm.h.

Constructor & Destructor Documentation

Phase2TrackerDigitizerAlgorithm::Phase2TrackerDigitizerAlgorithm ( const edm::ParameterSet conf_common,
const edm::ParameterSet conf_specific 
)

Definition at line 59 of file Phase2TrackerDigitizerAlgorithm.cc.

References AddPixelInefficiency, theAdcFullScale, theElectronPerADC, theThresholdInE_Barrel, theThresholdInE_Endcap, and tMax.

60  :
61  _signal(),
62  makeDigiSimLinks_(conf_common.getUntrackedParameter<bool>("makeDigiSimLinks", true)),
63  use_ineff_from_db_(conf_specific.getParameter<bool>("Inefficiency_DB")),
64  use_module_killing_(conf_specific.getParameter<bool>("KillModules")), // boolean to kill or not modules
65  use_deadmodule_DB_(conf_specific.getParameter<bool>("DeadModules_DB")), // boolean to access dead modules from DB
66  use_LorentzAngle_DB_(conf_specific.getParameter<bool>("LorentzAngle_DB")), // boolean to access Lorentz angle from DB
67 
68  DeadModules(use_deadmodule_DB_ ? Parameters() : conf_specific.getParameter<Parameters>("DeadModules")), // get dead module from cfg file
69 
70  // Common pixel parameters
71  // These are parameters which are not likely to be changed
72  GeVperElectron(3.61E-09), // 1 electron(3.61eV, 1keV(277e, mod 9/06 d.k.
73  alpha2Order(conf_specific.getParameter<bool>("Alpha2Order")), // switch on/off of E.B effect
74  addXtalk(conf_specific.getParameter<bool>("AddXTalk")),
75  interstripCoupling(conf_specific.getParameter<double>("InterstripCoupling")), // Interstrip Coupling
76 
77  Sigma0(conf_specific.getParameter<double>("SigmaZero")), // Charge diffusion constant 7->3.7
78  SigmaCoeff(conf_specific.getParameter<double>("SigmaCoeff")), // delta in the diffusion across the strip pitch
79  // (set between 0 to 0.9, 0-->flat Sigma0, 1-->Sigma_min=0 & Sigma_max=2*Sigma0
80  // D.B.: Dist300 replaced by moduleThickness, may not work with partially depleted sensors but works otherwise
81  // Dist300(0.0300), // normalized to 300micron Silicon
82 
83  ClusterWidth(conf_specific.getParameter<double>("ClusterWidth")), // Charge integration spread on the collection plane
84 
85  doDigitalReadout(conf_specific.getParameter<bool>("DigitalReadout")), // Flag to decide analog or digital readout
86 
87  // ADC calibration 1adc count(135e.
88  // Corresponds to 2adc/kev, 270[e/kev]/135[e/adc](2[adc/kev]
89  // Be careful, this parameter is also used in SiPixelDet.cc to
90  // calculate the noise in adc counts from noise in electrons.
91  // Both defaults should be the same.
92  theElectronPerADC(conf_specific.getParameter<double>("ElectronPerAdc")),
93 
94  // ADC saturation value, 255(8bit adc.
95  theAdcFullScale(conf_specific.getParameter<int>("AdcFullScale")),
96 
97  // Noise in electrons:
98  // Pixel cell noise, relevant for generating noisy pixels
99  theNoiseInElectrons(conf_specific.getParameter<double>("NoiseInElectrons")),
100 
101  // Fill readout noise, including all readout chain, relevant for smearing
102  theReadoutNoise(conf_specific.getParameter<double>("ReadoutNoiseInElec")),
103 
104  // Threshold in units of noise:
105  // thePixelThreshold(conf.getParameter<double>("ThresholdInNoiseUnits")),
106  // Pixel threshold in electron units.
107  theThresholdInE_Endcap(conf_specific.getParameter<double>("ThresholdInElectrons_Endcap")),
108  theThresholdInE_Barrel(conf_specific.getParameter<double>("ThresholdInElectrons_Barrel")),
109 
110  // Add threshold gaussian smearing:
111  theThresholdSmearing_Endcap(conf_specific.getParameter<double>("ThresholdSmearing_Endcap")),
112  theThresholdSmearing_Barrel(conf_specific.getParameter<double>("ThresholdSmearing_Barrel")),
113 
114  // Add HIP Threshold in electron units.
115  theHIPThresholdInE_Endcap(conf_specific.getParameter<double>("HIPThresholdInElectrons_Endcap")),
116  theHIPThresholdInE_Barrel(conf_specific.getParameter<double>("HIPThresholdInElectrons_Barrel")),
117 
118  // theTofCut 12.5, cut in particle TOD +/- 12.5ns
119  theTofLowerCut(conf_specific.getParameter<double>("TofLowerCut")),
120  theTofUpperCut(conf_specific.getParameter<double>("TofUpperCut")),
121 
122  // Get the Lorentz angle from the cfg file:
123  tanLorentzAnglePerTesla_Endcap(use_LorentzAngle_DB_ ? 0.0 : conf_specific.getParameter<double>("TanLorentzAnglePerTesla_Endcap")),
124  tanLorentzAnglePerTesla_Barrel(use_LorentzAngle_DB_ ? 0.0 : conf_specific.getParameter<double>("TanLorentzAnglePerTesla_Barrel")),
125 
126  // Add noise
127  addNoise(conf_specific.getParameter<bool>("AddNoise")),
128 
129  // Add noisy pixels
130  addNoisyPixels(conf_specific.getParameter<bool>("AddNoisyPixels")),
131 
132  // Fluctuate charge in track subsegments
133  fluctuateCharge(conf_specific.getUntrackedParameter<bool>("FluctuateCharge",true)),
134 
135  // Control the pixel inefficiency
136  AddPixelInefficiency(conf_specific.getParameter<bool>("AddInefficiency")),
137 
138  // Add threshold gaussian smearing:
139  addThresholdSmearing(conf_specific.getParameter<bool>("AddThresholdSmearing")),
140 
141  // Add some pseudo-red damage
142  pseudoRadDamage(conf_specific.exists("PseudoRadDamage")?conf_specific.getParameter<double>("PseudoRadDamage"):double(0.0)),
143  pseudoRadDamageRadius(conf_specific.exists("PseudoRadDamageRadius")?conf_specific.getParameter<double>("PseudoRadDamageRadius"):double(0.0)),
144 
145  // delta cutoff in MeV, has to be same as in OSCAR(0.030/cmsim=1.0 MeV
146  // tMax(0.030), // In MeV.
147  // tMax(conf.getUntrackedParameter<double>("DeltaProductionCut",0.030)),
148  tMax(conf_common.getParameter<double>("DeltaProductionCut")),
149 
150  badPixels(conf_specific.getParameter<std::vector<edm::ParameterSet> >("CellsToKill")),
154  subdetEfficiencies_(conf_specific)
155 {
156 
157  LogInfo("Phase2TrackerDigitizerAlgorithm") << "Phase2TrackerDigitizerAlgorithm constructed\n"
158  << "Configuration parameters:\n"
159  << "Threshold/Gain = "
160  << "threshold in electron Endcap = "
162  << "\nthreshold in electron Barrel = "
164  << " " << theElectronPerADC << " " << theAdcFullScale
165  << " The delta cut-off is set to " << tMax
166  << " pix-inefficiency " << AddPixelInefficiency;
167 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate
bool exists(std::string const &parameterName) const
checks if a parameter exists
#define nullptr
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
vector< ParameterSet > Parameters
std::vector< edm::ParameterSet > badPixels
std::vector< edm::ParameterSet > Parameters
const std::unique_ptr< GaussianTailNoiseGenerator > theNoiser
Phase2TrackerDigitizerAlgorithm::~Phase2TrackerDigitizerAlgorithm ( )
virtual

Definition at line 169 of file Phase2TrackerDigitizerAlgorithm.cc.

References LogDebug.

169  {
170  LogDebug("Phase2TrackerDigitizerAlgorithm") << "Phase2TrackerDigitizerAlgorithm deleted";
171 }
#define LogDebug(id)

Member Function Documentation

virtual void Phase2TrackerDigitizerAlgorithm::accumulateSimHits ( const std::vector< PSimHit >::const_iterator  inputBegin,
const std::vector< PSimHit >::const_iterator  inputEnd,
const size_t  inputBeginGlobalIndex,
const unsigned int  tofBin,
const Phase2TrackerGeomDetUnit pixdet,
const GlobalVector bfield 
)
pure virtual
void Phase2TrackerDigitizerAlgorithm::add_noise ( const Phase2TrackerGeomDetUnit pixdet,
float  thePixelThreshold 
)
protectedvirtual

Definition at line 590 of file Phase2TrackerDigitizerAlgorithm.cc.

References _signal, addNoisyPixels, addXtalk, officialStyle::chan, Phase2TrackerDigi::channelToPixel(), PixelDigi::channelToPixel(), gaussDistribution_, GeomDet::geographicalId(), createfilelist::int, interstripCoupling, checklumidiff::l, LogDebug, PixelTopology::ncolumns(), PixelTopology::nrows(), pixelFlag, Phase2TrackerDigi::pixelToChannel(), PixelDigi::pixelToChannel(), DetId::rawId(), rengine_, alignCSCRings::s, PixelGeomDetUnit::specificTopology(), theNoiseInElectrons, theNoiser, theThresholdInE_Barrel, and theThresholdInE_Endcap.

Referenced by digitize().

591  {
592  LogDebug("Phase2TrackerDigitizerAlgorithm") << " enter add_noise " << theNoiseInElectrons;
593  uint32_t detID = pixdet->geographicalId().rawId();
594  signal_map_type& theSignal = _signal[detID];
595  const Phase2TrackerTopology* topol = &pixdet->specificTopology();
596  int numColumns = topol->ncolumns(); // det module number of cols&rows
597  int numRows = topol->nrows();
598 
599  // First add Readout noise to hit cells
600  for (auto & s : theSignal) {
601  float noise = gaussDistribution_->fire();
602  if ((s.second.ampl() + noise) < 0.)
603  s.second.set(0);
604  else
605  s.second += noise;
606  }
607 
608  if (addXtalk) {
609  signal_map_type signalNew;
610  for (auto const & s : theSignal) {
611  float signalInElectrons = s.second.ampl(); // signal in electrons
612  std::pair<int,int> hitChan;
613  if (pixelFlag) hitChan = PixelDigi::channelToPixel(s.first);
614  else hitChan = Phase2TrackerDigi::channelToPixel(s.first);
615 
616  float signalInElectrons_Xtalk = signalInElectrons * interstripCoupling;
617 
618  if (hitChan.first != 0) {
619  std::pair<int,int> XtalkPrev = std::pair<int,int>(hitChan.first-1, hitChan.second);
620  int chanXtalkPrev = (pixelFlag) ? PixelDigi::pixelToChannel(XtalkPrev.first, XtalkPrev.second)
621  : Phase2TrackerDigi::pixelToChannel(XtalkPrev.first, XtalkPrev.second);
622  signalNew.insert(std::pair<int,DigitizerUtility::Amplitude>(chanXtalkPrev, DigitizerUtility::Amplitude(signalInElectrons_Xtalk, nullptr, -1.0)));
623  }
624  if (hitChan.first < (numRows-1)) {
625  std::pair<int,int> XtalkNext = std::pair<int,int>(hitChan.first+1, hitChan.second);
626  int chanXtalkNext = (pixelFlag) ? PixelDigi::pixelToChannel(XtalkNext.first, XtalkNext.second)
627  : Phase2TrackerDigi::pixelToChannel(XtalkNext.first, XtalkNext.second);
628  signalNew.insert(std::pair<int,DigitizerUtility::Amplitude>(chanXtalkNext, DigitizerUtility::Amplitude(signalInElectrons_Xtalk, nullptr, -1.0)));
629  }
630  }
631  for (auto const & l : signalNew) {
632  int chan = l.first;
633  auto iter = theSignal.find(chan);
634  if (iter != theSignal.end()) {
635  theSignal[chan] += l.second.ampl();
636  } else {
637  theSignal.insert(std::pair<int,DigitizerUtility::Amplitude>(chan, DigitizerUtility::Amplitude(l.second.ampl(), nullptr, -1.0)));
638  }
639  }
640  }
641  if (!addNoisyPixels) // Option to skip noise in non-hit pixels
642  return;
643 
644  // Add noise on non-hit pixels
645  // Use here the pixel noise
646  int numberOfPixels = numRows * numColumns;
647  std::map<int,float, std::less<int> > otherPixels;
648  std::map<int,float, std::less<int> >::iterator mapI;
649 
650  theNoiser->generate(numberOfPixels,
651  thePixelThreshold, //thr. in un. of nois
652  theNoiseInElectrons, // noise in elec.
653  otherPixels,
654  rengine_ );
655 
656  LogDebug("Phase2TrackerDigitizerAlgorithm")
657  << " Add noisy pixels " << numRows << " "
658  << numColumns << " " << theNoiseInElectrons << " "
659  << theThresholdInE_Endcap << " " << theThresholdInE_Barrel << " " << numberOfPixels << " "
660  << otherPixels.size() ;
661 
662  // Add noisy pixels
663  for (mapI = otherPixels.begin(); mapI!= otherPixels.end(); mapI++) {
664  int iy = ((*mapI).first) / numRows;
665  int ix = ((*mapI).first) - (iy*numRows);
666  // Keep for a while for testing.
667  if( iy < 0 || iy > (numColumns-1) )
668  LogWarning("Phase2TrackerDigitizerAlgorithm") << " error in iy " << iy;
669  if( ix < 0 || ix > (numRows-1) )
670  LogWarning("Phase2TrackerDigitizerAlgorithm") << " error in ix " << ix;
671 
672  int chan;
674 
675  LogDebug ("Phase2TrackerDigitizerAlgorithm")
676  <<" Storing noise = " << (*mapI).first << " " << (*mapI).second
677  << " " << ix << " " << iy << " " << chan ;
678 
679  if (theSignal[chan] == 0) {
680  int noise = int((*mapI).second);
681  theSignal[chan] = DigitizerUtility::Amplitude (noise, nullptr, -1.);
682  }
683  }
684 }
#define LogDebug(id)
virtual int nrows() const =0
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:68
std::unique_ptr< CLHEP::RandGaussQ > gaussDistribution_
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:62
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
virtual int ncolumns() const =0
const std::unique_ptr< GaussianTailNoiseGenerator > theNoiser
static std::pair< unsigned int, unsigned int > channelToPixel(unsigned int ch)
double Phase2TrackerDigitizerAlgorithm::calcQ ( float  x) const
inlineprotected

Definition at line 212 of file Phase2TrackerDigitizerAlgorithm.h.

References f, min(), mathSSE::sqrt(), and geometryCSVtoXML::xx.

Referenced by induce_signal().

212  {
213  auto xx = std::min(0.5f * x * x,12.5f);
214  return 0.5 * (1.0-std::copysign(std::sqrt(1.f- unsafe_expf<4>(-xx * (1.f + 0.2733f/(1.f + 0.147f * xx)))), x));
215  }
T sqrt(T t)
Definition: SSEVec.h:18
double f[11][100]
T min(T a, T b)
Definition: MathUtil.h:58
void Phase2TrackerDigitizerAlgorithm::digitize ( const Phase2TrackerGeomDetUnit pixdet,
std::map< int, DigitizerUtility::DigiSimInfo > &  digi_map,
const TrackerTopology tTopo 
)
virtual

Definition at line 928 of file Phase2TrackerDigitizerAlgorithm.cc.

References _signal, ecalMGPA::adc(), add_noise(), addNoise, AddPixelInefficiency, addThresholdSmearing, DigitizerUtility::Amplitude::ampl(), doDigitalReadout, GeomDet::geographicalId(), info(), checklumidiff::l, makeDigiSimLinks_, min(), module_killing_conf(), module_killing_DB(), DigitizerUtility::DigiSimInfo::ot_bit, pixel_inefficiency(), pixel_inefficiency_db(), PixelSubdetector::PixelBarrel, DetId::rawId(), alignCSCRings::s, DigitizerUtility::DigiSimInfo::sig_tot, DigitizerUtility::Amplitude::simInfoList(), DigitizerUtility::DigiSimInfo::simInfoList, smearedThreshold_Barrel_, smearedThreshold_Endcap_, subdetEfficiencies_, DetId::subdetId(), theAdcFullScale, theElectronPerADC, theHIPThresholdInE_Barrel, theHIPThresholdInE_Endcap, theNoiseInElectrons, theThresholdInE_Barrel, theThresholdInE_Endcap, StripSubdetector::TOB, use_deadmodule_DB_, use_ineff_from_db_, and use_module_killing_.

931 {
932  uint32_t detID = pixdet->geographicalId().rawId();
933  auto it = _signal.find(detID);
934  if (it == _signal.end()) return;
935 
936  const signal_map_type& theSignal = _signal[detID];
937 
938 
939  unsigned int Sub_detid = DetId(detID).subdetId();
940 
941  float theThresholdInE = 0.;
942  float theHIPThresholdInE = 0.;
943  // Define Threshold
944  if (Sub_detid == PixelSubdetector::PixelBarrel || Sub_detid == StripSubdetector::TOB) { // Barrel modules
945  if (addThresholdSmearing) theThresholdInE = smearedThreshold_Barrel_->fire(); // gaussian smearing
946  else theThresholdInE = theThresholdInE_Barrel; // no smearing
947  theHIPThresholdInE = theHIPThresholdInE_Barrel;
948  } else { // Forward disks modules
949  if (addThresholdSmearing) theThresholdInE = smearedThreshold_Endcap_->fire(); // gaussian smearing
950  else theThresholdInE = theThresholdInE_Endcap; // no smearing
951  theHIPThresholdInE = theHIPThresholdInE_Endcap;
952  }
953 
954  if (addNoise) add_noise(pixdet, theThresholdInE/theNoiseInElectrons); // generate noise
955 
956  // Do only if needed
957  if (AddPixelInefficiency && !theSignal.empty()) {
958  if (use_ineff_from_db_)
959  pixel_inefficiency_db(detID);
960  else
961  pixel_inefficiency(subdetEfficiencies_, pixdet, tTopo);
962  }
963  if (use_module_killing_) {
964  if (use_deadmodule_DB_) // remove dead modules using DB
965  module_killing_DB(detID);
966  else // remove dead modules using the list in cfg file
967  module_killing_conf(detID);
968  }
969 
970  // Digitize if the signal is greater than threshold
971  for (auto const & s : theSignal) {
972  // DigitizerUtility::Amplitude sig_data = s.second;
973  const DigitizerUtility::Amplitude& sig_data = s.second;
974  float signalInElectrons = sig_data.ampl();
975  int adc;
976  if (signalInElectrons >= theThresholdInE) { // check threshold
978  else adc = std::min( int(signalInElectrons / theElectronPerADC), theAdcFullScale );
980  info.sig_tot = adc;
981  info.ot_bit = ( signalInElectrons > theHIPThresholdInE ? true : false);
982  if (makeDigiSimLinks_ ) {
983  for (auto const & l : sig_data.simInfoList()) {
984  float charge_frac = l.first/signalInElectrons;
985  if (l.first > -5.0) info.simInfoList.push_back({charge_frac, l.second.get()});
986  }
987  }
988  digi_map.insert({s.first, info});
989  }
990  }
991 }
int adc(sample_type sample)
get the ADC sample (12 bits)
static const TGPicture * info(bool iBackgroundIsBlack)
virtual void add_noise(const Phase2TrackerGeomDetUnit *pixdet, float thePixelThreshold)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
virtual void module_killing_conf(uint32_t detID)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
virtual void pixel_inefficiency_db(uint32_t detID)
T min(T a, T b)
Definition: MathUtil.h:58
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Endcap_
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
Definition: DetId.h:18
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Barrel_
std::vector< std::pair< float, SimHitInfoForLinks * > > simInfoList
virtual void pixel_inefficiency(const SubdetEfficiencies &eff, const Phase2TrackerGeomDetUnit *pixdet, const TrackerTopology *tTopo)
const std::vector< std::pair< float, std::unique_ptr< SimHitInfoForLinks > > > & simInfoList() const
void Phase2TrackerDigitizerAlgorithm::drift ( const PSimHit hit,
const Phase2TrackerGeomDetUnit pixdet,
const GlobalVector bfield,
const std::vector< DigitizerUtility::EnergyDepositUnit > &  ionization_points,
std::vector< DigitizerUtility::SignalPoint > &  collection_points 
) const
protected

Definition at line 302 of file Phase2TrackerDigitizerAlgorithm.cc.

References alpha2Order, Surface::bounds(), funct::cos(), PSimHit::detUnitId(), DriftDirection(), JetChargeProducer_cfi::exp, mps_fire::i, LogDebug, M_PI, PV3DBase< T, PVType, FrameType >::perp(), PixelTopology::pitch(), GloballyPositioned< T >::position(), pseudoRadDamage, pseudoRadDamageRadius, Sigma0, SigmaCoeff, GeomDet::specificSurface(), PixelGeomDetUnit::specificTopology(), mathSSE::sqrt(), GeomDet::surface(), Bounds::thickness(), PSimHit::tof(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by PixelDigitizerAlgorithm::accumulateSimHits(), SSDigitizerAlgorithm::accumulateSimHits(), PSSDigitizerAlgorithm::accumulateSimHits(), and PSPDigitizerAlgorithm::accumulateSimHits().

306  {
307  LogDebug("Phase2TrackerDigitizerAlgorithm") << "enter drift ";
308 
309  collection_points.resize(ionization_points.size()); // set size
310  LocalVector driftDir = DriftDirection(pixdet, bfield, hit.detUnitId()); // get the charge drift direction
311  if (driftDir.z() == 0.) {
312  LogWarning("Phase2TrackerDigitizerAlgorithm") << " pxlx: drift in z is zero ";
313  return;
314  }
315 
316  float TanLorenzAngleX,
317  TanLorenzAngleY,
318  dir_z,
319  CosLorenzAngleX,
320  CosLorenzAngleY;
321  if (alpha2Order) {
322  TanLorenzAngleX = driftDir.x(); // tangen of Lorentz angle
323  TanLorenzAngleY = driftDir.y();
324  dir_z = driftDir.z(); // The z drift direction
325  CosLorenzAngleX = 1./std::sqrt(1. + TanLorenzAngleX * TanLorenzAngleX); // cosine
326  CosLorenzAngleY = 1./std::sqrt(1. + TanLorenzAngleY * TanLorenzAngleY); // cosine;
327  }
328  else {
329  TanLorenzAngleX = driftDir.x();
330  TanLorenzAngleY = 0.; // force to 0, driftDir.y()/driftDir.z();
331  dir_z = driftDir.z(); // The z drift direction
332  CosLorenzAngleX = 1./std::sqrt(1. + TanLorenzAngleX * TanLorenzAngleX); // cosine to estimate the path length
333  CosLorenzAngleY = 1.;
334  }
335 
336  float moduleThickness = pixdet->specificSurface().bounds().thickness();
337  float stripPitch = pixdet->specificTopology().pitch().first;
338 
339  LogDebug("Phase2TrackerDigitizerAlgorithm")
340  << " Lorentz Tan " << TanLorenzAngleX << " " << TanLorenzAngleY <<" "
341  << CosLorenzAngleX << " " << CosLorenzAngleY << " "
342  << moduleThickness*TanLorenzAngleX << " " << driftDir;
343 
344  float Sigma_x = 1.; // Charge spread
345  float Sigma_y = 1.;
346  float DriftDistance; // Distance between charge generation and collection
347  float DriftLength; // Actual Drift Lentgh
348  float Sigma;
349 
350  for (unsigned int i = 0; i != ionization_points.size(); ++i) {
351  float SegX, SegY, SegZ; // position
352  SegX = ionization_points[i].x();
353  SegY = ionization_points[i].y();
354  SegZ = ionization_points[i].z();
355 
356  // Distance from the collection plane
357  // DriftDistance = (moduleThickness/2. + SegZ); // Drift to -z
358  // Include explixitely the E drift direction (for CMS dir_z=-1)
359  DriftDistance = moduleThickness/2. - (dir_z * SegZ); // Drift to -z
360 
361  if (DriftDistance < 0.)
362  DriftDistance = 0.;
363  else if (DriftDistance > moduleThickness)
364  DriftDistance = moduleThickness;
365 
366  // Assume full depletion now, partial depletion will come later.
367  float XDriftDueToMagField = DriftDistance * TanLorenzAngleX;
368  float YDriftDueToMagField = DriftDistance * TanLorenzAngleY;
369 
370  // Shift cloud center
371  float CloudCenterX = SegX + XDriftDueToMagField;
372  float CloudCenterY = SegY + YDriftDueToMagField;
373 
374  // Calculate how long is the charge drift path
375  DriftLength = std::sqrt(DriftDistance*DriftDistance +
376  XDriftDueToMagField*XDriftDueToMagField +
377  YDriftDueToMagField*YDriftDueToMagField);
378 
379  // What is the charge diffusion after this path
380  // Sigma0=0.00037 is for 300um thickness (make sure moduleThickness is in [cm])
381  Sigma = std::sqrt(DriftLength/moduleThickness) * (Sigma0 * moduleThickness/0.0300);
382  // D.B.: sigmaCoeff=0 means no modulation
383  if (SigmaCoeff) Sigma *= (SigmaCoeff * cos(SegX*M_PI/stripPitch) * cos(SegX*M_PI/stripPitch) + 1);
384  // NB: divided by 4 to get a periodicity of stripPitch
385 
386  // Project the diffusion sigma on the collection plane
387  Sigma_x = Sigma / CosLorenzAngleX;
388  Sigma_y = Sigma / CosLorenzAngleY;
389 
390  // Insert a charge loss due to Rad Damage here
391  float energyOnCollector = ionization_points[i].energy(); // The energy that reaches the collector
392 
393  // pseudoRadDamage
394  if (pseudoRadDamage >= 0.001) {
395  float moduleRadius = pixdet->surface().position().perp();
396  if (moduleRadius <= pseudoRadDamageRadius) {
397  float kValue = pseudoRadDamage/(moduleRadius * moduleRadius);
398  energyOnCollector = energyOnCollector * exp(-1 * kValue * DriftDistance/moduleThickness);
399  }
400  }
401  LogDebug("Phase2TrackerDigitizerAlgorithm")
402  << "Dift DistanceZ = " << DriftDistance << " module thickness = " << moduleThickness
403  << " Start Energy = " << ionization_points[i].energy() << " Energy after loss= " << energyOnCollector;
404  DigitizerUtility::SignalPoint sp(CloudCenterX, CloudCenterY, Sigma_x, Sigma_y, hit.tof(), energyOnCollector);
405  // Load the Charge distribution parameters
406  collection_points[i] = sp;
407  }
408 }
#define LogDebug(id)
LocalVector DriftDirection(const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
float tof() const
deprecated name for timeOfFlight()
Definition: PSimHit.h:72
T perp() const
Definition: PV3DBase.h:72
T y() const
Definition: PV3DBase.h:63
virtual std::pair< float, float > pitch() const =0
const Bounds & bounds() const
Definition: Surface.h:120
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
#define M_PI
virtual float thickness() const =0
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T x() const
Definition: PV3DBase.h:62
const PositionType & position() const
unsigned int detUnitId() const
Definition: PSimHit.h:93
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:45
LocalVector Phase2TrackerDigitizerAlgorithm::DriftDirection ( const Phase2TrackerGeomDetUnit pixdet,
const GlobalVector bfield,
const DetId detId 
) const
protected

Definition at line 745 of file Phase2TrackerDigitizerAlgorithm.cc.

References alpha2Order, GeomDet::geographicalId(), SiPixelLorentzAngle::getLorentzAngle(), LogDebug, PixelSubdetector::PixelBarrel, GloballyPositioned< T >::position(), DetId::rawId(), GloballyPositioned< T >::rotation(), Scenarios_cff::scale, SiPixelLorentzAngle_, DetId::subdetId(), GeomDet::surface(), tanLorentzAnglePerTesla_Barrel, tanLorentzAnglePerTesla_Endcap, StripSubdetector::TOB, and use_LorentzAngle_DB_.

Referenced by drift().

747  {
748  Frame detFrame(pixdet->surface().position(),pixdet->surface().rotation());
749  LocalVector Bfield = detFrame.toLocal(bfield);
750  float alpha2_Endcap;
751  float alpha2_Barrel;
752  float alpha2;
753 
754  float dir_x = 0.0;
755  float dir_y = 0.0;
756  float dir_z = 0.0;
757  float scale = 0.0;
758 
759  uint32_t detID = pixdet->geographicalId().rawId();
760  unsigned int Sub_detid = DetId(detID).subdetId();
761 
762  // Read Lorentz angle from cfg file:
763  if (!use_LorentzAngle_DB_) {
764  if (alpha2Order) {
767  } else {
768  alpha2_Endcap = 0.0;
769  alpha2_Barrel = 0.0;
770  }
771 
772  if (Sub_detid == PixelSubdetector::PixelBarrel || Sub_detid == StripSubdetector::TOB) { // barrel layers
773  dir_x = -( tanLorentzAnglePerTesla_Barrel * Bfield.y() + alpha2_Barrel* Bfield.z()* Bfield.x() );
774  dir_y = +( tanLorentzAnglePerTesla_Barrel * Bfield.x() - alpha2_Barrel* Bfield.z()* Bfield.y() );
775  dir_z = -(1 + alpha2_Barrel* Bfield.z()*Bfield.z() );
776  scale = (1 + alpha2_Barrel* Bfield.z()*Bfield.z() );
777 
778  } else { // forward disks
779  dir_x = -( tanLorentzAnglePerTesla_Endcap * Bfield.y() + alpha2_Endcap* Bfield.z()* Bfield.x() );
780  dir_y = +( tanLorentzAnglePerTesla_Endcap * Bfield.x() - alpha2_Endcap* Bfield.z()* Bfield.y() );
781  dir_z = -(1 + alpha2_Endcap* Bfield.z()*Bfield.z() );
782  scale = (1 + alpha2_Endcap* Bfield.z()*Bfield.z() );
783  }
784  }
785 
786  // Read Lorentz angle from DB:
787  if (use_LorentzAngle_DB_) {
788  float lorentzAngle = SiPixelLorentzAngle_->getLorentzAngle(detId);
789  alpha2 = lorentzAngle * lorentzAngle;
790 
791  dir_x = -( lorentzAngle * Bfield.y() + alpha2 * Bfield.z()* Bfield.x() );
792  dir_y = +( lorentzAngle * Bfield.x() - alpha2 * Bfield.z()* Bfield.y() );
793  dir_z = -(1 + alpha2 * Bfield.z()*Bfield.z() );
794  scale = (1 + alpha2 * Bfield.z()*Bfield.z() );
795  }
796 
797  LocalVector theDriftDirection = LocalVector(dir_x/scale, dir_y/scale, dir_z/scale );
798 
799  LogDebug ("Phase2TrackerDigitizerAlgorithm") << " The drift direction in local coordinate is "
800  << theDriftDirection ;
801  return theDriftDirection;
802 }
#define LogDebug(id)
Local3DVector LocalVector
Definition: LocalVector.h:12
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
edm::ESHandle< SiPixelLorentzAngle > SiPixelLorentzAngle_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
Definition: DetId.h:18
float getLorentzAngle(const uint32_t &) const
const RotationType & rotation() const
const PositionType & position() const
void Phase2TrackerDigitizerAlgorithm::fluctuateEloss ( int  particleId,
float  momentum,
float  eloss,
float  length,
int  NumberOfSegments,
std::vector< float > &  elossVector 
) const
protected

Definition at line 242 of file Phase2TrackerDigitizerAlgorithm.cc.

References funct::abs(), fluctuate, mps_fire::i, cuy::ii, particleFlowDisplacedVertex_cfi::ratio, rengine_, and tMax.

Referenced by primary_ionization().

247  {
248 
249  // Get dedx for this track
250  //float dedx;
251  //if( length > 0.) dedx = eloss/length;
252  //else dedx = eloss;
253 
254  double particleMass = 139.6; // Mass in MeV, Assume pion
255  pid = std::abs(pid);
256  if (pid != 211) { // Mass in MeV
257  if (pid == 11) particleMass = 0.511;
258  else if (pid == 13) particleMass = 105.7;
259  else if (pid == 321) particleMass = 493.7;
260  else if (pid == 2212) particleMass = 938.3;
261  }
262  // What is the track segment length.
263  float segmentLength = length/NumberOfSegs;
264 
265  // Generate charge fluctuations.
266  float de = 0.;
267  float sum = 0.;
268  double segmentEloss = (1000. * eloss)/NumberOfSegs; //eloss in MeV
269  for (int i = 0; i < NumberOfSegs; ++i) {
270  // material,*, momentum,energy,*, *, mass
271  //myglandz_(14.,segmentLength,2.,2.,dedx,de,0.14);
272  // The G4 routine needs momentum in MeV, mass in Mev, delta-cut in MeV,
273  // track segment length in mm, segment eloss in MeV
274  // Returns fluctuated eloss in MeV
275  double deltaCutoff = tMax; // the cutoff is sometimes redefined inside, so fix it.
276  de = fluctuate->SampleFluctuations(static_cast<double>(particleMomentum*1000.),
277  particleMass, deltaCutoff,
278  static_cast<double>(segmentLength*10.),
279  segmentEloss,
280  rengine_ )/1000.; //convert to GeV
281  elossVector.push_back(de);
282  sum += de;
283  }
284  if (sum > 0.) { // If fluctuations give eloss>0.
285  // Rescale to the same total eloss
286  float ratio = eloss/sum;
287  for (int ii = 0; ii < NumberOfSegs; ++ii) elossVector[ii] = ratio*elossVector[ii];
288  }
289  else { // If fluctuations gives 0 eloss
290  float averageEloss = eloss/NumberOfSegs;
291  for (int ii = 0; ii < NumberOfSegs; ++ii) elossVector[ii] = averageEloss;
292  }
293 
294 }
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ii
Definition: cuy.py:589
void Phase2TrackerDigitizerAlgorithm::induce_signal ( const PSimHit hit,
const size_t  hitIndex,
const unsigned int  tofBin,
const Phase2TrackerGeomDetUnit pixdet,
const std::vector< DigitizerUtility::SignalPoint > &  collection_points 
)
protected

Definition at line 413 of file Phase2TrackerDigitizerAlgorithm.cc.

References _signal, calcQ(), officialStyle::chan, Topology::channel(), ClusterWidth, GeomDet::geographicalId(), createfilelist::int, Topology::localPosition(), LogDebug, makeDigiSimLinks_, Topology::measurementPosition(), PixelTopology::ncolumns(), PixelTopology::nrows(), PixelTopology::pitch(), pixelFlag, Phase2TrackerDigi::pixelToChannel(), PixelDigi::pixelToChannel(), DetId::rawId(), gun_cff::SigmaX, gun_cff::SigmaY, PixelGeomDetUnit::specificTopology(), findQualityFiles::v, x, PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::x(), y, PV2DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by PixelDigitizerAlgorithm::accumulateSimHits(), SSDigitizerAlgorithm::accumulateSimHits(), PSSDigitizerAlgorithm::accumulateSimHits(), and PSPDigitizerAlgorithm::accumulateSimHits().

417  {
418 
419  // X - Rows, Left-Right, 160, (1.6cm) for barrel
420  // Y - Columns, Down-Up, 416, (6.4cm)
421  const Phase2TrackerTopology* topol = &pixdet->specificTopology();
422  uint32_t detID = pixdet->geographicalId().rawId();
423  signal_map_type& theSignal = _signal[detID];
424 
425  LogDebug("Phase2TrackerDigitizerAlgorithm")
426  << " enter induce_signal, "
427  << topol->pitch().first << " " << topol->pitch().second; //OK
428 
429  // local map to store pixels hit by 1 Hit.
430  using hit_map_type = std::map<int, float, std::less<int> >;
431  hit_map_type hit_signal;
432 
433  // map to store pixel integrals in the x and in the y directions
434  std::map<int, float, std::less<int> > x,y;
435 
436  // Assign signals to readout channels and store sorted by channel number
437  int iseg = 0;
438  float ESum = 0.0;
439 
440  // Iterate over collection points on the collection plane
441  for (auto const & v : collection_points) {
442  iseg++;
443  float CloudCenterX = v.position().x(); // Charge position in x
444  float CloudCenterY = v.position().y(); // in y
445  float SigmaX = v.sigma_x(); // Charge spread in x
446  float SigmaY = v.sigma_y(); // in y
447  float Charge = v.amplitude(); // Charge amplitude
448 
449  LogDebug("Phase2TrackerDigitizerAlgorithm")
450  << " cloud " << v.position().x() << " " << v.position().y() << " "
451  << v.sigma_x() << " " << v.sigma_y() << " " << v.amplitude();
452 
453  // Find the maximum cloud spread in 2D plane , assume 3*sigma
454  float CloudRight = CloudCenterX + ClusterWidth * SigmaX;
455  float CloudLeft = CloudCenterX - ClusterWidth * SigmaX;
456  float CloudUp = CloudCenterY + ClusterWidth * SigmaY;
457  float CloudDown = CloudCenterY - ClusterWidth * SigmaY;
458 
459  // Define 2D cloud limit points
460  LocalPoint PointRightUp = LocalPoint(CloudRight,CloudUp);
461  LocalPoint PointLeftDown = LocalPoint(CloudLeft,CloudDown);
462 
463  // This points can be located outside the sensor area.
464  // The conversion to measurement point does not check for that
465  // so the returned pixel index might be wrong (outside range).
466  // We rely on the limits check below to fix this.
467  // But remember whatever we do here THE CHARGE OUTSIDE THE ACTIVE
468  // PIXEL ARE IS LOST, it should not be collected.
469 
470  // Convert the 2D points to pixel indices
471  MeasurementPoint mp = topol->measurementPosition(PointRightUp ); //OK
472 
473  int IPixRightUpX = int(floor( mp.x()));
474  int IPixRightUpY = int(floor( mp.y()));
475 
476  LogDebug("Phase2TrackerDigitizerAlgorithm") << " right-up " << PointRightUp << " "
477  << mp.x() << " " << mp.y() << " "
478  << IPixRightUpX << " " << IPixRightUpY ;
479 
480  mp = topol->measurementPosition(PointLeftDown); // OK
481 
482  int IPixLeftDownX = int(floor( mp.x()));
483  int IPixLeftDownY = int(floor( mp.y()));
484 
485  LogDebug("Phase2TrackerDigitizerAlgorithm") << " left-down " << PointLeftDown << " "
486  << mp.x() << " " << mp.y() << " "
487  << IPixLeftDownX << " " << IPixLeftDownY ;
488 
489  // Check detector limits to correct for pixels outside range.
490  int numColumns = topol->ncolumns(); // det module number of cols&rows
491  int numRows = topol->nrows();
492 
493  IPixRightUpX = numRows > IPixRightUpX ? IPixRightUpX : numRows-1;
494  IPixRightUpY = numColumns > IPixRightUpY ? IPixRightUpY : numColumns-1;
495  IPixLeftDownX = 0 < IPixLeftDownX ? IPixLeftDownX : 0;
496  IPixLeftDownY = 0 < IPixLeftDownY ? IPixLeftDownY : 0;
497 
498  x.clear(); // clear temporary integration array
499  y.clear();
500 
501  // First integrate cahrge strips in x
502  int ix; // TT for compatibility
503  for (ix = IPixLeftDownX; ix <= IPixRightUpX; ix++) { // loop over x index
504  float xUB, xLB, UpperBound, LowerBound;
505 
506  // Why is set to 0 if ix=0, does it meen that we accept charge
507  // outside the sensor?
508  if (ix == 0 || SigmaX==0.) // skip for surface segemnts
509  LowerBound = 0.;
510  else {
511  mp = MeasurementPoint( float(ix), 0.0);
512  xLB = topol->localPosition(mp).x();
513  LowerBound = 1-calcQ((xLB-CloudCenterX)/SigmaX);
514  }
515 
516  if (ix == numRows-1 || SigmaX == 0.)
517  UpperBound = 1.;
518  else {
519  mp = MeasurementPoint(float(ix+1), 0.0);
520  xUB = topol->localPosition(mp).x();
521  UpperBound = 1. - calcQ((xUB-CloudCenterX)/SigmaX);
522  }
523  float TotalIntegrationRange = UpperBound - LowerBound; // get strip
524  x[ix] = TotalIntegrationRange; // save strip integral
525  }
526 
527  // Now integarte strips in y
528  int iy; // TT for compatibility
529  for (iy = IPixLeftDownY; iy <= IPixRightUpY; iy++) { //loope over y ind
530  float yUB, yLB, UpperBound, LowerBound;
531 
532  if (iy == 0 || SigmaY==0.)
533  LowerBound = 0.;
534  else {
535  mp = MeasurementPoint(0.0, float(iy));
536  yLB = topol->localPosition(mp).y();
537  LowerBound = 1. - calcQ((yLB-CloudCenterY)/SigmaY);
538  }
539 
540  if (iy == numColumns-1 || SigmaY==0. )
541  UpperBound = 1.;
542  else {
543  mp = MeasurementPoint(0.0, float(iy+1));
544  yUB = topol->localPosition(mp).y();
545  UpperBound = 1. - calcQ((yUB-CloudCenterY)/SigmaY);
546  }
547 
548  float TotalIntegrationRange = UpperBound - LowerBound;
549  y[iy] = TotalIntegrationRange; // save strip integral
550  }
551 
552  // Get the 2D charge integrals by folding x and y strips
553  int chan;
554  for (ix = IPixLeftDownX; ix <= IPixRightUpX; ix++) { // loop over x index
555  for (iy = IPixLeftDownY; iy <= IPixRightUpY; iy++) { //loope over y ind
556  float ChargeFraction = Charge*x[ix]*y[iy];
557  if (ChargeFraction > 0.) {
558  chan = (pixelFlag) ? PixelDigi::pixelToChannel(ix, iy)
559  : Phase2TrackerDigi::pixelToChannel(ix, iy); // Get index
560  // Load the amplitude
561  hit_signal[chan] += ChargeFraction;
562  }
563 
564  mp = MeasurementPoint(float(ix), float(iy));
565  LocalPoint lp = topol->localPosition(mp);
566  chan = topol->channel(lp);
567 
568  LogDebug("Phase2TrackerDigitizerAlgorithm")
569  << " pixel " << ix << " " << iy << " - "<<" "
570  << chan << " " << ChargeFraction<<" "
571  << mp.x() << " " << mp.y() <<" "
572  << lp.x() << " " << lp.y() << " " // givex edge position
573  << chan; // edge belongs to previous ?
574  ESum += ChargeFraction;
575  }
576  }
577  }
578  // Fill the global map with all hit pixels from this event
579  for (auto const & hit_s : hit_signal) {
580  int chan = hit_s.first;
581  theSignal[chan] += (makeDigiSimLinks_ ? DigitizerUtility::Amplitude( hit_s.second, &hit, hit_s.second, hitIndex, tofBin)
582  : DigitizerUtility::Amplitude( hit_s.second, nullptr, hit_s.second) ) ;
583  }
584 }
#define LogDebug(id)
virtual int nrows() const =0
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:32
T y() const
Definition: PV2DBase.h:46
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
T y() const
Definition: PV3DBase.h:63
virtual std::pair< float, float > pitch() const =0
#define nullptr
SigmaX
Definition: gun_cff.py:25
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:68
U second(std::pair< T, U > const &p)
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
virtual int channel(const LocalPoint &p) const =0
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
SigmaY
Definition: gun_cff.py:26
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
virtual int ncolumns() const =0
T x() const
Definition: PV2DBase.h:45
T x() const
Definition: PV3DBase.h:62
virtual void Phase2TrackerDigitizerAlgorithm::init ( const edm::EventSetup es)
pure virtual
void Phase2TrackerDigitizerAlgorithm::initializeEvent ( CLHEP::HepRandomEngine &  eng)
virtual

Definition at line 723 of file Phase2TrackerDigitizerAlgorithm.cc.

References _signal, addNoise, AddPixelInefficiency, addThresholdSmearing, fluctuateCharge, gaussDistribution_, rengine_, smearedThreshold_Barrel_, smearedThreshold_Endcap_, theReadoutNoise, theThresholdInE_Barrel, theThresholdInE_Endcap, theThresholdSmearing_Barrel, and theThresholdSmearing_Endcap.

723  {
725 
726  gaussDistribution_ = std::make_unique<CLHEP::RandGaussQ>(eng, 0., theReadoutNoise);
727  }
728  // Threshold smearing with gaussian distribution:
729  if (addThresholdSmearing) {
730  smearedThreshold_Endcap_ = std::make_unique<CLHEP::RandGaussQ> (eng, theThresholdInE_Endcap , theThresholdSmearing_Endcap);
731  smearedThreshold_Barrel_ = std::make_unique<CLHEP::RandGaussQ> (eng, theThresholdInE_Barrel , theThresholdSmearing_Barrel);
732  }
733  rengine_ = (&eng);
734  _signal.clear();
735 }
std::unique_ptr< CLHEP::RandGaussQ > gaussDistribution_
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Endcap_
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Barrel_
void Phase2TrackerDigitizerAlgorithm::loadAccumulator ( unsigned int  detId,
const std::map< int, float > &  accumulator 
)

Definition at line 916 of file Phase2TrackerDigitizerAlgorithm.cc.

References _signal, HTMLExport::elem(), and Exception.

916  {
917  auto& theSignal = _signal[detId];
918  // the input channel is always with PixelDigi definition
919  // if needed, that has to be converted to Phase2TrackerDigi convention
920  for(const auto& elem: accumulator) {
921  auto inserted = theSignal.emplace(elem.first, DigitizerUtility::Amplitude(elem.second, nullptr));
922  if(!inserted.second) {
923  throw cms::Exception("LogicError") << "Signal was already set for DetId " << detId;
924  }
925  }
926 }
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:18
void Phase2TrackerDigitizerAlgorithm::module_killing_conf ( uint32_t  detID)
protectedvirtual

Definition at line 825 of file Phase2TrackerDigitizerAlgorithm.cc.

References _signal, Phase2TrackerDigi::channelToPixel(), PixelDigi::channelToPixel(), DeadModules, Module, pixelFlag, alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by digitize().

825  {
826  bool isbad = false;
827  int detid = detID;
829  for ( auto const & det_m : DeadModules) {
830  int Dead_detID = det_m.getParameter<int>("Dead_detID");
831  Module = det_m.getParameter<std::string>("Module");
832  if (detid == Dead_detID){
833  isbad = true;
834  break;
835  }
836  }
837 
838  if (!isbad) return;
839 
840  signal_map_type& theSignal = _signal[detID]; // check validity
841 
842 
843  for (auto & s : theSignal) {
844  std::pair<int,int> ip;
845  if (pixelFlag) ip = PixelDigi::channelToPixel(s.first);
846  else ip = Phase2TrackerDigi::channelToPixel(s.first);//get pixel pos
847 
848  if (Module == "whole") s.second.set(0.); // reset amplitude
849  else if (Module == "tbmA" && ip.first >= 80 && ip.first <= 159) s.second.set(0.);
850  else if (Module == "tbmB" && ip.first <= 79) s.second.set(0.);
851  }
852 }
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:62
#define Module(md)
Definition: vmac.h:203
static std::pair< unsigned int, unsigned int > channelToPixel(unsigned int ch)
void Phase2TrackerDigitizerAlgorithm::module_killing_DB ( uint32_t  detID)
protectedvirtual

Definition at line 854 of file Phase2TrackerDigitizerAlgorithm.cc.

References _signal, funct::abs(), badPixels, Phase2TrackerDigi::channelToPixel(), PixelDigi::channelToPixel(), SiPixelQuality::disabledModuleType::errorType, SiPixelFedCablingMap::findItem(), SiPixelQuality::getBadComponentList(), triggerObjects_cff::id, sipixelobjects::PixelROC::idInDetUnit(), SiPixelQuality::IsRocBad(), gen::k, DTRecHitClients_cfi::local, map_, AlCaHLTBitMon_ParallelJobs::p, callgraph::path, SiPixelFedCablingMap::pathToDetUnit(), pixelFlag, edm::ESHandle< T >::product(), alignCSCRings::s, SiPixelBadModule_, and sipixelobjects::PixelROC::toGlobal().

Referenced by digitize().

854  {
855  bool isbad = false;
856 
857  std::vector<SiPixelQuality::disabledModuleType>disabledModules = SiPixelBadModule_->getBadComponentList();
858 
860  for (size_t id = 0;id < disabledModules.size(); id++) {
861  if (detID == disabledModules[id].DetID) {
862  isbad = true;
863  badmodule = disabledModules[id];
864  break;
865  }
866  }
867 
868  if (!isbad)
869  return;
870 
871 
872  signal_map_type& theSignal = _signal[detID]; // check validity
873 
874  if (badmodule.errorType == 0) { // this is a whole dead module.
875  for (auto & s : theSignal) {
876  s.second.set(0.); // reset amplitude
877  }
878  }
879  else { // all other module types: half-modules and single ROCs.
880  // Get Bad ROC position:
881  // follow the example of getBadRocPositions in CondFormats/SiPixelObjects/src/SiPixelQuality.cc
882  std::vector<GlobalPixel> badrocpositions (0);
883  for (unsigned int j = 0; j < 16; j++) {
884  if (SiPixelBadModule_->IsRocBad(detID, j) == true) {
885  std::vector<CablingPathToDetUnit> path = map_.product()->pathToDetUnit(detID);
886  for (auto const & p : path) {
887  const PixelROC* myroc = map_.product()->findItem(p);
888  if (myroc->idInDetUnit() == j) {
889  LocalPixel::RocRowCol local = {39, 25}; //corresponding to center of ROC row, col
890  GlobalPixel global = myroc->toGlobal(LocalPixel(local));
891  badrocpositions.push_back(global);
892  break;
893  }
894  }
895  }
896  }
897 
898 
899  for (auto & s : theSignal) {
900  std::pair<int,int> ip;
901  if (pixelFlag) ip = PixelDigi::channelToPixel(s.first);
902  else ip = Phase2TrackerDigi::channelToPixel(s.first);
903 
904  for (auto const & p : badrocpositions) {
905  for (auto & k : badPixels ) {
906  if ( p.row == k.getParameter<int>("row") &&
907  ip.first == k.getParameter<int>("row") &&
908  std::abs(ip.second - p.col) < k.getParameter<int>("col")) {s.second.set(0.);}
909  }
910  }
911  }
912  }
913 }
edm::ESHandle< SiPixelFedCablingMap > map_
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
identify pixel inside single ROC
Definition: LocalPixel.h:7
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
std::vector< edm::ParameterSet > badPixels
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:40
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const std::vector< disabledModuleType > getBadComponentList() const
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
int k[5][pyjets_maxn]
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:62
row and collumn in ROC representation
Definition: LocalPixel.h:15
const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const final
std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const final
T const * product() const
Definition: ESHandle.h:86
static std::pair< unsigned int, unsigned int > channelToPixel(unsigned int ch)
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.h:59
edm::ESHandle< SiPixelQuality > SiPixelBadModule_
void Phase2TrackerDigitizerAlgorithm::pixel_inefficiency ( const SubdetEfficiencies eff,
const Phase2TrackerGeomDetUnit pixdet,
const TrackerTopology tTopo 
)
protectedvirtual

Definition at line 690 of file Phase2TrackerDigitizerAlgorithm.cc.

References _signal, Phase2TrackerDigitizerAlgorithm::SubdetEfficiencies::barrel_efficiencies, Phase2TrackerDigitizerAlgorithm::SubdetEfficiencies::endcap_efficiencies, GeomDet::geographicalId(), LogDebug, PixelSubdetector::PixelBarrel, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), rand(), DetId::rawId(), rengine_, alignCSCRings::s, DetId::subdetId(), and StripSubdetector::TOB.

Referenced by digitize().

692  {
693 
694  uint32_t detID = pixdet->geographicalId().rawId();
695 
696  signal_map_type& theSignal = _signal[detID]; // check validity
697 
698  // Predefined efficiencies
699  float subdetEfficiency = 1.0;
700 
701  // setup the chip indices conversion
702  unsigned int Subid=DetId(detID).subdetId();
703  if (Subid == PixelSubdetector::PixelBarrel || Subid == StripSubdetector::TOB) { // barrel layers
704  unsigned int layerIndex = tTopo->pxbLayer(detID);
705  if (layerIndex-1 < eff.barrel_efficiencies.size()) subdetEfficiency = eff.barrel_efficiencies[layerIndex-1];
706  } else { // forward disks
707  unsigned int diskIndex = 2 * tTopo->pxfDisk(detID) - tTopo->pxfSide(detID);
708  if (diskIndex-1 < eff.endcap_efficiencies.size()) subdetEfficiency = eff.endcap_efficiencies[diskIndex-1];
709  }
710 
711  LogDebug ("Phase2TrackerDigitizerAlgorithm") << " enter pixel_inefficiency " << subdetEfficiency;
712 
713  // Now loop again over pixels to kill some of them.
714  // Loop over hits, amplitude in electrons, channel = coded row,col
715  for (auto & s : theSignal) {
716  float rand = rengine_->flat();
717  if( rand>subdetEfficiency ) {
718  // make amplitude =0
719  s.second.set(0.); // reset amplitude,
720  }
721  }
722 }
#define LogDebug(id)
unsigned int pxfDisk(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
unsigned int pxbLayer(const DetId &id) const
Definition: DetId.h:18
Signal rand(Signal arg)
Definition: vlib.cc:442
unsigned int pxfSide(const DetId &id) const
void Phase2TrackerDigitizerAlgorithm::pixel_inefficiency_db ( uint32_t  detID)
protectedvirtual

Definition at line 806 of file Phase2TrackerDigitizerAlgorithm.cc.

References _signal, Phase2TrackerDigi::channelToPixel(), PixelDigi::channelToPixel(), cuy::col, pixelFlag, alignCSCRings::s, and theSiPixelGainCalibrationService_.

Referenced by digitize().

806  {
807  signal_map_type& theSignal = _signal[detID]; // check validity
808 
809  // Loop over hit pixels, amplitude in electrons, channel = coded row,col
810  for (auto & s : theSignal) {
811  std::pair<int,int> ip;
812  if (pixelFlag) ip = PixelDigi::channelToPixel(s.first);//get pixel pos
813  else ip = Phase2TrackerDigi::channelToPixel(s.first);//get pixel pos
814  int row = ip.first; // X in row
815  int col = ip.second; // Y is in col
816  //transform to ROC index coordinates
817  if (theSiPixelGainCalibrationService_->isDead(detID, col, row)) {
818  s.second.set(0.); // reset amplitude,
819  }
820  }
821 }
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:62
col
Definition: cuy.py:1009
static std::pair< unsigned int, unsigned int > channelToPixel(unsigned int ch)
void Phase2TrackerDigitizerAlgorithm::primary_ionization ( const PSimHit hit,
std::vector< DigitizerUtility::EnergyDepositUnit > &  ionization_points 
) const
protected

Definition at line 183 of file Phase2TrackerDigitizerAlgorithm.cc.

References PSimHit::energyLoss(), PSimHit::entryPoint(), PSimHit::exitPoint(), objects.autophobj::float, fluctuateCharge, fluctuateEloss(), GeVperElectron, mps_fire::i, createfilelist::int, LogDebug, PV3DBase< T, PVType, FrameType >::mag(), PSimHit::pabs(), PSimHit::particleType(), sysUtil::pid, point, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by PixelDigitizerAlgorithm::accumulateSimHits(), SSDigitizerAlgorithm::accumulateSimHits(), PSSDigitizerAlgorithm::accumulateSimHits(), and PSPDigitizerAlgorithm::accumulateSimHits().

184  {
185  // Straight line approximation for trajectory inside active media
186  const float SegmentLength = 0.0010; // in cm (10 microns)
187  float energy;
188 
189  // Get the 3D segment direction vector
190  LocalVector direction = hit.exitPoint() - hit.entryPoint();
191 
192  float eLoss = hit.energyLoss(); // Eloss in GeV
193  float length = direction.mag(); // Track length in Silicon
194 
195  int NumberOfSegments = int (length / SegmentLength); // Number of segments
196  if (NumberOfSegments < 1) NumberOfSegments = 1;
197  LogDebug("Phase2TrackerDigitizerAlgorithm")
198  << "enter primary_ionzation " << NumberOfSegments
199  << " shift = "
200  << hit.exitPoint().x() - hit.entryPoint().x() << " "
201  << hit.exitPoint().y() - hit.entryPoint().y() << " "
202  << hit.exitPoint().z() - hit.entryPoint().z() << " "
203  << hit.particleType()
204  << " " << hit.pabs();
205 
206  std::vector<float> elossVector; // Eloss vector
207  elossVector.reserve(NumberOfSegments);
208  if (fluctuateCharge) {
209  int pid = hit.particleType();
210  // int pid=211; // assume it is a pion
211 
212  float momentum = hit.pabs();
213  // Generate fluctuated charge points
214  fluctuateEloss(pid, momentum, eLoss, length, NumberOfSegments, elossVector);
215  }
216  ionization_points.reserve(NumberOfSegments); // set size
217 
218  // loop over segments
219  for (int i = 0; i != NumberOfSegments; ++i) {
220  // Divide the segment into equal length subsegments
221  Local3DPoint point = hit.entryPoint() + float((i+0.5)/NumberOfSegments) * direction;
222  if (fluctuateCharge)
223  energy = elossVector[i]/GeVperElectron; // Convert charge to elec.
224  else
225  energy = hit.energyLoss()/GeVperElectron/float(NumberOfSegments);
226 
227  DigitizerUtility::EnergyDepositUnit edu(energy, point); // define position,energy point
228  ionization_points.push_back(edu); // save
229  LogDebug("Phase2TrackerDigitizerAlgorithm")
230  << i << " " << ionization_points[i].x() << " "
231  << ionization_points[i].y() << " "
232  << ionization_points[i].z() << " "
233  << ionization_points[i].energy();
234  }
235 }
#define LogDebug(id)
T y() const
Definition: PV3DBase.h:63
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
T mag() const
Definition: PV3DBase.h:67
T z() const
Definition: PV3DBase.h:64
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
Definition: PSimHit.h:63
void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments, std::vector< float > &elossVector) const
float energyLoss() const
The energy deposit in the PSimHit, in ???.
Definition: PSimHit.h:75
int particleType() const
Definition: PSimHit.h:85
T x() const
Definition: PV3DBase.h:62
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

Member Data Documentation

signalMaps Phase2TrackerDigitizerAlgorithm::_signal
protected
const bool Phase2TrackerDigitizerAlgorithm::addNoise
protected

Definition at line 141 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize(), and initializeEvent().

const bool Phase2TrackerDigitizerAlgorithm::addNoisyPixels
protected

Definition at line 142 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by add_noise().

const bool Phase2TrackerDigitizerAlgorithm::AddPixelInefficiency
protected
const bool Phase2TrackerDigitizerAlgorithm::addThresholdSmearing
protected

Definition at line 148 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize(), and initializeEvent().

const bool Phase2TrackerDigitizerAlgorithm::addXtalk
protected

Definition at line 110 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by add_noise().

const bool Phase2TrackerDigitizerAlgorithm::alpha2Order
protected

Definition at line 109 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by drift(), and DriftDirection().

std::vector<edm::ParameterSet> Phase2TrackerDigitizerAlgorithm::badPixels
protected

Definition at line 162 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by module_killing_DB().

const float Phase2TrackerDigitizerAlgorithm::ClusterWidth
protected

Definition at line 116 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by induce_signal().

const Parameters Phase2TrackerDigitizerAlgorithm::DeadModules
protected

Definition at line 101 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by module_killing_conf().

const bool Phase2TrackerDigitizerAlgorithm::doDigitalReadout
protected

Definition at line 119 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize().

const std::unique_ptr<SiG4UniversalFluctuation> Phase2TrackerDigitizerAlgorithm::fluctuate
protected

Definition at line 165 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by fluctuateEloss().

const bool Phase2TrackerDigitizerAlgorithm::fluctuateCharge
protected

Definition at line 143 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by initializeEvent(), and primary_ionization().

std::unique_ptr<CLHEP::RandGaussQ> Phase2TrackerDigitizerAlgorithm::gaussDistribution_
protected

Definition at line 203 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by add_noise(), and initializeEvent().

edm::ESHandle<TrackerGeometry> Phase2TrackerDigitizerAlgorithm::geom_
protected

Definition at line 75 of file Phase2TrackerDigitizerAlgorithm.h.

const float Phase2TrackerDigitizerAlgorithm::GeVperElectron
protected

Definition at line 106 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by primary_ionization().

const float Phase2TrackerDigitizerAlgorithm::interstripCoupling
protected

Definition at line 111 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by add_noise().

const bool Phase2TrackerDigitizerAlgorithm::makeDigiSimLinks_
protected

Definition at line 94 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize(), and induce_signal().

edm::ESHandle<SiPixelFedCablingMap> Phase2TrackerDigitizerAlgorithm::map_
protected

Definition at line 74 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by module_killing_DB().

bool Phase2TrackerDigitizerAlgorithm::pixelFlag
protected
const double Phase2TrackerDigitizerAlgorithm::pseudoRadDamage
protected

Definition at line 151 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by drift().

const double Phase2TrackerDigitizerAlgorithm::pseudoRadDamageRadius
protected

Definition at line 152 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by drift().

CLHEP::HepRandomEngine* Phase2TrackerDigitizerAlgorithm::rengine_
protected
const float Phase2TrackerDigitizerAlgorithm::Sigma0
protected

Definition at line 112 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by drift().

const float Phase2TrackerDigitizerAlgorithm::SigmaCoeff
protected

Definition at line 113 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by drift().

edm::ESHandle<SiPixelQuality> Phase2TrackerDigitizerAlgorithm::SiPixelBadModule_
protected

Definition at line 71 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by module_killing_DB().

edm::ESHandle<SiPixelLorentzAngle> Phase2TrackerDigitizerAlgorithm::SiPixelLorentzAngle_
protected

Definition at line 68 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by DriftDirection().

std::unique_ptr<CLHEP::RandGaussQ> Phase2TrackerDigitizerAlgorithm::smearedThreshold_Barrel_
protected

Definition at line 207 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize(), and initializeEvent().

std::unique_ptr<CLHEP::RandGaussQ> Phase2TrackerDigitizerAlgorithm::smearedThreshold_Endcap_
protected

Definition at line 206 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize(), and initializeEvent().

const SubdetEfficiencies Phase2TrackerDigitizerAlgorithm::subdetEfficiencies_
protected

Definition at line 200 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize().

const float Phase2TrackerDigitizerAlgorithm::tanLorentzAnglePerTesla_Barrel
protected

Definition at line 138 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by DriftDirection().

const float Phase2TrackerDigitizerAlgorithm::tanLorentzAnglePerTesla_Endcap
protected

Definition at line 137 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by DriftDirection().

const int Phase2TrackerDigitizerAlgorithm::theAdcFullScale
protected
const float Phase2TrackerDigitizerAlgorithm::theElectronPerADC
protected
const double Phase2TrackerDigitizerAlgorithm::theHIPThresholdInE_Barrel
protected

Definition at line 133 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize().

const double Phase2TrackerDigitizerAlgorithm::theHIPThresholdInE_Endcap
protected

Definition at line 132 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize().

const float Phase2TrackerDigitizerAlgorithm::theNoiseInElectrons
protected

Definition at line 122 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by add_noise(), and digitize().

const std::unique_ptr<GaussianTailNoiseGenerator> Phase2TrackerDigitizerAlgorithm::theNoiser
protected

Definition at line 166 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by add_noise().

const float Phase2TrackerDigitizerAlgorithm::theReadoutNoise
protected

Definition at line 123 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by initializeEvent().

const std::unique_ptr<SiPixelGainCalibrationOfflineSimService> Phase2TrackerDigitizerAlgorithm::theSiPixelGainCalibrationService_
protected

Definition at line 192 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by pixel_inefficiency_db().

const float Phase2TrackerDigitizerAlgorithm::theThresholdInE_Barrel
protected
const float Phase2TrackerDigitizerAlgorithm::theThresholdInE_Endcap
protected
const double Phase2TrackerDigitizerAlgorithm::theThresholdSmearing_Barrel
protected

Definition at line 130 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by initializeEvent().

const double Phase2TrackerDigitizerAlgorithm::theThresholdSmearing_Endcap
protected

Definition at line 129 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by initializeEvent().

const float Phase2TrackerDigitizerAlgorithm::theTofLowerCut
protected
const float Phase2TrackerDigitizerAlgorithm::theTofUpperCut
protected
const double Phase2TrackerDigitizerAlgorithm::tMax
protected
const bool Phase2TrackerDigitizerAlgorithm::use_deadmodule_DB_
protected

Definition at line 98 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize().

const bool Phase2TrackerDigitizerAlgorithm::use_ineff_from_db_
protected

Definition at line 96 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize().

const bool Phase2TrackerDigitizerAlgorithm::use_LorentzAngle_DB_
protected

Definition at line 99 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by DriftDirection().

const bool Phase2TrackerDigitizerAlgorithm::use_module_killing_
protected

Definition at line 97 of file Phase2TrackerDigitizerAlgorithm.h.

Referenced by digitize().