diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfVtxAnalysis.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfVtxAnalysis.cxx index ea02e982719e42b07fec6db8c71286c3a006a84a..0ad11562ed6802ab64c6bf606bc38a04d587eef2 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfVtxAnalysis.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/ConfVtxAnalysis.cxx @@ -184,13 +184,14 @@ void ConfVtxAnalysis::execute( const std::vector<TIDA::Vertex*>& vtx0, for ( unsigned i=0 ; i<vtx0.size() ; i++ ) { - // if ( i>0 ) break; + /// reject vertices with no tracks in the Roi ... + if ( vtx0[i]->Ntracks() == 0 ) continue; - // std::cout << i << "\tref z " << vtx0[i]->z(); hzed->Fill( vtx0[i]->z() ); hntrax->Fill( vtx0[i]->Ntracks() ); + hlb->Fill( lb ); hmu->Fill( mu ); diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx index 4afcdbf561ccc9405d3203dac368dcc29ef93a2f..1627b36fc9da9cf1b5b0dd8ff0e2609431fe2282 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/rmain.cxx @@ -1877,7 +1877,7 @@ int main(int argc, char** argv) else if ( vtxind_rec!=-1 ) { if ( unsigned(vtxind_rec)<mvt.size() ) vertices_test.push_back( mvt[vtxind] ); } - else { + else { for ( unsigned iv=0 ; iv<mvt.size() ; iv++ ) vertices_test.push_back( mvt[iv] ); } @@ -2085,9 +2085,10 @@ int main(int argc, char** argv) std::vector<TIDA::Vertex> vertices_roi; + /// do for all vertices now ... + // if ( chain.name().find("SuperRoi") ) { + { - if ( chain.name().find("SuperRoi") ) { - /// select the reference offline vertices vertices_roi.clear(); @@ -2100,6 +2101,20 @@ int main(int argc, char** argv) const TIDA::Vertex& vx = mv[iv]; + // reject all vertices that are not in the roi + + bool accept_vertex = false; + if ( roi.composite() ) { + for ( size_t ir=0 ; ir<roi.size() ; ir++ ) { + if ( roi[ir]->zedMinus()<=vx.z() && roi[ir]->zedPlus()>=vx.z() ) accept_vertex = true; + } + } + else { + if ( roi.zedMinus()<=vx.z() && roi.zedPlus()>=vx.z() ) accept_vertex = true; + } + + if ( !accept_vertex ) continue; + // std::cout << "\t" << iv << "\t" << vx << std::endl; int trackcount = 0; @@ -2114,7 +2129,7 @@ int main(int argc, char** argv) /// don't add vertices with no matching tracks - remember the /// tracks are filtered by Roi already so some vertices may have /// no tracks in the Roi - ntracks set to 0 by default - if ( trackcount>=ntracks ) { + if ( trackcount>=ntracks && trackcount>0 ) { vertices_roi.push_back( TIDA::Vertex( vx.x(), vx.y(), vx.z(), vx.dx(), vx.dy(), vx.dz(), trackcount, @@ -2125,7 +2140,7 @@ int main(int argc, char** argv) } } - else vertices_roi = vertices; + // else vertices_roi = vertices; if ( rotate_testtracks ) for ( size_t i=testp.size() ; i-- ; ) testp[i]->rotate(); diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat index b302f3ff97eeea090f26f2413eff518a364ed7a7..33b791e0f90189c68c02adbbfe7d6c5b6e91a36c 100644 --- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat +++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/share/TIDAdata-chains-run3.dat @@ -31,6 +31,7 @@ testChains = { "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauCore_FTF:HLT_Roi_TauCore", "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF:HLT_Roi_TauIso", "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig:HLT_Roi_TauIso", + "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig:HLT_Roi_TauIso:HLT_IDVertex_Tau:post:rvtx=HLT_IDVertex_Tau", "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF", "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_IDTrig", diff --git a/Trigger/TrigTools/TrigInDetConfig/python/ConfigSettings.py b/Trigger/TrigTools/TrigInDetConfig/python/ConfigSettings.py index 468b35ef7a542f3b5f48a116df8cb5bbf330dc67..c09e1aadd450264f33882b79f57f0d650707154d 100644 --- a/Trigger/TrigTools/TrigInDetConfig/python/ConfigSettings.py +++ b/Trigger/TrigTools/TrigInDetConfig/python/ConfigSettings.py @@ -503,6 +503,7 @@ class _GlobalSettings() : self._isLRT = False self._adaptiveVertex = False self._vertex = None + self._addSingleTrackVertices = False @property @@ -537,6 +538,10 @@ class _GlobalSettings() : def vertex(self): return self._vertex + @property + def addSingleTrackVertices(self): + return self._addSingleTrackVertices + class _Settings_electron( _GlobalSettings ): @@ -626,6 +631,7 @@ class _Settings_tauIso( _GlobalSettings ): self._doRecord = True #Allow recording of track collections self._vertex = "HLT_IDVertex_Tau" self._adaptiveVertex = True + self._addSingleTrackVertices = True #This might be redundant but lets keep them for the time being... class _Settings_tauIsoBDT( _GlobalSettings ): diff --git a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetPriVtxConfig.py b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetPriVtxConfig.py index a8f4b51852a74f3a2a724f29faf08c35adeb7053..8371b1f3229b6eb9ce9024bf8b331985e9be8f9f 100644 --- a/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetPriVtxConfig.py +++ b/Trigger/TrigTools/TrigInDetConfig/python/TrigInDetPriVtxConfig.py @@ -316,11 +316,16 @@ def adaptiveMultiVertexFinderTool_builder( signature ) : # to be disabled we can add a flag and some additional logic from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetAdaptiveMultiPriVxFinderTool + from TrigInDetConfig.ConfigSettings import getInDetTrigConfig + singleTrackVertices= getInDetTrigConfig( signature ).addSingleTrackVertices + + vertexFinderTool = InDet__InDetAdaptiveMultiPriVxFinderTool(name = "InDetTrigAdaptiveMultiPriVxFinderTool" + signature, SeedFinder = seedFinder, VertexFitterTool = vertexFitterTool, TrackSelector = trackSelectorTool, useBeamConstraint = True, + addSingleTrackVertices = singleTrackVertices, selectiontype = 0, # what is this? do3dSplitting = doVtx3DFinding) diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py index d9e0304dc0f28d28666cd5eefcf32d019d242e30..8ad1a190be328c3b50a10847daf47ff718b0b605 100644 --- a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py +++ b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_AODtoTrkNtuple.py @@ -182,6 +182,7 @@ if ( True ) : # two stage tau precision tracking - empty ??? "HLT_tau.*_idperf.*tracktwo.*:HLT_IDTrack_Tau_IDTrig:roi=HLT_Roi_TauIso", + "HLT_tau.*_idperf.*tracktwo.*:HLT_IDTrack_Tau_IDTrig:roi=HLT_Roi_TauIso:vtx=HLT_IDVertex_Tau", # should get single stage tau diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json b/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json index 5bc5ac46a0fa3c97eed057d58269415e2992e345..3ae0d4f621a6d1775e144fae77983156a0d0a8f7 100644 --- a/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json +++ b/Trigger/TrigValidation/TrigInDetValidation/share/comparitor.json @@ -32,6 +32,9 @@ "EFtau":{ "chains" : "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_TauIso_FTF:HLT_Roi_TauIso HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig:HLT_Roi_TauIso" }, + "EFtauvtx":{ + "chains" : "HLT_tau25_idperf_tracktwo_L1TAU12IM:HLT_IDTrack_Tau_IDTrig:HLT_Roi_TauIso:HLT_IDVertex_Tau/HLT_IDVertex_Tau" + }, "L2bjet":{ "chains" : "HLT_j45_subjesgscIS_ftf_boffperf_split_L1J20:HLT_IDTrack_Bjet_FTF" }, diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py index cc6b814541c1c3f4903e00cd62083fc7e049cec5..800d9af51f9a818dd599e443ea930f8a320558fc 100755 --- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py +++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_tau_ztautau_pu46.py @@ -39,7 +39,9 @@ Jobs = [ ( "Offline", " TIDAdata-run3-offline.dat -r Offline -o data-hists-offl Comp = [ ( "L2tau", "L2tau", "data-hists.root", " -c TIDAhisto-panel.dat -d HLTL2-plots " ), ( "EFtau", "EFtau", "data-hists.root", " -c TIDAhisto-panel.dat -d HLTEF-plots " ), ( "L2tauOff", "L2tau", "data-hists-offline.root", " -c TIDAhisto-panel.dat -d HLTL2-plots-offline " ), - ( "EFtauOff", "EFtau", "data-hists-offline.root", " -c TIDAhisto-panel.dat -d HLTEF-plots-offline " ) ] + ( "EFtauOff", "EFtau", "data-hists-offline.root", " -c TIDAhisto-panel.dat -d HLTEF-plots-offline " ), + ( "EFvtx", "EFtauvtx", "data-hists-offline.root", " -c TIDAhisto-panel-vtx.dat -d HLTL2-plots-vtx --ncols 3" ) ] + from AthenaCommon.Include import include include("TrigInDetValidation/TrigInDetValidation_Base.py")