CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
hgcal::RecHitTools Class Reference

#include <RecHitTools.h>

Public Member Functions

unsigned int getCell (const DetId &) const
 
float getEta (const GlobalPoint &position, const float &vertex_z=0.) const
 
float getEta (const DetId &id, const float &vertex_z=0.) const
 
void getEvent (const edm::Event &)
 
void getEventSetup (const edm::EventSetup &)
 
const CaloGeometrygetGeometry () const
 
int getGeometryType () const
 
unsigned int getLayer (DetId::Detector type) const
 
unsigned int getLayer (ForwardSubdetector type) const
 
unsigned int getLayer (const DetId &) const
 
unsigned int getLayerWithOffset (const DetId &) const
 
float getPhi (const GlobalPoint &position) const
 
float getPhi (const DetId &id) const
 
GlobalPoint getPosition (const DetId &id) const
 
GlobalPoint getPositionLayer (unsigned layer) const
 
float getPt (const GlobalPoint &position, const float &hitEnergy, const float &vertex_z=0.) const
 
float getPt (const DetId &id, const float &hitEnergy, const float &vertex_z=0.) const
 
std::float_t getRadiusToSide (const DetId &) const
 
int getSiThickIndex (const DetId &) const
 
std::float_t getSiThickness (const DetId &) const
 
const CaloSubdetectorGeometrygetSubdetectorGeometry (const DetId &id) const
 
unsigned int getWafer (const DetId &) const
 
bool isHalfCell (const DetId &) const
 
unsigned int lastLayerEE () const
 
unsigned int lastLayerFH () const
 
unsigned int maxNumberOfWafersPerLayer () const
 
 RecHitTools ()
 
int zside (const DetId &id) const
 
 ~RecHitTools ()
 

Private Attributes

unsigned int bhOffset_
 
unsigned int fhOffset_
 
const CaloGeometrygeom_
 
int geometryType_
 
unsigned int maxNumberOfWafersPerLayer_
 

Detailed Description

Definition at line 20 of file RecHitTools.h.

Constructor & Destructor Documentation

hgcal::RecHitTools::RecHitTools ( )
inline

Definition at line 22 of file RecHitTools.h.

22 : geom_(nullptr), fhOffset_(0), bhOffset_(0), geometryType_(0) {}
unsigned int fhOffset_
Definition: RecHitTools.h:64
unsigned int bhOffset_
Definition: RecHitTools.h:64
const CaloGeometry * geom_
Definition: RecHitTools.h:63
hgcal::RecHitTools::~RecHitTools ( )
inline

Definition at line 23 of file RecHitTools.h.

References position, and ecaldqm::zside().

23 {}

Member Function Documentation

unsigned int RecHitTools::getCell ( const DetId id) const

Definition at line 319 of file RecHitTools.cc.

References HGCalDetId::cell(), TauDecayModes::dec, DetId::Forward, and SiStripPI::max.

319  {
320  unsigned int cell = std::numeric_limits<unsigned int>::max();
321  if (id.det() == DetId::Forward) {
322  cell = HGCalDetId(id).cell();
323  }
324  else {
325  edm::LogError("getCell::InvalidSiliconDetid")
326  << "det id: " << std::hex << id.rawId() << std::dec << ":"
327  << id.det() << " is not HGCal silicon!";
328  }
329  return cell;
330 }
int cell() const
get the absolute value of the cell #&#39;s in x and y
Definition: HGCalDetId.h:39
float RecHitTools::getEta ( const GlobalPoint position,
const float &  vertex_z = 0. 
) const

Definition at line 345 of file RecHitTools.cc.

