def configure2012DataAlignment( fixQOverPBias = False ) : TAlignment().WriteCondSubDetList += ['Velo','TT','IT','OT','MUON'] # define the alignment elements elements = Alignables() elements.Velo("None") elements.VeloRight("None") elements.VeloLeft("None") elements.IT("None") elements.ITBoxes("TxTzRz") elements.ITLayers("None") elements.OT("None") elements.OTCFrames("TxRz") elements.OTCFrameLayers("Tz") elements.OTModules("TxRz") elements.TT("None") elements.TTLayers("Tz") elements.TTModules("TxRz") elements.Tracker("None") TAlignment().ElementsToAlign = list(elements) # make sure that the velo stays where it was TAlignment().Constraints = constraints = [] constraints.append("VeloHalfAverage : Velo/Velo(Left|Right) : Tx ") # fix the q/p scale by not moving T in X. note that you do not # want to do this if you use D0 in the alignment if fixQOverPBias: constraints.append("OT3X : OT/T3X1U.Side : Tx") # tweak the survey a little bit to fix the z-scale to survey surveyconstraints = SurveyConstraints () surveyconstraints.All() # make sure we fix the z-scale surveyconstraints.XmlUncertainties += [ "OT/T1X1U : 0.00001 0.5 0.00001 0.0001 0.0001 0.0001", "OT/T3X1U : 0.00001 0.5 0.00001 0.0001 0.0001 0.0001" ]; surveyconstraints.XmlUncertainties += ["OT/T3X1U.Side : 0.00001 0.5 0.5 0.0001 0.0001 0.0001" ]