/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::IBDevents 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 440 of file AD.py.


Constructor & Destructor Documentation

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

Definition at line 444 of file AD.py.

00445                                                                                                                                                                              :
00446         ''' Construct the default configuration.
00447         '''
00448         import GaudiKernel.SystemOfUnits as units
00449 
00450         # First GenTools
00451         ibd = "InverseBeta.exe -seed " + seed + " -n " + nevts + " |"
00452         from GenTools.Helpers import HepEVT
00453         he = HepEVT(hepEvtDataSource = ibd)
00454         he.positioner.Strategy = "FullVolume"
00455         he.positioner.Volume = volume
00456         he.positioner.Mode = "Uniform"
00457         he.positioner.Spread = 2.6*units.meter
00458         he.positioner.Position = [0,0,2.5*units.meter]
00459         he.transformer.Volume = volume
00460         import GenTools
00461         GenTools.Configure().register(he)
00462         self.hepevt = he
00463 
00464         self.dumper = GenTools.Dumper()
00465 
00466         # Then DetSim, with smaller than default configuration:
00467         import DetSim
00468         detsim = DetSim.Configure(site="dayabay")
00469         detsim.historian(trackSelection="(pdg == 2112)",vertexSelection="(pdg == 2112)")
00470         params = {
00471             'start' :"(start > 0)",
00472             'track1':"(id==1)",
00473             'track2':"(id==2)",
00474             'GD':    "MaterialName == '/dd/Materials/GdDopedLS'",
00475             'LS':    "MaterialName == '/dd/Materials/LiquidScintillator'",
00476             'MO':   "MaterialName == '/dd/Materials/MineralOil'",
00477             'IAV':   "DetectorElementName == 'db-iav1'",
00478             'OAV':   "DetectorElementName == 'db-oav1'",
00479             'IWS': "MaterialName == '/dd/Materials/IwsWater'",
00480             'OWS': "MaterialName == '/dd/Materials/OwsWater'",
00481             'lastvtx': "IsStopping == 1",
00482             'firstvtx': "IsStarting == 1",
00483             'NeutronTrk': "pdg == 2112",
00484             'NeutronMom': "creator == 2112",
00485             'Gamma': "pdg == 22",
00486             'Muon': "(pdg == 13 or pdg == -13)"
00487             }
00488         
00489         detsim.unobserver(stats=[
00490                 ["MuonTrkLengthInOws", "dx", "%(Muon)s and %(OWS)s"%params],
00491                 ["MuonTrkLengthInIws", "dx", "%(Muon)s and %(IWS)s"%params],
00492                 ["MuonTrkLengthInLS", "dx", "%(Muon)s and %(LS)s"%params],
00493                 ["MuonTrkLengthInGdLS","dx", "%(Muon)s and %(GD)s"%params],
00494                 ["dEInn","dE", "(pdg!=20022) and %(IWS)s"%params],
00495                 ["dEOut","dE", "(pdg!=20022) and %(OWS)s"%params],
00496                 ["MuonStop", "dx",  "%(Muon)s and %(lastvtx)s"%params],
00497                 
00498                 ["EDepInGdLS", "dE", "%(GD)s"%params],
00499                 ["EDepInLS", "dE", "%(LS)s"%params],
00500                 ["EDepInIAV", "dE", "%(IAV)s"%params],
00501                 ["EDepInOAV", "dE", "%(OAV)s"%params],
00502                 ["EDepInOIL", "dE", "%(MO)s"%params],
00503                 
00504                 ["QEDepInGdLS", "qdE", "%(GD)s"%params],
00505                 ["QEDepInLS", "qdE", "%(LS)s"%params],
00506                 ["QEDepInIAV", "qdE", "%(IAV)s"%params],
00507                 ["QEDepInOAV", "qdE", "%(OAV)s"%params],
00508                 ["QEDepInOIL", "qdE", "%(MO)s"%params],
00509 
00510                 ["tQESumGdLS", "qEt", "%(GD)s"%params],
00511                 ["xQESumGdLS", "qEx", "%(GD)s"%params],
00512                 ["yQESumGdLS", "qEy", "%(GD)s"%params],
00513                 ["zQESumGdLS", "qEz", "%(GD)s"%params],
00514         
00515                 ["tQESumLS", "qEt", "%(LS)s"%params],
00516                 ["xQESumLS", "qEx", "%(LS)s"%params],
00517                 ["yQESumLS", "qEy", "%(LS)s"%params],
00518                 ["zQESumLS", "qEz", "%(LS)s"%params],
00519         
00520                 ["tQESumMO", "qEt", "%(MO)s"%params],
00521                 ["xQESumMO", "qEx", "%(MO)s"%params],
00522                 ["yQESumMO", "qEy", "%(MO)s"%params],
00523                 ["zQESumMO", "qEz", "%(MO)s"%params],
00524         
00525                 ["tGen",   "t","%(NeutronTrk)s and %(firstvtx)s"%params],
00526                 ["xGen",   "x","%(NeutronTrk)s and %(firstvtx)s"%params],
00527                 ["yGen",   "y","%(NeutronTrk)s and %(firstvtx)s"%params],
00528                 ["zGen",   "z","%(NeutronTrk)s and %(firstvtx)s"%params],
00529         
00530                 ["tCap",   "t","%(NeutronTrk)s and %(lastvtx)s"%params],
00531                 ["xCap",   "x","%(NeutronTrk)s and %(lastvtx)s"%params],
00532                 ["yCap",   "y","%(NeutronTrk)s and %(lastvtx)s"%params],
00533                 ["zCap",   "z","%(NeutronTrk)s and %(lastvtx)s"%params],
00534         
00535                 ["capTarget", "capTargetZ","%(track1)s and %(lastvtx)s"%params],
00536                 
00537                 # track 1
00538                 ["pdgId_Trk1","pdg","%(track1)s and %(start)s"%params],
00539                 ["t_Trk1",    "t" , "%(track1)s and %(start)s"%params],
00540                 ["x_Trk1",    "x", "%(track1)s and %(start)s"%params],
00541                 ["y_Trk1",    "y", "%(track1)s and %(start)s"%params],
00542                 ["z_Trk1",    "z", "%(track1)s and %(start)s"%params],
00543                 ["tEnd_Trk1",    "t" , "%(track1)s and %(lastvtx)s"%params],
00544                 ["xEnd_Trk1",    "x", "%(track1)s and %(lastvtx)s"%params],
00545                 ["yEnd_Trk1",    "y", "%(track1)s and %(lastvtx)s"%params],
00546                 ["zEnd_Trk1",    "z", "%(track1)s and %(lastvtx)s"%params],
00547                 ["e_Trk1",    "E",  "%(track1)s and %(start)s"%params],
00548                 ["p_Trk1",    "p",  "%(track1)s and %(start)s"%params],
00549                 ["ke_Trk1",   "KE", "%(track1)s and %(start)s"%params],
00550                 ["vx_Trk1",   "lvx","%(track1)s and %(start)s"%params],
00551                 ["vy_Trk1",   "lvy","%(track1)s and %(start)s"%params],
00552                 ["vz_Trk1",   "lvz","%(track1)s and %(start)s"%params],
00553                 ["TrkLength_GD_Trk1",  "dx","%(track1)s and %(GD)s"%params],
00554                 ["TrkLength_iAV_Trk1", "dx","%(track1)s and %(IAV)s"%params],
00555                 ["TrkLength_LS_Trk1",  "dx","%(track1)s and %(LS)s"%params],
00556                 ["TrkLength_oAV_Trk1", "dx","%(track1)s and %(OAV)s"%params],
00557                 ["TrkLength_Oil_Trk1", "dx","%(track1)s and %(MO)s"%params],
00558                 # track 2
00559                 ["pdgId_Trk2","pdg","%(track2)s and %(start)s"%params],
00560                 ["t_Trk2",    "t" , "%(track2)s and %(start)s"%params],
00561                 ["x_Trk2",    "x", "%(track2)s and %(start)s"%params],
00562                 ["y_Trk2",    "y", "%(track2)s and %(start)s"%params],
00563                 ["z_Trk2",    "z", "%(track2)s and %(start)s"%params],
00564                 ["tEnd_Trk2",    "t" , "%(track2)s and %(lastvtx)s"%params],
00565                 ["xEnd_Trk2",    "x", "%(track2)s and %(lastvtx)s"%params],
00566                 ["yEnd_Trk2",    "y", "%(track2)s and %(lastvtx)s"%params],
00567                 ["zEnd_Trk2",    "z", "%(track2)s and %(lastvtx)s"%params],
00568                 ["e_Trk2",    "E",  "%(track2)s and %(start)s"%params],
00569                 ["p_Trk2",    "p",  "%(track2)s and %(start)s"%params],
00570                 ["ke_Trk2",   "KE", "%(track2)s and %(start)s"%params],
00571                 ["vx_Trk2",   "lvx","%(track2)s and %(start)s"%params],
00572                 ["vy_Trk2",   "lvy","%(track2)s and %(start)s"%params],
00573                 ["vz_Trk2",   "lvz","%(track2)s and %(start)s"%params],
00574                 ["TrkLength_GD_Trk2",  "dx","%(track2)s and %(GD)s"%params],
00575                 ["TrkLength_iAV_Trk2", "dx","%(track2)s and %(IAV)s"%params],
00576                 ["TrkLength_LS_Trk2",  "dx","%(track2)s and %(LS)s"%params],
00577                 ["TrkLength_oAV_Trk2", "dx","%(track2)s and %(OAV)s"%params],
00578                 ["TrkLength_Oil_Trk2", "dx","%(track2)s and %(MO)s"%params]
00579                 ])
00580         
00581         self.detsim = detsim
00582 
00583         # Finally, DetSimVali itself
00584         from DetSimValidation.DetSimValidationConf import DetSimVali
00585         dsv = DetSimVali()
00586         dsv.Volume = volume
00587         self.detsimvali = dsv
00588         
00589         from Gaudi.Configuration import ApplicationMgr
00590         theApp = ApplicationMgr()
00591         theApp.TopAlg.append(dsv)
00592 
00593         from GaudiSvc.GaudiSvcConf import THistSvc
00594         histsvc = THistSvc()
00595         histsvc.Output =["file1 DATAFILE='%s' OPT='RECREATE' TYP='ROOT' "%histogram_filename]
        return

Member Data Documentation

Definition at line 445 of file AD.py.

Definition at line 445 of file AD.py.

Definition at line 445 of file AD.py.

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