CMS 3D CMS Logo

PSPDigitizerAlgorithm.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <cmath>
3 
5 
10 
11 // Geometry
14 
15 using namespace edm;
16 
18  if (use_LorentzAngle_DB_) { // Get Lorentz angle from DB record
19  es.get<SiPhase2OuterTrackerLorentzAngleSimRcd>().get(siPhase2OTLorentzAngle_);
20  }
21 
22  es.get<TrackerDigiGeometryRecord>().get(geom_);
23 }
24 
26  : Phase2TrackerDigitizerAlgorithm(conf.getParameter<ParameterSet>("AlgorithmCommon"),
27  conf.getParameter<ParameterSet>("PSPDigitizerAlgorithm")) {
28  pixelFlag_ = false;
29  LogDebug("PSPDigitizerAlgorithm") << "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 PSPDigitizerAlgorithm::~PSPDigitizerAlgorithm() { LogDebug("PSPDigitizerAlgorithm") << "Algorithm deleted"; }
38 //
39 // -- Select the Hit for Digitization (sigScale will be implemented in future)
40 //
41 bool PSPDigitizerAlgorithm::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 }
Phase2TrackerDigitizerAlgorithm::theThresholdInE_Barrel_
const float theThresholdInE_Barrel_
Definition: Phase2TrackerDigitizerAlgorithm.h:147
MessageLogger.h
SiPhase2OuterTrackerLorentzAngleSimRcd
Definition: SiPhase2OuterTrackerCondDataRecords.h:12
Phase2TrackerDigitizerAlgorithm::theTofUpperCut_
const float theTofUpperCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:156
PSPDigitizerAlgorithm::~PSPDigitizerAlgorithm
~PSPDigitizerAlgorithm() override
Definition: PSPDigitizerAlgorithm.cc:37
PSPDigitizerAlgorithm::PSPDigitizerAlgorithm
PSPDigitizerAlgorithm(const edm::ParameterSet &conf)
Definition: PSPDigitizerAlgorithm.cc:25
edm
HLT enums.
Definition: AlignableModifier.h:19
PSPDigitizerAlgorithm::isAboveThreshold
bool isAboveThreshold(const DigitizerUtility::SimHitInfo *hitInfo, float charge, float thr) const override
Definition: PSPDigitizerAlgorithm.cc:48
SiPhase2OuterTrackerLorentzAngleRcd.h
Phase2TrackerDigitizerAlgorithm::theTofLowerCut_
const float theTofLowerCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:155
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
PSPDigitizerAlgorithm::init
void init(const edm::EventSetup &es) override
Definition: PSPDigitizerAlgorithm.cc:17
Phase2TrackerDigitizerAlgorithm::theAdcFullScale_
const int theAdcFullScale_
Definition: Phase2TrackerDigitizerAlgorithm.h:141
Service.h
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
TrackerDigiGeometryRecord.h
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
edm::ParameterSet
Definition: ParameterSet.h:47
Phase2TrackerDigitizerAlgorithm
Definition: Phase2TrackerDigitizerAlgorithm.h:59
Phase2TrackerDigitizerAlgorithm::pixelFlag_
bool pixelFlag_
Definition: Phase2TrackerDigitizerAlgorithm.h:238
Phase2TrackerDigitizerAlgorithm::tMax_
const double tMax_
Definition: Phase2TrackerDigitizerAlgorithm.h:179
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:671
Phase2TrackerDigitizerAlgorithm::theElectronPerADC_
const float theElectronPerADC_
Definition: Phase2TrackerDigitizerAlgorithm.h:140
edm::EventSetup
Definition: EventSetup.h:57
PSPDigitizerAlgorithm::select_hit
bool select_hit(const PSimHit &hit, double tCorr, double &sigScale) const override
Definition: PSPDigitizerAlgorithm.cc:41
Phase2TrackerDigitizerAlgorithm::theThresholdInE_Endcap_
const float theThresholdInE_Endcap_
Definition: Phase2TrackerDigitizerAlgorithm.h:146
DigitizerUtility::SimHitInfo
Definition: DigitizerUtility.h:14
PixelGeomDetUnit.h
PSPDigitizerAlgorithm.h
ParameterSet.h
PSimHit
Definition: PSimHit.h:15
Phase2TrackerDigitizerAlgorithm::addPixelInefficiency_
const bool addPixelInefficiency_
Definition: Phase2TrackerDigitizerAlgorithm.h:166
hit
Definition: SiStripHitEffFromCalibTree.cc:88