CMS 3D CMS Logo

CaloDetIdAssociator.h
Go to the documentation of this file.
1 #ifndef TrackAssociator_CaloDetIdAssociator_h
2 #define TrackAssociator_CaloDetIdAssociator_h 1
3 // -*- C++ -*-
4 //
5 // Package: TrackAssociator
6 // Class: CaloDetIdAssociator
7 //
8 /*
9 
10  Description: <one line class summary>
11 
12  Implementation:
13  <Notes on implementation>
14 */
15 //
16 // Original Author: Dmytro Kovalskyi
17 // Created: Fri Apr 21 10:59:41 PDT 2006
18 //
19 //
20 
27 
31 
33  public:
35  CaloDetIdAssociator(const int nPhi, const int nEta, const double etaBinSize)
36  :DetIdAssociator(nPhi, nEta, etaBinSize),geometry_(nullptr){};
37 
39  :DetIdAssociator(pSet.getParameter<int>("nPhi"),pSet.getParameter<int>("nEta"),pSet.getParameter<double>("etaBinSize")),geometry_(nullptr){};
40 
41  virtual void setGeometry(const CaloGeometry* ptr) { geometry_ = ptr; };
42 
43  void setGeometry(const DetIdAssociatorRecord& iRecord) override;
44 
45  const GeomDet* getGeomDet(const DetId& id) const override { return nullptr; };
46 
47  const char* name() const override { return "CaloTowers"; }
48 
49  protected:
50  void check_setup() const override;
51 
52  GlobalPoint getPosition(const DetId& id) const override;
53 
54  void getValidDetIds( unsigned int subDetectorIndex, std::vector<DetId>& ) const override;
55 
56  std::pair<const_iterator, const_iterator> getDetIdPoints(const DetId& id, std::vector<GlobalPoint>& points) const override;
57 
58  bool insideElement(const GlobalPoint& point, const DetId& id) const override{
59  return geometry_->getSubdetectorGeometry(id)->getGeometry(id)->inside(point);
60  };
61 
62  bool crossedElement(const GlobalPoint&,
63  const GlobalPoint&,
64  const DetId& id,
65  const double tolerance = -1,
66  const SteppingHelixStateInfo* = nullptr ) const override;
68  std::vector<GlobalPoint> dummy_;
69 };
70 #endif
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:49
void check_setup() const override
bool crossedElement(const GlobalPoint &, const GlobalPoint &, const DetId &id, const double tolerance=-1, const SteppingHelixStateInfo *=0) const override
void getValidDetIds(unsigned int subDetectorIndex, std::vector< DetId > &) const override
const double tolerance
const char * name() const override
#define nullptr
double etaBinSize() const
look-up map bin size in eta dimension
const GeomDet * getGeomDet(const DetId &id) const override
bool insideElement(const GlobalPoint &point, const DetId &id) const override
CaloDetIdAssociator(const int nPhi, const int nEta, const double etaBinSize)
GlobalPoint getPosition(const DetId &id) const override
std::vector< GlobalPoint > dummy_
const CaloGeometry * geometry_
Definition: DetId.h:18
std::pair< const_iterator, const_iterator > getDetIdPoints(const DetId &id, std::vector< GlobalPoint > &points) const override
CaloDetIdAssociator(const edm::ParameterSet &pSet)
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
virtual void setGeometry(const CaloGeometry *ptr)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5