@@ -40,6 +40,13 @@ namespace {
4040 return ddd;
4141 }
4242
43+ inline const HGCalDDDConstants* get_ddd (const CaloSubdetectorGeometry* geom, const HGCScintillatorDetId& detid) {
44+ const HGCalGeometry* hg = static_cast <const HGCalGeometry*>(geom);
45+ const HGCalDDDConstants* ddd = &(hg->topology ().dddConstants ());
46+ check_ddd (ddd);
47+ return ddd;
48+ }
49+
4350 inline const HGCalDDDConstants* get_ddd (const CaloSubdetectorGeometry* geom, const HGCSiliconDetId& detid) {
4451 const HGCalGeometry* hg = static_cast <const HGCalGeometry*>(geom);
4552 const HGCalDDDConstants* ddd = &(hg->topology ().dddConstants ());
@@ -496,6 +503,14 @@ bool RecHitTools::isSilicon(const DetId& id) const {
496503
497504bool RecHitTools::isScintillator (const DetId& id) const { return (id.det () == DetId::HGCalHSc); }
498505
506+ bool RecHitTools::isScintillatorFine (const DetId& id) const {
507+ if (id.det () == DetId::HGCalHSc) {
508+ auto hg = static_cast <const HGCalGeometry*>(getSubdetectorGeometry (id));
509+ return hg->topology ().dddConstants ().scintFine (HGCScintillatorDetId (id).layer ());
510+ } else {
511+ return false ;
512+ }
513+ }
499514bool RecHitTools::isBarrel (const DetId& id) const { return (id.det () == DetId::Ecal || id.det () == DetId::Hcal); }
500515bool RecHitTools::isOnlySilicon (const unsigned int layer) const {
501516 // HFnose TODO
@@ -538,6 +553,15 @@ float RecHitTools::getPt(const DetId& id, const float& hitEnergy, const float& v
538553 return pt;
539554}
540555
556+ int RecHitTools::getScintMaxIphi (const DetId& id) const {
557+ if (id.det () == DetId::HGCalHSc) {
558+ auto hg = static_cast <const HGCalGeometry*>(getSubdetectorGeometry (id));
559+ return hg->topology ().dddConstants ().maxCells (HGCScintillatorDetId (id).layer (), true );
560+ } else {
561+ return 0 ;
562+ }
563+ }
564+
541565std::pair<uint32_t , uint32_t > RecHitTools::firstAndLastLayer (DetId::Detector det, int subdet) const {
542566 if ((det == DetId::HGCalEE) || ((det == DetId::Forward) && (subdet == HGCEE))) {
543567 return std::make_pair (eeOffset_ + 1 , fhOffset_);
@@ -558,3 +582,33 @@ bool RecHitTools::maskCell(const DetId& id, int corners) const {
558582 return hg->topology ().dddConstants ().maskCell (id, corners);
559583 }
560584}
585+
586+ RecHitTools::siliconWaferInfo RecHitTools::getWaferInfo (const DetId& id) const {
587+ RecHitTools::siliconWaferInfo info;
588+ if ((id.det () == DetId::HGCalEE) || (id.det () == DetId::HGCalHSi)) {
589+ auto geom = getSubdetectorGeometry (id);
590+ HGCSiliconDetId hid (id);
591+ auto ddd = get_ddd (geom, hid);
592+ HGCalParameters::waferInfo info2 = ddd->waferInfo (hid.layer (), hid.waferU (), hid.waferV ());
593+ info.type = info2.type ;
594+ info.partialType = info2.part ;
595+ info.orientation = info2.orient ;
596+ info.cassette = info2.cassette ;
597+ info.placementIndex = ddd->placementIndex (hid);
598+ }
599+ return info;
600+ }
601+
602+ RecHitTools::scintillatorTileInfo RecHitTools::getTileInfo (const DetId& id) const {
603+ RecHitTools::scintillatorTileInfo info;
604+ if (isScintillator (id)) {
605+ auto geom = getSubdetectorGeometry (id);
606+ HGCScintillatorDetId hid (id);
607+ auto ddd = get_ddd (geom, hid);
608+ HGCalParameters::tileInfo info2 = ddd->tileInfo (hid.zside (), hid.layer (), hid.ring ());
609+ info.type = info2.type ;
610+ info.sipm = info2.sipm ;
611+ info.cassette = info2.cassette ;
612+ }
613+ return info;
614+ }
0 commit comments