/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
share::runDoublePulse::ConfigureDoublePulse Class Reference

List of all members.

Public Member Functions

def __init__
def parse_args
def configureKinematic
def configureDetector
def configureElectronic
def configureTrigRead
def configureSingleLoader
def configureSim15
def configure

Public Attributes

 opts
 args
 stage_cfg

Detailed Description

Configure a Full Chain of pull simulations for cosmics and LEDs.

Definition at line 26 of file runDoublePulse.py.


Constructor & Destructor Documentation

def share::runDoublePulse::ConfigureDoublePulse::__init__ (   self,
  argv 
)

Definition at line 32 of file runDoublePulse.py.

00033                            :
00034                 
00035         self.parse_args(argv)
00036 
00037         return


Member Function Documentation

def share::runDoublePulse::ConfigureDoublePulse::parse_args (   self,
  argv 
)

Definition at line 38 of file runDoublePulse.py.

00039                              :
00040         from optparse import OptionParser
00041         import time
00042         import sys
00043         parser = OptionParser(usage=self.__doc__)
00044 
00045         parser.add_option("-T","--top-stage",
00046                           help="Kinematic,Detector,Electronic,TrigRead,SingleLoader",
00047                           default="SingleLoader")
00048 
00049         # Primary LED specification
00050         parser.add_option("-I","--Primary-LED-intensity",
00051                           help="Number of photons per LED flash for primary LED. If <= 0 then no LED flashing enabled.",
00052                           default=3500, type="int")
00053 
00054         # Secondary LED specification. Default is no secondary LED.
00055         parser.add_option("-i","--Secondary-LED-intensity",
00056                           help="Number of photons per LED flash for secondary LED. If <= 0 then SECONDARY LED flashing is DISABLED.",
00057                           default=-1, type="int")
00058         
00059         # double-pulse delay
00060         parser.add_option("-D","--Double-pulse-delay",
00061                           help="Delay in nanoseconds of Secondary LED with respect to Primary LED for double-pulse",
00062                           default=30.e3,
00063                           type="float")
00064 
00065 
00066         # Now parse options to setup the job. Quit if invalid inputs are found.
00067         (options,args) = parser.parse_args(args=argv)
00068         self.opts = options
00069         self.args = args
00070 
00071         print 'Top stage =',self.opts.top_stage
00072 
00073         print "ACU A LED intensity/flash (photons) = ", self.opts.Primary_LED_intensity
00074         print "ACU B LED intensity/flash (photons) = ", self.opts.Secondary_LED_intensity
00075         print 'Double-pulse separation (ns) = ',self.opts.Double_pulse_delay
00076 
00077         return

def share::runDoublePulse::ConfigureDoublePulse::configureKinematic (   self)

Definition at line 78 of file runDoublePulse.py.

00079                                 :
00080 
00081         # only import and configure LED if it will be used
00082         from MDC10b.runLED_Muon import LED
00083         led1=LED.LED(stage=self.stage_cfg,
00084                  name='PrimaryLED',
00085                  intensity=self.opts.Primary_LED_intensity,
00086                  time_offset_in_nanosec=0,
00087                  ledName='DayaBayAD1_ACU_A_Center_LED')
00088         
00089         led2=LED.LED(stage=self.stage_cfg,
00090                  name='SecondaryLED',
00091                  intensity=self.opts.Secondary_LED_intensity,
00092                  time_offset_in_nanosec= self.opts.Double_pulse_delay,
00093                  ledName= 'DayaBayAD1_ACU_B_GdlsEdge_LED')
00094     
00095         return

def share::runDoublePulse::ConfigureDoublePulse::configureDetector (   self)
Configure the Detector stage

Definition at line 96 of file runDoublePulse.py.

00097                                :
00098         '''Configure the Detector stage'''
00099 
00100         # only use basic physics list, not nuclear.
00101         # set volume to simulate SAB (or full daya bay site, if chosen by user option)
00102         import DetSim
00103         from DetSim import Configure
00104 
00105         Configure.giga_dayabay_items = ["/dd/Structure/AD/db-ade1"] # set volume to simulate
00106         
00107         ds = Configure(physlist=DetSim.physics_list_basic,
00108                               use_push_algs = False,
00109                               site = 'dayabay')
00110        
00111 
00112         # QuantumEfficiency*CollectionEfficiency*QEScale = 0.24*1/0.9
00113         from DetSim.DetSimConf import DsPhysConsOptical
00114         optical = DsPhysConsOptical("GiGa.GiGaPhysListModular.DsPhysConsOptical")
00115         optical.UseScintillation = False
00116         #optical.ScintPhotonScaleWeight = 3.125
00117         #optical.UseCerenkov = False
00118         optical.CerenPhotonScaleWeight = 3.125
00119         
00120         ## ......
00121         ## ApplyWaterQe and WaterCerenQeApplied should be same
00122         optical.ApplyWaterQe = True
00123         from DetSim.DetSimConf import DsPmtSensDet
00124         pmtsd = DsPmtSensDet("GiGaGeo.DsPmtSensDet")
00125         # deleted after rev.12337
00126         #pmtsd.WaterCerenQeApplied = optical.ApplyWaterQe
00127         ## ......
00128 
00129         from DetSimProc.DetSimProcConf import DetSimProc
00130         dsp = DetSimProc()
00131         dsp.ThisStageName = "Detector"
00132         dsp.LowerStageName = "Kinematic"
00133         #dsp.OutputLevel = 2
00134         self.stage_cfg.DetectorSequence.Members.append(dsp)
00135 
00136         
00137         return

