CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
FastTimeGeometry Class Referencefinal

#include <FastTimeGeometry.h>

Inheritance diagram for FastTimeGeometry:
CaloSubdetectorGeometry

Public Types

enum  { k_NumberOfParametersPerShape = 12 }
 
enum  { k_NumberOfShapes = 50 }
 
typedef FastTimeGeometryRecord AlignedRecord
 
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef std::vector< FlatTrdCellVec
 
typedef std::vector< GlobalPointCornersVec
 
typedef std::set< DetIdDetIdSet
 
typedef PFastTimeRcd PGeometryRecord
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
- Public Types inherited from CaloSubdetectorGeometry
typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef std::vector< std::shared_ptr< const CaloCellGeometry > > CellSet
 
typedef std::set< DetIdDetIdSet
 
typedef std::vector< CCGFloatDimVec
 
typedef std::vector< unsigned int > IVec
 
typedef CaloCellGeometry::ParMgr ParMgr
 
typedef CaloCellGeometry::ParVec ParVec
 
typedef CaloCellGeometry::ParVecVec ParVecVec
 
typedef std::vector< CCGFloatTrVec
 

Public Member Functions

std::string cellElement () const
 
 FastTimeGeometry (const FastTimeTopology &topology)
 
virtual void fillNamedParams (DDFilteredView fv)
 
DetIdSet getCells (const GlobalPoint &r, double dR) const override
 Get a list of all cells within a dR of the given cell. More...
 
DetId getClosestCell (const GlobalPoint &r) const override
 
CornersVec getCorners (const DetId &id) const
 Returns the corner points of this cell's volume. More...
 
std::shared_ptr< const CaloCellGeometrygetGeometry (const DetId &id) const override
 Get the cell geometry of a given detector id. Should return false if not found. More...
 
GlobalPoint getPosition (const DetId &id) const
 
void getSummary (CaloSubdetectorGeometry::TrVec &trVector, CaloSubdetectorGeometry::IVec &iVector, CaloSubdetectorGeometry::DimVec &dimVector, CaloSubdetectorGeometry::IVec &dinsVector) const override
 
const std::vector< DetId > & getValidDetIds (DetId::Detector det=DetId::Detector(0), int subdet=0) const override
 Get a list of valid detector ids (for the given subdetector) More...
 
const std::vector< DetId > & getValidGeomDetIds (void) const
 
void initializeParms () override
 
