ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
LArG4PlottingScript.RestrictEntry Class Reference
Collaboration diagram for LArG4PlottingScript.RestrictEntry:

Public Member Functions

def __init__ (self)
 
def checkVar (self, value)
 
def __str__ (self)
 
def addRange (self, rang)
 
def addRangeAbs (self, rang)
 

Public Attributes

 var
 
 rangeList
 

Detailed Description

Definition at line 110 of file LArG4PlottingScript.py.

Constructor & Destructor Documentation

◆ __init__()

def LArG4PlottingScript.RestrictEntry.__init__ (   self)

Definition at line 111 of file LArG4PlottingScript.py.

111  def __init__(self) :
112  self.var = ""
113  self.rangeList = []

Member Function Documentation

◆ __str__()

def LArG4PlottingScript.RestrictEntry.__str__ (   self)

Definition at line 119 of file LArG4PlottingScript.py.

119  def __str__(self) :
120  outstr = self.var+" :"
121  for rang in self.rangeList :
122  outstr+=" ["+str(rang[0])+".."+str(rang[1])+"]"
123  return outstr

◆ addRange()

def LArG4PlottingScript.RestrictEntry.addRange (   self,
  rang 
)

Definition at line 124 of file LArG4PlottingScript.py.

124  def addRange(self,rang) :
125  parsed = rang.split("..")
126  try :
127  parsed[0] = float(parsed[0])
128  except ValueError:
129  parsed[0] = -999999.9
130  try :
131  parsed[1] = float(parsed[1])
132  except ValueError:
133  parsed[1] = 9999999.9
134  self.rangeList.append(parsed[0:2])

◆ addRangeAbs()

def LArG4PlottingScript.RestrictEntry.addRangeAbs (   self,
  rang 
)

Definition at line 135 of file LArG4PlottingScript.py.

135  def addRangeAbs(self,rang) :
136  parsed = rang.split("..")
137  try :
138  parsed[0] = float(parsed[0])
139  except ValueError:
140  parsed[0] = 0.0
141  try :
142  parsed[1] = float(parsed[1])
143  except ValueError:
144  parsed[1] = 9999999.9
145  if (parsed[0] < 0) or (parsed[1] <= 0) :
146  print ("WARNING: The absolute range is not valid: less then zero. Ignore.")
147  return
148  rang = str(parsed[0])+".."+str(parsed[1])
149  rang2 = str(-parsed[1])+".."+str(-parsed[0])
150  self.addRange(rang)
151  self.addRange(rang2)
152 

◆ checkVar()

def LArG4PlottingScript.RestrictEntry.checkVar (   self,
  value 
)

Definition at line 114 of file LArG4PlottingScript.py.

114  def checkVar(self,value) :
115  for rang in self.rangeList :
116  if (value >= rang[0]) and (value <= rang[1]) :
117  return True
118  return False

Member Data Documentation

◆ rangeList

LArG4PlottingScript.RestrictEntry.rangeList

Definition at line 113 of file LArG4PlottingScript.py.

◆ var

LArG4PlottingScript.RestrictEntry.var

Definition at line 112 of file LArG4PlottingScript.py.


The documentation for this class was generated from the following file:
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
str
Definition: BTagTrackIpAccessor.cxx:11
readCCLHist.float
float
Definition: readCCLHist.py:83