Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:38:13

0001 #ifndef TrackAssociator_EcalDetIdAssociator_h
0002 #define TrackAssociator_EcalDetIdAssociator_h 1
0003 // -*- C++ -*-
0004 //
0005 // Package:    TrackAssociator
0006 // Class:      EcalDetIdAssociator
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 "CaloDetIdAssociator.h"
0022 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
0023 class EcalDetIdAssociator : public CaloDetIdAssociator {
0024 public:
0025   EcalDetIdAssociator() : CaloDetIdAssociator(360, 300, 0.02, nullptr) {}
0026 
0027   using CaloDetIdAssociator::CaloDetIdAssociator;
0028 
0029   const char* name() const override { return "ECAL"; }
0030 
0031 protected:
0032   const unsigned int getNumberOfSubdetectors() const override { return 2; }
0033   void getValidDetIds(unsigned int subDetectorIndex, std::vector<DetId>& validIds) const override {
0034     if (subDetectorIndex == 0)
0035       validIds = geometry_->getValidDetIds(DetId::Ecal, EcalBarrel);  //EB
0036     else
0037       validIds = geometry_->getValidDetIds(DetId::Ecal, EcalEndcap);  //EE
0038   };
0039 };
0040 #endif