00001 #ifndef DETECTORMAP_H_MPIL1BS0
00002 #define DETECTORMAP_H_MPIL1BS0
00003
00004 #include <string>
00005 #include <map>
00006
00007 template <typename T, typename U> class create_map
00008 {
00009 private:
00010 std::map<T, U> m_map;
00011 public:
00012 create_map(const T& key, const U& val) { m_map[key] = val; }
00013 create_map<T, U>& operator()(const T& key, const U& val)
00014 {
00015 m_map[key] = val;
00016 return *this;
00017 }
00018 operator std::map<T, U>() { return m_map; }
00019 };
00020
00021 typedef std::map<std::string, std::string> bank2detMap;
00022 typedef std::map<std::string, TH1I *> det2histMap;
00023
00024 typedef bank2detMap::iterator bankIter;
00025 typedef det2histMap::iterator detIter;
00026
00027 static bank2detMap ChannelToDetectorMap = create_map<std::string, std::string>
00028 ("Na80", "muSc")
00029 ("Nb80", "muScA")
00030 ("Nc80", "ScL")
00031 ("Nd80", "ScR")
00032 ("Ne80", "ScGe")
00033
00034
00035
00036
00037 ("Nac0", "SiL2Slow")
00038 ("Nbc0", "SiR2Slow")
00039 ("Ncc0", "GeSlow")
00040
00041 ("Nec0", "SiL2Fast")
00042 ("Nfc0", "SiR2Fast")
00043 ("Ngc0", "GeFast")
00044
00045
00046 ("Nae0", "SiL1_1Fast")
00047 ("Nbe0", "SiL1_2Fast")
00048 ("Nce0", "SiL1_3Fast")
00049 ("Nde0", "SiL1_4Fast")
00050 ("Nee0", "SiR1_1Fast")
00051 ("Nfe0", "SiR1_2Fast")
00052 ("Nge0", "SiR1_3Fast")
00053 ("Nhe0", "SiR1_4Fast")
00054
00055 ("Naf0", "SiL1_1Slow")
00056 ("Nbf0", "SiL1_2Slow")
00057 ("Ncf0", "SiL1_3Slow")
00058 ("Ndf0", "SiL1_4Slow")
00059 ("Nef0", "SiR1_1Slow")
00060 ("Nff0", "SiR1_2Slow")
00061 ("Ngf0", "SiR1_3Slow")
00062 ("Nhf0", "SiR1_4Slow");
00063
00064
00065 static TH1I *hmuSc_Raw;
00066 static TH1I *hmuScA_Raw;
00067 static TH1I *hScL_Raw;
00068 static TH1I *hScR_Raw;
00069 static TH1I *hScGe_Raw;
00070
00071 static TH1I *hSiL2Slow_Raw;
00072 static TH1I *hSiR2Slow_Raw;
00073 static TH1I *hGeSlow_Raw;
00074
00075 static TH1I *hSiL2Fast_Raw;
00076 static TH1I *hSiR2Fast_Raw;
00077 static TH1I *hGeFast_Raw;
00078
00079 static TH1I *hSiL1_1Fast_Raw;
00080 static TH1I *hSiL1_2Fast_Raw;
00081 static TH1I *hSiL1_3Fast_Raw;
00082 static TH1I *hSiL1_4Fast_Raw;
00083 static TH1I *hSiR1_1Fast_Raw;
00084 static TH1I *hSiR1_2Fast_Raw;
00085 static TH1I *hSiR1_3Fast_Raw;
00086 static TH1I *hSiR1_4Fast_Raw;
00087
00088 static TH1I *hSiL1_1Slow_Raw;
00089 static TH1I *hSiL1_2Slow_Raw;
00090 static TH1I *hSiL1_3Slow_Raw;
00091 static TH1I *hSiL1_4Slow_Raw;
00092 static TH1I *hSiR1_1Slow_Raw;
00093 static TH1I *hSiR1_2Slow_Raw;
00094 static TH1I *hSiR1_3Slow_Raw;
00095 static TH1I *hSiR1_4Slow_Raw;
00096
00097 static det2histMap DetectorToRawHistMap =
00098 create_map<std::string, TH1I *>
00099 ("muSc", hmuSc_Raw)
00100 ("muScA", hmuScA_Raw)
00101 ("ScL", hScL_Raw)
00102 ("ScR", hScR_Raw)
00103 ("ScGe", hScGe_Raw)
00104
00105
00106
00107
00108 ("SiL2Slow", hSiL2Slow_Raw)
00109 ("SiR2Slow", hSiR2Slow_Raw)
00110 ("GeSlow", hGeSlow_Raw)
00111
00112
00113 ("SiL2Fast", hSiL2Fast_Raw)
00114 ("SiR2Fast", hSiR2Fast_Raw)
00115 ("GeFast", hGeFast_Raw)
00116
00117
00118
00119 ("SiL1_1Fast", hSiL1_1Fast_Raw)
00120 ("SiL1_2Fast", hSiL1_2Fast_Raw)
00121 ("SiL1_3Fast", hSiL1_3Fast_Raw)
00122 ("SiL1_4Fast", hSiL1_4Fast_Raw)
00123 ("SiR1_1Fast", hSiR1_1Fast_Raw)
00124 ("SiR1_2Fast", hSiR1_2Fast_Raw)
00125 ("SiR1_3Fast", hSiR1_3Fast_Raw)
00126 ("SiR1_4Fast", hSiR1_4Fast_Raw)
00127
00128 ("SiL1_1Slow", hSiL1_1Slow_Raw)
00129 ("SiL1_2Slow", hSiL1_2Slow_Raw)
00130 ("SiL1_3Slow", hSiL1_3Slow_Raw)
00131 ("SiL1_4Slow", hSiL1_4Slow_Raw)
00132 ("SiR1_1Slow", hSiR1_1Slow_Raw)
00133 ("SiR1_2Slow", hSiR1_2Slow_Raw)
00134 ("SiR1_3Slow", hSiR1_3Slow_Raw)
00135 ("SiR1_4Slow", hSiR1_4Slow_Raw);
00136
00137 static TH1I *hmuSc_Heights;
00138 static TH1I *hmuScA_Heights;
00139 static TH1I *hScL_Heights;
00140 static TH1I *hScR_Heights;
00141 static TH1I *hScGe_Heights;
00142
00143 static TH1I *hSiL2Slow_Heights;
00144 static TH1I *hSiR2Slow_Heights;
00145 static TH1I *hGeSlow_Heights;
00146
00147 static TH1I *hSiL2Fast_Heights;
00148 static TH1I *hSiR2Fast_Heights;
00149 static TH1I *hGeFast_Heights;
00150
00151 static TH1I *hSiL1_1Fast_Heights;
00152 static TH1I *hSiL1_2Fast_Heights;
00153 static TH1I *hSiL1_3Fast_Heights;
00154 static TH1I *hSiL1_4Fast_Heights;
00155 static TH1I *hSiR1_1Fast_Heights;
00156 static TH1I *hSiR1_2Fast_Heights;
00157 static TH1I *hSiR1_3Fast_Heights;
00158 static TH1I *hSiR1_4Fast_Heights;
00159
00160 static TH1I *hSiL1_1Slow_Heights;
00161 static TH1I *hSiL1_2Slow_Heights;
00162 static TH1I *hSiL1_3Slow_Heights;
00163 static TH1I *hSiL1_4Slow_Heights;
00164 static TH1I *hSiR1_1Slow_Heights;
00165 static TH1I *hSiR1_2Slow_Heights;
00166 static TH1I *hSiR1_3Slow_Heights;
00167 static TH1I *hSiR1_4Slow_Heights;
00168
00169 static det2histMap DetectorToHeightHistMap =
00170 create_map<std::string, TH1I *>
00171 ("muSc", hmuSc_Heights)
00172 ("muScA", hmuScA_Heights)
00173 ("ScL", hScL_Heights)
00174 ("ScR", hScR_Heights)
00175 ("ScGe", hScGe_Heights)
00176
00177
00178
00179
00180 ("SiL2Slow", hSiL2Slow_Heights)
00181 ("SiR2Slow", hSiR2Slow_Heights)
00182 ("GeSlow", hGeSlow_Heights)
00183
00184
00185 ("SiL2Fast", hSiL2Fast_Heights)
00186 ("SiR2Fast", hSiR2Fast_Heights)
00187 ("GeFast", hGeFast_Heights)
00188
00189
00190
00191 ("SiL1_1Fast", hSiL1_1Fast_Heights)
00192 ("SiL1_2Fast", hSiL1_2Fast_Heights)
00193 ("SiL1_3Fast", hSiL1_3Fast_Heights)
00194 ("SiL1_4Fast", hSiL1_4Fast_Heights)
00195 ("SiR1_1Fast", hSiR1_1Fast_Heights)
00196 ("SiR1_2Fast", hSiR1_2Fast_Heights)
00197 ("SiR1_3Fast", hSiR1_3Fast_Heights)
00198 ("SiR1_4Fast", hSiR1_4Fast_Heights)
00199
00200 ("SiL1_1Slow", hSiL1_1Slow_Heights)
00201 ("SiL1_2Slow", hSiL1_2Slow_Heights)
00202 ("SiL1_3Slow", hSiL1_3Slow_Heights)
00203 ("SiL1_4Slow", hSiL1_4Slow_Heights)
00204 ("SiR1_1Slow", hSiR1_1Slow_Heights)
00205 ("SiR1_2Slow", hSiR1_2Slow_Heights)
00206 ("SiR1_3Slow", hSiR1_3Slow_Heights)
00207 ("SiR1_4Slow", hSiR1_4Slow_Heights);
00208
00209
00210 static TH1I *hmuSc_Times;
00211 static TH1I *hmuScA_Times;
00212 static TH1I *hScL_Times;
00213 static TH1I *hScR_Times;
00214 static TH1I *hScGe_Times;
00215
00216 static TH1I *hSiL2Slow_Times;
00217 static TH1I *hSiR2Slow_Times;
00218 static TH1I *hGeSlow_Times;
00219
00220 static TH1I *hSiL2Fast_Times;
00221 static TH1I *hSiR2Fast_Times;
00222 static TH1I *hGeFast_Times;
00223
00224 static TH1I *hSiL1_1Fast_Times;
00225 static TH1I *hSiL1_2Fast_Times;
00226 static TH1I *hSiL1_3Fast_Times;
00227 static TH1I *hSiL1_4Fast_Times;
00228 static TH1I *hSiR1_1Fast_Times;
00229 static TH1I *hSiR1_2Fast_Times;
00230 static TH1I *hSiR1_3Fast_Times;
00231 static TH1I *hSiR1_4Fast_Times;
00232
00233 static TH1I *hSiL1_1Slow_Times;
00234 static TH1I *hSiL1_2Slow_Times;
00235 static TH1I *hSiL1_3Slow_Times;
00236 static TH1I *hSiL1_4Slow_Times;
00237 static TH1I *hSiR1_1Slow_Times;
00238 static TH1I *hSiR1_2Slow_Times;
00239 static TH1I *hSiR1_3Slow_Times;
00240 static TH1I *hSiR1_4Slow_Times;
00241
00242 static det2histMap DetectorToTimeHistMap =
00243 create_map<std::string, TH1I *>
00244 ("muSc", hmuSc_Times)
00245 ("muScA", hmuScA_Times)
00246 ("ScL", hScL_Times)
00247 ("ScR", hScR_Times)
00248 ("ScGe", hScGe_Times)
00249
00250
00251
00252
00253 ("SiL2Slow", hSiL2Slow_Times)
00254 ("SiR2Slow", hSiR2Slow_Times)
00255 ("GeSlow", hGeSlow_Times)
00256
00257
00258 ("SiL2Fast", hSiL2Fast_Times)
00259 ("SiR2Fast", hSiR2Fast_Times)
00260 ("GeFast", hGeFast_Times)
00261
00262
00263
00264 ("SiL1_1Fast", hSiL1_1Fast_Times)
00265 ("SiL1_2Fast", hSiL1_2Fast_Times)
00266 ("SiL1_3Fast", hSiL1_3Fast_Times)
00267 ("SiL1_4Fast", hSiL1_4Fast_Times)
00268 ("SiR1_1Fast", hSiR1_1Fast_Times)
00269 ("SiR1_2Fast", hSiR1_2Fast_Times)
00270 ("SiR1_3Fast", hSiR1_3Fast_Times)
00271 ("SiR1_4Fast", hSiR1_4Fast_Times)
00272
00273 ("SiL1_1Slow", hSiL1_1Slow_Times)
00274 ("SiL1_2Slow", hSiL1_2Slow_Times)
00275 ("SiL1_3Slow", hSiL1_3Slow_Times)
00276 ("SiL1_4Slow", hSiL1_4Slow_Times)
00277 ("SiR1_1Slow", hSiR1_1Slow_Times)
00278 ("SiR1_2Slow", hSiR1_2Slow_Times)
00279 ("SiR1_3Slow", hSiR1_3Slow_Times)
00280 ("SiR1_4Slow", hSiR1_4Slow_Times);
00281
00282
00283 #endif
00284