Trees | Indices | Help |
---|
|
object --+ | DiagramDrawer
In principle ALL routines representing diagram in ANY format SHOULD derive from this class.
This is a (nearly empty) frameworks to draw a diagram in any type format
This frameworks defines in particular
This framework is base on the idea that we can create the diagram line after line. Indeed all line object (FeynmanLine) contains the full information needed to be drawed independently of the rest of the diagram.
In order to create a class with this framework you should start to write the draw_straight, draw_curly, ... method which are called by the framework.
If you want to write a file, you can store his content in self.text variable the routine conclude will then automatically write the file.
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 : Build the diagram line after line. 4) conclude : finish the operation.
|
|||
DrawDiagramError Standard error for error occuring to create output of a Diagram. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Define basic variables and store some global information. All argument are optional: diagram : is the object to 'diagram' should inherit from either base_objects.Diagram or drawing_lib.FeynmanDiagram. filename: file's name of the file to write. model: model associate to the diagram. In principle use only if diagram inherit from base_objects.Diagram (for conversion). amplitude: amplitude associates to the diagram. NOT USE for the moment. In future you could pass the amplitude associate to the object in order to adjust fermion flow in case of Majorana fermion. opt: should be a valid DrawOption object.
|
Main routine to draw a single diagram. opt is DrawOption object use for the conversion of the base_objects.Diagram in one of the Diagram object. |
If diagram is a basic diagram (inherit from base_objects.Diagram) convert him to a FeynmanDiagram one. 'opt' keeps track of possible option of drawing. 'amplitude' is not use for the moment. But, later, if defined will authorize to adjust the fermion-flow of Majorana particles. opt is a DrawOption object containing all option on the way to draw the diagram (see this class for more details) This is the list of recognize options: external [True] : authorizes external particles to finish on horizontal limit of the square horizontal [True]: if on true use FeynmanDiagramHorizontal to convert the diagram. otherwise use FeynmanDiagram (Horizontal forces S-channel to be horizontal) non_propagating [True] : removes the non propagating particles present in the diagram. |
Initialization of object-file before starting in order to draw the diagram correctly. By default, we just check if we are in writing mode. And open the output file if we are. |
Building the diagram Line after Line. This is the key routine of 'draw'. |
Final operation of the draw method. By default, this end to write the file (if this one exist) |
Draw the line information. First, call the method associate the line type [draw_XXXXXX] Then finalize line representation by adding his name and, if it's an external particle, the MadGraph number associate to it. |
Example of routine for drawing the line 'line' in a specific format. straight is an example and can be replace by other type of line as dashed, wavy, curly, ... |
Method to associate a name to a the given line. The default action of this framework doesn't do anything |
Method to associate a number to 'line'. By default this method is call only for external particles and the number is the MadGraph number associate to the particle. The default routine doesn't do anything |
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Jul 24 08:02:10 2012 | http://epydoc.sourceforge.net |