References PV3DBase< T, PVType, FrameType >::eta(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by getEta(), getPt(), and HGCalIsoCalculator::setRecHits().

345  {
346  GlobalPoint corrected_position = GlobalPoint(position.x(), position.y(), position.z()-vertex_z);
347  return corrected_position.eta();
348 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
T eta() const
Definition: PV3DBase.h:76
T x() const
Definition: PV3DBase.h:62
float RecHitTools::getEta ( const DetId id,
const float &  vertex_z = 0. 
) const

Definition at line 350 of file RecHitTools.cc.

References PVValHelper::eta, getEta(), getPosition(), and position.

350  {
352  float eta = getEta(position, vertex_z);
353  return eta;
354 }
float getEta(const GlobalPoint &position, const float &vertex_z=0.) const
Definition: RecHitTools.cc:345
GlobalPoint getPosition(const DetId &id) const
Definition: RecHitTools.cc:116
static int position[264][3]
Definition: ReadPGInfo.cc:509
void RecHitTools::getEvent ( const edm::Event ev)

Definition at line 76 of file RecHitTools.cc.

Referenced by hgcal::ClusterTools::getEvent().

76  {
77 }
void RecHitTools::getEventSetup ( const edm::EventSetup es)

Definition at line 79 of file RecHitTools.cc.

References bhOffset_, fhOffset_, DetId::Forward, ForwardEmpty, relativeConstraints::geom, geom_, geometryType_, edm::EventSetup::get(), CaloGeometry::getSubdetectorGeometry(), DetId::HGCalEE, DetId::HGCalHSi, HGCEE, HGCHEF, LayerTriplets::layers(), SiStripPI::max, maxNumberOfWafersPerLayer_, and edm::ESHandle< T >::product().

Referenced by HGCalHitCalibration::analyze(), HGCalShowerSeparation::analyze(), HGCalEgammaIDHelper::eventInit(), hgcal::ClusterTools::getEventSetup(), HGCal3DClustering::getEventSetup(), HGCalImagingAlgo::getEventSetup(), PFHGCalRecHitCreator< DET, Layer, det, subdet >::importRecHits(), and RealisticSimClusterMapper::update().

79  {
80 
82  es.get<CaloGeometryRecord>().get(geom);
83 
84  geom_ = geom.product();
85  unsigned int wmaxEE(0), wmaxFH(0);
87  //check if it's the new geometry
88  if(geomEE) {
89  geometryType_ = 1;
90  fhOffset_ = (geomEE->topology().dddConstants()).layers(true);
91  wmaxEE = (geomEE->topology().dddConstants()).waferCount(0);
94  wmaxFH = (geomFH->topology().dddConstants()).waferCount(0);
95  }
96  else {
97  geometryType_ = 0;
99  fhOffset_ = (geomEE->topology().dddConstants()).layers(true);
100  wmaxEE = 1 + (geomEE->topology().dddConstants()).waferMax();
102  bhOffset_ = fhOffset_ + (geomFH->topology().dddConstants()).layers(true);
103  wmaxFH = 1 + (geomFH->topology().dddConstants()).waferMax();
104  }
105  maxNumberOfWafersPerLayer_ = std::max(wmaxEE,wmaxFH);
106 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
unsigned int fhOffset_
Definition: RecHitTools.h:64
unsigned int bhOffset_
Definition: RecHitTools.h:64
unsigned int maxNumberOfWafersPerLayer_
Definition: RecHitTools.h:64
const CaloGeometry * geom_
Definition: RecHitTools.h:63
T get() const
Definition: EventSetup.h:63
T const * product() const
Definition: ESHandle.h:86
const CaloGeometry* hgcal::RecHitTools::getGeometry ( ) const
inline

Definition at line 57 of file RecHitTools.h.

57 {return geom_;};
const CaloGeometry * geom_
Definition: RecHitTools.h:63
int hgcal::RecHitTools::getGeometryType ( ) const
inline

Definition at line 61 of file RecHitTools.h.

Referenced by RealisticSimClusterMapper::buildClusters().

61 {return geometryType_;}
unsigned int RecHitTools::getLayer ( DetId::Detector  type) const

Definition at line 249 of file RecHitTools.cc.

References DetId::Forward, ForwardEmpty, geom_, CaloGeometry::getSubdetectorGeometry(), DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, and LayerTriplets::layers().

Referenced by RealisticSimClusterMapper::buildClusters(), and getLayerWithOffset().

249  {
250 
251  int layer;
252  switch (type) {
253  case(DetId::HGCalEE): {
255  layer = (geomEE->topology().dddConstants()).layers(true);
256  break;
257  }
258  case (DetId::HGCalHSi): {
260  layer = (geomFH->topology().dddConstants()).layers(true);
261  break;
262  }
263  case (DetId::HGCalHSc): {
265  layer = (geomBH->topology().dddConstants()).layers(true);
266  break;
267  }
268  case (DetId::Forward): {
270  layer = (geomEE->topology().dddConstants()).layers(true);
272  layer += (geomFH->topology().dddConstants()).layers(true);
273  break;
274  }
275  default: layer = 0;
276  }
277  return (unsigned int)(layer);
278 }
type
Definition: HCALResponse.h:21
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
const CaloGeometry * geom_
Definition: RecHitTools.h:63
unsigned int RecHitTools::getLayer ( ForwardSubdetector  type) const

Definition at line 216 of file RecHitTools.cc.

References DetId::Forward, ForwardEmpty, geom_, CaloGeometry::getSubdetectorGeometry(), DetId::Hcal, HcalEndcap, HGCEE, HGCHEB, HGCHEF, and LayerTriplets::layers().

216  {
217 
218  int layer;
219  switch (type) {
222  layer = (geomEE->topology().dddConstants()).layers(true);
223  break;
224  }
227  layer = (geomFH->topology().dddConstants()).layers(true);
228  break;
229  }
232  layer = (geomBH->topology().dddConstants())->getMaxDepth(1);
233  break;
234  }
237  layer = (geomEE->topology().dddConstants()).layers(true);
239  layer += (geomFH->topology().dddConstants()).layers(true);
241  layer += (geomBH->topology().dddConstants())->getMaxDepth(1);
242  break;
243  }
244  default: layer = 0;
245  }
246  return (unsigned int)(layer);
247 }
type
Definition: HCALResponse.h:21
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
const CaloGeometry * geom_
Definition: RecHitTools.h:63
unsigned int RecHitTools::getLayer ( const DetId id) const

