CMS 3D CMS Logo

List of all members | Public Member Functions
PSPDigitizerAlgorithm Class Reference

#include <PSPDigitizerAlgorithm.h>

Inheritance diagram for PSPDigitizerAlgorithm:
Phase2TrackerDigitizerAlgorithm

Public Member Functions

void accumulateSimHits (const std::vector< PSimHit >::const_iterator inputBegin, const std::vector< PSimHit >::const_iterator inputEnd, const size_t inputBeginGlobalIndex, const uint32_t tofBin, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield) override
 
void init (const edm::EventSetup &es) override
 
bool isAboveThreshold (const DigitizerUtility::SimHitInfo *hitInfo, float charge, float thr) override
 
 PSPDigitizerAlgorithm (const edm::ParameterSet &conf)
 
bool select_hit (const PSimHit &hit, double tCorr, double &sigScale) override
 
 ~PSPDigitizerAlgorithm () override
 
- Public Member Functions inherited from Phase2TrackerDigitizerAlgorithm
virtual void digitize (const Phase2TrackerGeomDetUnit *pixdet, std::map< int, DigitizerUtility::DigiSimInfo > &digi_map, const TrackerTopology *tTopo)
 
virtual void initializeEvent (CLHEP::HepRandomEngine &eng)
 
void loadAccumulator (uint32_t detId, const std::map< int, float > &accumulator)
 
 Phase2TrackerDigitizerAlgorithm (const edm::ParameterSet &conf_common, const edm::ParameterSet &conf_specific)
 
virtual ~Phase2TrackerDigitizerAlgorithm ()
 

Additional Inherited Members

- Protected Types inherited from Phase2TrackerDigitizerAlgorithm
using Frame = GloballyPositioned< double >
 
using Parameters = std::vector< edm::ParameterSet >
 
using signal_map_type = std::map< int, DigitizerUtility::Amplitude, std::less< int > >
 
using signalMaps = std::map< uint32_t, signal_map_type >
 
- Protected Member Functions inherited from Phase2TrackerDigitizerAlgorithm
virtual void add_cross_talk (const Phase2TrackerGeomDetUnit *pixdet)
 
virtual void add_noise (const Phase2TrackerGeomDetUnit *pixdet)
 
virtual void add_noisy_cells (const Phase2TrackerGeomDetUnit *pixdet, float thePixelThreshold)
 
double calcQ (float x) const
 
int convertSignalToAdc (uint32_t detID, float signal_in_elec, float threshold)
 
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 uint32_t tofBin, const Phase2TrackerGeomDetUnit *pixdet, const std::vector< DigitizerUtility::SignalPoint > &collection_points)
 
virtual void module_killing_conf (uint32_t detID)
 
virtual void module_killing_DB (const Phase2TrackerGeomDetUnit *pixdet)
 
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 inherited from Phase2TrackerDigitizerAlgorithm
signalMaps _signal
 
const bool addNoise_
 
const bool addNoisyPixels_
 
const bool addPixelInefficiency_
 
const bool addThresholdSmearing_
 
const bool addXtalk_
 
const bool alpha2Order_
 
Parameters badPixels_
 
const float clusterWidth_
 
const Parameters deadModules_
 
edm::ESHandle< SiPixelFedCablingMapfedCablingMap_
 
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_
 
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 int thePhase2ReadoutMode_
 
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 6 of file PSPDigitizerAlgorithm.h.

Constructor & Destructor Documentation

◆ PSPDigitizerAlgorithm()

PSPDigitizerAlgorithm::PSPDigitizerAlgorithm ( const edm::ParameterSet conf)

Definition at line 17 of file PSPDigitizerAlgorithm.cc.

19  conf.getParameter<ParameterSet>("PSPDigitizerAlgorithm")) {
20  pixelFlag_ = false;
21  LogDebug("PSPDigitizerAlgorithm") << "Algorithm constructed "
22  << "Configuration parameters:"
23  << "Threshold/Gain = "
24  << "threshold in electron Endcap = " << theThresholdInE_Endcap_
25  << "threshold in electron Barrel = " << theThresholdInE_Barrel_ << " "
26  << theElectronPerADC_ << " " << theAdcFullScale_ << " The delta cut-off is set to "
27  << tMax_ << " pix-inefficiency " << addPixelInefficiency_;
28 }

