-
Notifications
You must be signed in to change notification settings - Fork 1
/
Corer.py
61 lines (48 loc) · 2 KB
/
Corer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python
import icecube
from icecube import icetray, dataclasses, phys_services, static_twc, SeededRTCleaning, dataio
from icecube import PulseCore
from I3Tray import *
import os,sys
def FiltCut(frame):
if(frame.Has("FilterMask")):
if(frame["FilterMask"]["DeepCoreFilter_11"].condition_passed):
return True
else:
return False
else:
return False
tray = I3Tray()
tray.Add("I3Reader", FilenameList=[sys.argv[1],sys.argv[2]])
tray.Add(FiltCut)
tray.AddModule('I3StaticTWC<I3RecoPulseSeries>', 'L2_static-twc',
InputResponse = 'OfflinePulses', # ! Input response
OutputResponse = 'OfflinePulses_TW', # ! Output response
TriggerConfigIDs = [1011], # ! Trigger Config ID
TriggerName = 'I3TriggerHierarchy', # Default
FirstTriggerOnly = True, # Only take the time window around the first trigger
WindowMinus = 4000.0*I3Units.ns , # ! Backward time window for SMT3 Trigger
WindowPlus = 6000.0*I3Units.ns # ! Forward time window for SMT3 Trigger
)
tray.AddModule('I3SeededRTHitMaskingModule', 'L2_sRTCleaning',
InputResponse = 'OfflinePulses_TW',
OutputResponse = 'OfflinePulses_sRT',
RTRadius = 200,
RTTime = 700,
DeepCoreRTRadius = 100,
DeepCoreRTTime = 400,
MaxIterations = 3,
Seeds = 'HLCcore',
HLCCoreThreshold = 2
)
tray.Add("PulseCore",
InputPulses="OfflinePulses_sRT",
OutputName="String3Pulses")
tray.Add("PulseCore",
InputPulses="OfflinePulses_sRT",
OutputName="String1Pulses",
NStrings=1)
tray.Add("I3Writer",
DropOrphanStreams = [icetray.I3Frame.DAQ],
filename=sys.argv[3])
tray.Execute()