/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 | Static Public Attributes
ACUNeutronCaptureVertex::CaptureVertexAlg Class Reference
Inheritance diagram for ACUNeutronCaptureVertex::CaptureVertexAlg:
Inheritance graph
[legend]
Collaboration diagram for ACUNeutronCaptureVertex::CaptureVertexAlg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def captureIsotope
def makeIsotopeHistogram
def __init__
def initialize
def execute
def finalize

Public Attributes

 cableSvc

Static Public Attributes

list Isotopes

Detailed Description

Definition at line 29 of file ACUNeutronCaptureVertex.py.


Constructor & Destructor Documentation

def ACUNeutronCaptureVertex::CaptureVertexAlg::__init__ (   self,
  name 
)

Definition at line 53 of file ACUNeutronCaptureVertex.py.

00054                            :
00055         DybPythonAlg.__init__(self,name)
00056         return


Member Function Documentation

def ACUNeutronCaptureVertex::CaptureVertexAlg::captureIsotope (   instance,
  a,
  z,
  reconE,
  isotopes = Isotopes 
)

Definition at line 39 of file ACUNeutronCaptureVertex.py.

00040                                                                 :
00041         for i in range(0,len(isotopes)):
00042             if ((isotopes[i][0] == a) & (isotopes[i][1] == z)):
00043                 instance.stats["/file0/hcap/isotopes"].Fill(isotopes[i][2],scale)
00044                 if reconE >= 6:
00045                     instance.stats["/file0/hcap/isotopes6MeV"].Fill(isotopes[i][2],scale)

def ACUNeutronCaptureVertex::CaptureVertexAlg::makeIsotopeHistogram (   instance,
  hist,
  isotopes = Isotopes 
)

Definition at line 46 of file ACUNeutronCaptureVertex.py.

00047                                                                 :
00048         hist.GetXaxis().SetTitle("Isotopes")
00049         hist.GetYaxis().SetTitle("Neutron Capture Events/Day")
00050         # Set Bin Labels for Isotopes
00051         for i in range(0,len(isotopes)):
00052             hist.GetXaxis().SetBinLabel(2 + i,isotopes[i][2])

def ACUNeutronCaptureVertex::CaptureVertexAlg::initialize (   self)

Definition at line 57 of file ACUNeutronCaptureVertex.py.