Definition at line 280 of file RecHitTools.cc.

References HcalDetId::depth(), DetId::Forward, DetId::Hcal, HcalEndcap, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCScintillatorDetId::layer(), HGCalDetId::layer(), HGCSiliconDetId::layer(), and SiStripPI::max.

280  {
281  unsigned int layer = std::numeric_limits<unsigned int>::max();
282  if (id.det() == DetId::Forward) {
283  layer = HGCalDetId(id).layer();
284  } else if (id.det() == DetId::Hcal && id.subdetId() == HcalEndcap) {
285  layer = HcalDetId(id).depth();
286  } else if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
287  layer = HGCSiliconDetId(id).layer();
288  } else if (id.det() == DetId::HGCalHSc) {
289  layer = HGCScintillatorDetId(id).layer();
290  }
291  return layer;
292 }
int depth() const
get the tower depth
Definition: HcalDetId.h:162
int layer() const
get the layer #
int layer() const
get the layer #
int layer() const
get the layer #
Definition: HGCalDetId.h:48
unsigned int RecHitTools::getLayerWithOffset ( const DetId id) const

Definition at line 294 of file RecHitTools.cc.

References bhOffset_, fhOffset_, DetId::Forward, getLayer(), DetId::Hcal, HcalEndcap, DetId::HGCalHSc, DetId::HGCalHSi, and HGCHEF.

