#----------------------------------------------------------------------------- # configuration of Split track analysis # #----------------------------------------------------------------------------- if muonCombinedRecFlags.doCombinedMuonFit(): CombinedTrackCollection = "Combined_Tracks" # split COMBINED tracks from InDetTrackSplitterTool.InDetTrackSplitterToolConf import InDet__InDetTrackSplitterTool CombinedTrackSplitterTool=InDet__InDetTrackSplitterTool(name="CombinedTrackSplitterTool") # CombinedTrackSplitterTool.TrackFitter=CombMuonTrackFitter CombinedTrackSplitterTool.TrackFitter= ToolSvc.MuonCombinedTrackFitter ToolSvc+=CombinedTrackSplitterTool from InDetTrackValidation.InDetTrackValidationConf import InDet__InDetSplittedTracksCreator CombinedTrackSplitterAlg=InDet__InDetSplittedTracksCreator(name="CombinedTrackSplitterAlg") CombinedTrackSplitterAlg.TrackCollection=CombinedTrackCollection CombinedTrackSplitterAlg.OutputTrackCollection=CombinedTrackCollection+"_split" CombinedTrackSplitterAlg.TrackSplitterTool=CombinedTrackSplitterTool #CAREFUL!! topSequence += CombinedTrackSplitterAlg #truth tracks if rec.doTruth(): include ("InDetRecExample/ConfiguredInDetTrackTruth.py") CombinedTracksTruth = ConfiguredInDetTrackTruth(CombinedTrackCollection+"_split", CombinedTrackCollection+"DetailedTruth_split", CombinedTrackCollection+"_Truth_split" ) if muonCombinedRecFlags.doStaco():
InDetKeys.TRTTracks() ] m_d0Range = [50, 50, 50, 50, 800] m_deltaD0 = [0.8, 0.8, 0.8, 0.8, 8] m_deltaD02D = [5, 5, 5, 5, 10] m_deltaPhi = [0.005, 0.005, 0.005, 0.005, 0.01] m_deltaPhi2D = [0.02, 0.02, 0.02, 0.02, 0.05] m_deltaQoverPt = [0.05, 0.2, 0.05, 0.04, 0.1] m_deltaQoverPt2D = [0.05, 0.2, 0.05, 0.04, 0.1] for i in range(5): m_trackSplitter.append( InDet__InDetTrackSplitterTool( name=m_trackSplitterName[i], TrackFitter=InDetTrackFitter, OutputUpperTracksName=m_upperTracksName[i], OutputLowerTracksName=m_lowerTracksName[i])) ToolSvc += m_trackSplitter[i] if (InDetFlags.doPrintConfigurables()): print m_trackSplitter[i] m_trackSegmentsUpLow.append( IDAlignMonTrackSegments( name=m_trackSegmentsUpLowName[i], InputTracksName=m_inputTracksUpLow[i], UpperTracksName=m_upperTracksName[i], LowerTracksName=m_lowerTracksName[i], UseCTBSplitTracks=False, TrackSplitter=m_trackSplitter[i], #Need the even ones
if rec.doMuonCombined() and muonCombinedRecFlags.doMuonClusters() and ( rec.readAOD() or rec.readESD() or DetFlags.haveRIO.Calo_on()): # hack until MuonClusterCollection is properly added to ObjKeyStore # Needed by CaloCellAODGetter.addClusterToCaloCellAOD() if jobproperties.Beam.beamType( ) != 'cosmics' and jobproperties.Beam.beamType() != 'singlebeam': from RecExConfig.ObjKeyStore import objKeyStore objKeyStore.addStreamAOD("CaloClusterContainer", "MuonClusterCollection") if rec.doMuonCombined() and jobproperties.Beam.beamType()=='cosmics' and DetFlags.haveRIO.ID_on() and \ InDetFlags.Enabled() and not InDetFlags.disableInDetReco(): from InDetTrackSplitterTool.InDetTrackSplitterToolConf import InDet__InDetTrackSplitterTool splittertool = InDet__InDetTrackSplitterTool( name='InDetTrackSplitterToolForMuonCombined', TrackFitter=ToolSvc.InDetTrackFitter) ToolSvc += splittertool from InDetTrackValidation.InDetTrackValidationConf import InDet__InDetSplittedTracksCreator splitter = InDet__InDetSplittedTracksCreator( name='InDetTrackSplitterForMuonCombined', TrackSplitterTool=splittertool, TrackCollection=InDetKeys.Tracks(), OutputTrackCollection=InDetKeys.Tracks() + "_split") topSequence += splitter from TrkParticleCreator.TrkParticleCreatorConf import Trk__TrackParticleCreatorTool InDetParticleCreatorTool_split = Trk__TrackParticleCreatorTool( name="InDetParticleCreatorTool_split",
print InDetAlignMonEfficienciesList[i] InDetAlignMonGenericTracksList.append(IDAlignMonGenericTracks (name = m_genTrkName[i], tracksName= m_tracksName[i], trackSelection = InDetAlignMonTrackSelectionTool, VxPrimContainerName = InDetKeys.PrimaryVertices()) ) #ToolSvc += InDetAlignMonGenericTracksList[i] if (InDetFlags.doPrintConfigurables()): print InDetAlignMonGenericTracksList[i] InDetTrackSplitterToolList.append(InDet__InDetTrackSplitterTool(name = "TrackSplitterTool_"+m_trkSplitterName[i], TrackFitter = InDetTrackFitter, OutputUpperTracksName = m_trkSplitterName[i]+"_Upper", OutputLowerTracksName = m_trkSplitterName[i]+"_Lower", OutputLevel = ERROR) ) #ToolSvc += InDetTrackSplitterToolList[i] if (InDetFlags.doPrintConfigurables()): print InDetTrackSplitterToolList[i] InDetAlignMonTrackSegmentsList.append(IDAlignMonTrackSegments ( name = m_trkSegName[i], InputTracksName = m_tracksName[i], UpperTracksName = m_trkSplitterName[i]+"_Upper", LowerTracksName = m_trkSplitterName[i]+"_Lower", UseCTBSplitTracks = False, TrackSplitter = InDetTrackSplitterToolList[i], trackSelectionUp = InDetAlignMonTrackSelectionTool, trackSelectionLow = InDetAlignMonTrackSelectionTool,
vxContainerWithBeamConstraint=InDetFlags.useBeamConstraint()) #ToolSvc += InDetAlignMonBeamSpot_noTrig InDetAlignMonManager.AthenaMonTools += [InDetAlignMonBeamSpot_noTrig] ############################################### # trying to implement the track segments for cosmics if Cosmics: from InDetTrackSplitterTool.InDetTrackSplitterToolConf import InDet__InDetTrackSplitterTool from InDetTrackValidation.InDetTrackValidationConf import InDet__InDetSplittedTracksCreator from InDetAlignmentMonitoring.InDetAlignmentMonitoringConf import IDAlignMonTrackSegments #----- tools for track splliting ---- START ---- splittertoolcomb = InDet__InDetTrackSplitterTool( name="VARO_SplitterTool", TrackFitter=InDetTrackFitter, #InDetTrackFitter, OutputUpperTracksName="TracksUpperSplit", OutputLowerTracksName="TracksLowerSplit", OutputLevel=INFO) #ToolSvc += splittertoolcomb printfunc(splittertoolcomb) # tool to convert to xAOD::TrackParticles from TrkParticleCreator.TrkParticleCreatorConf import Trk__TrackParticleCreatorTool InDetxAODSplitParticleCreatorTool = Trk__TrackParticleCreatorTool( name="InDetSplitxAODParticleCreatorTool", Extrapolator=InDetExtrapolator, TrackSummaryTool=InDetTrackSummaryToolSharedHits, KeepParameters=True, OutputLevel=DEBUG) #ToolSvc += InDetxAODSplitParticleCreatorTool #----- tools for track splliting ---- COMPLETED ----
topSequence += PixelChargeToTConversionSetter if (printIdTrkDxAODConf): print PixelChargeToTConversionSetter print PixelChargeToTConversionSetter.properties() #Setup SCT extension efficiency algorithm if running pixel tracklets #if InDetFlags.doTrackSegmentsPixel(): # include ("SCTExtension/SCTExtensionAlg.py") #Setup split-tracks reconstruction in cosmic-mode and produce xAOD::TrackParticles if makeSplitTracks: # Set input/output container names # Setup algorithm to create split tracks from InDetTrackSplitterTool.InDetTrackSplitterToolConf import InDet__InDetTrackSplitterTool splittertoolcomb= InDet__InDetTrackSplitterTool(name="SplitterTool", TrackFitter=ToolSvc.InDetTrackFitter, OutputUpperTracksName = "TracksUpperSplit", OutputLowerTracksName = "TracksLowerSplit") ToolSvc += splittertoolcomb from InDetTrackValidation.InDetTrackValidationConf import InDet__InDetSplittedTracksCreator splittercomb=InDet__InDetSplittedTracksCreator(name='CombinedTrackSplitter', TrackSplitterTool = splittertoolcomb, TrackCollection = "Tracks", OutputTrackCollection = "Tracks_split") topSequence+=splittercomb if (printIdTrkDxAODConf): print splittercomb print splittercomb.properties() # Create xAOD::TrackParticles out of them from TrkParticleCreator.TrkParticleCreatorConf import Trk__TrackParticleCreatorTool
m_inputTracksUpLow = ["AlignTracks", "CombinedInDetTracks",InDetKeys.Tracks(),InDetKeys.PixelTracks(),InDetKeys.SCTTracks(),"ResolvedTracks",InDetKeys.TRTTracks()] m_d0Range = [ 100, 1000, 100, 100, 100, 100, 800.] m_deltaD0 = [ 0.5, 0.5, 0.5, 0.8, 0.8, 0.5, 8.] m_deltaD02D = [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 10.] m_deltaPhi = [ 0.002, 0.01, 0.002, 0.005, 0.005, 0.002, 0.01] m_deltaPhi2D = [ 0.02, 0.05, 0.02, 0.02, 0.02, 0.02, 0.05] m_deltaQoverPt = [ 0.02, 0.1, 0.02, 0.2, 0.05, 0.02, 0.1] m_deltaQoverPt2D = [ 0.05, 0.1, 0.05, 0.2, 0.05, 0.04, 0.1] for i in range(len(m_trackSplitterName)): printfunc (" <NewInDetAlignMonitoring> Setting track splitter:", m_trackSplitterName[i]) m_trackSplitter.append(InDet__InDetTrackSplitterTool(name = m_trackSplitterName[i], TrackFitter = InDetTrackFitter, OutputUpperTracksName = m_upperTracksName[i], OutputLowerTracksName = m_lowerTracksName[i], OutputLevel = WARNING)) #ToolSvc += m_trackSplitter[i] if (InDetFlags.doPrintConfigurables()): printfunc (m_trackSplitter[i]) printfunc (" <NewInDetAlignMonitoring> step ",i," -> defined track segment monitoring for",m_trackSegmentsUpLowName[i],"using", m_upperTracksName[i],"and", m_lowerTracksName[i], " 2*i+1=",2*i+1," m_alignMonTrackSelectionTool ? length=",len(m_alignMonTrackSelectionTool)) m_trackSegmentsUpLow.append(IDAlignMonTrackSegments(name = m_trackSegmentsUpLowName[i], InputTracksName = m_inputTracksUpLow[i], UpperTracksName = m_upperTracksName[i], LowerTracksName = m_lowerTracksName[i], UseCTBSplitTracks = False, TrackSplitter = m_trackSplitter[i],#Need the even ones trackSelectionUp = m_alignMonTrackSelectionTool[2*i+1], trackSelectionLow = m_alignMonTrackSelectionTool[2*i+1],