diff --git a/UserCode/H2TestBeamAnalyzer/runlists.py b/UserCode/H2TestBeamAnalyzer/runlists.py index 56ca16f..b554f19 100644 --- a/UserCode/H2TestBeamAnalyzer/runlists.py +++ b/UserCode/H2TestBeamAnalyzer/runlists.py @@ -11,6 +11,7 @@ EMAP_default = "EMAP-QIE11-L00-21AUG2015-04.txt" EMAP_specialODU = "EMAP-QIE11-SPECIAL-ODU-22AUG2015-02.txt" EMAP_2017 = "EMAP_AC05_01AUG2017_NOMINAL.txt" +HB_EMAP_2017 = "EMAP_AC07_01SEP2017_Phase1_HB.txt" # runtable format: # runTable[runnumber] = [eta, phi, nev, beamcounters, beamtype, QIE shunt, emap] @@ -393,288 +394,341 @@ ###################################### -# Testbeam 2017 +#HE Testbeam 2017 ###################################### -runtable2017 = {} - -runtable2017[3234] = (10350,3482,10000,"124","150m","1",EMAP_2017) -runtable2017[3233] = (10350,3482,10000,"124","150m","6",EMAP_2017) -runtable2017[3232] = (10650,3482,10000,"124","150m","1",EMAP_2017) -runtable2017[3231] = (10650,3482,10000,"124","150m","6",EMAP_2017) -runtable2017[3230] = (10975,3482,10000,"124","150m","1",EMAP_2017) -runtable2017[3229] = (10975,3482,10000,"124","150m","6",EMAP_2017) -runtable2017[3228] = (10350,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3227] = (10350,23400,10000,"124","150m","6",EMAP_2017) -runtable2017[3226] = (10650,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3225] = (10650,23400,10000,"124","150m","6",EMAP_2017) -runtable2017[3224] = (10975,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3223] = (10975,23400,10000,"124","150m","6",EMAP_2017) -runtable2017[3222] = (10350,40500,10000,"124","150m","1",EMAP_2017) -runtable2017[3221] = (10350,40500,10000,"124","150m","6",EMAP_2017) -runtable2017[3220] = (10650,40500,10000,"124","150m","1",EMAP_2017) -runtable2017[3219] = (10650,40500,10000,"124","150m","6",EMAP_2017) -runtable2017[3217] = (10975,40500,10000,"124","150m","1",EMAP_2017) -runtable2017[3218] = (10975,40500,10000,"124","150m","6",EMAP_2017) -runtable2017[3379] = (10350,57600,3379,"124","150m","1",EMAP_2017) -runtable2017[3380] = (10350,57600,10000,"124","150m","1",EMAP_2017) -runtable2017[3381] = (10350,57600,10000,"124","150m","6",EMAP_2017) -runtable2017[3382] = (10650,57600,10000,"124","150m","1",EMAP_2017) -runtable2017[3383] = (10650,57600,10000,"124","150m","6",EMAP_2017) -runtable2017[3384] = (10975,57600,10000,"124","150m","1",EMAP_2017) -runtable2017[3385] = (10975,57600,10000,"124","150m","6",EMAP_2017) -runtable2017[3473] = (10350,57600,10000,"124","200m","1",EMAP_2017) -runtable2017[3474] = (10650,57600,10000,"124","200m","1",EMAP_2017) -runtable2017[3475] = (10975,57600,10000,"124","200m","1",EMAP_2017) -runtable2017[3195] = (10650,23400,100000,"124","30p","1",EMAP_2017) -runtable2017[3196] = (10650,23400,100000,"124","30p","6",EMAP_2017) -runtable2017[3197] = (10650,23400,100000,"124","30p","1",EMAP_2017) -runtable2017[3198] = (10650,23400,100000,"124","30p","1",EMAP_2017) -runtable2017[3199] = (10650,23400,100000,"124","30p","6",EMAP_2017) -runtable2017[3200] = (10650,23400,100000,"124","30p","6",EMAP_2017) -runtable2017[3187] = (10650,23400,100000,"124","50p","1",EMAP_2017) -runtable2017[3189] = (10650,23400,100000,"124","50p","6",EMAP_2017) -runtable2017[3190] = (10650,23400,100000,"124","50p","1",EMAP_2017) -runtable2017[3191] = (10650,23400,2000,"124","50p","1",EMAP_2017) -runtable2017[3192] = (10650,23400,100000,"124","50p","1",EMAP_2017) -runtable2017[3193] = (10650,23400,100000,"124","50p","6",EMAP_2017) -runtable2017[3194] = (10650,23400,100000,"124","50p","6",EMAP_2017) -runtable2017[3201] = (10650,23400,100000,"124","80p","1",EMAP_2017) -runtable2017[3202] = (10650,23400,100000,"124","80p","6",EMAP_2017) -runtable2017[3203] = (10650,23400,100000,"124","80p","1",EMAP_2017) -runtable2017[3204] = (10650,23400,100000,"124","80p","1",EMAP_2017) -runtable2017[3205] = (10650,23400,100000,"124","80p","6",EMAP_2017) -runtable2017[3206] = (10650,23400,100000,"124","80p","6",EMAP_2017) -runtable2017[3207] = (10650,23400,100000,"124","100p","1",EMAP_2017) -runtable2017[3208] = (10650,23400,100000,"124","100p","6",EMAP_2017) -runtable2017[3209] = (10650,23400,100000,"124","100p","1",EMAP_2017) -runtable2017[3210] = (10650,23400,100000,"124","100p","1",EMAP_2017) -runtable2017[3211] = (10650,23400,100000,"124","100p","6",EMAP_2017) -runtable2017[3212] = (10650,23400,100000,"124","100p","6",EMAP_2017) -runtable2017[3137] = (10650,23400,30000,"124","150p","1",EMAP_2017) -runtable2017[3239] = (10650,23400,25000,"124","150p","1",EMAP_2017) -runtable2017[3139] = (10650,23400,30000,"124","150p","6",EMAP_2017) -runtable2017[3240] = (10650,23400,100000,"124","150p","6",EMAP_2017) -runtable2017[3138] = (10650,23400,30000,"124","150p","1",EMAP_2017) -runtable2017[3241] = (10650,23400,56324,"124","150p","1",EMAP_2017) -runtable2017[3242] = (10650,23400,45000,"124","150p","1",EMAP_2017) -runtable2017[3243] = (10650,23400,19100,"124","150p","1",EMAP_2017) -runtable2017[3349] = (10650,23400,50000,"124","150p","1",EMAP_2017) -runtable2017[3140] = (10650,23400,30000,"124","150p","1",EMAP_2017) -runtable2017[3350] = (10650,23400,50000,"124","150p","1",EMAP_2017) -runtable2017[3351] = (10650,23400,50000,"124","150p","6",EMAP_2017) -runtable2017[3352] = (10650,23400,50000,"124","150p","6",EMAP_2017) -runtable2017[3143] = (10650,23400,30000,"124","200p","1",EMAP_2017) -runtable2017[3328] = (10650,23400,31000,"124","200p","1",EMAP_2017) -runtable2017[3329] = (10650,23400,25000,"124","200p","1",EMAP_2017) -runtable2017[3145] = (10650,23400,30000,"124","200p","6",EMAP_2017) -runtable2017[3330] = (10650,23400,50000,"124","200p","6",EMAP_2017) -runtable2017[3146] = (10650,23400,30000,"124","200p","1",EMAP_2017) -runtable2017[3331] = (10650,23400,50000,"124","200p","1",EMAP_2017) -runtable2017[3148] = (10650,23400,30000,"124","200p","1",EMAP_2017) -runtable2017[3332] = (10650,23400,50000,"124","200p","1",EMAP_2017) -runtable2017[3150] = (10650,23400,30000,"124","250p","1",EMAP_2017) -runtable2017[3176] = (10650,23400,100000,"124","250p","1",EMAP_2017) -runtable2017[3353] = (10650,23400,50000,"124","250p","1",EMAP_2017) -runtable2017[3154] = (10650,23400,7600,"124","250p","6",EMAP_2017) -runtable2017[3156] = (10650,23400,5600,"124","250p","6",EMAP_2017) -runtable2017[3157] = (10650,23400,6400,"124","250p","6",EMAP_2017) -runtable2017[3158] = (10650,23400,15200,"124","250p","6",EMAP_2017) -runtable2017[3354] = (10650,23400,50000,"124","250p","6",EMAP_2017) -runtable2017[3160] = (10650,23400,2200,"124","250p","1",EMAP_2017) -runtable2017[3161] = (10650,23400,6000,"124","250p","1",EMAP_2017) -runtable2017[3162] = (10650,23400,30000,"124","250p","1",EMAP_2017) -runtable2017[3355] = (10650,23400,50000,"124","250p","1",EMAP_2017) -runtable2017[3175] = (10650,23400,30000,"124","250p","1",EMAP_2017) -runtable2017[3356] = (10650,23400,50000,"124","250p","1",EMAP_2017) -runtable2017[3178] = (10650,23400,47300,"124","300p","1",EMAP_2017) -runtable2017[3179] = (10650,23400,55000,"124","300p","1",EMAP_2017) -runtable2017[3322] = (10650,23400,100000,"124","300p","1",EMAP_2017) -runtable2017[3177] = (10650,23400,100000,"124","300p","6",EMAP_2017) -runtable2017[3323] = (10650,23400,100000,"124","300p","6",EMAP_2017) -runtable2017[3180] = (10650,23400,30000,"124","300p","1",EMAP_2017) -runtable2017[3324] = (10650,23400,100000,"124","300p","1",EMAP_2017) -runtable2017[3183] = (10650,23400,13000,"124","300p","1",EMAP_2017) -runtable2017[3325] = (10650,23400,100000,"124","300p","1",EMAP_2017) -runtable2017[3326] = (10650,23400,100000,"124","300p","6",EMAP_2017) -runtable2017[3327] = (10650,23400,100000,"124","300p","6",EMAP_2017) -runtable2017[3321] = (10650,23400,50000,"124","350p","6",EMAP_2017) -runtable2017[3271] = (10650,40500,50000,"124","30p","1",EMAP_2017) -runtable2017[3272] = (10650,40500,50000,"124","30p","6",EMAP_2017) -runtable2017[3274] = (10650,40500,50000,"124","50p","6",EMAP_2017) -runtable2017[3277] = (10650,40500,9000,"124","80p","6",EMAP_2017) -runtable2017[3278] = (10650,40500,50000,"124","80p","6",EMAP_2017) -runtable2017[3348] = (10650,40500,50000,"124","100p","6",EMAP_2017) -runtable2017[3346] = (10650,40500,50000,"124","150p","6",EMAP_2017) -runtable2017[3347] = (10650,40500,50000,"124","150p","1",EMAP_2017) -runtable2017[3477] = (10720,40500,100000,"124","150p","6",EMAP_2017) -runtable2017[3319] = (10650,40500,50000,"124","200p","6",EMAP_2017) -runtable2017[3336] = (10650,40500,50000,"124","200p","6",EMAP_2017) -runtable2017[3345] = (10650,40500,50000,"124","250p","6",EMAP_2017) -runtable2017[3317] = (10650,40500,50000,"124","300p","6",EMAP_2017) -runtable2017[3334] = (10650,40500,50000,"124","300p","6",EMAP_2017) -runtable2017[3318] = (10650,40500,50000,"124","300p","1",EMAP_2017) -runtable2017[3335] = (10650,40500,50000,"124","300p","1",EMAP_2017) -runtable2017[3476] = (10720,40500,100000,"124","300p","6",EMAP_2017) -runtable2017[3316] = (10650,40500,50000,"124","350p","6",EMAP_2017) -runtable2017[3333] = (10650,40500,50000,"124","350p","6",EMAP_2017) -runtable2017[3252] = (10650,23400,30000,"124","20e","1",EMAP_2017) -runtable2017[3254] = (10650,23400,30000,"124","20e","1",EMAP_2017) -runtable2017[3253] = (10650,23400,8800,"124","20e","6",EMAP_2017) -runtable2017[3255] = (10650,23400,30000,"124","20e","6",EMAP_2017) -runtable2017[3256] = (10650,23400,30000,"124","20e","1",EMAP_2017) -runtable2017[3257] = (10650,23400,30000,"124","20e","1",EMAP_2017) -runtable2017[3261] = (10650,23400,30000,"124","30e","1",EMAP_2017) -runtable2017[3260] = (10650,23400,50000,"124","30e","6",EMAP_2017) -runtable2017[3259] = (10650,23400,30000,"124","30e","1",EMAP_2017) -runtable2017[3258] = (10650,23400,30000,"124","30e","1",EMAP_2017) -runtable2017[3265] = (10650,23400,30000,"124","80e","1",EMAP_2017) -runtable2017[3264] = (10650,23400,30000,"124","80e","6",EMAP_2017) -runtable2017[3263] = (10650,23400,30000,"124","80e","1",EMAP_2017) -runtable2017[3262] = (10650,23400,30000,"124","80e","1",EMAP_2017) -runtable2017[3269] = (10650,23400,30000,"124","120e","1",EMAP_2017) -runtable2017[3268] = (10650,23400,30000,"124","120e","6",EMAP_2017) -runtable2017[3267] = (10650,23400,30000,"124","120e","1",EMAP_2017) -runtable2017[3266] = (10650,23400,30000,"124","120e","1",EMAP_2017) -runtable2017[3302] = (10650,23400,20000,"124","200200","1",EMAP_2017) -runtable2017[3371] = (10650,23400,5000,"124","200200","1",EMAP_2017) -runtable2017[3372] = (10650,23400,20000,"124","200200","1",EMAP_2017) -runtable2017[3377] = (10650,23400,20000,"124","200200","1",EMAP_2017) -runtable2017[3373] = (10650,23400,20000,"124","200200","6",EMAP_2017) -runtable2017[3376] = (10650,23400,20000,"124","200200","6",EMAP_2017) -runtable2017[3303] = (10650,23400,20000,"124","200200","6",EMAP_2017) -runtable2017[3304] = (10650,23400,5000,"124","200200","1",EMAP_2017) -runtable2017[3290] = (10650,23400,5000,"124","250250","1",EMAP_2017) -runtable2017[3291] = (10650,23400,5000,"14","250250","1",EMAP_2017) -runtable2017[3295] = (10650,23400,2200,"124","250250","1",EMAP_2017) -runtable2017[3297] = (10650,23400,8000,"124","250250","1",EMAP_2017) -runtable2017[3292] = (10650,23400,20000,"124","250250","6",EMAP_2017) -runtable2017[3293] = (10650,23400,20000,"124","250250","1",EMAP_2017) -runtable2017[3294] = (10650,23400,20000,"124","250250","1",EMAP_2017) -runtable2017[3298] = (10650,23400,20000,"124","300300","1",EMAP_2017) -runtable2017[3299] = (10650,23400,40000,"124","300300","6",EMAP_2017) -runtable2017[3300] = (10650,23400,20000,"124","300300","1",EMAP_2017) -runtable2017[3301] = (10650,23400,20000,"124","300300","1",EMAP_2017) -runtable2017[3283] = (10650,40500,26000,"124","20e","1",EMAP_2017) -runtable2017[3282] = (10650,40500,30000,"124","20e","6",EMAP_2017) -runtable2017[3281] = (10650,40500,30000,"124","20e","1",EMAP_2017) -runtable2017[3280] = (10650,40500,30000,"124","20e","1",EMAP_2017) -runtable2017[3341] = (10650,40500,20000,"124","30e","1",EMAP_2017) -runtable2017[3342] = (10650,40500,20000,"124","30e","6",EMAP_2017) -runtable2017[3343] = (10650,40500,20000,"124","30e","1",EMAP_2017) -runtable2017[3344] = (10650,40500,20000,"124","30e","1",EMAP_2017) -runtable2017[3337] = (10650,40500,20000,"124","80e","1",EMAP_2017) -runtable2017[3338] = (10650,40500,20000,"124","80e","6",EMAP_2017) -runtable2017[3339] = (10650,40500,20000,"124","80e","1",EMAP_2017) -runtable2017[3340] = (10650,40500,20000,"124","80e","1",EMAP_2017) -runtable2017[3314] = (10650,40500,20000,"124","200200","1",EMAP_2017) -runtable2017[3374] = (10650,40500,20000,"124","200200","1",EMAP_2017) -runtable2017[3315] = (10650,40500,20000,"124","200200","6",EMAP_2017) -runtable2017[3375] = (10650,40500,20000,"124","200200","6",EMAP_2017) -runtable2017[3288] = (10650,40500,20000,"124","250250","1",EMAP_2017) -runtable2017[3286] = (10650,40500,5000,"14","250250","1",EMAP_2017) -runtable2017[3287] = (10650,40500,5000,"124","250250","1",EMAP_2017) -runtable2017[3289] = (10650,40500,4500,"124","250250","6",EMAP_2017) -runtable2017[3311] = (10650,40500,15000,"124","250250","6",EMAP_2017) -runtable2017[3312] = (10650,40500,20000,"124","250250","1",EMAP_2017) -runtable2017[3313] = (10650,40500,20000,"124","250250","1",EMAP_2017) -runtable2017[3306] = (10650,40500,20000,"124","300300","1",EMAP_2017) -runtable2017[3307] = (10650,40500,40000,"124","300300","6",EMAP_2017) -runtable2017[3308] = (10650,40500,20000,"124","300300","1",EMAP_2017) -runtable2017[3309] = (10650,40500,20000,"124","300300","1",EMAP_2017) -runtable2017[3216] = (11125,62750,100000,"14","150m","1",EMAP_2017) -runtable2017[3366] = (11125,62750,100000,"14","150m","1",EMAP_2017) -runtable2017[3378] = (11095,62750,20000,"14","150m","1",EMAP_2017) -runtable2017[3386] = (11155,62750,20000,"14","150m","1",EMAP_2017) -runtable2017[3387] = (11155,62750,20000,"14","150m","1",EMAP_2017) -runtable2017[3388] = (11170,62750,20000,"14","150m","1",EMAP_2017) -runtable2017[3390] = (11170,62750,100000,"14","150m","1",EMAP_2017) -runtable2017[3391] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3392] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3393] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3394] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3395] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3396] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3397] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3398] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3399] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3400] = (11170,62750,32700,"14","150m","1",EMAP_2017) -runtable2017[3401] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3402] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3403] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3404] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3405] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3406] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3407] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3408] = (11170,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3409] = (11170,62750,20000,"14","150m","1",EMAP_2017) -runtable2017[3410] = (11170,62750,53000,"14","150m","1",EMAP_2017) -runtable2017[3411] = (11230,62750,31000,"14","150m","1",EMAP_2017) -runtable2017[3412] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3413] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3414] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3415] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3416] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3417] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3418] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3419] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3420] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3421] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3422] = (11230,62750,250000,"14","150m","1",EMAP_2017) -runtable2017[3427] = (10650,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3428] = (10650,23400,50000,"124","270p","1",EMAP_2017) -runtable2017[3429] = (10650,23400,100000,"124","250p","1",EMAP_2017) -runtable2017[3430] = (10650,23400,50000,"124","250p","6",EMAP_2017) -runtable2017[3431] = (10650,23400,50000,"124","150p","1",EMAP_2017) -runtable2017[3432] = (10650,23400,25000,"124","200e","1",EMAP_2017) -runtable2017[3461] = (9500,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3462] = (10000,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3463] = (10350,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3464] = (10570,23400,30000,"124","150m","1",EMAP_2017) -runtable2017[3460] = (10650,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3465] = (10650,23400,20000,"124","150m","1",EMAP_2017) -runtable2017[3466] = (10730,23400,30000,"124","150m","1",EMAP_2017) -runtable2017[3467] = (10975,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3468] = (11075,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3469] = (11350,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3470] = (11625,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3471] = (11885,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3472] = (12160,23400,10000,"124","150m","1",EMAP_2017) -runtable2017[3481] = (10720,23400,100000,"124","300p","1",EMAP_2017) -runtable2017[3482] = (10720,23400,100000,"124","300p","6",EMAP_2017) -runtable2017[3487] = (10720,23400,5100,"124","300p","6",EMAP_2017) -runtable2017[3488] = (10720,23400,93700,"124","300p","6",EMAP_2017) -runtable2017[3489] = (10720,23400,19500,"124","300p","6",EMAP_2017) -runtable2017[3490] = (10720,23400,2600,"124","300p","6",EMAP_2017) -runtable2017[3493] = (10720,23400,190000,"124","300p","6",EMAP_2017) -runtable2017[3494] = (10720,23400,37900,"124","300p","6",EMAP_2017) -runtable2017[3436] = (10650,23400,50000,"124","250p","1",EMAP_2017) -runtable2017[3483] = (10720,23400,27000,"124","250p","1",EMAP_2017) -runtable2017[3484] = (10720,23400,75000,"124","250p","1",EMAP_2017) -runtable2017[3437] = (10650,23400,50000,"124","250p","6",EMAP_2017) -runtable2017[3441] = (10650,23400,100000,"124","200p","1",EMAP_2017) -runtable2017[3442] = (10650,23400,22000,"124","200p","6",EMAP_2017) -runtable2017[3443] = (10650,23400,100000,"124","200p","6",EMAP_2017) -runtable2017[3439] = (10650,23400,100000,"124","150p","1",EMAP_2017) -runtable2017[3440] = (10650,23400,100000,"124","150p","6",EMAP_2017) -runtable2017[3491] = (10720,23400,200000,"124","150p","6",EMAP_2017) -runtable2017[3495] = (10720,23400,22100,"124","150p","6",EMAP_2017) -runtable2017[3496] = (10720,23400,86200,"124","150p","6",EMAP_2017) -runtable2017[3445] = (10650,23400,100000,"124","100p","1",EMAP_2017) -runtable2017[3446] = (10650,23400,100000,"124","100p","6",EMAP_2017) -runtable2017[3480] = (10720,23400,20000,"124","80p","6",EMAP_2017) -runtable2017[3479] = (10720,23400,20000,"124","50p","6",EMAP_2017) -runtable2017[3492] = (10720,23400,50000,"124","50p","6",EMAP_2017) -runtable2017[3447] = (10650,23400,40000,"124","200e","1",EMAP_2017) -runtable2017[3458] = (10650,23400,40000,"124","200e","1",EMAP_2017) -runtable2017[3448] = (10650,23400,40000,"124","200e","6",EMAP_2017) -runtable2017[3459] = (10650,23400,40000,"124","200e","6",EMAP_2017) -runtable2017[3449] = (10650,23400,12000,"124","120e","1",EMAP_2017) -runtable2017[3450] = (10650,23400,30000,"124","120e","1",EMAP_2017) -runtable2017[3451] = (10650,23400,30000,"124","120e","6",EMAP_2017) -runtable2017[3452] = (10650,23400,30000,"124","80e","1",EMAP_2017) -runtable2017[3453] = (10650,23400,30000,"124","80e","6",EMAP_2017) -runtable2017[3454] = (10650,23400,30000,"124","30e","1",EMAP_2017) -runtable2017[3455] = (10650,23400,30000,"124","30e","6",EMAP_2017) +HEruntable2017 = {} + +# runTable[runnumber] = [eta, phi, nev, beamcounters, beamtype, QIE shunt, emap, ieta, iphi] + +HEruntable2017[3234] = (10350,3482,10000,"124","150m","1",EMAP_2017,18,6) +HEruntable2017[3233] = (10350,3482,10000,"124","150m","6",EMAP_2017,18,6) +HEruntable2017[3232] = (10650,3482,10000,"124","150m","1",EMAP_2017,19,6) +HEruntable2017[3231] = (10650,3482,10000,"124","150m","6",EMAP_2017,19,6) +HEruntable2017[3230] = (10975,3482,10000,"124","150m","1",EMAP_2017,20,6) +HEruntable2017[3229] = (10975,3482,10000,"124","150m","6",EMAP_2017,20,6) +HEruntable2017[3228] = (10350,23400,10000,"124","150m","1",EMAP_2017,18,5) +HEruntable2017[3227] = (10350,23400,10000,"124","150m","6",EMAP_2017,18,5) +HEruntable2017[3226] = (10650,23400,10000,"124","150m","1",EMAP_2017,19,5) +HEruntable2017[3225] = (10650,23400,10000,"124","150m","6",EMAP_2017,19,5) +HEruntable2017[3224] = (10975,23400,10000,"124","150m","1",EMAP_2017,20,5) +HEruntable2017[3223] = (10975,23400,10000,"124","150m","6",EMAP_2017,20,5) +HEruntable2017[3222] = (10350,40500,10000,"124","150m","1",EMAP_2017,18,4) +HEruntable2017[3221] = (10350,40500,10000,"124","150m","6",EMAP_2017,18,4) +HEruntable2017[3220] = (10650,40500,10000,"124","150m","1",EMAP_2017,19,4) +HEruntable2017[3219] = (10650,40500,10000,"124","150m","6",EMAP_2017,19,4) +HEruntable2017[3217] = (10975,40500,10000,"124","150m","1",EMAP_2017,20,4) +HEruntable2017[3218] = (10975,40500,10000,"124","150m","6",EMAP_2017,20,4) +HEruntable2017[3379] = (10350,57600,3379,"124","150m","1",EMAP_2017,18,3) +HEruntable2017[3380] = (10350,57600,10000,"124","150m","1",EMAP_2017,18,3) +HEruntable2017[3381] = (10350,57600,10000,"124","150m","6",EMAP_2017,18,3) +HEruntable2017[3382] = (10650,57600,10000,"124","150m","1",EMAP_2017,19,3) +HEruntable2017[3383] = (10650,57600,10000,"124","150m","6",EMAP_2017,19,3) +HEruntable2017[3384] = (10975,57600,10000,"124","150m","1",EMAP_2017,20,3) +HEruntable2017[3385] = (10975,57600,10000,"124","150m","6",EMAP_2017,20,3) +HEruntable2017[3473] = (10350,57600,10000,"124","200m","1",EMAP_2017,18,3) +HEruntable2017[3474] = (10650,57600,10000,"124","200m","1",EMAP_2017,19,3) +HEruntable2017[3475] = (10975,57600,10000,"124","200m","1",EMAP_2017,20,3) +HEruntable2017[3195] = (10650,23400,100000,"124","30p","1",EMAP_2017,19,5) +HEruntable2017[3196] = (10650,23400,100000,"124","30p","6",EMAP_2017,19,5) +HEruntable2017[3197] = (10650,23400,100000,"124","30p","1",EMAP_2017,19,5) +HEruntable2017[3198] = (10650,23400,100000,"124","30p","1",EMAP_2017,19,5) +HEruntable2017[3199] = (10650,23400,100000,"124","30p","6",EMAP_2017,19,5) +HEruntable2017[3200] = (10650,23400,100000,"124","30p","6",EMAP_2017,19,5) +HEruntable2017[3187] = (10650,23400,100000,"124","50p","1",EMAP_2017,19,5) +HEruntable2017[3189] = (10650,23400,100000,"124","50p","6",EMAP_2017,19,5) +HEruntable2017[3190] = (10650,23400,100000,"124","50p","1",EMAP_2017,19,5) +HEruntable2017[3191] = (10650,23400,2000,"124","50p","1",EMAP_2017,19,5) +HEruntable2017[3192] = (10650,23400,100000,"124","50p","1",EMAP_2017,19,5) +HEruntable2017[3193] = (10650,23400,100000,"124","50p","6",EMAP_2017,19,5) +HEruntable2017[3194] = (10650,23400,100000,"124","50p","6",EMAP_2017,19,5) +HEruntable2017[3201] = (10650,23400,100000,"124","80p","1",EMAP_2017,19,5) +HEruntable2017[3202] = (10650,23400,100000,"124","80p","6",EMAP_2017,19,5) +HEruntable2017[3203] = (10650,23400,100000,"124","80p","1",EMAP_2017,19,5) +HEruntable2017[3204] = (10650,23400,100000,"124","80p","1",EMAP_2017,19,5) +HEruntable2017[3205] = (10650,23400,100000,"124","80p","6",EMAP_2017,19,5) +HEruntable2017[3206] = (10650,23400,100000,"124","80p","6",EMAP_2017,19,5) +HEruntable2017[3207] = (10650,23400,100000,"124","100p","1",EMAP_2017,19,5) +HEruntable2017[3208] = (10650,23400,100000,"124","100p","6",EMAP_2017,19,5) +HEruntable2017[3209] = (10650,23400,100000,"124","100p","1",EMAP_2017,19,5) +HEruntable2017[3210] = (10650,23400,100000,"124","100p","1",EMAP_2017,19,5) +HEruntable2017[3211] = (10650,23400,100000,"124","100p","6",EMAP_2017,19,5) +HEruntable2017[3212] = (10650,23400,100000,"124","100p","6",EMAP_2017,19,5) +HEruntable2017[3137] = (10650,23400,30000,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3239] = (10650,23400,25000,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3139] = (10650,23400,30000,"124","150p","6",EMAP_2017,19,5) +HEruntable2017[3240] = (10650,23400,100000,"124","150p","6",EMAP_2017,19,5) +HEruntable2017[3138] = (10650,23400,30000,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3241] = (10650,23400,56324,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3242] = (10650,23400,45000,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3243] = (10650,23400,19100,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3349] = (10650,23400,50000,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3140] = (10650,23400,30000,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3350] = (10650,23400,50000,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3351] = (10650,23400,50000,"124","150p","6",EMAP_2017,19,5) +HEruntable2017[3352] = (10650,23400,50000,"124","150p","6",EMAP_2017,19,5) +HEruntable2017[3143] = (10650,23400,30000,"124","200p","1",EMAP_2017,19,5) +HEruntable2017[3328] = (10650,23400,31000,"124","200p","1",EMAP_2017,19,5) +HEruntable2017[3329] = (10650,23400,25000,"124","200p","1",EMAP_2017,19,5) +HEruntable2017[3145] = (10650,23400,30000,"124","200p","6",EMAP_2017,19,5) +HEruntable2017[3330] = (10650,23400,50000,"124","200p","6",EMAP_2017,19,5) +HEruntable2017[3146] = (10650,23400,30000,"124","200p","1",EMAP_2017,19,5) +HEruntable2017[3331] = (10650,23400,50000,"124","200p","1",EMAP_2017,19,5) +HEruntable2017[3148] = (10650,23400,30000,"124","200p","1",EMAP_2017,19,5) +HEruntable2017[3332] = (10650,23400,50000,"124","200p","1",EMAP_2017,19,5) +HEruntable2017[3150] = (10650,23400,30000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3176] = (10650,23400,100000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3353] = (10650,23400,50000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3154] = (10650,23400,7600,"124","250p","6",EMAP_2017,19,5) +HEruntable2017[3156] = (10650,23400,5600,"124","250p","6",EMAP_2017,19,5) +HEruntable2017[3157] = (10650,23400,6400,"124","250p","6",EMAP_2017,19,5) +HEruntable2017[3158] = (10650,23400,15200,"124","250p","6",EMAP_2017,19,5) +HEruntable2017[3354] = (10650,23400,50000,"124","250p","6",EMAP_2017,19,5) +HEruntable2017[3160] = (10650,23400,2200,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3161] = (10650,23400,6000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3162] = (10650,23400,30000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3355] = (10650,23400,50000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3175] = (10650,23400,30000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3356] = (10650,23400,50000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3178] = (10650,23400,47300,"124","300p","1",EMAP_2017,19,5) +HEruntable2017[3179] = (10650,23400,55000,"124","300p","1",EMAP_2017,19,5) +HEruntable2017[3322] = (10650,23400,100000,"124","300p","1",EMAP_2017,19,5) +HEruntable2017[3177] = (10650,23400,100000,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3323] = (10650,23400,100000,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3180] = (10650,23400,30000,"124","300p","1",EMAP_2017,19,5) +HEruntable2017[3324] = (10650,23400,100000,"124","300p","1",EMAP_2017,19,5) +HEruntable2017[3183] = (10650,23400,13000,"124","300p","1",EMAP_2017,19,5) +HEruntable2017[3325] = (10650,23400,100000,"124","300p","1",EMAP_2017,19,5) +HEruntable2017[3326] = (10650,23400,100000,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3327] = (10650,23400,100000,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3321] = (10650,23400,50000,"124","350p","6",EMAP_2017,19,5) +HEruntable2017[3271] = (10650,40500,50000,"124","30p","1",EMAP_2017,19,4) +HEruntable2017[3272] = (10650,40500,50000,"124","30p","6",EMAP_2017,19,4) +HEruntable2017[3274] = (10650,40500,50000,"124","50p","6",EMAP_2017,19,4) +HEruntable2017[3277] = (10650,40500,9000,"124","80p","6",EMAP_2017,19,4) +HEruntable2017[3278] = (10650,40500,50000,"124","80p","6",EMAP_2017,19,4) +HEruntable2017[3348] = (10650,40500,50000,"124","100p","6",EMAP_2017,19,4) +HEruntable2017[3346] = (10650,40500,50000,"124","150p","6",EMAP_2017,19,4) +HEruntable2017[3347] = (10650,40500,50000,"124","150p","1",EMAP_2017,19,4) +HEruntable2017[3477] = (10720,40500,100000,"124","150p","6",EMAP_2017,19,4) +HEruntable2017[3319] = (10650,40500,50000,"124","200p","6",EMAP_2017,19,4) +HEruntable2017[3336] = (10650,40500,50000,"124","200p","6",EMAP_2017,19,4) +HEruntable2017[3345] = (10650,40500,50000,"124","250p","6",EMAP_2017,19,4) +HEruntable2017[3317] = (10650,40500,50000,"124","300p","6",EMAP_2017,19,4) +HEruntable2017[3334] = (10650,40500,50000,"124","300p","6",EMAP_2017,19,4) +HEruntable2017[3318] = (10650,40500,50000,"124","300p","1",EMAP_2017,19,4) +HEruntable2017[3335] = (10650,40500,50000,"124","300p","1",EMAP_2017,19,4) +HEruntable2017[3476] = (10720,40500,100000,"124","300p","6",EMAP_2017,19,4) +HEruntable2017[3316] = (10650,40500,50000,"124","350p","6",EMAP_2017,19,4) +HEruntable2017[3333] = (10650,40500,50000,"124","350p","6",EMAP_2017,19,4) +HEruntable2017[3252] = (10650,23400,30000,"124","20e","1",EMAP_2017,19,5) +HEruntable2017[3254] = (10650,23400,30000,"124","20e","1",EMAP_2017,19,5) +HEruntable2017[3253] = (10650,23400,8800,"124","20e","6",EMAP_2017,19,5) +HEruntable2017[3255] = (10650,23400,30000,"124","20e","6",EMAP_2017,19,5) +HEruntable2017[3256] = (10650,23400,30000,"124","20e","1",EMAP_2017,19,5) +HEruntable2017[3257] = (10650,23400,30000,"124","20e","1",EMAP_2017,19,5) +HEruntable2017[3261] = (10650,23400,30000,"124","30e","1",EMAP_2017,19,5) +HEruntable2017[3260] = (10650,23400,50000,"124","30e","6",EMAP_2017,19,5) +HEruntable2017[3259] = (10650,23400,30000,"124","30e","1",EMAP_2017,19,5) +HEruntable2017[3258] = (10650,23400,30000,"124","30e","1",EMAP_2017,19,5) +HEruntable2017[3265] = (10650,23400,30000,"124","80e","1",EMAP_2017,19,5) +HEruntable2017[3264] = (10650,23400,30000,"124","80e","6",EMAP_2017,19,5) +HEruntable2017[3263] = (10650,23400,30000,"124","80e","1",EMAP_2017,19,5) +HEruntable2017[3262] = (10650,23400,30000,"124","80e","1",EMAP_2017,19,5) +HEruntable2017[3269] = (10650,23400,30000,"124","120e","1",EMAP_2017,19,5) +HEruntable2017[3268] = (10650,23400,30000,"124","120e","6",EMAP_2017,19,5) +HEruntable2017[3267] = (10650,23400,30000,"124","120e","1",EMAP_2017,19,5) +HEruntable2017[3266] = (10650,23400,30000,"124","120e","1",EMAP_2017,19,5) +HEruntable2017[3302] = (10650,23400,20000,"124","200e+","1",EMAP_2017,19,5) +HEruntable2017[3371] = (10650,23400,5000,"124","200e+","1",EMAP_2017,19,5) +HEruntable2017[3372] = (10650,23400,20000,"124","200e+","1",EMAP_2017,19,5) +HEruntable2017[3377] = (10650,23400,20000,"124","200e+","1",EMAP_2017,19,5) +HEruntable2017[3373] = (10650,23400,20000,"124","200e+","6",EMAP_2017,19,5) +HEruntable2017[3376] = (10650,23400,20000,"124","200e+","6",EMAP_2017,19,5) +HEruntable2017[3303] = (10650,23400,20000,"124","200e+","6",EMAP_2017,19,5) +HEruntable2017[3304] = (10650,23400,5000,"124","200e+","1",EMAP_2017,19,5) +HEruntable2017[3290] = (10650,23400,5000,"124","250e+","1",EMAP_2017,19,5) +HEruntable2017[3291] = (10650,23400,5000,"14","250e+","1",EMAP_2017,19,5) +HEruntable2017[3295] = (10650,23400,2200,"124","250e+","1",EMAP_2017,19,5) +HEruntable2017[3297] = (10650,23400,8000,"124","250e+","1",EMAP_2017,19,5) +HEruntable2017[3292] = (10650,23400,20000,"124","250e+","6",EMAP_2017,19,5) +HEruntable2017[3293] = (10650,23400,20000,"124","250e+","1",EMAP_2017,19,5) +HEruntable2017[3294] = (10650,23400,20000,"124","250e+","1",EMAP_2017,19,5) +HEruntable2017[3298] = (10650,23400,20000,"124","300e+","1",EMAP_2017,19,5) +HEruntable2017[3299] = (10650,23400,40000,"124","300e+","6",EMAP_2017,19,5) +HEruntable2017[3300] = (10650,23400,20000,"124","300e+","1",EMAP_2017,19,5) +HEruntable2017[3301] = (10650,23400,20000,"124","300e+","1",EMAP_2017,19,5) +HEruntable2017[3283] = (10650,40500,26000,"124","20e","1",EMAP_2017,19,4) +HEruntable2017[3282] = (10650,40500,30000,"124","20e","6",EMAP_2017,19,4) +HEruntable2017[3281] = (10650,40500,30000,"124","20e","1",EMAP_2017,19,4) +HEruntable2017[3280] = (10650,40500,30000,"124","20e","1",EMAP_2017,19,4) +HEruntable2017[3341] = (10650,40500,20000,"124","30e","1",EMAP_2017,19,4) +HEruntable2017[3342] = (10650,40500,20000,"124","30e","6",EMAP_2017,19,4) +HEruntable2017[3343] = (10650,40500,20000,"124","30e","1",EMAP_2017,19,4) +HEruntable2017[3344] = (10650,40500,20000,"124","30e","1",EMAP_2017,19,4) +HEruntable2017[3337] = (10650,40500,20000,"124","80e","1",EMAP_2017,19,4) +HEruntable2017[3338] = (10650,40500,20000,"124","80e","6",EMAP_2017,19,4) +HEruntable2017[3339] = (10650,40500,20000,"124","80e","1",EMAP_2017,19,4) +HEruntable2017[3340] = (10650,40500,20000,"124","80e","1",EMAP_2017,19,4) +HEruntable2017[3314] = (10650,40500,20000,"124","200e+","1",EMAP_2017,19,4) +HEruntable2017[3374] = (10650,40500,20000,"124","200e+","1",EMAP_2017,19,4) +HEruntable2017[3315] = (10650,40500,20000,"124","200e+","6",EMAP_2017,19,4) +HEruntable2017[3375] = (10650,40500,20000,"124","200e+","6",EMAP_2017,19,4) +HEruntable2017[3288] = (10650,40500,20000,"124","250e+","1",EMAP_2017,19,4) +HEruntable2017[3286] = (10650,40500,5000,"14","250e+","1",EMAP_2017,19,4) +HEruntable2017[3287] = (10650,40500,5000,"124","250e+","1",EMAP_2017,19,4) +HEruntable2017[3289] = (10650,40500,4500,"124","250e+","6",EMAP_2017,19,4) +HEruntable2017[3311] = (10650,40500,15000,"124","250e+","6",EMAP_2017,19,4) +HEruntable2017[3312] = (10650,40500,20000,"124","250e+","1",EMAP_2017,19,4) +HEruntable2017[3313] = (10650,40500,20000,"124","250e+","1",EMAP_2017,19,4) +HEruntable2017[3306] = (10650,40500,20000,"124","300e+","1",EMAP_2017,19,4) +HEruntable2017[3307] = (10650,40500,40000,"124","300e+","6",EMAP_2017,19,4) +HEruntable2017[3308] = (10650,40500,20000,"124","300e+","1",EMAP_2017,19,4) +HEruntable2017[3309] = (10650,40500,20000,"124","300e+","1",EMAP_2017,19,4) +HEruntable2017[3216] = (11125,62750,100000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3366] = (11125,62750,100000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3378] = (11095,62750,20000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3386] = (11155,62750,20000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3387] = (11155,62750,20000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3388] = (11170,62750,20000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3390] = (11170,62750,100000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3391] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3392] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3393] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3394] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3395] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3396] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3397] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3398] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3399] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3400] = (11170,62750,32700,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3401] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3402] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3403] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3404] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3405] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3406] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3407] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3408] = (11170,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3409] = (11170,62750,20000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3410] = (11170,62750,53000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3411] = (11230,62750,31000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3412] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3413] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3414] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3415] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3416] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3417] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3418] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3419] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3420] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3421] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3422] = (11230,62750,250000,"14","150m","1",EMAP_2017,-1,-1) +HEruntable2017[3427] = (10650,23400,10000,"124","150m","1",EMAP_2017,19,5) +HEruntable2017[3428] = (10650,23400,50000,"124","270p","1",EMAP_2017,19,5) +HEruntable2017[3429] = (10650,23400,100000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3430] = (10650,23400,50000,"124","250p","6",EMAP_2017,19,5) +HEruntable2017[3431] = (10650,23400,50000,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3432] = (10650,23400,25000,"124","200e","1",EMAP_2017,19,5) +HEruntable2017[3461] = (9500,23400,10000,"124","150m","1",EMAP_2017,16,5) +HEruntable2017[3462] = (10000,23400,10000,"124","150m","1",EMAP_2017,17,5) +HEruntable2017[3463] = (10350,23400,10000,"124","150m","1",EMAP_2017,18,5) +HEruntable2017[3464] = (10570,23400,30000,"124","150m","1",EMAP_2017,-1,5) +HEruntable2017[3460] = (10650,23400,10000,"124","150m","1",EMAP_2017,19,5) +HEruntable2017[3465] = (10650,23400,20000,"124","150m","1",EMAP_2017,19,5) +HEruntable2017[3466] = (10730,23400,30000,"124","150m","1",EMAP_2017,-1,5) +HEruntable2017[3467] = (10975,23400,10000,"124","150m","1",EMAP_2017,20,5) +HEruntable2017[3468] = (11075,23400,10000,"124","150m","1",EMAP_2017,21,5) +HEruntable2017[3469] = (11350,23400,10000,"124","150m","1",EMAP_2017,22,5) +HEruntable2017[3470] = (11625,23400,10000,"124","150m","1",EMAP_2017,23,5) +HEruntable2017[3471] = (11885,23400,10000,"124","150m","1",EMAP_2017,24,5) +HEruntable2017[3472] = (12160,23400,10000,"124","150m","1",EMAP_2017,25,5) +HEruntable2017[3481] = (10720,23400,100000,"124","300p","1",EMAP_2017,19,5) +HEruntable2017[3482] = (10720,23400,100000,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3487] = (10720,23400,5100,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3488] = (10720,23400,93700,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3489] = (10720,23400,19500,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3490] = (10720,23400,2600,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3493] = (10720,23400,190000,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3494] = (10720,23400,37900,"124","300p","6",EMAP_2017,19,5) +HEruntable2017[3436] = (10650,23400,50000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3483] = (10720,23400,27000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3484] = (10720,23400,75000,"124","250p","1",EMAP_2017,19,5) +HEruntable2017[3437] = (10650,23400,50000,"124","250p","6",EMAP_2017,19,5) +HEruntable2017[3441] = (10650,23400,100000,"124","200p","1",EMAP_2017,19,5) +HEruntable2017[3442] = (10650,23400,22000,"124","200p","6",EMAP_2017,19,5) +HEruntable2017[3443] = (10650,23400,100000,"124","200p","6",EMAP_2017,19,5) +HEruntable2017[3439] = (10650,23400,100000,"124","150p","1",EMAP_2017,19,5) +HEruntable2017[3440] = (10650,23400,100000,"124","150p","6",EMAP_2017,19,5) +HEruntable2017[3491] = (10720,23400,200000,"124","150p","6",EMAP_2017,19,5) +HEruntable2017[3495] = (10720,23400,22100,"124","150p","6",EMAP_2017,19,5) +HEruntable2017[3496] = (10720,23400,86200,"124","150p","6",EMAP_2017,19,5) +HEruntable2017[3445] = (10650,23400,100000,"124","100p","1",EMAP_2017,19,5) +HEruntable2017[3446] = (10650,23400,100000,"124","100p","6",EMAP_2017,19,5) +HEruntable2017[3480] = (10720,23400,20000,"124","80p","6",EMAP_2017,19,5) +HEruntable2017[3479] = (10720,23400,20000,"124","50p","6",EMAP_2017,19,5) +HEruntable2017[3492] = (10720,23400,50000,"124","50p","6",EMAP_2017,19,5) +HEruntable2017[3447] = (10650,23400,40000,"124","200e","1",EMAP_2017,19,5) +HEruntable2017[3458] = (10650,23400,40000,"124","200e","1",EMAP_2017,19,5) +HEruntable2017[3448] = (10650,23400,40000,"124","200e","6",EMAP_2017,19,5) +HEruntable2017[3459] = (10650,23400,40000,"124","200e","6",EMAP_2017,19,5) +HEruntable2017[3449] = (10650,23400,12000,"124","120e","1",EMAP_2017,19,5) +HEruntable2017[3450] = (10650,23400,30000,"124","120e","1",EMAP_2017,19,5) +HEruntable2017[3451] = (10650,23400,30000,"124","120e","6",EMAP_2017,19,5) +HEruntable2017[3452] = (10650,23400,30000,"124","80e","1",EMAP_2017,19,5) +HEruntable2017[3453] = (10650,23400,30000,"124","80e","6",EMAP_2017,19,5) +HEruntable2017[3454] = (10650,23400,30000,"124","30e","1",EMAP_2017,19,5) +HEruntable2017[3455] = (10650,23400,30000,"124","30e","6",EMAP_2017,19,5) + +###################################### +#HB Testbeam 2017 +###################################### + +HBruntable2017 = {} + +HBruntable2017[3526] = (8727,23401,2000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3527] = (8727,23401,200,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3528] = (8727,23401,200,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3529] = (8727,23401,10000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3530] = (8727,23401,10000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3531] = (8727,23401,100000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3532] = (8727,23401,20000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3534] = (8727,23401,20000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3535] = (8727,23401,20000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3536] = (8727,23401,20000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3537] = (8727,23401,20000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3538] = (8727,23401,2000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3539] = (8727,23401,2000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3540] = (8727,23401,10000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3541] = (8727,23401,10000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3542] = (8727,23401,5000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3543] = (8727,23401,5000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3544] = (8727,23401,2000,"","m","1",HB_EMAP_2017,13,5) +HBruntable2017[3545] = (6716,23401,10000,"","m","1",HB_EMAP_2017,9,5) +HBruntable2017[3546] = (6716,23401,10000,"","m","1",HB_EMAP_2017,9,5) +HBruntable2017[3547] = (6716,23401,10000,"","m","1",HB_EMAP_2017,9,5) +HBruntable2017[3548] = (6716,23401,10000,"","m","1",HB_EMAP_2017,9,5) +HBruntable2017[3549] = (6716,23401,10000,"","m","1",HB_EMAP_2017,9,5) +HBruntable2017[3550] = (6716,23401,10000,"","m","1",HB_EMAP_2017,9,5) +HBruntable2017[3551] = (6716,23401,10000,"","m","1",HB_EMAP_2017,9,5) +HBruntable2017[3552] = (6716,23401,100000,"","m","1",HB_EMAP_2017,9,5) +HBruntable2017[3553] = (6716,23401,10000,"","m","1",HB_EMAP_2017,9,5) +HBruntable2017[3554] = (4853,23401,10000,"","m","1",HB_EMAP_2017,6,5) +HBruntable2017[3555] = (4853,23401,2700,"","m","1",HB_EMAP_2017,6,5) +HBruntable2017[3556] = (4853,23401,5000,"","m","1",HB_EMAP_2017,6,5) +HBruntable2017[3557] = (4853,23401,5000,"","m","1",HB_EMAP_2017,6,5) +HBruntable2017[3558] = (4853,23401,5000,"","m","1",HB_EMAP_2017,6,5) +HBruntable2017[3559] = (4853,23401,5000,"","m","1",HB_EMAP_2017,6,5) +HBruntable2017[3560] = (4853,23401,100000,"","m","1",HB_EMAP_2017,6,5) +HBruntable2017[3561] = (4853,23401,5000,"","m","1",HB_EMAP_2017,6,5) +HBruntable2017[3562] = (4853,23401,5000,"","m","1",HB_EMAP_2017,6,5) +HBruntable2017[3563] = (7787,23401,5000,"","m","1",HB_EMAP_2017,11,5) +HBruntable2017[3564] = (7787,23401,5000,"","m","1",HB_EMAP_2017,11,5) +HBruntable2017[3565] = (7787,23401,5000,"","m","1",HB_EMAP_2017,11,5) +HBruntable2017[3566] = (7787,23401,5000,"","m","1",HB_EMAP_2017,11,5) +HBruntable2017[3567] = (7787,23401,5000,"","m","1",HB_EMAP_2017,11,5) +HBruntable2017[3568] = (7787,23401,5000,"","m","1",HB_EMAP_2017,11,5) +HBruntable2017[3569] = (7787,23401,5000,"","m","1",HB_EMAP_2017,11,5) +HBruntable2017[3570] = (7787,23401,50000,"","m","1",HB_EMAP_2017,11,5) ###################################### # Put all runs together @@ -686,7 +740,7 @@ runTable_Aug15, runTable_Aug14, runTable_Aug13, runTable_Ph2_Aug14, runTable_Ph2_Aug15, runTable_muons_specialODU, runTable_pions_specialODU, - runTable_muons_specialODU_forPhase2,runtable2017]: + runTable_muons_specialODU_forPhase2, HEruntable2017, HBruntable2017]: runTable_all.update(dictionary) def getEmapFromRun(run): @@ -714,3 +768,14 @@ def getShuntFromRun(run): shunt = shunt_conversion[shunt_string] return shunt +def getBeamEtaFromRun(run): + beamEta = -1. + if run in runTable_all: + beamEta = runTable_all[run][7] + return beamEta + +def getBeamPhiFromRun(run): + beamPhi = -1. + if run in runTable_all: + beamPhi = runTable_all[run][8] + return beamPhi diff --git a/UserCode/H2TestBeamAnalyzer/src/H2TestBeamAnalyzer.cc b/UserCode/H2TestBeamAnalyzer/src/H2TestBeamAnalyzer.cc index 83e1ff6..4df7da8 100644 --- a/UserCode/H2TestBeamAnalyzer/src/H2TestBeamAnalyzer.cc +++ b/UserCode/H2TestBeamAnalyzer/src/H2TestBeamAnalyzer.cc @@ -386,6 +386,7 @@ void H2TestBeamAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup int mark_bad = 0; int mark_adc = 0; int mark_tdc = 0; + int coutStuff = 0; // // Extracting All the Collections containing useful Info @@ -803,9 +804,9 @@ void H2TestBeamAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup mark_adc = adc; mark_tdc = tdc; - if (_verbosity>0) - std::cout << "Mark TS " << EventNumber << ":" << i << " bad, code=" << mark_bad << ", adc=" << mark_adc << ", tdc=" << mark_tdc << std::endl; - + if (_verbosity>0 && coutStuff == 1) + std::cout << "Mark TS " << EventNumber << ":" << i << " bad, code=" << mark_bad << ", adc=" << mark_adc << ", tdc=" << mark_tdc << std::endl; + } // compute ped from TS 1&2 @@ -914,7 +915,7 @@ void H2TestBeamAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup mark_adc = adc; mark_tdc = tdc; - if (_verbosity==0) + if (_verbosity==0 && coutStuff == 1) std::cout << "Mark TS1 " << EventNumber << ":" << i << " bad, code=" << mark_bad << ", adc=" << mark_adc << ", tdc=" << mark_tdc << std::endl; } @@ -924,7 +925,7 @@ void H2TestBeamAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup mark_adc = adc; mark_tdc = tdc; - if (_verbosity==0) + if (_verbosity==0 && coutStuff == 1) std::cout << "Mark TS2 " << EventNumber << ":" << i << " bad, code=" << mark_bad << ", adc=" << mark_adc << ", tdc=" << mark_tdc << std::endl; } @@ -1051,8 +1052,10 @@ void H2TestBeamAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup _treeWC->Fill(); _treeBC->Fill(); _treeTiming->Fill(); - } else { - std::cout << "Mark event " << EventNumber << " bad, code=" << mark_bad << ", adc=" << mark_adc << std::endl; + } + else { + if (coutStuff == 1) + std::cout << "Mark event " << EventNumber << " bad, code=" << mark_bad << ", adc=" << mark_adc << std::endl; } return; diff --git a/UserCode/H2TestBeamAnalyzer/tb_ana.py b/UserCode/H2TestBeamAnalyzer/tb_ana.py index 1597715..280f9aa 100644 --- a/UserCode/H2TestBeamAnalyzer/tb_ana.py +++ b/UserCode/H2TestBeamAnalyzer/tb_ana.py @@ -8,15 +8,18 @@ import array import time import numpy + from math import exp, sqrt +from runlists import getBeamEtaFromRun +from runlists import getBeamPhiFromRun HCAL_DET_ngHB = 21 HCAL_DET_ngHE = 22 HCAL_DET_HBHE = 26 HCAL_DET_HF = 27 - -edges10_list = [1.58, 4.73, 7.88, 11.0, 14.2, 17.3, 20.5, 23.6, +edges10_list = [ + 1.58, 4.73, 7.88, 11.0, 14.2, 17.3, 20.5, 23.6, 26.8, 29.9, 33.1, 36.2, 39.4, 42.5, 45.7, 48.8, 53.6, 60.1, 66.6, 73.0, 79.5, 86.0, 92.5, 98.9, 105, 112, 118, 125, 131, 138, 144, 151, @@ -47,7 +50,91 @@ 121000, 125000, 128000, 131000, 137000, 145000, 152000, 160000, 168000, 176000, 183000, 191000, 199000, 206000, 214000, 222000, 230000, 237000, 245000, 253000, 261000, 268000, 276000, 284000, - 291000, 302000, 316000, 329000, 343000, 356000, 370000, 384000, 398000] + 291000, 302000, 316000, 329000, 343000, 356000, 370000, 384000, 398000, + 410000, 430000, 450000, 470000, 520000, 550000, 580000, 640000, 680000 +] +edgesChris_list = [ + -16.000000, -12.875000, -9.750000, -6.625000, -3.500000, -0.375000, 2.750000, 5.875000, + 9.000000, 12.125000, 15.250000, 18.375000, 21.500000, 24.625000, 27.750000, 30.875000, + 34.000000, 40.200000, 46.400000, 52.600000, 58.800000, 65.000000, 71.200000, 77.400000, + 83.600000, 89.800000, 96.000000, 102.200000, 108.400000, 114.600000, 120.800000, 127.000000, + 133.200000, 139.400000, 145.600000, 151.800000, 158.000000, 170.428571, 182.857143, 195.285714, + 207.714286, 220.142857, 232.571429, 245.000000, 257.428571, 269.857143, 282.285714, 294.714286, + 307.142857, 319.571429, 332.000000, 344.428571, 356.857143, 369.285714, 381.714286, 394.142857, + 406.571429, 419.000000, 443.800000, 468.600000, 493.400000, 518.200000, 543.000000, 567.800000, + 592.600000, 617.400000, 642.200000, 667.000000, 691.800000, 716.600000, 741.400000, 766.200000, + 791.000000, 815.800000, 840.600000, 865.400000, 890.200000, 915.000000, 964.750000, 1014.500000, + 1064.250000, 1114.000000, 1163.750000, 1213.500000, 1263.250000, 1313.000000, 1362.750000, 1412.500000, + 1462.250000, 1512.000000, 1561.750000, 1611.500000, 1661.250000, 1711.000000, 1760.750000, 1810.500000, + 1860.250000, 1910.000000, 2009.047619, 2108.095238, 2207.142857, 2306.190476, 2405.238095, 2504.285714, + 2603.333333, 2702.380952, 2801.428571, 2900.476190, 2999.523810, 3098.571429, 3197.619048, 3296.666667, + 3395.714286, 3494.761905, 3593.809524, 3692.857143, 3791.904762, 3890.952381, 3990.000000, 4188.500000, + 4387.000000, 4585.500000, 4784.000000, 4982.500000, 5181.000000, 5379.500000, 5578.000000, 5776.500000, + 5975.000000, 6173.500000, 6372.000000, 6570.500000, 6769.000000, 6967.500000, 7166.000000, 7364.500000, + 7563.000000, 7761.500000, 7960.000000, 8357.000000, 8754.000000, 9151.000000, 9548.000000, 9945.000000, + 10342.000000, 10739.000000, 11136.000000, 11533.000000, 11930.000000, 12327.000000, 12724.000000, 13121.000000, + 13518.000000, 13915.000000, 14312.000000, 14709.000000, 15106.000000, 15503.000000, 15900.000000, 16695.238095, + 17490.476190, 18285.714286, 19080.952381, 19876.190476, 20671.428571, 21466.666667, 22261.904762, 23057.142857, + 23852.380952, 24647.619048, 25442.857143, 26238.095238, 27033.333333, 27828.571429, 28623.809524, 29419.047619, + 30214.285714, 31009.523810, 31804.761905, 32600.000000, 34185.000000, 35770.000000, 37355.000000, 38940.000000, + 40525.000000, 42110.000000, 43695.000000, 45280.000000, 46865.000000, 48450.000000, 50035.000000, 51620.000000, + 53205.000000, 54790.000000, 56375.000000, 57960.000000, 59545.000000, 61130.000000, 62715.000000, 64300.000000, + 67485.000000, 70670.000000, 73855.000000, 77040.000000, 80225.000000, 83410.000000, 86595.000000, 89780.000000, + 92965.000000, 96150.000000, 99335.000000, 102520.000000, 105705.000000, 108890.000000, 112075.000000, 115260.000000, + 118445.000000, 121630.000000, 124815.000000, 128000.000000, 134333.333333, 140666.666667, 147000.000000, 153333.333333, + 159666.666667, 166000.000000, 172333.333333, 178666.666667, 185000.000000, 191333.333333, 197666.666667, 204000.000000, + 210333.333333, 216666.666667, 223000.000000, 229333.333333, 235666.666667, 242000.000000, 248333.333333, 254666.666667, + 261000.000000, 273696.969697, 286393.939394, 299090.909091, 311787.878788, 324484.848485, 337181.818182, 349878.787879, + 362575.757576, 375272.727273, 387969.696970, 400666.666667, 413363.636364, 426060.606061, 438757.575758, 451454.545455, + 464151.515152, 476848.484848, 489545.454545, 502242.424242, 514939.393939, 527636.363636, 540333.333333, 553030.303030, + 565727.272727, 578424.242424, 591121.212121, 603818.181818, 616515.151515, 629212.121212, 641909.090909, 654606.060606, + 667303.030303, 680000.000000 +] +#edgesChris_list = [0, +# 3.1, 6.2, 9.3, 12.4, 15.5, 18.6, 21.7, 24.8, +# 27.9, 31, 34.1, 37.2, 40.3, 43.4, 46.5, 49.6, +# 52.7, 55.8, 58.9, 62, 65.1, 68.2, 71.3, 74.4, +# 77.5, 80.6, 83.7, 86.8, 89.9, 93, 96.1, 99.2, +# 102.3, 105.4, 108.5, 111.6, 114.7, 117.8, 120.9, 124, +# 127.1, 130.2, 133.3, 136.4, 139.5, 142.6, 145.7, 148.8, +# 151.9, 155, 158.1, 161.2, 164.3, 167.4, 170.5, 173.6, +# 176.7, 179.8, 182.9, 186, 189.1, 192.2, 195.3, 198.4, +# 201.5, 204.6, 207.7, 210.8, 213.9, 217, 220.1, 223.2, +# 226.3, 229.4, 232.5, 235.6, 238.7, 241.8, 244.9, 248, +# 251.1, 254.2, 257.3, 260.4, 263.5, 266.6, 269.7, 272.8, +# 275.9, 279, 282.1, 285.2, 288.3, 291.4, 294.5, 297.6, +# 300.7, 303.8, 306.9, 310, 313.1, 316.2, 319.3, 322.4, +# 325.5, 328.6, 331.7, 334.8, 337.9, 341, 344.1, 347.2, +# 350.3, 353.4, 356.5, 359.6, 362.7, 365.8, 368.9, 372, +# 375.1, 378.2, 381.3, 384.4, 387.5, 390.6, 393.7, 396.8, +# 399.9, 403, 406.1, 418, 431, 444, 464, +# 490, 516, 542, 568, 594, 620, 645, 670, +# 695, 720, 745, +# 771, 796, 821, 846, 871, 897, 922, 947, +# 960, 1010, 1060, 1120, 1170, 1220, 1270, 1320, +# 1370, 1430, 1480, 1530, 1580, 1630, 1690, 1740, +# 1790, 1840, 1890, 1940, 2020, 2120, 2230, 2330, +# 2430, 2540, 2640, 2740, 2850, 2950, 3050, 3150, +# 3260, 3360, 3460, 3570, 3670, 3770, 3880, 3980, +# 4080, 4240, 4450, 4650, 4860, 5070, 5280, 5490, +# 5680, 5880, 6080, 6280, 6480, +# 6680, 6890, 7090, 7290, 7490, 7690, 7890, 8090, +# 8400, 8810, 9220, 9630, 10000, 10400, 10900, 11300, +# 11700, 12100, 12500, 12900, 13300, 13700, 14100, 14500, +# 15000, 15400, 15800, 16200, 16800, 17600, 18400, 19300, +# 20100, 20900, 21700, 22500, 23400, 24200, 25000, 25800, +# 26600, 27500, 28300, 29100, 29900, 30700, 31600, 32400, +# 33200, 34400, 36100, 37700, 39400, 41000, 42700, 44300, +# 45900, 47600, 49200, 50800, 52500, +# 54100, 55700, 57400, 59000, 60600, 62200, 63900, 65500, +# 68000, 71300, 74700, 78000, 81400, 84700, 88000, 91400, +# 94700, 98100, 101000, 105000, 108000, 111000, 115000, 118000, +# 121000, 125000, 128000, 131000, 137000, 145000, 152000, 160000, +# 168000, 176000, 183000, 191000, 199000, 206000, 214000, 222000, +# 230000, 237000, 245000, 253000, 261000, 268000, 276000, 284000, +# 291000, 302000, 316000, 329000, 343000, 356000, 370000, 384000, 398000, +# 410000, 430000, 450000, 470000, 520000, 550000, 580000, 640000, 680000 +#] ####################### # Get options @@ -81,6 +168,7 @@ help="Number of time samples to use as signal (default: %default)") parser.add_option ('--adc', dest='adc', action='store_true', default = False, + #action='store_true', default = True, help="Turn off lineariziation of ADC counts") parser.add_option ('--verbose', dest='verbose', action='store_true', default=False, @@ -107,6 +195,12 @@ emapFile = options.emap shunt = options.shunt +#Get the Eta and Phi that the Beam is pointed at +beamEta = int(getBeamEtaFromRun(int(runnum))) +beamPhi = int(getBeamPhiFromRun(int(runnum))) + +print "Run:%i Beam Pointed at Eta:%i Phi:%i" % (runnum,beamEta,beamPhi) + # Do some sanity checks if infile is None: print "You did not provide an input file! Exiting." @@ -118,7 +212,6 @@ print "You did not provide a run number! Exiting." sys.exit() - # The following is needed to get the chanmap and associated # variables from a tb_chanmap_* file, where the filename # is known only at runtime. This could be improved. @@ -137,8 +230,11 @@ # Scale bin edges according to shunt value edges10_np = numpy.array(edges10_list) edges10_np = edges10_np/shunt +edgesChris_np = numpy.array(edgesChris_list) +edgesChris_np = edgesChris_np/shunt edges10 = array.array('d', edges10_np) +edgesChris = array.array('d', edgesChris_np) ####################### # Set ROOT options @@ -263,7 +359,7 @@ for ivname in vname["hf"]: ntp["hf"].SetBranchAddress(ivname, ROOT.AddressOf(shf, ivname)) -ROOT.gROOT.ProcessLine("struct qie11_struct {Int_t numChs; Int_t numTS; Int_t iphi[%(dg)d]; Int_t ieta[%(dg)d]; Int_t depth[%(dg)d]; Float_t pulse[%(dg)d * %(ts)d]; Float_t ped[%(dg)d]; UChar_t pulse_adc[%(dg)d * %(ts)d]; Float_t ped_adc[%(dg)d]; bool capid_error[%(dg)d]; bool link_error[%(dg)d]; bool soi[%(dg)d * %(ts)d]; Int_t TSn[%(dg)d * %(ts)d]; Int_t TDC[%(dg)d * %(ts)d];};" % {"dg": MAXDIGIS, "ts": MAXTS}) +ROOT.gROOT.ProcessLine("struct qie11_struct {Int_t numChs; Int_t numTS; Int_t iphi[%(dg)d]; Int_t ieta[%(dg)d]; Int_t depth[%(dg)d]; Float_t pulse[%(dg)d * %(ts)d]; UChar_t pulse_adc[%(dg)d * %(ts)d]; Float_t ped[%(dg)d]; Float_t ped_adc[%(dg)d]; bool capid_error[%(dg)d]; bool link_error[%(dg)d]; bool soi[%(dg)d * %(ts)d]; Int_t TSn[%(dg)d * %(ts)d]; Int_t TDC[%(dg)d * %(ts)d];};" % {"dg": MAXDIGIS, "ts": MAXTS}) sqie11 = ROOT.qie11_struct() for ivname in vname["qie11"]: ntp["qie11"].SetBranchAddress(ivname, ROOT.AddressOf(sqie11, ivname)) @@ -376,7 +472,7 @@ # Particle ID stuff (PID) hist["pid"] = ROOT.TH1F("pid", "pid", 3, 0.5, 3.5) # 1 = muon, 2 = pion, 3 = electron hist["nPass"] = ROOT.TH1F("nPass", "nPass", 7, -0.5, 6.5) -hist["frac19_5_2"] = ROOT.TH1F("frac19_5_2", "frac19_5_2", 100, 0.0, 1.0) +hist["fracBeam_dep2"] = ROOT.TH1F("fracBeam_dep2", "fracBeam_dep2", 100, 0.0, 1.0) @@ -386,21 +482,23 @@ iphi = chanmap[ichan][1] depth = chanmap[ichan][2] label = "ieta" + str(ieta) + "_iphi" + str(iphi) + "_depth" + str(depth) + label2 = str(ieta) + "_" + str(iphi) + "_" + str(depth) hist["avgpulse", ichan] = ROOT.TProfile("AvgPulse_"+label, "AvgPulse_"+label, 10, -0.5, 9.5) for its in range(10): hist["charge", ichan, its] = ROOT.TH1F("Charge_"+label+"_ts"+str(its), "Charge_"+label+"_ts"+str(its), 8000, 0., 8000.) - hist["e_4TS_noPS", ichan] = ROOT.TH1F("Energy_noPS_%s"%label, "Energy_noPS_%s"%label, 247, edges10) + hist["e_4TS_noPS", ichan] = ROOT.TH1F("Energy_noPS_%s"%label, "Energy_noPS_%s"%label, 256, edges10) + hist["adc_nosub_binChris",int(float(ieta)),int(float(iphi)),int(float(depth))] = ROOT.TH1F("adc_nosub_binChris_" +label2, "adc_nosub_binChris_" +label2, 273, edgesChris) #334 + hist["real_adc_nosub_binChris",int(float(ieta)),int(float(iphi)),int(float(depth))] = ROOT.TH1F("real_adc_nosub_binChris_" +label2, "real_adc_nosub_binChris_" +label2, 256, 0, 255) #334 + hist["e_4TS_PS" , ichan] = ROOT.TH1F("Energy_" +label, "Energy_" +label, 256, edges10) + hist["TDC_v_charge" , ichan] = ROOT.TH2F("TDC_v_charge_" +label, "TDC_v_charge_" +label, 8000, 0., 8000., 1001, -0.5, 1000.5) + hist["time_v_charge", ichan] = ROOT.TH2F("time_v_charge_" +label, "time_v_charge_" +label, 8000, 0., 8000., 76, -0.5, 75.5) # 0 = start of TS3, 75 is end of TS5 + hist["time_v_etime" , ichan] = ROOT.TH2F("time_v_etime_" +label, "time_v_etime_" +label, 251, -75.5, 175.5, 251, -75.5, 175.5) + hist["time", ichan] = ROOT.TH1F("time_" +label, "time_" +label, 76 , -0.5, 75.5) # 0 = start of TS3, 75 is end of TS5 + hist["TDC" , ichan] = ROOT.TH1F("TDC_" +label, "TDC_" +label, 1001, -0.5, 1000.5) # 0 = start of TS3, 75 is end of TS5 #print "Nbins: %i, lowedge: "%(hist["e_4TS_noPS", ichan].GetNbinsX()) #print [hist["e_4TS_noPS", ichan].GetXaxis().GetBinLowEdge(i) for i in xrange(1,247)] - hist["e_4TS_PS" , ichan] = ROOT.TH1F("Energy_" +label, "Energy_" +label, 247, edges10) - hist["TDC_v_charge" , ichan] = ROOT.TH2F("TDC_v_charge_" +label, "TDC_v_charge_" +label, 8000, 0., 8000., 1001, -0.5, 1000.5) - hist["time_v_charge", ichan] = ROOT.TH2F("time_v_charge_"+label, "time_v_charge_"+label, 8000, 0., 8000., 76, -0.5, 75.5) # 0 = start of TS3, 75 is end of TS5 - hist["time_v_etime" , ichan] = ROOT.TH2F("time_v_etime_" +label, "time_v_etime_" +label, 251, -75.5, 175.5, 251, -75.5, 175.5) - hist["time", ichan] = ROOT.TH1F("time_" +label, "time_" +label, 76 , -0.5, 75.5) # 0 = start of TS3, 75 is end of TS5 - hist["TDC" , ichan] = ROOT.TH1F("TDC_" +label, "TDC_" +label, 1001, -0.5, 1000.5) # 0 = start of TS3, 75 is end of TS5 - @@ -675,22 +773,23 @@ #if not clean: continue charge = {} + charge_adc = {} energy = {} tdc = {} # PID variables ################ - e19_5 = {} # dictionary for holding energies of depths in tower ieta19, iphi5 + eBeam = {} # dictionary for holding energies of depths for tower the beam is pointed at for idep in range(2,7): - e19_5[idep] = 0. + eBeam[idep] = 0. showerE = 0. # shower energy showerChans = [] # channels in which to sum shower energy - for ieta in range(18,21): - for idep in range(2,7): - showerChans.append((ieta, 5, idep)) - - + for ieta in range(beamEta-1,beamEta+2): + for iphi in range(beamPhi-1,beamPhi+2): + for idep in range(2,7): + showerChans.append((ieta, iphi, idep)) + for ichan,rchan in fchan.iteritems(): ieta, iphi, depth = chanmap[ichan] detType = fread[(ieta,iphi,depth)].detType[rchan] @@ -708,6 +807,7 @@ energy[ichan,its] = charge[ichan,its] else: charge[ichan,its] = fread[(ieta,iphi,depth)].pulse[rchan*MAXTS+its] #[row][col] -> [row*n_cols + col] + charge_adc[ichan,its] = fread[(ieta,iphi,depth)].adc[rchan*MAXTS+its] energy[ichan,its] = charge[ichan,its]*calib[ichan] # TDC only available for QIE11 not HBHE @@ -723,34 +823,39 @@ # ped_esum += energy[ichan,its] #ped_avg = ped_esum/len(ped_ts_list) esum[ichan, "PED"] = fread[(ieta,iphi,depth)].ped[rchan]*calib[ichan] - esum[ichan, "PED_ADC"] = fread[(ieta,iphi,depth)].adc[rchan] if verbose: print "Pedestal (fC) = %s" % (fread[(ieta,iphi,depth)].ped[rchan]) - print "Pedestal (ADC counts) = %s" % (fread[(ieta,iphi,depth)].adc[rchan]) # Compute signal and pedestal-subtracted signal ts_list = xrange(3,3+sigTS) # [3,4,5,6,7,8,9] #time samples in which to sum charge for signal - if (nts == 8): ts_list = range(2,7) #temporary use for HB + ###if (nts == 8): ts_list = range(2,7) #temporary use for HB + if (nts == 8): ts_list = 7 #temporary use for HB sig_esum = 0. sig_esum_ps = 0. - for its in ts_list: + adc_sig_esum = 0 + ###for its in ts_list: + if(ts_list == 7): + its = ts_list if adc: sig_esum += charge_adc[ichan,its] - sig_esum_ps += charge_adc[ichan,its] - esum[ichan, "PED_ADC"] #pedestal-subtracted energy else: sig_esum += energy[ichan,its] sig_esum_ps += energy[ichan,its] - esum[ichan, "PED"] #pedestal-subtracted energy + adc_sig_esum += charge_adc[ichan,its] esum[ichan, "4TS_noPS"] = sig_esum esum[ichan, "4TS_PS"] = sig_esum_ps + esum[int(float(ieta)),int(float(iphi)),int(float(depth)),"noPS"] = sig_esum + esum[int(float(ieta)),int(float(iphi)),int(float(depth)),"PS"] = sig_esum_ps + esum[int(float(ieta)),int(float(iphi)),int(float(depth)),"adc_noPS"] = adc_sig_esum # fill pid vars if (ieta,iphi,depth) in showerChans: #print "(ieta,iphi,depth,energy) =",ieta,iphi,depth,esum[ichan, "4TS_PS"] #JRD showerE += esum[ichan, "4TS_PS"] - if ieta == 19 and iphi == 5 and depth in range(2,7): - e19_5[depth] = esum[ichan, "4TS_PS"] + if ieta == beamEta and iphi == beamPhi and depth in range(2,7): + eBeam[depth] = esum[ichan, "4TS_PS"] # Fill histograms #################### @@ -836,6 +941,35 @@ hist["e_wcC_noTScut" , ichan].Fill(x,y) hist["e_wcC_x_noTScut", ichan].Fill(x) hist["e_wcC_y_noTScut", ichan].Fill(y) + + # Fill Chris' noPS charge plots + ############################### + if fillEplots: + for eta in range(1,26): + for phi in range(3,7): + for idepth in range(1,8): + #Cut for isolated muon + e_neighbor = 0. + if (eta,phi,idepth,'noPS') in esum: + hist["real_adc_nosub_binChris",eta,phi,idepth].Fill(esum[eta,phi,idepth, "adc_noPS"]) + for e in range(eta-1,eta+2): + for p in range(phi-1,phi+2): + if (e,p,idepth,'noPS') in esum: + e_neighbor += esum[e,p,idepth,"noPS"] + e_neighbor -= esum[eta,phi,idepth,"noPS"] + if e_neighbor < 6*41: + #Cut for muon in whole tower + #print e_neighbor + #print esum[eta,phi,idepth, "noPS"] + if idepth == 2 and (esum[eta,phi,3,"noPS"] > 2*41): + if (eta,phi,2,'noPS') in esum: + #print esum[eta,phi,idepth, "noPS"] + hist["adc_nosub_binChris",eta,phi,idepth].Fill(esum[eta,phi,idepth, "noPS"]) + #hist["real_adc_nosub_binChris",eta,phi,idepth].Fill(esum[eta,phi,idepth, "adc_noPS"]) + if idepth == 3 and (esum[eta,phi,2,"noPS"] > 2*41): + if (eta,phi,3,'noPS') in esum: + hist["adc_nosub_binChris",eta,phi,idepth].Fill(esum[eta,phi,idepth, "noPS"]) + #hist["real_adc_nosub_binChris",eta,phi,idepth].Fill(esum[eta,phi,idepth, "adc_noPS"]) # Do PID ############## @@ -846,25 +980,25 @@ nPass = 0 for idep in range(2,7): if shunt == 6: - if e19_5[idep] > 20. and e19_5[idep] < 600.: nPass += 1 + if eBeam[idep] > 20. and eBeam[idep] < 600.: nPass += 1 elif shunt == 1: - if e19_5[idep] > 120. and e19_5[idep] < 3600.: nPass += 1 + if eBeam[idep] > 120. and eBeam[idep] < 3600.: nPass += 1 if nPass >= 4: isMuon = True #electron - e19_5_2_frac = 0. + eBeam_dep2_frac = 0. if showerE > 0.: - e19_5_2_frac = e19_5[2]/showerE + eBeam_dep2_frac = eBeam[2]/showerE - if not isMuon and e19_5_2_frac > 0.9: isElectron = True + if not isMuon and eBeam_dep2_frac > 0.9: isElectron = True if isMuon : hist["pid"].Fill(1) elif isElectron : hist["pid"].Fill(2) else : hist["pid"].Fill(3) hist["nPass"].Fill(nPass) - hist["frac19_5_2"].Fill(e19_5_2_frac) + hist["fracBeam_dep2"].Fill(eBeam_dep2_frac) ###Sort the histograms SortedHist = outtfile.mkdir("SortedHist") @@ -873,6 +1007,7 @@ Link_Error_hist = SortedHist.mkdir("Link_Error_hist") AvgPulse_hist = SortedHist.mkdir("AvgPulse_hist") Energy_hist = SortedHist.mkdir("Energy_hist") +Chris_noPS_hist = SortedHist.mkdir("Chris_noPS_hist") other_hist = SortedHist.mkdir("Other_hist") #h_x_hist = SortedHist.mkdir("h_x_hist") #h_y_hist = SortedHist.mkdir("h_y_hist") @@ -899,6 +1034,12 @@ elif key[0].find("e") >= 0: Energy_hist.cd() val.Write() + elif key[0].find("binChris") >= 0: + Chris_noPS_hist.cd() + val.Write() + elif key[0].find("real") >= 0: + Chris_noPS_hist.cd() + val.Write() else: other_hist.cd() val.Write() @@ -918,8 +1059,6 @@ outtfile.cd() - - # #print "Fraction of events with N hits in each WC view" #print "============================================================" diff --git a/UserCode/adcHists/plugins/adcHists.cc b/UserCode/adcHists/plugins/adcHists.cc index 6b084eb..63bce75 100644 --- a/UserCode/adcHists/plugins/adcHists.cc +++ b/UserCode/adcHists/plugins/adcHists.cc @@ -86,6 +86,52 @@ double edges10[257] = { 410000, 430000, 450000, 470000, 520000, 550000, 580000, 640000, 680000 }; +double edgesChris[334] = { + 3.1, 6.2, 9.3, 12.4, 15.5, 18.6, 21.7, 24.8, + 27.9, 31, 34.1, 37.2, 40.3, 43.4, 46.5, 49.6, + 52.7, 55.8, 58.9, 62, 65.1, 68.2, 71.3, 74.4, + 77.5, 80.6, 83.7, 86.8, 89.9, 93, 96.1, 99.2, + 102.3, 105.4, 108.5, 111.6, 114.7, 117.8, 120.9, 124, + 127.1, 130.2, 133.3, 136.4, 139.5, 142.6, 145.7, 148.8, + 151.9, 155, 158.1, 161.2, 164.3, 167.4, 170.5, 173.6, + 176.7, 179.8, 182.9, 186, 189.1, 192.2, 195.3, 198.4, + 201.5, 204.6, 207.7, 210.8, 213.9, 217, 220.1, 223.2, + 226.3, 229.4, 232.5, 235.6, 238.7, 241.8, 244.9, 248, + 251.1, 254.2, 257.3, 260.4, 263.5, 266.6, 269.7, 272.8, + 275.9, 279, 282.1, 285.2, 288.3, 291.4, 294.5, 297.6, + 300.7, 303.8, 306.9, 310, 313.1, 316.2, 319.3, 322.4, + 325.5, 328.6, 331.7, 334.8, 337.9, 341, 344.1, 347.2, + 350.3, 353.4, 356.5, 359.6, 362.7, 365.8, 368.9, 372, + 375.1, 378.2, 381.3, 384.4, 387.5, 390.6, 393.7, 396.8, + 399.9, 403, 406.1, 418, 431, 444, 464, + 490, 516, 542, 568, 594, 620, 645, 670, + 695, 720, 745, + 771, 796, 821, 846, 871, 897, 922, 947, + 960, 1010, 1060, 1120, 1170, 1220, 1270, 1320, + 1370, 1430, 1480, 1530, 1580, 1630, 1690, 1740, + 1790, 1840, 1890, 1940, 2020, 2120, 2230, 2330, + 2430, 2540, 2640, 2740, 2850, 2950, 3050, 3150, + 3260, 3360, 3460, 3570, 3670, 3770, 3880, 3980, + 4080, 4240, 4450, 4650, 4860, 5070, 5280, 5490, + 5680, 5880, 6080, 6280, 6480, + 6680, 6890, 7090, 7290, 7490, 7690, 7890, 8090, + 8400, 8810, 9220, 9630, 10000, 10400, 10900, 11300, + 11700, 12100, 12500, 12900, 13300, 13700, 14100, 14500, + 15000, 15400, 15800, 16200, 16800, 17600, 18400, 19300, + 20100, 20900, 21700, 22500, 23400, 24200, 25000, 25800, + 26600, 27500, 28300, 29100, 29900, 30700, 31600, 32400, + 33200, 34400, 36100, 37700, 39400, 41000, 42700, 44300, + 45900, 47600, 49200, 50800, 52500, + 54100, 55700, 57400, 59000, 60600, 62200, 63900, 65500, + 68000, 71300, 74700, 78000, 81400, 84700, 88000, 91400, + 94700, 98100, 101000, 105000, 108000, 111000, 115000, 118000, + 121000, 125000, 128000, 131000, 137000, 145000, 152000, 160000, + 168000, 176000, 183000, 191000, 199000, 206000, 214000, 222000, + 230000, 237000, 245000, 253000, 261000, 268000, 276000, 284000, + 291000, 302000, 316000, 329000, 343000, 356000, 370000, 384000, 398000, + 410000, 430000, 450000, 470000, 520000, 550000, 580000, 640000, 680000 +}; + double qie8adc2fC[]={ -0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5, 10.5,11.5,12.5, 13.5,15.,17.,19.,21.,23.,25.,27.,29.5,32.5,35.5,38.5,42.,46.,50.,54.5,59.5, @@ -140,8 +186,8 @@ class adcHists : public edm::one::EDAnalyzer { std::map hists; edm::Service fs; - - std::vector binsQIE8, binsQIE11, binsMIP, binsMIP8; + + std::vector binsQIE8, binsQIE11, binsMIP, binsMIP8, binsChris; TBCalibSource tbcs; @@ -209,6 +255,8 @@ void runHBHEcollection(C& DigiCollection, std::map& times, e if(trigData->wasBeamTrigger()) { fillHist(hists, "beam_adc_" + hnum.str(), q, 247, binsQIE11.data()); + fillHist(hists, "beam_adc_binChris_" + hnum.str(), q, 333, binsChris.data()); + fillHist(hists, "beam_adc_constBin_" + hnum.str(), q, 219355, 0, 680000); fillHist(hists, "corrected_beam_adc_" + hnum.str(), q * tbcs.getQIE11Corr(ieta, iphi, depth), 247, binsQIE11.data()); towerSum[tnum.str()] += q; @@ -227,6 +275,8 @@ void runHBHEcollection(C& DigiCollection, std::map& times, e } fillHist(hists, "adc_nosub_" + hnum.str(), qNosub, 247, binsQIE11.data()); + fillHist(hists, "adc_nosub_binChris_" + hnum.str(), qNosub, 333, binsChris.data()); + fillHist(hists, "adc_nosub_constBin_" + hnum.str(), qNosub, 219355, 0, 680000); } } @@ -514,6 +564,14 @@ void adcHists::beginJob() binsQIE11.push_back(binEdge/gain_); binsMIP.push_back(binEdge/(gain_*TBCalibSource::QIE11MIP)); } + for(double& binEdge : edgesChris) + { + binsChris.push_back(binEdge/gain_); + } + //for(unsigned int i = 0; i < binsChris.size()-1; i++) + //{ + // std::cout<