def _preparePedestalRun(self): # dummy aligment just to run Kepler Kepler().PixelConfigFile = ["eos/lhcb/testbeam/velo/timepix3/July2014/RootFiles/Run1236/Conditions/PixelConfig.dat"] Kepler().AlignmentFile = "eos/lhcb/testbeam/velo/timepix3/Oct2014/RootFiles/Run2176/Conditions/Alignment2176mille.dat" Kepler().InputFiles = ['eos/lhcb/testbeam/velo/timepix3/Oct2014/RawData/Run2176/'] Kepler().EvtMax = self.eventMax Kepler().HistogramFile="MambaPedestal.root" # should be set more correctly
def _prepareStandaloneClusterization(self): # dummy aligment just to run Kepler Kepler().PixelConfigFile = [ "eos/lhcb/testbeam/velo/timepix3/July2014/RootFiles/Run1236/Conditions/PixelConfig.dat" ] Kepler( ).AlignmentFile = "eos/lhcb/testbeam/velo/timepix3/Oct2014/RootFiles/Run2176/Conditions/Alignment2176mille.dat" Kepler().InputFiles = [ 'eos/lhcb/testbeam/velo/timepix3/Oct2014/RawData/Run2176/' ] Kepler().EvtMax = self.eventMax outputName = self.inputData[:-4] + ".root" outputName = outputName[outputName.rfind("/") + 1:] Kepler().HistogramFile = outputName outputTupleName = self.inputData[:-4] + "_Tuple.root" outputTupleName = outputTupleName[outputTupleName.rfind("/") + 1:] Kepler().TupleFile = outputTupleName
PATH_TO_OPTS = abspath( '/afs/cern.ch/user/c/chombach/cmtuser/KEPLER/KEPLER_HEAD/Tb/Kepler/options/ResStudies/' ) path.append(PATH_TO_OPTS) from Runs import Runs pickled_runs = PATH_TO_OPTS + '/Runs.pkl' runs = pickle.load(open(pickled_runs)) block = runs.BLOCKS[0] rdut = runs.RUNS[block][0].DUT #runs = Runs('A','run') if runs.TYPE == 'survey': Kepler().Alignment = True Kepler().EvtMax = 100 from Configurables import TbClusterPlots # Set the reference plane. TbClusterPlots().ReferencePlane = 3 # Widen the range of the difference histograms if needed. TbClusterPlots().ParametersDifferenceXY = ('', -30., 30., 600) from Configurables import TbAlignment TbAlignment().AlignmentTechnique = "survey" from Configurables import TbEventBuilder TbEventBuilder().MinPlanesWithHits = 5 elif runs.TYPE == 'mille':
# Basic configuration file. # Execute with: gaudirun.py singleChipExample.py from Gaudi.Configuration import * from Configurables import Kepler # Set the path to the directory/files to be processed Kepler().InputFiles = ["singleChipRun/"] # Set the alignment file Kepler().AlignmentFile = "singleAlignment.dat" # Set the masked pixels file Kepler().PixelConfigFile = "PixelMask.dat" # Set the number of events to run over Kepler().EvtMax = 4300 # Set the configuration of the individual algorithms from Configurables import TbClustering TbClustering().PrintConfiguration = True # Combat specific. def combatRun(): from Configurables import TbEventBuilder, TbClustering seq = GaudiSequencer("Telescope") seq.Members = [TbEventBuilder(), TbClustering()] seq = GaudiSequencer("Monitoring") from Configurables import TbHitMonitor, TbClusterPlots, TbTrackPlots seq.Members = [TbHitMonitor(), TbClusterPlots()] appendPostConfigAction(combatRun)
from Gaudi.Configuration import * from Configurables import Kepler # Add TbAlignment to the Telescope sequence. Kepler().Alignment = True #chombach modifications from Configurables import TbEventBuilder # Skip noise events. TbEventBuilder().MinPlanesWithHits = 5 # List of devices under test duts = [4] from Configurables import TbTracking # Exclude DUTs from the pattern recognition. TbTracking().MaskedPlanes = duts # Require clusters on all telescope planes. TbTracking().MinNClusters = 8 from Configurables import TbAlignment TbAlignment().AlignmentTechnique = "Millepede" # Set the number of tracks to process. TbAlignment().NTracks = 10000 # Set the reference plane (fixed position). TbAlignment().ReferencePlane = 3 # Set the degrees of freedom (x, y, z, rx, ry, rz). TbAlignment().DoFs = [0, 0, 1, 0, 0, 0] TbAlignment().ParametersResidualsXY = ("", -0.2, 0.2, 100) TbAlignment().MaskedPlanes = duts
from Configurables import Kepler from Configurables import TbClusterAssociator TbClusterAssociator().DUTs = [4] TbClusterAssociator().XWindow = 0.1 TbClusterAssociator().TimeWindow = 35 from Configurables import TbEventBuilder TbEventBuilder().PrintHeader = True TbEventBuilder().MinPlanesWithHits = 8 TbEventBuilder().PrintFreq = 50 TbEventBuilder().Monitoring = True TbEventBuilder().ForceCaching = False from Configurables import TbClustering TbClustering().SearchDist = 2 from Configurables import TbSimpleTracking Kepler().UseSimpleTracking = True TbSimpleTracking().MinPlanes = 8 TbSimpleTracking().MaskedPlanes = [4] from Configurables import TbTrackPlots TbTrackPlots().ParametersSlope = ("", -0.01, 0.01, 1000) TbTrackPlots().ParametersResidualsXY = ("", -0.055, 0.055, 500) TbTrackPlots().ParametersXY = ("", 0, 15, 500) from Configurables import TbTriggerMonitor TbTriggerMonitor().OutputLevel = ERROR
# Set the path to the directory/files to be processed path = 'eos/lhcb/testbeam/velo/timepix3/' RUN = '9110' # if int(RUN) < 2000: # path += 'July' # elif int(RUN) < 2815: # path += 'Oct' # elif int(RUN) < 4000: # path += 'Nov' # else: # path += 'Dec' # path += '2014' path += 'July2015' Kepler().InputFiles = [path + '/RawData/Run' + RUN + '/'] Kepler().PixelConfigFile = ["eos/lhcb/testbeam/velo/timepix3/July2014/RootFiles/Run1236/Conditions/PixelConfig.dat"] Kepler().AlignmentFile = path + '/RootFiles/Run' + RUN + '/Conditions/Alignment' + RUN + 'mille.dat' #Kepler().AlignmentFile = 'ResStudies/Alignments/dut/Alignment2509.dat' Kepler().HistogramFile= 'Kepler_histos_' + RUN + '.root' # Set the number of events to run over Kepler().EvtMax = 11000000 #Kepler().TimingConfigFile = "myTimingConfig.dat" # Set the configuration of the individual algorithms, e. g. from Configurables import TbEventBuilder #TbEventBuilder().MinPlanesWithHits = 5 from Configurables import TbClustering TbClustering().PrintConfiguration = True
# Run with: # gaudirun.py $KEPLERROOT/options/simulation.py from Gaudi.Configuration import * from Configurables import Kepler # Set the number of events to run over Kepler().EvtMax = 100 # Change the sequence of code that is run --------------- def sim(): seq = GaudiSequencer("Telescope") # TestMC options. from Configurables import TbTestMC TbTestMC().doMisAlign = False TbTestMC().NTracks = 200 TbTestMC().RunDuration = 10000 TbTestMC().NNoiseClusters = 0 TbTestMC().HitTimeJitter = 20 TbTestMC().ClusterPosnError = 0.001 TbTestMC().ClusterADCMPV = 300.0 # Ish. TbTestMC().ChargeSharingWidth = 0.033 # Best not to change much. TbTestMC().ThresholdCut = 20 TbTestMC().ForceEfficiency = True #TbTestMC().InitAlignment = "Alignment_perfect.dat" #TbTestMC().InitAlignment = Alignment_raw.dat # TbClustering options.
from Gaudi.Configuration import * from Configurables import Kepler Kepler().WriteTuples = True from Configurables import TbTupleWriter TbTupleWriter().WriteTriggers = True TbTupleWriter().WriteHits = False TbTupleWriter().WriteClusters = False TbTupleWriter().WriteTracks = True TbTupleWriter().StrippedNTuple = True from Configurables import TbEventBuilder TbEventBuilder().MinPlanesWithHits = 8 TbEventBuilder().PrintFreq = 100 Kepler().UseSimpleTracking = True from Configurables import TbSimpleTracking TbSimpleTracking().MinPlanes = 8
# Basic configuration file. # Execute with: gaudirun.py $KEPLERROOT/options/combatExample.py from Gaudi.Configuration import * from Configurables import Kepler # Set the path to the directory/files to be processed #Kepler().InputFiles = ["/afs/cern.ch/user/v/vifranco/cmtuser/KEPLER/KEPLER_HEAD/"] # Set the alignment file Kepler().AlignmentFile = "/afs/cern.ch/user/v/vifranco/public/CombatAlignment_2arms.dat" # Set the masked pixels file Kepler().PixelConfigFile = "Tb/Kepler/options/EmptyPixelMask.dat" # Set the number of events to run over Kepler().EvtMax = 10000 # Set the configuration of the individual algorithms from Configurables import TbClustering TbClustering().PrintConfiguration = True from Configurables import TbTracking TbTracking().PrintConfiguration = True # Combat specific. #CombatInputFile 0 is for the lower arm and File1 for the higher File2 (if using one arm, use comat File0) #Keep the alignment file consistent, use the same number of planes everywhere, also change the number of arms.
from Gaudi.Configuration import * from Configurables import Kepler Kepler().InputFiles = ["eos/lhcb/testbeam/velo/timepix3/July2014/RawData/Run1062/"] Kepler().PixelConfigFile = "eos/lhcb/testbeam/velo/timepix3/July2014/RootFiles/Run1062/Conditions/PixelMask.dat" Kepler().EvtMax = 100 Kepler().WriteTuples = False Kepler().Monitoring = False Kepler().Alignment = True Kepler().AlignmentFile = "Alignment.dat" from Configurables import TbTrackPlots TbTrackPlots().ParametersResidualsXY = ("",-0.1,0.1,2000) from Configurables import TbAlignment, TbTracking TbAlignment().PrintConfiguration = True TbAlignment().FitStrategy = 1 TbAlignment().ReferencePlane = 3 TbAlignment().MaskedPlanes = TbTracking().MaskedPlanes TbAlignment().OutputLevel = INFO
from Gaudi.Configuration import * from Configurables import Kepler from Configurables import TbEventBuilder TbEventBuilder().MinPlanesWithHits = 2 TbEventBuilder().PrintFreq = 100 TbEventBuilder().Monitoring = True Kepler().EvtMax = 5000 Kepler( ).AlignmentFile = "eos/lhcb/testbeam/velo/timepix3/Dec2014/RootFiles/Run4012/Conditions/Alignment4012.dat" from Configurables import TbTracking TbTracking().PrintConfiguration = True TbTracking().MinNClusters = 3 TbTracking().SearchRadius = 0.5 TbTracking().VolumeAngle = 0.2 TbTracking().TimeWindow = 75 TbTracking().Monitoring = False TbTracking().SearchPlanes = [2, 3] TbTracking().MaskedPlanes = [] from Configurables import TbTrackPlots
from Gaudi.Configuration import * from Configurables import Kepler # Add TbAlignment to the Telescope sequence. Kepler().Alignment = True # Set the number of events to process. Kepler().EvtMax = 100 from Configurables import TbEventBuilder # Skip noise events. TbEventBuilder().MinPlanesWithHits = 5 from Configurables import TbClusterPlots # Set the reference plane. TbClusterPlots().ReferencePlane = 3 # Widen the range of the difference histograms if needed. TbClusterPlots().ParametersDifferenceXY = ('', -10., 10., 200) from Configurables import TbAlignment TbAlignment().AlignmentTechnique = "survey"
from Gaudi.Configuration import * from Configurables import Kepler Kepler().Alignment = True from Configurables import TbAlignment from Configurables import TbMillepede, TbAlignmentMinuit2, TbAlignmentMinuit1 Kepler().addAlignment( TbAlignmentMinuit1(DOFs=[1, 1, 0, 0, 0, 1], MaxChi2=9999999999999999999, ReferencePlane=3)) Kepler().addAlignment( TbMillepede(DOFs=[1, 1, 0, 1, 1, 1], MaxChi2=200, ResCutInit=0.5, ResCut=0.1)) Kepler().addAlignment( TbMillepede(DOFs=[1, 1, 1, 1, 1, 1], MaxChi2=50, ResCutInit=1.0, ResCut=0.2)) Kepler().addAlignment( TbMillepede(Monitoring=True, DOFs=[1, 1, 1, 1, 1, 1], MaxChi2=15, ResCutInit=1.0, ResCut=0.2)) TbAlignment().PrintConfiguration = True TbAlignment().NTracks = 8000
from Gaudi.Configuration import * from Configurables import Kepler Kepler().Alignment = True from Configurables import TbAlignment from Configurables import TbMillepede, TbAlignmentMinuit2, TbAlignmentMinuit1 Kepler().addAlignment( TbAlignmentMinuit1(MaskedPlanes=[4], DOFs=[1, 1, 0, 0, 0, 1], MaxChi2=9999999999999999999, ReferencePlane=3)) Kepler().addAlignment( TbMillepede(MaskedPlanes=[4], DOFs=[1, 1, 0, 1, 1, 1], MaxChi2=2000, ResCutInit=0.5, ResCut=0.1)) Kepler().addAlignment( TbMillepede(MaskedPlanes=[4], DOFs=[1, 1, 0, 1, 1, 1], MaxChi2=15, ResCutInit=1.0, ResCut=0.2)) Kepler().addAlignment( TbMillepede(Monitoring=True, MaskedPlanes=[4], DOFs=[1, 1, 1, 1, 1, 1], MaxChi2=15, ResCutInit=1.0,
from Gaudi.Configuration import * from Configurables import Kepler # Set the path to the directory/files to be processed Kepler().InputFiles = [ "/afs/cern.ch/work/t/tevans/public/Kepler_data_1MHz_120s_trigger/" ] Kepler().EvtMax = 4000 def sim(): telseq = GaudiSequencer("Telescope") from Configurables import TbTrackFitter telseq.Members = [TbTrackFitter()] # scattering estimate (theta0 squared?) TbTrackFitter().scat2 = 1.e-9 #TbTrackFitter().scat2 = 0 TbTrackFitter().direction = -1 # divergence of true track TbTrackFitter().theta0 = 1.e-4 #TbTrackFitter().hiterror2 = 9.0e-6 #TbTrackFitter().theta0 = 0 monseq = GaudiSequencer("Monitoring") monseq.Members = [] appendPostConfigAction(sim)