References Phase2TrackerDigitizerAlgorithm::addPixelInefficiency_, LogDebug, Phase2TrackerDigitizerAlgorithm::pixelFlag_, Phase2TrackerDigitizerAlgorithm::theAdcFullScale_, Phase2TrackerDigitizerAlgorithm::theElectronPerADC_, Phase2TrackerDigitizerAlgorithm::theThresholdInE_Barrel_, Phase2TrackerDigitizerAlgorithm::theThresholdInE_Endcap_, and Phase2TrackerDigitizerAlgorithm::tMax_.

◆ ~PSPDigitizerAlgorithm()

PSPDigitizerAlgorithm::~PSPDigitizerAlgorithm ( )
override

Definition at line 29 of file PSPDigitizerAlgorithm.cc.

29 { LogDebug("PSPDigitizerAlgorithm") << "Algorithm deleted"; }

References LogDebug.

Member Function Documentation

◆ accumulateSimHits()

void PSPDigitizerAlgorithm::accumulateSimHits ( const std::vector< PSimHit >::const_iterator  inputBegin,
const std::vector< PSimHit >::const_iterator  inputEnd,
const size_t  inputBeginGlobalIndex,
const uint32_t  tofBin,
const Phase2TrackerGeomDetUnit pixdet,
const GlobalVector bfield 
)
overridevirtual

Implements Phase2TrackerDigitizerAlgorithm.

Definition at line 30 of file PSPDigitizerAlgorithm.cc.

35  {
36  // produce SignalPoint's for all SimHit's in detector
37  // Loop over hits
38  uint32_t detId = pixdet->geographicalId().rawId();
39  size_t simHitGlobalIndex = inputBeginGlobalIndex; // This needs to be stored to create the digi-sim link later
40 
41  // find the relevant hits
42  std::vector<PSimHit> matchedSimHits;
43  std::copy_if(inputBegin, inputEnd, std::back_inserter(matchedSimHits), [detId](auto const& hit) -> bool {
44  return hit.detUnitId() == detId;
45  });
46  // loop over a much reduced set of SimHits
47  for (auto const& hit : matchedSimHits) {
48  LogDebug("PSPDigitizerAlgorithm") << hit.particleType() << " " << hit.pabs() << " " << hit.energyLoss() << " "
49  << hit.tof() << " " << hit.trackId() << " " << hit.processType() << " "
50  << hit.detUnitId() << hit.entryPoint() << " " << hit.exitPoint();
51 
52  std::vector<DigitizerUtility::EnergyDepositUnit> ionization_points;
53  std::vector<DigitizerUtility::SignalPoint> collection_points;
54 
55  double signalScale = 1.0;
56  // fill collection_points for this SimHit, indpendent of topology
57  if (select_hit(hit, (pixdet->surface().toGlobal(hit.localPosition()).mag() * c_inv), signalScale)) {
58  primary_ionization(hit, ionization_points); // fills ionization_points
59 
60  // transforms ionization_points -> collection_points
61  drift(hit, pixdet, bfield, ionization_points, collection_points);
62 
63  // compute induced signal on readout elements and add to _signal
64  // hit needed only for SimHit<-->Digi link
65  induce_signal(hit, simHitGlobalIndex, tofBin, pixdet, collection_points);
66  }
67  ++simHitGlobalIndex;
68  }
69 }

References c_inv, Phase2TrackerDigitizerAlgorithm::drift(), GeomDet::geographicalId(), Phase2TrackerDigitizerAlgorithm::induce_signal(), LogDebug, mag(), Phase2TrackerDigitizerAlgorithm::primary_ionization(), DetId::rawId(), select_hit(), GeomDet::surface(), and Surface::toGlobal().

◆ init()

void PSPDigitizerAlgorithm::init ( const edm::EventSetup es)
overridevirtual

◆ isAboveThreshold()

