CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
HGCalTriggerTools Class Reference

#include <HGCalTriggerTools.h>

Public Types

enum  SubDetectorType { hgcal_silicon_CEE, hgcal_silicon_CEH, hgcal_scintillator }
 

Public Member Functions

template<typename T >
std::vector< TbxVectorToVector (const BXVector< T > &inputBXVector)
 
void eventSetup (const edm::EventSetup &, const edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > &)
 
float getEta (const GlobalPoint &position, const float &vertex_z=0.) const
 
float getLayerZ (const unsigned &layerWithOffset) const
 
float getLayerZ (const int &subdet, const unsigned &layer) const
 
float getPhi (const GlobalPoint &position) const
 
float getPt (const GlobalPoint &position, const float &hitEnergy, const float &vertex_z=0.) const
 
SubDetectorType getSubDetectorType (const DetId &id) const
 
float getTCEta (const DetId &id, const float &vertex_z=0.) const
 
float getTCPhi (const DetId &id) const
 
GlobalPoint getTCPosition (const DetId &id) const
 
float getTCPt (const DetId &id, const float &hitEnergy, const float &vertex_z=0.) const
 
const HGCalTriggerGeometryBasegetTriggerGeometry () const
 
 HGCalTriggerTools ()
 
bool isEm (const DetId &) const
 
bool isHad (const DetId &id) const
 
bool isNose (const DetId &) const
 
bool isScintillator (const DetId &id) const
 
bool isSilicon (const DetId &) const
 
unsigned lastLayer (bool nose=false) const
 
unsigned lastLayerBH () const
 
unsigned lastLayerEE (bool nose=false) const
 
unsigned lastLayerFH () const
 
unsigned lastLayerNose () const
 
unsigned layer (const DetId &) const
 
unsigned layers (ForwardSubdetector type) const
 
unsigned layers (DetId::Detector type) const
 
unsigned layerWithOffset (const DetId &) const
 
void setGeometry (const HGCalTriggerGeometryBase *const)
 
DetId simToReco (const DetId &, const HGCalTopology &) const
 
int thicknessIndex (const DetId &) const
 
unsigned triggerLayer (const unsigned id) const
 
int zside (const DetId &) const
 
 ~HGCalTriggerTools ()
 

Static Public Attributes

static constexpr unsigned kScintillatorPseudoThicknessIndex_ = 3
 

Private Attributes

unsigned bhLayers_
 
unsigned eeLayers_
 
unsigned fhLayers_
 
const HGCalTriggerGeometryBasegeom_
 
unsigned noseLayers_
 
unsigned totalLayers_
 

Detailed Description

Tools for handling HGCal trigger det-ID: in the current version of trhe HGCAL simulation only HGCalDetId for the TriggerCells (TC) are used and not HcalDetId as in the offline! As a consequence the class assumes that only DetIds of the first kind are used in the getTC* methods NOTE: this uses the trigger geometry hence would give wrong results when used for offline reco!!!!

Author
G. Cerminara (CERN), heavily "inspired" by HGCalRechHitTools ;)

Definition at line 32 of file HGCalTriggerTools.h.

Member Enumeration Documentation

◆ SubDetectorType

Enumerator
hgcal_silicon_CEE 
hgcal_silicon_CEH 
hgcal_scintillator 

Definition at line 89 of file HGCalTriggerTools.h.

Constructor & Destructor Documentation

◆ HGCalTriggerTools()

HGCalTriggerTools::HGCalTriggerTools ( )
inline

Definition at line 34 of file HGCalTriggerTools.h.

34 : geom_(nullptr), eeLayers_(0), fhLayers_(0), bhLayers_(0), noseLayers_(0), totalLayers_(0) {}
const HGCalTriggerGeometryBase * geom_

◆ ~HGCalTriggerTools()

HGCalTriggerTools::~HGCalTriggerTools ( )
inline

Definition at line 35 of file HGCalTriggerTools.h.

35 {}

Member Function Documentation

◆ bxVectorToVector()

