/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes
AdRec::expcalc::expcalc Class Reference
Inheritance diagram for AdRec::expcalc::expcalc:
Inheritance graph
[legend]
Collaboration diagram for AdRec::expcalc::expcalc:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize

Public Attributes

 vertex
 siteName
 detName
 siteIds
 detIds
 OutputFileName

Detailed Description

Definition at line 25 of file expcalc.py.


Constructor & Destructor Documentation

def AdRec::expcalc::expcalc::__init__ (   self,
  name 
)

Definition at line 27 of file expcalc.py.

00028                            :
00029         DybPythonAlg.__init__(self,name)
00030         
00031         self.vertex = CLHEP.Hep3Vector(0*units.mm, 0*units.mm, 0*units.mm)
00032         self.siteName = "DayaBay"
00033         self.detName = "AD1"
00034         self.siteIds = {
00035           'DayaBay' : gbl.Site.kDayaBay,
00036           'LingAo'  : gbl.Site.kLingAo,
00037           'Far'     : gbl.Site.kFar,
00038         }
00039         self.detIds = {
00040           'AD1'  :  gbl.DetectorId.kAD1,
00041           'AD2'  :  gbl.DetectorId.kAD2,
00042           'AD3'  :  gbl.DetectorId.kAD3,
00043           'AD4'  :  gbl.DetectorId.kAD4,
00044         }
00045         self.OutputFileName = "chargeMap.txt"
00046         return


Member Function Documentation

def AdRec::expcalc::expcalc::initialize (   self)

Definition at line 47 of file expcalc.py.

00048                         :
00049         status = DybPythonAlg.initialize(self)
00050         print "Init expcalc",self.name()
00051         if status.isFailure(): return status
00052 
00053         site = self.siteIds[self.siteName]
00054         detector = self.detIds[self.detName]
00055 
00056         qtool = self.tool('IReconHelperTool', 'ExpQCalcTool')
00057         expq = qtool.expqcalc(site, detector, self.vertex)
00058 
00059         tableLines = []
00060         normFactor = 1000.
00061         tableLines.append("# Vertex: %7.3fmm %7.3fmm %7.3fmm  \n"
00062                           % ( self.vertex.x(), self.vertex.y(), self.vertex.z())
00063                          )
00064         tableLines.append("# Expected Charge Map \n")
00065         tableLines.append("# Normalization Factor (total charge in the below map): %7.3f \n"
00066                           % normFactor)
00067         tableLines.append("#          [ring1] [ring2] [ring3] [ring4] [ring5] [ring6] [ring7] [ring8] \n")
00068         for col in range(0,24):
00069             line = ("#[column%2d] %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f %7.3f \n"
00070                     % (col+1, 
00071                       expq[col]*normFactor, 
00072                       expq[col+24]*normFactor, 
00073                       expq[col+48]*normFactor,
00074                       expq[col+72]*normFactor, 
00075                       expq[col+96]*normFactor, 
00076                       expq[col+120]*normFactor,
00077                       expq[col+144]*normFactor, 
00078                       expq[col+168]*normFactor
00079                       )
00080                    )
00081             tableLines.append(line)
00082 
00083         outFile = open(self.OutputFileName,'w')
00084         outFile.writelines(tableLines)
00085         outFile.close()
00086 
00087         return SUCCESS

def AdRec::expcalc::expcalc::execute (   self)

Definition at line 88 of file expcalc.py.

00089                      :
00090         print "Executing expcalc",self.name()
00091         return SUCCESS
        
def AdRec::expcalc::expcalc::finalize (   self)

Definition at line 92 of file expcalc.py.

00092                       :        
00093         print "Finalizing expcalc",self.name()
00094         status = DybPythonAlg.finalize(self)
00095         return status
00096 

Member Data Documentation

Definition at line 27 of file expcalc.py.

Definition at line 27 of file expcalc.py.

Definition at line 27 of file expcalc.py.

Definition at line 27 of file expcalc.py.

Definition at line 27 of file expcalc.py.

Definition at line 27 of file expcalc.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:13:26 for AdRec by doxygen 1.7.4