Referenced by HGCalHitCalibration::analyze(), HGCalShowerSeparation::analyze(), RealisticSimClusterMapper::buildClusters(), HGCalHitCalibration::fillWithRecHits(), hgcal::ClusterTools::getLayer(), HGCal3DClustering::organizeByLayer(), HGCalImagingAlgo::populate(), HGCalIsoCalculator::produceHGCalIso(), and hgcal::EGammaPCAHelper::storeRecHits().

294  {
295  unsigned int layer = getLayer(id);
296  if (id.det() == DetId::Forward && id.subdetId() == HGCHEF ) {
297  layer += fhOffset_;
298  } else if (id.det() == DetId::HGCalHSi || id.det() == DetId::HGCalHSc) {
299  layer += fhOffset_;
300  } else if (id.det() == DetId::Hcal && id.subdetId() == HcalEndcap) {
301  layer += bhOffset_;
302  }
303  return layer;
304 }
unsigned int getLayer(DetId::Detector type) const
Definition: RecHitTools.cc:249
unsigned int fhOffset_
Definition: RecHitTools.h:64
unsigned int bhOffset_
Definition: RecHitTools.h:64
float RecHitTools::getPhi ( const GlobalPoint position) const

Definition at line 356 of file RecHitTools.cc.

References PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by HGCalIsoCalculator::setRecHits().

356  {
357  float phi = atan2(position.y(),position.x());
358  return phi;
359 }
T y() const
Definition: PV3DBase.h:63
T x() const
Definition: PV3DBase.h:62
float RecHitTools::getPhi ( const DetId id) const

Definition at line 361 of file RecHitTools.cc.

References getPosition(), position, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

361  {
363  float phi = atan2(position.y(),position.x());
364  return phi;
365 }
T y() const
Definition: PV3DBase.h:63
GlobalPoint getPosition(const DetId &id) const
Definition: RecHitTools.cc:116
static int position[264][3]
Definition: ReadPGInfo.cc:509
T x() const
Definition: PV3DBase.h:62
GlobalPoint RecHitTools::getPosition ( const DetId id) const

Definition at line 116 of file RecHitTools.cc.

References relativeConstraints::geom, CaloSubdetectorGeometry::getGeometry(), HGCalGeometry::getPosition(), getSubdetectorGeometry(), DetId::Hcal, and position.

Referenced by HGCalShowerSeparation::analyze(), RealisticSimClusterMapper::buildClusters(), getEta(), getPhi(), getPositionLayer(), getPt(), hgcal::ClusterTools::getWidths(), HGCalImagingAlgo::Hexel::Hexel(), HGCalImagingAlgo::populate(), HGCalIsoCalculator::setRecHits(), and hgcal::EGammaPCAHelper::storeRecHits().

