CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
twikiExport.Constituent Class Reference

Public Member Functions

def __init__
 
def __str__
 

Public Attributes

 theCount
 
 theDensity
 
 theDescription
 
 theL0
 
 theMass
 
 theName
 
 theType
 
 theVolume
 
 theX0
 

Detailed Description

Definition at line 6 of file twikiExport.py.

Constructor & Destructor Documentation

def twikiExport.Constituent.__init__ (   self,
  line,
  predefinedMaterials 
)

Definition at line 7 of file twikiExport.py.

References split.

7 
8  def __init__(self, line, predefinedMaterials):
9  if len(line.split('"')) < 5 or len(line.split('"')[4].split()) < 3:
10  raise Exception("not a well formed Constituent: "+constString)
11  self.theDescription = line.split('"')[1]
12  self.theName = line.split('"')[3]
13  self.theCount = float(line.split('"')[4].split()[1])
14  self.theVolume = float(line.split('"')[4].split()[0]) * self.theCount
15  self.theType = line.split('"')[4].split()[2]
16  self.theDensity = float(predefinedMaterials[self.theName][2])
17  self.theX0 = float(predefinedMaterials[self.theName][3]) * self.theDensity
18  self.theL0 = float(predefinedMaterials[self.theName][4]) * self.theDensity
19  self.theMass = self.theVolume * self.theDensity
# print "%s\tX0: %.3f\trho: %.3f\tX0': %.3f"%(self.theName, float(predefinedMaterials[self.theName][3]), float(predefinedMaterials[self.theName][2]), self.theX0)
double split
Definition: MVATrainer.cc:139

Member Function Documentation

def twikiExport.Constituent.__str__ (   self)

Definition at line 20 of file twikiExport.py.

References twikiExport.Constituent.theCount, ExampleClass.theCount, twikiExport.Constituent.theDescription, twikiExport.Constituent.theMass, BzeroReferenceTrajectoryFactory.theMass, ReferenceTrajectoryFactory.theMass, DualBzeroTrajectoryFactory.theMass, DualTrajectoryFactory.theMass, twikiExport.Constituent.theName, CocoaMaterialElementary.theName, GeomDetType.theName, RPCLinkSynchroStat::LinkBoard.theName, ALIFileOut.theName, HistoDef.theName, ALIFileIn.theName, FittedEntry.theName, Measurement.theName, CSCChamberSpecs.theName, OpticalObject.theName, twikiExport.Constituent.theType, CocoaSolidShape.theType, DTLayer.theType, Measurement.theType, and OpticalObject.theType.

20 
21  def __str__(self):
22  return "Name: "+self.theName+" desc: "+self.theDescription+" mass "+self.theMass+" type "+self.theType+" count "+self.theCount

Member Data Documentation

twikiExport.Constituent.theCount

Definition at line 12 of file twikiExport.py.

Referenced by twikiExport.Constituent.__str__().

twikiExport.Constituent.theDensity

Definition at line 15 of file twikiExport.py.

twikiExport.Constituent.theDescription

Definition at line 10 of file twikiExport.py.

Referenced by twikiExport.Constituent.__str__(), and twikiExport.Material.__str__().

twikiExport.Constituent.theL0

Definition at line 17 of file twikiExport.py.

twikiExport.Constituent.theMass

Definition at line 18 of file twikiExport.py.

Referenced by twikiExport.Constituent.__str__().

twikiExport.Constituent.theName

Definition at line 11 of file twikiExport.py.

Referenced by twikiExport.Constituent.__str__(), and twikiExport.Material.__str__().

twikiExport.Constituent.theType

Definition at line 14 of file twikiExport.py.

Referenced by twikiExport.Constituent.__str__().

twikiExport.Constituent.theVolume

Definition at line 13 of file twikiExport.py.

twikiExport.Constituent.theX0

Definition at line 16 of file twikiExport.py.