bool PSPDigitizerAlgorithm::isAboveThreshold ( const DigitizerUtility::SimHitInfo hitInfo,
float  charge,
float  thr 
)
overridevirtual

Reimplemented from Phase2TrackerDigitizerAlgorithm.

Definition at line 80 of file PSPDigitizerAlgorithm.cc.

80  {
81  return (charge >= thr);
82 }

References ALCARECOTkAlJpsiMuMu_cff::charge.

◆ select_hit()

bool PSPDigitizerAlgorithm::select_hit ( const PSimHit hit,
double  tCorr,
double &  sigScale 
)
overridevirtual

Reimplemented from Phase2TrackerDigitizerAlgorithm.

Definition at line 73 of file PSPDigitizerAlgorithm.cc.

73  {
74  double toa = hit.tof() - tCorr;
75  return (toa > theTofLowerCut_ && toa < theTofUpperCut_);
76 }

References Phase2TrackerDigitizerAlgorithm::theTofLowerCut_, and Phase2TrackerDigitizerAlgorithm::theTofUpperCut_.

Referenced by accumulateSimHits().

Phase2TrackerDigitizerAlgorithm::theThresholdInE_Barrel_
const float theThresholdInE_Barrel_
Definition: Phase2TrackerDigitizerAlgorithm.h:141
PSPDigitizerAlgorithm::select_hit
bool select_hit(const PSimHit &hit, double tCorr, double &sigScale) override
Definition: PSPDigitizerAlgorithm.cc:73
Phase2TrackerDigitizerAlgorithm::theTofUpperCut_
const float theTofUpperCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:150
Phase2TrackerDigitizerAlgorithm::geom_
edm::ESHandle< TrackerGeometry > geom_
Definition: Phase2TrackerDigitizerAlgorithm.h:92
Phase2TrackerDigitizerAlgorithm::theTofLowerCut_
const float theTofLowerCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:149
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
Phase2TrackerDigitizerAlgorithm::primary_ionization
void primary_ionization(const PSimHit &hit, std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points) const
Definition: Phase2TrackerDigitizerAlgorithm.cc:183
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
Phase2TrackerDigitizerAlgorithm::theAdcFullScale_
const int theAdcFullScale_
Definition: Phase2TrackerDigitizerAlgorithm.h:135
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Phase2TrackerDigitizerAlgorithm::induce_signal
void induce_signal(const PSimHit &hit, const size_t hitIndex, const uint32_t tofBin, const Phase2TrackerGeomDetUnit *pixdet, const std::vector< DigitizerUtility::SignalPoint > &collection_points)
Definition: Phase2TrackerDigitizerAlgorithm.cc:389
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
Phase2TrackerDigitizerAlgorithm::pixelFlag_
bool pixelFlag_
Definition: Phase2TrackerDigitizerAlgorithm.h:241
Phase2TrackerDigitizerAlgorithm::tMax_
const double tMax_
Definition: Phase2TrackerDigitizerAlgorithm.h:173
Phase2TrackerDigitizerAlgorithm::theElectronPerADC_
const float theElectronPerADC_
Definition: Phase2TrackerDigitizerAlgorithm.h:134
get
#define get
Phase2TrackerDigitizerAlgorithm::theThresholdInE_Endcap_
const float theThresholdInE_Endcap_
Definition: Phase2TrackerDigitizerAlgorithm.h:140
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
c_inv
constexpr double c_inv
Definition: Phase2TrackerDigitizerAlgorithm.h:56
Phase2TrackerDigitizerAlgorithm::Phase2TrackerDigitizerAlgorithm
Phase2TrackerDigitizerAlgorithm(const edm::ParameterSet &conf_common, const edm::ParameterSet &conf_specific)
Definition: Phase2TrackerDigitizerAlgorithm.cc:48
Phase2TrackerDigitizerAlgorithm::drift
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
Definition: Phase2TrackerDigitizerAlgorithm.cc:293
Phase2TrackerDigitizerAlgorithm::addPixelInefficiency_
const bool addPixelInefficiency_
Definition: Phase2TrackerDigitizerAlgorithm.h:160
hit
Definition: SiStripHitEffFromCalibTree.cc:88