116  {
117  auto geom = getSubdetectorGeometry(id);
119  if (id.det() == DetId::Hcal) {
120  position = geom->getGeometry(id)->getPosition();
121  } else {
122  auto hg = static_cast<const HGCalGeometry*>(geom);
123  position = hg->getPosition(id);
124  }
125  return position;
126 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
Definition: RecHitTools.cc:108
static int position[264][3]
Definition: ReadPGInfo.cc:509
GlobalPoint RecHitTools::getPositionLayer ( unsigned  layer) const

Definition at line 128 of file RecHitTools.cc.

References bhOffset_, fhOffset_, geometryType_, getPosition(), HcalEndcap, DetId::HGCalEE, DetId::HGCalHSi, HGCEE, HGCHEF, and triggerObjects_cff::id.

Referenced by hgcal::EGammaPCAHelper::findZFirstLayer().

128  {
129  const int hgcal_default_wafer = 50;
130  const int hcal_default_ieta = 50;
131  const int hcal_default_iphi = 100;
132  DetId id(0);
133  if(geometryType_==0){
134  if (layer <= fhOffset_) id = HGCalDetId(ForwardSubdetector::HGCEE, 1, layer, 1, hgcal_default_wafer, 1);
135  else if (layer <= bhOffset_) id = HGCalDetId(ForwardSubdetector::HGCHEF, 1, layer - fhOffset_, 1, hgcal_default_wafer, 1);
136  else id = HcalDetId(HcalSubdetector::HcalEndcap, hcal_default_ieta, hcal_default_iphi, layer - bhOffset_);
137  }
138  else {
139  if (layer <= fhOffset_) id = HGCSiliconDetId(DetId::HGCalEE, 1, 0, layer, 0, 0, 0, 0);
140  else if (layer <= bhOffset_) id = HGCSiliconDetId(DetId::HGCalHSi, 1, 0, layer - fhOffset_, 0, 0, 0, 0);
141  else id = HGCScintillatorDetId(0, layer - bhOffset_, 1, 0);
142  }
143  return getPosition(id);
144 }
unsigned int fhOffset_
Definition: RecHitTools.h:64
unsigned int bhOffset_
Definition: RecHitTools.h:64
Definition: DetId.h:18
GlobalPoint getPosition(const DetId &id) const
Definition: RecHitTools.cc:116
float RecHitTools::getPt ( const GlobalPoint position,
const float &  hitEnergy,
const float &  vertex_z = 0. 
) const

Definition at line 367 of file RecHitTools.cc.

References PVValHelper::eta, getEta(), and EnergyCorrector::pt.

367  {
368  float eta = getEta(position, vertex_z);
369  float pt = hitEnergy / cosh(eta);
370  return pt;
371 }
float getEta(const GlobalPoint &position, const float &vertex_z=0.) const
Definition: RecHitTools.cc:345
float RecHitTools::getPt ( const DetId id,
const float &  hitEnergy,
const float &  vertex_z = 0. 
) const

Definition at line 373 of file RecHitTools.cc.

References PVValHelper::eta, getEta(), getPosition(), position, and EnergyCorrector::pt.

373  {
375  float eta = getEta(position, vertex_z);
376  float pt = hitEnergy / cosh(eta);
377  return pt;
378 }
float getEta(const GlobalPoint &position, const float &vertex_z=0.) const
Definition: RecHitTools.cc:345
GlobalPoint getPosition(const DetId &id) const
Definition: RecHitTools.cc:116
static int position[264][3]
Definition: ReadPGInfo.cc:509
std::float_t RecHitTools::getRadiusToSide ( const DetId id) const

Definition at line 197 of file RecHitTools.cc.

References HGCalDDDConstants::cellSizeHex(), TauDecayModes::dec, DetId::Forward, getSubdetectorGeometry(), DetId::HGCalEE, DetId::HGCalHSi, SiStripPI::max, findQualityFiles::size, HGCSiliconDetId::type(), and HGCalDetId::waferType().

197  {
198  auto geom = getSubdetectorGeometry(id);
200  if (id.det() == DetId::Forward) {
201  const HGCalDetId hid(id);
202  auto ddd = get_ddd(geom,hid);
203  size = ddd->cellSizeHex(hid.waferType());
204  } else if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
205  const HGCSiliconDetId hid(id);
206  auto ddd = get_ddd(geom,hid);
207  size = ddd->cellSizeHex(hid.type());
208  } else {
209  edm::LogError("getRadiusToSide::InvalidSiliconDetid")
210  << "det id: " << std::hex << id.rawId() << std::dec << ":"
211  << id.det() << " is not HGCal silicon!";
212  }
213  return size;
214 }
size
Write out results.
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
Definition: RecHitTools.cc:108
int RecHitTools::getSiThickIndex ( const DetId id) const

Definition at line 179 of file RecHitTools.cc.

References DetId::Forward, getSiThickness(), DetId::HGCalEE, DetId::HGCalHSi, and HGCSiliconDetId::type().

Referenced by HGCalImagingAlgo::populate(), and hgcal::EGammaPCAHelper::storeRecHits().

