CMS 3D CMS Logo

Public Member Functions | Private Types | Private Attributes

MuonSubDetector Class Reference

#include <MuonSubDetector.h>

List of all members.

Public Member Functions

bool isBarrel ()
bool isEndcap ()
bool isRpc ()
 MuonSubDetector (std::string name)
std::string name ()
std::string suIdName ()
 ~MuonSubDetector ()

Private Types

enum  subDetector { barrel, endcap, rpc, nodef }

Private Attributes

subDetector detector
std::string detectorName

Detailed Description

class to handle muon sensitive detectors, possible arguments for constructor: "MuonDTHits", "MuonCSCHits", "MuonRPCHits"

the function suIdName() returns the detector SuId for the ROU factory

Date:
2006/02/15 13:21:24
Revision:
1.1
Author:
Arno Straessner, CERN <arno.straessner@cern.ch>

Definition at line 21 of file MuonSubDetector.h.


Member Enumeration Documentation

Enumerator:
barrel 
endcap 
rpc 
nodef 

Definition at line 39 of file MuonSubDetector.h.


Constructor & Destructor Documentation

MuonSubDetector::MuonSubDetector ( std::string  name)

Definition at line 5 of file MuonSubDetector.cc.

References barrel, gather_cfg::cout, detector, endcap, nodef, and rpc.

  : detectorName(name) {
  if (name=="MuonDTHits") {
    detector=barrel;
  } else if (name=="MuonCSCHits") {
    detector=endcap;
  } else if (name=="MuonRPCHits") {
    detector=rpc;
  } else {
    std::cout << "MuonSubDetector::MuonSubDetector does not recognize ";
    std::cout << name <<std::endl;
    detector=nodef;
  } 
}
MuonSubDetector::~MuonSubDetector ( ) [inline]

Definition at line 30 of file MuonSubDetector.h.

{};

Member Function Documentation

bool MuonSubDetector::isBarrel ( )
bool MuonSubDetector::isEndcap ( )
bool MuonSubDetector::isRpc ( )
std::string MuonSubDetector::name ( void  )

Definition at line 32 of file MuonSubDetector.cc.

References detectorName.

Referenced by MuonSlaveSD::clearHits(), MuonSlaveSD::format(), and MuonSensitiveDetector::saveHit().

                               {
  return detectorName;
}
std::string MuonSubDetector::suIdName ( )

Definition at line 36 of file MuonSubDetector.cc.

References barrel, detector, endcap, and rpc.

                                   {
  if (detector==barrel) {
    return "MuonHitsBarrel";
  } else if (detector==endcap) {
    return "MuonHitsEndcap";
  } else if (detector==rpc) {
    return "MuonHitsRPC";
  } else {
    return "";
  }
}

Member Data Documentation

Definition at line 40 of file MuonSubDetector.h.

Referenced by isBarrel(), isEndcap(), isRpc(), MuonSubDetector(), and suIdName().

std::string MuonSubDetector::detectorName [private]

Definition at line 41 of file MuonSubDetector.h.

Referenced by name().