CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PSSDigitizerAlgorithm.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <cmath>
3 
5 
9 
10 // Geometry
12 
13 using namespace edm;
14 
16  if (use_LorentzAngle_DB_) // Get Lorentz angle from DB record
17  siPhase2OTLorentzAngle_ = &es.getData(siPhase2OTLorentzAngleToken_);
18 
19  geom_ = &es.getData(geomToken_);
20 }
22  : Phase2TrackerDigitizerAlgorithm(conf.getParameter<ParameterSet>("AlgorithmCommon"),
23  conf.getParameter<ParameterSet>("PSSDigitizerAlgorithm"),
24  iC),
25  geomToken_(iC.esConsumes()) {
28  pixelFlag_ = false;
29  LogDebug("PSSDigitizerAlgorithm") << "Algorithm constructed "
30  << "Configuration parameters: "
31  << "Threshold/Gain = "
32  << "threshold in electron Endcap = " << theThresholdInE_Endcap_
33  << "threshold in electron Barrel = " << theThresholdInE_Barrel_ << " "
34  << theElectronPerADC_ << " " << theAdcFullScale_ << " The delta cut-off is set to "
35  << tMax_ << " pix-inefficiency " << addPixelInefficiency_;
36 }
37 PSSDigitizerAlgorithm::~PSSDigitizerAlgorithm() { LogDebug("PSSDigitizerAlgorithm") << "Algorithm deleted"; }
38 //
39 // -- Select the Hit for Digitization (sigScale will be implemented in future)
40 //
41 bool PSSDigitizerAlgorithm::select_hit(const PSimHit& hit, double tCorr, double& sigScale) const {
42  double toa = hit.tof() - tCorr;
43  return (toa > theTofLowerCut_ && toa < theTofUpperCut_);
44 }
45 //
46 // -- Compare Signal with Threshold
47 //
49  float charge,
50  float thr) const {
51  return (charge >= thr);
52 }
float tof() const
deprecated name for timeOfFlight()
Definition: PSimHit.h:76
bool select_hit(const PSimHit &hit, double tCorr, double &sigScale) const override
void init(const edm::EventSetup &es) override
edm::ESGetToken< SiPhase2OuterTrackerLorentzAngle, SiPhase2OuterTrackerLorentzAngleSimRcd > siPhase2OTLorentzAngleToken_
bool getData(T &iHolder) const
Definition: EventSetup.h:128
PSSDigitizerAlgorithm(const edm::ParameterSet &conf, edm::ConsumesCollector iC)
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
bool isAboveThreshold(const DigitizerUtility::SimHitInfo *hitInfo, float charge, float thr) const override
#define LogDebug(id)