File indexing completed on 2024-09-07 04:38:13
0001 #ifndef TrackAssociator_PreshowerDetIdAssociator_h
0002 #define TrackAssociator_PreshowerDetIdAssociator_h 1
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include "CaloDetIdAssociator.h"
0021 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
0022
0023 class PreshowerDetIdAssociator : public CaloDetIdAssociator {
0024 public:
0025 PreshowerDetIdAssociator() : CaloDetIdAssociator(30, 60, 0.1, nullptr) {}
0026
0027 using CaloDetIdAssociator::CaloDetIdAssociator;
0028
0029 const char* name() const override { return "Preshower"; }
0030
0031 protected:
0032 void getValidDetIds(unsigned int subDetectorIndex, std::vector<DetId>& validIds) const override {
0033 if (subDetectorIndex != 0)
0034 throw cms::Exception("FatalError") << "Preshower has only one sub-detector for geometry. Abort.";
0035 validIds = geometry_->getValidDetIds(DetId::Ecal, EcalPreshower);
0036 };
0037 };
0038 #endif