File indexing completed on 2024-04-06 12:30:10
0001 #ifndef SimG4CMS_Muon_MuonSlaveSD_h
0002 #define SimG4CMS_Muon_MuonSlaveSD_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "SimG4Core/Notification/interface/Observer.h"
0016 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0017 #include "SimDataFormats/SimHitMaker/interface/TrackingSlaveSD.h"
0018
0019 #include <string>
0020
0021 class EndOfEvent;
0022 class EventAction;
0023 class MuonSubDetector;
0024 class SimTrackManager;
0025
0026 class MuonSlaveSD : public TrackingSlaveSD {
0027 public:
0028 typedef std::vector<PSimHit> Collection;
0029 typedef Collection::const_iterator const_iterator;
0030 MuonSlaveSD(MuonSubDetector*, const SimTrackManager*);
0031 ~MuonSlaveSD() override;
0032 virtual void clearHits();
0033 bool format() override;
0034 const_iterator begin() override { return hits_.begin(); }
0035 const_iterator end() override { return hits_.end(); }
0036
0037 protected:
0038 Collection hits_;
0039
0040 private:
0041 MuonSubDetector* detector;
0042
0043 const SimTrackManager* m_trackManager;
0044 };
0045
0046 class FormatBarrelHits {
0047 public:
0048 bool operator()(const PSimHit& a, const PSimHit& b);
0049 int sortId(const PSimHit& a) const;
0050 };
0051
0052 class FormatEndcapHits {
0053 public:
0054 bool operator()(const PSimHit& a, const PSimHit& b);
0055 int sortId(const PSimHit& a) const;
0056 };
0057
0058 class FormatRpcHits {
0059 public:
0060 bool operator()(const PSimHit& a, const PSimHit& b);
0061 int sortId(const PSimHit& a) const;
0062 };
0063
0064 class FormatGemHits {
0065 public:
0066 bool operator()(const PSimHit& a, const PSimHit& b);
0067 int sortId(const PSimHit& a) const;
0068 };
0069
0070 class FormatMe0Hits {
0071 public:
0072 bool operator()(const PSimHit& a, const PSimHit& b);
0073 int sortId(const PSimHit& a) const;
0074 };
0075
0076 #endif