template<typename T >
std::vector<T> HGCalTriggerTools::bxVectorToVector ( const BXVector< T > &  inputBXVector)
inline

Definition at line 77 of file HGCalTriggerTools.h.

References BXVector< T >::begin(), and BXVector< T >::end().

77  {
78  std::vector<T> outputVector;
79  // loop over collection for a given bx and put the objects into a std::vector
80  outputVector.insert(outputVector.end(), inputBXVector.begin(0), inputBXVector.end(0));
81  return outputVector;
82  }
const_iterator begin(int bx) const
const_iterator end(int bx) const

◆ eventSetup()

void HGCalTriggerTools::eventSetup ( const edm::EventSetup es,
const edm::ESGetToken< HGCalTriggerGeometryBase, CaloGeometryRecord > &  token 
)

Definition at line 34 of file HGCalTriggerTools.cc.

References edm::EventSetup::getHandle(), edm::ESHandle< T >::product(), setGeometry(), and unpackBuffers-CaloStage2::token.

35  {
36  const edm::ESHandle<HGCalTriggerGeometryBase>& triggerGeometry = es.getHandle(token);
37  setGeometry(triggerGeometry.product());
38 }
void setGeometry(const HGCalTriggerGeometryBase *const)
T const * product() const
Definition: ESHandle.h:86
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130

◆ getEta()

float HGCalTriggerTools::getEta ( const GlobalPoint position,
const float &  vertex_z = 0. 
) const

Definition at line 244 of file HGCalTriggerTools.cc.

References PV3DBase< T, PVType, FrameType >::eta(), and position.

Referenced by getPt(), and getTCEta().

244  {
245  GlobalPoint corrected_position = GlobalPoint(position.x(), position.y(), position.z() - vertex_z);
246  return corrected_position.eta();
247 }
T eta() const
Definition: PV3DBase.h:73
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static int position[264][3]
Definition: ReadPGInfo.cc:289

◆ getLayerZ() [1/2]

float HGCalTriggerTools::getLayerZ ( const unsigned &  layerWithOffset) const

Definition at line 275 of file HGCalTriggerTools.cc.

References HcalEndcap, HGCEE, HGCHEF, lastLayerEE(), lastLayerFH(), layerWithOffset(), and hltrates_dqm_sourceclient-live_cfg::offset.

275  {
276  int subdet = ForwardSubdetector::HGCEE;
277  unsigned offset = 0;
280  offset = lastLayerEE();
281  } else if (layerWithOffset > lastLayerFH()) {
283  offset = lastLayerFH();
284  }
285  // note for HFnose offset is always zero since we have less layers than HGCEE
286  return getLayerZ(subdet, layerWithOffset - offset);
287 }
unsigned layerWithOffset(const DetId &) const
unsigned lastLayerFH() const
float getLayerZ(const unsigned &layerWithOffset) const
unsigned lastLayerEE(bool nose=false) const

◆ getLayerZ() [2/2]

float HGCalTriggerTools::getLayerZ ( const int &  subdet,
const unsigned &  layer 
) const

Definition at line 289 of file HGCalTriggerTools.cc.

References HGCalTopology::dddConstants(), HGCalTriggerGeometryBase::eeTopology(), HGCalTriggerGeometryBase::fhTopology(), geom_, HFNose, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEB, HGCHEF, HGCalTriggerGeometryBase::hscTopology(), layer(), HGCalTriggerGeometryBase::noseTopology(), and HGCalDDDConstants::waferZ().

