|
string | InputFile = "cosmic.0008.03420_03427.root" |
| Input root file, produced by AsicBackgroundLibraryCreator.
|
|
| df = read_root(InputFile, columns=["Channel", "ADC", "Board", "Nhit", "Asic"]) |
| Dataframe, containing relevant variables from the root file.
|
|
def | u1 = getEff(df[(df.asic % 3 == 1)].ADC_ADC_Sig, df.Nhit > 1, 128, (0, 1024.)) |
| auxiliary variable, split ADC range in two < 1024 and above (u1: below)
|
|
def | u2 = getEff(df[(df.asic % 3 == 1)].ADC_ADC_Sig, df.Nhit > 1, 16, (1024, 7800.)) |
| auxiliary variable, split ADC range in two < 1024 and above (u2: above)
|
|
| u = np.append(u1, u2, axis=1) |
| merged u1 and u2
|
|
| x = np.nan_to_num(u[0]) |
| aux. More...
|
|
| e = np.nan_to_num(u[1]) |
| aux. More...
|
|
| ee = np.where(np.nan_to_num(u[2]) == 0, 1000., u[2]) |
| aux. More...
|
|
| f = UnivariateSpline(x, e, 1/ee) |
| spline parameterisation of efficiency
|
|
| xp = np.arange(-0.5, 8197.5, 1) |
| location of points for the plot
|
|
| fmt |
| use dots
|
|
list | names = ["Board", "Channel"] |
| variables to write out
|
|
| index |
| do not write index
|
|
| fi = TFile("t.root", "update") |
| open root file to store x-talk probability histogram
|
|
| t = TH1F("ProbXTalk", "Prob xTalk", 8196, 0, 8196) |
| histogram to store x-talk probability
|
|
| INPUT = FileSystem.findFile("t.root") |
| prepared payload:
|
|
int | expFirst = 0 |
| starting experiment for payload
|
|
int | expLast = -1 |
| last experiment for payload
|
|
int | runFirst = 0 |
| first run for payload
|
|
int | runLast = -1 |
| last run for payload
|
|
| main = basf2.create_path() |
| path
|
|
| eventinfosetter = basf2.register_module('EventInfoSetter') |
| Event info setter - execute single event.
|
|
| dbImporter = CDCDatabaseImporter(expFirst, runFirst, expLast, runLast) |
| get the importer module
|
|
Prepare CDC x-talk simulation DB object