ATLAS Offline Software
PhysDESDM_RPVLL.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
15 
16 # ##########################################################################################
17 # Imports and initial setup
18 # ##########################################################################################
19 
20 # MJF: Needs attention and cleaning up - lots of PrimaryDPDMaker dependencies!
21 
22 from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
23 
24 from LongLivedParticleDPDMaker.LongLivedDPDFlags import WriteRPVLLStream
25 from LongLivedParticleDPDMaker.PrimaryDPDFlags_RPVLLStream import primRPVLLDESDM
26 
27 from PrimaryDPDMaker.PrimaryDPDHelpers import buildFileName
28 from PrimaryDPDMaker.PrimaryDPDFlags import primDPD
29 
30 streamName = primDPD.WriteRPVLLStream.StreamName
31 fileName = buildFileName( primDPD.WriteRPVLLStream )
32 RPVLL = MSMgr.NewPoolStream( streamName,fileName )
33 
34 # MJF: Possibly remove if not useful?
35 if primRPVLLDESDM.prescaleFlags.applyPrescale:
36  RPVLL.SetPrescale(primRPVLLDESDM.prescaleFlags.prescaleFactor)
37 
38 RPVLLfilterNames = [] # Filters should append their final selection algo names to this list
39 filtersToBookkeep = [] # Not sure what this does?
40 
41 # ##########################################################################################
42 # Filter configuration
43 # ##########################################################################################
44 
45 
47 
48 # ##########################################################################################
49 # First, the filters which are *definitely* planned for Run 2
50 
51 
52 if primRPVLLDESDM.doDiLep():
53  include("LongLivedParticleDPDMaker/PhysDESDM_DiLep.py")
54 
55 
56 if primRPVLLDESDM.doDV():
57  include("LongLivedParticleDPDMaker/PhysDESDM_DV.py")
58 
59 # Kink-based chargino search (contact: Shimpei Yamamoto)
60 if primRPVLLDESDM.doKinkedTrack():
61  include("LongLivedParticleDPDMaker/PhysDESDM_KinkedTrack.py")
62 
63 
64 if primRPVLLDESDM.doEmerging():
65  include("LongLivedParticleDPDMaker/PhysDESDM_Emerging.py")
66 
67 
68 if primRPVLLDESDM.doStopped():
69  include("LongLivedParticleDPDMaker/PhysDESDM_Stopped.py")
70 
71 
73 if primRPVLLDESDM.doHips():
74  include("LongLivedParticleDPDMaker/PhysDESDM_Hips.py")
75 
76 
77 if primRPVLLDESDM.doHnl():
78  include("LongLivedParticleDPDMaker/PhysDESDM_HNL.py")
79 
80 # Exotics displaced hadronic jets =search (contact: Heather Russell)
81 if primRPVLLDESDM.doHV():
82  include("LongLivedParticleDPDMaker/PhysDESDM_HV.py")
83 
84 if primRPVLLDESDM.doTaus():
85  include("LongLivedParticleDPDMaker/PhysDESDM_Taus.py")
86 
87 # ##########################################################################################
88 # Second, filters I'm not sure of (move above this line if definitely needed)
89 
90 
91 if primRPVLLDESDM.doVH_DV():
92  include("LongLivedParticleDPDMaker/PhysDESDM_VH_DV.py")
93 
94 
95 if primRPVLLDESDM.doQuirks():
96  include("LongLivedParticleDPDMaker/PhysDESDM_Quirks.py")
97 
98 
99 
100 
101 
102 if RPVLLfilterNames:
103  RPVLL.AcceptAlgs(RPVLLfilterNames)
104 
105 # if the automatic trigger stream logics or command-line overrides did not activate a single selection,
106 # choose to not write out any events to the output file (can happen e.g. in Reco_trf.py test jobs)
107 else:
108  from PrimaryDPDMaker.DummyFilter import DummyFilter
109  dummyFilterName = "RPVLL_DESDMStream_DummyFilter"
110  topSequence += DummyFilter(dummyFilterName)
111  filtersToBookkeep += dummyFilterName
112  vetoAlgsNames=[]
113  vetoAlgsNames.append( dummyFilterName )
114  RPVLL.VetoAlgs(vetoAlgsNames)
115 
116 # ##########################################################################################
117 # Output stream definition
118 # ##########################################################################################
119 
120 # Add everything from the input file
121 from AthenaCommon.KeyStore import CfgKeyStore,CfgItemList
122 theCKS = CfgKeyStore('KeyStore')
123 outList = CfgItemList( 'RPVLL' )
124 outList += theCKS['inputFile']
125 
126 # Remove items here, as needed
127 outList.removeAllItems( 'RpcPadContainer#RPCPAD' ) # Avoids crash in 20.1.0.2
128 
129 # Configure the stream
130 RPVLL.AddItem(outList())
131 
132 # make sure bookkeeping info is kept for additional filters
133 # MJF: Does this do anything useful?
134 RPVLL.AddOtherAlgsToBookkeep(filtersToBookkeep)
135 
PhysDESDM_RPVLL.outList
outList
Definition: PhysDESDM_RPVLL.py:123
python.PrimaryDPDHelpers.buildFileName
def buildFileName(jobPropFlag)
Definition: PrimaryDPDHelpers.py:27
python.Include.include
include
Definition: Include.py:319
LongLivedDPDFlags
Include the job property flags for this package.