/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
GenMuon::TestHist::GenMuonHists Class Reference
Inheritance diagram for GenMuon::TestHist::GenMuonHists:
Inheritance graph
[legend]
Collaboration diagram for GenMuon::TestHist::GenMuonHists:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def __init__
def initialize
def execute
def finalize
def verbose
def debug
def info
def warning
def error
def fatal
def getAES
def initializeHeader
def finalizeHeader

Public Attributes

 lastTime
 volume
 de
 dT
 xy
 yz
 zx
 msgSvc
 archiveSvc
 stats
 defaultInputLocation
 execNumber
 currentJobId

Detailed Description

Definition at line 18 of file TestHist.py.


Constructor & Destructor Documentation

def GenMuon::TestHist::GenMuonHists::__init__ (   self,
  name = "GenMuonHists",
  volume = '/dd/Structure/AD/db-ade1' 
)

Definition at line 19 of file TestHist.py.

00020                                                                                :
00021         DybPythonAlg.__init__(self,name)
00022         self.lastTime = 0
00023         self.volume = volume
00024         return


Member Function Documentation

def GenMuon::TestHist::GenMuonHists::initialize (   self)

Definition at line 25 of file TestHist.py.

00026                         :
00027         status = DybPythonAlg.initialize(self)
00028         if status.isFailure(): return status
00029 
00030         self.de = self.getDet(self.volume)
00031         
00032         self.stats.defaultPath = "/file1/muons"
00033         self.stats["dT"] = self.dT = TH1F("dT","Time between events (microsec)",
00034                                           10000,0,10);
00035         self.stats["xy"] = self.xy = TH2F("xy","Vertex, Y vs. X (m)",
00036                                           200,-100,100,200,-100,100)
00037         self.stats["yz"] = self.yz = TH2F("yz","Vertex, Z vs. Y (m)",
00038                                           200,-100,100,200,-100,100)
00039         self.stats["zx"] = self.zx = TH2F("zx","Vertex, X vs. Z (m)",
00040                                           200,-100,100,200,-100,100)
00041         return SUCCESS

def GenMuon::TestHist::GenMuonHists::execute (   self)

Definition at line 42 of file TestHist.py.

00043                      :
00044         evt = self.evtSvc()
00045         genHdr = evt["/Event/Gen/GenHeader"]
00046         genEvt= genHdr.event()
00047 
00048         for vertex in irange(genEvt.vertices_begin(), genEvt.vertices_end()):
00049             xGen = vertex.position().x()/units.m
00050             yGen = vertex.position().y()/units.m
00051             zGen = vertex.position().z()/units.m
00052             tGen = vertex.position().t()
00053 
00054             point = Gaudi.XYZPoint(xGen,yGen,zGen)
00055             gpoint = self.de.geometry().toGlobal(point)
00056 
00057             self.info("Vtx: %f %f %f %f"%(xGen,yGen,zGen,tGen))
00058 
00059             self.dT.Fill(tGen-self.lastTime)
00060             self.lastTime = tGen
00061             self.xy.Fill(gpoint.x(),gpoint.y())
00062             self.yz.Fill(gpoint.y(),gpoint.z())
00063             self.zx.Fill(gpoing.z(),gpoint.x())
00064  
00065             # for particle in irange(vertex.particles_out_const_begin(),
00066             #                        vertex.particles_out_const_end()):
00067             #     GenKineticEnergy = (particle.momentum().e()
00068             #                         - particle.momentum().m())
00069             #     if particle.pdg_id()==11 or particle.pdg_id()==-11:
00070             #         self.BetaKE[nbeta] = GenKineticEnergy 
00071             #         nbeta += 1
00072             #         pass
00073             #     continue
00074             continue
00075         return SUCCESS


Member Data Documentation

Definition at line 19 of file TestHist.py.

Definition at line 19 of file TestHist.py.

Definition at line 25 of file TestHist.py.

Definition at line 25 of file TestHist.py.

Definition at line 25 of file TestHist.py.

Definition at line 25 of file TestHist.py.

Definition at line 25 of file TestHist.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:20:55 for GenMuon by doxygen 1.7.4