/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::IBDNeutron 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 neutrons only from IBD events distributed uniformly in an AD.

Definition at line 282 of file AD.py.


Constructor & Destructor Documentation

def DetSimValidation::AD::IBDNeutron::__init__ (   self,
  histogram_filename = 'IBDneutron.root',
  volume = "/dd/Structure/Sites/db-rock/db-ows/db-curtain/db-iws/db-ade1/db-sst1/db-oil1/db-oav1/db-lso1",
  seed = "0",
  nevts = "200" 
)
Construct the default configuration.

Definition at line 286 of file AD.py.

00287                                                                                                                                                                                               :
00288         ''' Construct the default configuration.
00289         '''
00290         import GaudiKernel.SystemOfUnits as units
00291 
00292         # First GenTools
00293         ibd = "InverseBeta.exe -seed " + seed + " -n " + nevts + " -neutron_only |"
00294         from GenTools.Helpers import HepEVT
00295         he = HepEVT(hepEvtDataSource = ibd)
00296         he.positioner.Strategy = "FullVolume"
00297         he.positioner.Volume = volume
00298         he.positioner.Mode = "Uniform"
00299         he.positioner.Spread = 2.6*units.meter
00300         he.positioner.Position = [0,0,2.5*units.meter]
00301         he.transformer.Volume = volume
00302         import GenTools
00303         GenTools.Configure().register(he)
00304         self.hepevt = he
00305 
00306         self.dumper = GenTools.Dumper()
00307 
00308         # Then DetSim, with smaller than default configuration:
00309         import DetSim
00310         detsim = DetSim.Configure(site="dayabay")
00311         detsim.historian(trackSelection="(pdg == 2112)",vertexSelection="(pdg == 2112)")
00312         params = {
00313             'start' :"(start > 0)",
00314             'track1':"(id==1)",
00315             'track2':"(id==2)",
00316             'GD':    "MaterialName == '/dd/Materials/GdDopedLS'",
00317             'LS':    "MaterialName == '/dd/Materials/LiquidScintillator'",
00318             'MO':   "MaterialName == '/dd/Materials/MineralOil'",
00319             'IAV':   "DetectorElementName == 'db-iav1'",
00320             'OAV':   "DetectorElementName == 'db-oav1'",
00321             'IWS': "MaterialName == '/dd/Materials/IwsWater'",
00322             'OWS': "MaterialName == '/dd/Materials/OwsWater'",
00323             'lastvtx': "IsStopping == 1",
00324             'firstvtx': "IsStarting == 1",
00325             'NeutronTrk': "pdg == 2112",
00326             'NeutronMom': "creator == 2112",
00327             'Gamma': "pdg == 22",
00328             'Muon': "(pdg == 13 or pdg == -13)"
00329             }
00330         
00331         detsim.unobserver(stats=[
00332                 ["MuonTrkLengthInOws", "dx", "%(Muon)s and %(OWS)s"%params],
00333                 ["MuonTrkLengthInIws", "dx", "%(Muon)s and %(IWS)s"%params],
00334                 ["MuonTrkLengthInLS", "dx", "%(Muon)s and %(LS)s"%params],
00335                 ["MuonTrkLengthInGdLS","dx", "%(Muon)s and %(GD)s"%params],
00336                 ["dEInn","dE", "(pdg!=20022) and %(IWS)s"%params],
00337                 ["dEOut","dE", "(pdg!=20022) and %(OWS)s"%params],
00338                 ["MuonStop", "dx",  "%(Muon)s and %(lastvtx)s"%params],
00339                 
00340                 ["EDepInGdLS", "dE", "%(GD)s"%params],
00341                 ["EDepInLS", "dE", "%(LS)s"%params],
00342                 ["EDepInIAV", "dE", "%(IAV)s"%params],
00343                 ["EDepInOAV", "dE", "%(OAV)s"%params],
00344                 ["EDepInOIL", "dE", "%(MO)s"%params],
00345                 
00346                 ["QEDepInGdLS", "qdE", "%(GD)s"%params],
00347                 ["QEDepInLS", "qdE", "%(LS)s"%params],
00348                 ["QEDepInIAV", "qdE", "%(IAV)s"%params],
00349                 ["QEDepInOAV", "qdE", "%(OAV)s"%params],
00350                 ["QEDepInOIL", "qdE", "%(MO)s"%params],
00351 
00352                 ["tQESumGdLS", "qEt", "%(GD)s"%params],
00353                 ["xQESumGdLS", "qEx", "%(GD)s"%params],
00354                 ["yQESumGdLS", "qEy", "%(GD)s"%params],
00355                 ["zQESumGdLS", "qEz", "%(GD)s"%params],
00356         
00357                 ["tQESumLS", "qEt", "%(LS)s"%params],
00358                 ["xQESumLS", "qEx", "%(LS)s"%params],
00359                 ["yQESumLS", "qEy", "%(LS)s"%params],
00360                 ["zQESumLS", "qEz", "%(LS)s"%params],
00361         
00362                 ["tQESumMO", "qEt", "%(MO)s"%params],
00363                 ["xQESumMO", "qEx", "%(MO)s"%params],
00364                 ["yQESumMO", "qEy", "%(MO)s"%params],
00365                 ["zQESumMO", "qEz", "%(MO)s"%params],
00366         
00367                 ["tGen",   "t","%(NeutronTrk)s and %(firstvtx)s"%params],
00368                 ["xGen",   "x","%(NeutronTrk)s and %(firstvtx)s"%params],
00369                 ["yGen",   "y","%(NeutronTrk)s and %(firstvtx)s"%params],
00370                 ["zGen",   "z","%(NeutronTrk)s and %(firstvtx)s"%params],
00371         
00372                 ["tCap",   "t","%(NeutronTrk)s and %(lastvtx)s"%params],
00373                 ["xCap",   "x","%(NeutronTrk)s and %(lastvtx)s"%params],
00374                 ["yCap",   "y","%(NeutronTrk)s and %(lastvtx)s"%params],
00375                 ["zCap",   "z","%(NeutronTrk)s and %(lastvtx)s"%params],
00376         
00377                 ["capTarget", "capTargetZ","%(track1)s and %(lastvtx)s"%params],
00378                 
00379                 # track 1
00380                 ["pdgId_Trk1","pdg","%(track1)s and %(start)s"%params],
00381                 ["t_Trk1",    "t" , "%(track1)s and %(start)s"%params],
00382                 ["x_Trk1",    "x", "%(track1)s and %(start)s"%params],
00383                 ["y_Trk1",    "y", "%(track1)s and %(start)s"%params],
00384                 ["z_Trk1",    "z", "%(track1)s and %(start)s"%params],
00385                 ["tEnd_Trk1",    "t" , "%(track1)s and %(lastvtx)s"%params],
00386                 ["xEnd_Trk1",    "x", "%(track1)s and %(lastvtx)s"%params],
00387                 ["yEnd_Trk1",    "y", "%(track1)s and %(lastvtx)s"%params],
00388                 ["zEnd_Trk1",    "z", "%(track1)s and %(lastvtx)s"%params],
00389                 ["e_Trk1",    "E",  "%(track1)s and %(start)s"%params],
00390                 ["p_Trk1",    "p",  "%(track1)s and %(start)s"%params],
00391                 ["ke_Trk1",   "KE", "%(track1)s and %(start)s"%params],
00392                 ["vx_Trk1",   "lvx","%(track1)s and %(start)s"%params],
00393                 ["vy_Trk1",   "lvy","%(track1)s and %(start)s"%params],
00394                 ["vz_Trk1",   "lvz","%(track1)s and %(start)s"%params],
00395                 ["TrkLength_GD_Trk1",  "dx","%(track1)s and %(GD)s"%params],
00396                 ["TrkLength_iAV_Trk1", "dx","%(track1)s and %(IAV)s"%params],
00397                 ["TrkLength_LS_Trk1",  "dx","%(track1)s and %(LS)s"%params],
00398                 ["TrkLength_oAV_Trk1", "dx","%(track1)s and %(OAV)s"%params],
00399                 ["TrkLength_Oil_Trk1", "dx","%(track1)s and %(MO)s"%params],
00400                 # track 2
00401                 ["pdgId_Trk2","pdg","%(track2)s and %(start)s"%params],
00402                 ["t_Trk2",    "t" , "%(track2)s and %(start)s"%params],
00403                 ["x_Trk2",    "x", "%(track2)s and %(start)s"%params],
00404                 ["y_Trk2",    "y", "%(track2)s and %(start)s"%params],
00405                 ["z_Trk2",    "z", "%(track2)s and %(start)s"%params],
00406                 ["tEnd_Trk2",    "t" , "%(track2)s and %(lastvtx)s"%params],
00407                 ["xEnd_Trk2",    "x", "%(track2)s and %(lastvtx)s"%params],
00408                 ["yEnd_Trk2",    "y", "%(track2)s and %(lastvtx)s"%params],
00409                 ["zEnd_Trk2",    "z", "%(track2)s and %(lastvtx)s"%params],
00410                 ["e_Trk2",    "E",  "%(track2)s and %(start)s"%params],
00411                 ["p_Trk2",    "p",  "%(track2)s and %(start)s"%params],
00412                 ["ke_Trk2",   "KE", "%(track2)s and %(start)s"%params],
00413                 ["vx_Trk2",   "lvx","%(track2)s and %(start)s"%params],
00414                 ["vy_Trk2",   "lvy","%(track2)s and %(start)s"%params],
00415                 ["vz_Trk2",   "lvz","%(track2)s and %(start)s"%params],
00416                 ["TrkLength_GD_Trk2",  "dx","%(track2)s and %(GD)s"%params],
00417                 ["TrkLength_iAV_Trk2", "dx","%(track2)s and %(IAV)s"%params],
00418                 ["TrkLength_LS_Trk2",  "dx","%(track2)s and %(LS)s"%params],
00419                 ["TrkLength_oAV_Trk2", "dx","%(track2)s and %(OAV)s"%params],
00420                 ["TrkLength_Oil_Trk2", "dx","%(track2)s and %(MO)s"%params]
00421                 ])
00422         
00423         self.detsim = detsim
00424 
00425         # Finally, DetSimVali itself
00426         from DetSimValidation.DetSimValidationConf import DetSimVali
00427         dsv = DetSimVali()
00428         dsv.Volume = volume
00429         self.detsimvali = dsv
00430         
00431         from Gaudi.Configuration import ApplicationMgr
00432         theApp = ApplicationMgr()
00433         theApp.TopAlg.append(dsv)
00434 
00435         from GaudiSvc.GaudiSvcConf import THistSvc
00436         histsvc = THistSvc()
00437         histsvc.Output =["file1 DATAFILE='%s' OPT='RECREATE' TYP='ROOT' "%histogram_filename]
        return

Member Data Documentation

Definition at line 287 of file AD.py.

Definition at line 287 of file AD.py.

Definition at line 287 of file AD.py.

Definition at line 287 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