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
 
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

Definition at line 37 of file FastTimeGeometry.h.

Definition at line 30 of file FastTimeGeometry.h.

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

Definition at line 28 of file FastTimeGeometry.h.

Definition at line 35 of file FastTimeGeometry.h.

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

Definition at line 34 of file FastTimeGeometry.h.

Definition at line 38 of file FastTimeGeometry.h.

Definition at line 31 of file FastTimeGeometry.h.

Definition at line 32 of file FastTimeGeometry.h.

Member Enumeration Documentation

anonymous enum
Enumerator
k_NumberOfParametersPerShape 

Definition at line 40 of file FastTimeGeometry.h.

anonymous enum
Enumerator
k_NumberOfShapes 

Definition at line 41 of file FastTimeGeometry.h.

Constructor & Destructor Documentation

FastTimeGeometry::FastTimeGeometry ( const FastTimeTopology topology)

Definition at line 15 of file FastTimeGeometry.cc.

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

Referenced by dbString().

16  : m_topology(topology_),
17  m_cellVec(topology_.totalGeomModules()),
18  m_validGeomIds(topology_.totalGeomModules()),
19  m_Type(topology_.detectorType()),
20  m_subdet(topology_.subDetector()) {
21 
22  m_validIds.reserve(topology().totalModules());
23 #ifdef EDM_ML_DEBUG
24  std::cout << "Expected total # of Geometry Modules "
25  << topology().totalGeomModules() << std::endl;
26 #endif
27 }
unsigned int totalGeomModules() const
const FastTimeTopology & topology() const
std::vector< DetId > m_validIds
ForwardSubdetector m_subdet
std::vector< DetId > m_validGeomIds
const FastTimeTopology & m_topology
FastTimeGeometry::~FastTimeGeometry ( )
override

Definition at line 29 of file FastTimeGeometry.cc.

Referenced by dbString().

29 { }

Member Function Documentation

void FastTimeGeometry::addValidID ( const DetId id)
protected

Definition at line 198 of file FastTimeGeometry.cc.

References a, b, and DetId::rawId().

Referenced by topology().

198  {
199  edm::LogError("FastTimeGeom") << "FastTimeGeometry::addValidID is not implemented";
200 }
std::string FastTimeGeometry::cellElement ( ) const

Definition at line 146 of file FastTimeGeometry.cc.

References m_Type.

Referenced by producerTag().

146  {
147  if (m_Type == 1) return "FastTimeBarrel";
148  else if (m_Type == 2) return "FastTimeEndcap";
149  else return "Unknown";
150 }
std::shared_ptr< const CaloCellGeometry > FastTimeGeometry::cellGeomPtr ( uint32_t  index) const
overrideprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 176 of file FastTimeGeometry.cc.

References m_cellVec, and m_validGeomIds.

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

176  {
177  if ((index >= m_cellVec.size()) || (m_validGeomIds[index].rawId() == 0))
178  return nullptr;
179  static const auto do_not_delete = [](const void*){};
180  auto cell = std::shared_ptr<const CaloCellGeometry>(&m_cellVec[index],do_not_delete);
181  if (nullptr == cell->param()) return nullptr;
182  return cell;
183 }
std::vector< DetId > m_validGeomIds
std::shared_ptr< const CaloCellGeometry > FastTimeGeometry::cellGeomPtr ( uint32_t  index,
const GlobalPoint p 
) const
private

Definition at line 185 of file FastTimeGeometry.cc.

References cellGeomPtr(), m_cellVec, and m_validGeomIds.

