ATLAS Offline Software
Loading...
Searching...
No Matches
python.SSVWeightsAlgConfig.SSVWeightsAlgConfig Class Reference
Inheritance diagram for python.SSVWeightsAlgConfig.SSVWeightsAlgConfig:
Collaboration diagram for python.SSVWeightsAlgConfig.SSVWeightsAlgConfig:

Public Member Functions

 __init__ (self)
 makeAlgs (self, config)

Detailed Description

Definition at line 8 of file SSVWeightsAlgConfig.py.

Constructor & Destructor Documentation

◆ __init__()

python.SSVWeightsAlgConfig.SSVWeightsAlgConfig.__init__ ( self)

Definition at line 10 of file SSVWeightsAlgConfig.py.

10 def __init__ (self) :
11 super (SSVWeightsAlgConfig, self).__init__ ()
12 self.addOption('jets', None, type = str, info = "jet container that will be used to define the good SSVs (ΔR(SSV,jet)>0.6) and the truth b-hadrons in acceptance (ΔR(truthBh,jet)>0.6) and that will be used to count the number of b-jets for b-jet based SSV weight calculation")
13 self.addOption('electrons', None, type = str, info = "electron container that will be used to define the good SSVs (ΔR(SSV,electron)>0.2)")
14 self.addOption('muons', None, type = str, info = "muon container that will be used to define the good SSVs (ΔR(SSV,muon)>0.2)")
15 self.addOption('NVSI_WP', "NVSI_SecVrt_Tight", type = str, info = "Working point of the NewVrtSecInclusiveTool (algorithm that constructs the soft secondary vertices); possible working points are 'NVSI_SecVrt_Tight','NVSI_SecVrt_Medium','NVSI_SecVrt_Loose'")
16 self.addOption("JsonConfigFile_SSVWeightsAlg", None, type = str, info ="Path to the JSON config file that contains the SSV calibration results which are needed to calculate the SSV weights")
17 self.addOption("BTaggingWP", "ftag_select_GN2v01_FixedCutBEff_85" , type = str, info = "b-tagging working point that is used to count the number of b-jets in the event for b-jet based SSV weight calculation")
18 self.addOption("EfficiencyMethod", "Bhadron_pT_eta_based", type = str, info = "efficiency definition that will be used to calculate the SSV weights, string can be 'Bhadron_pT_eta_based' or 'bjet_based'")
19 self.addOption("nFMethod", "pileup_based_binned", type = str, info = "average number of fake SSV definition that will be used to calculate the SSV weights, string can be 'pileup_bjet_based','pileup_based_linearfit' or 'pileup_based_binned'")
20 self.addOption("OutputVariableSize", "standard", type = str, info ="number of variables that will be saved to the output, string can be 'standard','extended','additional' or 'all'")
21

Member Function Documentation

◆ makeAlgs()

python.SSVWeightsAlgConfig.SSVWeightsAlgConfig.makeAlgs ( self,
config )

Definition at line 22 of file SSVWeightsAlgConfig.py.

22 def makeAlgs(self, config):
23 #Algorithm is Monte Carlo only -> skip algorithm if it is run on Data
24 if config.dataType() == DataType.Data:
25 return
26
27 alg = config.createAlgorithm('CP::SSVWeightsAlg', 'SSVWeightsAlg')
28
29 jetContainer, sep, jetSelectionName = self.jets.partition('.')
30 alg.jetSelection = config.getFullSelection(jetContainer, jetSelectionName)
31 alg.jets = config.readName(jetContainer)
32
33 electronContainer, sep, electronSelectionName = self.electrons.partition('.')
34 alg.electronSelection = config.getFullSelection(electronContainer, electronSelectionName)
35 alg.electrons = config.readName(electronContainer)
36
37 muonContainer, sep, muonSelectionName = self.muons.partition('.')
38 alg.muonSelection = config.getFullSelection(muonContainer, muonSelectionName)
39 alg.muons = config.readName(muonContainer)
40
41 print("Py:SSVWeightsAlg ","You run with the following jet selections: ", alg.jetSelection)
42 print("Py:SSVWeightsAlg ","You run with the following electron selections: ", alg.electronSelection)
43 print("Py:SSVWeightsAlg ","You run with the following muon selections: ", alg.muonSelection)
44
45 alg.NVSI_WP = self.NVSI_WP
46 alg.JsonConfigFile_SSVWeightsAlg = self.JsonConfigFile_SSVWeightsAlg
47 alg.BTaggingWP = self.BTaggingWP
48 alg.EfficiencyMethod = self.EfficiencyMethod
49 alg.nFMethod = self.nFMethod
50 alg.OutputVariableSize = self.OutputVariableSize
51
52 config.addOutputVar('EventInfo', 'SSV_weight_%SYS%', 'SSV_weight')
53
54 if alg.OutputVariableSize in ["extended", "additional", "all"] :
55 config.addOutputVar('EventInfo', 'P_eff_%SYS%', 'P_eff')
56 config.addOutputVar('EventInfo', 'P_ineff_%SYS%', 'P_ineff')
57 config.addOutputVar('EventInfo', 'P_fake_%SYS%', 'P_fake')
58
59 if alg.OutputVariableSize in ["additional", "all"] :
60 config.addOutputVar('EventInfo', 'N_matched_%SYS%', 'N_matched')
61 config.addOutputVar('EventInfo', 'N_missed_%SYS%', 'N_missed')
62 config.addOutputVar('EventInfo', 'N_fake_%SYS%', 'N_fake')
63 config.addOutputVar('EventInfo', 'number_of_bjets_%SYS%', 'number_of_bjets')
64 config.addOutputVar('EventInfo', 'number_of_accepted_Bhadrons_%SYS%', 'number_of_accepted_Bhadrons')
65 config.addOutputVar('EventInfo', 'number_of_good_SSVs_%SYS%', 'number_of_good_SSVs')
66
67 if alg.OutputVariableSize == "all":
68 config.addOutputVar('EventInfo', 'P_ineff_bjet_based_%SYS%', 'P_ineff_bjet_based')
69 config.addOutputVar('EventInfo', 'P_ineff_pt_eta_based_%SYS%', 'P_ineff_pt_eta_based')
70 config.addOutputVar('EventInfo', 'P_fake_pileup_bjet_based_%SYS%', 'P_fake_pileup_bjet_based')
71 config.addOutputVar('EventInfo', 'P_fake_pileup_based_linearfit_%SYS%', 'P_fake_pileup_based_linearfit')
72 config.addOutputVar('EventInfo', 'P_fake_pileup_based_binned_%SYS%', 'P_fake_pileup_based_binned')
void print(char *figname, TCanvas *c1)

The documentation for this class was generated from the following file: