CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CaloTrkProcessingBuilder Class Reference
Inheritance diagram for CaloTrkProcessingBuilder:
SensitiveDetectorMakerBase

Public Member Functions

void beginRun (const edm::EventSetup &es) final
 
 CaloTrkProcessingBuilder (edm::ParameterSet const &p, edm::ConsumesCollector cc)
 
std::unique_ptr< SensitiveDetectormake (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< SensitiveDetectormake (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

int addlevel_
 
const CaloSimulationParameterscaloSimPar_
 
const edm::ESGetToken< CaloSimulationParameters, HcalParametersRcdcspsToken_
 
bool doFineCalo_
 
double eMin_
 
double eMinFine_
 
std::vector< int > fineLevels_
 
std::vector< std::string > fineNames_
 
bool putHistory_
 
bool testBeam_
 
std::vector< int > useFines_
 

Detailed Description

Definition at line 33 of file CaloTrkProcessingBuilder.cc.

Constructor & Destructor Documentation

◆ CaloTrkProcessingBuilder()

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

Definition at line 35 of file CaloTrkProcessingBuilder.cc.

References edm::BeginRun, and edm::ConsumesCollector::esConsumes().

37  bool dd4hep = p.getParameter<bool>("g4GeometryDD4hepSource");
38  addlevel_ = dd4hep ? 1 : 0;
39  edm::ParameterSet csps = p.getParameter<edm::ParameterSet>("CaloTrkProcessing");
40  testBeam_ = csps.getParameter<bool>("TestBeam");
41  eMin_ = csps.getParameter<double>("EminTrack") * CLHEP::MeV;
42  putHistory_ = csps.getParameter<bool>("PutHistory");
43  doFineCalo_ = csps.getParameter<bool>("DoFineCalo");
44  eMinFine_ = csps.getParameter<double>("EminFineTrack") * CLHEP::MeV;
45  fineNames_ = csps.getParameter<std::vector<std::string> >("FineCaloNames");
46  fineLevels_ = csps.getParameter<std::vector<int> >("FineCaloLevels");
47  useFines_ = csps.getParameter<std::vector<int> >("UseFineCalo");
48  for (auto& level : fineLevels_)
49  level += addlevel_;
50  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< std::string > fineNames_
const edm::ESGetToken< CaloSimulationParameters, HcalParametersRcd > cspsToken_
const CaloSimulationParameters * caloSimPar_

Member Function Documentation

◆ beginRun()

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

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 52 of file CaloTrkProcessingBuilder.cc.

References caloSimPar_, and cspsToken_.

52 { caloSimPar_ = &es.getData(cspsToken_); }
const edm::ESGetToken< CaloSimulationParameters, HcalParametersRcd > cspsToken_
const CaloSimulationParameters * caloSimPar_
bool getData(T &iHolder) const
Definition: EventSetup.h:122

◆ make()

std::unique_ptr<SensitiveDetector> CaloTrkProcessingBuilder::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 54 of file CaloTrkProcessingBuilder.cc.

References addlevel_, caloSimPar_, doFineCalo_, eMin_, eMinFine_, SimActivityRegistryEnroller::enroll(), fineLevels_, fineNames_, putHistory_, testBeam_, and useFines_.

58  {
59  auto sd = std::make_unique<CaloTrkProcessing>(iname,
60  *caloSimPar_,
61  clg,
62  testBeam_,
63  eMin_,
66  eMinFine_,
67  addlevel_,
68  fineNames_,
70  useFines_,
71  man);
73  return sd;
74  }
std::vector< std::string > fineNames_
static void enroll(SimActivityRegistry &iReg, T *iObj)
const CaloSimulationParameters * caloSimPar_

Member Data Documentation

◆ addlevel_

int CaloTrkProcessingBuilder::addlevel_
private

Definition at line 84 of file CaloTrkProcessingBuilder.cc.

Referenced by make().

◆ caloSimPar_

const CaloSimulationParameters* CaloTrkProcessingBuilder::caloSimPar_
private

Definition at line 78 of file CaloTrkProcessingBuilder.cc.

Referenced by beginRun(), and make().

◆ cspsToken_

const edm::ESGetToken<CaloSimulationParameters, HcalParametersRcd> CaloTrkProcessingBuilder::cspsToken_
private

Definition at line 77 of file CaloTrkProcessingBuilder.cc.

Referenced by beginRun().

◆ doFineCalo_

bool CaloTrkProcessingBuilder::doFineCalo_
private

Definition at line 82 of file CaloTrkProcessingBuilder.cc.

Referenced by make().

◆ eMin_

double CaloTrkProcessingBuilder::eMin_
private

Definition at line 80 of file CaloTrkProcessingBuilder.cc.

Referenced by make().

◆ eMinFine_

double CaloTrkProcessingBuilder::eMinFine_
private

Definition at line 83 of file CaloTrkProcessingBuilder.cc.

Referenced by make().

◆ fineLevels_

std::vector<int> CaloTrkProcessingBuilder::fineLevels_
private

Definition at line 86 of file CaloTrkProcessingBuilder.cc.

Referenced by make().

◆ fineNames_

std::vector<std::string> CaloTrkProcessingBuilder::fineNames_
private

Definition at line 85 of file CaloTrkProcessingBuilder.cc.

Referenced by make().

◆ putHistory_

bool CaloTrkProcessingBuilder::putHistory_
private

Definition at line 81 of file CaloTrkProcessingBuilder.cc.

Referenced by make().

◆ testBeam_

bool CaloTrkProcessingBuilder::testBeam_
private

Definition at line 79 of file CaloTrkProcessingBuilder.cc.

Referenced by make().

◆ useFines_

std::vector<int> CaloTrkProcessingBuilder::useFines_
private

Definition at line 87 of file CaloTrkProcessingBuilder.cc.

Referenced by make().