def share::runDoublePulse::ConfigureDoublePulse::configureElectronic (   self)
Configure the Electronics stage

Definition at line 138 of file runDoublePulse.py.

00139                                  :
00140         '''Configure the Electronics stage'''
00141 
00142         import ElecSim
00143         es = ElecSim.Configure(use_push_algs = False)
00144 
00145         # turn off non-linear model (suspect that it fails for many pe pulse)
00146         from ElecSim.ElecSimConf import EsPmtEffectPulseTool
00147         pmtTool = EsPmtEffectPulseTool()
00148         pmtTool.AfterPulseAmpMode="PDF"
00149         pmtTool.EnablePrePulse=True
00150         pmtTool.EnableAfterPulse=True
00151         
00152         from ElecSim.ElecSimConf import EsIdealFeeTool
00153         feeTool = EsIdealFeeTool()
00154         feeTool.EnableNonlinearity=True
00155         feeTool.EnableOvershoot=True
00156         feeTool.EnableRinging=True 
00157 
00158         from ElecSimProc.ElecSimProcConf import ElecSimProc
00159         esp = ElecSimProc()
00160         esp.ThisStageName = "Electronic"
00161         esp.LowerStageName = "Detector"
00162         self.stage_cfg.ElectronicSequence.Members.append(esp)
00163         
00164                 
00165         from StatisticsSvc.StatisticsSvcConf import StatisticsSvc
00166         statsSvc = StatisticsSvc()
00167         statsSvc.Output ={"file1":"waveforms.root"}
00168         
00169         return

def share::runDoublePulse::ConfigureDoublePulse::configureTrigRead (   self)
Configure the Trigger and Readout stage

Definition at line 170 of file runDoublePulse.py.

00171                                :
00172         '''Configure the Trigger and Readout stage'''
00173         from TrigReadProc.TrigReadProcConf import TrigReadProc
00174         tsp = TrigReadProc()
00175         tsp.ThisStageName = "TrigRead"
00176         tsp.LowerStageName = "Electronic"
00177         
00178         # setup Nhit trigger for Daya Bay AD1 = AD in SAB
00179         from TrigSim.TrigSimConf import TsMultTriggerTool 
00180         mtt = TsMultTriggerTool()
00181         mtt.ADThreshold = 25
00182         mtt.DetectorsToProcess = ["DayaBayAD1"]
00183 
00184         tsp.TrigTools = [mtt]
00185         
00186         self.stage_cfg.TrigReadSequence.Members.append(tsp)
00187         return

def share::runDoublePulse::ConfigureDoublePulse::configureSingleLoader (   self)
Configure the SingleLoader stage

Definition at line 188 of file runDoublePulse.py.

00189                                    :
00190         '''Configure the SingleLoader stage'''
00191         from SingleLoader.SingleLoaderConf import SingleLoader
00192         sll = SingleLoader()
00193         sll.ThisStageName = "SingleLoader"
00194         sll.LowerStageName = "TrigRead"
00195         #sll.OutputLevel = 2
00196         self.stage_cfg.SingleLoaderSequence.Members.append(sll)

def share::runDoublePulse::ConfigureDoublePulse::configureSim15 (   self)

Definition at line 197 of file runDoublePulse.py.

00198                             :
00199         from Stage.StageConf import Sim15
00200         sim15=Sim15()
00201         sim15.TopStage=self.opts.top_stage
00202 
00203         from Gaudi.Configuration import ApplicationMgr
00204         theApp = ApplicationMgr()
00205         theApp.TopAlg.append(sim15)
00206 
00207 

def share::runDoublePulse::ConfigureDoublePulse::configure (   self)

Definition at line 208 of file runDoublePulse.py.

00209                        :
00210 
00211         from Stage import Configure as StageConfigure
00212         self.stage_cfg = StageConfigure()
00213 
00214         stagedic={'Kinematic':1,'Detector':2,'Electronic':3,'TrigRead':4,'SingleLoader':5}
00215 
00216         if not self.opts.top_stage in stagedic:
00217             print 'Error, wrong top stage parameter.', self.opts.top_stage
00218             print 'Valid stage is Kinematic, Detector, Electronic, TrigRead or SingleLoader'
00219 
00220         for stg,idx in stagedic.iteritems():
00221             if idx <= stagedic[self.opts.top_stage]:
00222                 self.stage_cfg.addStages([stg])           ## stage tools are configured here.
00223                 
00224         for stg in self.stage_cfg.stages:
00225             #self.stage_cfg.__dict__[stg].OutputLevel = 2
00226             pass
00227 
00228         if stagedic[self.opts.top_stage]>=1:
00229             self.configureKinematic()
00230         if stagedic[self.opts.top_stage]>=2:
00231             self.configureDetector()
00232         if stagedic[self.opts.top_stage]>=3:
00233             self.configureElectronic()
00234         if stagedic[self.opts.top_stage]>=4:
00235             self.configureTrigRead()
00236         if stagedic[self.opts.top_stage]>=5:
00237             self.configureSingleLoader()
00238 
00239         self.configureSim15()
00240         
00241         return
        

Member Data Documentation

Definition at line 38 of file runDoublePulse.py.

Definition at line 38 of file runDoublePulse.py.

Definition at line 208 of file runDoublePulse.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 09:49:56 for ElecTutorial by doxygen 1.7.4