/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
TestRPCsim::ConfigureTest Class Reference

List of all members.

Public Member Functions

def __init__
def parse_args
def configure

Public Attributes

 opts
 args

Detailed Description

simple usage example:

nuwa.py --history=off -n 10 -o output.root TestRPCsim

For a list of the options, run

nuwa.py -m "TestRPCElecSim --help"

Note: You need to turn off simheader conversion to run this module:

export NUWA_PRUNESIMHITS=1 (sh)
setenv NUWA_PRUNESIMHITS 1 (csh)

Definition at line 6 of file TestRPCsim.py.


Constructor & Destructor Documentation

def TestRPCsim::ConfigureTest::__init__ (   self,
  argv 
)

Definition at line 23 of file TestRPCsim.py.

00024                            :
00025 
00026         self.parse_args(argv)
00027 
00028         return


Member Function Documentation

def TestRPCsim::ConfigureTest::parse_args (   self,
  argv 
)

Definition at line 29 of file TestRPCsim.py.

00030                              :
00031 
00032         import optparse
00033 
00034         parser = optparse.OptionParser(usage=self.__doc__)
00035 
00036         parser.add_option("-D","--detector",
00037                           help="List of detectors to be simulated. [default: %default]",
00038                           default='DayaBayRPC',
00039                           type="string")
00040         parser.add_option("-c","--single_Channel",
00041                           help="Only simulate 1 channel per detector. [default: %default]",
00042                           action='store_true',
00043                           default=False)
00044         parser.add_option("-t","--delay-Time",
00045                           help="Delay time of in ns. [default: %default]",
00046                           default=500,
00047                           type="float")
00048         parser.add_option("-w","--weight",
00049                           help="Weight of the hits. [default: %default]",
00050                           default=1,
00051                           type="float")
00052         parser.add_option("-s","--time-Spread",
00053                           help="Sigma of Gaussian hit time distribution. [default: %default]",
00054                           default=0,
00055                           type="float")
00056 
00057         (options,args) = parser.parse_args(args=argv)
00058         self.opts = options
00059         self.args = args
00060 
00061 
00062         print "======================================================"
00063         print "Simulate detector ",self.opts.detector
00064         print "------------------------------------------------------"
00065         print "Only simulate 1 channel  = ",self.opts.single_Channel
00066         print "------------------------------------------------------"
00067         print "Delay time = ",self.opts.delay_Time, " ns"
00068         print "------------------------------------------------------"
00069         print "Hit weight = ",self.opts.weight
00070         print "------------------------------------------------------"
00071         print "Gaussian hit time spread = ",self.opts.time_Spread, " ns"
00072         print "======================================================"
00073 
00074         return

def TestRPCsim::ConfigureTest::configure (   self)

Definition at line 75 of file TestRPCsim.py.

00076                        :
00077 
00078         from ElecSim.ElecSimConf import EsTestAlg
00079         testAlg = EsTestAlg()
00080         testAlg.Detectors = [self.opts.detector]
00081         testAlg.DelayTime = self.opts.delay_Time
00082         testAlg.Weight = self.opts.weight
00083         testAlg.TimeSmear = self.opts.time_Spread
00084         testAlg.SingleChannel = self.opts.single_Channel
00085 
00086         from Gaudi.Configuration import ApplicationMgr
00087         app = ApplicationMgr()
00088         app.TopAlg.append(testAlg)
00089         app.HistogramPersistency = 'ROOT'
00090 
00091         import ElecSim
00092         elecsim = ElecSim.Configure()
00093 
00094         from ElecSim.ElecSimConf import EsIdealFecTool
00095         fect = EsIdealFecTool()
00096         #fect.IdealNoise = 1*units.kilohertz
00097 
00098         import TrigSim
00099         trigsim = TrigSim.Configure()
00100 
00101         import ReadoutSim
00102         rosim = ReadoutSim.Configure()
00103 
00104         return


Member Data Documentation

Definition at line 29 of file TestRPCsim.py.

Definition at line 29 of file TestRPCsim.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:17:06 for ReadoutSim by doxygen 1.7.4