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 isGem ()
bool isRpc ()
 MuonSubDetector (std::string name)
std::string name ()
std::string suIdName ()
 ~MuonSubDetector ()

Private Types

enum  subDetector {
  barrel, endcap, rpc, gem,
  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:
2012/10/18 12:47:41
Revision:
1.2
Author:
Arno Straessner, CERN <arno.straessner@cern.ch>

Definition at line 21 of file MuonSubDetector.h.


Member Enumeration Documentation

Enumerator:
barrel 
endcap 
rpc 
gem 
nodef 

Definition at line 40 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, gem, nodef, and rpc.

  : detectorName(name) {
  if (name=="MuonDTHits") {
    detector=barrel;
  } else if (name=="MuonCSCHits") {
    detector=endcap;
  } else if (name=="MuonRPCHits") {
    detector=rpc;
  } else if (name=="MuonGEMHits") {
    detector=gem;
  } 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::isGem ( )
bool MuonSubDetector::isRpc ( )
std::string MuonSubDetector::name ( void  )

Definition at line 38 of file MuonSubDetector.cc.

References detectorName.

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

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

Definition at line 42 of file MuonSubDetector.cc.

References barrel, detector, endcap, gem, and rpc.

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

Member Data Documentation

Definition at line 41 of file MuonSubDetector.h.

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

std::string MuonSubDetector::detectorName [private]

Definition at line 42 of file MuonSubDetector.h.

Referenced by name().