00001 #ifndef TrackAssociator_PreshowerDetIdAssociator_h 00002 #define TrackAssociator_PreshowerDetIdAssociator_h 1 00003 // -*- C++ -*- 00004 // 00005 // Package: TrackAssociator 00006 // Class: PreshowerDetIdAssociator 00007 // 00008 /* 00009 00010 Description: <one line class summary> 00011 00012 Implementation: 00013 <Notes on implementation> 00014 */ 00015 // 00016 // Original Author: Dmytro Kovalskyi 00017 // $Id: PreshowerDetIdAssociator.h,v 1.4 2010/02/18 14:35:48 dmytro Exp $ 00018 // 00019 // 00020 00021 #include "TrackingTools/TrackAssociator/interface/CaloDetIdAssociator.h" 00022 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" 00023 00024 class PreshowerDetIdAssociator: public CaloDetIdAssociator{ 00025 public: 00026 PreshowerDetIdAssociator():CaloDetIdAssociator(30,60,0.1){}; 00027 00028 PreshowerDetIdAssociator(const edm::ParameterSet& pSet):CaloDetIdAssociator(pSet){}; 00029 00030 virtual const char* name() const { return "Preshower"; } 00031 protected: 00032 00033 virtual const std::vector<DetId>& getValidDetIds(unsigned int subDetectorIndex) const { 00034 if ( subDetectorIndex != 0 ) throw cms::Exception("FatalError") << "Preshower has only one sub-detector for geometry. Abort."; 00035 return geometry_->getValidDetIds(DetId::Ecal, EcalPreshower); 00036 }; 00037 00038 }; 00039 #endif