Package madgraph :: Package iolibs :: Module drawing_eps :: Class EpsDiagramDrawer
[hide private]
[frames] | no frames]

Class EpsDiagramDrawer

source code

                object --+    
                         |    
core.drawing.DiagramDrawer --+
                             |
                            EpsDiagramDrawer
Known Subclasses:

Class to write a EPS file containing the asked diagram This class follows the DrawDiagram Frameworks.

The main routine to draw a diagram is 'draw' which call 1) initialize: setup things for the diagram (usually open a file) 2) convert_diagram : Update the diagram in the correct format if needed 3) draw_diagram : Perform diagram dependent operation 4) conclude : finish the operation.

Nested Classes [hide private]

Inherited from core.drawing.DiagramDrawer: DrawDiagramError

Instance Methods [hide private]
 
initialize(self)
Operation done before starting to create diagram specific EPS content First open the file in write mode then write in it the header and the library of particle type.
source code
 
conclude(self)
Operation to perform when all code related to a specific diagram are finish.
source code
 
rescale(self, x, y)
All coordinates belongs to [0,1].
source code
 
line_format(self, x1, y1, x2, y2, name)
Specify the text format of a specific Particles.
source code
 
draw_vertex(self, vertex, bypass=['QED', 'QCD'])
Add blob in case on non QED-QCD information
source code
 
draw_straight(self, line)
ADD the EPS code for this fermion line.
source code
 
draw_dashed(self, line)
ADD the EPS code for this Higgs line.
source code
 
draw_wavy(self, line, opt=0, type='d')
ADD the EPS code for this photon line.
source code
 
draw_curly(self, line, type='')
ADD the EPS code for this gluon line.
source code
 
draw_scurly(self, line)
ADD the EPS code for this gluino line.
source code
 
draw_swavy(self, line)
ADD the EPS code for this neutralino line.
source code
 
draw_double(self, line, type='r')
ADD the EPS code for this neutralino line.
source code
 
put_diagram_number(self, number=0)
ADD the comment 'diagram [number]' just below the diagram.
source code
 
associate_number(self, line, number)
Write in the EPS figure the MadGraph number associate to the line.
source code
 
associate_name(self, line, name)
ADD the EPS code associate to the name of the particle.
source code

Inherited from core.drawing.DiagramDrawer: __init__, convert_diagram, draw, draw_diagram, draw_line

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  width = 450
  height = 450
  npage = 1
  x_min = 150
  y_min = 450
  x_max = 450
  y_max = 750
  blob_size = 1.5
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

initialize(self)

source code 

Operation done before starting to create diagram specific EPS content First open the file in write mode then write in it the header and the library of particle type.

Overrides: core.drawing.DiagramDrawer.initialize

conclude(self)

source code 
Operation to perform when all code related to a specific diagram are
finish. Operation :
- Add the 'end of page' code
- write unwritten text and close the file. [DrawDiagram.conclude]

Overrides: core.drawing.DiagramDrawer.conclude

rescale(self, x, y)

source code 

All coordinates belongs to [0,1]. So that in order to have a visible graph we need to re-scale the graph. This method distort the square in a oblong. Deformation are linear.

line_format(self, x1, y1, x2, y2, name)

source code 

Specify the text format of a specific Particles. EPS format for Particle is either [X Y X Y NAME] or [X Y X Y NUM NAME]. In this routine we will consider only the first format. The second can be matched by redefining name in [NUM NAME].

draw_vertex(self, vertex, bypass=['QED', 'QCD'])

source code 

Add blob in case on non QED-QCD information

Overrides: core.drawing.DiagramDrawer.draw_vertex

draw_straight(self, line)

source code 

ADD the EPS code for this fermion line.

Overrides: core.drawing.DiagramDrawer.draw_straight

associate_number(self, line, number)

source code 

Write in the EPS figure the MadGraph number associate to the line. Note that this routine is called only for external particle.

Overrides: core.drawing.DiagramDrawer.associate_number

associate_name(self, line, name)

source code 

ADD the EPS code associate to the name of the particle. Place it near to the center of the line.

Overrides: core.drawing.DiagramDrawer.associate_name