CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes | Private Attributes
MuonSlaveSD Class Reference

#include <MuonSlaveSD.h>

Inheritance diagram for MuonSlaveSD:
TrackingSlaveSD

Public Types

typedef std::vector< PSimHitCollection
 
typedef Collection::const_iterator const_iterator
 
- Public Types inherited from TrackingSlaveSD
typedef std::vector< PSimHitCollection
 
typedef Collection::const_iterator const_iterator
 

Public Member Functions

const_iterator begin () override
 
virtual void clearHits ()
 
const_iterator end () override
 
bool format () override
 
 MuonSlaveSD (MuonSubDetector *, const SimTrackManager *)
 
 ~MuonSlaveSD () override
 
- Public Member Functions inherited from TrackingSlaveSD
std::vector< PSimHit > & hits ()
 
virtual void Initialize ()
 
std::string name () const
 
virtual bool processHits (const PSimHit &)
 
 TrackingSlaveSD (std::string)
 
std::string type ()
 
virtual ~TrackingSlaveSD ()
 

Protected Attributes

Collection hits_
 
- Protected Attributes inherited from TrackingSlaveSD
std::vector< PSimHithits_
 

Private Attributes

MuonSubDetectordetector
 
const SimTrackManagerm_trackManager
 

Additional Inherited Members

- Protected Member Functions inherited from TrackingSlaveSD
void setTrackId (PSimHit &hit, unsigned int k)
 

Detailed Description

a copy of the TrackingSlaveSD extended by muon hit formatting; interface to the database

Author
Arno Straessner, CERN arno..nosp@m.stra.nosp@m.essne.nosp@m.r@ce.nosp@m.rn.ch

Modification:

Definition at line 26 of file MuonSlaveSD.h.

Member Typedef Documentation

◆ Collection

typedef std::vector<PSimHit> MuonSlaveSD::Collection

Definition at line 28 of file MuonSlaveSD.h.

◆ const_iterator

typedef Collection::const_iterator MuonSlaveSD::const_iterator

Definition at line 29 of file MuonSlaveSD.h.

Constructor & Destructor Documentation

◆ MuonSlaveSD()

MuonSlaveSD::MuonSlaveSD ( MuonSubDetector d,
const SimTrackManager manager 
)

Definition at line 9 of file MuonSlaveSD.cc.

10  : TrackingSlaveSD(d->name()), m_trackManager(manager) {
11  detector = d;
12 }

References ztail::d, and detector.

◆ ~MuonSlaveSD()

MuonSlaveSD::~MuonSlaveSD ( )
override

Definition at line 14 of file MuonSlaveSD.cc.

14 {}

Member Function Documentation

◆ begin()

const_iterator MuonSlaveSD::begin ( void  )
inlineoverridevirtual

Reimplemented from TrackingSlaveSD.

Definition at line 34 of file MuonSlaveSD.h.

34 { return hits_.begin(); }

References hits_.

◆ clearHits()

void MuonSlaveSD::clearHits ( )
virtual

Definition at line 16 of file MuonSlaveSD.cc.

16  {
17  LogDebug("MuonSimDebug") << " MuonSlaveSD::clearHits " << detector->name() << std::endl;
18  hits_.clear();
19 }

References detector, hits_, LogDebug, and MuonSubDetector::name().

◆ end()

const_iterator MuonSlaveSD::end ( void  )
inlineoverridevirtual

Reimplemented from TrackingSlaveSD.

Definition at line 35 of file MuonSlaveSD.h.

35 { return hits_.end(); }

References hits_.

◆ format()

bool MuonSlaveSD::format ( )
overridevirtual

Reimplemented from TrackingSlaveSD.

Definition at line 21 of file MuonSlaveSD.cc.

21  {
22  LogDebug("MuonSimDebug") << " MuonSlaveSD " << detector->name() << " formatting " << hits_.size() << " hits."
23  << std::endl;
24  if (detector->isBarrel()) {
25  sort(hits_.begin(), hits_.end(), FormatBarrelHits());
26  } else if (detector->isEndcap()) {
27  sort(hits_.begin(), hits_.end(), FormatEndcapHits());
28  } else if (detector->isRPC()) {
29  sort(hits_.begin(), hits_.end(), FormatRpcHits());
30  } else if (detector->isGEM()) {
31  sort(hits_.begin(), hits_.end(), FormatGemHits());
32  } else if (detector->isME0()) {
33  sort(hits_.begin(), hits_.end(), FormatMe0Hits());
34  }
35  return true;
36 }

References detector, hits_, MuonSubDetector::isBarrel(), MuonSubDetector::isEndcap(), MuonSubDetector::isGEM(), MuonSubDetector::isME0(), MuonSubDetector::isRPC(), LogDebug, MuonSubDetector::name(), and jetUpdater_cfi::sort.

Member Data Documentation

◆ detector

MuonSubDetector* MuonSlaveSD::detector
private

Definition at line 41 of file MuonSlaveSD.h.

Referenced by clearHits(), format(), and MuonSlaveSD().

◆ hits_

Collection MuonSlaveSD::hits_
protected

Definition at line 38 of file MuonSlaveSD.h.

Referenced by begin(), clearHits(), end(), and format().

◆ m_trackManager

const SimTrackManager* MuonSlaveSD::m_trackManager
private

Definition at line 43 of file MuonSlaveSD.h.

FormatBarrelHits
Definition: MuonSlaveSD.h:46
MuonSlaveSD::m_trackManager
const SimTrackManager * m_trackManager
Definition: MuonSlaveSD.h:43
MuonSubDetector::name
std::string name()
Definition: MuonSubDetector.cc:31
FormatRpcHits
Definition: MuonSlaveSD.h:58
TrackingSlaveSD::TrackingSlaveSD
TrackingSlaveSD(std::string)
Definition: TrackingSlaveSD.cc:11
FormatGemHits
Definition: MuonSlaveSD.h:64
MuonSubDetector::isBarrel
bool isBarrel()
Definition: MuonSubDetector.cc:21
FormatEndcapHits
Definition: MuonSlaveSD.h:52
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
MuonSubDetector::isME0
bool isME0()
Definition: MuonSubDetector.cc:29
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
MuonSubDetector::isEndcap
bool isEndcap()
Definition: MuonSubDetector.cc:23
MuonSubDetector::isRPC
bool isRPC()
Definition: MuonSubDetector.cc:25
FormatMe0Hits
Definition: MuonSlaveSD.h:70
MuonSubDetector::isGEM
bool isGEM()
Definition: MuonSubDetector.cc:27
MuonSlaveSD::hits_
Collection hits_
Definition: MuonSlaveSD.h:38
MuonSlaveSD::detector
MuonSubDetector * detector
Definition: MuonSlaveSD.h:41
ztail.d
d
Definition: ztail.py:151