289  {
290  float layerGlobalZ = 0.;
291  if ((subdet == ForwardSubdetector::HGCEE) || (subdet == DetId::HGCalEE)) {
292  layerGlobalZ = geom_->eeTopology().dddConstants().waferZ(layer, true);
293  } else if ((subdet == ForwardSubdetector::HGCHEF) || (subdet == DetId::HGCalHSi)) {
294  layerGlobalZ = geom_->fhTopology().dddConstants().waferZ(layer, true);
295  } else if (subdet == ForwardSubdetector::HFNose) {
296  layerGlobalZ = geom_->noseTopology().dddConstants().waferZ(layer, true);
297  } else if ((subdet == ForwardSubdetector::HGCHEB) || (subdet == DetId::HGCalHSc)) {
298  layerGlobalZ = geom_->hscTopology().dddConstants().waferZ(layer, true);
299  }
300  return layerGlobalZ;
301 }
double waferZ(int layer, bool reco) const
const HGCalTopology & eeTopology() const
const HGCalTriggerGeometryBase * geom_
const HGCalTopology & noseTopology() const
unsigned layer(const DetId &) const
const HGCalTopology & fhTopology() const
const HGCalTopology & hscTopology() const
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98

◆ getPhi()

float HGCalTriggerTools::getPhi ( const GlobalPoint position) const

Definition at line 254 of file HGCalTriggerTools.cc.

References phi, and position.

Referenced by getTCPhi().

254  {
255  float phi = atan2(position.y(), position.x());
256  return phi;
257 }
static int position[264][3]
Definition: ReadPGInfo.cc:289

◆ getPt()

float HGCalTriggerTools::getPt ( const GlobalPoint position,
const float &  hitEnergy,
const float &  vertex_z = 0. 
) const

Definition at line 264 of file HGCalTriggerTools.cc.

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

Referenced by getTCPt().

264  {
265  float eta = getEta(position, vertex_z);
266  float pt = hitEnergy / cosh(eta);
267  return pt;
268 }
float getEta(const GlobalPoint &position, const float &vertex_z=0.) const
static int position[264][3]
Definition: ReadPGInfo.cc:289

◆ getSubDetectorType()

HGCalTriggerTools::SubDetectorType HGCalTriggerTools::getSubDetectorType ( const DetId id) const

◆ getTCEta()

float HGCalTriggerTools::getTCEta ( const DetId id,
const float &  vertex_z = 0. 
) const

Definition at line 249 of file HGCalTriggerTools.cc.

References getEta(), getTCPosition(), and position.

249  {
251  return getEta(position, vertex_z);
252 }
GlobalPoint getTCPosition(const DetId &id) const
float getEta(const GlobalPoint &position, const float &vertex_z=0.) const
static int position[264][3]
Definition: ReadPGInfo.cc:289

◆ getTCPhi()

float HGCalTriggerTools::getTCPhi ( const DetId id) const

Definition at line 259 of file HGCalTriggerTools.cc.

References getPhi(), getTCPosition(), and position.

259  {
261  return getPhi(position);
262 }
GlobalPoint getTCPosition(const DetId &id) const
float getPhi(const GlobalPoint &position) const
static int position[264][3]
Definition: ReadPGInfo.cc:289

◆ getTCPosition()

GlobalPoint HGCalTriggerTools::getTCPosition ( const DetId id) const

Definition at line 51 of file HGCalTriggerTools.cc.

References Exception, geom_, HGCalTriggerGeometryBase::getTriggerCellPosition(), DetId::HGCalEE, and position.

Referenced by HGCalConcentratorSuperTriggerCellImpl::assignSuperTriggerCellEnergyAndPosition(), HGCalCoarseTriggerCellMapping::getCoarseTriggerCellPosition(), getTCEta(), getTCPhi(), getTCPt(), and HGCalConcentratorAutoEncoderImpl::select().

51  {
52  if (id.det() == DetId::HGCalEE) {
53  throw cms::Exception("hgcal::HGCalTriggerTools") << "method getTCPosition called for DetId not belonging to a TC";
54  // FIXME: this would actually need a better test...but at the moment I can not think to anything better
55  // to distinguish a TC detId
56  }
57 
59  return position;
60 }
virtual GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const =0
const HGCalTriggerGeometryBase * geom_
static int position[264][3]
Definition: ReadPGInfo.cc:289

◆ getTCPt()

float HGCalTriggerTools::getTCPt ( const DetId id,
const float &  hitEnergy,
const float &  vertex_z = 0. 
) const

