CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: CaloDetIdAssociator.h,v 1.1 2011/04/07 09:12:02 innocent Exp $
19 //
20 //
21 
28 
32 
34  public:
36  CaloDetIdAssociator(const int nPhi, const int nEta, const double etaBinSize)
37  :DetIdAssociator(nPhi, nEta, etaBinSize),geometry_(0){};
38 
40  :DetIdAssociator(pSet.getParameter<int>("nPhi"),pSet.getParameter<int>("nEta"),pSet.getParameter<double>("etaBinSize")),geometry_(0){};
41 
42  virtual void setGeometry(const CaloGeometry* ptr){ geometry_ = ptr; };
43 
44  virtual void setGeometry(const DetIdAssociatorRecord& iRecord);
45 
46  virtual const GeomDet* getGeomDet(const DetId& id) const { return 0; };
47 
48  virtual const char* name() const { return "CaloTowers"; }
49 
50  protected:
51  virtual void check_setup() const;
52 
53  virtual GlobalPoint getPosition(const DetId& id) const;
54 
55  virtual const std::vector<DetId>& getValidDetIds( unsigned int subDetectorIndex ) const;
56 
57  virtual std::pair<const_iterator, const_iterator> getDetIdPoints(const DetId& id) const;
58 
59  virtual bool insideElement(const GlobalPoint& point, const DetId& id) const {
60  return geometry_->getSubdetectorGeometry(id)->getGeometry(id)->inside(point);
61  };
62 
63  virtual bool crossedElement(const GlobalPoint&,
64  const GlobalPoint&,
65  const DetId& id,
66  const double tolerance = -1,
67  const SteppingHelixStateInfo* = 0 ) const;
69  std::vector<GlobalPoint> dummy_;
70 };
71 #endif
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:43
virtual bool insideElement(const GlobalPoint &point, const DetId &id) const
double etaBinSize() const
look-up map bin size in eta dimension
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
virtual GlobalPoint getPosition(const DetId &id) const
CaloDetIdAssociator(const int nPhi, const int nEta, const double etaBinSize)
virtual std::pair< const_iterator, const_iterator > getDetIdPoints(const DetId &id) const
std::vector< GlobalPoint > dummy_
virtual void check_setup() const
const CaloGeometry * geometry_
Definition: DetId.h:20
bool inside(const GlobalPoint &point) const
Returns true if the specified point is inside this cell.
CaloDetIdAssociator(const edm::ParameterSet &pSet)
virtual bool crossedElement(const GlobalPoint &, const GlobalPoint &, const DetId &id, const double tolerance=-1, const SteppingHelixStateInfo *=0) const
virtual const GeomDet * getGeomDet(const DetId &id) const
virtual void setGeometry(const CaloGeometry *ptr)
virtual const char * name() const
*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
virtual const std::vector< DetId > & getValidDetIds(unsigned int subDetectorIndex) const