CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Calorimeter.cc
Go to the documentation of this file.
9 
20 
22  myPreshowerLayer1Properties_(NULL),
23  myPreshowerLayer2Properties_(NULL),
24  myECALBarrelProperties_ (NULL),
25  myECALEndcapProperties_ (NULL),
26  myHCALBarrelProperties_ (NULL),
27  myHCALEndcapProperties_ (NULL),
28  myHCALForwardProperties_ (NULL),
29  EcalBarrelGeometry_ (NULL),
30  EcalEndcapGeometry_ (NULL),
31  HcalGeometry_ (NULL),
32  PreshowerGeometry_ (NULL)
33 {
34 ;
35 }
36 
38  myPreshowerLayer1Properties_(NULL),
39  myPreshowerLayer2Properties_(NULL),
40  myECALBarrelProperties_ (NULL),
41  myECALEndcapProperties_ (NULL),
42  myHCALBarrelProperties_ (NULL),
43  myHCALEndcapProperties_ (NULL),
44  myHCALForwardProperties_ (NULL),
45  EcalBarrelGeometry_ (NULL),
46  EcalEndcapGeometry_ (NULL),
47  HcalGeometry_ (NULL),
48  PreshowerGeometry_ (NULL)
49 {
50  edm::ParameterSet fastDet = fastCalo.getParameter<edm::ParameterSet>("CalorimeterProperties");
51  edm::ParameterSet fastDetHF = fastCalo.getParameter<edm::ParameterSet>("ForwardCalorimeterProperties");
52 
60 
61 }
62 
64 {
72 }
73 
74 const ECALProperties*
75 Calorimeter::ecalProperties(int onEcal) const {
76  if ( onEcal ) {
77  if ( onEcal == 1 )
79  else
81  } else
82  return NULL;
83 }
84 
85 const HCALProperties*
86 Calorimeter::hcalProperties(int onHcal) const {
87  if ( onHcal ) {
88  if ( onHcal == 1 )
90  else
91  if ( onHcal == 2 )
93  else {
95  edm::LogInfo("CalorimeterProperties") << " Calorimeter::hcalProperties : set myHCALForwardProperties" << std::endl;
96  }
97  } else
98  return NULL;
99 }
100 
102 Calorimeter::layer1Properties(int onLayer1) const {
103  if ( onLayer1 )
105  else
106  return NULL;
107 }
108 
110 Calorimeter::layer2Properties(int onLayer2) const {
111  if ( onLayer2 )
113  else
114  return NULL;
115 }
116 
118 {
119  edm::LogInfo("CalorimeterProperties") << " setupGeometry " << std::endl;
120  EcalBarrelGeometry_ = dynamic_cast<const EcalBarrelGeometry*>(pG.getSubdetectorGeometry(DetId::Ecal,EcalBarrel));
121  EcalEndcapGeometry_ = dynamic_cast<const EcalEndcapGeometry*>(pG.getSubdetectorGeometry(DetId::Ecal,EcalEndcap));
123  // Takes a lot of time
125 }
126 
127 void Calorimeter::setupTopology(const CaloTopology& theTopology)
128 {
131 }
132 
133 
134 
136 {
137  if(subdetn==1) return EcalBarrelGeometry_;
138  if(subdetn==2) return EcalEndcapGeometry_;
139  if(subdetn==3) return PreshowerGeometry_;
140  edm::LogWarning("Calorimeter") << "Requested an invalid ECAL subdetector geometry: " << subdetn << std::endl;
141  return 0;
142 }
143 
145 {
146  if(subdetn==1) return EcalBarrelTopology_;
147  if(subdetn==2) return EcalEndcapTopology_;
148  edm::LogWarning("Calorimeter") << "Requested an invalid ECAL subdetector topology: " << subdetn << std::endl;
149  return 0;
150 }
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:43
const ECALProperties * ecalProperties(int onEcal) const
ECAL properties.
Definition: Calorimeter.cc:75
void setupTopology(const CaloTopology &)
Definition: Calorimeter.cc:127
const EcalEndcapGeometry * EcalEndcapGeometry_
Definition: Calorimeter.h:78
HCALForwardProperties * myHCALForwardProperties_
Definition: Calorimeter.h:74
PreshowerLayer2Properties * myPreshowerLayer2Properties_
Definition: Calorimeter.h:69
const EcalPreshowerGeometry * PreshowerGeometry_
Definition: Calorimeter.h:80
#define NULL
Definition: scimark2.h:8
const PreshowerLayer1Properties * layer1Properties(int onLayer1) const
Preshower Layer1 properties.
Definition: Calorimeter.cc:102
const CaloSubdetectorTopology * EcalEndcapTopology_
Definition: Calorimeter.h:84
ECALEndcapProperties * myECALEndcapProperties_
Definition: Calorimeter.h:71
HCALBarrelProperties * myHCALBarrelProperties_
Definition: Calorimeter.h:72
const CaloSubdetectorGeometry * getEcalGeometry(int subdetn) const
Definition: Calorimeter.cc:135
const PreshowerLayer2Properties * layer2Properties(int onLayer2) const
Preshower Layer2 properties.
Definition: Calorimeter.cc:110
const HCALProperties * hcalProperties(int onHcal) const
HCAL properties.
Definition: Calorimeter.cc:86
const EcalBarrelGeometry * EcalBarrelGeometry_
Definition: Calorimeter.h:77
const CaloSubdetectorTopology * getEcalTopology(int subdetn) const
Definition: Calorimeter.cc:144
void setupGeometry(const CaloGeometry &pG)
Definition: Calorimeter.cc:117
const CaloSubdetectorGeometry * HcalGeometry_
Definition: Calorimeter.h:79
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:26
ECALBarrelProperties * myECALBarrelProperties_
Definition: Calorimeter.h:70
const CaloSubdetectorTopology * EcalBarrelTopology_
Definition: Calorimeter.h:83
PreshowerLayer1Properties * myPreshowerLayer1Properties_
Definition: Calorimeter.h:68
HCALEndcapProperties * myHCALEndcapProperties_
Definition: Calorimeter.h:73