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

Functions

def createIDCalibHypoAlg (flags, name)
 
def IDCalibHypoToolFromDict (chainDict)
 

Function Documentation

◆ createIDCalibHypoAlg()

def python.IDCalibHypoConfig.createIDCalibHypoAlg (   flags,
  name 
)

Definition at line 9 of file IDCalibHypoConfig.py.

9 def createIDCalibHypoAlg(flags, name):
10  # Monitoring
11  monTool = GenericMonitoringTool(flags, "IM_MonTool"+name,
12  HistPath = 'IDCalibHypoAlg')
13  monTool.defineHistogram('pt', type='TH1F', path='EXPERT', title="p_{T};p_{T} [GeV];Nevents", xbins=50, xmin=0, xmax=100)
14 
15  # Setup the hypothesis algorithm
16  theHypo = CompFactory.IDCalibHypoAlg(name,
17  MonTool = monTool)
18  return theHypo
19 
20 

◆ IDCalibHypoToolFromDict()

def python.IDCalibHypoConfig.IDCalibHypoToolFromDict (   chainDict)

Definition at line 21 of file IDCalibHypoConfig.py.

21 def IDCalibHypoToolFromDict( chainDict ):
22 
23  log = logging.getLogger('IDCalibHypoTool')
24 
25  """ Use menu decoded chain dictionary to configure the tool """
26  cparts = [i for i in chainDict['chainParts'] if i['signature']=='Calib']
27 
28  name = "default_chain_name"
29  if 'chainName' in chainDict:
30  name = chainDict['chainName']
31  else:
32  log.error("chainName not in chain dictionary")
33 
34  # set thresholds
35  m = re.search(r'trk(\d+)',[ cpart['hypo'] for cpart in cparts ][0])
36  threshold = m.group(1)
37 
38  mult = [ cpart['multiplicity'] for cpart in cparts ][0]
39  thresholds = [ float(threshold) for x in range(0,int(mult)) ]
40  log.debug("Threshold values are: %s", ", ".join(str(THR) for THR in thresholds))
41 
42  tool = CompFactory.IDCalibHypoTool(name,
43  cutTrackPtGeV = thresholds)
44  return tool
python.IDCalibHypoConfig.IDCalibHypoToolFromDict
def IDCalibHypoToolFromDict(chainDict)
Definition: IDCalibHypoConfig.py:21
python.IDCalibHypoConfig.createIDCalibHypoAlg
def createIDCalibHypoAlg(flags, name)
Definition: IDCalibHypoConfig.py:9
GenericMonitoringTool
Definition: GenericMonitoringTool.h:53
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
str
Definition: BTagTrackIpAccessor.cxx:11
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65