Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:57

0001 #ifndef __TRIGGERENUM_H__
0002 #define __TRIGGERENUM_H__
0003 
0004 #include <map>
0005 #include <string>
0006 
0007 // ! updated : 2025-05-12
0008 
0009 namespace TriggerEnum {
0010 
0011 enum BitCodes
0012 {
0013     CLOCK = 0,
0014     ZDC_NS = 1,
0015     DONUT = 2,
0016     TPC_LASER = 5,
0017     ZDC_S = 6,
0018     ZDC_N = 7,
0019     MBD_S2 = 8, // mbd south >= 2
0020     MBD_N2 = 9, // mbd north >= 2
0021     MBD_NS2 = 10, // mbd north+south >= 2
0022     MBD_NS1 = 11, // mbd north+south >= 1
0023     MBD_NS2_ZVRTX10 = 12, // mbd north+south >= 2, zvertex < 10 cm
0024     MBD_NS2_ZVRTX30 = 13, // mbd north+south >= 2, zvertex < 30 cm
0025     MBD_NS2_ZVRTX150 = 14, // mbd north+south >= 2, zvertex < 150 cm
0026     MBD_NS1_ZVRTX10 = 15,  // mbd north+south >= 1, zvertex < 10 cm
0027     PHOTON6_MBD_NS2 = 16, // photon 6 GeV, mbd north+south >= 2
0028     PHOTON8_MBD_NS2 = 17, // photon 8 GeV, mbd north+south >= 2
0029     PHOTON10_MBD_NS2 = 18, // photon 10 GeV, mbd north+south >= 2
0030     PHOTON12_MBD_NS2 = 19, // photon 12 GeV, mbd north+south >= 2
0031     HCAL_SINGLES = 24,// hcal singles
0032     HCAL_NARROW_VERT = 25, // hcal narrow vertical coincidence
0033     HCAL_WIDE_VERT = 26, // hcal wide vertical coincidence
0034     HCAL_NARROW_HORZ = 27, // hcal narrow horizontal coincidence
0035     HCAL_WIDE_HORZ = 28, // hcal wide horizontal coincidence
0036     MBD_LASER = 40,
0037     RANDOM = 41,
0038 };
0039 
0040 const int NUM_MBD_TRIGGERS = 7;
0041 const TriggerEnum::BitCodes MBTriggers[] = {
0042     TriggerEnum::MBD_NS2, // 10
0043     TriggerEnum::MBD_NS1, // 11
0044     TriggerEnum::MBD_NS2_ZVRTX10,
0045     TriggerEnum::MBD_NS2_ZVRTX30,
0046     TriggerEnum::MBD_NS2_ZVRTX150,
0047     TriggerEnum::MBD_NS1_ZVRTX10,
0048     TriggerEnum::ZDC_NS, // 1
0049 };
0050 
0051 const char * MBTriggerNames[] = {
0052     "MBDNS>=2",
0053     "MBDNS>=1",
0054     "MBDNS>=2 |z|<10",
0055     "MBDNS>=2 |z|<30",
0056     "MBDNS>=2 |z|<150",
0057     "MBDNS>=1 |z|<10",
0058     "ZDCNS",
0059 };
0060 
0061 const int nMBTriggers = sizeof(MBTriggers) / sizeof(TriggerEnum::BitCodes);
0062 
0063 
0064 const std::map< TriggerEnum::BitCodes, std::string> TriggerNames = 
0065 {
0066    { TriggerEnum::BitCodes::CLOCK, "Clock"},
0067    { TriggerEnum::BitCodes::DONUT, "Donut"},
0068    { TriggerEnum::BitCodes::TPC_LASER, "TPC Laser"},
0069    { TriggerEnum::BitCodes::MBD_LASER, "MBD Laser"},
0070    { TriggerEnum::BitCodes::ZDC_S, "ZDC South"},
0071    { TriggerEnum::BitCodes::ZDC_N, "ZDC North"},
0072    { TriggerEnum::BitCodes::ZDC_NS, "ZDC Coincidence"},
0073    { TriggerEnum::BitCodes::RANDOM, "Random"},
0074    { TriggerEnum::BitCodes::MBD_S2, "MBD S >= 2"},
0075    { TriggerEnum::BitCodes::MBD_N2, "MBD N >= 2"},
0076    { TriggerEnum::BitCodes::MBD_NS2, "MBD N&S >= 2"},
0077    { TriggerEnum::BitCodes::MBD_NS1, "MBD N&S >= 1"},
0078    { TriggerEnum::BitCodes::MBD_NS2_ZVRTX10, "MBD N&S >= 2, vtx < 10 cm"},
0079    { TriggerEnum::BitCodes::MBD_NS2_ZVRTX30, "MBD N&S >= 2, vtx < 30 cm"},
0080    { TriggerEnum::BitCodes::MBD_NS2_ZVRTX150, "MBD N&S >= 2, vtx < 150 cm"},
0081    { TriggerEnum::BitCodes::MBD_NS1_ZVRTX10, "MBD N&S >= 1, vtx < 10 cm"},
0082    { TriggerEnum::BitCodes::PHOTON6_MBD_NS2, "Photon 6 GeV + MBD NS >= 2"},
0083    { TriggerEnum::BitCodes::PHOTON8_MBD_NS2, "Photon 8 GeV + MBD NS >= 2"},
0084    { TriggerEnum::BitCodes::PHOTON10_MBD_NS2, "Photon 10 GeV + MBD NS >= 2"},
0085    { TriggerEnum::BitCodes::PHOTON12_MBD_NS2, "Photon 12 GeV + MBD NS >= 2"},
0086    { TriggerEnum::BitCodes::HCAL_SINGLES, "HCAL Singles"},
0087    { TriggerEnum::BitCodes::HCAL_NARROW_VERT, "HCAL Narrow Vertical Coincidence"},
0088    { TriggerEnum::BitCodes::HCAL_WIDE_VERT, "HCAL Wide Vertical Coincidence"},
0089    { TriggerEnum::BitCodes::HCAL_NARROW_HORZ, "HCAL Narrow Horizontal Coincidence"},
0090    { TriggerEnum::BitCodes::HCAL_WIDE_HORZ, "HCAL Wide Horizontal Coincidence"},
0091 };
0092 
0093 std::string GetTriggerName(TriggerEnum::BitCodes code);
0094 
0095 
0096 } // namespace TriggerEnum
0097 
0098 
0099 
0100 #endif // __TRIGGERENUM_H__