CMS 3D CMS Logo

BscSD.cc
Go to the documentation of this file.
1 // File: BscSD.cc
3 // Date: 02.2006
4 // Description: Sensitive Detector class for Bsc
5 // Modifications:
7 
12 
16 
17 #include "G4Step.hh"
18 
19 #include <iostream>
20 
21 #define debug
22 //-------------------------------------------------------------------
24  const SensitiveDetectorCatalog & clg,
25  edm::ParameterSet const & p, const SimTrackManager* manager) :
26  TimingSD(name, cpv, clg, p, manager), numberingScheme(nullptr) {
27 
28  //Parameters
30  int verbn = m_p.getUntrackedParameter<int>("Verbosity");
31 
32  SetVerboseLevel(verbn);
33 
34  if(name == "BSCHits") {
35  if (verbn > 0) {
36  edm::LogInfo("BscSim") << "name = BSCHits and new BscNumberingSchem";
37  }
39  } else {
40  edm::LogWarning("BscSim") << "BscSD: ReadoutName "<<name<<" not supported";
41  }
42 }
43 
45  delete numberingScheme;
46 }
47 
48 uint32_t BscSD::setDetUnitId(const G4Step * aStep) {
49  return (numberingScheme == nullptr ? 0 : numberingScheme->getUnitID(aStep));
50 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
#define nullptr
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:83
static TrackerG4SimHitNumberingScheme & numberingScheme(const DDCompactView &cpv, const GeometricDet &det)
unsigned int getUnitID(const G4Step *aStep) const
BscNumberingScheme * numberingScheme
Definition: BscSD.h:27
~BscSD() override
Definition: BscSD.cc:44
BscSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: BscSD.cc:23
uint32_t setDetUnitId(const G4Step *) override
Definition: BscSD.cc:48