00058                         :
00059         status = DybPythonAlg.initialize(self)
00060         if status.isFailure(): return status
00061         self.info("initializing")
00062 
00063         self.cableSvc = self.svc('ICableSvc','CableSvc')
00064         if self.cableSvc == None:
00065             self.error("Failed to get CableSvc")
00066             return FAILURE
00067 
00068         ###Generate Histograms ##
00069         ## Hadron Capture events
00070 
00071         hist = TH1F("Events","Total Number of Neutron Capture Events" +
00072                 " for Each Neutron Generated in ACU  "+acuAxis,500, 0.0,5.0)
00073         hist.GetXaxis().SetTitle("Neutron Captures")
00074         hist.GetYaxis().SetTitle("Events")
00075         self.stats["/file0/hcap/nHcap"] = hist
00076         
00077         hist = TH1F("Isotopes","The Capture Target for Neutrons"+
00078                 " at ACU  " + acuAxis + " that Generate Signals In AD"
00079                 ,26,0.0,26.0)
00080         self.makeIsotopeHistogram(hist)
00081         self.stats["/file0/hcap/isotopes"] = hist
00082 
00083         hist = TH1F("Isotopes","The Capture Target for Neutrons"+
00084                 " at ACU  " + acuAxis + " with Reconstructed E > 6MeV"
00085                 ,26,0.0,26.0)
00086         self.makeIsotopeHistogram(hist)
00087         self.stats["/file0/hcap/isotopes6MeV"] = hist
00088 
00089         hist = TH2F("EGamma","Z of the Capture Target vs Total Gamma Energy" +
00090                 " for the Neutrons at ACU  " + acuAxis +
00091                 " that Generate Signals in AD" ,500,0.0,12.0,81,-0.5,80.5 )
00092         hist.GetXaxis().SetTitle("E/Neutron (MeV)")
00093         hist.GetYaxis().SetTitle("Z")
00094         hist.SetMarkerStyle(2)
00095         self.stats["/file0/hcap/ZvsTotalGamma"] = hist
00096 
00097         hist = TH2F("EGamma","Z of the Capture Target vs Total Gamma Energy" + 
00098                 " for the Neutrons at ACU  " + acuAxis + 
00099                 "  with Reconstructed E > 6MeV" ,500,0.0,12.0,81,-0.5,80.5 )
00100         hist.GetXaxis().SetTitle("E/Neutron (MeV)")
00101         hist.GetYaxis().SetTitle("Z")
00102         hist.SetMarkerStyle(2)
00103         self.stats["/file0/hcap/ZvsTotalGamma6MeV"] = hist
00104 
00105         hist = TH2F("ZvsA", "Z vs A of target atoms for the Neutrons at ACU "+
00106                         acuAxis,500, -0.5, 210.5, 500,-0.5,80.5)
00107         hist.GetXaxis().SetTitle("A")
00108         hist.GetYaxis().SetTitle("Z")
00109         hist.SetMarkerStyle(2)
00110         self.stats["/file0/hcap/ZvsA"]= hist
00111         
00112         ##Gamma-ray energy
00113         hist = TH1F("EGamma","Individual Gamma-Ray Energy for" +
00114                 " the Neutrons at ACU  " + acuAxis + 
00115                 " that Generate Signals in AD",500,0.0,12.0)
00116         hist.GetXaxis().SetTitle("E (MeV)")
00117         hist.GetYaxis().SetTitle("Events/Day")
00118         self.stats["/file0/gamma/individual"] = hist
00119 
00120         hist = TH1F("EGamma","Individual Gamma Ray Energy for the Neutrons"
00121                 + " at ACU  " + acuAxis + 
00122                 " with Reconstructed E > 6MeV",500,0.0,12.0)
00123         hist.GetXaxis().SetTitle("E (MeV)")
00124         hist.GetYaxis().SetTitle("Events/Day")
00125         self.stats["/file0/gamma/individual6MeV"] = hist
00126         
00127         hist = TH1F("EGamma", "Total Gamma Ray Energy Emitted from the Capture "
00128                 + "a Neutron Generated in ACU  " + acuAxis
00129                 ,500,0.0,12.0)
00130         hist.GetXaxis().SetTitle("E/Neutron (MeV)")
00131         hist.GetYaxis().SetTitle("Events/Day")
00132         self.stats["/file0/gamma/totalCaptureGamma"] = hist
00133         
00134         hist = TH1F("EGamma", "Total Gamma Ray Energy Emitted from the Capture "
00135                         + "a Neutron Generated in ACU  " + acuAxis +
00136                         "with ReconEnergy > 6MeV"
00137                         ,500,0.0,12.0)
00138         hist.GetXaxis().SetTitle("E/Neutron (MeV)")
00139         hist.GetYaxis().SetTitle("Events/Day")
00140         self.stats["/file0/gamma/totalCaptureGamma6MeV"] = hist
00141         
00142         hist = TH1F("EGamma","Gamma Ray Energy from Inelastic Collisions"
00143                         + "of Neutrons Generated In ACU  " + 
00144                         acuAxis ,500,0.0,12.0)
00145         hist.GetXaxis().SetTitle("E (MeV)")
00146         hist.GetYaxis().SetTitle("Events/Day")
00147         self.stats["/file0/gamma/inelastic"] = hist
00148 
00149 
00150         
00151         return SUCCESS

def ACUNeutronCaptureVertex::CaptureVertexAlg::execute (   self)

Definition at line 152 of file ACUNeutronCaptureVertex.py.

