def applyConf(self): MSRossiAndGreisen = False # For Run 2, we want the new multiple scattering if (self.getProp("DataType") in self.Run2DataTypes): MSRossiAndGreisen = True muonTrackFit = ConfiguredEventFitter( 'MuonTrackFitter', 'Rec/Track/Muon', MSRossiAndGreisen=MSRossiAndGreisen) muonTrackFit.Fitter.addTool(TrackKalmanFilter, 'NodeFitter') muonTrackFit.Fitter.addTool(MeasurementProvider, name='MeasProvider') muonTrackFit.Fitter.MeasProvider.IgnoreVelo = True muonTrackFit.Fitter.MeasProvider.IgnoreTT = True muonTrackFit.Fitter.MeasProvider.IgnoreIT = True muonTrackFit.Fitter.MeasProvider.IgnoreOT = True muonTrackFit.Fitter.MeasProvider.IgnoreMuon = False muonTrackFit.Fitter.MeasProvider.MuonProvider.clusterize = True #======= #muonTrackFit.Fitter.MeasProvider.MuonProvider.OutputLevel = DEBUG #======= muonTrackFit.Fitter.ErrorX = 1000 muonTrackFit.Fitter.ErrorY = 1000 muonTrackFit.Fitter.ErrorTx = 0.7 muonTrackFit.Fitter.ErrorTy = 0.7 muonTrackFit.Fitter.NumberFitIterations = 4 muonTrackFit.Fitter.MaxNumberOutliers = 0 #2 muonTrackFit.OutputLevel = self.getProp("OutputLevel") muonMoniSeq = self.getProp("Sequencer") monalig = MuonTrackAligMonitor("MuonTrackAligMonitor", HistoTopDir="Muon/", HistoLevel=self.getProp("Histograms")) monalig.OutputLevel = self.getProp("OutputLevel") #monalig.IsLongTrackState = True monalig.LongToMuonMatch = True monalig.pCut = 6 # ========= monalig.chi2nCut = 3 monalig.chi2matchCut = 10 monalig.IsCosmics = False # For Run 2, we want the new multiple scattering if (self.getProp("DataType") in self.Run2DataTypes): from Configurables import TrackMasterExtrapolator, DetailedMaterialLocator, StateThickMSCorrectionTool monalig.addTool(TrackMasterExtrapolator, name="Extrapolator") monalig.Extrapolator.addTool(DetailedMaterialLocator, name="MaterialLocator") monalig.Extrapolator.MaterialLocator.addTool( StateThickMSCorrectionTool, "StateMSCorrectionTool") monalig.Extrapolator.MaterialLocator.StateMSCorrectionTool.UseRossiAndGreisen = True muonMoniSeq.Members += [muonTrackFit, monalig]
matching.TracksOutputLocation = 'Rec/Track/Best/TMuon' matching.addTool(TrackMasterExtrapolator, name='Extrapolator') matching.Extrapolator.ApplyMultScattCorr = True matching.Extrapolator.ApplyEnergyLossCorr = False matching.Extrapolator.ApplyElectronEnergyLossCorr = False matching.addTool(TrackChi2Calculator, name='Chi2Calculator') matching.MatchChi2Cut = 10.0 # matching.WriteNtuple = OTMuon_ntuple # Fit TMuon tracks #tmuonfit = ConfiguredFastEventFitter( 'TMuonFit', TracksInContainer = 'Rec/Track/Best/TMuon') # contains Best+Muon tmuonfit = ConfiguredEventFitter( 'TMuonFit', TracksInContainer='Rec/Track/Best/TMuon') # contains Best+Muon tmuonfit.OutputLevel = outputlevel tmuonfit.Fitter.MakeNodes = True tmuonfit.Fitter.MakeMeasurements = True tmuonfit.Fitter.addTool(TrackKalmanFilter, 'NodeFitter') tmuonfit.Fitter.ErrorX = 1000 tmuonfit.Fitter.ErrorY = 10000 tmuonfit.Fitter.NumberFitIterations = 5 tmuonfit.Fitter.MaxDeltaChiSqConverged = 0.1 tmuonfit.Fitter.MaxNumberOutliers = 0 tmuonfit.Fitter.addTool(MeasurementProvider(), name='MeasProvider') tmuonfit.Fitter.MeasProvider.MuonProvider.clusterize = True tmuonfit.Fitter.MeasProvider.MuonProvider.OutputLevel = outputlevel tmuonfit.Fitter.MeasProvider.IgnoreMuon = False if OTMuonMatching: trackFilterSeq.Members.append(matching)