CMS 3D CMS Logo

PSSDigitizerAlgorithm.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  es.get<TrackerDigiGeometryRecord>().get(geom_);
22 }
24  : Phase2TrackerDigitizerAlgorithm(conf.getParameter<ParameterSet>("AlgorithmCommon"),
25  conf.getParameter<ParameterSet>("PSSDigitizerAlgorithm")) {
26  pixelFlag_ = false;
27  LogDebug("PSSDigitizerAlgorithm") << "Algorithm constructed "
28  << "Configuration parameters: "
29  << "Threshold/Gain = "
30  << "threshold in electron Endcap = " << theThresholdInE_Endcap_
31  << "threshold in electron Barrel = " << theThresholdInE_Barrel_ << " "
32  << theElectronPerADC_ << " " << theAdcFullScale_ << " The delta cut-off is set to "
33  << tMax_ << " pix-inefficiency " << addPixelInefficiency_;
34 }
35 PSSDigitizerAlgorithm::~PSSDigitizerAlgorithm() { LogDebug("PSSDigitizerAlgorithm") << "Algorithm deleted"; }
36 //
37 // -- Select the Hit for Digitization (sigScale will be implemented in future)
38 //
39 bool PSSDigitizerAlgorithm::select_hit(const PSimHit& hit, double tCorr, double& sigScale) const {
40  double toa = hit.tof() - tCorr;
41  return (toa > theTofLowerCut_ && toa < theTofUpperCut_);
42 }
43 //
44 // -- Compare Signal with Threshold
45 //
47  float charge,
48  float thr) const {
49  return (charge >= thr);
50 }
PSSDigitizerAlgorithm::init
void init(const edm::EventSetup &es) override
Definition: PSSDigitizerAlgorithm.cc:17
Phase2TrackerDigitizerAlgorithm::theThresholdInE_Barrel_
const float theThresholdInE_Barrel_
Definition: Phase2TrackerDigitizerAlgorithm.h:147
MessageLogger.h
PSSDigitizerAlgorithm.h
SiPhase2OuterTrackerLorentzAngleSimRcd
Definition: SiPhase2OuterTrackerCondDataRecords.h:12
Phase2TrackerDigitizerAlgorithm::theTofUpperCut_
const float theTofUpperCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:156
edm
HLT enums.
Definition: AlignableModifier.h:19
SiPhase2OuterTrackerLorentzAngleRcd.h
Phase2TrackerDigitizerAlgorithm::theTofLowerCut_
const float theTofLowerCut_
Definition: Phase2TrackerDigitizerAlgorithm.h:155
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
Phase2TrackerDigitizerAlgorithm::theAdcFullScale_
const int theAdcFullScale_
Definition: Phase2TrackerDigitizerAlgorithm.h:141
Service.h
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
PSSDigitizerAlgorithm::PSSDigitizerAlgorithm
PSSDigitizerAlgorithm(const edm::ParameterSet &conf)
Definition: PSSDigitizerAlgorithm.cc:23
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
TrackerDigiGeometryRecord.h
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
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:675
PSSDigitizerAlgorithm::~PSSDigitizerAlgorithm
~PSSDigitizerAlgorithm() override
Definition: PSSDigitizerAlgorithm.cc:35
Phase2TrackerDigitizerAlgorithm::theElectronPerADC_
const float theElectronPerADC_
Definition: Phase2TrackerDigitizerAlgorithm.h:140
edm::EventSetup
Definition: EventSetup.h:58
Phase2TrackerDigitizerAlgorithm::theThresholdInE_Endcap_
const float theThresholdInE_Endcap_
Definition: Phase2TrackerDigitizerAlgorithm.h:146
DigitizerUtility::SimHitInfo
Definition: DigitizerUtility.h:14
PixelGeomDetUnit.h
PSSDigitizerAlgorithm::isAboveThreshold
bool isAboveThreshold(const DigitizerUtility::SimHitInfo *hitInfo, float charge, float thr) const override
Definition: PSSDigitizerAlgorithm.cc:46
ParameterSet.h
PSimHit
Definition: PSimHit.h:15
Phase2TrackerDigitizerAlgorithm::addPixelInefficiency_
const bool addPixelInefficiency_
Definition: Phase2TrackerDigitizerAlgorithm.h:166
PSSDigitizerAlgorithm::select_hit
bool select_hit(const PSimHit &hit, double tCorr, double &sigScale) const override
Definition: PSSDigitizerAlgorithm.cc:39
hit
Definition: SiStripHitEffFromCalibTree.cc:88