00153                      :
00154         self.info("executing")
00155         evt = self.evtSvc()
00156 
00157         recHdr = evt["/Event/Rec/RecHeader"]
00158         if recHdr == None:
00159             self.error("Failed to get RecHeader")
00160             return FAILURE
00161 
00162         simHdr = evt["/Event/Sim/SimHeader"]
00163         if simHdr == None:
00164             self.error("Failed to get SimHeader")
00165             return FAILURE
00166         
00167         recResults = recHdr.recResults()
00168         recTrigger = recResults["AdSimple"]
00169         if recTrigger.positionStatus() == ReconStatus.kGood:
00170             if recTrigger.energyStatus() == ReconStatus.kGood:
00171                 reconEnergy = recTrigger.energy()
00172                 phis = simHdr.particleHistory()
00173                 vtx = phis.vertexVector()
00174                 nvtx = vtx.size()
00175                 nHcap = 0       #Total number of hadron capture events
00176                 for i in range(0,nvtx):
00177                     vsec = vtx[i].secondaries()
00178                     vproc = vtx[i].process().name()
00179                     PDG = vtx[i].track().track().particle()
00180                     totalGammaE = 0 #Total gamma energy for each hadron capture
00181                     
00182                     # Hadron capture events analysis
00183                     if PDG == 2112 and ((vproc == "HadronCapture") or (vproc == "nCapture")):
00184                         eachGammaE = 0
00185                         Z = 0
00186                         A = 0   
00187                         for j in range(0,vsec.size()):
00188                             if vsec[j].track().vertices().size() > 0:
00189                                 vertex1 = vsec[j].track().vertices()[0]
00190                                 pdg = vsec[j].track().particle()
00191                                 eachGammaE = vertex1.kineticEnergy()
00192                                 if pdg > 1000000000: #code is 10LZZZAAAI
00193                                     Z = (int(pdg/10000)%1000)
00194                                     # The atomic mass of the daughter atom has been increased by 1
00195                                     # so 1 is subtracted to get A of the parent atom
00196                                     A = (int(pdg/10)%1000)-1
00197                                     nHcap += 1
00198                                     self.captureIsotope(A,Z,reconEnergy)
00199                                     self.stats["/file0/hcap/ZvsA"].Fill(A,Z)
00200                                 if pdg == 22:
00201                                     totalGammaE += eachGammaE
00202                         if ((Z > 0) & (A > 0)):
00203                             self.stats["/file0/hcap/ZvsTotalGamma"].Fill(totalGammaE,Z)
00204                             self.stats["/file0/gamma/totalCaptureGamma"].Fill(totalGammaE,scale)        
00205                             if reconEnergy > 6:
00206                                 self.stats["/file0/hcap/ZvsTotalGamma6MeV"].Fill(totalGammaE,Z)
00207                                 self.stats["/file0/gamma/totalCaptureGamma6MeV"].Fill(totalGammaE,scale)        
00208                     
00209                     # Loop over all the vertices as well to get the energy of all gammas                        
00210                     for j in range(0,vsec.size()):
00211                         eachGammaE = 0
00212                         if vsec[j].track().vertices().size() > 0:
00213                             vertex1 = vsec[j].track().vertices()[0]
00214                             pdg = vsec[j].track().particle()
00215                             eachGammaE = vertex1.kineticEnergy()
00216                             if pdg == 22:
00217                                 self.stats["/file0/gamma/individual"].Fill(eachGammaE,scale)
00218                                 if reconEnergy >= 6:
00219                                     self.stats["/file0/gamma/individual6MeV"].Fill(eachGammaE,scale)
00220                                 if vertex1.process().name() == "NeutronInelastic":
00221                                     self.stats["/file0/gamma/inelastic"].Fill(eachGammaE,scale) 
00222                 self.stats["/file0/hcap/nHcap"].Fill(nHcap)
00223         
00224         return SUCCESS
        
def ACUNeutronCaptureVertex::CaptureVertexAlg::finalize (   self)

Definition at line 225 of file ACUNeutronCaptureVertex.py.

00226                       :
00227         self.info("finalizing")
00228         status = DybPythonAlg.finalize(self)
00229         return status
00230 


Member Data Documentation

Initial value:
[[1,1,'1H'],[12,6,'12C'],[13,6,'13C'],[14,7,'14N'],
                [16,8,'16O'],[28,14,'28Si'],[31,15,'31P'],[32,16,'32S'],
                [35,17,'35Cl'],[37,17,'37Cl'],[50,24,'50Cr'],[52,24,'52Cr'],
                [53,24,'53Cr'],[54,24,'54Cr'],[55,25,'55Mn'],[54,26,'54Fe'],
                [56,26,'56Fe'],[57,26,'57Fe'],[58,26,'58Fe'],[58,28,'58Ni'],
                [60,28,'60Ni'],[62,28,'62Ni'],[107,47,'107Ag'],[155,64,'155Gd'],[157,64,'157Gd']]

Definition at line 32 of file ACUNeutronCaptureVertex.py.

Definition at line 57 of file ACUNeutronCaptureVertex.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 09:54:37 for Calibration by doxygen 1.7.4