179  {
180  int thickIndex = -1;
181  if (id.det() == DetId::Forward) {
182  float thickness = getSiThickness(id);
183  if (thickness > 99. && thickness < 101.)
184  thickIndex = 0;
185  else if (thickness > 199. && thickness < 201.)
186  thickIndex = 1;
187  else if (thickness > 299. && thickness < 301.)
188  thickIndex = 2;
189  else
190  assert(thickIndex > 0 && "ERROR - silicon thickness has a nonsensical value");
191  } else if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
192  thickIndex = HGCSiliconDetId(id).type();
193  }
194  return thickIndex;
195 }
int type() const
get the type
std::float_t getSiThickness(const DetId &) const
Definition: RecHitTools.cc:160
std::float_t RecHitTools::getSiThickness ( const DetId id) const

Definition at line 160 of file RecHitTools.cc.

References HGCalDDDConstants::cellThickness(), TauDecayModes::dec, DetId::Forward, getSubdetectorGeometry(), DetId::HGCalEE, DetId::HGCalHSi, HGCalDetId::layer(), HGCSiliconDetId::layer(), LogDebug, HGCalDetId::wafer(), HGCSiliconDetId::waferU(), and HGCSiliconDetId::waferV().

Referenced by HGCalHitCalibration::analyze(), HGCalHitCalibration::fillWithRecHits(), getSiThickIndex(), and HGCalImagingAlgo::populate().

160  {
161  auto geom = getSubdetectorGeometry(id);
162  std::float_t thick(0.37);
163  if (id.det() == DetId::Forward) {
164  const HGCalDetId hid(id);
165  auto ddd = get_ddd(geom,hid);
166  thick = ddd->cellThickness(hid.layer(),hid.wafer(),0);
167  } else if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
168  const HGCSiliconDetId hid(id);
169  auto ddd = get_ddd(geom,hid);
170  thick = ddd->cellThickness(hid.layer(),hid.waferU(),hid.waferV());
171  } else {
172  LogDebug("getSiThickness::InvalidSiliconDetid")
173  << "det id: " << std::hex << id.rawId() << std::dec << ":"
174  << id.det() << " is not HGCal silicon!";
175  }
176  return thick;
177 }
#define LogDebug(id)
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
Definition: RecHitTools.cc:108
const CaloSubdetectorGeometry * RecHitTools::getSubdetectorGeometry ( const DetId id) const

Definition at line 108 of file RecHitTools.cc.

References ForwardEmpty, relativeConstraints::geom, geom_, CaloGeometry::getSubdetectorGeometry(), DetId::HGCalEE, DetId::HGCalHSc, and DetId::HGCalHSi.

Referenced by getPosition(), getRadiusToSide(), getSiThickness(), and isHalfCell().