Definition at line 270 of file HGCalTriggerTools.cc.

References getPt(), getTCPosition(), and position.

270  {
272  return getPt(position, hitEnergy, vertex_z);
273 }
GlobalPoint getTCPosition(const DetId &id) const
static int position[264][3]
Definition: ReadPGInfo.cc:289
float getPt(const GlobalPoint &position, const float &hitEnergy, const float &vertex_z=0.) const

◆ getTriggerGeometry()

const HGCalTriggerGeometryBase* HGCalTriggerTools::getTriggerGeometry ( ) const
inline

◆ isEm()

bool HGCalTriggerTools::isEm ( const DetId id) const

Definition at line 141 of file HGCalTriggerTools.cc.

References DetId::Forward, HFNose, HFNoseTrigger, DetId::HGCalEE, HGCalEETrigger, DetId::HGCalTrigger, HGCTrigger, HGCalTriggerModuleDetId::isEE(), HFNoseTriggerDetId::isEE(), and HFNoseDetId::isEE().

Referenced by HGCalConcentratorSuperTriggerCellImpl::assignSuperTriggerCellEnergyAndPosition(), HGCalHistoSeedingImpl::fillHistoClusters(), getSubDetectorType(), isHad(), HGCalVFEProcessorSums::run(), and HGCalConcentratorProcessorSelection::run().

141  {
142  bool em = false;
143 
144  if (id.det() == DetId::Forward && id.subdetId() == ForwardSubdetector::HFNose) {
145  em = HFNoseDetId(id).isEE();
146  } else if (id.det() == DetId::Forward && id.subdetId() == ForwardSubdetector::HGCTrigger) {
147  em = HGCalTriggerModuleDetId(id).isEE();
148  } else if (id.det() == DetId::HGCalEE) {
149  em = true;
150  } else if (id.det() == DetId::HGCalTrigger &&
152  em = true;
153  } else if (id.det() == DetId::HGCalTrigger &&
155  em = HFNoseTriggerDetId(id).isEE();
156  }
157  return em;
158 }
bool isEE() const
consistency check : no bits left => no overhead
bool isEE() const
consistency check : no bits left => no overhead
Definition: HFNoseDetId.h:105

◆ isHad()

bool HGCalTriggerTools::isHad ( const DetId id) const
inline

Definition at line 48 of file HGCalTriggerTools.h.

References isEm().

Referenced by layerWithOffset().

48 { return !isEm(id); }
bool isEm(const DetId &) const

◆ isNose()

bool HGCalTriggerTools::isNose ( const DetId id) const

◆ isScintillator()

bool HGCalTriggerTools::isScintillator ( const DetId id) const
inline

◆ isSilicon()

bool HGCalTriggerTools::isSilicon ( const DetId id) const

Definition at line 171 of file HGCalTriggerTools.cc.

References DetId::Forward, HFNoseTrigger, DetId::HGCalEE, HGCalEETrigger, HGCalHScTrigger, DetId::HGCalHSi, HGCalHSiTrigger, DetId::HGCalTrigger, HGCTrigger, HGCalTriggerDetId::subdet(), and HGCalTriggerModuleDetId::triggerSubdetId().

Referenced by HGCalConcentratorSuperTriggerCellImpl::assignSuperTriggerCellEnergyAndPosition(), HGCalTriggerCellCalibration::calibrateInMipT(), HGCalTriggerCellCalibration::calibrateMipTinGeV(), isScintillator(), HGCalVFEProcessorSums::run(), and HGCalVFESummationImpl::triggerCellSums().

171  {
172  bool silicon = false;
173  if (id.det() == DetId::Forward && id.subdetId() == HGCTrigger) {
175  } else if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
176  silicon = true;
177  } else if (id.det() == DetId::HGCalTrigger &&
179  silicon = true;
180  } else if (id.det() == DetId::HGCalTrigger &&
183  silicon = true;
184  }
185  return silicon;
186 }
HGCalTriggerSubdetector subdet() const
get the subdetector
int triggerSubdetId() const
get the trigger sub-detector

