Merge lp:~ma5dev/madanalysis5/pyhf_update into lp:~ma5dev/madanalysis5/v1.9_beta

Proposed by Jack Y. Araz
Status: Merged
Approved by: Benjamin Fuks
Approved revision: 193
Merged at revision: 194
Proposed branch: lp:~ma5dev/madanalysis5/pyhf_update
Merge into: lp:~ma5dev/madanalysis5/v1.9_beta
Diff against target: 46 lines (+17/-1)
2 files modified
madanalysis/fastsim/fastsim.py (+15/-0)
madanalysis/misc/run_recast.py (+2/-1)
To merge this branch: bzr merge lp:~ma5dev/madanalysis5/pyhf_update
Reviewer Review Type Date Requested Status
Benjamin Fuks Pending
Review via email: mp+412699@code.launchpad.net

Commit message

SFS module reset in multi analysis PAD run

Description of the change

for some reason, the previous analysis SFS description was still there so the code was rewriting the details from the previous run. A reset function has been added to clean the SFS description before reading the ma5 detector card.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'madanalysis/fastsim/fastsim.py'
2--- madanalysis/fastsim/fastsim.py 2021-09-15 14:19:55 +0000
3+++ madanalysis/fastsim/fastsim.py 2021-12-02 15:59:19 +0000
4@@ -55,6 +55,21 @@
5 def InitObservables(self, obs_list):
6 self.observables = obs_list
7
8+ def Reset(self):
9+ self.tagger = Tagger()
10+ self.smearer = Smearer()
11+ self.reco = RecoEfficiency()
12+ self.scaling = Scaling()
13+ self.jetrecomode = 'jets'
14+ self.mag_field = 1e-9
15+ self.radius = 1e+99
16+ self.half_length = 1e+99
17+ self.propagator = False
18+ self.track_isocone_radius = []
19+ self.electron_isocone_radius = []
20+ self.muon_isocone_radius = []
21+ self.photon_isocone_radius = []
22+
23 # Definition of a new tagging/smearing rule
24 def define(self,args,prts):
25 prts.Add('c',[4])
26
27=== modified file 'madanalysis/misc/run_recast.py'
28--- madanalysis/misc/run_recast.py 2021-11-12 16:43:32 +0000
29+++ madanalysis/misc/run_recast.py 2021-12-02 15:59:19 +0000
30@@ -305,6 +305,7 @@
31 return False
32 # Load the analysis card
33 from madanalysis.core.script_stack import ScriptStack
34+ self.main.superfastsim.Reset()
35 ScriptStack.AddScript(card)
36 self.main.recasting.status="off"
37 script_mode = self.main.script
38@@ -322,7 +323,7 @@
39 self.logger.debug(" Setting the output LHE file :"+output_name)
40
41 # Initializing the JobWriter
42- jobber = JobWriter(self.main,self.dirname+'_SFSRun')
43+ jobber = JobWriter(self.main, self.dirname + '_SFSRun')
44
45 # Writing process
46 self.logger.info(" Creating folder '"+self.dirname.split('/')[-1] + "'...")

Subscribers

People subscribed via source and target branches

to all changes: