Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-26 07:05:24

0001 #pragma once
0002 // settings specific to each RICH
0003 
0004 #include <string>
0005 #include <fmt/format.h>
0006 
0007 class WhichRICH {
0008   public:
0009 
0010     // detector-specific settings
0011     bool valid;
0012     int zDirection;
0013     std::string xrich,xRICH,XRICH;
0014     std::string sensorNamePattern;
0015     double plotXmin, plotXmax, plotYmin, plotYmax;
0016     std::string readoutName;
0017     std::string rawHitsName;
0018 
0019     // constructor
0020     WhichRICH(std::string spec) {
0021       if(spec=="d") {
0022         valid = true;
0023         zDirection = 1;
0024         xrich = "drich";
0025         xRICH = "dRICH";
0026         XRICH = "DRICH";
0027         sensorNamePattern = "sensor_de_sec0";
0028         plotXmin = 100;
0029         plotXmax = 190;
0030         plotYmin = -70;
0031         plotYmax = 70;
0032       } else if(spec=="p") {
0033         valid = true;
0034         zDirection = -1;
0035         xrich = "pfrich";
0036         xRICH = "pfRICH";
0037         XRICH = "PFRICH";
0038         sensorNamePattern = "sensor_de";
0039         plotXmin = -70;
0040         plotXmax = 70;
0041         plotYmin = -70;
0042         plotYmax = 70;
0043       } else {
0044         valid = false;
0045         fmt::print(stderr,"ERROR(WhichRICH): unknown argument \"{}\"\n",spec);
0046       }
0047       readoutName = XRICH+"Hits";
0048       rawHitsName = XRICH+"RawHits";
0049     }
0050 
0051     ~WhichRICH() {}
0052 };