void localCorners (Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
 
void newCell (const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
 
bool present (const DetId &id) const override
 is this detid present in the geometry? More...
 
void sortDetIds ()
 
const FastTimeTopologytopology () const
 
 ~FastTimeGeometry () override
 
- Public Member Functions inherited from CaloSubdetectorGeometry
void allocateCorners (CaloCellGeometry::CornersVec::size_type n)
 
void allocatePar (ParVec::size_type n, unsigned int m)
 
 CaloSubdetectorGeometry ()
 
 CaloSubdetectorGeometry (const CaloSubdetectorGeometry &)=delete
 avoid copies More...
 
CaloCellGeometry::CornersMgrcornersMgr ()
 
CCGFloat deltaEta (const DetId &detId) const
 
CCGFloat deltaPhi (const DetId &detId) const
 
virtual void fillDefaultNamedParameters () const
 
virtual CellSet getCellSet (const GlobalPoint &r, double dR) const
 
virtual unsigned int numberOfParametersPerShape () const
 
virtual unsigned int numberOfShapes () const
 
virtual unsigned int numberOfTransformParms () const
 
CaloSubdetectorGeometryoperator= (const CaloSubdetectorGeometry &)=delete
 
ParMgrparMgr ()
 
const ParMgrparMgrConst () const
 
ParVecVecparVecVec ()
 
const ParVecVecparVecVec () const
 
virtual ~CaloSubdetectorGeometry ()
 The base class DOES assume that it owns the CaloCellGeometry objects. More...
 

Static Public Member Functions

static std::string dbString ()
 
static std::string producerTag ()
 

Protected Member Functions

void addValidID (const DetId &id)
 
std::shared_ptr< const CaloCellGeometrycellGeomPtr (uint32_t index) const override
 
const CaloCellGeometrygetGeometryRawPtr (uint32_t index) const override
 
unsigned int indexFor (const DetId &id) const override
 
virtual unsigned int sizeForDenseIndex (const DetId &id) const
 
unsigned int sizeForDenseIndex () const
 
- Protected Member Functions inherited from CaloSubdetectorGeometry
void addValidID (const DetId &id)
 
virtual unsigned int sizeForDenseIndex (const DetId &id) const
 

Private Member Functions

std::shared_ptr< const CaloCellGeometrycellGeomPtr (uint32_t index, const GlobalPoint &p) const
 

Private Attributes

CellVec m_cellVec
 
ForwardSubdetector m_subdet
 
const FastTimeTopologym_topology
 
int m_Type
 
std::vector< DetIdm_validGeomIds
 

Additional Inherited Members

- Static Protected Member Functions inherited from CaloSubdetectorGeometry
static CCGFloat deltaR (const GlobalPoint &p1, const GlobalPoint &p2)
 
- Protected Attributes inherited from CaloSubdetectorGeometry
ParVecVec m_parVecVec
 
std::vector< DetIdm_validIds
 

Detailed Description

Definition at line 24 of file FastTimeGeometry.h.

Member Typedef Documentation

◆ AlignedRecord

Definition at line 35 of file FastTimeGeometry.h.

◆ CCGFloat

Definition at line 28 of file FastTimeGeometry.h.

◆ CellVec

typedef std::vector<FlatTrd> FastTimeGeometry::CellVec

Definition at line 26 of file FastTimeGeometry.h.

◆ CornersVec

Definition at line 33 of file FastTimeGeometry.h.

◆ DetIdSet

typedef std::set<DetId> FastTimeGeometry::DetIdSet

Definition at line 32 of file FastTimeGeometry.h.

◆ PGeometryRecord

Definition at line 36 of file FastTimeGeometry.h.

◆ Pt3D

Definition at line 29 of file FastTimeGeometry.h.

◆ Pt3DVec

Definition at line 30 of file FastTimeGeometry.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 38 of file FastTimeGeometry.h.

◆ anonymous enum

anonymous enum
Enumerator
k_NumberOfShapes 

Definition at line 39 of file FastTimeGeometry.h.

Constructor & Destructor Documentation

◆ FastTimeGeometry()

FastTimeGeometry::FastTimeGeometry ( const FastTimeTopology topology)

Definition at line 18 of file FastTimeGeometry.cc.

References CaloSubdetectorGeometry::m_validIds, topology(), and FastTimeTopology::totalGeomModules().

19  : m_topology(topology_),
20  m_cellVec(topology_.totalGeomModules()),
21  m_validGeomIds(topology_.totalGeomModules()),
22  m_Type(topology_.detectorType()),
23  m_subdet(topology_.subDetector()) {
24  m_validIds.reserve(topology().totalModules());
25 #ifdef EDM_ML_DEBUG
26  edm::LogVerbatim("FastTimeGeom") << "Expected total # of Geometry Modules " << topology().totalGeomModules();
27 #endif
28 }
Log< level::Info, true > LogVerbatim
unsigned int totalGeomModules() const
std::vector< DetId > m_validIds
const FastTimeTopology & topology() const
ForwardSubdetector m_subdet
std::vector< DetId > m_validGeomIds
const FastTimeTopology & m_topology

◆ ~FastTimeGeometry()

FastTimeGeometry::~FastTimeGeometry ( )
override

Definition at line 30 of file FastTimeGeometry.cc.

30 {}

Member Function Documentation

◆ addValidID()

void FastTimeGeometry::addValidID ( const DetId id)
protected

Definition at line 192 of file FastTimeGeometry.cc.

192  {
193  edm::LogError("FastTimeGeom") << "FastTimeGeometry::addValidID is not implemented";
194 }
Log< level::Error, false > LogError

◆ cellElement()

std::string FastTimeGeometry::cellElement ( ) const

Definition at line 137 of file FastTimeGeometry.cc.

References m_Type.

137  {
138  if (m_Type == 1)
139  return "FastTimeBarrel";
140  else if (m_Type == 2)
141  return "FastTimeEndcap";
142  else
143  return "Unknown";
144 }

◆ cellGeomPtr() [1/2]

std::shared_ptr< const CaloCellGeometry > FastTimeGeometry::cellGeomPtr ( uint32_t  index) const
overrideprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 167 of file FastTimeGeometry.cc.

References m_cellVec, and m_validGeomIds.

Referenced by cellGeomPtr(), getGeometry(), and getSummary().

167  {
168  if ((index >= m_cellVec.size()) || (m_validGeomIds[index].rawId() == 0))
169  return nullptr;
170  static const auto do_not_delete = [](const void*) {};
171  auto cell = std::shared_ptr<const CaloCellGeometry>(&m_cellVec[index], do_not_delete);
172  if (nullptr == cell->param())
173  return nullptr;
174  return cell;
175 }
std::vector< DetId > m_validGeomIds

◆ cellGeomPtr() [2/2]

std::shared_ptr< const CaloCellGeometry > FastTimeGeometry::cellGeomPtr ( uint32_t  index,
const GlobalPoint p 
) const
private

Definition at line 177 of file FastTimeGeometry.cc.

References cellGeomPtr(), m_cellVec, and m_validGeomIds.

177  {
178  if ((index >= m_cellVec.size()) || (m_validGeomIds[index].rawId() == 0))
179  return nullptr;
180  if (pos == GlobalPoint())
181  return cellGeomPtr(index);
182  auto cell = std::make_shared<FlatTrd>(m_cellVec[index]);
183  cell->setPosition(pos);
184 #ifdef EDM_ML_DEBUG
185  edm::LogVerbatim("FastTimeGeomX") << "cellGeomPtr " << pos << ":" << cell;
186 #endif
187  if (nullptr == cell->param())
188  return nullptr;
189  return cell;
190 }
Log< level::Info, true > LogVerbatim
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const override
std::vector< DetId > m_validGeomIds

◆ dbString()

static std::string FastTimeGeometry::dbString ( )
inlinestatic

Definition at line 41 of file FastTimeGeometry.h.

41 { return "PFastTimeRcd"; }

◆ fillNamedParams()

void FastTimeGeometry::fillNamedParams ( DDFilteredView  fv)
virtual

Definition at line 32 of file FastTimeGeometry.cc.

32 {}

◆ getCells()

FastTimeGeometry::DetIdSet FastTimeGeometry::getCells ( const GlobalPoint r,
double  dR 
) const
overridevirtual

Get a list of all cells within a dR of the given cell.

The default implementation makes a loop over all cell geometries. Cleverer implementations are suggested to use rough conversions between eta/phi and ieta/iphi and test on the boundaries.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 132 of file FastTimeGeometry.cc.

132  {
134  return dss;
135 }
std::set< DetId > DetIdSet

◆ getClosestCell()

DetId FastTimeGeometry::getClosestCell ( const GlobalPoint r) const
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 110 of file FastTimeGeometry.cc.

References FastTimeTopology::dddConstants(), FastTimeDDDConstants::getEtaPhi(), FastTimeDDDConstants::getZPhi(), m_Type, phi, alignCSCRings::r, topology(), validateGeometry_cfg::valid, ecaldqm::zside(), and geometryCSVtoXML::zz.

110  {
111  int zside = (r.z() > 0) ? 1 : -1;
112  std::pair<int, int> etaZPhi;
113  if (m_Type == 1) {
114  double zz = (zside > 0) ? r.z() : -r.z();
115  etaZPhi = topology().dddConstants().getZPhi(zz, r.phi());
116  } else {
117  double phi = (zside > 0) ? static_cast<double>(r.phi()) : atan2(r.y(), -r.x());
118  // Cast needed to resolve compile-time ambiguity of ? operator between
119  // convertible Phi class and atan2 template function.
120 
121  etaZPhi = topology().dddConstants().getEtaPhi(r.perp(), phi);
122  }
123  FastTimeDetId id = FastTimeDetId(m_Type, etaZPhi.first, etaZPhi.second, zside);
124 #ifdef EDM_ML_DEBUG
125  edm::LogVerbatim("FastTimeGeom") << "getClosestCell: for (" << r.x() << ", " << r.y() << ", " << r.z() << ") Id "
126  << id.type() << ":" << id.zside() << ":" << id.ieta() << ":" << id.iphi();
127 #endif
128 
129  return (topology().valid(id) ? DetId(id) : DetId());
130 }
Log< level::Info, true > LogVerbatim
int zside(DetId const &)
std::pair< int, int > getZPhi(double z, double phi) const
const FastTimeDDDConstants & dddConstants() const
Definition: DetId.h:17
std::pair< int, int > getEtaPhi(double r, double phi) const
const FastTimeTopology & topology() const

◆ getCorners()

FastTimeGeometry::CornersVec FastTimeGeometry::getCorners ( const DetId id) const

Returns the corner points of this cell's volume.

Definition at line 100 of file FastTimeGeometry.cc.

References TCMET_cfi::corner, FastTimeTopology::dddConstants(), FastTimeDDDConstants::getCorners(), FastTimeDetId::ieta(), FastTimeDetId::iphi(), m_Type, MillePedeFileConverter_cfg::out, topology(), and FastTimeDetId::zside().

Referenced by FWRecoGeometryESProducer::addFTLGeometry().

100  {
101  FastTimeDetId id_ = FastTimeDetId(id);
102  auto corners = topology().dddConstants().getCorners(m_Type, id_.ieta(), id_.iphi(), id_.zside());
104  for (const auto& corner : corners) {
105  out.emplace_back(0.1 * corner.x(), 0.1 * corner.y(), 0.1 * corner.z());
106  }
107  return out;
108 }
std::vector< GlobalPoint > CornersVec
int iphi() const
get the absolute value of the cell #&#39;s along y-axis (EC) | phi (Barrel)
Definition: FastTimeDetId.h:45
int ieta() const
get the absolute value of the cell #&#39;s along x-axis (EC) | z-axis (Barel)
Definition: FastTimeDetId.h:41
const FastTimeDDDConstants & dddConstants() const
int zside() const
get the z-side of the cell (1/-1)
Definition: FastTimeDetId.h:48
const FastTimeTopology & topology() const
std::vector< GlobalPoint > getCorners(int type, int izeta, int iphi, int zside) const

◆ getGeometry()

std::shared_ptr< const CaloCellGeometry > FastTimeGeometry::getGeometry ( const DetId id) const
overridevirtual

Get the cell geometry of a given detector id. Should return false if not found.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 77 of file FastTimeGeometry.cc.

References cellGeomPtr(), FastTimeDetId::geometryCell(), getPosition(), and topology().

77  {
78  if (id == DetId())
79  return nullptr; // nothing to get
80  DetId geoId = (DetId)(FastTimeDetId(id).geometryCell());
81  const uint32_t cellIndex(topology().detId2denseGeomId(geoId));
82  const GlobalPoint pos = (id != geoId) ? getPosition(id) : GlobalPoint();
83  return cellGeomPtr(cellIndex, pos);
84 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const override
Definition: DetId.h:17
const FastTimeTopology & topology() const
GlobalPoint getPosition(const DetId &id) const
FastTimeDetId geometryCell() const
Definition: FastTimeDetId.h:32

◆ getGeometryRawPtr()

const CaloCellGeometry * FastTimeGeometry::getGeometryRawPtr ( uint32_t  index) const
overrideprotectedvirtual

Implements CaloSubdetectorGeometry.

Definition at line 161 of file FastTimeGeometry.cc.

References m_cellVec, and CaloCellGeometry::param().

Referenced by present().

161  {
162  // Modify the RawPtr class
163  const CaloCellGeometry* cell(&m_cellVec[index]);
164  return (m_cellVec.size() < index || nullptr == cell->param() ? nullptr : cell);
165 }

◆ getPosition()

GlobalPoint FastTimeGeometry::getPosition ( const DetId id) const

Definition at line 94 of file FastTimeGeometry.cc.

References FastTimeTopology::dddConstants(), FastTimeDDDConstants::getPosition(), FastTimeDetId::ieta(), FastTimeDetId::iphi(), m_Type, topology(), and FastTimeDetId::zside().

Referenced by getGeometry().

94  {
95  FastTimeDetId id_ = FastTimeDetId(id);
96  auto pos = topology().dddConstants().getPosition(m_Type, id_.ieta(), id_.iphi(), id_.zside());
97  return GlobalPoint(0.1 * pos.x(), 0.1 * pos.y(), 0.1 * pos.z());
98 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
int iphi() const
get the absolute value of the cell #&#39;s along y-axis (EC) | phi (Barrel)
Definition: FastTimeDetId.h:45
int ieta() const
get the absolute value of the cell #&#39;s along x-axis (EC) | z-axis (Barel)
Definition: FastTimeDetId.h:41
const FastTimeDDDConstants & dddConstants() const
int zside() const
get the z-side of the cell (1/-1)
Definition: FastTimeDetId.h:48
const FastTimeTopology & topology() const
GlobalPoint getPosition(int type, int izeta, int iphi, int zside) const

◆ getSummary()

void FastTimeGeometry::getSummary ( CaloSubdetectorGeometry::TrVec trVector,
CaloSubdetectorGeometry::IVec iVector,
CaloSubdetectorGeometry::DimVec dimVector,
CaloSubdetectorGeometry::IVec dinsVector 
) const
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 208 of file FastTimeGeometry.cc.

References cellGeomPtr(), FastTimeTopology::dddConstants(), FastTimeDDDConstants::getRin(), FastTimeDDDConstants::getRout(), FastTimeDDDConstants::getZHalf(), runTauDisplay::gp, mps_fire::i, dqmdumpme::k, k_NumberOfParametersPerShape, k_NumberOfShapes, m_Type, m_validGeomIds, CaloSubdetectorGeometry::numberOfParametersPerShape(), CaloSubdetectorGeometry::numberOfShapes(), CaloSubdetectorGeometry::numberOfTransformParms(), submitPVValidationJobs::params, findQualityFiles::rr, topology(), FastTimeTopology::totalGeomModules(), and groupFilesInBlocks::tt.

211  {
212  unsigned int numberOfCells = topology().totalGeomModules(); // total Geom Modules both sides
215 
216  trVector.reserve(numberOfCells * numberOfTransformParms());
217  iVector.reserve(numberOfCells);
218  dimVector.reserve(numberOfShapes * numberOfParametersPerShape);
219  dinsVector.reserve(numberOfCells);
220 
221  for (unsigned int k = 0; k < topology().totalGeomModules(); ++k) {
224  params[1] = params[2] = 0;
228  params[6] = params[10] = 0;
229  params[11] = (k == 0) ? 1.0 : -1.0;
230  dimVector.insert(dimVector.end(), params.begin(), params.end());
231  }
232 
233  for (unsigned int i(0); i < numberOfCells; ++i) {
234  DetId detId = m_validGeomIds[i];
235  dinsVector.emplace_back(topology().detId2denseGeomId(detId));
236  iVector.emplace_back(1);
237 
238  Tr3D tr;
239  auto ptr(cellGeomPtr(i));
240  if (nullptr != ptr) {
241  ptr->getTransform(tr, (Pt3DVec*)nullptr);
242 
243  if (Tr3D() == tr) { // there is no rotation
244  const GlobalPoint& gp(ptr->getPosition());
245  tr = HepGeom::Translate3D(gp.x(), gp.y(), gp.z());
246  }
247 
248  const CLHEP::Hep3Vector tt(tr.getTranslation());
249  trVector.emplace_back(tt.x());
250  trVector.emplace_back(tt.y());
251  trVector.emplace_back(tt.z());
252  if (6 == numberOfTransformParms()) {
253  const CLHEP::HepRotation rr(tr.getRotation());
254  const ROOT::Math::Transform3D rtr(
255  rr.xx(), rr.xy(), rr.xz(), tt.x(), rr.yx(), rr.yy(), rr.yz(), tt.y(), rr.zx(), rr.zy(), rr.zz(), tt.z());
257  rtr.GetRotation(ea);
258  trVector.emplace_back(ea.Phi());
259  trVector.emplace_back(ea.Theta());
260  trVector.emplace_back(ea.Psi());
261  }
262  }
263  }
264 }
double getRin(int type) const
double getZHalf(int type) const
unsigned int totalGeomModules() const
virtual unsigned int numberOfTransformParms() const
std::vector< float > ParmVec
virtual unsigned int numberOfShapes() const
double getRout(int type) const
CaloCellGeometry::Tr3D Tr3D
const FastTimeDDDConstants & dddConstants() const
std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const override
Definition: DetId.h:17
AlgebraicVector EulerAngles
Definition: Definitions.h:34
const FastTimeTopology & topology() const
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
std::vector< DetId > m_validGeomIds
virtual unsigned int numberOfParametersPerShape() const

◆ getValidDetIds()

const std::vector<DetId>& FastTimeGeometry::getValidDetIds ( DetId::Detector  det = DetId::Detector(0),
int  subdet = 0 
) const
inlineoverridevirtual

Get a list of valid detector ids (for the given subdetector)

Note
The implementation in this class is relevant for SubdetectorGeometries which handle only a single subdetector at a time. It does not look at the det and subdet arguments.

Reimplemented from CaloSubdetectorGeometry.

Definition at line 71 of file FastTimeGeometry.h.

References CaloSubdetectorGeometry::m_validIds.

Referenced by FWRecoGeometryESProducer::addFTLGeometry().

71  {
72  return m_validIds;
73  }
std::vector< DetId > m_validIds

◆ getValidGeomDetIds()

const std::vector<DetId>& FastTimeGeometry::getValidGeomDetIds ( void  ) const
inline

Definition at line 74 of file FastTimeGeometry.h.

References m_validGeomIds.

74 { return m_validGeomIds; }
std::vector< DetId > m_validGeomIds

◆ indexFor()

unsigned int FastTimeGeometry::indexFor ( const DetId id) const
overrideprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 146 of file FastTimeGeometry.cc.

References TauDecayModes::dec, FastTimeTopology::detId2denseGeomId(), FastTimeDetId::geometryCell(), m_cellVec, DetId::rawId(), and topology().

146  {
147  unsigned int cellIndex = m_cellVec.size();
148  if (id != DetId()) {
149  DetId geoId = (DetId)(FastTimeDetId(id).geometryCell());
150  cellIndex = topology().detId2denseGeomId(geoId);
151 #ifdef EDM_ML_DEBUG
152  edm::LogVerbatim("FastTimeGeom") << "indexFor " << std::hex << id.rawId() << ":" << geoId.rawId() << std::dec
153  << " index " << cellIndex;
154 #endif
155  }
156  return cellIndex;
157 }
Log< level::Info, true > LogVerbatim
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
const FastTimeTopology & topology() const
virtual uint32_t detId2denseGeomId(const DetId &id) const
FastTimeDetId geometryCell() const
Definition: FastTimeDetId.h:32

◆ initializeParms()

void FastTimeGeometry::initializeParms ( )
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 34 of file FastTimeGeometry.cc.

34 {}

◆ localCorners()

void FastTimeGeometry::localCorners ( Pt3DVec lc,
const CCGFloat pv,
unsigned int  i,
Pt3D ref 
)

Definition at line 36 of file FastTimeGeometry.cc.

References FlatTrd::localCorners(), and MetAnalyzer::pv().

36  {
37  FlatTrd::localCorners(lc, pv, ref);
38 }
def pv(vc)
Definition: MetAnalyzer.py:7
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:153

◆ newCell()

void FastTimeGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
overridevirtual

Implements CaloSubdetectorGeometry.

Definition at line 40 of file FastTimeGeometry.cc.

References CaloSubdetectorGeometry::cornersMgr(), FastTimeTopology::dddConstants(), TauDecayModes::dec, FastTimeTopology::decode(), FastTimeTopology::encode(), DeadROC_duringRun::f1, DeadROC_duringRun::f2, FastTimeDetId::geometryCell(), m_cellVec, m_Type, m_validGeomIds, CaloSubdetectorGeometry::m_validIds, HLT_2022v12_cff::nPhi, FastTimeDDDConstants::numberEtaZ(), FastTimeDDDConstants::numberPhi(), phi, DetId::rawId(), topology(), and validateGeometry_cfg::valid.

41  {
43  DetId geomId = (DetId)(FastTimeDetId(detId).geometryCell());
44  int nEtaZ = topology().dddConstants().numberEtaZ(m_Type);
46 
47  const uint32_t cellIndex(topology().detId2denseGeomId(detId));
48 
49  m_cellVec.at(cellIndex) = FlatTrd(cornersMgr(), f1, f2, f3, parm);
50  m_validGeomIds.at(cellIndex) = geomId;
51 
52 #ifdef EDM_ML_DEBUG
53  unsigned int nOld = m_validIds.size();
54 #endif
55  for (int etaZ = 1; etaZ <= nEtaZ; ++etaZ) {
56  id.iEtaZ = etaZ;
57  for (int phi = 1; phi <= nPhi; ++phi) {
58  id.iPhi = phi;
59  DetId idc = topology().encode(id);
60  if (topology().valid(idc)) {
61  m_validIds.emplace_back(idc);
62  }
63  }
64  }
65 
66 #ifdef EDM_ML_DEBUG
67  edm::LogVerbatim("FastTimeGeom") << "FastTimeGeometry::newCell-> [" << cellIndex << "] front:" << f1.x() << '/'
68  << f1.y() << '/' << f1.z() << " back:" << f2.x() << '/' << f2.y() << '/' << f2.z()
69  << " eta|phi " << m_cellVec[cellIndex].etaPos() << ":"
70  << m_cellVec[cellIndex].phiPos() << " id:" << FastTimeDetId(detId)
71  << " with valid DetId from " << nOld << " to " << m_validIds.size();
72  edm::LogVerbatim("FastTimeGeom") << "Cell[" << cellIndex << "] " << std::hex << geomId.rawId() << ":"
73  << m_validGeomIds[cellIndex].rawId() << std::dec;
74 #endif
75 }
Log< level::Info, true > LogVerbatim
A base class to handle the particular shape of HGCal volumes.
Definition: FlatTrd.h:19
int numberEtaZ(int type) const
std::vector< DetId > m_validIds
const FastTimeDDDConstants & dddConstants() const
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CaloCellGeometry::CornersMgr * cornersMgr()
const FastTimeTopology & topology() const
DecodedDetId decode(const DetId &id) const
FastTimeDetId geometryCell() const
Definition: FastTimeDetId.h:32
std::vector< DetId > m_validGeomIds
DetId encode(const DecodedDetId &id_) const
int numberPhi(int type) const

◆ present()

bool FastTimeGeometry::present ( const DetId id) const
overridevirtual

is this detid present in the geometry?

Reimplemented from CaloSubdetectorGeometry.

Definition at line 86 of file FastTimeGeometry.cc.

References FastTimeDetId::geometryCell(), getGeometryRawPtr(), and topology().

86  {
87  if (id == DetId())
88  return false;
89  DetId geoId = (DetId)(FastTimeDetId(id).geometryCell());
90  const uint32_t index(topology().detId2denseGeomId(geoId));
91  return (nullptr != getGeometryRawPtr(index));
92 }
Definition: DetId.h:17
const FastTimeTopology & topology() const
FastTimeDetId geometryCell() const
Definition: FastTimeDetId.h:32
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override

◆ producerTag()

static std::string FastTimeGeometry::producerTag ( )
inlinestatic

Definition at line 90 of file FastTimeGeometry.h.

90 { return "FastTime"; }

◆ sizeForDenseIndex() [1/2]

unsigned int CaloSubdetectorGeometry::sizeForDenseIndex
protected

Definition at line 256 of file CaloSubdetectorGeometry.cc.

256  {
258 }
uint32_t sizeForDenseIndexing() const

◆ sizeForDenseIndex() [2/2]

unsigned int FastTimeGeometry::sizeForDenseIndex ( ) const
protected

Definition at line 159 of file FastTimeGeometry.cc.

References topology(), and FastTimeTopology::totalGeomModules().

159 { return topology().totalGeomModules(); }
unsigned int totalGeomModules() const
const FastTimeTopology & topology() const

◆ sortDetIds()

void FastTimeGeometry::sortDetIds ( void  )

Definition at line 203 of file FastTimeGeometry.cc.

References CaloSubdetectorGeometry::m_validIds, and jetUpdater_cfi::sort.

203  {
204  m_validIds.shrink_to_fit();
205  std::sort(m_validIds.begin(), m_validIds.end(), rawIdSort());
206 }
std::vector< DetId > m_validIds

◆ topology()

const FastTimeTopology& FastTimeGeometry::topology ( ) const
inline

Member Data Documentation

◆ m_cellVec

CellVec FastTimeGeometry::m_cellVec
private

Definition at line 112 of file FastTimeGeometry.h.

Referenced by cellGeomPtr(), getGeometryRawPtr(), indexFor(), and newCell().

◆ m_subdet

ForwardSubdetector FastTimeGeometry::m_subdet
private

Definition at line 115 of file FastTimeGeometry.h.

◆ m_topology

const FastTimeTopology& FastTimeGeometry::m_topology
private

Definition at line 110 of file FastTimeGeometry.h.

Referenced by topology().

◆ m_Type

int FastTimeGeometry::m_Type
private

◆ m_validGeomIds

std::vector<DetId> FastTimeGeometry::m_validGeomIds
private

Definition at line 113 of file FastTimeGeometry.h.

Referenced by cellGeomPtr(), getSummary(), getValidGeomDetIds(), and newCell().