◆ lastLayer()

unsigned HGCalTriggerTools::lastLayer ( bool  nose = false) const
inline

Definition at line 59 of file HGCalTriggerTools.h.

References noseLayers_, and totalLayers_.

Referenced by HGCalTowerMap2DImpl::newTowerMaps().

59 { return nose ? noseLayers_ : totalLayers_; }

◆ lastLayerBH()

unsigned HGCalTriggerTools::lastLayerBH ( ) const
inline

◆ lastLayerEE()

unsigned HGCalTriggerTools::lastLayerEE ( bool  nose = false) const
inline

◆ lastLayerFH()

unsigned HGCalTriggerTools::lastLayerFH ( ) const
inline

Definition at line 56 of file HGCalTriggerTools.h.

References eeLayers_, and fhLayers_.

Referenced by getLayerZ().

56 { return eeLayers_ + fhLayers_; }

◆ lastLayerNose()

unsigned HGCalTriggerTools::lastLayerNose ( ) const
inline

Definition at line 58 of file HGCalTriggerTools.h.

References noseLayers_.

58 { return noseLayers_; }

◆ layer()

unsigned HGCalTriggerTools::layer ( const DetId id) const

Definition at line 108 of file HGCalTriggerTools.cc.

References DetId::Forward, HFNose, HFNoseTrigger, DetId::HGCalEE, HGCalEETrigger, DetId::HGCalHSc, DetId::HGCalHSi, HGCalHSiTrigger, DetId::HGCalTrigger, HGCTrigger, HGCScintillatorDetId::layer(), HGCalTriggerDetId::layer(), HFNoseTriggerDetId::layer(), HGCSiliconDetId::layer(), HFNoseDetId::layer(), HGCalTriggerModuleDetId::layer(), and SiStripPI::max.

Referenced by getLayerZ(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), HGCalClusteringImpl::isPertinent(), and layerWithOffset().

108  {
110  if (id.det() == DetId::Forward && id.subdetId() == ForwardSubdetector::HFNose) {
111  layer = HFNoseDetId(id).layer();
112  } else if (id.det() == DetId::Forward && id.subdetId() == ForwardSubdetector::HGCTrigger) {
114  } else if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
115  layer = HGCSiliconDetId(id).layer();
116  } else if (id.det() == DetId::HGCalTrigger &&
119  layer = HGCalTriggerDetId(id).layer();
120  } else if (id.det() == DetId::HGCalTrigger &&
123  } else if (id.det() == DetId::HGCalHSc) {
125  }
126  return layer;
127 }
int layer() const
get the layer #
Definition: HFNoseDetId.h:57
int layer() const
get the layer #
int layer() const
get the layer #
int layer() const
get the layer #
int layer() const
get the layer #
unsigned layer(const DetId &) const
int layer() const
get the layer #

◆ layers() [1/2]

unsigned HGCalTriggerTools::layers ( ForwardSubdetector  type) const

Definition at line 62 of file HGCalTriggerTools.cc.

References bhLayers_, eeLayers_, fhLayers_, ForwardEmpty, HFNose, HGCEE, HGCHEB, HGCHEF, noseLayers_, and totalLayers_.

Referenced by HGCalClusteringImpl::clusterizeNN(), HGCalShowerShape::coreShowerLength(), layers(), and HGCalShowerShape::percentileLayer().

62  {
63  unsigned layers = 0;
64  switch (type) {
66  layers = eeLayers_;
67  break;
69  layers = fhLayers_;
70  break;
72  layers = bhLayers_;
73  break;
76  break;
79  break;
80  default:
81  break;
82  };
83  return layers;
84 }
unsigned layers(ForwardSubdetector type) const

◆ layers() [2/2]

unsigned HGCalTriggerTools::layers ( DetId::Detector  type) const

Definition at line 86 of file HGCalTriggerTools.cc.

References bhLayers_, eeLayers_, fhLayers_, DetId::Forward, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, layers(), and totalLayers_.

