/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
DetSimValidation::AD::IBDPositron Class Reference

List of all members.

Public Member Functions

def __init__

Public Attributes

 hepevt
 dumper
 detsim
 detsimvali

Detailed Description

Configure GenTools, DetSim and DetSimVali for running positrons only from IBD events distributed uniformly in an AD.

Definition at line 125 of file AD.py.


Constructor & Destructor Documentation

def DetSimValidation::AD::IBDPositron::__init__ (   self,
  histogram_filename = 'IBDpositron.root',
  volume = "/dd/Structure/AD/far-lso2",
  seed = "0",
  nevts = "200" 
)
Construct the default configuration.

Definition at line 129 of file AD.py.

00130                                                                                                                             :
00131         ''' Construct the default configuration.
00132         '''
00133         import GaudiKernel.SystemOfUnits as units
00134 
00135         # First GenTools
00136         ibd = "InverseBeta.exe -seed " + seed + " -n " + nevts + " -eplus_only |"
00137         from GenTools.Helpers import HepEVT
00138         he = HepEVT(hepEvtDataSource = ibd)
00139         he.positioner.Strategy = "FullVolume"
00140         he.positioner.Volume = volume
00141         he.positioner.Mode = "Uniform"
00142         he.positioner.Spread = 2.6*units.meter
00143         he.positioner.Position = [0,0,2.5*units.meter]
00144         he.transformer.Volume = volume
00145         import GenTools
00146         GenTools.Configure().register(he)
00147         self.hepevt = he
00148 
00149         self.dumper = GenTools.Dumper()
00150 
00151         # Then DetSim, with smaller than default configuration:
00152         import DetSim
00153         detsim = DetSim.Configure(site="far",physlist = DetSim.physics_list_basic)
00154         params = {
00155             'start' :"(start > 0)",
00156             'track1':"(id==1)",
00157             'track2':"(id==2)",
00158             'GD':    "MaterialName == '/dd/Materials/GdDopedLS'",
00159             'LS':    "MaterialName == '/dd/Materials/LiquidScintillator'",
00160             'MO':   "MaterialName == '/dd/Materials/MineralOil'",
00161             'IAV':   "DetectorElementName == 'db-iav1'",
00162             'OAV':   "DetectorElementName == 'db-oav1'",
00163             'IWS': "MaterialName == '/dd/Materials/IwsWater'",
00164             'OWS': "MaterialName == '/dd/Materials/OwsWater'",
00165             'lastvtx': "IsStopping == 1",
00166             'firstvtx': "IsStarting == 1",
00167             'NeutronTrk': "pdg == 2112",
00168             'NeutronMom': "creator == 2112",
00169             'Gamma': "pdg == 22",
00170             'Muon': "(pdg == 13 or pdg == -13)"
00171             }
00172         
00173         detsim.unobserver(stats=[
00174                 ["MuonTrkLengthInOws", "dx", "%(Muon)s and %(OWS)s"%params],
00175                 ["MuonTrkLengthInIws", "dx", "%(Muon)s and %(IWS)s"%params],
00176                 ["MuonTrkLengthInLS", "dx", "%(Muon)s and %(LS)s"%params],
00177                 ["MuonTrkLengthInGdLS","dx", "%(Muon)s and %(GD)s"%params],
00178                 ["dEInn","dE", "(pdg!=20022) and %(IWS)s"%params],
00179                 ["dEOut","dE", "(pdg!=20022) and %(OWS)s"%params],
00180                 ["MuonStop", "dx",  "%(Muon)s and %(lastvtx)s"%params],
00181                 
00182                 ["EDepInGdLS", "dE", "%(GD)s"%params],
00183                 ["EDepInLS", "dE", "%(LS)s"%params],
00184                 ["EDepInIAV", "dE", "%(IAV)s"%params],
00185                 ["EDepInOAV", "dE", "%(OAV)s"%params],
00186                 ["EDepInOIL", "dE", "%(MO)s"%params],
00187                 
00188                 ["QEDepInGdLS", "qdE", "%(GD)s"%params],
00189                 ["QEDepInLS", "qdE", "%(LS)s"%params],
00190                 ["QEDepInIAV", "qdE", "%(IAV)s"%params],
00191                 ["QEDepInOAV", "qdE", "%(OAV)s"%params],
00192                 ["QEDepInOIL", "qdE", "%(MO)s"%params],
00193 
00194                 ["tQESumGdLS", "qEt", "%(GD)s"%params],
00195                 ["xQESumGdLS", "qEx", "%(GD)s"%params],
00196                 ["yQESumGdLS", "qEy", "%(GD)s"%params],
00197                 ["zQESumGdLS", "qEz", "%(GD)s"%params],
00198         
00199                 ["tQESumLS", "qEt", "%(LS)s"%params],
00200                 ["xQESumLS", "qEx", "%(LS)s"%params],
00201                 ["yQESumLS", "qEy", "%(LS)s"%params],
00202                 ["zQESumLS", "qEz", "%(LS)s"%params],
00203         
00204                 ["tQESumMO", "qEt", "%(MO)s"%params],
00205                 ["xQESumMO", "qEx", "%(MO)s"%params],
00206                 ["yQESumMO", "qEy", "%(MO)s"%params],
00207                 ["zQESumMO", "qEz", "%(MO)s"%params],
00208         
00209                 ["tGen",   "t","%(NeutronTrk)s and %(firstvtx)s"%params],
00210                 ["xGen",   "x","%(NeutronTrk)s and %(firstvtx)s"%params],
00211                 ["yGen",   "y","%(NeutronTrk)s and %(firstvtx)s"%params],
00212                 ["zGen",   "z","%(NeutronTrk)s and %(firstvtx)s"%params],
00213         
00214                 ["tCap",   "t","%(NeutronTrk)s and %(lastvtx)s"%params],
00215                 ["xCap",   "x","%(NeutronTrk)s and %(lastvtx)s"%params],
00216                 ["yCap",   "y","%(NeutronTrk)s and %(lastvtx)s"%params],
00217                 ["zCap",   "z","%(NeutronTrk)s and %(lastvtx)s"%params],
00218         
00219                 ["capTarget", "capTargetZ","%(track1)s and %(lastvtx)s"%params],
00220                 
00221                 # track 1
00222                 ["pdgId_Trk1","pdg","%(track1)s and %(start)s"%params],
00223                 ["t_Trk1",    "t" , "%(track1)s and %(start)s"%params],
00224                 ["x_Trk1",    "x", "%(track1)s and %(start)s"%params],
00225                 ["y_Trk1",    "y", "%(track1)s and %(start)s"%params],
00226                 ["z_Trk1",    "z", "%(track1)s and %(start)s"%params],
00227                 ["tEnd_Trk1",    "t" , "%(track1)s and %(lastvtx)s"%params],
00228                 ["xEnd_Trk1",    "x", "%(track1)s and %(lastvtx)s"%params],
00229                 ["yEnd_Trk1",    "y", "%(track1)s and %(lastvtx)s"%params],
00230                 ["zEnd_Trk1",    "z", "%(track1)s and %(lastvtx)s"%params],
00231                 ["e_Trk1",    "E",  "%(track1)s and %(start)s"%params],
00232                 ["p_Trk1",    "p",  "%(track1)s and %(start)s"%params],
00233                 ["ke_Trk1",   "KE", "%(track1)s and %(start)s"%params],
00234                 ["vx_Trk1",   "lvx","%(track1)s and %(start)s"%params],
00235                 ["vy_Trk1",   "lvy","%(track1)s and %(start)s"%params],
00236                 ["vz_Trk1",   "lvz","%(track1)s and %(start)s"%params],
00237                 ["TrkLength_GD_Trk1",  "dx","%(track1)s and %(GD)s"%params],
00238                 ["TrkLength_iAV_Trk1", "dx","%(track1)s and %(IAV)s"%params],
00239                 ["TrkLength_LS_Trk1",  "dx","%(track1)s and %(LS)s"%params],
00240                 ["TrkLength_oAV_Trk1", "dx","%(track1)s and %(OAV)s"%params],
00241                 ["TrkLength_Oil_Trk1", "dx","%(track1)s and %(MO)s"%params],
00242                 # track 2
00243                 ["pdgId_Trk2","pdg","%(track2)s and %(start)s"%params],
00244                 ["t_Trk2",    "t" , "%(track2)s and %(start)s"%params],
00245                 ["x_Trk2",    "x", "%(track2)s and %(start)s"%params],
00246                 ["y_Trk2",    "y", "%(track2)s and %(start)s"%params],
00247                 ["z_Trk2",    "z", "%(track2)s and %(start)s"%params],
00248                 ["tEnd_Trk2",    "t" , "%(track2)s and %(lastvtx)s"%params],
00249                 ["xEnd_Trk2",    "x", "%(track2)s and %(lastvtx)s"%params],
00250                 ["yEnd_Trk2",    "y", "%(track2)s and %(lastvtx)s"%params],
00251                 ["zEnd_Trk2",    "z", "%(track2)s and %(lastvtx)s"%params],
00252                 ["e_Trk2",    "E",  "%(track2)s and %(start)s"%params],
00253                 ["p_Trk2",    "p",  "%(track2)s and %(start)s"%params],
00254                 ["ke_Trk2",   "KE", "%(track2)s and %(start)s"%params],
00255                 ["vx_Trk2",   "lvx","%(track2)s and %(start)s"%params],
00256                 ["vy_Trk2",   "lvy","%(track2)s and %(start)s"%params],
00257                 ["vz_Trk2",   "lvz","%(track2)s and %(start)s"%params],
00258                 ["TrkLength_GD_Trk2",  "dx","%(track2)s and %(GD)s"%params],
00259                 ["TrkLength_iAV_Trk2", "dx","%(track2)s and %(IAV)s"%params],
00260                 ["TrkLength_LS_Trk2",  "dx","%(track2)s and %(LS)s"%params],
00261                 ["TrkLength_oAV_Trk2", "dx","%(track2)s and %(OAV)s"%params],
00262                 ["TrkLength_Oil_Trk2", "dx","%(track2)s and %(MO)s"%params]
00263                 ])
00264         
00265         self.detsim = detsim
00266 
00267         # Finally, DetSimVali itself
00268         from DetSimValidation.DetSimValidationConf import DetSimVali
00269         dsv = DetSimVali()
00270         dsv.Volume = volume
00271         self.detsimvali = dsv
00272         
00273         from Gaudi.Configuration import ApplicationMgr
00274         theApp = ApplicationMgr()
00275         theApp.TopAlg.append(dsv)
00276 
00277         from GaudiSvc.GaudiSvcConf import THistSvc
00278         histsvc = THistSvc()
00279         histsvc.Output =["file1 DATAFILE='%s' OPT='RECREATE' TYP='ROOT' "%histogram_filename]
        return

Member Data Documentation

Definition at line 130 of file AD.py.

Definition at line 130 of file AD.py.

Definition at line 130 of file AD.py.

Definition at line 130 of file AD.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:19:12 for DetSimValidation by doxygen 1.7.4