ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.BeamSpotData.BeamSpotGraph Class Reference
Collaboration diagram for python.BeamSpotData.BeamSpotGraph:

Public Member Functions

def __init__ (self, timeAxis=False, bcidAxis=False, separationAxis=False)
 
def add (self, bs, what, arescale=1.)
 
def getTGraph (self, name='')
 

Public Attributes

 timeAxis
 
 bcidAxis
 
 separationAxis
 
 x
 
 y
 
 ex
 
 ey
 
 xmin
 
 xmax
 
 ymin
 
 ymax
 
 xoffset
 
 what
 

Detailed Description

A utility class for accumulating beam spot data into TGraphErrors.

Definition at line 688 of file BeamSpotData.py.

Constructor & Destructor Documentation

◆ __init__()

def python.BeamSpotData.BeamSpotGraph.__init__ (   self,
  timeAxis = False,
  bcidAxis = False,
  separationAxis = False 
)

Definition at line 691 of file BeamSpotData.py.

691  def __init__(self, timeAxis = False, bcidAxis = False, separationAxis = False):
692  self.timeAxis = timeAxis
693  self.bcidAxis = bcidAxis
694  self.separationAxis = separationAxis
695  self.x = array('d')
696  self.y = array('d')
697  self.ex = array('d')
698  self.ey = array('d')
699  self.xmin = 1E10
700  self.xmax = -1E10
701  self.ymin = 1E10
702  self.ymax = -1E10
703  self.xoffset = 0
704  self.what = None
705 

Member Function Documentation

◆ add()

def python.BeamSpotData.BeamSpotGraph.add (   self,
  bs,
  what,
  arescale = 1. 
)
Add element what of BeamSpotValue bs to the graph.

Definition at line 706 of file BeamSpotData.py.

706  def add(self,bs,what,arescale=1.):
707  """Add element what of BeamSpotValue bs to the graph."""
708  self.what = what
709  y = arescale*getattr(bs,what) # Raise exception if not attribute what
710  ey = arescale*getattr(bs,what+'Err',0)
711  ex = (bs.lbEnd - bs.lbStart)/2.
712  x = self.xoffset + bs.lbStart + ex
713 
714  if self.timeAxis:
715  ex = (bs.timeEnd - bs.timeStart)/2.
716  x = self.xoffset + bs.timeStart + ex
717  if self.bcidAxis:
718  ex = 0
719  x = bs.bcid
720  if self.separationAxis:
721  ex = 0
722  x = bs.separation
723 
724  self.x.append(x)
725  self.ex.append(ex)
726  self.y.append(y)
727  self.ey.append(ey)
728  self.xmin = min(x-ex,self.xmin)
729  self.xmax = max(x+ex,self.xmax)
730  self.ymin = min(y-ey,self.ymin)
731  self.ymax = max(y+ey,self.ymax)
732 

◆ getTGraph()

def python.BeamSpotData.BeamSpotGraph.getTGraph (   self,
  name = '' 
)

Definition at line 733 of file BeamSpotData.py.

733  def getTGraph(self,name=''):
734  if len(self.x)>0:
735  gr = ROOT.TGraphErrors(len(self.x),self.x,self.y,self.ex,self.ey)
736  if not name:
737  name = self.what
738  gr.SetName(name)
739  gr.SetTitle(name)
740  else:
741  gr = None
742  return gr
743 
744 

Member Data Documentation

◆ bcidAxis

python.BeamSpotData.BeamSpotGraph.bcidAxis

Definition at line 693 of file BeamSpotData.py.

◆ ex

python.BeamSpotData.BeamSpotGraph.ex

Definition at line 697 of file BeamSpotData.py.

◆ ey

python.BeamSpotData.BeamSpotGraph.ey

Definition at line 698 of file BeamSpotData.py.

◆ separationAxis

python.BeamSpotData.BeamSpotGraph.separationAxis

Definition at line 694 of file BeamSpotData.py.

◆ timeAxis

python.BeamSpotData.BeamSpotGraph.timeAxis

Definition at line 692 of file BeamSpotData.py.

◆ what

python.BeamSpotData.BeamSpotGraph.what

Definition at line 704 of file BeamSpotData.py.

◆ x

python.BeamSpotData.BeamSpotGraph.x

Definition at line 695 of file BeamSpotData.py.

◆ xmax

python.BeamSpotData.BeamSpotGraph.xmax

Definition at line 700 of file BeamSpotData.py.

◆ xmin

python.BeamSpotData.BeamSpotGraph.xmin

Definition at line 699 of file BeamSpotData.py.

◆ xoffset

python.BeamSpotData.BeamSpotGraph.xoffset

Definition at line 703 of file BeamSpotData.py.

◆ y

python.BeamSpotData.BeamSpotGraph.y

Definition at line 696 of file BeamSpotData.py.

◆ ymax

python.BeamSpotData.BeamSpotGraph.ymax

Definition at line 702 of file BeamSpotData.py.

◆ ymin

python.BeamSpotData.BeamSpotGraph.ymin

Definition at line 701 of file BeamSpotData.py.


The documentation for this class was generated from the following file:
max
#define max(a, b)
Definition: cfImp.cxx:41
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
min
#define min(a, b)
Definition: cfImp.cxx:40
array
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18