ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCalibConvertTimeSlewing.py
Go to the documentation of this file.
1# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2
3import math
4
5GasmonDriftTimeOffsetsVsR_total = [ -5.45973, -4.57559, -3.71995, -3.45051, -3.4505, -3.4834, -3.59509, -3.74869, -3.92066, -4.10799, -4.35237, -4.61329, -4.84111, -5.14524 ]
6
7GasmonDriftTimeOffsetT0=GasmonDriftTimeOffsetsVsR_total[0]
8
9GasmonDriftTimeOffsetsVsR=[]
10for x in GasmonDriftTimeOffsetsVsR_total:
11 GasmonDriftTimeOffsetsVsR.append(x - GasmonDriftTimeOffsetT0)
12
13def GetRBin(r):
14 if r<=0:
15 return 0
16 if r>=14.6:
17 return len(GasmonDriftTimeOffsetsVsR) -1
18 return int(math.floor(r/14.6 * len(GasmonDriftTimeOffsetsVsR)))
19
20
21def Ts2NoTs(r, t):
22 return t - GasmonDriftTimeOffsetsVsR[GetRBin(r)]
23
24def NoTs2Ts(r, t):
25 return t + GasmonDriftTimeOffsetsVsR[GetRBin(r)]
26
28 return bool(obj.payload()['tech'] & 0x10)
29
30
31
32