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.

36  : cspsToken_{cc.esConsumes<edm::Transition::BeginRun>()}, caloSimPar_{nullptr} {
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  }

References edm::BeginRun.

Member Function Documentation

◆ beginRun()

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

Reimplemented from SensitiveDetectorMakerBase.

Definition at line 52 of file CaloTrkProcessingBuilder.cc.

52 { caloSimPar_ = &es.getData(cspsToken_); }

References caloSimPar_, and cspsToken_.

◆ 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.

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  }

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

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().

personalPlayback.level
level
Definition: personalPlayback.py:22
CaloTrkProcessingBuilder::caloSimPar_
const CaloSimulationParameters * caloSimPar_
Definition: CaloTrkProcessingBuilder.cc:78
CaloTrkProcessingBuilder::eMin_
double eMin_
Definition: CaloTrkProcessingBuilder.cc:80
MeV
const double MeV
CaloTrkProcessingBuilder::putHistory_
bool putHistory_
Definition: CaloTrkProcessingBuilder.cc:81
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CaloTrkProcessingBuilder::eMinFine_
double eMinFine_
Definition: CaloTrkProcessingBuilder.cc:83
CaloTrkProcessingBuilder::fineLevels_
std::vector< int > fineLevels_
Definition: CaloTrkProcessingBuilder.cc:86
CaloTrkProcessingBuilder::fineNames_
std::vector< std::string > fineNames_
Definition: CaloTrkProcessingBuilder.cc:85
SimActivityRegistryEnroller::enroll
static void enroll(SimActivityRegistry &iReg, T *iObj)
Definition: SimActivityRegistryEnroller.h:50
cc
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
CaloTrkProcessingBuilder::useFines_
std::vector< int > useFines_
Definition: CaloTrkProcessingBuilder.cc:87
edm::Transition::BeginRun
dd4hep
Definition: DDPlugins.h:8
CaloTrkProcessingBuilder::testBeam_
bool testBeam_
Definition: CaloTrkProcessingBuilder.cc:79
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CaloTrkProcessingBuilder::cspsToken_
const edm::ESGetToken< CaloSimulationParameters, HcalParametersRcd > cspsToken_
Definition: CaloTrkProcessingBuilder.cc:77
sd
double sd
Definition: CascadeWrapper.h:113
CaloTrkProcessingBuilder::doFineCalo_
bool doFineCalo_
Definition: CaloTrkProcessingBuilder.cc:82
CaloTrkProcessingBuilder::addlevel_
int addlevel_
Definition: CaloTrkProcessingBuilder.cc:84