108  {
109  DetId::Detector det = id.det();
110  int subdet = (det == DetId::HGCalEE || det == DetId::HGCalHSi || det == DetId::HGCalHSc) ? ForwardSubdetector::ForwardEmpty : id.subdetId();
111  auto geom = geom_->getSubdetectorGeometry(det,subdet);
112  check_geom(geom);
113  return geom;
114 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
const CaloGeometry * geom_
Definition: RecHitTools.h:63
Detector
Definition: DetId.h:26
unsigned int RecHitTools::getWafer ( const DetId id) const

Definition at line 306 of file RecHitTools.cc.

References TauDecayModes::dec, DetId::Forward, SiStripPI::max, and HGCalDetId::wafer().

306  {
307  unsigned int wafer = std::numeric_limits<unsigned int>::max();
308  if (id.det() == DetId::Forward) {
309  wafer = HGCalDetId(id).wafer();
310  }
311  else {
312  edm::LogError("getWafer::InvalidSiliconDetid")
313  << "det id: " << std::hex << id.rawId() << std::dec << ":"
314  << id.det() << " is not HGCal silicon!";
315  }
316  return wafer;
317 }
int wafer() const
get the wafer #
Definition: HGCalDetId.h:42
bool RecHitTools::isHalfCell ( const DetId id) const

Definition at line 332 of file RecHitTools.cc.

References HGCalDetId::cell(), DetId::Forward, getSubdetectorGeometry(), HGCalDDDConstants::isHalfCell(), HGCalDetId::waferType(), and HGCalDDDConstants::waferTypeT().

Referenced by HGCalImagingAlgo::populate().

332  {
333  bool ishalf = false;
334  if (id.det() == DetId::Forward) {
335  HGCalDetId hid(id);
336  auto geom = getSubdetectorGeometry(hid);
337  auto ddd = get_ddd(geom,hid);
338  const int waferType = ddd->waferTypeT(hid.waferType());
339  return ddd->isHalfCell(waferType,hid.cell());
340  }
341  //new geometry is always false
342  return ishalf;
343 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
Definition: RecHitTools.cc:108
unsigned int hgcal::RecHitTools::lastLayerEE ( ) const
inline

Definition at line 58 of file RecHitTools.h.

Referenced by RealisticSimClusterMapper::buildClusters(), and hgcal::EGammaPCAHelper::computePCA().

58 {return fhOffset_;}
unsigned int fhOffset_
Definition: RecHitTools.h:64
unsigned int hgcal::RecHitTools::lastLayerFH ( ) const
inline

Definition at line 59 of file RecHitTools.h.

Referenced by RealisticSimClusterMapper::buildClusters().

59 {return bhOffset_;}
unsigned int bhOffset_
Definition: RecHitTools.h:64
unsigned int hgcal::RecHitTools::maxNumberOfWafersPerLayer ( ) const
inline

Definition at line 60 of file RecHitTools.h.

unsigned int maxNumberOfWafersPerLayer_
Definition: RecHitTools.h:64
int RecHitTools::zside ( const DetId id) const

Definition at line 146 of file RecHitTools.cc.

References DetId::Forward, DetId::Hcal, HcalEndcap, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCScintillatorDetId::zside(), HGCalDetId::zside(), HGCSiliconDetId::zside(), and HcalDetId::zside().

Referenced by HGCalImagingAlgo::populate().

146  {
147  int zside = 0;
148  if (id.det() == DetId::Forward) {
149  zside = HGCalDetId(id).zside();
150  } else if( id.det() == DetId::Hcal && id.subdetId() == HcalEndcap) {
151  zside = HcalDetId(id).zside();
152  } else if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
153  zside = HGCSiliconDetId(id).zside();
154  } else if (id.det() == DetId::HGCalHSc) {
155  zside = HGCScintillatorDetId(id).zside();
156  }
157  return zside;
158 }
int zside(const DetId &id) const
Definition: RecHitTools.cc:146
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalDetId.h:145
int zside() const
get the z-side of the cell (1/-1)
int zside() const
get the z-side of the cell (1/-1)
Definition: HGCalDetId.h:51
int zside() const
get the z-side of the cell (1/-1)

Member Data Documentation

unsigned int hgcal::RecHitTools::bhOffset_
private

Definition at line 64 of file RecHitTools.h.

Referenced by getEventSetup(), getLayerWithOffset(), and getPositionLayer().

unsigned int hgcal::RecHitTools::fhOffset_
private

Definition at line 64 of file RecHitTools.h.

Referenced by getEventSetup(), getLayerWithOffset(), and getPositionLayer().

const CaloGeometry* hgcal::RecHitTools::geom_
private

Definition at line 63 of file RecHitTools.h.

Referenced by getEventSetup(), getLayer(), and getSubdetectorGeometry().

int hgcal::RecHitTools::geometryType_
private

Definition at line 65 of file RecHitTools.h.

Referenced by getEventSetup(), and getPositionLayer().

unsigned int hgcal::RecHitTools::maxNumberOfWafersPerLayer_
private

Definition at line 64 of file RecHitTools.h.

Referenced by getEventSetup().