Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:35:06

0001 #ifndef HTrackAssociator_HEcalDetIdAssociator_h
0002 #define HTrackAssociator_HEcalDetIdAssociator_h 1
0003 // -*- C++ -*-
0004 //
0005 // Package:    HTrackAssociator
0006 // Class:      HEcalDetIdAssociator
0007 //
0008 /*
0009 
0010  Description: <one line class summary>
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 //
0016 // Original Author:  Dmytro Kovalskyi
0017 // Modified for ECAL+HCAL by Michal Szleper
0018 //
0019 
0020 #include "Calibration/Tools/interface/CaloDetIdAssociator.h"
0021 
0022 class HEcalDetIdAssociator : public HCaloDetIdAssociator {
0023 public:
0024   HEcalDetIdAssociator() : HCaloDetIdAssociator(180, 150, 0.04){};
0025 
0026 protected:
0027   std::set<DetId> getASetOfValidDetIds() override {
0028     std::set<DetId> setOfValidIds;
0029     const std::vector<DetId>& vectOfValidIds = geometry_->getValidDetIds(DetId::Ecal, 1);  //EB
0030     for (std::vector<DetId>::const_iterator it = vectOfValidIds.begin(); it != vectOfValidIds.end(); ++it)
0031       setOfValidIds.insert(*it);
0032 
0033     //      vectOfValidIds.clear();
0034     const std::vector<DetId>& vectOfValidIdsEE = geometry_->getValidDetIds(DetId::Ecal, 2);  //EE
0035     for (std::vector<DetId>::const_iterator it = vectOfValidIdsEE.begin(); it != vectOfValidIdsEE.end(); ++it)
0036       setOfValidIds.insert(*it);
0037 
0038     return setOfValidIds;
0039   }
0040 };
0041 #endif