jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.model
Class MCProcessType

java.lang.Object
  extended by cedar.jetweb.model.MCProcessType

public class MCProcessType
extends java.lang.Object

Instances of this class represent a particular way of generating a physical process. They contain a Collision (generator independent) and a comment (generator/parameter dependent process name). Future extensions may include a final state and/or a more tightly specified comment

Version:
$Date: 2006-06-21 12:36:40 +0100 (Wed, 21 Jun 2006) $ $Revision: 1197 $
Author:
Jon Butterworth

Field Summary
static java.lang.String ANNIHILATION
           
static java.lang.String BEAUTY
           
static java.lang.String BEAUTYDIS
           
static java.lang.String CHARM
           
static java.lang.String CHARMDIS
           
static java.lang.String DIS
           
static java.lang.String HIGHET
           
static java.lang.String MINBIAS
           
static java.lang.String PARTONPARTON
           
static java.lang.String PHOTONPARTON
           
static java.lang.String PHOTONPHOTON
           
 
Constructor Summary
MCProcessType()
          Create an empty MCProcessType
MCProcessType(int id)
          Populate the class from the database, given the internal id.
MCProcessType(MCProcessType proc)
          Make a new MCProcessType identical to this one
MCProcessType(java.lang.String procName, Collision col)
          Populate the class from the database, given the process name and collision
 
Method Summary
static boolean checkCollision(int collId, int procId)
          Lightweight way of checking that the input collisionId is consistent with the input processId without instantiating either the Collision or the MCProcessType.
 boolean equals(java.lang.Object obj)
          Override the Object equals method.
static java.util.Vector<MCProcessType> getAll(boolean selectable)
          Returns a list of MCProcessTypes in the database.
static java.util.Vector<MCProcessType> getAll(Collision collision, boolean selectable)
          Returns a list of all valid MCProcessTypes in the database matching the input collision.
 java.lang.String getBeams()
          Return short format of colliding beams.
 Collision getCollision()
          get the collision for this process
 int getCollisionId()
          Return the Id of the collision.
 java.util.Vector<java.lang.Integer> getCompatibleProcesses()
          Returns a Vector of process Ids with which this process is compatible If the database does not contain the information then it assumes that this process is compatible only with itself N.B.
 float getDefaultLumi()
          Get the luminosity which will be requested if this process is generated.
 int getId()
          Return the unique internal ID of this processType
 boolean getIsValid()
          Returns whether the process is valid or not
 java.lang.String getMCProcessName()
          Return the process name
 int getProcessId()
          return the process Id for this process
 java.lang.String getProcessName()
          Return the process name
 java.util.Vector<java.lang.String> getUnspecifiedParameters()
          Return a Vector of all parameters which are not specified for this MCProcessType.
 int hashCode()
           
 boolean hasPhoton()
          Say whether or not photons are are in the initial state in this processType.
 boolean hasProton()
          Say whether or not protons are are in the initial state in this processType.
 boolean isDIS()
          Say whether the process is a deep inelastic scattering process
 boolean isGammaGamma()
          Say whether the process is a gamma-gamma process
 boolean isPhotoproduction()
          Say whether the process is a photoproduction process
 boolean isPP()
          Say whether the process is a hadron-hadron collision process
 boolean isValid()
          Returns whether the process is valid or not
 boolean matches(MCProcessType proc)
          Return true if the MCProcessTypes are consistent.
 void setCollision(Collision c)
          Set the collision
 void setCollisionId(int cId)
          Set the collision from teh collision Id.
 void setCompatibleProcesses(java.sql.Blob compat)
          Sets the process Ids with which this process is compatible
 void setCompatibleProcesses(java.util.Vector<java.lang.Integer> compat)
          Sets the process Ids with which this process is compatible
 void setDefaultLumi(float lumi)
          Set the luminosity which will be requested if this process is generated.
 void setId(int id)
          Set the Id for this process
 void setIsValid(boolean isValid)
          Sets whether the process is valid or not
 void setMCProcessName(java.lang.String name)
          Set the process name
 void setProcessId(int id)
          Duplicate setId to match the entry in the DB:
 void setProcessName(java.lang.String name)
           
 java.lang.String toString()
          return a single string, no spaces description of the process type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HIGHET

public static final java.lang.String HIGHET
See Also:
Constant Field Values

DIS

public static final java.lang.String DIS
See Also:
Constant Field Values

MINBIAS

public static final java.lang.String MINBIAS
See Also:
Constant Field Values

CHARM

public static final java.lang.String CHARM
See Also:
Constant Field Values

CHARMDIS

public static final java.lang.String CHARMDIS
See Also:
Constant Field Values

BEAUTY

public static final java.lang.String BEAUTY
See Also:
Constant Field Values

BEAUTYDIS

public static final java.lang.String BEAUTYDIS
See Also:
Constant Field Values

ANNIHILATION

public static final java.lang.String ANNIHILATION
See Also:
Constant Field Values

PHOTONPHOTON

public static final java.lang.String PHOTONPHOTON
See Also:
Constant Field Values

PHOTONPARTON

