Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Functions
python.TriggerAnalysisSFConfig Namespace Reference

Classes

class  TriggerAnalysisSFBlock
 

Functions

bool is_mc_from (ConfigAccumulator config, Union[Campaign, Iterable[Campaign]] campaign_list)
 
bool is_data_from (config, Union[int, Iterable[int]] data_year_list)
 
list get_year_data (dict dictionary, int|str year)
 
list[int] get_input_years (ConfigAccumulator config)
 

Function Documentation

◆ get_input_years()

list[int] python.TriggerAnalysisSFConfig.get_input_years ( ConfigAccumulator  config)
Utility function to get the list of years that the input corresponds to

Definition at line 35 of file TriggerAnalysisSFConfig.py.

35 def get_input_years(config: ConfigAccumulator) -> list[int]:
36  """
37  Utility function to get the list of years that the input corresponds to
38  """
39  years = []
40  if config.campaign() is Campaign.MC20a:
41  years = [2015, 2016]
42  elif is_data_from(config, 2015):
43  years = [2015]
44  elif is_data_from(config, 2016):
45  years = [2016]
46  elif config.campaign() is Campaign.MC20d or is_data_from(config, 2017):
47  years = [2017]
48  elif config.campaign() is Campaign.MC20e or is_data_from(config, 2018):
49  years = [2018]
50  elif config.campaign() in [Campaign.MC21a, Campaign.MC23a] or is_data_from(config, 2022):
51  years = [2022]
52  elif config.campaign() in [Campaign.MC23c, Campaign.MC23d] or is_data_from(config, 2023):
53  years = [2023]
54 
55  return years
56 
57 

◆ get_year_data()

list python.TriggerAnalysisSFConfig.get_year_data ( dict  dictionary,
int | str  year 
)
Utility function to get the data for a specific year from a dictionary

Definition at line 28 of file TriggerAnalysisSFConfig.py.

28 def get_year_data(dictionary: dict, year: int | str) -> list:
29  """
30  Utility function to get the data for a specific year from a dictionary
31  """
32  return dictionary.get(int(year), dictionary.get(str(year), []))
33 
34 

◆ is_data_from()

bool python.TriggerAnalysisSFConfig.is_data_from (   config,
Union[int, Iterable[int]]  data_year_list 
)
Utility function to check whether the data type is data and whether the year is in desired list of years

Definition at line 20 of file TriggerAnalysisSFConfig.py.

20 def is_data_from(config, data_year_list: Union[int, Iterable[int]]) -> bool:
21  """
22  Utility function to check whether the data type is data and whether the year is in desired list of years
23  """
24  data_year_list = [data_year_list] if isinstance(data_year_list, int) else data_year_list
25  return config.dataType() is DataType.Data and config.dataYear() in data_year_list
26 
27 

◆ is_mc_from()

bool python.TriggerAnalysisSFConfig.is_mc_from ( ConfigAccumulator  config,
Union[Campaign, Iterable[Campaign]]  campaign_list 
)
Utility function to check whether the data type is mc and whether the campaign is in desired list of campaigns
without causing an invalid FlugEnum comparison

Definition at line 11 of file TriggerAnalysisSFConfig.py.

11 def is_mc_from(config: ConfigAccumulator, campaign_list: Union[Campaign, Iterable[Campaign]]) -> bool:
12  """
13  Utility function to check whether the data type is mc and whether the campaign is in desired list of campaigns
14  without causing an invalid FlugEnum comparison
15  """
16  campaign_list = [campaign_list] if isinstance(campaign_list, Campaign) else campaign_list
17  return config.dataType() is not DataType.Data and config.campaign() in campaign_list
18 
19 
python.TriggerAnalysisSFConfig.is_mc_from
bool is_mc_from(ConfigAccumulator config, Union[Campaign, Iterable[Campaign]] campaign_list)
Definition: TriggerAnalysisSFConfig.py:11
python.TriggerAnalysisSFConfig.get_year_data
list get_year_data(dict dictionary, int|str year)
Definition: TriggerAnalysisSFConfig.py:28
python.TriggerAnalysisSFConfig.is_data_from
bool is_data_from(config, Union[int, Iterable[int]] data_year_list)
Definition: TriggerAnalysisSFConfig.py:20
python.TriggerAnalysisSFConfig.get_input_years
list[int] get_input_years(ConfigAccumulator config)
Definition: TriggerAnalysisSFConfig.py:35
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
str
Definition: BTagTrackIpAccessor.cxx:11