00001
00002
00003 __all__ = ['MixingConf', 'Configure']
00004
00005 class Configure:
00006 'Configure MixingSvc'
00007 def __init__(self):
00008 '''Do default configureation of MixingSvc. '''
00009 from Gaudi.Configuration import ApplicationMgr
00010 app = ApplicationMgr()
00011
00012 app.EvtSel = ""
00013 from Mixing.MixingConf import MixRootEvtSelector
00014 select = MixRootEvtSelector("EventSelector")
00015 app.ExtSvc.append(select)
00016
00017 from Mixing.MixingConf import MixRootIOCnvSvc
00018 rio = MixRootIOCnvSvc("RootIOCnvSvc")
00019 app.ExtSvc.append(rio)
00020 from GaudiSvc.GaudiSvcConf import EvtPersistencySvc
00021 per = EvtPersistencySvc()
00022 per.CnvServices = [ rio ];
00023 rio.DefaultOutput= "/dyb/dybd01/yczhang/Mixing.root"
00024
00025 from DybIO.DybIOConf import DybStorageSvc
00026 app.ExtSvc += [ DybStorageSvc() ]
00027
00028 from Mixing.MixingConf import MixingAlgorithm
00029 mixalg = MixingAlgorithm()
00030 app.TopAlg.append(mixalg)
00031 self.MixAlg = mixalg
00032 from RootIOTest.RootIOTestConf import DybStoreAlg
00033 dsa = DybStoreAlg()
00034 app.TopAlg.append(dsa)
00035
00036 MixingDays = 5.4
00037 if MixingDays:
00038 print 'Mixing time =', MixingDays
00039
00040 begintime = 0.0
00041 print 'Begin time = ', begintime
00042
00043 input_samples={
00044 "Gamma1":["05MEVGAMMA_D100.root"],
00045 "Gamma2":["08MEVGAMMA_D100.root"],
00046 "IBD":["FullIBD.root"]
00047 }
00048
00049 if input_samples:
00050 print 'input_samples=', str(input_samples)
00051
00052 sample_tau={"Gamma1":86400./1000, "Gamma2":86400./930, "IBD":86400./980}
00053
00054 if sample_tau:
00055 print "sample_deltaT=", str(sample_tau)
00056
00057 rio.SampleInputs = input_samples
00058 rio.SampleTaus = sample_tau
00059 rio.MixingTime = MixingDays
00060 rio.BeginTime = begintime
00061 self.MixSvc=rio
00062
00063 return
00064
00065 pass
00066
00067