public static final java.lang.String PHOTONPARTON
See Also:
Constant Field Values

PARTONPARTON

public static final java.lang.String PARTONPARTON
See Also:
Constant Field Values
Constructor Detail

MCProcessType

public MCProcessType()
Create an empty MCProcessType


MCProcessType

public MCProcessType(int id)
Populate the class from the database, given the internal id. If id < 0 (i.e. id from a process that failed to find itself in the DB) then doesn't look in Db and sets itself not valid

Parameters:
pattern - specifies parameters for the new model
Throws:
JetWebException


MCProcessType

public MCProcessType(java.lang.String procName,
                     Collision col)
Populate the class from the database, given the process name and collision

Parameters:
procName - the name of the process
col - the collision


MCProcessType

public MCProcessType(MCProcessType proc)
Make a new MCProcessType identical to this one

Parameters:
proc -

Method Detail

getId

public int getId()
Return the unique internal ID of this processType

Returns:
processId


setDefaultLumi

public void setDefaultLumi(float lumi)
Set the luminosity which will be requested if this process is generated.


getDefaultLumi

public float getDefaultLumi()
Get the luminosity which will be requested if this process is generated.


getProcessId

public int getProcessId()
return the process Id for this process


getMCProcessName

public java.lang.String getMCProcessName()
Return the process name


getProcessName

public java.lang.String getProcessName()
Return the process name


setMCProcessName

public void setMCProcessName(java.lang.String name)
Set the process name


setProcessName

public void setProcessName(java.lang.String name)

getCollision

public Collision getCollision()
get the collision for this process


setId

public void setId(int id)
Set the Id for this process


setProcessId

public void setProcessId(int id)
Duplicate setId to match the entry in the DB:


setCollision

public void setCollision(Collision c)
Set the collision


setCollisionId

public void setCollisionId(int cId)
Set the collision from teh collision Id.

Parameters:
int - the id of the collision to use


getCollisionId

public int getCollisionId()
Return the Id of the collision. this is necessary in order to write it to the DB using DBObjectManager


setIsValid

public void setIsValid(boolean isValid)
Sets whether the process is valid or not


isValid

public boolean isValid()
Returns whether the process is valid or not


getIsValid

public boolean getIsValid()
Returns whether the process is valid or not


getCompatibleProcesses

public java.util.Vector<java.lang.Integer> getCompatibleProcesses()
Returns a Vector of process Ids with which this process is compatible If the database does not contain the information then it assumes that this process is compatible only with itself N.B. Valid processes do not have to be compatible with themselves!


setCompatibleProcesses

public void setCompatibleProcesses(java.sql.Blob compat)
Sets the process Ids with which this process is compatible

Parameters:
Blob - the list of process Ids in blob format as stored in the DB


setCompatibleProcesses

public void setCompatibleProcesses(java.util.Vector<java.lang.Integer> compat)
Sets the process Ids with which this process is compatible

Parameters:
Vector - the list of process Ids with which this is compatible


getUnspecifiedParameters

public java.util.Vector<java.lang.String> getUnspecifiedParameters()
Return a Vector of all parameters which are not specified for this MCProcessType.


getAll

public static java.util.Vector<MCProcessType> getAll(boolean selectable)
Returns a list of MCProcessTypes in the database.

Parameters:
selectable - if this is true, then only those processes which can be generated on their own, and which have data in the db to compare to, are returned.


getAll

public static java.util.Vector<MCProcessType> getAll(Collision collision,
                                                     boolean selectable)
Returns a list of all valid MCProcessTypes in the database matching the input collision.

Parameters:
selectable - if this is true, then only those processes which can be generated on their own, and which have data in the db to compare to, are returned.


matches

public boolean matches(MCProcessType proc)
Return true if the MCProcessTypes are consistent.


equals

public boolean equals(java.lang.Object obj)
Override the Object equals method. Use the processId.

Overrides:
equals in class java.lang.Object


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getBeams

public java.lang.String getBeams()
Return short format of colliding beams.


checkCollision

public static boolean checkCollision(int collId,
                                     int procId)
                              throws JetWebException
Lightweight way of checking that the input collisionId is consistent with the input processId without instantiating either the Collision or the MCProcessType.

Throws:
JetWebException


hasPhoton

public boolean hasPhoton()
Say whether or not photons are are in the initial state in this processType. If the particles are not specified, this returns true, since they may be photons and thus photon variables could be relevant.


hasProton

public boolean hasProton()
Say whether or not protons are are in the initial state in this processType. If the particles are not specified, this returns true, since they may be protons and thus proton variables could be relevant.


isPhotoproduction

public boolean isPhotoproduction()
Say whether the process is a photoproduction process


isDIS

public boolean isDIS()
Say whether the process is a deep inelastic scattering process


isGammaGamma

public boolean isGammaGamma()
Say whether the process is a gamma-gamma process


isPP

public boolean isPP()
Say whether the process is a hadron-hadron collision process


toString

public java.lang.String toString()
return a single string, no spaces description of the process type.

Overrides:
toString in class java.lang.Object