86  {
87  unsigned layers = 0;
88  switch (type) {
89  case DetId::HGCalEE:
90  layers = eeLayers_;
91  break;
92  case DetId::HGCalHSi:
93  layers = fhLayers_;
94  break;
95  case DetId::HGCalHSc:
96  layers = bhLayers_;
97  break;
98  // FIXME: to do HFNose
99  case DetId::Forward:
101  break;
102  default:
103  break;
104  }
105  return layers;
106 }
unsigned layers(ForwardSubdetector type) const

◆ layerWithOffset()

unsigned HGCalTriggerTools::layerWithOffset ( const DetId id) const

Definition at line 129 of file HGCalTriggerTools.cc.

References eeLayers_, isHad(), isNose(), MainPageGenerator::l, and layer().

Referenced by HGCalTowerMap2DImpl::buildTowerMap2D(), HGCalTriggerCellCalibration::calibrateMipTinGeV(), HGCalClusteringDummyImpl::calibratePt(), HGCalClusteringImpl::calibratePt(), HGCalHistoClusteringImpl::clusterSeedMulticluster(), HGCalStage1TruncationWrapper::convertCMSSWInputs(), HGCalSortingTruncationWrapper::convertCMSSWInputs(), HGCalHistoClusteringWrapper::convertCMSSWInputs(), HGCalShowerShape::eMax(), HGCalShowerShape::firstLayer(), HGCalCoarseTriggerCellMapping::getCoarseTriggerCellId(), HGCalCoarseTriggerCellMapping::getConstituentTriggerCells(), getLayerZ(), HGCalShowerShape::lastLayer(), HGCalShowerShape::maxLayer(), HGCalShowerShape::sigmaEtaEtaMax(), HGCalShowerShape::sigmaPhiPhiMax(), HGCalShowerShape::sigmaRRMax(), HGCalShowerShape::sigmaRRMean(), and HGCalClusteringImpl::triggerCellReshuffling().

129  {
130  unsigned int l = layer(id);
131 
132  if (isNose(id)) {
133  l = layer(id); // no offset for HFnose
134  } else if (isHad(id)) {
135  l += eeLayers_;
136  }
137 
138  return l;
139 }
bool isHad(const DetId &id) const
bool isNose(const DetId &) const
unsigned layer(const DetId &) const

◆ setGeometry()

void HGCalTriggerTools::setGeometry ( const HGCalTriggerGeometryBase * const  geom)

Definition at line 40 of file HGCalTriggerTools.cc.

References bhLayers_, HGCalTopology::dddConstants(), eeLayers_, HGCalTriggerGeometryBase::eeTopology(), fhLayers_, HGCalTriggerGeometryBase::fhTopology(), relativeConstraints::geom, geom_, HGCalTriggerGeometryBase::hscTopology(), HGCalTriggerGeometryBase::isWithNoseGeometry(), HGCalDDDConstants::layers(), noseLayers_, HGCalTriggerGeometryBase::noseTopology(), and totalLayers_.

Referenced by eventSetup(), CaloTruthCellsProducer::produce(), HGCalVFEProcessorSums::run(), HGCalConcentratorProcessorSelection::run(), HGCalTriggerCellCalibration::setGeometry(), HGCalTriggerClusterInterpretationEM::setGeometry(), HGCalStage1TruncationImpl::setGeometry(), HGCalConcentratorCoarsenerImpl::setGeometry(), HGCalVFESummationImpl::setGeometry(), HGCalConcentratorThresholdImpl::setGeometry(), HGCalClusteringDummyImpl::setGeometry(), HGCalCoarseTriggerCellMapping::setGeometry(), HGCalMulticlusteringImpl::setGeometry(), HGCalConcentratorTrigSumImpl::setGeometry(), HGCalHistoClusteringImpl::setGeometry(), HGCalConcentratorBestChoiceImpl::setGeometry(), HGCalConcentratorSuperTriggerCellImpl::setGeometry(), HGCalShowerShape::setGeometry(), HGCalConcentratorAutoEncoderImpl::setGeometry(), HGCalClusteringImpl::setGeometry(), HGCalStage1TruncationWrapper::setGeometry(), HGCalSortingTruncationWrapper::setGeometry(), HGCalTriggerTowerGeometryHelper::setGeometry(), HGCalHistoClusteringWrapper::setGeometry(), HGCalTowerMap2DImpl::setGeometry(), and HGCalHistoSeedingImpl::setGeometry().

