ATLAS Offline Software
Functions
CDIHelpers Namespace Reference

Functions

def map_mc_campaign (MCCampaign)
 
def check_CDI_campaign (MCCampaign, CDIFile)
 

Function Documentation

◆ check_CDI_campaign()

def CDIHelpers.check_CDI_campaign (   MCCampaign,
  CDIFile 
)
Check if the right CDI file is use for a given MC Campaign 

Definition at line 14 of file CDIHelpers.py.

14 def check_CDI_campaign(MCCampaign, CDIFile):
15  """ Check if the right CDI file is use for a given MC Campaign """
16  MCCampaign = map_mc_campaign(MCCampaign)
17  if MCCampaign == "MCUnknown":
18  raise ValueError("The MC Campaign is not recognized. Currently we only have CDI file for MC20, MC21 and MC23.")
19 
20  run3_campaigns = ["MC21", "MC23"]
21  if MCCampaign == "MC20":
22  if MCCampaign not in CDIFile and "noSF" not in CDIFile:
23  raise ValueError("Mismatch of MC Campaign and CDI file. CDI file %s being used for %s campaign" % (CDIFile, MCCampaign))
24  elif not any (campaign in CDIFile for campaign in run3_campaigns) and "noSF" not in CDIFile:
25  raise ValueError("Mismatch of MC Campaign and CDI file. CDI file %s being used for %s campaign" % (CDIFile, MCCampaign))
26 

◆ map_mc_campaign()

def CDIHelpers.map_mc_campaign (   MCCampaign)

Definition at line 3 of file CDIHelpers.py.

3 def map_mc_campaign(MCCampaign):
4  MCCampaign = MCCampaign.value
5  if MCCampaign.lower().startswith("mc20"):
6  return "MC20"
7  elif MCCampaign.lower().startswith("mc21"):
8  return "MC21"
9  elif MCCampaign.lower().startswith("mc23"):
10  return "MC23"
11  else:
12  return "MCUnknown"
13 
CDIHelpers.map_mc_campaign
def map_mc_campaign(MCCampaign)
Definition: CDIHelpers.py:3
CDIHelpers.check_CDI_campaign
def check_CDI_campaign(MCCampaign, CDIFile)
Definition: CDIHelpers.py:14