CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
EcalSensitiveDetectorBuilder Class Reference
Inheritance diagram for EcalSensitiveDetectorBuilder:
SensitiveDetectorMakerBase

Public Member Functions

void beginRun (const edm::EventSetup &es) final
 
 EcalSensitiveDetectorBuilder (edm::ParameterSet const &p, edm::ConsumesCollector cc)
 
std::unique_ptr
< SensitiveDetector
make (const std::string &iname, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry &reg) const final
 
- Public Member Functions inherited from SensitiveDetectorMakerBase
virtual std::unique_ptr
< SensitiveDetector
make (const std::string &iname, const edm::EventSetup &es, const SensitiveDetectorCatalog &clg, const edm::ParameterSet &p, const SimTrackManager *man, SimActivityRegistry &reg) const
 
const SensitiveDetectorMakerBaseoperator= (const SensitiveDetectorMakerBase &)=delete
 
 SensitiveDetectorMakerBase ()=default
 
 SensitiveDetectorMakerBase (const SensitiveDetectorMakerBase &)=delete
 
virtual ~SensitiveDetectorMakerBase ()
 

Private Attributes

std::vector< edm::ESHandle
< EcalSimulationParameters > > 
ecpar_
 
std::vector< edm::ESGetToken
< EcalSimulationParameters,
IdealGeometryRecord > > 
ecToken_
 
const std::string name_ [nameSize_] = {"EcalHitsEB", "EcalHitsEE", "EcalHitsES"}
 
int num_
 

Static Private Attributes

static constexpr unsigned int nameSize_ = 3
 

Detailed Description

Definition at line 22 of file EcalSensitiveDetectorBuilder.cc.

Constructor & Destructor Documentation

EcalSensitiveDetectorBuilder::EcalSensitiveDetectorBuilder ( edm::ParameterSet const &  p,
edm::ConsumesCollector  cc 
)
inlineexplicit

Member Function Documentation

void EcalSensitiveDetectorBuilder::beginRun ( const edm::EventSetup es)
inlinefinalvirtual

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 31 of file EcalSensitiveDetectorBuilder.cc.

References unpackBuffers-CaloStage2::token.

31  {
32  for (const auto& token : ecToken_)
33  ecpar_.emplace_back(es.getHandle(token));
34  }
std::vector< edm::ESGetToken< EcalSimulationParameters, IdealGeometryRecord > > ecToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
std::vector< edm::ESHandle< EcalSimulationParameters > > ecpar_
std::unique_ptr<SensitiveDetector> EcalSensitiveDetectorBuilder::make ( const std::string &  iname,
const SensitiveDetectorCatalog clg,
const edm::ParameterSet p,
const SimTrackManager man,
SimActivityRegistry reg 
) const
inlinefinalvirtual

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 36 of file EcalSensitiveDetectorBuilder.cc.

References SimActivityRegistryEnroller::enroll(), spr::find(), sistrip::SpyUtilities::isValid(), isotrackApplyRegressor::k, AlCaHLTBitMon_ParallelJobs::p, and sd.

40  {
41  int k = static_cast<int>(std::find(name_, name_ + num_, iname) - name_);
42  auto const& par = ((k < num_) && ecpar_[k].isValid()) ? ecpar_[k].product() : nullptr;
43  auto sd = std::make_unique<ECalSD>(iname, par, clg, p, man);
45  return sd;
46  }
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
const std::string name_[nameSize_]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
static void enroll(SimActivityRegistry &iReg, T *iObj)
double sd
std::vector< edm::ESHandle< EcalSimulationParameters > > ecpar_

Member Data Documentation

std::vector<edm::ESHandle<EcalSimulationParameters> > EcalSensitiveDetectorBuilder::ecpar_
private

Definition at line 53 of file EcalSensitiveDetectorBuilder.cc.

std::vector<edm::ESGetToken<EcalSimulationParameters, IdealGeometryRecord> > EcalSensitiveDetectorBuilder::ecToken_
private

Definition at line 52 of file EcalSensitiveDetectorBuilder.cc.

Referenced by EcalSensitiveDetectorBuilder().

const std::string EcalSensitiveDetectorBuilder::name_[nameSize_] = {"EcalHitsEB", "EcalHitsEE", "EcalHitsES"}
private

Definition at line 50 of file EcalSensitiveDetectorBuilder.cc.

Referenced by EcalSensitiveDetectorBuilder().

constexpr unsigned int EcalSensitiveDetectorBuilder::nameSize_ = 3
staticprivate

Definition at line 49 of file EcalSensitiveDetectorBuilder.cc.

int EcalSensitiveDetectorBuilder::num_
private

Definition at line 51 of file EcalSensitiveDetectorBuilder.cc.

Referenced by EcalSensitiveDetectorBuilder().