40  {
41  geom_ = geom;
46 
49 }
const HGCalTopology & eeTopology() const
const HGCalTriggerGeometryBase * geom_
unsigned int layers(bool reco) const
const HGCalTopology & noseTopology() const
const HGCalTopology & fhTopology() const
const HGCalTopology & hscTopology() const
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98

◆ simToReco()

DetId HGCalTriggerTools::simToReco ( const DetId simid,
const HGCalTopology topo 
) const

Definition at line 303 of file HGCalTriggerTools.cc.

References HGCalTopology::dddConstants().

Referenced by CaloTruthCellsProducer::makeHitMap().

303  {
304  DetId recoid(0);
305  const auto& dddConst = topo.dddConstants();
306  if (dddConst.waferHexagon8() || dddConst.tileTrapezoid()) {
307  recoid = simid;
308  }
309  return recoid;
310 }
Definition: DetId.h:17
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98

◆ thicknessIndex()

int HGCalTriggerTools::thicknessIndex ( const DetId id) const

Definition at line 221 of file HGCalTriggerTools.cc.

References DetId::Forward, HFNose, HFNoseTrigger, DetId::HGCalEE, HGCalEETrigger, DetId::HGCalHSi, HGCalHSiTrigger, DetId::HGCalTrigger, HGCTrigger, isScintillator(), kScintillatorPseudoThicknessIndex_, Calorimetry_cff::thickness, HFNoseTriggerDetId::type(), HGCalTriggerDetId::type(), HFNoseDetId::type(), HGCSiliconDetId::type(), and HGCalTriggerModuleDetId::type().

Referenced by HGCalConcentratorSuperTriggerCellImpl::assignSuperTriggerCellEnergyAndPosition(), HGCalTriggerCellCalibration::calibrateInMipT(), HGCalTriggerCellCalibration::calibrateMipTinGeV(), HGCalConcentratorCoarsenerImpl::coarsen(), HGCalConcentratorSuperTriggerCellImpl::createAllTriggerCells(), HGCalCoarseTriggerCellMapping::getCoarseTriggerCellId(), HGCalCoarseTriggerCellMapping::getConstituentTriggerCells(), HGCalVFEProcessorSums::run(), HGCalConcentratorProcessorSelection::run(), and HGCalVFESummationImpl::triggerCellSums().

221  {
222  if (isScintillator(id)) {
224  }
225  unsigned det = id.det();
226  int thickness = 0;
227  if (det == DetId::HGCalEE || det == DetId::HGCalHSi) {
229  } else if (det == DetId::Forward && id.subdetId() == ForwardSubdetector::HFNose) {
230  thickness = HFNoseDetId(id).type();
231  } else if (det == DetId::Forward && id.subdetId() == ForwardSubdetector::HGCTrigger) {
233  } else if (id.det() == DetId::HGCalTrigger &&
237  } else if (id.det() == DetId::HGCalTrigger &&
240  }
241  return thickness;
242 }
bool isScintillator(const DetId &id) const
int type() const
get the type
int type() const
get the type
Definition: HFNoseDetId.h:51
int type() const
get the type
int type() const
get the type
static constexpr unsigned kScintillatorPseudoThicknessIndex_
int type() const
get the type

◆ triggerLayer()

unsigned HGCalTriggerTools::triggerLayer ( const unsigned  id) const
inline

Definition at line 85 of file HGCalTriggerTools.h.

References geom_, and HGCalTriggerGeometryBase::triggerLayer().

Referenced by HGCalTriggerClusterInterpretationEM::interpret().

