CMS 3D CMS Logo

Calorimeter.cc
Go to the documentation of this file.
10 
21 
23  : myPreshowerLayer1Properties_(nullptr),
24  myPreshowerLayer2Properties_(nullptr),
25  myECALBarrelProperties_(nullptr),
26  myECALEndcapProperties_(nullptr),
27  myHCALBarrelProperties_(nullptr),
28  myHCALEndcapProperties_(nullptr),
29  myHCALForwardProperties_(nullptr),
30  EcalBarrelGeometry_(nullptr),
31  EcalEndcapGeometry_(nullptr),
32  HcalGeometry_(nullptr),
33  PreshowerGeometry_(nullptr) {
34  ;
35 }
36 
38  : myPreshowerLayer1Properties_(nullptr),
39  myPreshowerLayer2Properties_(nullptr),
40  myECALBarrelProperties_(nullptr),
41  myECALEndcapProperties_(nullptr),
42  myHCALBarrelProperties_(nullptr),
43  myHCALEndcapProperties_(nullptr),
44  myHCALForwardProperties_(nullptr),
45  EcalBarrelGeometry_(nullptr),
46  EcalEndcapGeometry_(nullptr),
47  HcalGeometry_(nullptr),
48  PreshowerGeometry_(nullptr) {
49  edm::ParameterSet fastDet = fastCalo.getParameter<edm::ParameterSet>("CalorimeterProperties");
50  edm::ParameterSet fastDetHF = fastCalo.getParameter<edm::ParameterSet>("ForwardCalorimeterProperties");
51 
59 }
60 
76 }
77 
78 const ECALProperties* Calorimeter::ecalProperties(int onEcal) const {
79  if (onEcal) {
80  if (onEcal == 1)
82  else
84  } else
85  return nullptr;
86 }
87 
88 const HCALProperties* Calorimeter::hcalProperties(int onHcal) const {
89  if (onHcal) {
90  if (onHcal == 1)
92  else if (onHcal == 2)
94  else {
96  edm::LogInfo("CalorimeterProperties")
97  << " Calorimeter::hcalProperties : set myHCALForwardProperties" << std::endl;
98  }
99  } else
100  return nullptr;
101 }
102 
104  if (onLayer1)
106  else
107  return nullptr;
108 }
109 
111  if (onLayer2)
113  else
114  return nullptr;
115 }
116 
118  edm::LogInfo("CalorimeterProperties") << " setupGeometry " << std::endl;
119  EcalBarrelGeometry_ = dynamic_cast<const EcalBarrelGeometry*>(pG.getSubdetectorGeometry(DetId::Ecal, EcalBarrel));
120  EcalEndcapGeometry_ = dynamic_cast<const EcalEndcapGeometry*>(pG.getSubdetectorGeometry(DetId::Ecal, EcalEndcap));
122  // Takes a lot of time
124  dynamic_cast<const EcalPreshowerGeometry*>(pG.getSubdetectorGeometry(DetId::Ecal, EcalPreshower));
125 }
126 
127 void Calorimeter::setupTopology(const CaloTopology& theTopology) {
130 }
131 
133  if (subdetn == 1)
134  return EcalBarrelGeometry_;
135  if (subdetn == 2)
136  return EcalEndcapGeometry_;
137  if (subdetn == 3)
138  return PreshowerGeometry_;
139  edm::LogWarning("Calorimeter") << "Requested an invalid ECAL subdetector geometry: " << subdetn << std::endl;
140  return nullptr;
141 }
142 
144  if (subdetn == 1)
145  return EcalBarrelTopology_;
146  if (subdetn == 2)
147  return EcalEndcapTopology_;
148  edm::LogWarning("Calorimeter") << "Requested an invalid ECAL subdetector topology: " << subdetn << std::endl;
149  return nullptr;
150 }
Calorimeter::EcalEndcapGeometry_
const EcalEndcapGeometry * EcalEndcapGeometry_
Definition: Calorimeter.h:74
Calorimeter::myPreshowerLayer2Properties_
PreshowerLayer2Properties * myPreshowerLayer2Properties_
Definition: Calorimeter.h:65
EcalBarrelGeometry.h
Calorimeter::Calorimeter
Calorimeter()
Definition: Calorimeter.cc:22
Calorimeter::hcalProperties
const HCALProperties * hcalProperties(int onHcal) const
HCAL properties.
Definition: Calorimeter.cc:88
MessageLogger.h
Calorimeter::setupTopology
void setupTopology(const CaloTopology &)
Definition: Calorimeter.cc:127
Calorimeter::myPreshowerLayer1Properties_
PreshowerLayer1Properties * myPreshowerLayer1Properties_
Definition: Calorimeter.h:64
Calorimeter::ecalProperties
const ECALProperties * ecalProperties(int onEcal) const
ECAL properties.
Definition: Calorimeter.cc:78
PreshowerLayer1Properties.h
Calorimeter::EcalEndcapTopology_
const CaloSubdetectorTopology * EcalEndcapTopology_
Definition: Calorimeter.h:80
Calorimeter::myHCALForwardProperties_
HCALForwardProperties * myHCALForwardProperties_
Definition: Calorimeter.h:70
Calorimeter::layer2Properties
const PreshowerLayer2Properties * layer2Properties(int onLayer2) const
Preshower Layer2 properties.
Definition: Calorimeter.cc:110
DetId::Hcal
Definition: DetId.h:28
Calorimeter::myECALEndcapProperties_
ECALEndcapProperties * myECALEndcapProperties_
Definition: Calorimeter.h:67
edm::LogInfo
Definition: MessageLogger.h:254
PreshowerLayer2Properties
Definition: PreshowerLayer2Properties.h:19
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
HCALBarrelProperties
Definition: HCALBarrelProperties.h:21
HcalBarrel
Definition: HcalAssistant.h:33
Calorimeter::layer1Properties
const PreshowerLayer1Properties * layer1Properties(int onLayer1) const
Preshower Layer1 properties.
Definition: Calorimeter.cc:103
HCALEndcapProperties
Definition: HCALEndcapProperties.h:17
Calorimeter::PreshowerGeometry_
const EcalPreshowerGeometry * PreshowerGeometry_
Definition: Calorimeter.h:76
CaloTopology
Definition: CaloTopology.h:19
EcalBarrel
Definition: EcalSubdetector.h:10
CaloGeometry
Definition: CaloGeometry.h:21
ECALProperties
Definition: ECALProperties.h:15
HCALEndcapProperties.h
EcalPreshowerGeometry.h
Calorimeter::setupGeometry
void setupGeometry(const CaloGeometry &pG)
Definition: Calorimeter.cc:117
Calorimeter::myHCALBarrelProperties_
HCALBarrelProperties * myHCALBarrelProperties_
Definition: Calorimeter.h:68
HCALForwardProperties
Definition: HCALForwardProperties.h:21
Calorimeter::getEcalTopology
const CaloSubdetectorTopology * getEcalTopology(int subdetn) const
Definition: Calorimeter.cc:143
EcalSubdetector.h
EcalEndcap
Definition: EcalSubdetector.h:10
edm::LogWarning
Definition: MessageLogger.h:141
HCALForwardProperties.h
CaloSubdetectorGeometry.h
edm::ParameterSet
Definition: ParameterSet.h:36
Calorimeter::~Calorimeter
~Calorimeter()
Definition: Calorimeter.cc:61
EcalEndcapGeometry.h
CaloTopology::getSubdetectorTopology
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:17
PreshowerLayer1Properties
Definition: PreshowerLayer1Properties.h:19
ECALEndcapProperties.h
PreshowerLayer2Properties.h
HcalSubdetector.h
CaloSubdetectorTopology
Definition: CaloSubdetectorTopology.h:17
DetId::Ecal
Definition: DetId.h:27
Calorimeter::HcalGeometry_
const CaloSubdetectorGeometry * HcalGeometry_
Definition: Calorimeter.h:75
Calorimeter::EcalBarrelGeometry_
const EcalBarrelGeometry * EcalBarrelGeometry_
Definition: Calorimeter.h:73
CaloTopology.h
Calorimeter.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
EcalPreshower
Definition: EcalSubdetector.h:10
HcalHardcodeGeometryLoader.h
Calorimeter::myECALBarrelProperties_
ECALBarrelProperties * myECALBarrelProperties_
Definition: Calorimeter.h:66
HCALProperties
Definition: HCALProperties.h:21
DetId.h
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
HCALBarrelProperties.h
ParameterSet.h
Calorimeter::EcalBarrelTopology_
const CaloSubdetectorTopology * EcalBarrelTopology_
Definition: Calorimeter.h:79
ECALEndcapProperties
Definition: ECALEndcapProperties.h:19
Calorimeter::myHCALEndcapProperties_
HCALEndcapProperties * myHCALEndcapProperties_
Definition: Calorimeter.h:69
ECALBarrelProperties.h
Calorimeter::getEcalGeometry
const CaloSubdetectorGeometry * getEcalGeometry(int subdetn) const
Definition: Calorimeter.cc:132
ECALBarrelProperties
Definition: ECALBarrelProperties.h:18