Public Member Functions | |
def | captureIsotope |
def | makeIsotopeHistogram |
def | __init__ |
def | initialize |
def | execute |
def | finalize |
Public Attributes | |
cableSvc | |
Static Public Attributes | |
list | Isotopes |
Definition at line 29 of file ACUNeutronCaptureVertex.py.
def ACUNeutronCaptureVertex::CaptureVertexAlg::captureIsotope | ( | instance, | ||
a, | ||||
z, | ||||
reconE, | ||||
isotopes = Isotopes | ||||
) |
Definition at line 39 of file ACUNeutronCaptureVertex.py.
00039 : 00040 for i in range(0,len(isotopes)): 00041 if ((isotopes[i][0] == a) & (isotopes[i][1] == z)): 00042 instance.stats["/file0/hcap/isotopes"].Fill(isotopes[i][2],scale) 00043 if reconE >= 6: 00044 instance.stats["/file0/hcap/isotopes6MeV"].Fill(isotopes[i][2],scale) 00045 def makeIsotopeHistogram(instance, hist,isotopes = Isotopes):
def ACUNeutronCaptureVertex::CaptureVertexAlg::makeIsotopeHistogram | ( | instance, | ||
hist, | ||||
isotopes = Isotopes | ||||
) |
Definition at line 46 of file ACUNeutronCaptureVertex.py.
00046 : 00047 hist.GetXaxis().SetTitle("Isotopes") 00048 hist.GetYaxis().SetTitle("Neutron Capture Events/Day") 00049 # Set Bin Labels for Isotopes 00050 for i in range(0,len(isotopes)): 00051 hist.GetXaxis().SetBinLabel(2 + i,isotopes[i][2]) 00052 def __init__(self,name):
def ACUNeutronCaptureVertex::CaptureVertexAlg::__init__ | ( | self, | ||
name | ||||
) |
Definition at line 53 of file ACUNeutronCaptureVertex.py.
00053 : 00054 DybPythonAlg.__init__(self,name) 00055 return 00056 def initialize(self):
def ACUNeutronCaptureVertex::CaptureVertexAlg::initialize | ( | self | ) |
Definition at line 57 of file ACUNeutronCaptureVertex.py.
00057 : 00058 status = DybPythonAlg.initialize(self) 00059 if status.isFailure(): return status 00060 self.info("initializing") 00061 00062 self.cableSvc = self.svc('ICableSvc','StaticCableSvc') 00063 if self.cableSvc == None: 00064 self.error("Failed to get StaticCableSvc") 00065 return FAILURE 00066 00067 ###Generate Histograms ## 00068 ## Hadron Capture events 00069 00070 hist = TH1F("Events","Total Number of Neutron Capture Events" + 00071 " for Each Neutron Generated in ACU "+acuAxis,500, 0.0,5.0) 00072 hist.GetXaxis().SetTitle("Neutron Captures") 00073 hist.GetYaxis().SetTitle("Events") 00074 self.stats["/file0/hcap/nHcap"] = hist 00075 00076 hist = TH1F("Isotopes","The Capture Target for Neutrons"+ 00077 " at ACU " + acuAxis + " that Generate Signals In AD" 00078 ,26,0.0,26.0) 00079 self.makeIsotopeHistogram(hist) 00080 self.stats["/file0/hcap/isotopes"] = hist 00081 00082 hist = TH1F("Isotopes","The Capture Target for Neutrons"+ 00083 " at ACU " + acuAxis + " with Reconstructed E > 6MeV" 00084 ,26,0.0,26.0) 00085 self.makeIsotopeHistogram(hist) 00086 self.stats["/file0/hcap/isotopes6MeV"] = hist 00087 00088 hist = TH2F("EGamma","Z of the Capture Target vs Total Gamma Energy" + 00089 " for the Neutrons at ACU " + acuAxis + 00090 " that Generate Signals in AD" ,500,0.0,12.0,81,-0.5,80.5 ) 00091 hist.GetXaxis().SetTitle("E/Neutron (MeV)") 00092 hist.GetYaxis().SetTitle("Z") 00093 hist.SetMarkerStyle(2) 00094 self.stats["/file0/hcap/ZvsTotalGamma"] = hist 00095 00096 hist = TH2F("EGamma","Z of the Capture Target vs Total Gamma Energy" + 00097 " for the Neutrons at ACU " + acuAxis + 00098 " with Reconstructed E > 6MeV" ,500,0.0,12.0,81,-0.5,80.5 ) 00099 hist.GetXaxis().SetTitle("E/Neutron (MeV)") 00100 hist.GetYaxis().SetTitle("Z") 00101 hist.SetMarkerStyle(2) 00102 self.stats["/file0/hcap/ZvsTotalGamma6MeV"] = hist 00103 00104 hist = TH2F("ZvsA", "Z vs A of target atoms for the Neutrons at ACU "+ 00105 acuAxis,500, -0.5, 210.5, 500,-0.5,80.5) 00106 hist.GetXaxis().SetTitle("A") 00107 hist.GetYaxis().SetTitle("Z") 00108 hist.SetMarkerStyle(2) 00109 self.stats["/file0/hcap/ZvsA"]= hist 00110 00111 ##Gamma-ray energy 00112 hist = TH1F("EGamma","Individual Gamma-Ray Energy for" + 00113 " the Neutrons at ACU " + acuAxis + 00114 " that Generate Signals in AD",500,0.0,12.0) 00115 hist.GetXaxis().SetTitle("E (MeV)") 00116 hist.GetYaxis().SetTitle("Events/Day") 00117 self.stats["/file0/gamma/individual"] = hist 00118 00119 hist = TH1F("EGamma","Individual Gamma Ray Energy for the Neutrons" 00120 + " at ACU " + acuAxis + 00121 " with Reconstructed E > 6MeV",500,0.0,12.0) 00122 hist.GetXaxis().SetTitle("E (MeV)") 00123 hist.GetYaxis().SetTitle("Events/Day") 00124 self.stats["/file0/gamma/individual6MeV"] = hist 00125 00126 hist = TH1F("EGamma", "Total Gamma Ray Energy Emitted from the Capture " 00127 + "a Neutron Generated in ACU " + acuAxis 00128 ,500,0.0,12.0) 00129 hist.GetXaxis().SetTitle("E/Neutron (MeV)") 00130 hist.GetYaxis().SetTitle("Events/Day") 00131 self.stats["/file0/gamma/totalCaptureGamma"] = hist 00132 00133 hist = TH1F("EGamma", "Total Gamma Ray Energy Emitted from the Capture " 00134 + "a Neutron Generated in ACU " + acuAxis + 00135 "with ReconEnergy > 6MeV" 00136 ,500,0.0,12.0) 00137 hist.GetXaxis().SetTitle("E/Neutron (MeV)") 00138 hist.GetYaxis().SetTitle("Events/Day") 00139 self.stats["/file0/gamma/totalCaptureGamma6MeV"] = hist 00140 00141 hist = TH1F("EGamma","Gamma Ray Energy from Inelastic Collisions" 00142 + "of Neutrons Generated In ACU " + 00143 acuAxis ,500,0.0,12.0) 00144 hist.GetXaxis().SetTitle("E (MeV)") 00145 hist.GetYaxis().SetTitle("Events/Day") 00146 self.stats["/file0/gamma/inelastic"] = hist 00147 00148 00149 00150 return SUCCESS 00151 def execute(self):
def ACUNeutronCaptureVertex::CaptureVertexAlg::execute | ( | self | ) |
Definition at line 152 of file ACUNeutronCaptureVertex.py.
00152 : 00153 self.info("executing") 00154 evt = self.evtSvc() 00155 00156 recHdr = evt["/Event/Rec/RecHeader"] 00157 if recHdr == None: 00158 self.error("Failed to get RecHeader") 00159 return FAILURE 00160 00161 simHdr = evt["/Event/Sim/SimHeader"] 00162 if simHdr == None: 00163 self.error("Failed to get SimHeader") 00164 return FAILURE 00165 00166 recResults = recHdr.recResults() 00167 recTrigger = recResults["AdSimple"] 00168 if recTrigger.positionStatus() == ReconStatus.kGood: 00169 if recTrigger.energyStatus() == ReconStatus.kGood: 00170 reconEnergy = recTrigger.energy() 00171 phis = simHdr.particleHistory() 00172 vtx = phis.vertexVector() 00173 nvtx = vtx.size() 00174 nHcap = 0 #Total number of hadron capture events 00175 for i in range(0,nvtx): 00176 vsec = vtx[i].secondaries() 00177 vproc = vtx[i].process().name() 00178 PDG = vtx[i].track().track().particle() 00179 totalGammaE = 0 #Total gamma energy for each hadron capture 00180 00181 # Hadron capture events analysis 00182 if PDG == 2112 and ((vproc == "HadronCapture") or (vproc == "nCapture")): 00183 eachGammaE = 0 00184 Z = 0 00185 A = 0 00186 for j in range(0,vsec.size()): 00187 if vsec[j].track().vertices().size() > 0: 00188 vertex1 = vsec[j].track().vertices()[0] 00189 pdg = vsec[j].track().particle() 00190 eachGammaE = vertex1.kineticEnergy() 00191 if pdg > 1000000000: #code is 10LZZZAAAI 00192 Z = (int(pdg/10000)%1000) 00193 # The atomic mass of the daughter atom has been increased by 1 00194 # so 1 is subtracted to get A of the parent atom 00195 A = (int(pdg/10)%1000)-1 00196 nHcap += 1 00197 self.captureIsotope(A,Z,reconEnergy) 00198 self.stats["/file0/hcap/ZvsA"].Fill(A,Z) 00199 if pdg == 22: 00200 totalGammaE += eachGammaE 00201 if ((Z > 0) & (A > 0)): 00202 self.stats["/file0/hcap/ZvsTotalGamma"].Fill(totalGammaE,Z) 00203 self.stats["/file0/gamma/totalCaptureGamma"].Fill(totalGammaE,scale) 00204 if reconEnergy > 6: 00205 self.stats["/file0/hcap/ZvsTotalGamma6MeV"].Fill(totalGammaE,Z) 00206 self.stats["/file0/gamma/totalCaptureGamma6MeV"].Fill(totalGammaE,scale) 00207 00208 # Loop over all the vertices as well to get the energy of all gammas 00209 for j in range(0,vsec.size()): 00210 eachGammaE = 0 00211 if vsec[j].track().vertices().size() > 0: 00212 vertex1 = vsec[j].track().vertices()[0] 00213 pdg = vsec[j].track().particle() 00214 eachGammaE = vertex1.kineticEnergy() 00215 if pdg == 22: 00216 self.stats["/file0/gamma/individual"].Fill(eachGammaE,scale) 00217 if reconEnergy >= 6: 00218 self.stats["/file0/gamma/individual6MeV"].Fill(eachGammaE,scale) 00219 if vertex1.process().name() == "NeutronInelastic": 00220 self.stats["/file0/gamma/inelastic"].Fill(eachGammaE,scale) 00221 self.stats["/file0/hcap/nHcap"].Fill(nHcap) 00222 00223 return SUCCESS 00224 def finalize(self):
def ACUNeutronCaptureVertex::CaptureVertexAlg::finalize | ( | self | ) |
Definition at line 225 of file ACUNeutronCaptureVertex.py.
00225 : 00226 self.info("finalizing") 00227 status = DybPythonAlg.finalize(self) 00228 return status 00229 00230 ##### Job Configuration for nuwa.py ########################################
list ACUNeutronCaptureVertex::CaptureVertexAlg::Isotopes [static] |
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 62 of file ACUNeutronCaptureVertex.py.