20 #include "StDetectorName.h"
23 const char* DetectorName(
int id) {
25 static bool init =
true;
26 static std::map<int, const char *> DetectorNames;
29 DetectorNames[kUnknownId ] =
"Unknown";
30 DetectorNames[kTpcId ] =
"Tpc";
31 DetectorNames[kSvtId ] =
"Svt";
32 DetectorNames[kRichId ] =
"Rich";
33 DetectorNames[kFtpcWestId ] =
"FtpcWest";
34 DetectorNames[kFtpcEastId ] =
"FtpcEast";
35 DetectorNames[kTofId ] =
"Tof";
36 DetectorNames[kBTofId ] =
"Tof";
37 DetectorNames[kETofId ] =
"ETof";
38 DetectorNames[kCtbId ] =
"Ctb";
39 DetectorNames[kSsdId ] =
"Ssd";
40 DetectorNames[kSstId ] =
"Sst";
41 DetectorNames[kBarrelEmcTowerId ] =
"BarrelEmcTower";
42 DetectorNames[kBarrelEmcPreShowerId] =
"BarrelEmcPreShower";
43 DetectorNames[kBarrelSmdEtaStripId ] =
"BarrelSmdEtaStrip";
44 DetectorNames[kBarrelSmdPhiStripId ] =
"BarrelSmdPhiStrip";
45 DetectorNames[kEndcapEmcTowerId ] =
"EndcapEmcTower";
46 DetectorNames[kEndcapEmcPreShowerId] =
"EndcapEmcPreShower";
47 DetectorNames[kEndcapSmdUStripId ] =
"EndcapSmdUStrip";
48 DetectorNames[kEndcapSmdVStripId ] =
"EndcapSmdVStrip";
49 DetectorNames[kZdcWestId ] =
"ZdcWest";
50 DetectorNames[kZdcEastId ] =
"ZdcEast";
51 DetectorNames[kMwpcWestId ] =
"MwpcWest";
52 DetectorNames[kMwpcEastId ] =
"MwpcEast";
53 DetectorNames[kTpcSsdId ] =
"TpcSsd";
54 DetectorNames[kTpcSvtId ] =
"TpcSvt";
55 DetectorNames[kTpcSsdSvtId] =
"TpcSsdSvt";
56 DetectorNames[kSsdSvtId ] =
"SsdSvt";
57 DetectorNames[kPhmdCpvId ] =
"PhmdCpv";
58 DetectorNames[kPhmdId ] =
"Phmd";
59 DetectorNames[kPxlId ] =
"Pxl";
60 DetectorNames[kIstId ] =
"Ist";
61 DetectorNames[kFstId ] =
"Fst";
62 DetectorNames[kFgtId ] =
"Fgt";
63 DetectorNames[kEtrId ] =
"Etr";
64 DetectorNames[kFpdWestId ] =
"FpdWest";
65 DetectorNames[kFpdEastId ] =
"FpdEast";
66 DetectorNames[kFmsId ] =
"Fms";
67 DetectorNames[kRpsId ] =
"Rps";
68 DetectorNames[kMtdId ] =
"Mtd";
69 DetectorNames[kRHICfId ] =
"RHICf";
72 if (
id < kMaxDetectorId)
73 return DetectorNames[id];
75 return DetectorNames[kUnknownId];