85 { return geom_->triggerLayer(id); }
const HGCalTriggerGeometryBase * geom_
virtual unsigned triggerLayer(const unsigned id) const =0

◆ zside()

int HGCalTriggerTools::zside ( const DetId id) const

Definition at line 200 of file HGCalTriggerTools.cc.

References DetId::Forward, HFNose, HFNoseTrigger, DetId::HGCalEE, HGCalEETrigger, DetId::HGCalHSc, DetId::HGCalHSi, HGCalHSiTrigger, DetId::HGCalTrigger, HGCTrigger, HGCScintillatorDetId::zside(), HGCalTriggerDetId::zside(), HFNoseTriggerDetId::zside(), HFNoseDetId::zside(), HGCSiliconDetId::zside(), and HGCalTriggerModuleDetId::zside().

Referenced by HGCalMulticlusteringImpl::clusterizeDBSCAN(), HGCalHistoClusteringImpl::clusterSeedMulticluster(), HGCalStage1TruncationWrapper::convertCMSSWInputs(), HGCalSortingTruncationWrapper::convertCMSSWInputs(), HGCalHistoClusteringWrapper::convertCMSSWInputs(), HGCalHistoSeedingImpl::fillHistoClusters(), HGCalTriggerTowerGeometryHelper::HGCalTriggerTowerGeometryHelper(), HGCalMulticlusteringImpl::isPertinent(), HGCalClusteringImpl::isPertinent(), and HGCalClusteringImpl::triggerCellReshuffling().

200  {
201  int zside = 0;
202  if (id.det() == DetId::Forward && id.subdetId() == ForwardSubdetector::HFNose) {
203  zside = HFNoseDetId(id).zside();
204  } else if (id.det() == DetId::Forward && id.subdetId() == ForwardSubdetector::HGCTrigger) {
206  } else if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
207  zside = HGCSiliconDetId(id).zside();
208  } else if (id.det() == DetId::HGCalTrigger &&
211  zside = HGCalTriggerDetId(id).zside();
212  } else if (id.det() == DetId::HGCalTrigger &&
215  } else if (id.det() == DetId::HGCalHSc) {
217  }
218  return zside;
219 }
int zside() const
get the z-side of the cell (1/-1)
int zside() const
get the z-side of the cell (1/-1)
int zside(const DetId &) const
int zside() const
get the z-side of the cell (1/-1)
int zside() const
get the z-side of the cell (1/-1)
int zside() const
get the z-side of the module (1/-1)
int zside() const
get the z-side of the cell (1/-1)
Definition: HFNoseDetId.h:54

Member Data Documentation

◆ bhLayers_

unsigned HGCalTriggerTools::bhLayers_
private

Definition at line 100 of file HGCalTriggerTools.h.

Referenced by layers(), and setGeometry().

◆ eeLayers_

unsigned HGCalTriggerTools::eeLayers_
private

Definition at line 98 of file HGCalTriggerTools.h.

Referenced by lastLayerEE(), lastLayerFH(), layers(), layerWithOffset(), and setGeometry().

◆ fhLayers_

unsigned HGCalTriggerTools::fhLayers_
private

Definition at line 99 of file HGCalTriggerTools.h.

Referenced by lastLayerFH(), layers(), and setGeometry().

◆ geom_

const HGCalTriggerGeometryBase* HGCalTriggerTools::geom_
private

◆ kScintillatorPseudoThicknessIndex_

constexpr unsigned HGCalTriggerTools::kScintillatorPseudoThicknessIndex_ = 3
static

Definition at line 87 of file HGCalTriggerTools.h.

Referenced by thicknessIndex().

◆ noseLayers_

unsigned HGCalTriggerTools::noseLayers_
private

Definition at line 101 of file HGCalTriggerTools.h.

Referenced by lastLayer(), lastLayerNose(), layers(), and setGeometry().

◆ totalLayers_

unsigned HGCalTriggerTools::totalLayers_
private

Definition at line 102 of file HGCalTriggerTools.h.

Referenced by lastLayer(), lastLayerBH(), layers(), and setGeometry().