185  {
186  if ((index >= m_cellVec.size()) || (m_validGeomIds[index].rawId() == 0))
187  return nullptr;
188  if (pos == GlobalPoint()) return cellGeomPtr(index);
189  auto cell = std::make_shared<FlatTrd>(m_cellVec[index]);
190  cell->setPosition(pos);
191 #ifdef EDM_ML_DEBUG
192 //std::cout << "cellGeomPtr " << newcell << ":" << cell << std::endl;
193 #endif
194  if (nullptr == cell->param()) return nullptr;
195  return cell;
196 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const override
std::vector< DetId > m_validGeomIds
static std::string FastTimeGeometry::dbString ( )
inlinestatic
void FastTimeGeometry::fillNamedParams ( DDFilteredView  fv)
virtual

Definition at line 31 of file FastTimeGeometry.cc.

Referenced by getValidGeomDetIds().

31 {}
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 141 of file FastTimeGeometry.cc.

Referenced by getValidGeomDetIds().

141  {
143  return dss;
144 }
std::set< DetId > DetIdSet
DetId FastTimeGeometry::getClosestCell ( const GlobalPoint r) const
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 121 of file FastTimeGeometry.cc.

References gather_cfg::cout, FastTimeTopology::dddConstants(), FastTimeDDDConstants::getEtaPhi(), FastTimeDDDConstants::getZPhi(), m_Type, PV3DBase< T, PVType, FrameType >::perp(), phi, PV3DBase< T, PVType, FrameType >::phi(), topology(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), ecaldqm::zside(), and geometryCSVtoXML::zz.

Referenced by getValidGeomDetIds().

121  {
122  int zside = (r.z() > 0) ? 1 : -1;
123  std::pair<int,int> etaZPhi;
124  if (m_Type == 1) {
125  double zz = (zside > 0) ? r.z() : -r.z();
126  etaZPhi = topology().dddConstants().getZPhi(zz,r.phi());
127  } else {
128  double phi = (zside > 0) ? r.phi() : atan2(r.y(),-r.x());
129  etaZPhi = topology().dddConstants().getEtaPhi(r.perp(),phi);
130  }
131  FastTimeDetId id = FastTimeDetId(m_Type,etaZPhi.first,etaZPhi.second,zside);
132 #ifdef EDM_ML_DEBUG
133  std::cout << "getClosestCell: for (" << r.x() << ", " << r.y() << ", "
134  << r.z() << ") Id " << id.type() << ":" << id.zside() << ":"
135  << id.ieta() << ":" << id.iphi() << std::endl;
136 #endif
137 
138  return (topology().valid(id) ? DetId(id) : DetId());
139 }
T perp() const
Definition: PV3DBase.h:72
std::pair< int, int > getEtaPhi(double r, double phi) const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const FastTimeTopology & topology() const
T y() const
Definition: PV3DBase.h:63
int zside(DetId const &)
std::pair< int, int > getZPhi(double z, double phi) const
T z() const
Definition: PV3DBase.h:64
Definition: DetId.h:18
T x() const
Definition: PV3DBase.h:62
const FastTimeDDDConstants & dddConstants() const
FastTimeGeometry::CornersVec FastTimeGeometry::getCorners ( const DetId id) const

Returns the corner points of this cell's volume.

Definition at line 110 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(), and dbString().

110  {
111 
112  FastTimeDetId id_ = FastTimeDetId(id);
113  auto corners = topology().dddConstants().getCorners(m_Type,id_.ieta(),id_.iphi(),id_.zside());
115  for( const auto& corner : corners ) {
116  out.emplace_back(0.1*corner.x(),0.1*corner.y(),0.1*corner.z());
117  }
118  return out;
119 }
int ieta() const
get the absolute value of the cell #&#39;s along x-axis (EC) | z-axis (Barel)
Definition: FastTimeDetId.h:42
std::vector< GlobalPoint > CornersVec
const FastTimeTopology & topology() const
int iphi() const
get the absolute value of the cell #&#39;s along y-axis (EC) | phi (Barrel)
Definition: FastTimeDetId.h:46
int zside() const
get the z-side of the cell (1/-1)
Definition: FastTimeDetId.h:49
std::vector< GlobalPoint > getCorners(int type, int izeta, int iphi, int zside) const
const FastTimeDDDConstants & dddConstants() const
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 87 of file FastTimeGeometry.cc.

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

Referenced by dbString(), and ftl::RecHitTools::getCorners().

87  {
88 
89  if (id == DetId()) return nullptr; // nothing to get
90  DetId geoId = (DetId)(FastTimeDetId(id).geometryCell());
91  const uint32_t cellIndex (topology().detId2denseGeomId(geoId));
92  const GlobalPoint pos = (id != geoId) ? getPosition(id) : GlobalPoint();
93  return cellGeomPtr (cellIndex, pos);
94 }
FastTimeDetId geometryCell() const
Definition: FastTimeDetId.h:33
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const FastTimeTopology & topology() const
GlobalPoint getPosition(const DetId &id) const
Definition: DetId.h:18
std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const override
const CaloCellGeometry * FastTimeGeometry::getGeometryRawPtr ( uint32_t  index) const
overrideprotectedvirtual

Implements CaloSubdetectorGeometry.

Definition at line 169 of file FastTimeGeometry.cc.

References m_cellVec, and CaloCellGeometry::param().

Referenced by present(), and topology().

169  {
170  // Modify the RawPtr class
171  const CaloCellGeometry* cell(&m_cellVec[index]);
172  return (m_cellVec.size() < index ||
173  nullptr == cell->param() ? nullptr : cell);
174 }
GlobalPoint FastTimeGeometry::getPosition ( const DetId id) const

Definition at line 103 of file FastTimeGeometry.cc.

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

Referenced by dbString(), and getGeometry().

103  {
104 
105  FastTimeDetId id_ = FastTimeDetId(id);
106  auto pos = topology().dddConstants().getPosition(m_Type,id_.ieta(),id_.iphi(),id_.zside());
107  return GlobalPoint(0.1*pos.x(),0.1*pos.y(),0.1*pos.z());
108 }
int ieta() const
get the absolute value of the cell #&#39;s along x-axis (EC) | z-axis (Barel)
Definition: FastTimeDetId.h:42
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const FastTimeTopology & topology() const
int iphi() const
get the absolute value of the cell #&#39;s along y-axis (EC) | phi (Barrel)
Definition: FastTimeDetId.h:46
int zside() const
get the z-side of the cell (1/-1)
Definition: FastTimeDetId.h:49
GlobalPoint getPosition(int type, int izeta, int iphi, int zside) const
const FastTimeDDDConstants & dddConstants() const
void FastTimeGeometry::getSummary ( CaloSubdetectorGeometry::TrVec trVector,
CaloSubdetectorGeometry::IVec iVector,
CaloSubdetectorGeometry::DimVec dimVector,
CaloSubdetectorGeometry::IVec dinsVector 
) const
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 217 of file FastTimeGeometry.cc.

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

Referenced by dbString().

220  {
221 
222  unsigned int numberOfCells = topology().totalGeomModules(); // total Geom Modules both sides
225 
226  trVector.reserve( numberOfCells * numberOfTransformParms());
227  iVector.reserve( numberOfCells );
228  dimVector.reserve( numberOfShapes * numberOfParametersPerShape );
229  dinsVector.reserve( numberOfCells );
230 
231  for (unsigned int k=0; k <topology().totalGeomModules(); ++k) {
233  params[0] = topology().dddConstants().getZHalf(m_Type);
234  params[1] = params[2] = 0;
235  params[3] = params[7] = topology().dddConstants().getRin(m_Type);
236  params[4] = params[8] = topology().dddConstants().getRout(m_Type);
237  params[5] = params[9] = topology().dddConstants().getRout(m_Type);
238  params[6] = params[10]= 0;
239  params[11]= (k == 0) ? 1.0 : -1.0;
240  dimVector.insert( dimVector.end(), params.begin(), params.end());
241  }
242 
243  for (unsigned int i( 0 ); i < numberOfCells; ++i) {
244  DetId detId = m_validGeomIds[i];
245  dinsVector.emplace_back( topology().detId2denseGeomId( detId ));
246  iVector.emplace_back(1);
247 
248  Tr3D tr;
249  auto ptr( cellGeomPtr( i ));
250  if ( nullptr != ptr ) {
251  ptr->getTransform( tr, ( Pt3DVec* ) nullptr );
252 
253  if( Tr3D() == tr ) { // there is no rotation
254  const GlobalPoint& gp( ptr->getPosition());
255  tr = HepGeom::Translate3D( gp.x(), gp.y(), gp.z());
256  }
257 
258  const CLHEP::Hep3Vector tt( tr.getTranslation());
259  trVector.emplace_back( tt.x());
260  trVector.emplace_back( tt.y());
261  trVector.emplace_back( tt.z());
262  if (6 == numberOfTransformParms()) {
263  const CLHEP::HepRotation rr( tr.getRotation());
264  const ROOT::Math::Transform3D rtr( rr.xx(), rr.xy(), rr.xz(), tt.x(),
265  rr.yx(), rr.yy(), rr.yz(), tt.y(),
266  rr.zx(), rr.zy(), rr.zz(), tt.z());
268  rtr.GetRotation( ea );
269  trVector.emplace_back( ea.Phi());
270  trVector.emplace_back( ea.Theta());
271  trVector.emplace_back( ea.Psi());
272  }
273  }
274  }
275 }
unsigned int totalGeomModules() const
virtual unsigned int numberOfParametersPerShape() const
const FastTimeTopology & topology() const
std::vector< float > ParmVec
CaloCellGeometry::Tr3D Tr3D
virtual unsigned int numberOfShapes() const
int k[5][pyjets_maxn]
Definition: DetId.h:18
AlgebraicVector EulerAngles
Definition: Definitions.h:36
double getRin(int type) const
CaloCellGeometry::Pt3DVec Pt3DVec
CaloCellGeometry::Tr3D Tr3D
double getRout(int type) const
double getZHalf(int type) const
std::shared_ptr< const CaloCellGeometry > cellGeomPtr(uint32_t index) const override
virtual unsigned int numberOfTransformParms() const
const FastTimeDDDConstants & dddConstants() const
std::vector< DetId > m_validGeomIds
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 76 of file FastTimeGeometry.h.

References CaloSubdetectorGeometry::m_validIds.

Referenced by FWRecoGeometryESProducer::addFTLGeometry().

76 { return m_validIds; }
std::vector< DetId > m_validIds
const std::vector<DetId>& FastTimeGeometry::getValidGeomDetIds ( void  ) const
inline
unsigned int FastTimeGeometry::indexFor ( const DetId id) const
overrideprotectedvirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 152 of file FastTimeGeometry.cc.

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

Referenced by topology().

152  {
153  unsigned int cellIndex = m_cellVec.size();
154  if (id != DetId()) {
155  DetId geoId = (DetId)(FastTimeDetId(id).geometryCell());
156  cellIndex = topology().detId2denseGeomId(geoId);
157 #ifdef EDM_ML_DEBUG
158  std::cout << "indexFor " << std::hex << id.rawId() << ":" << geoId.rawId()
159  << std::dec << " index " << cellIndex << std::endl;
160 #endif
161  }
162  return cellIndex;
163 }
FastTimeDetId geometryCell() const
Definition: FastTimeDetId.h:33
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
const FastTimeTopology & topology() const
virtual uint32_t detId2denseGeomId(const DetId &id) const
Definition: DetId.h:18
void FastTimeGeometry::initializeParms ( )
overridevirtual

Reimplemented from CaloSubdetectorGeometry.

Definition at line 33 of file FastTimeGeometry.cc.

Referenced by getValidGeomDetIds().

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

Definition at line 36 of file FastTimeGeometry.cc.

References FlatTrd::localCorners().

Referenced by dbString().

39  {
40  FlatTrd::localCorners( lc, pv, ref ) ;
41 }
def pv(vc)
Definition: MetAnalyzer.py:7
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:175
void FastTimeGeometry::newCell ( const GlobalPoint f1,
const GlobalPoint f2,
const GlobalPoint f3,
const CCGFloat parm,
const DetId detId 
)
overridevirtual

Implements CaloSubdetectorGeometry.

Definition at line 43 of file FastTimeGeometry.cc.

References CaloSubdetectorGeometry::cornersMgr(), gather_cfg::cout, FastTimeTopology::dddConstants(), TauDecayModes::dec, FastTimeTopology::decode(), FastTimeTopology::encode(), FastTimeDetId::geometryCell(), m_cellVec, m_Type, m_validGeomIds, CaloSubdetectorGeometry::m_validIds, DetIdAssociatorESProducer_cff::nPhi, FastTimeDDDConstants::numberEtaZ(), FastTimeDDDConstants::numberPhi(), phi, DetId::rawId(), topology(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by FastTimeGeometryLoader::buildGeom(), and dbString().

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

is this detid present in the geometry?

Reimplemented from CaloSubdetectorGeometry.

Definition at line 96 of file FastTimeGeometry.cc.

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

Referenced by dbString().

96  {
97  if (id == DetId()) return false;
98  DetId geoId = (DetId)(FastTimeDetId(id).geometryCell());
99  const uint32_t index(topology().detId2denseGeomId(geoId));
100  return (nullptr != getGeometryRawPtr(index)) ;
101 }
FastTimeDetId geometryCell() const
Definition: FastTimeDetId.h:33
const FastTimeTopology & topology() const
Definition: DetId.h:18
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
static std::string FastTimeGeometry::producerTag ( )
inlinestatic

Definition at line 93 of file FastTimeGeometry.h.

References cellElement(), and AlCaHLTBitMon_QueryRunRegistry::string.

93 { return "FastTime" ; }
unsigned int FastTimeGeometry::sizeForDenseIndex ( ) const
protected

Definition at line 165 of file FastTimeGeometry.cc.

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

Referenced by topology().

165  {
166  return topology().totalGeomModules();
167 }
unsigned int totalGeomModules() const
const FastTimeTopology & topology() const
void FastTimeGeometry::sortDetIds ( void  )

Definition at line 212 of file FastTimeGeometry.cc.

References CaloSubdetectorGeometry::m_validIds.

Referenced by FastTimeGeometryLoader::build(), and topology().

212  {
213  m_validIds.shrink_to_fit();
214  std::sort( m_validIds.begin(), m_validIds.end(), rawIdSort());
215 }
std::vector< DetId > m_validIds
const FastTimeTopology& FastTimeGeometry::topology ( ) const
inline

Member Data Documentation

CellVec FastTimeGeometry::m_cellVec
private

Definition at line 117 of file FastTimeGeometry.h.

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

ForwardSubdetector FastTimeGeometry::m_subdet
private

Definition at line 120 of file FastTimeGeometry.h.

const FastTimeTopology& FastTimeGeometry::m_topology
private

Definition at line 115 of file FastTimeGeometry.h.

Referenced by topology().

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

Definition at line 118 of file FastTimeGeometry.h.

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