Newer
Older
TB_Chris / Kepler / options / combat / .svn / text-base / combatExample.py.svn-base
  1. # Basic configuration file.
  2. # Execute with: gaudirun.py $KEPLERROOT/options/combatExample.py
  3. from Gaudi.Configuration import *
  4. from Configurables import Kepler
  5.  
  6.  
  7. # Set the path to the directory/files to be processed
  8. #Kepler().InputFiles = ["/afs/cern.ch/user/v/vifranco/cmtuser/KEPLER/KEPLER_HEAD/"]
  9.  
  10. # Set the alignment file
  11. Kepler().AlignmentFile = "/afs/cern.ch/user/v/vifranco/public/CombatAlignment_2arms.dat"
  12.  
  13. # Set the masked pixels file
  14. Kepler().PixelConfigFile = "Tb/Kepler/options/EmptyPixelMask.dat"
  15.  
  16. # Set the number of events to run over
  17. Kepler().EvtMax = 10000
  18.  
  19.  
  20. # Set the configuration of the individual algorithms
  21. from Configurables import TbClustering
  22. TbClustering().PrintConfiguration = True
  23.  
  24. from Configurables import TbTracking
  25. TbTracking().PrintConfiguration = True
  26.  
  27.  
  28. # Combat specific.
  29.  
  30. #CombatInputFile 0 is for the lower arm and File1 for the higher File2 (if using one arm, use comat File0)
  31. #Keep the alignment file consistent, use the same number of planes everywhere, also change the number of arms.
  32. def combatRun():
  33. from Configurables import TbCombatBuilder
  34. TbCombatBuilder().CombatInputFile0 = "/afs/cern.ch/user/v/vifranco/public/Run31100003_SAMPLE.txt"
  35. TbCombatBuilder().ReadoutFormat = "RelaxD"
  36. # TbCombatBuilder().CombatInputFile1 = "/afs/cern.ch/user/v/vifranco/cmtuser/KEPLER/KEPLER_HEAD/240614_30V_TH500_100ms_merge.dat"
  37.  
  38. seq = GaudiSequencer("Telescope")
  39. seq.Members = [TbCombatBuilder(), TbClustering(), TbTracking()]
  40.  
  41. TbCombatBuilder().PrintFreq = 5000
  42. TbCombatBuilder().NumberArms = 2
  43. TbTracking().MinNClusters = 6
  44. TbTracking().SearchRadius = 2
  45. TbTracking().VolumeAngle = 0.0015
  46. TbTracking().SearchPlanes = [3,5]
  47. TbTracking().SearchVolume = "diabolo"
  48. TbTracking().MaxChi2 = 2000000.
  49. TbTracking().ViewerEventNum = 100
  50. TbTracking().ViewerTimeLow = 0
  51. TbTracking().ViewerTimeUp = 2000000
  52. #TbTracking().ViewerOutput = True
  53. TbTracking().CombatRun = True
  54. seq = GaudiSequencer("Monitoring")
  55. from Configurables import TbHitMonitor, TbClusterPlots, TbTrackPlots
  56. seq.Members = [TbHitMonitor(), TbClusterPlots(),TbTrackPlots()]
  57. TbTrackPlots().ParametersResidualsXY = ("", -1.0, 1.0, 200)
  58. TbTrackPlots().ParametersXY = ("", -2, 16, 200)
  59. TbClusterPlots().ParametersXY = ("", -2, 16, 200)
  60.  
  61. appendPostConfigAction(combatRun)