Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:44

0001 #ifndef TrackAssociator_MuonDetIdAssociator_h
0002 #define TrackAssociator_MuonDetIdAssociator_h 1
0003 // -*- C++ -*-
0004 //
0005 // Package:    TrackAssociator
0006 // Class:      MuonDetIdAssociator
0007 //
0008 /*
0009 
0010  Description: <one line class summary>
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 //
0016 // Original Author:  Dmytro Kovalskyi
0017 //         Created:  Fri Apr 21 10:59:41 PDT 2006
0018 //
0019 //
0020 
0021 #include "TrackingTools/TrackAssociator/interface/DetIdAssociator.h"
0022 #include "TrackingTools/TrackAssociator/interface/TAMuonChamberMatch.h"
0023 #include "TrackPropagation/SteppingHelixPropagator/interface/SteppingHelixStateInfo.h"
0024 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0025 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0026 #include "DataFormats/DetId/interface/DetId.h"
0027 #include "CondFormats/CSCObjects/interface/CSCBadChambers.h"
0028 
0029 class MuonDetIdAssociator : public DetIdAssociator {
0030 public:
0031   MuonDetIdAssociator()
0032       : DetIdAssociator(48, 48, 0.125), geometry_(nullptr), cscbadchambers_(nullptr), includeBadChambers_(false){};
0033   MuonDetIdAssociator(const int nPhi, const int nEta, const double etaBinSize)
0034       : DetIdAssociator(nPhi, nEta, etaBinSize),
0035         geometry_(nullptr),
0036         cscbadchambers_(nullptr),
0037         includeBadChambers_(false){};
0038 
0039   MuonDetIdAssociator(int nPhi,
0040                       int nEta,
0041                       double etaBinSize,
0042                       const GlobalTrackingGeometry* geom,
0043                       const CSCBadChambers* badChambers,
0044                       bool includeBadChambers,
0045                       bool includeGEM,
0046                       bool includeME0)
0047       : DetIdAssociator(nPhi, nEta, etaBinSize),
0048         geometry_(geom),
0049         cscbadchambers_(badChambers),
0050         includeBadChambers_(includeBadChambers),
0051         includeGEM_(includeGEM),
0052         includeME0_(includeME0){};
0053 
0054   virtual void setGeometry(const GlobalTrackingGeometry* ptr) { geometry_ = ptr; }
0055 
0056   virtual void setCSCBadChambers(const CSCBadChambers* ptr) { cscbadchambers_ = ptr; }
0057 
0058   const GeomDet* getGeomDet(const DetId& id) const override;
0059 
0060   const char* name() const override { return "AllMuonDetectors"; }
0061 
0062 protected:
0063   void check_setup() const override;
0064 
0065   GlobalPoint getPosition(const DetId& id) const override;
0066 
0067   void getValidDetIds(unsigned int, std::vector<DetId>&) const override;
0068 
0069   std::pair<const_iterator, const_iterator> getDetIdPoints(const DetId& id,
0070                                                            std::vector<GlobalPoint>& points) const override;
0071 
0072   bool insideElement(const GlobalPoint& point, const DetId& id) const override;
0073 
0074   const GlobalTrackingGeometry* geometry_;
0075 
0076   const CSCBadChambers* cscbadchambers_;
0077   bool includeBadChambers_;
0078   bool includeGEM_;
0079   bool includeME0_;
0080 };
0081 #endif