diff --git a/Control/SGComps/src/SGInputLoader.cxx b/Control/SGComps/src/SGInputLoader.cxx index 6bc175d0ef462f7fadf8de830c9824c7a9057b98..fd70dbf70b2c26dd35731c5e87feb0beb9570e64 100644 --- a/Control/SGComps/src/SGInputLoader.cxx +++ b/Control/SGComps/src/SGInputLoader.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017, 2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2017, 2019, 2020 CERN for the benefit of the ATLAS collaboration */ // SGInputLoader.cxx @@ -114,8 +114,14 @@ SGInputLoader::execute() SG::VarHandleKey vhk(obj->clid(),obj->key(),Gaudi::DataHandle::Writer); if (StoreID::findStoreID(vhk.storeHandle().name()) == StoreID::EVENT_STORE) { toLoad.emplace(*obj); - } else { - ATH_MSG_WARNING("Will not auto-load proxy for non-EventStore object: " + } + else if (StoreID::findStoreID(vhk.storeHandle().name()) == StoreID::CONDITION_STORE) { + ATH_MSG_ERROR("Unresolved conditions dependency: " + << *obj); + return StatusCode::FAILURE; + } + else { + ATH_MSG_DEBUG("Will not auto-load proxy for non-EventStore object: " << *obj); } } diff --git a/DataQuality/DataQualityConfigurations/config/AFP/collisions_run.config b/DataQuality/DataQualityConfigurations/config/AFP/collisions_run.config index 902fe0284263ff85a0dad4fc4500007dc5ce9429..c54e9aa21f17acccbade97b4b5a174140547f55c 100644 --- a/DataQuality/DataQualityConfigurations/config/AFP/collisions_run.config +++ b/DataQuality/DataQualityConfigurations/config/AFP/collisions_run.config @@ -10,7 +10,7 @@ # Reference reference AFPBinContentReference { location = /eos/atlas/atlascerngroupdisk/data-dqm/references/Other/,root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-dqm/references/Other/ - file = data18_13TeV.00337176.physics_Main.merge.HIST.f940_h308.root + file = AFPOutput62-337176-500k.root path = run_337176 name = same_name } @@ -24,31 +24,111 @@ output top_level { output AFP { output SiT { output pixelColRow2D { + output nearAside { + } + output farAside { + } + output nearCside { + } + output farCside { + } } output PixelColIDChip { + output nearAside { + } + output farAside { + } + output nearCside { + } + output farCside { + } } output PixelRowIDChip { + output nearAside { + } + output farAside { + } + output nearCside { + } + output farCside { + } } output SiTimeOverThreshold { + output nearAside { + } + output farAside { + } + output nearCside { + } + output farCside { + } + } + output HitsPerPlanes { } output Cluster { + output nearAside { + } + output farAside { + } + output nearCside { + } + output farCside { + } } output Track { } output clustersPerPlane { + output nearAside { + } + output farAside { + } + output nearCside { + } + output farCside { + } } output clustersPerStation { } output clustersPerPlaneFront { + output nearAside { + } + output farAside { + } + output nearCside { + } + output farCside { + } } output clustersPerPlaneEnd { + output nearAside { + } + output farAside { + } + output nearCside { + } + output farCside { + } } output clustersPerPlaneMiddle { + output nearAside { + } + output farAside { + } + output nearCside { + } + output farCside { + } } } output ToF { output HitBarvsTrain { } + output HitsPerBarsInTrain { + output farAside { + } + output farCside { + } + } } } } @@ -60,413 +140,480 @@ output top_level { dir AFP { dir SiT { dir pixelColRow2D { - hist pixelColIDChip_vs_pixelRowIDChip_nearAside_P0 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_nearAside_P1 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_nearAside_P2 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_nearAside_P3 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_nearCside_P0 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_nearCside_P1 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_nearCside_P2 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_nearCside_P3 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_farAside_P0 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_farAside_P1 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_farAside_P2 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_farAside_P3 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_farCside_P0 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_farCside_P1 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_farCside_P2 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ - } - hist pixelColIDChip_vs_pixelRowIDChip_farCside_P3 { - algorithm = HNE - output = AFP/SiT/pixelColRow2D - display = LogZ,Draw=COLZ + dir nearAside { + hist pixelColIDChip_vs_pixelRowIDChip_nearAside_P0 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/nearAside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_nearAside_P1 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/nearAside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_nearAside_P2 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/nearAside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_nearAside_P3 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/nearAside + display = LogZ,Draw=COLZ + } + } + dir nearCside { + hist pixelColIDChip_vs_pixelRowIDChip_nearCside_P0 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/nearCside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_nearCside_P1 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/nearCside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_nearCside_P2 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/nearCside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_nearCside_P3 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/nearCside + display = LogZ,Draw=COLZ + } + } + dir farAside { + hist pixelColIDChip_vs_pixelRowIDChip_farAside_P0 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/farAside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_farAside_P1 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/farAside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_farAside_P2 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/farAside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_farAside_P3 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/farAside + display = LogZ,Draw=COLZ + } + } + dir farCside { + hist pixelColIDChip_vs_pixelRowIDChip_farCside_P0 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/farCside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_farCside_P1 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/farCside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_farCside_P2 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/farCside + display = LogZ,Draw=COLZ + } + hist pixelColIDChip_vs_pixelRowIDChip_farCside_P3 { + algorithm = HNE + output = AFP/SiT/pixelColRow2D/farCside + display = LogZ,Draw=COLZ + } } } dir PixelColIDChip { - hist pixelColIDChip_nearAside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_nearAside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_nearAside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_nearAside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_farAside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_farAside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_farAside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_farAside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_nearCside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_nearCside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_nearCside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_nearCside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_farCside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_farCside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_farCside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST - } - hist pixelColIDChip_farCside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelColIDChip - display = Draw=HIST + dir nearAside { + hist pixelColIDChip_nearAside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/nearAside + display = Draw=HIST + } + hist pixelColIDChip_nearAside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/nearAside + display = Draw=HIST + } + hist pixelColIDChip_nearAside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/nearAside + display = Draw=HIST + } + hist pixelColIDChip_nearAside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/nearAside + display = Draw=HIST + } + } + dir farAside { + hist pixelColIDChip_farAside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/farAside + display = Draw=HIST + } + hist pixelColIDChip_farAside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/farAside + display = Draw=HIST + } + hist pixelColIDChip_farAside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/farAside + display = Draw=HIST + } + hist pixelColIDChip_farAside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/farAside + display = Draw=HIST + } + } + dir nearCside { + hist pixelColIDChip_nearCside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/nearCside + display = Draw=HIST + } + hist pixelColIDChip_nearCside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/nearCside + display = Draw=HIST + } + hist pixelColIDChip_nearCside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/nearCside + display = Draw=HIST + } + hist pixelColIDChip_nearCside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/nearCside + display = Draw=HIST + } + } + dir farCside { + hist pixelColIDChip_farCside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/farCside + display = Draw=HIST + } + hist pixelColIDChip_farCside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/farCside + display = Draw=HIST + } + hist pixelColIDChip_farCside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/farCside + display = Draw=HIST + } + hist pixelColIDChip_farCside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelColIDChip/farCside + display = Draw=HIST + } } } dir PixelRowIDChip { - hist pixelRowIDChip_nearAside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_nearAside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_nearAside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_nearAside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_farAside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_farAside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_farAside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_farAside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_nearCside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_nearCside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_nearCside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_nearCside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_farCside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_farCside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_farCside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST - } - hist pixelRowIDChip_farCside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/PixelRowIDChip - display = Draw=HIST + dir nearAside { + hist pixelRowIDChip_nearAside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/nearAside + display = Draw=HIST + } + hist pixelRowIDChip_nearAside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/nearAside + display = Draw=HIST + } + hist pixelRowIDChip_nearAside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/nearAside + display = Draw=HIST + } + hist pixelRowIDChip_nearAside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/nearAside + display = Draw=HIST + } + } + dir farAside { + hist pixelRowIDChip_farAside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/farAside + display = Draw=HIST + } + hist pixelRowIDChip_farAside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/farAside + display = Draw=HIST + } + hist pixelRowIDChip_farAside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/farAside + display = Draw=HIST + } + hist pixelRowIDChip_farAside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/farAside + display = Draw=HIST + } + } + dir nearCside { + hist pixelRowIDChip_nearCside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/nearCside + display = Draw=HIST + } + hist pixelRowIDChip_nearCside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/nearCside + display = Draw=HIST + } + hist pixelRowIDChip_nearCside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/nearCside + display = Draw=HIST + } + hist pixelRowIDChip_nearCside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/nearCside + display = Draw=HIST + } + } + dir farCside { + hist pixelRowIDChip_farCside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/farCside + display = Draw=HIST + } + hist pixelRowIDChip_farCside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/farCside + display = Draw=HIST + } + hist pixelRowIDChip_farCside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/farCside + display = Draw=HIST + } + hist pixelRowIDChip_farCside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/PixelRowIDChip/farCside + display = Draw=HIST + } } } dir SiTimeOverThreshold { - hist timeOverThreshold_nearAside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_nearAside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_nearAside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_nearAside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_farAside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_farAside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_farAside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_farAside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_nearCside_P0 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST + dir nearAside { + hist timeOverThreshold_nearAside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/nearAside + display = Draw=HIST + } + hist timeOverThreshold_nearAside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/nearAside + display = Draw=HIST + } + hist timeOverThreshold_nearAside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/nearAside + display = Draw=HIST + } + hist timeOverThreshold_nearAside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/nearAside + display = Draw=HIST + } + } + dir farAside { + hist timeOverThreshold_farAside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/farAside + display = Draw=HIST + } + hist timeOverThreshold_farAside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/farAside + display = Draw=HIST + } + hist timeOverThreshold_farAside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/farAside + display = Draw=HIST + } + hist timeOverThreshold_farAside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/farAside + display = Draw=HIST + } + } + dir nearCside { + hist timeOverThreshold_nearCside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/nearCside + display = Draw=HIST + } + hist timeOverThreshold_nearCside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/nearCside + display = Draw=HIST + } + hist timeOverThreshold_nearCside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/nearCside + display = Draw=HIST + } + hist timeOverThreshold_nearCside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/nearCside + display = Draw=HIST + } + } + dir farCside { + hist timeOverThreshold_farCside_P0 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/farCside + display = Draw=HIST + } + hist timeOverThreshold_farCside_P1 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/farCside + display = Draw=HIST + } + hist timeOverThreshold_farCside_P2 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/farCside + display = Draw=HIST + } + hist timeOverThreshold_farCside_P3 { + algorithm = AFPBinContentComp + output = AFP/SiT/SiTimeOverThreshold/farCside + display = Draw=HIST + } } - hist timeOverThreshold_nearCside_P1 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_nearCside_P2 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold - display = Draw=HIST - } - hist timeOverThreshold_nearCside_P3 { - algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold + } + dir HitsPerPlanes { + hist planeHitsAll { + algorithm = HNE + output = AFP/SiT/HitsPerPlanes display = Draw=HIST } - hist timeOverThreshold_farCside_P0 { + hist planeHits_nearAside { algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold + output = AFP/SiT/HitsPerPlanes display = Draw=HIST } - hist timeOverThreshold_farCside_P1 { + hist planeHits_nearCside { algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold + output = AFP/SiT/HitsPerPlanes display = Draw=HIST } - hist timeOverThreshold_farCside_P2 { + hist planeHits_farAside { algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold + output = AFP/SiT/HitsPerPlanes display = Draw=HIST } - hist timeOverThreshold_farCside_P3 { + hist planeHits_farCside { algorithm = AFPBinContentComp - output = AFP/SiT/SiTimeOverThreshold + output = AFP/SiT/HitsPerPlanes display = Draw=HIST } } dir Cluster { - hist clusterX_vs_clusterY_nearAside_P0 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_nearAside_P1 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_nearAside_P2 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_nearAside_P3 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_farAside_P0 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_farAside_P1 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_farAside_P2 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_farAside_P3 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_nearCside_P0 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_nearCside_P1 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_nearCside_P2 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_nearCside_P3 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_farCside_P0 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_farCside_P1 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_farCside_P2 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ - } - hist clusterX_vs_clusterY_farCside_P3 { - algorithm = HNE - output = AFP/SiT/Cluster - display = LogZ,Draw=COLZ + dir nearAside { + hist clusterX_vs_clusterY_nearAside_P0 { + algorithm = HNE + output = AFP/SiT/Cluster/nearAside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_nearAside_P1 { + algorithm = HNE + output = AFP/SiT/Cluster/nearAside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_nearAside_P2 { + algorithm = HNE + output = AFP/SiT/Cluster/nearAside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_nearAside_P3 { + algorithm = HNE + output = AFP/SiT/Cluster/nearAside + display = LogZ,Draw=COLZ + } + } + dir farAside { + hist clusterX_vs_clusterY_farAside_P0 { + algorithm = HNE + output = AFP/SiT/Cluster/farAside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_farAside_P1 { + algorithm = HNE + output = AFP/SiT/Cluster/farAside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_farAside_P2 { + algorithm = HNE + output = AFP/SiT/Cluster/farAside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_farAside_P3 { + algorithm = HNE + output = AFP/SiT/Cluster/farAside + display = LogZ,Draw=COLZ + } + } + dir nearCside { + hist clusterX_vs_clusterY_nearCside_P0 { + algorithm = HNE + output = AFP/SiT/Cluster/nearCside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_nearCside_P1 { + algorithm = HNE + output = AFP/SiT/Cluster/nearCside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_nearCside_P2 { + algorithm = HNE + output = AFP/SiT/Cluster/nearCside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_nearCside_P3 { + algorithm = HNE + output = AFP/SiT/Cluster/nearCside + display = LogZ,Draw=COLZ + } + } + dir farCside { + hist clusterX_vs_clusterY_farCside_P0 { + algorithm = HNE + output = AFP/SiT/Cluster/farCside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_farCside_P1 { + algorithm = HNE + output = AFP/SiT/Cluster/farCside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_farCside_P2 { + algorithm = HNE + output = AFP/SiT/Cluster/farCside + display = LogZ,Draw=COLZ + } + hist clusterX_vs_clusterY_farCside_P3 { + algorithm = HNE + output = AFP/SiT/Cluster/farCside + display = LogZ,Draw=COLZ + } } } dir Track { @@ -492,331 +639,363 @@ dir AFP { } } dir clustersPerPlane { - hist clustersPerPlane_vs_lb_farAside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_farAside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_farAside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_farAside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_nearAside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_nearAside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_nearAside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_nearAside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_farCside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_farCside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_farCside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_farCside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_nearCside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_nearCside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_nearCside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ - } - hist clustersPerPlane_vs_lb_nearCside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlane - display = Draw=COLZ + dir farAside { + hist clustersPerPlane_vs_lb_farAside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/farAside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_farAside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/farAside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_farAside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/farAside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_farAside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/farAside + display = Draw=COLZ + } + } + dir nearAside { + hist clustersPerPlane_vs_lb_nearAside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/nearAside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_nearAside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/nearAside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_nearAside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/nearAside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_nearAside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/nearAside + display = Draw=COLZ + } + } + dir farCside { + hist clustersPerPlane_vs_lb_farCside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/farCside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_farCside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/farCside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_farCside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/farCside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_farCside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/farCside + display = Draw=COLZ + } + } + dir nearCside { + hist clustersPerPlane_vs_lb_nearCside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/nearCside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_nearCside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/nearCside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_nearCside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/nearCside + display = Draw=COLZ + } + hist clustersPerPlane_vs_lb_nearCside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlane/nearCside + display = Draw=COLZ + } } } dir clustersPerPlaneFront { - hist clustersPerPlaneFront_vs_lb_farAside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_farAside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_farAside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_farAside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_nearAside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_nearAside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_nearAside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_nearAside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_farCside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_farCside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_farCside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_farCside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_nearCside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_nearCside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_nearCside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ - } - hist clustersPerPlaneFront_vs_lb_nearCside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneFront - display = Draw=COLZ + dir farAside { + hist clustersPerPlaneFront_vs_lb_farAside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/farAside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_farAside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/farAside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_farAside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/farAside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_farAside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/farAside + display = Draw=COLZ + } + } + dir nearAside { + hist clustersPerPlaneFront_vs_lb_nearAside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/nearAside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_nearAside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/nearAside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_nearAside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/nearAside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_nearAside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/nearAside + display = Draw=COLZ + } + } + dir farCside { + hist clustersPerPlaneFront_vs_lb_farCside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/farCside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_farCside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/farCside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_farCside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/farCside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_farCside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/farCside + display = Draw=COLZ + } + } + dir nearCside { + hist clustersPerPlaneFront_vs_lb_nearCside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/nearCside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_nearCside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/nearCside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_nearCside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/nearCside + display = Draw=COLZ + } + hist clustersPerPlaneFront_vs_lb_nearCside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneFront/nearCside + display = Draw=COLZ + } } } dir clustersPerPlaneEnd { - hist clustersPerPlaneEnd_vs_lb_farAside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_farAside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_farAside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_farAside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_nearAside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_nearAside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_nearAside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_nearAside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_farCside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_farCside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_farCside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_farCside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_nearCside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_nearCside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_nearCside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ - } - hist clustersPerPlaneEnd_vs_lb_nearCside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneEnd - display = Draw=COLZ + dir farAside { + hist clustersPerPlaneEnd_vs_lb_farAside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/farAside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_farAside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/farAside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_farAside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/farAside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_farAside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/farAside + display = Draw=COLZ + } + } + dir nearAside { + hist clustersPerPlaneEnd_vs_lb_nearAside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/nearAside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_nearAside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/nearAside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_nearAside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/nearAside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_nearAside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/nearAside + display = Draw=COLZ + } + } + dir farCside { + hist clustersPerPlaneEnd_vs_lb_farCside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/farCside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_farCside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/farCside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_farCside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/farCside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_farCside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/farCside + display = Draw=COLZ + } + } + dir nearCside { + hist clustersPerPlaneEnd_vs_lb_nearCside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/nearCside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_nearCside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/nearCside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_nearCside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/nearCside + display = Draw=COLZ + } + hist clustersPerPlaneEnd_vs_lb_nearCside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneEnd/nearCside + display = Draw=COLZ + } } } dir clustersPerPlaneMiddle { - hist clustersPerPlaneMiddle_vs_lb_farAside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_farAside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_farAside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_farAside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_nearAside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_nearAside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_nearAside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_nearAside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_farCside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_farCside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_farCside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_farCside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_nearCside_P0 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_nearCside_P1 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_nearCside_P2 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ - } - hist clustersPerPlaneMiddle_vs_lb_nearCside_P3 { - algorithm = HNE - output = AFP/SiT/clustersPerPlaneMiddle - display = Draw=COLZ + dir farAside { + hist clustersPerPlaneMiddle_vs_lb_farAside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/farAside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_farAside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/farAside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_farAside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/farAside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_farAside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/farAside + display = Draw=COLZ + } + } + dir nearAside { + hist clustersPerPlaneMiddle_vs_lb_nearAside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/nearAside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_nearAside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/nearAside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_nearAside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/nearAside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_nearAside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/nearAside + display = Draw=COLZ + } + } + dir farCside { + hist clustersPerPlaneMiddle_vs_lb_farCside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/farCside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_farCside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/farCside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_farCside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/farCside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_farCside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/farCside + display = Draw=COLZ + } + } + dir nearCside { + hist clustersPerPlaneMiddle_vs_lb_nearCside_P0 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/nearCside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_nearCside_P1 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/nearCside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_nearCside_P2 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/nearCside + display = Draw=COLZ + } + hist clustersPerPlaneMiddle_vs_lb_nearCside_P3 { + algorithm = HNE + output = AFP/SiT/clustersPerPlaneMiddle/nearCside + display = Draw=COLZ + } } } dir clustersPerStation { @@ -935,6 +1114,62 @@ dir AFP { display = Draw=COLZ } } + dir HitsPerBarsInTrain { + hist barInTrainAllA { + algorithm = HNE + output = AFP/ToF/HitsPerBarsInTrain + display = Draw=COLZ + } + hist barInTrainAllC { + algorithm = HNE + output = AFP/ToF/HitsPerBarsInTrain + display = Draw=COLZ + } + dir farAside { + hist barInTrainIDA_train0 { + algorithm = AFPBinContentComp + output = AFP/ToF/HitsPerBarsInTrain/farAside + display = Draw=COLZ + } + hist barInTrainIDA_train1 { + algorithm = AFPBinContentComp + output = AFP/ToF/HitsPerBarsInTrain/farAside + display = Draw=COLZ + } + hist barInTrainIDA_train2 { + algorithm = AFPBinContentComp + output = AFP/ToF/HitsPerBarsInTrain/farAside + display = Draw=COLZ + } + hist barInTrainIDA_train3 { + algorithm = AFPBinContentComp + output = AFP/ToF/HitsPerBarsInTrain/farAside + display = Draw=COLZ + } + } + dir farCside { + hist barInTrainIDC_train0 { + algorithm = AFPBinContentComp + output = AFP/ToF/HitsPerBarsInTrain/farCside + display = Draw=COLZ + } + hist barInTrainIDC_train1 { + algorithm = AFPBinContentComp + output = AFP/ToF/HitsPerBarsInTrain/farCside + display = Draw=COLZ + } + hist barInTrainIDC_train2 { + algorithm = AFPBinContentComp + output = AFP/ToF/HitsPerBarsInTrain/farCside + display = Draw=COLZ + } + hist barInTrainIDC_train3 { + algorithm = AFPBinContentComp + output = AFP/ToF/HitsPerBarsInTrain/farCside + display = Draw=COLZ + } + } + } } } @@ -952,7 +1187,7 @@ algorithm AFPBinContentComp { thresholds = AFPTestThreshold NSigma = 3 reference = AFPBinContentReference - publish = 1 + publish = 4 NormRef = 1 } ############################################################ @@ -962,8 +1197,8 @@ algorithm AFPBinContentComp { # Thresholds thresholds AFPTestThreshold { limits NBins { - warning = 3 - error = 5 + warning = 0 + error = 1 } } ########################################################### diff --git a/Event/xAOD/xAODTruthCnv/CMakeLists.txt b/Event/xAOD/xAODTruthCnv/CMakeLists.txt index e226116ad1ce170f66413988f9b59c33c7ebf3b4..c3fd8795942cc11a21da1215f9d8b655dd828b21 100644 --- a/Event/xAOD/xAODTruthCnv/CMakeLists.txt +++ b/Event/xAOD/xAODTruthCnv/CMakeLists.txt @@ -26,6 +26,7 @@ atlas_depends_on_subdirs( Control/CxxUtils Control/AthToolSupport/AsgTools Event/xAOD/xAODTruth + Generators/AtlasHepMC ${extra_dep} ) # Component(s) in the package: diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx index 85e533993268e85f40b413902e084ce52e7e4cf0..a5b112bb6ac8252522d416290d0f639c175947f4 100644 --- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx +++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx @@ -138,7 +138,8 @@ std::vector<float> InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) const { // Get the probability calculator - SG::ReadCondHandle<HTcalculator> readHandle{m_HTReadKey}; + const EventContext& ctx = Gaudi::Hive::currentContext(); + SG::ReadCondHandle<HTcalculator> readHandle{m_HTReadKey,ctx}; const HTcalculator* HTcalc = (*readHandle); // make sure some calibration is available if(HTcalc==nullptr) { @@ -189,7 +190,7 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con ATH_MSG_DEBUG ("check---------------------------------------------------------------------------------------"); ATH_MSG_DEBUG ("check Got track: pT: " << pT << " eta: " << eta << " phi: " << phi); ATH_MSG_DEBUG ("check---------------------------------------------------------------------------------------"); - + // For calculation of HT probability: double pHTel_prod = 1.0; double pHTpi_prod = 1.0; @@ -228,7 +229,7 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con driftcircle = static_cast<const InDet::TRT_DriftCircleOnTrack*>(tmpRio); } } - + if (!driftcircle) continue; // From now (May 2015) onwards, we ONLY USE MIDDLE HT BIT: @@ -316,7 +317,7 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con // Our representation of 'GasType' is 0:Xenon, 1:Argon, 2:Krypton int GasType=0; // Xenon is default if (!m_TRTStrawSummaryTool.empty()) { - int stat = m_TRTStrawSummaryTool->getStatusHT(DCid); + int stat = m_TRTStrawSummaryTool->getStatusHT(DCid,ctx); if ( stat==2 || stat==3 ) { GasType = 0; } // Xe else if ( stat==1 || stat==4 ) { GasType = 1; } // Ar else if ( stat==5 ) { GasType = 1; } // Kr -- ESTIMATED AS AR UNTIL PID IS TUNED TO HANDLE KR @@ -377,11 +378,11 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con if (isHTMB) {pHTel_prod *= pHTel; pHTpi_prod *= pHTpi;} else {pHTel_prod *= 1.0-pHTel; pHTpi_prod *= 1.0-pHTpi;} ATH_MSG_DEBUG ("check pHT(el): " << pHTel << " pHT(pi): " << pHTpi ); - - // Jared - Development Output... - + + // Jared - Development Output... + //std::cout << "check pHT(el): " << pHTel << " pHT(pi): " << pHTpi << std::endl; - + }//of loop over hits @@ -399,24 +400,24 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con ATH_MSG_DEBUG ("check---------------------------------------------------------------------------------------"); ATH_MSG_DEBUG (""); ATH_MSG_DEBUG (""); - + // Jared - ToT Implementation dEdx = m_TRTdEdxTool->dEdx(&track, false); // Divide by L, exclude HT hits double usedHits = m_TRTdEdxTool->usedHits(&track, false); - prob_El_ToT = m_TRTdEdxTool->getTest(dEdx, pTrk, Trk::electron, Trk::pion, usedHits); - + prob_El_ToT = m_TRTdEdxTool->getTest(dEdx, pTrk, Trk::electron, Trk::pion, usedHits); + // Limit the probability values the upper and lower limits that are given/trusted for each part: - double limProbHT = HTcalc->Limit(prob_El_HT); - double limProbToT = HTcalc->Limit(prob_El_ToT); - + double limProbHT = HTcalc->Limit(prob_El_HT); + double limProbToT = HTcalc->Limit(prob_El_ToT); + // Calculate the combined probability, assuming no correlations (none are expected). prob_El_Comb = (limProbHT * limProbToT ) / ( (limProbHT * limProbToT) + ( (1.0-limProbHT) * (1.0-limProbToT)) ); - + // Troels: VERY NASTY NAMING, BUT AGREED UPON FOR NOW (for debugging, 27. NOV. 2014): - prob_El_Brem = pHTel_prod; // decorates electron LH to el brem for now... (still used?) - + prob_El_Brem = pHTel_prod; // decorates electron LH to el brem for now... (still used?) + //std::cout << "Prob_HT = " << prob_El_HT << " Prob_ToT = " << prob_El_ToT << " Prob_Comb = " << prob_El_Comb << std::endl; - + return PIDvalues; } @@ -442,9 +443,9 @@ bool InDet::TRT_ElectronPidToolRun2::CheckGeometry(int BEC, int Layer, int Straw ATH_MSG_ERROR("Found a negative TRT Layer"); return false; //must be positive } - + static const int nlayers[2]={3,14}; - + if( not ( Layer < nlayers[part] ) ){ ATH_MSG_ERROR("Found TRT Layer index "<<Layer<<" in part "<<BEC<<" but part only has "<<nlayers[part]<<" layers."); return false; @@ -455,15 +456,15 @@ bool InDet::TRT_ElectronPidToolRun2::CheckGeometry(int BEC, int Layer, int Straw ATH_MSG_ERROR("Found a negative TRT StrawLayer"); return false; //must be positive } - + static const int strawsPerBEC[2][14]={{19,24,30, 0, 0, 0,0,0,0,0,0,0,0,0}, {16,16,16,16,16,16,8,8,8,8,8,8,8,8}}; - + if(not(StrawLayer < strawsPerBEC[part][Layer])){ ATH_MSG_ERROR("TRT part "<<BEC<<" Layer "<<Layer<<" only has "<<strawsPerBEC[part][Layer]<<" straws. Found index "<<StrawLayer); return false; } - + return true; } diff --git a/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/src/MSVertexRecoTool.cxx b/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/src/MSVertexRecoTool.cxx index fcedd0f04ee2ec6e58b2ed89ad2ceaf11007fb92..71c7c01dba5746ab9af28e794c64c147a38e150e 100644 --- a/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/src/MSVertexRecoTool.cxx +++ b/MuonSpectrometer/MSVertexReconstruction/MSVertexTools/src/MSVertexRecoTool.cxx @@ -1064,11 +1064,11 @@ namespace Muon { //core algorithm for endcap vertex reconstruction Amg::Vector3D MSVertexRecoTool::VxMinQuad(const std::vector<Tracklet> &tracks) const { - float s(0.),sx(0.),sy(0.),sxy(0.),sxx(0.),d(0.); - float sigma = 1.; + double s(0.),sx(0.),sy(0.),sxy(0.),sxx(0.),d(0.); + double sigma = 1.; for(unsigned int i=0; i<tracks.size(); ++i) { - float TrkSlope = std::tan(tracks.at(i).getML1seg().alpha()); - float TrkInter = tracks.at(i).getML1seg().globalPosition().perp() - tracks.at(i).getML1seg().globalPosition().z()*TrkSlope; + double TrkSlope = std::tan(tracks.at(i).getML1seg().alpha()); + double TrkInter = tracks.at(i).getML1seg().globalPosition().perp() - tracks.at(i).getML1seg().globalPosition().z()*TrkSlope; s += 1./(sq(sigma)); sx += TrkSlope/(sq(sigma)); sxx += sq(TrkSlope)/sq(sigma); @@ -1081,9 +1081,9 @@ namespace Muon { return MyVx; } - float Rpos = (sxx*sy - sx*sxy)/d; - float Zpos = (sx*sy - s*sxy)/d; - + double Rpos = (sxx*sy - sx*sxy)/d; + double Zpos = (sx*sy - s*sxy)/d; + Amg::Vector3D MyVx(Rpos,0,Zpos); return MyVx; diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/share/NSWAGDD_BlobProduction.py b/MuonSpectrometer/MuonDetDescr/MuonAGDD/share/NSWAGDD_BlobProduction.py index fe429325a2c26880c1ed9cd790f8870bbec2bcf0..3b525ada886af0f7e7919092b5efc40622b9e42b 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/share/NSWAGDD_BlobProduction.py +++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/share/NSWAGDD_BlobProduction.py @@ -1,11 +1,23 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +try: + if muonLayout: + from GeoModelSvc.GeoModelSvcConf import GeoModelSvc + GeoModelSvc = GeoModelSvc() + GeoModelSvc.MuonVersionOverride=muonLayout +except NameError: + pass + from MuonAGDD.MuonAGDDConfig import NSWAGDDTool NSWAGDDDumper = NSWAGDDTool(name="NSWAGDDDumper") NSWAGDDDumper.WriteAGDDFile=True # creates Out.AmdcOracle.AM.AGDDtemp.data and Out.AmdcOracle.AM.AGDD.PREsql NSWAGDDDumper.Locked=False -NSWAGDDDumper.ReadAGDD=False # turn off reading from data base (true means read from DB) -NSWAGDDDumper.XMLFiles=[input_nsw_xml] +try: + if input_nsw_xml: + NSWAGDDDumper.ReadAGDD = False # turn off reading from data base (true means read from DB) + NSWAGDDDumper.XMLFiles=[input_nsw_xml] +except NameError: + pass NSWAGDDDumper.Volumes=["NewSmallWheel"] # for the NSWAGDDTool volumes must always be given ("NewSmallWheel" usually includes everything) NSWAGDDDumper.DefaultDetector="Muon" diff --git a/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/ATLAS_CHECK_THREAD_SAFETY b/MuonSpectrometer/MuonIdHelpersAlgs/MuonIdHelpersAlgs/ATLAS_CHECK_THREAD_SAFETY old mode 100644 new mode 100755 diff --git a/Reconstruction/tauRecTools/src/TauElectronVetoVariables.cxx b/Reconstruction/tauRecTools/src/TauElectronVetoVariables.cxx index c4ffe0d518f418d3c1649abf04187eb0371970fe..9816326736b008a9988da4e162ccd5b4db0f441c 100644 --- a/Reconstruction/tauRecTools/src/TauElectronVetoVariables.cxx +++ b/Reconstruction/tauRecTools/src/TauElectronVetoVariables.cxx @@ -4,9 +4,7 @@ #ifndef XAOD_ANALYSIS -#include <algorithm> -#include <cmath> -#include <sstream> + #include "GaudiKernel/SystemOfUnits.h" #include "CaloUtils/CaloVertexedCell.h" @@ -19,7 +17,10 @@ #include "TrkParametersIdentificationHelpers/TrackParametersIdHelper.h" #include "RecoToolInterfaces/IParticleCaloExtensionTool.h" #include "TauElectronVetoVariables.h" - +#include <algorithm> +#include <cmath> +#include <unordered_map> +#include <array> using Gaudi::Units::GeV; //------------------------------------------------------------------------- @@ -40,10 +41,11 @@ TauElectronVetoVariables::~TauElectronVetoVariables() { } StatusCode TauElectronVetoVariables::initialize() { ATH_CHECK( m_caloExtensionTool.retrieve() ); - - if (!m_ParticleCacheKey.key().empty()) {ATH_CHECK(m_ParticleCacheKey.initialize());} - else {m_useOldCalo = true;} - + if (!m_ParticleCacheKey.key().empty()) { + ATH_CHECK(m_ParticleCacheKey.initialize()); + } else { + m_useOldCalo = true; + } return StatusCode::SUCCESS; } @@ -55,14 +57,11 @@ StatusCode TauElectronVetoVariables::execute(xAOD::TauJet& pTau) const if (pTau.nTracks() < 1) { return StatusCode::SUCCESS; } - ATH_MSG_DEBUG("in execute()"); - float detPhiTrk = 0.; float detEtaTrk = 0.; float clEtaTrk = 0.; float distEtaTrk = 0.; - float energy_3phi[101] = {0.0}; float eta[101] = {0.0}; int max1 = 0; @@ -74,9 +73,7 @@ StatusCode TauElectronVetoVariables::execute(xAOD::TauJet& pTau) const float etamaxcut = 0.158; float phimaxcut = 0.1; float signum_eta = 0.; - signum_eta = pTau.track(0)->eta() / std::abs(pTau.track(0)->eta()); - float sumETCellsLAr = 0.; float eta0cut = 0.075; float eta1cut = 0.0475; @@ -93,31 +90,26 @@ StatusCode TauElectronVetoVariables::execute(xAOD::TauJet& pTau) const float sumETCellsHad1 = 0.; float etahadcut = 0.2; float phihadcut = 0.2; - const CaloCell *pCell; - int trackIndex = -1; //--------------------------------------------------------------------- // Calculate eta, phi impact point of leading track at calorimeter layers EM 0,1,2,3 //--------------------------------------------------------------------- Trk::TrackParametersIdHelper parsIdHelper; - - const int numOfsampEM = 4; - double eta_extrapol[4]; - double phi_extrapol[4]; - - for (int i = 0; i < numOfsampEM; ++i) { - eta_extrapol[i] = -11111.; - phi_extrapol[i] = -11111.; - } - + constexpr size_t numberOfEM_Layers{4}; + constexpr double invalidCoordinate{-11111.}; + constexpr double invalidCoordinateThreshold{-11110.}; + std::array<double, numberOfEM_Layers> extrapolatedEta{}; + std::array<double, numberOfEM_Layers> extrapolatedPhi{}; + extrapolatedEta.fill(invalidCoordinate); + extrapolatedPhi.fill(invalidCoordinate); + /*get the CaloExtension object*/ const Trk::CaloExtension * caloExtension = nullptr; std::unique_ptr<Trk::CaloExtension> uniqueExtension ; const xAOD::TrackParticle *orgTrack = pTau.track(0)->track(); trackIndex = orgTrack->index(); - if (m_useOldCalo) { /* If CaloExtensionBuilder is unavailable, use the calo extension tool */ ATH_MSG_VERBOSE("Using the CaloExtensionTool"); @@ -135,20 +127,15 @@ StatusCode TauElectronVetoVariables::execute(xAOD::TauJet& pTau) const caloExtension = uniqueExtension.get(); } } - const std::vector<const Trk::CurvilinearParameters*>& clParametersVector = caloExtension->caloLayerIntersections(); - if( not caloExtension || clParametersVector.empty() ){ ATH_MSG_WARNING("extrapolation of leading track to calo surfaces failed : caloLayerIntersection is empty" ); return StatusCode::SUCCESS; } - // loop over calo layers for( const Trk::CurvilinearParameters * cur : clParametersVector ){ - // only use entry layer if( !parsIdHelper.isEntryToVolume(cur->cIdentifier()) ) continue; - CaloSampling::CaloSample sample = parsIdHelper.caloSample(cur->cIdentifier()); int index = -1; if( sample == CaloSampling::PreSamplerE || sample == CaloSampling::PreSamplerB ) index = 0; @@ -156,91 +143,68 @@ StatusCode TauElectronVetoVariables::execute(xAOD::TauJet& pTau) const else if( sample == CaloSampling::EME2 || sample == CaloSampling::EMB2 ) index = 2; else if( sample == CaloSampling::EME3 || sample == CaloSampling::EMB3 ) index = 3; if( index < 0 ) continue; - eta_extrapol[index] = cur->position().eta(); - phi_extrapol[index] = cur->position().phi(); + extrapolatedEta[index] = cur->position().eta(); + extrapolatedPhi[index] = cur->position().phi(); } - - for (int i = 0; i < numOfsampEM; ++i) { - if ( eta_extrapol[i] < -11110. || phi_extrapol[i] < -11110. ) - { + for (size_t i = 0; i < numberOfEM_Layers; ++i) { + if ( extrapolatedEta[i] < invalidCoordinateThreshold || extrapolatedPhi[i] < invalidCoordinateThreshold ){ ATH_MSG_DEBUG("extrapolation of leading track to calo surfaces failed for sampling : " << i ); return StatusCode::SUCCESS; } } - if (! pTau.jetLink().isValid()) { ATH_MSG_ERROR("tau does not have jet seed for electron veto cell variable calculation"); return StatusCode::FAILURE; } const xAOD::Jet* pJetSeed = pTau.jet(); - // Loop through jets, get links to clusters std::vector<const xAOD::CaloCluster*> clusterList; ATH_CHECK(tauRecTools::GetJetClusterList(pJetSeed, clusterList, m_useSubtractedCluster)); - - std::bitset<200000> cellSeen; - + std::bitset<200000> cellSeen{}; + const std::unordered_map<int, int> samplingLookup{ + {4,0}, {5,1}, {6,2}, {7,3}, {8,12}, + {15, 12}, {16,13}, {17,14}, {18,12}, {19, 13}, {20,14} + }; + const auto notFound{samplingLookup.end()}; for (auto cluster : clusterList){ - CaloClusterCellLink::const_iterator pCellIter = cluster->getCellLinks()->begin(); CaloClusterCellLink::const_iterator pCellIterE = cluster->getCellLinks()->end(); - - for (; pCellIter != pCellIterE; pCellIter++) { - - double cellEta, cellPhi, cellET; - + for (; pCellIter != pCellIterE; ++pCellIter) { + double cellEta{}, cellPhi{}, cellET{}; pCell = *pCellIter; - if (cellSeen.test(pCell->caloDDE()->calo_hash())) continue; - else cellSeen.set(pCell->caloDDE()->calo_hash()); - + if (cellSeen.test(pCell->caloDDE()->calo_hash())) continue; + else cellSeen.set(pCell->caloDDE()->calo_hash()); if (m_doVertexCorrection && pTau.vertexLink().isValid()) { CaloVertexedCell vxCell (*pCell, pTau.vertex()->position()); cellPhi = vxCell.phi(); cellEta = vxCell.eta(); cellET = vxCell.et(); - } - else { + } else { cellPhi = pCell->phi(); cellEta = pCell->eta(); cellET = pCell->et(); } - int sampling = pCell->caloDDE()->getSampling(); - if (sampling == 4) sampling = 0; - if (sampling == 5) sampling = 1; - if (sampling == 6) sampling = 2; - if (sampling == 7) sampling = 3; - if (sampling == 18) sampling = 12; - if (sampling == 8) sampling = 12; - if (sampling == 15) sampling = 12; - if (sampling == 19) sampling = 13; - if (sampling == 16) sampling = 13; - if (sampling == 20) sampling = 14; - if (sampling == 17) sampling = 14; - + if (const auto & pElement {samplingLookup.find(sampling)};pElement != notFound){ + sampling = pElement->second; + } int i = 2; if (sampling < 4) i = sampling; if (sampling == 12 || sampling == 13 || sampling == 14) i = 3; - - detPhiTrk = Tau1P3PKineUtils::deltaPhi( cellPhi, phi_extrapol[i] ); - detEtaTrk = std::abs( cellEta - eta_extrapol[i] ); - clEtaTrk = eta_extrapol[i]; - distEtaTrk = cellEta - eta_extrapol[i]; - + detPhiTrk = Tau1P3PKineUtils::deltaPhi( cellPhi, extrapolatedPhi[i] ); + detEtaTrk = std::abs( cellEta - extrapolatedEta[i] ); + clEtaTrk = extrapolatedEta[i]; + distEtaTrk = cellEta - extrapolatedEta[i]; if ((sampling == 0 && detEtaTrk < eta0cut && detPhiTrk < phi0cut) || (sampling == 1 && detEtaTrk < eta1cut && detPhiTrk < phi1cut) || (sampling == 2 && detEtaTrk < eta2cut && detPhiTrk < phi2cut) || (sampling == 3 && detEtaTrk < eta3cut && detPhiTrk < phi3cut)) { - sumETCellsLAr += cellET; } - if (sampling == 12 && detEtaTrk < etahadcut && detPhiTrk < phihadcut) sumETCellsHad1 += cellET; - if (std::abs(cellEta) > 0.8 && std::abs(cellEta) <= 1.2 && (sampling == 13 || sampling == 14) && detEtaTrk < etahadcut && detPhiTrk < phihadcut) { sumETCellsHad1 += cellET; } - if (std::abs(pTau.track(0)->eta()) <= 1.7) { if (sampling == 1 && detEtaTrk < etamaxcut && detPhiTrk <= phimaxcut) { if ((std::abs(cellEta) < 1.37 || std::abs(cellEta) > 1.52) && std::abs(cellEta) < 1.85) { @@ -261,82 +225,62 @@ StatusCode TauElectronVetoVariables::execute(xAOD::TauJet& pTau) const energy_3phi[n] = 0; eta[n] = 0; } - if (std::abs(cellEta) <= etacase1) { etareg = 0.00315; } else { etareg = 0.00415; } - } //end cell loop - }// end jet constituent loop - for (int m1 = 0; m1 < 101; m1++) { if ((energy_3phi[m1] > Emax1)) { Emax1 = energy_3phi[m1]; max1 = m1; } } - for (int m2 = 1; m2 < 100; m2++) { if (m2 == max1) continue; - if ((energy_3phi[m2] > Emax2) && (energy_3phi[m2] > energy_3phi[m2 - 1]) && (energy_3phi[m2] > energy_3phi[m2 + 1])) { Emax2 = energy_3phi[m2]; max2 = m2; } } - if (std::abs(eta[max1]) >= etareg) { max = max1; } else { max = max2; } - float TRTratio = -9999.0; - uint8_t TRTHTHits; - uint8_t TRTHTOutliers; - uint8_t TRTHits; - uint8_t TRTOutliers; - + uint8_t TRTHTHits{0}; + uint8_t TRTHTOutliers{0}; + uint8_t TRTHits{0}; + uint8_t TRTOutliers{0}; const xAOD::TrackParticle* leadTrack = pTau.track(0)->track(); - - if ( !leadTrack->summaryValue( TRTHits, xAOD::SummaryType::numberOfTRTHits ) ) - { + if ( !leadTrack->summaryValue( TRTHits, xAOD::SummaryType::numberOfTRTHits ) ){ ATH_MSG_DEBUG("retrieval of track summary value failed. Not filling electron veto variables for this one prong candidate"); return StatusCode::SUCCESS; } - if ( !leadTrack->summaryValue( TRTHTHits, xAOD::SummaryType::numberOfTRTHighThresholdHits ) ) - { + if ( !leadTrack->summaryValue( TRTHTHits, xAOD::SummaryType::numberOfTRTHighThresholdHits ) ){ ATH_MSG_DEBUG("retrieval of track summary value failed. Not filling electron veto variables for this one prong candidate"); return StatusCode::SUCCESS; } - if ( !leadTrack->summaryValue( TRTOutliers, xAOD::SummaryType::numberOfTRTOutliers ) ) - { + if ( !leadTrack->summaryValue( TRTOutliers, xAOD::SummaryType::numberOfTRTOutliers ) ){ ATH_MSG_DEBUG("retrieval of track summary value failed. Not filling electron veto variables for this one prong candidate"); return StatusCode::SUCCESS; } - if ( !leadTrack->summaryValue( TRTHTOutliers, xAOD::SummaryType::numberOfTRTHighThresholdOutliers ) ) - { + if ( !leadTrack->summaryValue( TRTHTOutliers, xAOD::SummaryType::numberOfTRTHighThresholdOutliers ) ) { ATH_MSG_DEBUG("retrieval of track summary value failed. Not filling electron veto variables for this one prong candidate"); return StatusCode::SUCCESS; } - - if (TRTHits + TRTOutliers != 0) { TRTratio = float( TRTHTHits + TRTHTOutliers) / float( TRTHits + TRTOutliers ); - } - else { + } else { TRTratio = 0.0; } - pTau.setDetail(xAOD::TauJetParameters::TRT_NHT_OVER_NLT , TRTratio ); pTau.setDetail(xAOD::TauJetParameters::secMaxStripEt , energy_3phi[max] ); pTau.setDetail(xAOD::TauJetParameters::hadLeakEt , static_cast<float>( sumETCellsHad1 / ( pTau.track(0)->pt() ) ) ); pTau.setDetail(xAOD::TauJetParameters::sumEMCellEtOverLeadTrkPt , static_cast<float>( ( sumETCellsLAr / ( pTau.track(0)->pt() ) ) ) ); - - return StatusCode::SUCCESS; } diff --git a/Simulation/BeamEffects/test/BeamEffectsAlg_test.cxx b/Simulation/BeamEffects/test/BeamEffectsAlg_test.cxx index a6f12833eb2eace2f4b2ba35e84545051883b03f..4a7ac7cb8306a1e7eaa59e694a2c936ca99be7a1 100644 --- a/Simulation/BeamEffects/test/BeamEffectsAlg_test.cxx +++ b/Simulation/BeamEffects/test/BeamEffectsAlg_test.cxx @@ -20,6 +20,7 @@ #include "AtlasHepMC/GenEvent.h" #include "AtlasHepMC/GenVertex.h" #include "AtlasHepMC/GenParticle.h" +#include "AtlasHepMC/Operators.h" // CLHEP includes #include "CLHEP/Vector/LorentzVector.h" @@ -94,41 +95,49 @@ namespace SimTesting { TEST_F(BeamEffectsAlg_test, patchSignalProcessVertex_empty_GenEvent) { HepMC::GenEvent ge; ASSERT_TRUE( patchSignalProcessVertex(ge).isSuccess() ); - ASSERT_TRUE( ge.signal_process_vertex()==nullptr ); + ASSERT_TRUE( HepMC::signal_process_vertex(&ge)==nullptr ); } TEST_F(BeamEffectsAlg_test, signal_process_vertex_exists) { HepMC::GenEvent ge; CLHEP::HepLorentzVector myPos( 1.0, 1.0, 1.0, 1.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); - ge.set_signal_process_vertex( myVertex ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); + HepMC::set_signal_process_vertex(&ge, myVertex ); ASSERT_TRUE( patchSignalProcessVertex(ge).isSuccess() ); - ASSERT_TRUE( ge.signal_process_vertex()==myVertex ); + ASSERT_TRUE( HepMC::signal_process_vertex(&ge)==myVertex ); } TEST_F(BeamEffectsAlg_test, add_signal_process_vertex_atlasG4) { HepMC::GenEvent ge; CLHEP::HepLorentzVector myPos( 1.0, 1.0, 1.0, 1.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); ge.add_vertex( myVertex ); - ASSERT_TRUE( ge.signal_process_vertex()==nullptr ); + ASSERT_TRUE( HepMC::signal_process_vertex(&ge)==nullptr ); ASSERT_TRUE( m_alg->setProperty( "ISFRun", false).isSuccess() ); ASSERT_TRUE( patchSignalProcessVertex(ge).isSuccess() ); - ASSERT_TRUE( ge.signal_process_vertex()==myVertex ); - ASSERT_EQ( *ge.signal_process_vertex(), *myVertex ); + ASSERT_TRUE( HepMC::signal_process_vertex(&ge)==myVertex ); +#ifdef HEPMC3 +//Not needed for HepMC3 +#else + ASSERT_EQ( *HepMC::signal_process_vertex(&ge), *myVertex ); +#endif } TEST_F(BeamEffectsAlg_test, add_signal_process_vertex_isfG4) { HepMC::GenEvent ge; CLHEP::HepLorentzVector myPos( 1.0, 1.0, 1.0, 1.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); HepMC::GenVertexPtr dummyVertex = HepMC::newGenVertexPtr(); ge.add_vertex( myVertex ); - ASSERT_TRUE( ge.signal_process_vertex()==nullptr ); + ASSERT_TRUE( HepMC::signal_process_vertex(&ge)==nullptr ); ASSERT_TRUE( m_alg->setProperty( "ISFRun", true).isSuccess() ); ASSERT_TRUE( patchSignalProcessVertex(ge).isSuccess() ); - ASSERT_TRUE( ge.signal_process_vertex()!=myVertex ); - ASSERT_EQ( *ge.signal_process_vertex(), *dummyVertex ); + ASSERT_TRUE( HepMC::signal_process_vertex(&ge)!=myVertex ); +#ifdef HEPMC3 +//Not needed for HepMC3 +#else + ASSERT_EQ( *HepMC::signal_process_vertex(&ge), *dummyVertex ); +#endif } TEST_F(BeamEffectsAlg_test, execute_pass_through) { @@ -142,7 +151,7 @@ namespace SimTesting { inputTestDataHandle->push_back(new HepMC::GenEvent()); HepMC::GenEvent& ge = *(inputTestDataHandle->at(0)); CLHEP::HepLorentzVector myPos( 0.0, 0.0, 0.0, 0.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, 2, 10); myVertex->add_particle_in(inParticle1); @@ -156,7 +165,7 @@ namespace SimTesting { HepMC::GenParticlePtr inParticle4 = HepMC::newGenParticlePtr(fourMomentum4, -2, 10); myVertex->add_particle_out(inParticle4); ge.add_vertex( myVertex ); - ge.set_signal_process_vertex( myVertex ); + HepMC::set_signal_process_vertex(&ge, myVertex ); ge.set_beam_particles(inParticle1,inParticle2); // ASSERT_TRUE( m_alg->initialize().isSuccess() ); @@ -165,10 +174,17 @@ namespace SimTesting { ASSERT_TRUE( outputTestDataKey.initialize().isSuccess() ); SG::ReadHandle<McEventCollection> outputTestDataHandle{outputTestDataKey,ctx}; ASSERT_TRUE( outputTestDataHandle.isValid() ); +#ifdef HEPMC3 + ASSERT_EQ(HepMC::signal_process_vertex(outputTestDataHandle->at(0)), HepMC::signal_process_vertex(inputTestDataHandle->at(0))); + ASSERT_EQ(outputTestDataHandle->at(0)->vertices().begin(), ((const HepMC::GenEvent*)inputTestDataHandle->at(0))->vertices().begin()); + ASSERT_EQ(outputTestDataHandle->at(0)->beams().at(0), inputTestDataHandle->at(0)->beams().at(0)); + ASSERT_EQ(outputTestDataHandle->at(0)->beams().at(1),inputTestDataHandle->at(0)->beams().at(1)); +#else ASSERT_EQ(*(outputTestDataHandle->at(0)->signal_process_vertex()), *(inputTestDataHandle->at(0)->signal_process_vertex())); ASSERT_EQ(**(outputTestDataHandle->at(0)->vertices_begin()), **(inputTestDataHandle->at(0)->vertices_begin())); ASSERT_EQ(*(outputTestDataHandle->at(0)->beam_particles().first), *(inputTestDataHandle->at(0)->beam_particles().first)); ASSERT_EQ(*(outputTestDataHandle->at(0)->beam_particles().second), *(inputTestDataHandle->at(0)->beam_particles().second)); +#endif } } // <-- namespace SimTesting diff --git a/Simulation/ISF/ISF_Core/ISF_Event/CMakeLists.txt b/Simulation/ISF/ISF_Core/ISF_Event/CMakeLists.txt index 9b64379cba7ff9a57d945eef28f72b87c5aa1e25..f9cebdddb05d9df617e133ab416b210ef7d5ced5 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/CMakeLists.txt +++ b/Simulation/ISF/ISF_Core/ISF_Event/CMakeLists.txt @@ -15,10 +15,10 @@ atlas_add_library( ISF_Event PUBLIC_HEADERS ISF_Event INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib ${EIGEN_LIBRARIES} TestTools AthenaBaseComps AtlasDetDescr BarcodeEventLib GeoPrimitives GeneratorObjects GaudiKernel ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AtlasHepMCsearchLib ${EIGEN_LIBRARIES} TestTools AthenaBaseComps AtlasDetDescr BarcodeEventLib GeoPrimitives GeneratorObjects GaudiKernel ) atlas_add_test( ISFParticle_test SOURCES test/ISFParticle_test.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib ${EIGEN_LIBRARIES} TestTools AthenaBaseComps AtlasDetDescr GeoPrimitives GeneratorObjects GaudiKernel ISF_Event ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AtlasHepMCsearchLib ${EIGEN_LIBRARIES} TestTools AthenaBaseComps AtlasDetDescr GeoPrimitives GeneratorObjects GaudiKernel ISF_Event ) diff --git a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc index 91c73a6f98b9244429b0e80eb907e607b97d062f..0206becfa45c434dda2b9282d28c9140d0ba3f80 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc +++ b/Simulation/ISF/ISF_Core/ISF_Event/ISF_Event/TruthBinding.icc @@ -59,21 +59,33 @@ namespace ISF { const auto rhsTruth = rhs.getTruthParticle(); if (m_truthParticle && rhsTruth) { +#ifdef HEPMC3 + pass &= (m_truthParticle == rhsTruth); +#else pass &= *m_truthParticle == *rhsTruth; +#endif } else { return false; } const auto rhsPrimary = rhs.getPrimaryTruthParticle(); if (m_primaryTruthParticle && rhsPrimary) { +#ifdef HEPMC3 + pass &= (m_primaryTruthParticle == rhsPrimary); +#else pass &= *m_primaryTruthParticle == *rhsPrimary; +#endif } else { return false; } const auto rhsGenZero = rhs.getGenerationZeroTruthParticle(); if (m_generationZeroTruthParticle && rhsGenZero) { +#ifdef HEPMC3 + pass &= (m_generationZeroTruthParticle == rhsGenZero); +#else pass &= *m_generationZeroTruthParticle == *rhsGenZero; +#endif } else { return false; } diff --git a/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx b/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx index 4c8aa3f2b174d8212a787254c2141a54cc5e74c7..68b924af61e8479986ab2c2968f5bfa80f5b6c6b 100644 --- a/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Event/src/ISFTruthIncident.cxx @@ -164,13 +164,17 @@ void ISF::ISFTruthIncident::setAllChildrenBarcodes(Barcode::ParticleBarcode bc) /** return attached truth particle */ HepMC::GenParticlePtr ISF::ISFTruthIncident::getHepMCTruthParticle( const ISF::ISFParticle& particle ) const { auto* truthBinding = particle.getTruthBinding(); - auto* hepTruthParticle = truthBinding ? truthBinding->getTruthParticle() : nullptr; + HepMC::GenParticlePtr hepTruthParticle = truthBinding ? truthBinding->getTruthParticle() : nullptr; // HepMC::GenParticle not in TruthBinding -> see if the HepMcParticleLink can retrieve it if (!hepTruthParticle) { const HepMcParticleLink* oldHMPL = particle.getParticleLink(); if (oldHMPL && oldHMPL->cptr()) +#ifdef HEPMC3 + hepTruthParticle = std::shared_ptr<HepMC3::GenParticle>(const_cast<HepMC3::GenParticle*>(oldHMPL->cptr())); +#else hepTruthParticle = const_cast<HepMC::GenParticlePtr>(oldHMPL->cptr()); +#endif } return hepTruthParticle; @@ -181,14 +185,14 @@ HepMC::GenParticlePtr ISF::ISFTruthIncident::getHepMCTruthParticle( const ISF::I HepMC::GenParticlePtr ISF::ISFTruthIncident::updateHepMCTruthParticle( ISF::ISFParticle& particle, const ISF::ISFParticle* parent ) const { auto* truthBinding = particle.getTruthBinding(); - auto* hepTruthParticle = ParticleHelper::convert( particle ); + HepMC::GenParticlePtr hepTruthParticle = ParticleHelper::convert( particle ); if (truthBinding) { truthBinding->setTruthParticle(hepTruthParticle); } else { - auto* parentTruthBinding = parent ? parent->getTruthBinding() : nullptr; - auto* hepPrimaryParticle = parentTruthBinding ? parentTruthBinding->getPrimaryTruthParticle() : nullptr; - auto* hepGenZeroParticle = hepTruthParticle; + auto parentTruthBinding = parent ? parent->getTruthBinding() : nullptr; + auto hepPrimaryParticle = parentTruthBinding ? parentTruthBinding->getPrimaryTruthParticle() : nullptr; + auto hepGenZeroParticle = hepTruthParticle; truthBinding = new TruthBinding( hepTruthParticle, hepPrimaryParticle, hepGenZeroParticle ); particle.setTruthBinding(truthBinding); } diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx index d1fb4dbc389630b7fe49c9e46b07db1fd702eb91..02a3746d867e555a0f866d651925fea67af67188 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx @@ -154,7 +154,7 @@ ISF::InputConverter::convert(const McEventCollection& inputGenEvents, const auto passedGenParticles = getSelectedParticles(*eventPtr, legacyOrdering); for ( auto& genPartPtr : passedGenParticles ) { - ATH_MSG_VERBOSE("Picking up following GenParticle for conversion to ISFParticle: " << *genPartPtr); + ATH_MSG_VERBOSE("Picking up following GenParticle for conversion to ISFParticle: " << genPartPtr); auto simParticlePtr = convertParticle(genPartPtr, kindOfCollection); if (!simParticlePtr) { ATH_MSG_ERROR("Error while trying to convert input generator particles. Aborting."); @@ -227,50 +227,49 @@ ISF::InputConverter::getSelectedParticles(const HepMC::GenEvent& evnt, bool lega ISF::ISFParticle* ISF::InputConverter::convertParticle(HepMC::GenParticlePtr genPartPtr, EBC_EVCOLL kindOfCollection) const { if (!genPartPtr) { return nullptr; } - auto& genPart = *genPartPtr; - // @FIXME: set the bunch-crossing identifier for pile-up dynamically - // rather than a constant '1' (e.g. could use GenEvent index for that?) - const int bcid = (kindOfCollection==EBC_MAINEVCOLL) ? 0 : 1; - - HepMC::GenVertexPtr pVertex = genPart.production_vertex(); + auto pVertex = genPartPtr->production_vertex(); if (!pVertex) { - ATH_MSG_ERROR("Unable to convert following generator particle due to missing " - << "production vertex: " << genPart); + ATH_MSG_ERROR("Unable to convert following generator particle due to missing production vertex for: " << genPartPtr); + return nullptr; + } + auto parentEvent = genPartPtr->parent_event(); + if(!parentEvent) { + ATH_MSG_ERROR("Cannot convert a GenParticle without a parent GenEvent into an ISFParticle!!!"); return nullptr; } - const Amg::Vector3D pos(pVertex->position().x(), pVertex->position().y(), pVertex->position().z()); - const auto& pMomentum(genPart.momentum()); + const auto& pMomentum(genPartPtr->momentum()); const Amg::Vector3D mom(pMomentum.px(), pMomentum.py(), pMomentum.pz()); - const double pMass = this->getParticleMass(genPart); - +#ifdef HEPMC3 + const double pMass = this->getParticleMass(genPartPtr); +#else + const double pMass = this->getParticleMass(*genPartPtr); +#endif double e=pMomentum.e(); if(e>1) { //only test for >1 MeV in momentum double px=pMomentum.px(); double py=pMomentum.py(); double pz=pMomentum.pz(); - double teste=sqrt(px*px + py*py + pz*pz + pMass*pMass); - if(std::abs(e-teste)/e>0.01) { - ATH_MSG_WARNING("Difference in energy for: " << genPart<<" Morg="<<pMomentum.m()<<" Mmod="<<pMass<<" Eorg="<<e<<" Emod="<<teste); + double teste=std::sqrt(px*px + py*py + pz*pz + pMass*pMass); + if(std::abs(e-teste)>0.01*e) { + ATH_MSG_WARNING("Difference in energy for: " << genPartPtr<<" Morg="<<pMomentum.m()<<" Mmod="<<pMass<<" Eorg="<<e<<" Emod="<<teste); } } - const int pPdgId = genPart.pdg_id(); + const int pPdgId = genPartPtr->pdg_id(); const double charge = HepPDT::ParticleID(pPdgId).charge(); const double pTime = pVertex->position().t() / Gaudi::Units::c_light; /// particle origin (TODO: add proper GeoID, collision/cosmics) DetRegionSvcIDPair origin(AtlasDetDescr::fUndefinedAtlasRegion, ISF::fEventGeneratorSimID); - const auto pBarcode = HepMC::barcode(genPart); + const auto pBarcode = HepMC::barcode(genPartPtr); auto tBinding = std::make_unique<ISF::TruthBinding>(genPartPtr); + // @FIXME: set the bunch-crossing identifier for pile-up dynamically + // rather than a constant '1' (e.g. could use GenEvent index for that?) + const int bcid = (kindOfCollection==EBC_MAINEVCOLL) ? 0 : 1; - auto *parentEvent = genPart.parent_event(); - if(!parentEvent) { - ATH_MSG_ERROR("Cannot convert a GenParticle without a parent GenEvent into an ISFParticle!!!"); - return nullptr; - } - auto hmpl = std::make_unique<HepMcParticleLink>(&genPart, parentEvent->event_number(), kindOfCollection); + auto hmpl = std::make_unique<HepMcParticleLink>(genPartPtr, parentEvent->event_number(), kindOfCollection); auto sParticle = std::make_unique<ISF::ISFParticle>( std::move(pos), std::move(mom), pMass, @@ -540,7 +539,7 @@ G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(const ISF::ISFParti ATH_MSG_VERBOSE( "Detected primary particle with end vertex." ); ATH_MSG_VERBOSE( "Will add the primary particle set on." ); ATH_MSG_VERBOSE( "ISF Particle: " << isp ); - ATH_MSG_VERBOSE( "Primary Particle: " << *genpart ); + ATH_MSG_VERBOSE( "Primary Particle: " << genpart ); ATH_MSG_VERBOSE( "Number of daughters of "<<genpart->barcode()<<": " << genpart->end_vertex()->particles_out_size() ); } else { @@ -549,19 +548,22 @@ G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(const ISF::ISFParti ATH_MSG_WARNING( "yet validated - you'd better know what you're doing. Will add the primary" ); ATH_MSG_WARNING( "particle set on." ); ATH_MSG_WARNING( "ISF Particle: " << isp ); - ATH_MSG_WARNING( "Primary Particle: " << *genpart ); + ATH_MSG_WARNING( "Primary Particle: " << genpart ); ATH_MSG_WARNING( "Number of daughters of "<<genpart->barcode()<<": " << genpart->end_vertex()->particles_out_size() ); } // Add all necessary daughter particles - for ( auto daughterIter=genpart->end_vertex()->particles_out_const_begin(); - daughterIter!=genpart->end_vertex()->particles_out_const_end(); ++daughterIter ) { + for ( auto daughter: *(genpart->end_vertex())) { if(m_quasiStableParticlesIncluded) { - ATH_MSG_VERBOSE ( "Attempting to add daughter particle of "<<HepMC::barcode(genpart)<<": " << **daughterIter ); + ATH_MSG_VERBOSE ( "Attempting to add daughter particle of "<<HepMC::barcode(genpart)<<": " << daughter ); } else { - ATH_MSG_WARNING ( "Attempting to add daughter particle of "<<HepMC::barcode(genpart)<<": " << **daughterIter ); + ATH_MSG_WARNING ( "Attempting to add daughter particle of "<<HepMC::barcode(genpart)<<": " << daughter ); } - G4PrimaryParticle *daughterG4Particle = this->getG4PrimaryParticle( **daughterIter ); +#ifdef HEPMC3 + G4PrimaryParticle *daughterG4Particle = this->getG4PrimaryParticle( daughter ); +#else + G4PrimaryParticle *daughterG4Particle = this->getG4PrimaryParticle( *daughter ); +#endif if(!daughterG4Particle) { ATH_MSG_ERROR("Bailing out of loop over daughters of particle with barcode: "<<HepMC::barcode(genpart) << " due to errors - will not return G4Particle."); @@ -616,7 +618,7 @@ G4PrimaryParticle* ISF::InputConverter::getG4PrimaryParticle(const ISF::ISFParti } } - genpart->set_momentum(CLHEP::HepLorentzVector(px,py,pz,pe)); + genpart->set_momentum(HepMC::FourVector(px,py,pz,pe)); } // Truth was detected ATH_MSG_VERBOSE("PrimaryParticleInformation:"); diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx index 5ae0ceca71c4b4cb42a7c03db70c66f167f1ed80..041a868249c8b940a2f8a52b0cc7b9ec47080668 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Services/src/TruthSvc.cxx @@ -500,11 +500,8 @@ void ISF::TruthSvc::setSharedChildParticleBarcode( ISF::ITruthIncident& ti) cons int ISF::TruthSvc::maxGeneratedParticleBarcode(HepMC::GenEvent *genEvent) const { int maxBarcode=0; const int firstSecondaryParticleBarcode(m_barcodeSvc->secondaryParticleBcOffset()); - HepMC::GenEvent::particle_const_iterator currentGenParticleIter; - for (currentGenParticleIter= genEvent->particles_begin(); - currentGenParticleIter!= genEvent->particles_end(); - ++currentGenParticleIter) { - const int barcode((*currentGenParticleIter)->barcode()); + for (auto currentGenParticle: *genEvent) { + const int barcode=HepMC::barcode(currentGenParticle); if(barcode > maxBarcode && barcode < firstSecondaryParticleBarcode) { maxBarcode=barcode; } } return maxBarcode; diff --git a/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx b/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx index 17813c67825ba28e507970a03bd22fb37ae5ef1d..a5323da69977a4e5773baaae2d83c2b6df30878f 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx @@ -39,6 +39,7 @@ // HepMC #include "AtlasHepMC/GenParticle.h" #include "AtlasHepMC/GenVertex.h" +#include "AtlasHepMC/Operators.h" #include "GeneratorObjects/HepMcParticleLink.h" #include "GeneratorObjects/McEventCollection.h" @@ -62,7 +63,11 @@ class MockFilterTool : public AthAlgTool, virtual ~MockFilterTool() {}; // mock method which will be called by tested code +#ifdef HEPMC3 + MOCK_CONST_METHOD1(pass, bool(HepMC::ConstGenParticlePtr)); +#else MOCK_CONST_METHOD1(pass, bool(const HepMC::GenParticle&)); +#endif }; DECLARE_COMPONENT( MockFilterTool ) @@ -165,7 +170,11 @@ TEST_F(InputConverter_test, convertParticle_without_production_vertex) { ); ISF::ISFParticle* expected = nullptr; ASSERT_EQ( expected, convertParticle(genPart, EBC_FIRSTPUEVCOLL) ); +#ifdef HEPMC3 + //When compiled with HepMC3, genPart is smart pointer +#else delete genPart; +#endif } @@ -177,16 +186,16 @@ TEST_F(InputConverter_test, convertParticle_using_generated_mass) { HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12); // dynamic allocation necessary as particle ownership is // handed over to a HepMC::GenVertex later - HepMC::GenParticlePtr genPart = new HepMC::GenParticle(mom, + HepMC::GenParticlePtr genPart = HepMC::newGenParticlePtr(mom, 11, // pdg id (e-) 1 // status ); genPart->set_generated_mass(1234.56); - genPart->suggest_barcode(particleBarcode); + HepMC::suggest_barcode(genPart,particleBarcode); HepMC::FourVector pos(9.8, 7.65, 4.3, 0.321); // NB: 4th component is time*c int vtx_id = -123; - HepMC::GenVertexPtr prodVtx = new HepMC::GenVertex(pos, vtx_id); + HepMC::GenVertexPtr prodVtx = HepMC::newGenVertexPtr(pos, vtx_id); prodVtx->add_particle_out(genPart); // create dummy input McEventCollection containing a dummy GenEvent @@ -237,7 +246,7 @@ TEST_F(InputConverter_test, convertParticle_using_particleDataTable_photon) { 1 // status ); genPart->set_generated_mass(1234.56); // should be ignored later on - genPart->suggest_barcode(particleBarcode); + HepMC::suggest_barcode(genPart,particleBarcode); HepMC::FourVector pos(9.8, 7.65, 4.3, 0.321); // NB: 4th component is time*c int vtx_id = -123; @@ -291,7 +300,7 @@ TEST_F(InputConverter_test, convertParticle_using_particleDataTable_electron) { 1 // status ); genPart->set_generated_mass(1234.56); // should be ignored later on - genPart->suggest_barcode(particleBarcode); + HepMC::suggest_barcode(genPart,particleBarcode); HepMC::FourVector pos(9.8, 7.65, 4.3, 0.321); // NB: 4th component is time*c int vtx_id = -123; @@ -337,7 +346,11 @@ TEST_F(InputConverter_test, convertParticle_using_particleDataTable_electron) { TEST_F(InputConverter_test, passesFilters_empty_filters_defaultconstructed_genpart) { ASSERT_TRUE( m_svc->initialize().isSuccess() ); +#ifdef HEPMC3 + auto genPart=HepMC::newGenParticlePtr(); +#else const HepMC::GenParticle genPart{}; +#endif ASSERT_TRUE( passesFilters(genPart) ); } @@ -347,15 +360,24 @@ TEST_F(InputConverter_test, passesFilters_empty_filters) { const int particleBarcode(546); HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12); +#ifdef HEPMC3 + //It seems this test makes no sense for HepMC3 + HepMC::GenParticlePtr genPart=HepMC::newGenParticlePtr(mom, + 11, // pdg id (e-) + 1 // status + ); + ASSERT_TRUE( true ); +#else HepMC::GenParticle genPart(mom, 11, // pdg id (e-) 1 // status ); genPart.set_generated_mass(1234.56); - genPart.suggest_barcode(particleBarcode); + HepMC::suggest_barcode( genPart,particleBarcode); const HepMC::GenParticle constGenPart(std::move(genPart)); ASSERT_TRUE( passesFilters(constGenPart) ); +#endif } @@ -368,7 +390,11 @@ TEST_F(InputConverter_test, passesFilters_one_pass_filter) { ASSERT_EQ (genParticleFilters.size(), expectedSize); MockFilterTool* filterTool = dynamic_cast<MockFilterTool*>(&*(genParticleFilters[0])); ASSERT_TRUE( filterTool ); +#ifdef HEPMC3 + HepMC::ConstGenParticlePtr genPart{}; +#else const HepMC::GenParticle genPart{}; +#endif HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12); HepMC::GenParticle genPart2(mom, 11, // pdg id (e-) @@ -392,7 +418,11 @@ TEST_F(InputConverter_test, passesFilters_one_nonpass_filter) { MockFilterTool* filterTool = dynamic_cast<MockFilterTool*>(&*(genParticleFilters[0])); ASSERT_TRUE( filterTool ); +#ifdef HEPMC3 + HepMC::ConstGenParticlePtr genPart{}; +#else const HepMC::GenParticle genPart{}; +#endif HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12); HepMC::GenParticle genPart2(mom, 11, // pdg id (e-) @@ -418,7 +448,11 @@ TEST_F(InputConverter_test, passesFilters_two_filters) { MockFilterTool* filterTool2 = dynamic_cast<MockFilterTool*>(&*(genParticleFilters[1])); ASSERT_TRUE( filterTool2 ); +#ifdef HEPMC3 + HepMC::ConstGenParticlePtr genPart{}; +#else const HepMC::GenParticle genPart{}; +#endif HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12); HepMC::GenParticle genPart2(mom, 11, // pdg id (e-) diff --git a/Simulation/ISF/ISF_Core/ISF_Services/test/TruthSvc_test.cxx b/Simulation/ISF/ISF_Core/ISF_Services/test/TruthSvc_test.cxx index d84da3d267a51187176bfb48ca71c8c40dd9d843..f3d593c8f8dfd7b1d935265dd8db399ef5d8b76c 100644 --- a/Simulation/ISF/ISF_Core/ISF_Services/test/TruthSvc_test.cxx +++ b/Simulation/ISF/ISF_Core/ISF_Services/test/TruthSvc_test.cxx @@ -272,9 +272,11 @@ namespace ISFTesting { const int event_number1(17); const int pdgid1(-13); const int pdgid2(13); - std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(process_id1, event_number1); + std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(); + anEvent->set_event_number(event_number1); + HepMC::set_signal_process_id(anEvent.get(),process_id1); const CLHEP::HepLorentzVector myPos( 0.0, 0.0, 0.0, 0.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); const HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, pdgid1, 2); myVertex->add_particle_in(inParticle1); @@ -288,7 +290,7 @@ namespace ISFTesting { HepMC::GenParticlePtr inParticle4 = HepMC::newGenParticlePtr(fourMomentum4, pdgid2, 1); myVertex->add_particle_out(inParticle4); anEvent->add_vertex( myVertex ); - anEvent->set_signal_process_vertex( myVertex ); + HepMC::set_signal_process_vertex(anEvent.get(), myVertex ); anEvent->set_beam_particles(inParticle1,inParticle2); MockTruthIncident ti(AtlasDetDescr::fAtlasID, 2); @@ -298,7 +300,7 @@ namespace ISFTesting { .WillOnce(::testing::Return(21)); EXPECT_CALL(ti, parentBarcode()) .Times(1) - .WillOnce(::testing::Return(inParticle3->barcode())); + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))); EXPECT_CALL(ti, parentParticle()) .Times(1) .WillOnce(::testing::Return(inParticle3)); @@ -306,10 +308,16 @@ namespace ISFTesting { ASSERT_EQ( vtxPosition, generated->position() ); ASSERT_EQ( 1021, generated->id() ); - ASSERT_EQ( -200001, generated->barcode() ); + ASSERT_EQ( -200001, HepMC::barcode(generated) ); +#ifdef HEPMC3 + ASSERT_EQ( 1, generated->particles_in().size()); + ASSERT_EQ( 0, generated->particles_out().size()); + ASSERT_EQ( inParticle3, *(generated->particles_in().cbegin())); +#else ASSERT_EQ( 1, generated->particles_in_size()); ASSERT_EQ( 0, generated->particles_out_size()); ASSERT_EQ( inParticle3, *(generated->particles_in_const_begin())); +#endif } @@ -320,9 +328,11 @@ namespace ISFTesting { const int event_number1(17); const int pdgid1(-13); const int pdgid2(13); - std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(process_id1, event_number1); + std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(); + anEvent->set_event_number(event_number1); + HepMC::set_signal_process_id(anEvent.get(),process_id1); const CLHEP::HepLorentzVector myPos( 0.0, 0.0, 0.0, 0.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); const HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, pdgid1, 2); myVertex->add_particle_in(inParticle1); @@ -336,7 +346,7 @@ namespace ISFTesting { HepMC::GenParticlePtr inParticle4 = HepMC::newGenParticlePtr(fourMomentum4, pdgid2, 1); myVertex->add_particle_out(inParticle4); anEvent->add_vertex( myVertex ); - anEvent->set_signal_process_vertex( myVertex ); + HepMC::set_signal_process_vertex(anEvent.get(), myVertex ); anEvent->set_beam_particles(inParticle1,inParticle2); MockTruthIncident ti(AtlasDetDescr::fAtlasID, 2); @@ -347,8 +357,8 @@ namespace ISFTesting { .WillOnce(::testing::Return(21)); EXPECT_CALL(ti, parentBarcode()) .Times(2) - .WillOnce(::testing::Return(inParticle3->barcode())) - .WillOnce(::testing::Return(inParticle3->barcode())); + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))) + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))); EXPECT_CALL(ti, parentParticle()) .Times(2) .WillOnce(::testing::Return(inParticle3)) @@ -358,13 +368,19 @@ namespace ISFTesting { .WillOnce(::testing::Return(nullptr)); recordIncidentToMCTruth(ti); - HepMC::GenVertexPtr generated = anEvent->barcode_to_vertex(-200001); //Find a nicer way to get this. + HepMC::GenVertexPtr generated = HepMC::barcode_to_vertex(anEvent.get(),-200001); //Find a nicer way to get this. ASSERT_EQ( vtxPosition, generated->position() ); ASSERT_EQ( 1021, generated->id() ); - ASSERT_EQ( -200001, generated->barcode() ); // by construction at the moment + ASSERT_EQ( -200001, HepMC::barcode(generated) ); // by construction at the moment +#ifdef HEPMC3 + ASSERT_EQ( 1, generated->particles_in().size()); + ASSERT_EQ( 0, generated->particles_out().size()); + ASSERT_EQ( inParticle3, *(generated->particles_in().cbegin())); +#else ASSERT_EQ( 1, generated->particles_in_size()); ASSERT_EQ( 0, generated->particles_out_size()); ASSERT_EQ( inParticle3, *(generated->particles_in_const_begin())); +#endif } @@ -375,9 +391,11 @@ namespace ISFTesting { const int event_number1(17); const int pdgid1(-13); const int pdgid2(13); - std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(process_id1, event_number1); + std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(); + anEvent->set_event_number(event_number1); + HepMC::set_signal_process_id(anEvent.get(),process_id1); const CLHEP::HepLorentzVector myPos( 0.0, 0.0, 0.0, 0.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); const HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, pdgid1, 2); myVertex->add_particle_in(inParticle1); @@ -391,7 +409,7 @@ namespace ISFTesting { HepMC::GenParticlePtr inParticle4 = HepMC::newGenParticlePtr(fourMomentum4, pdgid2, 1); myVertex->add_particle_out(inParticle4); anEvent->add_vertex( myVertex ); - anEvent->set_signal_process_vertex( myVertex ); + HepMC::set_signal_process_vertex(anEvent.get(), myVertex ); anEvent->set_beam_particles(inParticle1,inParticle2); MockTruthIncident ti(AtlasDetDescr::fAtlasID, 2); @@ -400,11 +418,11 @@ namespace ISFTesting { .WillOnce(::testing::Return(21)); EXPECT_CALL(ti, parentBarcode()) .Times(2) - .WillOnce(::testing::Return(inParticle3->barcode())) - .WillOnce(::testing::Return(inParticle3->barcode())); + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))) + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))); registerTruthIncident(ti); - HepMC::GenVertexPtr generated = anEvent->barcode_to_vertex(-200001); //Find a nicer way to get this. + HepMC::GenVertexPtr generated = HepMC::barcode_to_vertex(anEvent.get(),-200001); //Find a nicer way to get this. HepMC::GenVertexPtr expectedVtx(nullptr); ASSERT_EQ( expectedVtx, generated); } @@ -419,9 +437,11 @@ namespace ISFTesting { const int event_number1(17); const int pdgid1(-13); const int pdgid2(13); - std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(process_id1, event_number1); + std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(); + anEvent->set_event_number(event_number1); + HepMC::set_signal_process_id(anEvent.get(),process_id1); const CLHEP::HepLorentzVector myPos( 0.0, 0.0, 0.0, 0.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); const HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, pdgid1, 2); myVertex->add_particle_in(inParticle1); @@ -435,7 +455,7 @@ namespace ISFTesting { HepMC::GenParticlePtr inParticle4 = HepMC::newGenParticlePtr(fourMomentum4, pdgid2, 1); myVertex->add_particle_out(inParticle4); anEvent->add_vertex( myVertex ); - anEvent->set_signal_process_vertex( myVertex ); + HepMC::set_signal_process_vertex(anEvent.get(), myVertex ); anEvent->set_beam_particles(inParticle1,inParticle2); MockTruthIncident ti(AtlasDetDescr::fAtlasID, 2); @@ -446,21 +466,27 @@ namespace ISFTesting { .WillOnce(::testing::Return(21)); EXPECT_CALL(ti, parentBarcode()) .Times(3) - .WillOnce(::testing::Return(inParticle3->barcode())) - .WillOnce(::testing::Return(inParticle3->barcode())) - .WillOnce(::testing::Return(inParticle3->barcode())); + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))) + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))) + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))); EXPECT_CALL(ti, parentParticle()) .Times(1) .WillOnce(::testing::Return(inParticle3)); registerTruthIncident(ti); - HepMC::GenVertexPtr generated = anEvent->barcode_to_vertex(-200001); //Find a nicer way to get this. + HepMC::GenVertexPtr generated = HepMC::barcode_to_vertex(anEvent.get(),-200001); //Find a nicer way to get this. ASSERT_EQ( vtxPosition, generated->position() ); ASSERT_EQ( 1021, generated->id() ); - ASSERT_EQ( -200001, generated->barcode() ); // by construction at the moment + ASSERT_EQ( -200001, HepMC::barcode(generated) ); // by construction at the moment +#ifdef HEPMC3 + ASSERT_EQ( 1, generated->particles_in().size()); + ASSERT_EQ( 0, generated->particles_out().size()); + ASSERT_EQ( inParticle3, *(generated->particles_in().cbegin())); +#else ASSERT_EQ( 1, generated->particles_in_size()); ASSERT_EQ( 0, generated->particles_out_size()); ASSERT_EQ( inParticle3, *(generated->particles_in_const_begin())); +#endif } @@ -482,9 +508,11 @@ namespace ISFTesting { const int event_number1(17); const int pdgid1(-13); const int pdgid2(13); - std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(process_id1, event_number1); + std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(); + anEvent->set_event_number(event_number1); + HepMC::set_signal_process_id(anEvent.get(),process_id1); const CLHEP::HepLorentzVector myPos( 0.0, 0.0, 0.0, 0.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); const HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, pdgid1, 2); myVertex->add_particle_in(inParticle1); @@ -498,7 +526,7 @@ namespace ISFTesting { HepMC::GenParticlePtr inParticle4 = HepMC::newGenParticlePtr(fourMomentum4, pdgid2, 1); myVertex->add_particle_out(inParticle4); anEvent->add_vertex( myVertex ); - anEvent->set_signal_process_vertex( myVertex ); + HepMC::set_signal_process_vertex(anEvent.get(), myVertex ); anEvent->set_beam_particles(inParticle1,inParticle2); @@ -510,9 +538,9 @@ namespace ISFTesting { .WillOnce(::testing::Return(21)); EXPECT_CALL(ti, parentBarcode()) .Times(3) - .WillOnce(::testing::Return(inParticle3->barcode())) - .WillOnce(::testing::Return(inParticle3->barcode())) - .WillOnce(::testing::Return(inParticle3->barcode())); + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))) + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))) + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))); EXPECT_CALL(ti, parentParticle()) .Times(1) .WillOnce(::testing::Return(inParticle3)); @@ -524,13 +552,19 @@ namespace ISFTesting { .WillOnce(::testing::Return(false)); registerTruthIncident(ti); - HepMC::GenVertexPtr generated = anEvent->barcode_to_vertex(-200001); //Find a nicer way to get this. + HepMC::GenVertexPtr generated = HepMC::barcode_to_vertex(anEvent.get(),-200001); //Find a nicer way to get this. ASSERT_EQ( vtxPosition, generated->position() ); ASSERT_EQ( 1021, generated->id() ); - ASSERT_EQ( -200001, generated->barcode() ); // by construction at the moment + ASSERT_EQ( -200001, HepMC::barcode(generated) ); // by construction at the moment +#ifdef HEPMC3 + ASSERT_EQ( 1, generated->particles_in().size()); + ASSERT_EQ( 0, generated->particles_out().size()); + ASSERT_EQ( inParticle3, *(generated->particles_in().cbegin())); +#else ASSERT_EQ( 1, generated->particles_in_size()); ASSERT_EQ( 0, generated->particles_out_size()); ASSERT_EQ( inParticle3, *(generated->particles_in_const_begin())); +#endif } @@ -549,9 +583,11 @@ namespace ISFTesting { const int event_number1(17); const int pdgid1(-13); const int pdgid2(13); - std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(process_id1, event_number1); + std::unique_ptr<HepMC::GenEvent> anEvent = std::make_unique<HepMC::GenEvent>(); + anEvent->set_event_number(event_number1); + HepMC::set_signal_process_id(anEvent.get(),process_id1); const CLHEP::HepLorentzVector myPos( 0.0, 0.0, 0.0, 0.0); - HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( myPos, -1 ); + HepMC::GenVertexPtr myVertex = HepMC::newGenVertexPtr( HepMC::FourVector(myPos.x(),myPos.y(),myPos.z(),myPos.t()), -1 ); const HepMC::FourVector fourMomentum1( 0.0, 0.0, 1.0, 1.0*CLHEP::TeV); HepMC::GenParticlePtr inParticle1 = HepMC::newGenParticlePtr(fourMomentum1, pdgid1, 2); myVertex->add_particle_in(inParticle1); @@ -565,10 +601,10 @@ namespace ISFTesting { HepMC::GenParticlePtr inParticle4 = HepMC::newGenParticlePtr(fourMomentum4, pdgid2, 1); myVertex->add_particle_out(inParticle4); anEvent->add_vertex( myVertex ); - anEvent->set_signal_process_vertex( myVertex ); + HepMC::set_signal_process_vertex(anEvent.get(), myVertex ); anEvent->set_beam_particles(inParticle1,inParticle2); HepMC::GenParticlePtr inParticle5 = HepMC::newGenParticlePtr(fourMomentum3, pdgid1, 1); - inParticle5->suggest_barcode(1010003); + HepMC::suggest_barcode(inParticle5,1010003); inParticle5->set_status(1); MockTruthIncident ti(AtlasDetDescr::fAtlasID, 2); @@ -579,9 +615,9 @@ namespace ISFTesting { .WillOnce(::testing::Return(21)); EXPECT_CALL(ti, parentBarcode()) .Times(3) - .WillOnce(::testing::Return(inParticle3->barcode())) - .WillOnce(::testing::Return(inParticle3->barcode())) - .WillOnce(::testing::Return(inParticle3->barcode())); + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))) + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))) + .WillOnce(::testing::Return(HepMC::barcode(inParticle3))); EXPECT_CALL(ti, parentParticle()) .Times(2) .WillOnce(::testing::Return(inParticle3)) @@ -597,14 +633,21 @@ namespace ISFTesting { .WillOnce(::testing::Return(true)); registerTruthIncident(ti); - HepMC::GenVertexPtr generated = anEvent->barcode_to_vertex(-200001); //Find a nicer way to get this. + HepMC::GenVertexPtr generated = HepMC::barcode_to_vertex(anEvent.get(),-200001); //Find a nicer way to get this. ASSERT_EQ( vtxPosition, generated->position() ); ASSERT_EQ( 1021, generated->id() ); - ASSERT_EQ( -200001, generated->barcode() ); // by construction at the moment + ASSERT_EQ( -200001, HepMC::barcode(generated) ); // by construction at the moment +#ifdef HEPMC3 + ASSERT_EQ( 1, generated->particles_in().size()); + ASSERT_EQ( inParticle3, *(generated->particles_in().cbegin())); + ASSERT_EQ( 1, generated->particles_out().size()); + ASSERT_EQ( inParticle5, *(generated->particles_out().cbegin())); +#else ASSERT_EQ( 1, generated->particles_in_size()); ASSERT_EQ( inParticle3, *(generated->particles_in_const_begin())); ASSERT_EQ( 1, generated->particles_out_size()); ASSERT_EQ( inParticle5, *(generated->particles_out_const_begin())); +#endif } //TODO Add tests for the following cases: diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFTrajectory.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFTrajectory.cxx index ae443c2c671facec8b09193eb53644b850ea0411..a4bcb087f9768c8e9581b7ea4288df929e99f7d8 100644 --- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFTrajectory.cxx +++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/ISFTrajectory.cxx @@ -113,7 +113,7 @@ void iGeant4::ISFTrajectory::AppendStep(const G4Step* aStep) // make sure that the TruthBinding of the ISFParticle points to the newest // HepMC::GenParticle instance in case it got updated by the // ITruthSvc::registerTruthIncident call above - auto* currentGenPart = atlasG4EvtUserInfo->GetCurrentlyTraced(); + auto currentGenPart = atlasG4EvtUserInfo->GetCurrentlyTraced(); baseIsp->getTruthBinding()->setTruthParticle( currentGenPart ); Barcode::ParticleBarcode newBarcode = HepMC::barcode(currentGenPart); baseIsp->setBarcode( newBarcode ); diff --git a/Tools/PyJobTransforms/test/test_HelloWorldTrf.sh b/Tools/PyJobTransforms/test/test_HelloWorldTrf.sh index 989703b84fb3081e8da2dd58237c54d63bd5d0c4..af1afb31f1628a8710f1f11c13e9a30e83a30e21 100755 --- a/Tools/PyJobTransforms/test/test_HelloWorldTrf.sh +++ b/Tools/PyJobTransforms/test/test_HelloWorldTrf.sh @@ -2,6 +2,9 @@ set -e +mkdir -p test_HelloWorldTrf +cd test_HelloWorldTrf + # ST test HelloWorld_tf.py --maxEvents=5 --CA diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IBetheHeitlerEffects.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IBetheHeitlerEffects.h index 029d8860859bcb8f0b3ccc936315913c7a59cf31..8af03a16a9e7037318df80089e49e789bd1bcfb6 100644 --- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IBetheHeitlerEffects.h +++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IBetheHeitlerEffects.h @@ -16,13 +16,9 @@ #include "GaudiKernel/IAlgTool.h" #include "GaudiKernel/ToolHandle.h" - +#include "TrkMultiComponentStateOnSurface/ComponentParameters.h" #include "TrkEventPrimitives/ParticleHypothesis.h" #include "TrkEventPrimitives/PropDirection.h" -#include "TrkMultiComponentStateOnSurface/MultiComponentState.h" - -#include <Eigen/StdVector> -#include <memory> namespace Trk { struct GSFEnergyLossCache diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx index afef29f20f45ef69d7c37a7b60ecd1811255d6af..77bada201f6e21ab29fcce823e56058cfa57c81f 100644 --- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx +++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx @@ -87,9 +87,9 @@ Trk::GaussianSumFitter::initialize() "Trk::ParticleHypothesis: " << m_overideMaterialEffects); } - if( m_maximumNumberOfComponents > 16){ - ATH_MSG_FATAL("Requested MaximumNumberOfComponents > 16"); - return StatusCode::FAILURE; + if (m_maximumNumberOfComponents > 16) { + ATH_MSG_FATAL("Requested MaximumNumberOfComponents > 16"); + return StatusCode::FAILURE; } // Initialise the closest track parameters search algorithm Amg::Vector3D referencePosition(m_sortingReferencePoint[0], @@ -207,8 +207,6 @@ Trk::GaussianSumFitter::fit( ++measurementOnTrack) { if (!(*measurementOnTrack)) { - ATH_MSG_DEBUG("This track contains an empty MeasurementBase object... " - "Ignoring object"); continue; } @@ -219,17 +217,12 @@ Trk::GaussianSumFitter::fit( } if (!rioOnTrack) { - ATH_MSG_DEBUG( - "Measurement could not be cast as a RIO_OnTrack object... continuing"); continue; } const PrepRawData* prepRawData = rioOnTrack->prepRawData(); if (!prepRawData) { - ATH_MSG_DEBUG( - "Defined RIO_OnTrack object has no associated PrepRawData object..." - << "this object will be ignored in fit"); continue; } @@ -293,7 +286,6 @@ Trk::GaussianSumFitter::fit( particleHypothesis); if (!forwardTrajectory || forwardTrajectory->empty()) { - ATH_MSG_DEBUG("Forward GSF fit failed... Exiting!"); ++m_ForwardFailure; return nullptr; } @@ -304,7 +296,6 @@ Trk::GaussianSumFitter::fit( // Protect against failed smoother fit if (!smoothedTrajectory) { - ATH_MSG_DEBUG("Smoother GSF fit failed... Exiting!"); ++m_SmootherFailure; return nullptr; } @@ -312,7 +303,6 @@ Trk::GaussianSumFitter::fit( // Outlier m_logic and track finalisation std::unique_ptr<FitQuality> fitQuality = buildFitQuality(*smoothedTrajectory); if (!fitQuality) { - ATH_MSG_DEBUG("Chi squared could not be calculated... Bailing"); ++m_fitQualityFailure; return nullptr; } @@ -321,12 +311,9 @@ Trk::GaussianSumFitter::fit( const Trk::MultiComponentStateOnSurface* perigeeMultiStateOnSurface = makePerigee( ctx, extrapolatorCache, *smoothedTrajectory, particleHypothesis); - ATH_MSG_DEBUG( - "perigeeMultiStateOnSurface :" << perigeeMultiStateOnSurface); if (perigeeMultiStateOnSurface) { smoothedTrajectory->push_back(perigeeMultiStateOnSurface); } else { - ATH_MSG_DEBUG("Perigee asked to be created but failed.....Exiting"); ++m_PerigeeFailure; return nullptr; } @@ -402,9 +389,6 @@ Trk::GaussianSumFitter::fit( } if (!ccot) { cleanedMeasurementSet.push_back(*itSet); - } else { - ATH_MSG_DEBUG( - "The MeasurementBase object is a Trk::CaloCluster_OnTrack"); } } } @@ -436,13 +420,11 @@ Trk::GaussianSumFitter::fit( particleHypothesis); if (!forwardTrajectory) { - ATH_MSG_DEBUG("Forward GSF fit failed... Exiting!"); ++m_ForwardFailure; return nullptr; } if (forwardTrajectory->empty()) { - ATH_MSG_DEBUG("No states in forward trajectory... Exiting!"); ++m_ForwardFailure; return nullptr; } @@ -454,7 +436,6 @@ Trk::GaussianSumFitter::fit( // Protect against failed smoother fit if (!smoothedTrajectory) { - ATH_MSG_DEBUG("Smoother GSF fit failed... Exiting!"); ++m_SmootherFailure; return nullptr; } @@ -463,7 +444,6 @@ Trk::GaussianSumFitter::fit( std::unique_ptr<FitQuality> fitQuality = buildFitQuality(*smoothedTrajectory); if (!fitQuality) { - ATH_MSG_DEBUG("Chi squared could not be calculated... Bailing"); ++m_fitQualityFailure; return nullptr; } @@ -472,13 +452,9 @@ Trk::GaussianSumFitter::fit( const Trk::MultiComponentStateOnSurface* perigeeMultiStateOnSurface = makePerigee( ctx, extrapolatorCache, *smoothedTrajectory, particleHypothesis); - ATH_MSG_DEBUG( - "perigeeMultiStateOnSurface :" << perigeeMultiStateOnSurface); - if (perigeeMultiStateOnSurface) { smoothedTrajectory->push_back(perigeeMultiStateOnSurface); } else { - ATH_MSG_DEBUG("Perigee asked to be created but failed.....Exiting"); ++m_PerigeeFailure; return nullptr; } @@ -529,8 +505,6 @@ Trk::GaussianSumFitter::fit(const EventContext& ctx, /* determine the Track Parameter which is the start of the trajectory, i.e. closest to the reference point */ - ATH_MSG_DEBUG("get track parameters near origin " - << (m_doHitSorting ? "via STL sort" : "from 1st state")); const TrackParameters* estimatedStartParameters = m_doHitSorting ? *(std::min_element(intrk.trackParameters()->begin(), @@ -544,14 +518,10 @@ Trk::GaussianSumFitter::fit(const EventContext& ctx, m_sortingReferencePoint[1], m_sortingReferencePoint[2]); - TrackFitInputPreparator* inputPreparator = - new TrackFitInputPreparator(referencePosition); - - PrepRawDataSet orderedPRDColl = inputPreparator->stripPrepRawData( + TrackFitInputPreparator inputPreparator(referencePosition); + PrepRawDataSet orderedPRDColl = inputPreparator.stripPrepRawData( intrk, addPrdColl, m_doHitSorting, true /* do not lose outliers! */); - delete inputPreparator; - return fit( ctx, orderedPRDColl, *estimatedStartParameters, runOutlier, matEffects); } @@ -711,7 +681,6 @@ Trk::GaussianSumFitter::makePerigee( particleHypothesis); if (stateExtrapolatedToPerigee.empty()) { - ATH_MSG_DEBUG("Track could not be extrapolated to perigee... returning 0"); return nullptr; } @@ -751,7 +720,6 @@ Trk::GaussianSumFitter::makePerigee( nullptr, pattern, modeQoverP); - ATH_MSG_DEBUG("makePerigee() returning sucessfully!"); return perigeeMultiStateOnSurface; } @@ -857,7 +825,6 @@ Trk::GaussianSumFitter::fitPRD( configuredParticleHypothesis); if (!stepIsValid) { - ATH_MSG_DEBUG("Fitter step is not valid... Exiting!"); return nullptr; } } @@ -976,11 +943,7 @@ Trk::GaussianSumFitter::stepForwardFit( false, particleHypothesis); if (extrapolatedState.empty()) { - ATH_MSG_DEBUG("Extrapolation failed... returning false"); return false; - } else { - ATH_MSG_DEBUG( - "Extrapolation worked... state size: " << extrapolatedState.size()); } // ======================= // Measurement Preparation @@ -1016,15 +979,12 @@ Trk::GaussianSumFitter::stepForwardFit( *measurement, *fitQuality); if (updatedState.empty()) { - ATH_MSG_DEBUG("Measurement update of the state failed... Exiting!"); return false; } // Reject hits with excessive Chi2 if (fitQuality->chiSquared() > m_cutChiSquaredPerNumberDOF * fitQuality->numberDoF()) { - ATH_MSG_DEBUG("Update with new measurement caused track to fail Chi " - "Squared test, removing the object"); fitQuality = std::make_unique<FitQuality>(1, 1); std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> type(0); type.set(TrackStateOnSurface::Outlier); @@ -1073,8 +1033,8 @@ Trk::GaussianSumFitter::fit( * In general for things we want to control their lifetime locally * we use unique_ptr * - * For things where we get or pass ownership to a multistate and then continue - * to use them we opt for const ptr* for now. + * For things where we will not really own, but we need to point at + * we opt for const ptr* */ auto smoothedTrajectory = std::make_unique<Trk::SmoothedTrajectory>(); auto smootherPredictionMultiState = @@ -1083,12 +1043,11 @@ Trk::GaussianSumFitter::fit( * Get the initial smoother prediction. It is the last prediction in the * forwards trajectory */ - /* these can be owned by the input so const ptr*/ + + // these can be owned by the input so const ptr*/ const Trk::TrackStateOnSurface* smootherPredictionStateOnSurface = forwardTrajectory.back(); - /* - * We can have single or Multi components here, so we choose what to clone - */ + // We can have single or Multi components here, so we choose what to clone const Trk::MultiComponentStateOnSurface* smootherPredictionMultiStateOnSurface = nullptr; @@ -1119,10 +1078,9 @@ Trk::GaussianSumFitter::fit( */ Trk::FitQualityOnSurface fitQuality; /* - * The following 2 pointers if not null will be owned by the + * The following pointer if not null will be owned by the * MultiComponentStateOnSurface* updatedStateOnSurface - * at the end of the code and we need to re-use them. - * So const ptr + * at the end of the code and we need to re-use it */ const Trk::MeasurementBase* firstSmootherMeasurementOnTrack = smootherPredictionStateOnSurface->measurementOnTrack()->clone(); @@ -1138,7 +1096,6 @@ Trk::GaussianSumFitter::fit( fitQuality); if (firstSmoothedState.empty()) { - ATH_MSG_DEBUG("First GSF smoothing update failed... Exiting!"); delete firstSmootherMeasurementOnTrack; return nullptr; } @@ -1513,11 +1470,10 @@ Trk::GaussianSumFitter::addCCOT( } // Build TSOS with CCOT at the surface of the surface of calo - Trk::MultiComponentStateOnSurface* updatedMCSOS = - new Trk::MultiComponentStateOnSurface( - ccot->clone(), - MultiComponentStateHelpers::clone(updatedState).release(), - (std::make_unique<Trk::FitQualityOnSurface>(fitQuality)).release()); + auto updatedMCSOS = std::make_unique<Trk::MultiComponentStateOnSurface>( + ccot->clone(), + MultiComponentStateHelpers::clone(updatedState).release(), + (std::make_unique<Trk::FitQualityOnSurface>(fitQuality)).release()); // Extrapolate back to the surface nearest the origin extrapolatedState = m_extrapolator->extrapolateDirectly(ctx, @@ -1528,7 +1484,6 @@ Trk::GaussianSumFitter::addCCOT( Trk::nonInteracting); if (extrapolatedState.empty()) { - delete updatedMCSOS; return {}; } @@ -1545,8 +1500,8 @@ Trk::GaussianSumFitter::addCCOT( defPar.push_back(locX); Trk::LocalParameters locpars(defPar); - Trk::PseudoMeasurementOnTrack* pseudoMeasurement = - new PseudoMeasurementOnTrack(locpars, covMatrix, *currentSurface); + auto pseudoMeasurement = std::make_unique<Trk::PseudoMeasurementOnTrack>( + locpars, covMatrix, *currentSurface); // Combine the state using and find the mode of the distribution std::unique_ptr<Trk::TrackParameters> combinedState = @@ -1555,14 +1510,15 @@ Trk::GaussianSumFitter::addCCOT( m_updator.fitQuality(extrapolatedState, *ccot)); // Build a TSOS using the dummy measurement and combined state - Trk::MultiComponentStateOnSurface* finalSOS = - new Trk::MultiComponentStateOnSurface( - pseudoMeasurement, - combinedState.release(), - MultiComponentStateHelpers::clone(extrapolatedState).release(), - combinedFitQuality.release()); - smoothedTrajectory.push_back(updatedMCSOS); - smoothedTrajectory.push_back(finalSOS); + auto finalSOS = std::make_unique<Trk::MultiComponentStateOnSurface>( + pseudoMeasurement.release(), + combinedState.release(), + MultiComponentStateHelpers::clone(extrapolatedState).release(), + combinedFitQuality.release()); + + // Pointers owned by the smoothedTrajectory + smoothedTrajectory.push_back(updatedMCSOS.release()); + smoothedTrajectory.push_back(finalSOS.release()); return extrapolatedState; } diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py index e8a6238c17f386e78642bd42d90b09af05f82e71..2d606e035e4607d23c3b9f207d39ca5273f3af5a 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py @@ -8,7 +8,14 @@ log = logging.getLogger("TrigEgammaHypo.TrigEgammaPrecisionElectronHypoTool") from AthenaCommon.SystemOfUnits import GeV from TriggerMenuMT.HLTMenuConfig.Egamma.EgammaDefs import TrigElectronSelectors -def _IncTool(name, threshold, sel): +# isolation cuts +IsolationCut = { + None: None, + 'ivarloose': 0.1, + 'ivarmedium': 0.065, + 'ivartight': 0.05 + } +def _IncTool(name, threshold, sel, iso): log.debug('TrigEgammaPrecisionElectronHypoTool _IncTool("'+name+'", threshold = '+str(threshold) + ', sel = '+str(sel)) @@ -59,6 +66,13 @@ def _IncTool(name, threshold, sel): # No other cuts applied tool.dETACLUSTERthr = 9999. tool.dPHICLUSTERthr = 9999. + + + if iso and iso != '': + if iso not in IsolationCut: + log.error('Isolation cut %s not defined!', iso) + log.debug('Configuring Isolation cut %s with value %d',iso,IsolationCut[iso]) + tool.RelPtConeCut = IsolationCut[iso] return tool @@ -75,10 +89,14 @@ def TrigEgammaPrecisionElectronHypoToolFromDict( d ): def __sel(cpart): return cpart['addInfo'][0] if cpart['addInfo'] else cpart['IDinfo'] + + def __iso(cpart): + return cpart['isoInfo'] + name = d['chainName'] - return _IncTool( name, __th( cparts[0]), __sel( cparts[0] ) ) + return _IncTool( name, __th( cparts[0]), __sel( cparts[0] ), __iso ( cparts[0]) ) diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx index 284c40895c2ce013ed11883e6cccff06a57bad13..2aa52f195167ddd5bbe0615639b5cafcfc7f8fd2 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx @@ -20,6 +20,7 @@ TrigEgammaPrecisionElectronHypoToolInc::TrigEgammaPrecisionElectronHypoToolInc( m_decisionId( HLT::Identifier::fromToolName( name ) ) { declareProperty("ElectronLHSelector" ,m_egammaElectronLHTool ); + declareProperty("RelPtConeCut" ,m_RelPtConeCut=-999.); } StatusCode TrigEgammaPrecisionElectronHypoToolInc::initialize() { @@ -62,24 +63,21 @@ bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionE bool pass = false; - // Likelihood output - std::vector<float> lhval_monitored; - // Lumi monitoring - std::vector<double> avgmu_monitored; - auto ET = Monitored::Scalar( "Et_em" , -1.0 ); - auto dEta = Monitored::Scalar( "dEta", -1. ); + auto dEta = Monitored::Scalar( "dEta", -1. ); auto dPhi = Monitored::Scalar( "dPhi", -1. ); auto etaBin = Monitored::Scalar( "EtaBin", -1. ); - auto monEta = Monitored::Scalar( "Eta", -99. ); + auto monEta = Monitored::Scalar( "Eta", -99. ); auto monPhi = Monitored::Scalar( "Phi", -99. ); auto PassedCuts = Monitored::Scalar<int>( "CutCounter", -1 ); - auto mon_lhval = Monitored::Collection("LikelihoodRatio", lhval_monitored); - auto mon_mu = Monitored::Collection("mu", avgmu_monitored); + auto mon_lhval = Monitored::Scalar("LikelihoodRatio", -99.); + auto mon_mu = Monitored::Scalar("mu", -1.); + auto mon_ptcone20 = Monitored::Scalar("ptcone20", -99.); + auto mon_relptcone20 = Monitored::Scalar("ptcone20", -99.); auto monitorIt = Monitored::Group( m_monTool, dEta, dPhi, etaBin, monEta, - monPhi,PassedCuts,mon_lhval,mon_mu); + monPhi,PassedCuts,mon_lhval,mon_mu, mon_ptcone20, mon_relptcone20); // when leaving scope it will ship data to monTool PassedCuts = PassedCuts + 1; //got called (data in place) @@ -168,14 +166,14 @@ bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionE if(eventInfoDecor.isPresent()) { avg_mu = eventInfoDecor(0); ATH_MSG_DEBUG("Average mu " << avg_mu); - avgmu_monitored.push_back(avg_mu); + mon_mu = avg_mu; asg::AcceptData accept = m_egammaElectronLHTool->accept(ctx,input.electron,avg_mu); pass = (bool) accept; // Monitor the LH value lhval=m_egammaElectronLHTool->calculate(ctx, input.electron,avg_mu); ATH_MSG_DEBUG("LHValue with avgmu " << lhval); - lhval_monitored.push_back(lhval); + mon_lhval = lhval; } else{ ATH_MSG_WARNING("EventInfo decoration not available!"); @@ -184,15 +182,12 @@ bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionE // Monitor the LH value lhval=m_egammaElectronLHTool->calculate(ctx, input.electron); ATH_MSG_DEBUG("LHValue without avgmu " << lhval); - lhval_monitored.push_back(lhval); + mon_lhval = lhval; } - ATH_MSG_DEBUG("AthenaLHSelectorTool: TAccept = " << pass); - - float Rhad1(0), Rhad(0), Reta(0), Rphi(0), e277(0), weta2c(0), //emax2(0), Eratio(0), DeltaE(0), f1(0), weta1c(0), wtot(0), fracm(0); - float ptcone20(999), ptcone30(999), ptcone40(999), etcone20(999), etcone30(999), etcone40(999), topoetcone20(999), topoetcone30(999), topoetcone40(999); + float ptcone20(999), ptcone30(999), ptcone40(999), etcone20(999), etcone30(999), etcone40(999), topoetcone20(999), topoetcone30(999), topoetcone40(999), relptcone20(999); // variables based on HCAL @@ -270,14 +265,33 @@ bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionE ATH_MSG_DEBUG( " topoetcone20 " << topoetcone20 ) ; ATH_MSG_DEBUG( " topoetcone30 " << topoetcone30 ) ; ATH_MSG_DEBUG( " topoetcone40 " << topoetcone40 ) ; - - + // Monitor showershapes + mon_ptcone20 = ptcone20; + relptcone20 = ptcone20/input.electron->pt(); + ATH_MSG_DEBUG("relptcone20 = " <<relptcone20 ); + mon_relptcone20 = relptcone20; + ATH_MSG_DEBUG("m_RelPtConeCut = " << m_RelPtConeCut ); + + // Evaluating lh *after* retrieving variables for monitoing and debuging purposes + ATH_MSG_DEBUG("AthenaLHSelectorTool: TAccept = " << pass); if ( !pass ){ ATH_MSG_DEBUG("REJECT Likelihood failed"); + return pass; } else { ATH_MSG_DEBUG("ACCEPT Likelihood passed"); } + // Check if need to apply isolation + // First check logic. if cut is very negative, then no isolation cut is defined + // if m_RelPtConeCut <-100 then hypo is configured not to apply isolation + if (m_RelPtConeCut < -100){ + ATH_MSG_DEBUG(" not applying isolation. Returning NOW"); + ATH_MSG_DEBUG("TAccept = " << pass); + return pass; + } + // Then, It will pass if relptcone20 is less than cut: + pass = (relptcone20 < m_RelPtConeCut); + // // Reach this point successfully ATH_MSG_DEBUG( "pass = " << pass ); diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h index c4c37d3e3cc903b3ce9ed78f372996d580c5e251..f39964f8e3816eb057b7ac501cc51fc470400ebc 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGEGAMMAHYPO_TRIGPRECISIONELECTRONPRECISIONHYPOTOOLINC_H #define TRIGEGAMMAHYPO_TRIGPRECISIONELECTRONPRECISIONHYPOTOOLINC_H 1 @@ -50,6 +50,9 @@ class TrigEgammaPrecisionElectronHypoToolInc : public extends<AthAlgTool, ITrigE /*Likelihood tool*/ ToolHandle<IAsgElectronLikelihoodTool> m_egammaElectronLHTool; + + /* TRack isolation cut */ + float m_RelPtConeCut; /*Luminosity info*/ SG::ReadDecorHandleKey<xAOD::EventInfo> m_avgMuKey { this, "AveIntPerXKey", "EventInfo.AveIntPerXDecor", "Decoration for Average Interaction Per Crossing" }; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx index f1ac7e20feeb31e6250ffd894d99d26c01a6582a..ce755cd5a87346800587811c945afa1cde9cba88 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaRApproxBoxCutIncl1.cpp @@ -33,7 +33,7 @@ namespace { unsigned int calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = fabs( tob1->eta() - tob2->eta() ); + double deta = std::abs( tob1->eta() - tob2->eta() ); return deta; } } diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx index f9c0909cb06a42998e1d3458ed249dfebb0dc22c..d16a33b25cbe145d45822d0b27ce898b2846e866 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * DisambiguationDetaDPhiIncl3.cpp @@ -128,16 +128,16 @@ TCS::DisambiguationDetaDPhiIncl3::processBitCorrect( const std::vector<TCS::TOBA { if( parType_t((*tob1)->Et()) <= p_MinET1) continue; // ET cut - if( parType_t(fabs((*tob1)->eta())) > p_EtaMax1 ) continue; // Eta cut - if( parType_t(fabs((*tob1)->eta())) < p_EtaMin1 ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) > p_EtaMax1 ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) < p_EtaMin1 ) continue; // Eta cut for( TCS::TOBArray::const_iterator tob2 = input[1]->begin(); tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { if( parType_t((*tob2)->Et()) <= p_MinET2) continue; // ET cut - if( parType_t(fabs((*tob2)->eta())) > p_EtaMax2 ) continue; // Eta cut - if( parType_t(fabs((*tob2)->eta())) < p_EtaMin2 ) continue; // Eta cut + if( parType_t(std::abs((*tob2)->eta())) > p_EtaMax2 ) continue; // Eta cut + if( parType_t(std::abs((*tob2)->eta())) < p_EtaMin2 ) continue; // Eta cut // DeltaPhi cuts unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 ); @@ -151,8 +151,8 @@ TCS::DisambiguationDetaDPhiIncl3::processBitCorrect( const std::vector<TCS::TOBA tob3 != input[2]->end() ; ++tob3) { if( parType_t((*tob3)->Et()) <= p_MinET3) continue; // ET cut - if( parType_t(fabs((*tob3)->eta())) > p_EtaMax3 ) continue; // Eta cut - if( parType_t(fabs((*tob3)->eta())) < p_EtaMin3 ) continue; // Eta cut + if( parType_t(std::abs((*tob3)->eta())) > p_EtaMax3 ) continue; // Eta cut + if( parType_t(std::abs((*tob3)->eta())) < p_EtaMin3 ) continue; // Eta cut unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob3 ); unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2BW( *tob2, *tob3 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { @@ -190,16 +190,16 @@ TCS::DisambiguationDetaDPhiIncl3::process( const std::vector<TCS::TOBArray const { if( parType_t((*tob1)->Et()) <= p_MinET1) continue; // ET cut - if( parType_t(fabs((*tob1)->eta())) > p_EtaMax1 ) continue; // Eta cut - if( parType_t(fabs((*tob1)->eta())) < p_EtaMin1 ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) > p_EtaMax1 ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) < p_EtaMin1 ) continue; // Eta cut for( TCS::TOBArray::const_iterator tob2 = input[1]->begin(); tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { if( parType_t((*tob2)->Et()) <= p_MinET2) continue; // ET cut - if( parType_t(fabs((*tob2)->eta())) > p_EtaMax2 ) continue; // Eta cut - if( parType_t(fabs((*tob2)->eta())) < p_EtaMin2 ) continue; // Eta cut + if( parType_t(std::abs((*tob2)->eta())) > p_EtaMax2 ) continue; // Eta cut + if( parType_t(std::abs((*tob2)->eta())) < p_EtaMin2 ) continue; // Eta cut // DeltaPhi cuts unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 ); @@ -213,8 +213,8 @@ TCS::DisambiguationDetaDPhiIncl3::process( const std::vector<TCS::TOBArray const tob3 != input[2]->end() ; ++tob3) { if( parType_t((*tob3)->Et()) <= p_MinET3) continue; // ET cut - if( parType_t(fabs((*tob3)->eta())) > p_EtaMax3 ) continue; // Eta cut - if( parType_t(fabs((*tob3)->eta())) < p_EtaMin3 ) continue; // Eta cut + if( parType_t(std::abs((*tob3)->eta())) > p_EtaMax3 ) continue; // Eta cut + if( parType_t(std::abs((*tob3)->eta())) < p_EtaMin3 ) continue; // Eta cut unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2( *tob1, *tob3 ); unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2( *tob2, *tob3 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx index ef4d3f5a881a3c96824117de9fccc84cacb18f18..9f75ca7a417fed57785f552552d8bf4068f953c8 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * JetHT.cpp @@ -108,8 +108,8 @@ TCS::JetHT::process( const std::vector<TCS::TOBArray const *> & input, ++tob) { - if( parType_t(fabs((*tob)->eta())) > p_EtaMax ) continue; // Eta cut - if( parType_t(fabs((*tob)->eta())) < p_EtaMin ) continue; // Eta cut + if( parType_t(std::abs((*tob)->eta())) > p_EtaMax ) continue; // Eta cut + if( parType_t(std::abs((*tob)->eta())) < p_EtaMin ) continue; // Eta cut if( parType_t((*tob)->Et()) <= p_MinET ) continue; // E_T cut TRG_MSG_DEBUG("Jet : ET = " << (*tob)->Et()); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetMatch.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetMatch.cxx index 9f1359db89223947654ecc99d2f6e85f1c15583f..6cf7999707f8d6be4191e8cf302e12b7848e7cdf 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetMatch.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetMatch.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * JetMatch.cpp @@ -86,8 +86,8 @@ TCS::JetMatch::process( const std::vector<TCS::TOBArray const *> & input, for( TCS::GenericTOB * tob : *input[0]) { ++objC; - if( parType_t(fabs(tob->eta())) > p_EtaMax ) continue; // Eta cut - if( parType_t(fabs(tob->eta())) < p_EtaMin ) continue; // Eta cut + if( parType_t(std::abs(tob->eta())) > p_EtaMax ) continue; // Eta cut + if( parType_t(std::abs(tob->eta())) < p_EtaMin ) continue; // Eta cut if( tob->EtWide() <= p_MinET1 ) continue; // E_T cut if( tob->EtNarrow() <= p_MinET2 ) continue; // E_T cut diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MultiplicityCustom.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MultiplicityCustom.cxx index e3ad9c24060b537b2372beaa61b32e7a37d13b1d..93f57b9b3ead36dfb90fd74a7d60a1536b2f881c 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MultiplicityCustom.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MultiplicityCustom.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * MultiplicityCustom.cpp @@ -85,8 +85,8 @@ TCS::MultiplicityCustom::process( const std::vector<TCS::TOBArray const *> & inp tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < nLeading; ++tob1) { - if (parType_t(fabs((*tob1)-> eta())) < p_EtaMin) continue; - if (parType_t(fabs((*tob1)-> eta())) > p_EtaMax) continue; + if (parType_t(std::abs((*tob1)-> eta())) < p_EtaMin) continue; + if (parType_t(std::abs((*tob1)-> eta())) > p_EtaMax) continue; if( parType_t((*tob1)->Et()) <= p_MinET ) continue; // E_T cut // diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/NotMatch.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/NotMatch.cxx index 3dda9a616d74177071680830065c2ba2d531b5f4..caf98facaf53372f3c4b714bce06b48b3f10209f 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/NotMatch.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/NotMatch.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * NotMatch.cpp @@ -127,16 +127,16 @@ TCS::NotMatch::processBitCorrect( const std::vector<TCS::TOBArray const *> & inp ++tob1) { if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut - if( parType_t(fabs((*tob1)->eta())) > p_EtaMax1[i] ) continue; // Eta cut - if( parType_t(fabs((*tob1)->eta())) < p_EtaMin1[i] ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) > p_EtaMax1[i] ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) < p_EtaMin1[i] ) continue; // Eta cut matched = false; deltaR2 = 999; for( TCS::TOBArray::const_iterator tob2 = input[1]->begin(); tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2 && matched != true ; ++tob2) { if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut - if( parType_t(fabs((*tob2)->eta())) > p_EtaMax2[i] ) continue; // Eta cut - if( parType_t(fabs((*tob2)->eta())) < p_EtaMin2[i] ) continue; // Eta cut + if( parType_t(std::abs((*tob2)->eta())) > p_EtaMax2[i] ) continue; // Eta cut + if( parType_t(std::abs((*tob2)->eta())) < p_EtaMin2[i] ) continue; // Eta cut // test DeltaR2Min, DeltaR2Max deltaR2 = calcDeltaR2BW( *tob1, *tob2 ); if (deltaR2 <= p_DRCut[i]) matched = true; @@ -177,16 +177,16 @@ TCS::NotMatch::process( const std::vector<TCS::TOBArray const *> & input, ++tob1) { if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut - if( parType_t(fabs((*tob1)->eta())) > p_EtaMax1[i] ) continue; // Eta cut - if( parType_t(fabs((*tob1)->eta())) < p_EtaMin1[i] ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) > p_EtaMax1[i] ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) < p_EtaMin1[i] ) continue; // Eta cut matched = false; deltaR2 = 999; for( TCS::TOBArray::const_iterator tob2 = input[1]->begin(); tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2 && matched != true ; ++tob2) { if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut - if( parType_t(fabs((*tob2)->eta())) > p_EtaMax2[i] ) continue; // Eta cut - if( parType_t(fabs((*tob2)->eta())) < p_EtaMin2[i] ) continue; // Eta cut + if( parType_t(std::abs((*tob2)->eta())) > p_EtaMax2[i] ) continue; // Eta cut + if( parType_t(std::abs((*tob2)->eta())) < p_EtaMin2[i] ) continue; // Eta cut // test DeltaR2Min, DeltaR2Max deltaR2 = calcDeltaR2( *tob1, *tob2 ); if (deltaR2 <= p_DRCut[i]) matched = true; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio.cxx index 37ce171f4ecab9cf1ce9bb08e8f218c37f683f25..5a9dfcad8ebfe28ea3afbed2774f4036880933f1 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * Ratio.cpp @@ -100,8 +100,8 @@ TCS::Ratio::process( const std::vector<TCS::TOBArray const *> & input, for( TCS::GenericTOB * tob : *input[1]) { - if( parType_t(fabs(tob->eta())) > p_EtaMax ) continue; // Eta cut - if( parType_t(fabs(tob->eta())) < p_EtaMin ) continue; // Eta cut + if( parType_t(std::abs(tob->eta())) > p_EtaMax ) continue; // Eta cut + if( parType_t(std::abs(tob->eta())) < p_EtaMin ) continue; // Eta cut if( tob->Et() <= p_MinET2 ) continue; // E_T cut TRG_MSG_DEBUG("Jet ET = " << tob->Et()); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio2.cxx index befccb97171949780b5ddc0a64ba744ac2f966fd..200156b1e2a6003b1481c40df31565f266474179 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * Ratio2.cpp @@ -95,8 +95,8 @@ TCS::Ratio2::process( const std::vector<TCS::TOBArray const *> & input, for( TCS::GenericTOB * tob : *input[1]) { - if( parType_t(fabs(tob->eta())) > p_EtaMax ) continue; // Eta cut - if( parType_t(fabs(tob->eta())) < p_EtaMin ) continue; // Eta cut + if( parType_t(std::abs(tob->eta())) > p_EtaMax ) continue; // Eta cut + if( parType_t(std::abs(tob->eta())) < p_EtaMin ) continue; // Eta cut if( tob->Et() <= p_MinET2 ) continue; // E_T cut TRG_MSG_DEBUG("Jet : ET = " << tob->Et()); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx index 687f150a67178b874b9b3db8dcff76e0dd20308a..0900ad4a3a772a24d6bf91be559bb3716b6235c7 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * RatioSum.cpp @@ -199,8 +199,8 @@ TCS::RatioSum::process( const std::vector<TCS::TOBArray const *> & input, unsigned int objC(0); for( TCS::GenericTOB * tob : *input[1]) { - if( parType_t(fabs(tob->eta())) > p_EtaMax2 ) continue; // Eta cut - if( parType_t(fabs(tob->eta())) < p_EtaMin2 ) continue; // Eta cut + if( parType_t(std::abs(tob->eta())) > p_EtaMax2 ) continue; // Eta cut + if( parType_t(std::abs(tob->eta())) < p_EtaMin2 ) continue; // Eta cut if( tob->Et() <= p_MinET2 ) continue; // E_T cut TRG_MSG_DEBUG("Jet : ET = " << tob->Et()); @@ -216,8 +216,8 @@ TCS::RatioSum::process( const std::vector<TCS::TOBArray const *> & input, ++tob1) { - if( parType_t(fabs((*tob1)->eta())) > p_EtaMax3 ) continue; // Eta cut - if( parType_t(fabs((*tob1)->eta())) < p_EtaMin3 ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) > p_EtaMax3 ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) < p_EtaMin3 ) continue; // Eta cut if( (*tob1)->Et() <= p_MinET3 ) continue; // E_T cut sumET += (*tob1)->Et() ; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx index 4adc595020758ab34e57bfa6fcaf65e6d0db9cfc..2be36ed6ca8a64687c87a3a825e94cf2cb05df18 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /********************************* * SimpleCone.cpp @@ -110,8 +110,8 @@ TCS::SimpleCone::process( const std::vector<TCS::TOBArray const *> & input, tob != input[0]->end() && distance(input[0]->begin(), tob) < p_NumberLeading1; ++tob) { - if( parType_t(fabs((*tob)->eta())) > p_EtaMax ) continue; // Eta cut - if( parType_t(fabs((*tob)->eta())) < p_EtaMin ) continue; // Eta cut + if( parType_t(std::abs((*tob)->eta())) > p_EtaMax ) continue; // Eta cut + if( parType_t(std::abs((*tob)->eta())) < p_EtaMin ) continue; // Eta cut if( parType_t((*tob)->Et()) <= p_MinET ) continue; // E_T cut TRG_MSG_DEBUG("Jet : ET = " << (*tob)->Et()); @@ -123,8 +123,8 @@ TCS::SimpleCone::process( const std::vector<TCS::TOBArray const *> & input, ++tob1) { if( tob1 == tob ) continue; // Avoid double counting of central jet - if( parType_t(fabs((*tob1)->eta())) > p_EtaMax ) continue; // Eta cut - if( parType_t(fabs((*tob1)->eta())) < p_EtaMin ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) > p_EtaMax ) continue; // Eta cut + if( parType_t(std::abs((*tob1)->eta())) < p_EtaMin ) continue; // Eta cut if( parType_t((*tob1)->Et()) <= p_MinET ) continue; // E_T cut double deta = ( (*tob)->etaDouble() - (*tob1)->etaDouble() ); diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.cxx index 9dca2a78374baa360b7b3e764b0440bc8f6f9fb2..2c4966e11e5eb770bf1a27ce9697e41bdb003402 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -55,9 +55,7 @@ CpByteStreamV2Tool::CpByteStreamV2Tool(const std::string &type, m_robDataProvider("ROBDataProviderSvc", name), m_channels(80), m_crates(4), m_modules(14), m_cmxs(2), m_maxTobs(5), m_chips(16), m_locs(4), - m_coreOverlap(0), m_subDetector(eformat::TDAQ_CALO_CLUSTER_PROC_DAQ), - m_srcIdMap(0), m_towerKey(0), m_cpmSubBlock(0), m_cmxCpSubBlock(0), - m_rodStatus(0), m_fea(0) + m_subDetector(eformat::TDAQ_CALO_CLUSTER_PROC_DAQ) { declareInterface<CpByteStreamV2Tool>(this); @@ -72,7 +70,7 @@ CpByteStreamV2Tool::CpByteStreamV2Tool(const std::string &type, "Offset of CP crate numbers in RDOs"); // Properties for reading bytestream only - declareProperty("ROBSourceIDs", m_sourceIDs, + declareProperty("ROBSourceIDs", m_sourceIDsProp, "ROB fragment source identifiers"); // Properties for writing bytestream only @@ -111,13 +109,6 @@ StatusCode CpByteStreamV2Tool::initialize() CHECK(m_errorTool.retrieve()); CHECK(m_robDataProvider.retrieve()); - m_srcIdMap = new L1CaloSrcIdMap(); - m_towerKey = new LVL1::TriggerTowerKey(); - m_cpmSubBlock = new CpmSubBlockV2(); - m_cmxCpSubBlock = new CmxCpSubBlock(); - m_rodStatus = new std::vector<uint32_t>(2); - m_fea = new FullEventAssembler<L1CaloSrcIdMap>(); - return StatusCode::SUCCESS; } @@ -125,92 +116,88 @@ StatusCode CpByteStreamV2Tool::initialize() StatusCode CpByteStreamV2Tool::finalize() { - delete m_fea; - delete m_rodStatus; - delete m_cmxCpSubBlock; - delete m_cpmSubBlock; - delete m_towerKey; - delete m_srcIdMap; return StatusCode::SUCCESS; } // Conversion bytestream to CPM towers StatusCode CpByteStreamV2Tool::convert( const std::string& sgKey, - DataVector<LVL1::CPMTower> *const ttCollection) + DataVector<LVL1::CPMTower> *const ttCollection) const { - const std::vector<uint32_t>& vID(sourceIDs(sgKey)); + const std::vector<uint32_t>& vID(sourceIDs()); // // get ROB fragments IROBDataProviderSvc::VROBFRAG robFrags; m_robDataProvider->getROBData(vID, robFrags, "CpByteStreamV2Tool"); ATH_MSG_DEBUG("Number of ROB fragments:" << robFrags.size()); - return convert(robFrags, ttCollection); + return convert(sgKey, robFrags, ttCollection); } StatusCode CpByteStreamV2Tool::convert( + const std::string& sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, - DataVector<LVL1::CPMTower> *const ttCollection) + DataVector<LVL1::CPMTower> *const ttCollection) const { CpmTowerData data (ttCollection); - return convertBs(robFrags, data); + return convertBs(sgKey, robFrags, data); } // Conversion bytestream to CMX-CP TOBs StatusCode CpByteStreamV2Tool::convert( const std::string& sgKey, - DataVector<LVL1::CMXCPTob> *const tobCollection) + DataVector<LVL1::CMXCPTob> *const tobCollection) const { - const std::vector<uint32_t>& vID(sourceIDs(sgKey)); + const std::vector<uint32_t>& vID(sourceIDs()); // // get ROB fragments IROBDataProviderSvc::VROBFRAG robFrags; m_robDataProvider->getROBData(vID, robFrags, "CpByteStreamV2Tool"); ATH_MSG_DEBUG("Number of ROB fragments:" << robFrags.size()); - return convert(robFrags, tobCollection); + return convert(sgKey, robFrags, tobCollection); } StatusCode CpByteStreamV2Tool::convert( + const std::string& sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, - DataVector<LVL1::CMXCPTob> *const tobCollection) + DataVector<LVL1::CMXCPTob> *const tobCollection) const { CmxCpTobData data (tobCollection); - return convertBs(robFrags, data); + return convertBs(sgKey, robFrags, data); } // Conversion bytestream to CMX-CP hits StatusCode CpByteStreamV2Tool::convert( const std::string& sgKey, - DataVector<LVL1::CMXCPHits> *const hitCollection) + DataVector<LVL1::CMXCPHits> *const hitCollection) const { - const std::vector<uint32_t>& vID(sourceIDs(sgKey)); + const std::vector<uint32_t>& vID(sourceIDs()); // // get ROB fragments IROBDataProviderSvc::VROBFRAG robFrags; m_robDataProvider->getROBData(vID, robFrags, "CpByteStreamV2Tool"); ATH_MSG_DEBUG("Number of ROB fragments:" << robFrags.size()); - return convert(robFrags, hitCollection); + return convert(sgKey, robFrags, hitCollection); } StatusCode CpByteStreamV2Tool::convert( + const std::string& sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, - DataVector<LVL1::CMXCPHits> *const hitCollection) + DataVector<LVL1::CMXCPHits> *const hitCollection) const { CmxCpHitsData data (hitCollection); - return convertBs(robFrags, data); + return convertBs(sgKey, robFrags, data); } // Conversion of CP container to bytestream StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, - RawEventWrite *const re) + RawEventWrite *const re) const { const bool debug = msgLvl(MSG::DEBUG); if (debug) msg(MSG::DEBUG); // Clear the event assembler - - m_fea->clear(); - const uint16_t minorVersion = m_srcIdMap->minorVersion(); - m_fea->setRodMinorVersion(minorVersion); - m_rodStatusMap.clear(); + FullEventAssembler<L1CaloSrcIdMap> fea; + fea.clear(); + const uint16_t minorVersion = m_srcIdMap.minorVersion(); + fea.setRodMinorVersion(minorVersion); // Pointer to ROD data vector @@ -218,9 +205,19 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, // Set up the container maps - setupCpmTowerMap(cp->towers()); - setupCmxCpTobMap(cp->tobs()); - setupCmxCpHitsMap(cp->hits()); + LVL1::TriggerTowerKey towerKey; + + // CPM tower map + ConstCpmTowerMap ttMap; + setupCpmTowerMap(cp->towers(), ttMap, towerKey); + + // CMX-CP TOB map + ConstCmxCpTobMap tobMap; + setupCmxCpTobMap(cp->tobs(), tobMap); + + // CMX-CP hits map + ConstCmxCpHitsMap hitsMap; + setupCmxCpHitsMap(cp->hits(), hitsMap); // Loop over data @@ -254,7 +251,11 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, // Get number of CPM slices and triggered slice offset // for this slink if ( ! slinkSlices(crate, module, modulesPerSlink, - timeslices, trigCpm)) + timeslices, trigCpm, + ttMap, + tobMap, + hitsMap, + towerKey)) { msg(MSG::ERROR) << "Inconsistent number of slices or " << "triggered slice offsets in data for crate " @@ -276,23 +277,22 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, } L1CaloUserHeader userHeader; userHeader.setCpm(trigCpmNew); - const uint32_t rodIdCpm = m_srcIdMap->getRodID(hwCrate, slink, daqOrRoi, + const uint32_t rodIdCpm = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi, m_subDetector); - theROD = m_fea->getRodData(rodIdCpm); + theROD = fea.getRodData(rodIdCpm); theROD->push_back(userHeader.header()); - m_rodStatusMap.insert(make_pair(rodIdCpm, m_rodStatus)); } if (debug) msg() << "Module " << module << endmsg; // Create a sub-block for each slice (except Neutral format) - m_cpmBlocks.clear(); + DataVector<CpmSubBlockV2> cpmBlocks; for (int slice = 0; slice < timeslicesNew; ++slice) { CpmSubBlockV2 *const subBlock = new CpmSubBlockV2(); subBlock->setCpmHeader(m_version, m_dataFormat, slice, hwCrate, module, timeslicesNew); - m_cpmBlocks.push_back(subBlock); + cpmBlocks.push_back(subBlock); if (neutralFormat) break; } @@ -306,8 +306,8 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, int layer = 0; if (m_cpmMaps->mapping(crate, module, chan, eta, phi, layer)) { - const unsigned int key = m_towerKey->ttKey(phi, eta); - const LVL1::CPMTower *const tt = findCpmTower(key); + const unsigned int key = towerKey.ttKey(phi, eta); + const LVL1::CPMTower *const tt = findCpmTower(key, ttMap); if (tt ) { std::vector<int> emData; @@ -329,7 +329,7 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, (hadErrBits.get(LVL1::DataError::LinkDown) << 1) | hadErrBits.get(LVL1::DataError::Parity); const int index = ( neutralFormat ) ? 0 : slice; - CpmSubBlockV2 *const subBlock = m_cpmBlocks[index]; + CpmSubBlockV2 *const subBlock = cpmBlocks[index]; subBlock->fillTowerData(slice, chan, emData[slice], hadData[slice], emErr, hadErr); if ((emErrBits.error() >> LVL1::DataError::GLinkParity)) @@ -354,7 +354,7 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, // Pack and write the sub-blocks DataVector<CpmSubBlockV2>::iterator pos; - for (pos = m_cpmBlocks.begin(); pos != m_cpmBlocks.end(); ++pos) + for (pos = cpmBlocks.begin(); pos != cpmBlocks.end(); ++pos) { CpmSubBlockV2 *const subBlock = *pos; if ( !subBlock->pack()) @@ -378,7 +378,7 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, // Create a sub-block for each slice (except Neutral format) - m_cmxBlocks.clear(); + DataVector<CmxCpSubBlock> cmxBlocks; const int summing = (crate == m_crates - 1) ? CmxSubBlock::SYSTEM : CmxSubBlock::CRATE; for (int slice = 0; slice < timeslicesNew; ++slice) @@ -386,7 +386,7 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, CmxCpSubBlock *const block = new CmxCpSubBlock(); block->setCmxHeader(m_version, m_dataFormat, slice, hwCrate, summing, CmxSubBlock::CMX_CP, cmx, timeslicesNew); - m_cmxBlocks.push_back(block); + cmxBlocks.push_back(block); if (neutralFormat) break; } @@ -399,7 +399,8 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, for (int loc = 0; loc < m_locs; ++loc) { const int key = tobKey(crate, cmx, cpm, chip, loc); - const LVL1::CMXCPTob *const ct = findCmxCpTob(key); + const LVL1::CMXCPTob *const ct = findCmxCpTob(key, + tobMap); if ( ct ) { std::vector<int> energy; @@ -420,7 +421,7 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, err |= (errBits.get(LVL1::DataError::ParityPhase3)) << 4; err |= (errBits.get(LVL1::DataError::Overflow)) << 5; const int index = ( neutralFormat ) ? 0 : slice; - CmxCpSubBlock *const subBlock = m_cmxBlocks[index]; + CmxCpSubBlock *const subBlock = cmxBlocks[index]; subBlock->setTob(slice, cpm, chip, loc, energy[slice], isolation[slice], err); subBlock->setPresenceMap(slice, cpm, presence[slice]); @@ -435,7 +436,7 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, for (int source = 0; source < LVL1::CMXCPHits::MAXSOURCE; ++source) { const int key = hitsKey(crate, cmx, source); - const LVL1::CMXCPHits *const ch = findCmxCpHits(key); + const LVL1::CMXCPHits *const ch = findCmxCpHits(key, hitsMap); if ( ch ) { std::vector<unsigned int> hits0; @@ -451,7 +452,7 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, const LVL1::DataError err0Bits(err0[slice]); const LVL1::DataError err1Bits(err1[slice]); const int index = ( neutralFormat ) ? 0 : slice; - CmxCpSubBlock *const subBlock = m_cmxBlocks[index]; + CmxCpSubBlock *const subBlock = cmxBlocks[index]; subBlock->setHits(slice, source, 0, hits0[slice], // Assuming CMXCPHits::source == CmxCpSubBlock::source err0Bits.get(LVL1::DataError::Parity)); subBlock->setHits(slice, source, 1, hits1[slice], @@ -464,7 +465,7 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, } } } - for (CmxCpSubBlock* subBlock : m_cmxBlocks) + for (CmxCpSubBlock* subBlock : cmxBlocks) { if ( !subBlock->pack()) { @@ -483,55 +484,65 @@ StatusCode CpByteStreamV2Tool::convert(const LVL1::CPBSCollectionV2 *const cp, // Fill the raw event - m_fea->fill(re, msg()); - - // Set ROD status words - - //L1CaloRodStatus::setStatus(re, m_rodStatusMap, m_srcIdMap); + fea.fill(re, msg()); return StatusCode::SUCCESS; } // Return reference to vector with all possible Source Identifiers -const std::vector<uint32_t> &CpByteStreamV2Tool::sourceIDs( - const std::string &sgKey) +std::vector<uint32_t> CpByteStreamV2Tool::makeSourceIDs() const { - // Check if overlap tower channels wanted - const std::string flag("Overlap"); - const std::string::size_type pos = sgKey.find(flag); - m_coreOverlap = - (pos == std::string::npos || pos != sgKey.length() - flag.length()) ? 0 : 1; - - if (m_sourceIDs.empty()) + std::vector<uint32_t> sourceIDs; + + if (!m_sourceIDsProp.empty()) { + sourceIDs = m_sourceIDsProp; + } + else { + const int maxCrates = m_crates + m_crateOffsetHw; + const int maxSlinks = m_srcIdMap.maxSlinks(); + for (int hwCrate = m_crateOffsetHw; hwCrate < maxCrates; ++hwCrate) { - const int maxCrates = m_crates + m_crateOffsetHw; - const int maxSlinks = m_srcIdMap->maxSlinks(); - for (int hwCrate = m_crateOffsetHw; hwCrate < maxCrates; ++hwCrate) - { - for (int slink = 0; slink < maxSlinks; ++slink) - { - const int daqOrRoi = 0; - const uint32_t rodId = m_srcIdMap->getRodID(hwCrate, slink, daqOrRoi, - m_subDetector); - const uint32_t robId = m_srcIdMap->getRobID(rodId); - m_sourceIDs.push_back(robId); - } - } + for (int slink = 0; slink < maxSlinks; ++slink) + { + const int daqOrRoi = 0; + const uint32_t rodId = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi, + m_subDetector); + const uint32_t robId = m_srcIdMap.getRobID(rodId); + sourceIDs.push_back(robId); + } } - return m_sourceIDs; + } + return sourceIDs; +} + +const std::vector<uint32_t> &CpByteStreamV2Tool::sourceIDs() const +{ + static const std::vector<uint32_t> sourceIDs = makeSourceIDs(); + return sourceIDs; } // Convert bytestream to given container type StatusCode CpByteStreamV2Tool::convertBs( + const std::string& sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, - CpByteStreamToolData& data) + CpByteStreamToolData& data) const { + LocalData ld; + + const std::string flag("Overlap"); + const std::string::size_type pos = sgKey.find(flag); + ld.coreOverlap = + (pos == std::string::npos || pos != sgKey.length() - flag.length()) ? 0 : 1; + const bool debug = msgLvl(MSG::DEBUG); if (debug) msg(MSG::DEBUG); - // Loop over ROB fragments + CmxCpSubBlock cmxCpSubBlock; + CpmSubBlockV2 cpmSubBlock; + + // Loop over ROB fragments int robCount = 0; std::set<uint32_t> dupCheck; @@ -582,12 +593,12 @@ StatusCode CpByteStreamV2Tool::convertBs( // Check identifier const uint32_t sourceID = (*rob)->rod_source_id(); - if (m_srcIdMap->getRobID(sourceID) != robid || - m_srcIdMap->subDet(sourceID) != m_subDetector || - m_srcIdMap->daqOrRoi(sourceID) != 0 || - (m_srcIdMap->slink(sourceID) != 0 && m_srcIdMap->slink(sourceID) != 2) || - m_srcIdMap->crate(sourceID) < m_crateOffsetHw || - m_srcIdMap->crate(sourceID) >= m_crateOffsetHw + m_crates) + if (m_srcIdMap.getRobID(sourceID) != robid || + m_srcIdMap.subDet(sourceID) != m_subDetector || + m_srcIdMap.daqOrRoi(sourceID) != 0 || + (m_srcIdMap.slink(sourceID) != 0 && m_srcIdMap.slink(sourceID) != 2) || + m_srcIdMap.crate(sourceID) < m_crateOffsetHw || + m_srcIdMap.crate(sourceID) >= m_crateOffsetHw + m_crates) { m_errorTool->rodError(robid, L1CaloSubBlock::ERROR_ROD_ID); if (debug) @@ -602,16 +613,16 @@ StatusCode CpByteStreamV2Tool::convertBs( // Check minor version const int minorVersion = (*rob)->rod_version() & 0xffff; - if (minorVersion <= m_srcIdMap->minorVersionPreLS1()) + if (minorVersion <= m_srcIdMap.minorVersionPreLS1()) { if (debug) msg() << "Skipping pre-LS1 data" << endmsg; continue; } - const int rodCrate = m_srcIdMap->crate(sourceID); + const int rodCrate = m_srcIdMap.crate(sourceID); if (debug) { msg() << "Treating crate " << rodCrate - << " slink " << m_srcIdMap->slink(sourceID) << endmsg; + << " slink " << m_srcIdMap.slink(sourceID) << endmsg; } // First word should be User Header @@ -643,13 +654,13 @@ StatusCode CpByteStreamV2Tool::convertBs( // Loop over sub-blocks - m_rodErr = L1CaloSubBlock::ERROR_NONE; + ld.rodErr = L1CaloSubBlock::ERROR_NONE; while (payload != payloadEnd) { if (L1CaloSubBlock::wordType(*payload) != L1CaloSubBlock::HEADER) { if (debug) msg() << "Unexpected data sequence" << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_MISSING_HEADER; + ld.rodErr = L1CaloSubBlock::ERROR_MISSING_HEADER; break; } @@ -665,20 +676,20 @@ StatusCode CpByteStreamV2Tool::convertBs( // CMX if (CmxSubBlock::cmxType(*payload) == CmxSubBlock::CMX_CP) { - m_cmxCpSubBlock->clear(); - payload = m_cmxCpSubBlock->read(payload, payloadEnd); - if (m_cmxCpSubBlock->crate() != rodCrate) + cmxCpSubBlock.clear(); + payload = cmxCpSubBlock.read(payload, payloadEnd); + if (cmxCpSubBlock.crate() != rodCrate) { if (debug) msg() << "Inconsistent crate number in ROD source ID" << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER; + ld.rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER; break; } if (data.m_collection == CMX_CP_TOBS || data.m_collection == CMX_CP_HITS) { - decodeCmxCp(m_cmxCpSubBlock, trigCpm, data); - if (m_rodErr != L1CaloSubBlock::ERROR_NONE) + decodeCmxCp(&cmxCpSubBlock, trigCpm, data, ld); + if (ld.rodErr != L1CaloSubBlock::ERROR_NONE) { if (debug) msg() << "decodeCmxCp failed" << endmsg; break; @@ -688,26 +699,26 @@ StatusCode CpByteStreamV2Tool::convertBs( else { if (debug) msg() << "Invalid CMX type in module field" << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_MODULE_NUMBER; + ld.rodErr = L1CaloSubBlock::ERROR_MODULE_NUMBER; break; } } else { // CPM - m_cpmSubBlock->clear(); - payload = m_cpmSubBlock->read(payload, payloadEnd); - if (m_cpmSubBlock->crate() != rodCrate) + cpmSubBlock.clear(); + payload = cpmSubBlock.read(payload, payloadEnd); + if (cpmSubBlock.crate() != rodCrate) { if (debug) msg() << "Inconsistent crate number in ROD source ID" << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER; + ld.rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER; break; } if (data.m_collection == CPM_TOWERS) { - decodeCpm(m_cpmSubBlock, trigCpm, static_cast<CpmTowerData&>(data)); - if (m_rodErr != L1CaloSubBlock::ERROR_NONE) + decodeCpm(&cpmSubBlock, trigCpm, static_cast<CpmTowerData&>(data), ld); + if (ld.rodErr != L1CaloSubBlock::ERROR_NONE) { if (debug) msg() << "decodeCpm failed" << endmsg; break; @@ -715,9 +726,9 @@ StatusCode CpByteStreamV2Tool::convertBs( } } } - if (m_rodErr != L1CaloSubBlock::ERROR_NONE) + if (ld.rodErr != L1CaloSubBlock::ERROR_NONE) { - m_errorTool->rodError(robid, m_rodErr); + m_errorTool->rodError(robid, ld.rodErr); } } return StatusCode::SUCCESS; @@ -726,7 +737,8 @@ StatusCode CpByteStreamV2Tool::convertBs( // Unpack CMX-CP sub-block void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm, - CpByteStreamToolData& data) + CpByteStreamToolData& data, + LocalData& ld) const { const bool debug = msgLvl(MSG::DEBUG); if (debug) msg(MSG::DEBUG); @@ -752,14 +764,14 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm, if (debug) msg() << "Triggered slice from header " << "inconsistent with number of slices: " << trigCpm << ", " << timeslices << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_SLICES; + ld.rodErr = L1CaloSubBlock::ERROR_SLICES; return; } if (timeslices <= sliceNum) { if (debug) msg() << "Total slices inconsistent with slice number: " << timeslices << ", " << sliceNum << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_SLICES; + ld.rodErr = L1CaloSubBlock::ERROR_SLICES; return; } // Unpack sub-block @@ -770,7 +782,7 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm, std::string errMsg(subBlock->unpackErrorMsg()); msg() << "CMX-CP sub-block unpacking failed: " << errMsg << endmsg; } - m_rodErr = subBlock->unpackErrorCode(); + ld.rodErr = subBlock->unpackErrorCode(); return; } @@ -821,47 +833,47 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm, LVL1::CMXCPTob *tb = findCmxCpTob(tdata, key); if ( ! tb ) // create new CMX TOB { - m_energyVec.assign(timeslices, 0); - m_isolVec.assign(timeslices, 0); - m_errorVec.assign(timeslices, 0); - m_presenceMapVec.assign(timeslices, 0); - m_energyVec[slice] = energy; - m_isolVec[slice] = isolation; - m_errorVec[slice] = error; - m_presenceMapVec[slice] = presenceMap; + ld.energyVec.assign(timeslices, 0); + ld.isolVec.assign(timeslices, 0); + ld.errorVec.assign(timeslices, 0); + ld.presenceMapVec.assign(timeslices, 0); + ld.energyVec[slice] = energy; + ld.isolVec[slice] = isolation; + ld.errorVec[slice] = error; + ld.presenceMapVec[slice] = presenceMap; auto tbp = std::make_unique<LVL1::CMXCPTob>(swCrate, cmx, cpm, chip, loc, - m_energyVec, m_isolVec, m_errorVec, - m_presenceMapVec, trigCpm); + ld.energyVec, ld.isolVec, ld.errorVec, + ld.presenceMapVec, trigCpm); tdata.m_tobMap.insert(std::make_pair(key, tbp.get())); tdata.m_tobCollection->push_back(std::move(tbp)); } else { - m_energyVec = tb->energyVec(); - m_isolVec = tb->isolationVec(); - m_errorVec = tb->errorVec(); - m_presenceMapVec = tb->presenceMapVec(); - const int nsl = m_energyVec.size(); + ld.energyVec = tb->energyVec(); + ld.isolVec = tb->isolationVec(); + ld.errorVec = tb->errorVec(); + ld.presenceMapVec = tb->presenceMapVec(); + const int nsl = ld.energyVec.size(); if (timeslices != nsl) { if (debug) msg() << "Inconsistent number of slices in sub-blocks" << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_SLICES; + ld.rodErr = L1CaloSubBlock::ERROR_SLICES; return; } - if (m_energyVec[slice] != 0 || m_isolVec[slice] != 0 || - m_errorVec[slice] != 0) + if (ld.energyVec[slice] != 0 || ld.isolVec[slice] != 0 || + ld.errorVec[slice] != 0) { if (debug) msg() << "Duplicate data for slice " << slice << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_DUPLICATE_DATA; + ld.rodErr = L1CaloSubBlock::ERROR_DUPLICATE_DATA; return; } - m_energyVec[slice] = energy; - m_isolVec[slice] = isolation; - m_errorVec[slice] = error; - m_presenceMapVec[slice] = presenceMap; - tb->addTob(m_energyVec, m_isolVec, m_errorVec, m_presenceMapVec); + ld.energyVec[slice] = energy; + ld.isolVec[slice] = isolation; + ld.errorVec[slice] = error; + ld.presenceMapVec[slice] = presenceMap; + tb->addTob(ld.energyVec, ld.isolVec, ld.errorVec, ld.presenceMapVec); } } } @@ -899,47 +911,47 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm, LVL1::CMXCPHits *ch = findCmxCpHits(hdata, key); if ( ! ch ) // create new CMX hits { - m_hitsVec0.assign(timeslices, 0); - m_hitsVec1.assign(timeslices, 0); - m_errVec0.assign(timeslices, 0); - m_errVec1.assign(timeslices, 0); - m_hitsVec0[slice] = hits0; - m_hitsVec1[slice] = hits1; - m_errVec0[slice] = err0; - m_errVec1[slice] = err1; + ld.hitsVec0.assign(timeslices, 0); + ld.hitsVec1.assign(timeslices, 0); + ld.errVec0.assign(timeslices, 0); + ld.errVec1.assign(timeslices, 0); + ld.hitsVec0[slice] = hits0; + ld.hitsVec1[slice] = hits1; + ld.errVec0[slice] = err0; + ld.errVec1[slice] = err1; auto chp = std::make_unique<LVL1::CMXCPHits>(swCrate, cmx, source, - m_hitsVec0, m_hitsVec1, - m_errVec0, m_errVec1, trigCpm); + ld.hitsVec0, ld.hitsVec1, + ld.errVec0, ld.errVec1, trigCpm); hdata.m_hitsMap.insert(std::make_pair(key, chp.get())); hdata.m_hitCollection->push_back(std::move(chp)); } else { - m_hitsVec0 = ch->hitsVec0(); - m_hitsVec1 = ch->hitsVec1(); - m_errVec0 = ch->errorVec0(); - m_errVec1 = ch->errorVec1(); - const int nsl = m_hitsVec0.size(); + ld.hitsVec0 = ch->hitsVec0(); + ld.hitsVec1 = ch->hitsVec1(); + ld.errVec0 = ch->errorVec0(); + ld.errVec1 = ch->errorVec1(); + const int nsl = ld.hitsVec0.size(); if (timeslices != nsl) { if (debug) msg() << "Inconsistent number of slices in sub-blocks" << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_SLICES; + ld.rodErr = L1CaloSubBlock::ERROR_SLICES; return; } - if (m_hitsVec0[slice] != 0 || m_hitsVec1[slice] != 0 || - m_errVec0[slice] != 0 || m_errVec1[slice] != 0) + if (ld.hitsVec0[slice] != 0 || ld.hitsVec1[slice] != 0 || + ld.errVec0[slice] != 0 || ld.errVec1[slice] != 0) { if (debug) msg() << "Duplicate data for slice " << slice << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_DUPLICATE_DATA; + ld.rodErr = L1CaloSubBlock::ERROR_DUPLICATE_DATA; return; } - m_hitsVec0[slice] = hits0; - m_hitsVec1[slice] = hits1; - m_errVec0[slice] = err0; - m_errVec1[slice] = err1; - ch->addHits(m_hitsVec0, m_hitsVec1, m_errVec0, m_errVec1); + ld.hitsVec0[slice] = hits0; + ld.hitsVec1[slice] = hits1; + ld.errVec0[slice] = err0; + ld.errVec1[slice] = err1; + ch->addHits(ld.hitsVec0, ld.hitsVec1, ld.errVec0, ld.errVec1); } } } @@ -952,7 +964,8 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm, // Unpack CPM sub-block void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm, - CpmTowerData& data) + CpmTowerData& data, + LocalData& ld) const { const bool debug = msgLvl(MSG::DEBUG); const bool verbose = msgLvl(MSG::VERBOSE); @@ -972,7 +985,7 @@ void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm, if (module < 1 || module > m_modules) { if (debug) msg() << "Unexpected module number: " << module << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_MODULE_NUMBER; + ld.rodErr = L1CaloSubBlock::ERROR_MODULE_NUMBER; return; } if (timeslices <= trigCpm) @@ -980,14 +993,14 @@ void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm, if (debug) msg() << "Triggered slice from header " << "inconsistent with number of slices: " << trigCpm << ", " << timeslices << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_SLICES; + ld.rodErr = L1CaloSubBlock::ERROR_SLICES; return; } if (timeslices <= sliceNum) { if (debug) msg() << "Total slices inconsistent with slice number: " << timeslices << ", " << sliceNum << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_SLICES; + ld.rodErr = L1CaloSubBlock::ERROR_SLICES; return; } // Unpack sub-block @@ -998,7 +1011,7 @@ void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm, std::string errMsg(subBlock->unpackErrorMsg()); msg() << "CPM sub-block unpacking failed: " << errMsg << endmsg; } - m_rodErr = subBlock->unpackErrorCode(); + ld.rodErr = subBlock->unpackErrorCode(); return; } @@ -1045,33 +1058,33 @@ void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm, int layer = 0; if (m_cpmMaps->mapping(crate, module, chan, eta, phi, layer)) { - if (layer == m_coreOverlap) + if (layer == ld.coreOverlap) { - const unsigned int key = m_towerKey->ttKey(phi, eta); + const unsigned int key = ld.towerKey.ttKey(phi, eta); LVL1::CPMTower *tt = findCpmTower(data, key); if ( ! tt ) // create new CPM tower { - m_emVec.assign(timeslices, 0); - m_hadVec.assign(timeslices, 0); - m_emErrVec.assign(timeslices, 0); - m_hadErrVec.assign(timeslices, 0); - m_emVec[slice] = em; - m_hadVec[slice] = had; - m_emErrVec[slice] = emErr1; - m_hadErrVec[slice] = hadErr1; + ld.emVec.assign(timeslices, 0); + ld.hadVec.assign(timeslices, 0); + ld.emErrVec.assign(timeslices, 0); + ld.hadErrVec.assign(timeslices, 0); + ld.emVec[slice] = em; + ld.hadVec[slice] = had; + ld.emErrVec[slice] = emErr1; + ld.hadErrVec[slice] = hadErr1; auto ttp = - std::make_unique<LVL1::CPMTower>(phi, eta, m_emVec, m_emErrVec, - m_hadVec, m_hadErrVec, trigCpm); + std::make_unique<LVL1::CPMTower>(phi, eta, ld.emVec, ld.emErrVec, + ld.hadVec, ld.hadErrVec, trigCpm); data.m_ttMap.insert(std::make_pair(key, ttp.get())); data.m_ttCollection->push_back(std::move(ttp)); } else { - m_emVec = tt->emEnergyVec(); - m_hadVec = tt->hadEnergyVec(); - m_emErrVec = tt->emErrorVec(); - m_hadErrVec = tt->hadErrorVec(); - const int nsl = m_emVec.size(); + ld.emVec = tt->emEnergyVec(); + ld.hadVec = tt->hadEnergyVec(); + ld.emErrVec = tt->emErrorVec(); + ld.hadErrVec = tt->hadErrorVec(); + const int nsl = ld.emVec.size(); if (timeslices != nsl) { if (debug) @@ -1079,22 +1092,22 @@ void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm, msg() << "Inconsistent number of slices in sub-blocks" << endmsg; } - m_rodErr = L1CaloSubBlock::ERROR_SLICES; + ld.rodErr = L1CaloSubBlock::ERROR_SLICES; return; } - if (m_emVec[slice] != 0 || m_hadVec[slice] != 0 || - m_emErrVec[slice] != 0 || m_hadErrVec[slice] != 0) + if (ld.emVec[slice] != 0 || ld.hadVec[slice] != 0 || + ld.emErrVec[slice] != 0 || ld.hadErrVec[slice] != 0) { if (debug) msg() << "Duplicate data for slice " << slice << endmsg; - m_rodErr = L1CaloSubBlock::ERROR_DUPLICATE_DATA; + ld.rodErr = L1CaloSubBlock::ERROR_DUPLICATE_DATA; return; } - m_emVec[slice] = em; - m_hadVec[slice] = had; - m_emErrVec[slice] = emErr1; - m_hadErrVec[slice] = hadErr1; - tt->fill(m_emVec, m_emErrVec, m_hadVec, m_hadErrVec, trigCpm); + ld.emVec[slice] = em; + ld.hadVec[slice] = had; + ld.emErrVec[slice] = emErr1; + ld.hadErrVec[slice] = hadErr1; + tt->fill(ld.emVec, ld.emErrVec, ld.hadVec, ld.hadErrVec, trigCpm); } } } @@ -1119,10 +1132,11 @@ void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm, // Find a CPM tower for given key const -LVL1::CPMTower *CpByteStreamV2Tool::findCpmTower(const unsigned int key) const +LVL1::CPMTower *CpByteStreamV2Tool::findCpmTower(const unsigned int key, + const ConstCpmTowerMap& ttMap) const { - ConstCpmTowerMap::const_iterator mapIter = m_ttMap.find(key); - if (mapIter != m_ttMap.end()) return mapIter->second; + ConstCpmTowerMap::const_iterator mapIter = ttMap.find(key); + if (mapIter != ttMap.end()) return mapIter->second; return nullptr; } @@ -1137,10 +1151,11 @@ LVL1::CPMTower *CpByteStreamV2Tool::findCpmTower(const CpmTowerData& data, // Find CMX-CP TOB for given key const -LVL1::CMXCPTob *CpByteStreamV2Tool::findCmxCpTob(const int key) const +LVL1::CMXCPTob *CpByteStreamV2Tool::findCmxCpTob(const int key, + const ConstCmxCpTobMap& tobMap) const { - ConstCmxCpTobMap::const_iterator mapIter = m_tobMap.find(key); - if (mapIter != m_tobMap.end()) return mapIter->second; + ConstCmxCpTobMap::const_iterator mapIter = tobMap.find(key); + if (mapIter != tobMap.end()) return mapIter->second; return nullptr; } @@ -1155,10 +1170,11 @@ LVL1::CMXCPTob *CpByteStreamV2Tool::findCmxCpTob(const CmxCpTobData& data, // Find CMX-CP hits for given key const -LVL1::CMXCPHits *CpByteStreamV2Tool::findCmxCpHits(const int key) const +LVL1::CMXCPHits *CpByteStreamV2Tool::findCmxCpHits(const int key, + const ConstCmxCpHitsMap& hitsMap) const { - ConstCmxCpHitsMap::const_iterator mapIter = m_hitsMap.find(key); - if (mapIter != m_hitsMap.end()) return mapIter->second; + ConstCmxCpHitsMap::const_iterator mapIter = hitsMap.find(key); + if (mapIter != hitsMap.end()) return mapIter->second; return nullptr; } @@ -1173,9 +1189,11 @@ LVL1::CMXCPHits *CpByteStreamV2Tool::findCmxCpHits(const CmxCpHitsData& data, // Set up CPM tower map void CpByteStreamV2Tool::setupCpmTowerMap(const CpmTowerCollection * - const ttCollection) + const ttCollection, + ConstCpmTowerMap& ttMap, + LVL1::TriggerTowerKey& towerKey) const { - m_ttMap.clear(); + ttMap.clear(); if (ttCollection) { CpmTowerCollection::const_iterator pos = ttCollection->begin(); @@ -1183,8 +1201,8 @@ void CpByteStreamV2Tool::setupCpmTowerMap(const CpmTowerCollection * for (; pos != pose; ++pos) { const LVL1::CPMTower *const tt = *pos; - const unsigned int key = m_towerKey->ttKey(tt->phi(), tt->eta()); - m_ttMap.insert(std::make_pair(key, tt)); + const unsigned int key = towerKey.ttKey(tt->phi(), tt->eta()); + ttMap.insert(std::make_pair(key, tt)); } } } @@ -1192,9 +1210,10 @@ void CpByteStreamV2Tool::setupCpmTowerMap(const CpmTowerCollection * // Set up CMX-CP TOB map void CpByteStreamV2Tool::setupCmxCpTobMap(const CmxCpTobCollection * - const tobCollection) + const tobCollection, + ConstCmxCpTobMap& tobMap) const { - m_tobMap.clear(); + tobMap.clear(); if (tobCollection) { CmxCpTobCollection::const_iterator pos = tobCollection->begin(); @@ -1208,7 +1227,7 @@ void CpByteStreamV2Tool::setupCmxCpTobMap(const CmxCpTobCollection * const int chip = tob->chip(); const int loc = tob->location(); const int key = tobKey(crate, cmx, cpm, chip, loc); - m_tobMap.insert(std::make_pair(key, tob)); + tobMap.insert(std::make_pair(key, tob)); } } } @@ -1216,9 +1235,10 @@ void CpByteStreamV2Tool::setupCmxCpTobMap(const CmxCpTobCollection * // Set up CMX-CP hits map void CpByteStreamV2Tool::setupCmxCpHitsMap(const CmxCpHitsCollection * - const hitCollection) + const hitCollection, + ConstCmxCpHitsMap& hitsMap) const { - m_hitsMap.clear(); + hitsMap.clear(); if (hitCollection) { CmxCpHitsCollection::const_iterator pos = hitCollection->begin(); @@ -1230,7 +1250,7 @@ void CpByteStreamV2Tool::setupCmxCpHitsMap(const CmxCpHitsCollection * const int cmx = hits->cmx(); const int source = hits->source(); const int key = hitsKey(crate, cmx, source); - m_hitsMap.insert(std::make_pair(key, hits)); + hitsMap.insert(std::make_pair(key, hits)); } } } @@ -1254,7 +1274,11 @@ int CpByteStreamV2Tool::hitsKey(const int crate, const int cmx, // Get number of slices and triggered slice offset for next slink bool CpByteStreamV2Tool::slinkSlices(const int crate, const int module, - const int modulesPerSlink, int ×lices, int &trigCpm) + const int modulesPerSlink, int ×lices, int &trigCpm, + const ConstCpmTowerMap& ttMap, + const ConstCmxCpTobMap& tobMap, + const ConstCmxCpHitsMap& hitsMap, + LVL1::TriggerTowerKey& towerKey) const { int slices = -1; int trigC = m_dfltSlices / 2; @@ -1266,8 +1290,8 @@ bool CpByteStreamV2Tool::slinkSlices(const int crate, const int module, double phi = 0.; int layer = 0; if ( !m_cpmMaps->mapping(crate, mod, chan, eta, phi, layer)) continue; - const unsigned int key = m_towerKey->ttKey(phi, eta); - const LVL1::CPMTower *const tt = findCpmTower(key); + const unsigned int key = towerKey.ttKey(phi, eta); + const LVL1::CPMTower *const tt = findCpmTower(key, ttMap); if ( !tt ) continue; const int numdat = 4; std::vector<int> sums(numdat); @@ -1309,7 +1333,8 @@ bool CpByteStreamV2Tool::slinkSlices(const int crate, const int module, for (int loc = 0; loc < m_locs; ++loc) { const int key = tobKey(crate, cmx, cpm, chip, loc); - const LVL1::CMXCPTob *const tob = findCmxCpTob(key); + const LVL1::CMXCPTob *const tob = findCmxCpTob(key, + tobMap); if (tob) { const int numdat = 3; @@ -1342,7 +1367,9 @@ bool CpByteStreamV2Tool::slinkSlices(const int crate, const int module, for (int source = 0; source < LVL1::CMXCPHits::MAXSOURCE; ++source) { const int key = hitsKey(crate, cmx, source); - const LVL1::CMXCPHits *const hits = findCmxCpHits(key); + + const LVL1::CMXCPHits *const hits = findCmxCpHits(key, + hitsMap); if (hits) { const int numdat = 4; diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.h index 2843ffa580e9a3814d5bcab01475a682b5880902..b3653412790c6bece90a6095d00fee69cbd79216 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.h +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1CALOBYTESTREAM_CPBYTESTREAMV2TOOL_H @@ -11,6 +11,8 @@ #include <string> #include <vector> +#include "TrigT1CaloUtils/TriggerTowerKey.h" +#include "L1CaloSrcIdMap.h" #include "AthenaBaseComps/AthAlgTool.h" #include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" #include "ByteStreamData/RawEvent.h" @@ -58,31 +60,67 @@ class CpByteStreamV2Tool : public AthAlgTool { /// AlgTool InterfaceID static const InterfaceID& interfaceID(); - virtual StatusCode initialize(); - virtual StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode finalize() override; /// Convert ROB fragments to CPM towers - StatusCode convert(const std::string& sgKey, DataVector<LVL1::CPMTower>* ttCollection); - StatusCode convert(const IROBDataProviderSvc::VROBFRAG& robFrags, - DataVector<LVL1::CPMTower>* ttCollection); + StatusCode convert(const std::string& sgKey, DataVector<LVL1::CPMTower>* ttCollection) const; + StatusCode convert(const std::string& sgKey, + const IROBDataProviderSvc::VROBFRAG& robFrags, + DataVector<LVL1::CPMTower>* ttCollection) const; /// Convert ROB fragments to CMX-CP TOBs StatusCode convert(const std::string& sgKey, - DataVector<LVL1::CMXCPTob>* tobCollection); - StatusCode convert(const IROBDataProviderSvc::VROBFRAG& robFrags, - DataVector<LVL1::CMXCPTob>* tobCollection); + DataVector<LVL1::CMXCPTob>* tobCollection) const; + StatusCode convert(const std::string& sgKey, + const IROBDataProviderSvc::VROBFRAG& robFrags, + DataVector<LVL1::CMXCPTob>* tobCollection) const; /// Convert ROB fragments to CMX-CP hits StatusCode convert(const std::string& sgKey, - DataVector<LVL1::CMXCPHits>* hitCollection); - StatusCode convert(const IROBDataProviderSvc::VROBFRAG& robFrags, - DataVector<LVL1::CMXCPHits>* hitCollection); + DataVector<LVL1::CMXCPHits>* hitCollection) const; + StatusCode convert(const std::string& sgKey, + const IROBDataProviderSvc::VROBFRAG& robFrags, + DataVector<LVL1::CMXCPHits>* hitCollection) const; /// Convert CP Container to bytestream - StatusCode convert(const LVL1::CPBSCollectionV2* cp, RawEventWrite* re); + StatusCode convert(const LVL1::CPBSCollectionV2* cp, RawEventWrite* re) const; /// Return reference to vector with all possible Source Identifiers - const std::vector<uint32_t>& sourceIDs(const std::string& sgKey); + const std::vector<uint32_t>& sourceIDs() const; private: + struct LocalData + { + /// Tower channels to accept (1=Core, 2=Overlap) + int coreOverlap = 0; + /// Unpacking error code + unsigned int rodErr = 0; + /// Energy vector for unpacking + std::vector<int> energyVec; + /// Isolation vector for unpacking + std::vector<int> isolVec; + /// TOB error vector for unpacking + std::vector<int> errorVec; + /// Presence map vector for unpacking + std::vector<unsigned int> presenceMapVec; + /// Hits0 vector for unpacking + std::vector<unsigned int> hitsVec0; + /// Hits1 vector for unpacking + std::vector<unsigned int> hitsVec1; + /// Error0 vector for unpacking + std::vector<int> errVec0; + /// Error1 vector for unpacking + std::vector<int> errVec1; + /// EM data vector for unpacking + std::vector<int> emVec; + /// Had data vector for unpacking + std::vector<int> hadVec; + /// EM error data vector for unpacking + std::vector<int> emErrVec; + /// Had error data vector for unpacking + std::vector<int> hadErrVec; + /// Trigger tower key provider + LVL1::TriggerTowerKey towerKey; + }; enum CollectionType { CPM_TOWERS, CMX_CP_TOBS, CMX_CP_HITS }; @@ -127,30 +165,43 @@ class CpByteStreamV2Tool : public AthAlgTool { CmxCpHitsMap m_hitsMap; }; + /// Create list of all source IDs. + std::vector<uint32_t> makeSourceIDs() const; + /// Convert bytestream to given container type - StatusCode convertBs(const IROBDataProviderSvc::VROBFRAG& robFrags, - CpByteStreamToolData& data); + StatusCode convertBs(const std::string& sgKey, + const IROBDataProviderSvc::VROBFRAG& robFrags, + CpByteStreamToolData& data) const; /// Unpack CMX-CP sub-block - void decodeCmxCp(CmxCpSubBlock* subBlock, int trigCpm, CpByteStreamToolData& data); + void decodeCmxCp(CmxCpSubBlock* subBlock, int trigCpm, CpByteStreamToolData& data, + LocalData& ld) const; /// Unpack CPM sub-block - void decodeCpm(CpmSubBlockV2* subBlock, int trigCpm, CpmTowerData& data); + void decodeCpm(CpmSubBlockV2* subBlock, int trigCpm, CpmTowerData& data, + LocalData& ld) const; /// Find a CPM tower for given key - const LVL1::CPMTower* findCpmTower(unsigned int key) const; + const LVL1::CPMTower* findCpmTower(unsigned int key, + const ConstCpmTowerMap& ttMap) const; LVL1::CPMTower* findCpmTower(const CpmTowerData& data, unsigned int key) const; /// Find CMX-CP TOB for given key - const LVL1::CMXCPTob* findCmxCpTob(int key) const; + const LVL1::CMXCPTob* findCmxCpTob(int key, + const ConstCmxCpTobMap& tobMap) const; LVL1::CMXCPTob* findCmxCpTob(const CmxCpTobData& data, int key) const; /// Find CMX-CP hits for given key - const LVL1::CMXCPHits* findCmxCpHits(int key) const; + const LVL1::CMXCPHits* findCmxCpHits(int key, + const ConstCmxCpHitsMap& hitsMap) const; LVL1::CMXCPHits* findCmxCpHits(const CmxCpHitsData& data, int key) const; /// Set up CPM tower map - void setupCpmTowerMap(const CpmTowerCollection* ttCollection); + void setupCpmTowerMap(const CpmTowerCollection* ttCollection, + ConstCpmTowerMap& ttMap, + LVL1::TriggerTowerKey& towerKey) const; /// Set up CMX-CP TOB map - void setupCmxCpTobMap(const CmxCpTobCollection* tobCollection); + void setupCmxCpTobMap(const CmxCpTobCollection* tobCollection, + ConstCmxCpTobMap& tobMap) const; /// Set up CMX-CP hits map - void setupCmxCpHitsMap(const CmxCpHitsCollection* hitCollection); + void setupCmxCpHitsMap(const CmxCpHitsCollection* hitCollection, + ConstCmxCpHitsMap& hitsMap) const; /// Key for TOBs int tobKey(int crate, int cmx, int cpm, int chip, int loc) const; @@ -159,101 +210,55 @@ class CpByteStreamV2Tool : public AthAlgTool { /// Get number of slices and triggered slice offset for next slink bool slinkSlices(int crate, int module, int modulesPerSlink, - int& timeslices, int& trigJem); + int& timeslices, int& trigJem, + const ConstCpmTowerMap& ttMap, + const ConstCmxCpTobMap& tobMap, + const ConstCmxCpHitsMap& hitsMap, + LVL1::TriggerTowerKey& towerKey) const; /// Channel mapping tool ToolHandle<LVL1::IL1CaloMappingTool> m_cpmMaps; /// Error collection tool ToolHandle<LVL1BS::L1CaloErrorByteStreamTool> m_errorTool; ServiceHandle<IROBDataProviderSvc> m_robDataProvider; - /// Hardware crate number offset + /// Property: Hardware crate number offset int m_crateOffsetHw; - /// Software crate number offset + /// Property: Software crate number offset int m_crateOffsetSw; - /// Sub_block header version + /// Property: Sub_block header version int m_version; - /// Data compression format + /// Property: Data compression format int m_dataFormat; /// Number of channels per module - int m_channels; - /// Number of crates + const int m_channels; + /// Property: Number of crates int m_crates; /// Number of CPM modules per crate - int m_modules; + const int m_modules; /// Number of CMXs per crate - int m_cmxs; + const int m_cmxs; /// Maximum number of TOBS per module - int m_maxTobs; + const int m_maxTobs; /// Number of chips - int m_chips; + const int m_chips; /// Number of Local coordinates - int m_locs; - /// Number of slinks per crate when writing out bytestream + const int m_locs; + /// Property: Number of slinks per crate when writing out bytestream int m_slinks; - /// Default number of slices in simulation + /// Property: Default number of slices in simulation int m_dfltSlices; - /// Force number of slices in bytestream + /// Property: Force number of slices in bytestream int m_forceSlices; - /// Minimum crate number when writing out bytestream + /// Property: Minimum crate number when writing out bytestream int m_crateMin; - /// Maximum crate number when writing out bytestream + /// Property: Maximum crate number when writing out bytestream int m_crateMax; - /// Tower channels to accept (1=Core, 2=Overlap) - int m_coreOverlap; - /// Unpacking error code - unsigned int m_rodErr; - /// ROB source IDs - std::vector<uint32_t> m_sourceIDs; /// Sub-detector type - eformat::SubDetector m_subDetector; + const eformat::SubDetector m_subDetector; /// Source ID converter - L1CaloSrcIdMap* m_srcIdMap; - /// Trigger tower key provider - LVL1::TriggerTowerKey* m_towerKey; - /// CPM sub-block for unpacking - CpmSubBlockV2* m_cpmSubBlock; - /// CMX-CP sub-block for unpacking - CmxCpSubBlock* m_cmxCpSubBlock; - /// Energy vector for unpacking - std::vector<int> m_energyVec; - /// Isolation vector for unpacking - std::vector<int> m_isolVec; - /// TOB error vector for unpacking - std::vector<int> m_errorVec; - /// Presence map vector for unpacking - std::vector<unsigned int> m_presenceMapVec; - /// Hits0 vector for unpacking - std::vector<unsigned int> m_hitsVec0; - /// Hits1 vector for unpacking - std::vector<unsigned int> m_hitsVec1; - /// Error0 vector for unpacking - std::vector<int> m_errVec0; - /// Error1 vector for unpacking - std::vector<int> m_errVec1; - /// EM data vector for unpacking - std::vector<int> m_emVec; - /// Had data vector for unpacking - std::vector<int> m_hadVec; - /// EM error data vector for unpacking - std::vector<int> m_emErrVec; - /// Had error data vector for unpacking - std::vector<int> m_hadErrVec; - /// Vector for current CPM sub-blocks - DataVector<CpmSubBlockV2> m_cpmBlocks; - /// Vector for current CMX-CP sub-blocks - DataVector<CmxCpSubBlock> m_cmxBlocks; - /// CPM tower map - ConstCpmTowerMap m_ttMap; - /// CMX-CP TOB map - ConstCmxCpTobMap m_tobMap; - /// CMX-CP hits map - ConstCmxCpHitsMap m_hitsMap; - /// ROD Status words - std::vector<uint32_t>* m_rodStatus; - /// ROD status map - std::map<uint32_t, std::vector<uint32_t>* > m_rodStatusMap; - /// Event assembler - FullEventAssembler<L1CaloSrcIdMap>* m_fea; + const L1CaloSrcIdMap m_srcIdMap; + /// Property: ROB source IDs + std::vector<uint32_t> m_sourceIDsProp; }; } // end namespace diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.cxx index 9a5b91ff89914788fcc164694c10567c73ce15ac..5cf6b9e8070901a85affc52592cc0e0805751a13 100644 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpReadByteStreamV1V2Cnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -117,7 +117,7 @@ StatusCode CpReadByteStreamV1V2Cnv::createObj( IOpaqueAddress* pAddr, // get SourceIDs const std::vector<uint32_t>& vID1(m_tool1->sourceIDs(nm)); - const std::vector<uint32_t>& vID2(m_tool2->sourceIDs(nm)); + const std::vector<uint32_t>& vID2(m_tool2->sourceIDs()); // get ROB fragments IROBDataProviderSvc::VROBFRAG robFrags1; @@ -147,7 +147,7 @@ StatusCode CpReadByteStreamV1V2Cnv::createObj( IOpaqueAddress* pAddr, } // Post-LS1 data if (robFrags2.size() > 0) { - StatusCode sc = m_tool2->convert(robFrags2, towerCollection); + StatusCode sc = m_tool2->convert(nm, robFrags2, towerCollection); if ( sc.isFailure() ) { m_log << MSG::ERROR << " Failed to create Objects " << nm << endmsg; delete towerCollection; diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloSrcIdMap.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloSrcIdMap.cxx index a74dd44723e7fbd9dd5dc8ff0c6c31f1477043ff..65d55d9ea2c59b2f2b85723950316608c036a81a 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloSrcIdMap.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloSrcIdMap.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -14,7 +14,7 @@ L1CaloSrcIdMap::L1CaloSrcIdMap() // Make a ROD Source ID uint32_t L1CaloSrcIdMap::getRodID(int crate, int slink, int daqOrRoi, - eformat::SubDetector subdet) + eformat::SubDetector subdet) const { // module ID = r0sscccc (ROD-spec-version1_06d, P33) uint16_t moduleId = (daqOrRoi << 7) | (slink << 4) | crate; @@ -24,14 +24,14 @@ uint32_t L1CaloSrcIdMap::getRodID(int crate, int slink, int daqOrRoi, // Make a ROB Source ID from a ROD source ID -uint32_t L1CaloSrcIdMap::getRobID(uint32_t rod_id) +uint32_t L1CaloSrcIdMap::getRobID(uint32_t rod_id) const { return rod_id; } // Make a ROS Source ID from a ROB source ID -uint32_t L1CaloSrcIdMap::getRosID(uint32_t rob_id) +uint32_t L1CaloSrcIdMap::getRosID(uint32_t rob_id) const { eformat::helper::SourceIdentifier id(rob_id); eformat::helper::SourceIdentifier id2(id.subdetector_id(), 0); @@ -40,7 +40,7 @@ uint32_t L1CaloSrcIdMap::getRosID(uint32_t rob_id) // Make a SubDetector ID from ROS source ID -uint32_t L1CaloSrcIdMap::getDetID(uint32_t ros_id) +uint32_t L1CaloSrcIdMap::getDetID(uint32_t ros_id) const { eformat::helper::SourceIdentifier id(ros_id); eformat::helper::SourceIdentifier id2(id.subdetector_id(), 0); @@ -49,7 +49,7 @@ uint32_t L1CaloSrcIdMap::getDetID(uint32_t ros_id) // Return crate from unpacked moduleID -int L1CaloSrcIdMap::crate(uint32_t code) +int L1CaloSrcIdMap::crate(uint32_t code) const { eformat::helper::SourceIdentifier id(code); return id.module_id() & 0xf; @@ -57,7 +57,7 @@ int L1CaloSrcIdMap::crate(uint32_t code) // Return daqOrRoi from unpacked moduleID -int L1CaloSrcIdMap::daqOrRoi(uint32_t code) +int L1CaloSrcIdMap::daqOrRoi(uint32_t code) const { eformat::helper::SourceIdentifier id(code); return (id.module_id() >> 7) & 0x1; @@ -65,7 +65,7 @@ int L1CaloSrcIdMap::daqOrRoi(uint32_t code) // Return slink from unpacked moduleID -int L1CaloSrcIdMap::slink(uint32_t code) +int L1CaloSrcIdMap::slink(uint32_t code) const { eformat::helper::SourceIdentifier id(code); return (id.module_id() >> 4) & 0x3; @@ -74,14 +74,14 @@ int L1CaloSrcIdMap::slink(uint32_t code) // Return the maximum possible number of slinks given number of // bits in module ID -int L1CaloSrcIdMap::maxSlinks() +int L1CaloSrcIdMap::maxSlinks() const { return 4; } // Return sub-detector for given ID -eformat::SubDetector L1CaloSrcIdMap::subDet(uint32_t code) { +eformat::SubDetector L1CaloSrcIdMap::subDet(uint32_t code) const { eformat::helper::SourceIdentifier id(code); return id.subdetector_id(); } diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloSrcIdMap.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloSrcIdMap.h index 329f47eabcd791298a6f7dc89aff3826ff2ee7d1..8badc9f824dbf5d3ac36282f82ed103644768337 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloSrcIdMap.h +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/L1CaloSrcIdMap.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGT1CALOBYTESTREAM_L1CALOSRCIDMAP_H @@ -26,37 +26,37 @@ public: /// Make a ROD Source ID uint32_t getRodID (int crate, int slink, int daqOrRoi, - eformat::SubDetector subdet); + eformat::SubDetector subdet) const; /// Make a ROB Source ID from a ROD source ID - uint32_t getRobID (uint32_t rod_id); + uint32_t getRobID (uint32_t rod_id) const; /// Make a ROS Source ID from a ROB source ID - uint32_t getRosID (uint32_t rob_id); + uint32_t getRosID (uint32_t rob_id) const; /// Make a SubDetector ID from ROS source ID - uint32_t getDetID (uint32_t ros_id); + uint32_t getDetID (uint32_t ros_id) const; /// Return crate from unpacked moduleID - int crate(uint32_t code); + int crate(uint32_t code) const; /// Return daqOrRoi from unpacked moduleID - int daqOrRoi(uint32_t code); + int daqOrRoi(uint32_t code) const; /// Return slink from unpacked moduleID - int slink(uint32_t code); + int slink(uint32_t code) const; /// Return the maximum possible number of slinks - int maxSlinks(); + int maxSlinks() const; /// Return sub-detector for given ID - eformat::SubDetector subDet(uint32_t code); + eformat::SubDetector subDet(uint32_t code) const; /// Return ROD header minor version to use when writing BS - uint16_t minorVersion() {return 0x1004;} // Or may go up to 0x2000, CHECK + uint16_t minorVersion() const {return 0x1004;} // Or may go up to 0x2000, CHECK /// Return last ROD header minor version for pre-LS1 data - uint16_t minorVersionPreLS1() {return 0x1003;} + uint16_t minorVersionPreLS1() const {return 0x1003;} }; diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref index 7a5a00e23ad80112bee04cf9c6ec58ef759b6f9a..130a8de233d907082447d69664cfd41aa988341a 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref +++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref @@ -1,3 +1,12 @@ +TrigSignatureMoniMT INFO HLT_10j40_pf_subresjesgscIS_ftf_L14J15 #3575805394 +TrigSignatureMoniMT INFO -- #3575805394 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #3575805394 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_10j40_subjesIS_L14J15 #2760204981 +TrigSignatureMoniMT INFO -- #2760204981 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2760204981 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_10j40_subresjesgscIS_ftf_L14J15 #3568675904 +TrigSignatureMoniMT INFO -- #3568675904 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #3568675904 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_2e12_lhloose_mu10_L12EM8VH_MU10 #2518246928 TrigSignatureMoniMT INFO -- #2518246928 Events 1 1 0 0 0 0 0 0 0 0 - - - - - 0 TrigSignatureMoniMT INFO -- #2518246928 Features 0 0 0 0 0 0 0 0 - - - - - @@ -97,9 +106,12 @@ TrigSignatureMoniMT INFO -- #2398136098 Features TrigSignatureMoniMT INFO HLT_3j200_L1J100 #2199422919 TrigSignatureMoniMT INFO -- #2199422919 Events 3 3 0 0 0 0 0 0 0 0 0 0 - - - 0 TrigSignatureMoniMT INFO -- #2199422919 Features 0 0 0 0 0 0 0 0 0 0 - - - -TrigSignatureMoniMT INFO HLT_3j200_L1J20 #493765146 -TrigSignatureMoniMT INFO -- #493765146 Events 19 19 0 0 0 0 0 0 0 0 0 0 - - - 0 -TrigSignatureMoniMT INFO -- #493765146 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_3j200_pf_subresjesgscIS_ftf_L1J100 #794428037 +TrigSignatureMoniMT INFO -- #794428037 Events 3 3 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #794428037 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_3j200_subresjesgscIS_ftf_L1J100 #1801834652 +TrigSignatureMoniMT INFO -- #1801834652 Events 3 3 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1801834652 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_3mu6_L13MU6 #1832399408 TrigSignatureMoniMT INFO -- #1832399408 Events 0 0 0 0 0 0 0 0 0 0 - - - - - 0 TrigSignatureMoniMT INFO -- #1832399408 Features 0 0 0 0 0 0 0 0 - - - - - @@ -109,12 +121,63 @@ TrigSignatureMoniMT INFO -- #1199773318 Features TrigSignatureMoniMT INFO HLT_3mu8_msonly_L13MU6 #424835335 TrigSignatureMoniMT INFO -- #424835335 Events 0 0 0 0 0 0 0 0 0 - - - - - - 0 TrigSignatureMoniMT INFO -- #424835335 Features 0 0 0 0 0 0 0 - - - - - - +TrigSignatureMoniMT INFO HLT_4j120_pf_subresjesgscIS_ftf_L13J50 #1755129033 +TrigSignatureMoniMT INFO -- #1755129033 Events 1 1 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1755129033 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_4j120_subjesIS_L13J50 #3722303680 +TrigSignatureMoniMT INFO -- #3722303680 Events 1 1 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #3722303680 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_4j120_subresjesgscIS_ftf_L13J50 #91006165 +TrigSignatureMoniMT INFO -- #91006165 Events 1 1 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #91006165 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_4mu4_L14MU4 #1834383636 TrigSignatureMoniMT INFO -- #1834383636 Events 0 0 0 0 0 0 0 0 0 0 - - - - - 0 TrigSignatureMoniMT INFO -- #1834383636 Features 0 0 0 0 0 0 0 0 - - - - - TrigSignatureMoniMT INFO HLT_5j70_0eta240_L14J20 #1175391812 TrigSignatureMoniMT INFO -- #1175391812 Events 7 7 0 0 0 0 0 0 0 0 0 1 - - - 1 TrigSignatureMoniMT INFO -- #1175391812 Features 0 0 0 0 0 0 0 0 0 5 - - - +TrigSignatureMoniMT INFO HLT_5j70_pf_subresjesgscIS_ftf_0eta240_L14J15 #4189027854 +TrigSignatureMoniMT INFO -- #4189027854 Events 9 9 0 0 0 0 0 0 0 0 0 1 - - - 1 +TrigSignatureMoniMT INFO -- #4189027854 Features 0 0 0 0 0 0 0 0 0 5 - - - +TrigSignatureMoniMT INFO HLT_5j70_subresjesgscIS_ftf_0eta240_L14J15 #819918597 +TrigSignatureMoniMT INFO -- #819918597 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #819918597 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_5j85_pf_subresjesgscIS_ftf_L14J15 #4208121018 +TrigSignatureMoniMT INFO -- #4208121018 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #4208121018 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_5j85_subjesIS_L14J15 #2745094401 +TrigSignatureMoniMT INFO -- #2745094401 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2745094401 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_5j85_subresjesgscIS_ftf_L14J15 #1148892499 +TrigSignatureMoniMT INFO -- #1148892499 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1148892499 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j55_pf_subresjesgscIS_ftf_0eta240_L14J15 #1526259867 +TrigSignatureMoniMT INFO -- #1526259867 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1526259867 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j55_subjesIS_0eta240_L14J15 #68179418 +TrigSignatureMoniMT INFO -- #68179418 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #68179418 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j55_subresjesgscIS_ftf_0eta240_L14J15 #1068073241 +TrigSignatureMoniMT INFO -- #1068073241 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1068073241 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j70_pf_subresjesgscIS_ftf_L14J15 #1755772565 +TrigSignatureMoniMT INFO -- #1755772565 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1755772565 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j70_subjesIS_L14J15 #1003115860 +TrigSignatureMoniMT INFO -- #1003115860 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1003115860 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j70_subresjesgscIS_ftf_L14J15 #59957514 +TrigSignatureMoniMT INFO -- #59957514 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #59957514 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_7j45_pf_subresjesgscIS_ftf_L14J15 #2701381398 +TrigSignatureMoniMT INFO -- #2701381398 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2701381398 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_7j45_subjesIS_L14J15 #2617173782 +TrigSignatureMoniMT INFO -- #2617173782 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2617173782 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_7j45_subresjesgscIS_ftf_L14J15 #2928962349 +TrigSignatureMoniMT INFO -- #2928962349 Events 9 9 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2928962349 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_JetDS_j0_L1J100 #3302698716 TrigSignatureMoniMT INFO -- #3302698716 Events 3 3 0 0 0 0 0 0 0 0 0 3 3 3 - 3 TrigSignatureMoniMT INFO -- #3302698716 Features 0 0 0 0 0 0 0 0 0 81 32 3 - @@ -166,6 +229,9 @@ TrigSignatureMoniMT INFO -- #1703681121 Features TrigSignatureMoniMT INFO HLT_e26_lhtight_L1EM22VHI #1995263521 TrigSignatureMoniMT INFO -- #1995263521 Events 6 6 5 5 5 4 - - - - - - - - - 4 TrigSignatureMoniMT INFO -- #1995263521 Features 5 64 8 4 - - - - - - - - - +TrigSignatureMoniMT INFO HLT_e26_lhtight_ivarloose_L1EM22VHI #2918307206 +TrigSignatureMoniMT INFO -- #2918307206 Events 6 6 5 5 5 3 - - - - - - - - - 3 +TrigSignatureMoniMT INFO -- #2918307206 Features 5 64 8 3 - - - - - - - - - TrigSignatureMoniMT INFO HLT_e26_lhtight_nod0_L1EM22VHI #939763520 TrigSignatureMoniMT INFO -- #939763520 Events 6 6 5 5 5 4 - - - - - - - - - 4 TrigSignatureMoniMT INFO -- #939763520 Features 5 64 8 4 - - - - - - - - - @@ -301,12 +367,12 @@ TrigSignatureMoniMT INFO -- #4176355792 Features TrigSignatureMoniMT INFO HLT_j420_L1J100 #2659902019 TrigSignatureMoniMT INFO -- #2659902019 Events 3 3 0 0 0 0 0 0 0 0 0 0 - - - 0 TrigSignatureMoniMT INFO -- #2659902019 Features 0 0 0 0 0 0 0 0 0 0 - - - -TrigSignatureMoniMT INFO HLT_j420_L1J20 #2205518067 -TrigSignatureMoniMT INFO -- #2205518067 Events 19 19 0 0 0 0 0 0 0 0 0 0 - - - 0 -TrigSignatureMoniMT INFO -- #2205518067 Features 0 0 0 0 0 0 0 0 0 0 - - - -TrigSignatureMoniMT INFO HLT_j420_subjesgscIS_ftf_L1J20 #2116995085 -TrigSignatureMoniMT INFO -- #2116995085 Events 19 19 0 0 0 0 0 0 0 0 0 0 - - - 0 -TrigSignatureMoniMT INFO -- #2116995085 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_j420_pf_subresjesgscIS_ftf_L1J100 #3936932891 +TrigSignatureMoniMT INFO -- #3936932891 Events 3 3 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #3936932891 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_j420_subresjesgscIS_ftf_L1J100 #2477128298 +TrigSignatureMoniMT INFO -- #2477128298 Events 3 3 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2477128298 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_j45_L1J15 #1364976160 TrigSignatureMoniMT INFO -- #1364976160 Events 20 20 0 0 0 0 0 0 0 0 0 19 - - - 19 TrigSignatureMoniMT INFO -- #1364976160 Features 0 0 0 0 0 0 0 0 0 49 - - - @@ -850,6 +916,9 @@ TrigSignatureMoniMT INFO -- #1063154655 Features TrigSignatureMoniMT INFO HLT_timeburner_L1All #819160059 TrigSignatureMoniMT INFO -- #819160059 Events 20 0 0 - - - - - - - - - - - - 0 TrigSignatureMoniMT INFO -- #819160059 Features 0 - - - - - - - - - - - - +TrigSignatureMoniMT INFO HLT_unconvtrk0_L1EM3 #2063803903 +TrigSignatureMoniMT INFO -- #2063803903 Events 20 20 0 - - - - - - - - - - - - 20 +TrigSignatureMoniMT INFO -- #2063803903 Features 0 - - - - - - - - - - - - TrigSignatureMoniMT INFO HLT_xe100_mht_L1XE50 #532175988 TrigSignatureMoniMT INFO -- #532175988 Events 10 10 0 0 0 0 0 0 0 0 0 9 - - - 9 TrigSignatureMoniMT INFO -- #532175988 Features 0 0 0 0 0 0 0 0 0 9 - - - diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref index 2971de46756b0b0571b9f53d21d1b52114d3a440..80bdd240c8c4b6eb042dfb5924ee743662eb07c8 100644 --- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref +++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref @@ -1,3 +1,12 @@ +TrigSignatureMoniMT INFO HLT_10j40_pf_subresjesgscIS_ftf_L14J15 #3575805394 +TrigSignatureMoniMT INFO -- #3575805394 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #3575805394 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_10j40_subjesIS_L14J15 #2760204981 +TrigSignatureMoniMT INFO -- #2760204981 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2760204981 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_10j40_subresjesgscIS_ftf_L14J15 #3568675904 +TrigSignatureMoniMT INFO -- #3568675904 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #3568675904 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_2e12_lhloose_mu10_L12EM8VH_MU10 #2518246928 TrigSignatureMoniMT INFO -- #2518246928 Events 20 20 0 0 0 0 0 0 0 0 - - - - - 0 TrigSignatureMoniMT INFO -- #2518246928 Features 0 0 0 0 0 0 0 0 - - - - - @@ -97,9 +106,12 @@ TrigSignatureMoniMT INFO -- #2398136098 Features TrigSignatureMoniMT INFO HLT_3j200_L1J100 #2199422919 TrigSignatureMoniMT INFO -- #2199422919 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 TrigSignatureMoniMT INFO -- #2199422919 Features 0 0 0 0 0 0 0 0 0 0 - - - -TrigSignatureMoniMT INFO HLT_3j200_L1J20 #493765146 -TrigSignatureMoniMT INFO -- #493765146 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 -TrigSignatureMoniMT INFO -- #493765146 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_3j200_pf_subresjesgscIS_ftf_L1J100 #794428037 +TrigSignatureMoniMT INFO -- #794428037 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #794428037 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_3j200_subresjesgscIS_ftf_L1J100 #1801834652 +TrigSignatureMoniMT INFO -- #1801834652 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1801834652 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_3mu6_L13MU6 #1832399408 TrigSignatureMoniMT INFO -- #1832399408 Events 20 20 0 0 0 0 0 0 0 0 - - - - - 0 TrigSignatureMoniMT INFO -- #1832399408 Features 0 0 0 0 0 0 0 0 - - - - - @@ -109,12 +121,63 @@ TrigSignatureMoniMT INFO -- #1199773318 Features TrigSignatureMoniMT INFO HLT_3mu8_msonly_L13MU6 #424835335 TrigSignatureMoniMT INFO -- #424835335 Events 20 20 0 0 0 0 0 0 0 - - - - - - 0 TrigSignatureMoniMT INFO -- #424835335 Features 0 0 0 0 0 0 0 - - - - - - +TrigSignatureMoniMT INFO HLT_4j120_pf_subresjesgscIS_ftf_L13J50 #1755129033 +TrigSignatureMoniMT INFO -- #1755129033 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1755129033 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_4j120_subjesIS_L13J50 #3722303680 +TrigSignatureMoniMT INFO -- #3722303680 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #3722303680 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_4j120_subresjesgscIS_ftf_L13J50 #91006165 +TrigSignatureMoniMT INFO -- #91006165 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #91006165 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_4mu4_L14MU4 #1834383636 TrigSignatureMoniMT INFO -- #1834383636 Events 20 20 0 0 0 0 0 0 0 0 - - - - - 0 TrigSignatureMoniMT INFO -- #1834383636 Features 0 0 0 0 0 0 0 0 - - - - - TrigSignatureMoniMT INFO HLT_5j70_0eta240_L14J20 #1175391812 TrigSignatureMoniMT INFO -- #1175391812 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 TrigSignatureMoniMT INFO -- #1175391812 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_5j70_pf_subresjesgscIS_ftf_0eta240_L14J15 #4189027854 +TrigSignatureMoniMT INFO -- #4189027854 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #4189027854 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_5j70_subresjesgscIS_ftf_0eta240_L14J15 #819918597 +TrigSignatureMoniMT INFO -- #819918597 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #819918597 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_5j85_pf_subresjesgscIS_ftf_L14J15 #4208121018 +TrigSignatureMoniMT INFO -- #4208121018 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #4208121018 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_5j85_subjesIS_L14J15 #2745094401 +TrigSignatureMoniMT INFO -- #2745094401 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2745094401 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_5j85_subresjesgscIS_ftf_L14J15 #1148892499 +TrigSignatureMoniMT INFO -- #1148892499 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1148892499 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j55_pf_subresjesgscIS_ftf_0eta240_L14J15 #1526259867 +TrigSignatureMoniMT INFO -- #1526259867 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1526259867 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j55_subjesIS_0eta240_L14J15 #68179418 +TrigSignatureMoniMT INFO -- #68179418 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #68179418 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j55_subresjesgscIS_ftf_0eta240_L14J15 #1068073241 +TrigSignatureMoniMT INFO -- #1068073241 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1068073241 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j70_pf_subresjesgscIS_ftf_L14J15 #1755772565 +TrigSignatureMoniMT INFO -- #1755772565 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1755772565 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j70_subjesIS_L14J15 #1003115860 +TrigSignatureMoniMT INFO -- #1003115860 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #1003115860 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_6j70_subresjesgscIS_ftf_L14J15 #59957514 +TrigSignatureMoniMT INFO -- #59957514 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #59957514 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_7j45_pf_subresjesgscIS_ftf_L14J15 #2701381398 +TrigSignatureMoniMT INFO -- #2701381398 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2701381398 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_7j45_subjesIS_L14J15 #2617173782 +TrigSignatureMoniMT INFO -- #2617173782 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2617173782 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_7j45_subresjesgscIS_ftf_L14J15 #2928962349 +TrigSignatureMoniMT INFO -- #2928962349 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2928962349 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_JetDS_j0_L1J100 #3302698716 TrigSignatureMoniMT INFO -- #3302698716 Events 20 20 0 0 0 0 0 0 0 0 0 0 0 0 - 0 TrigSignatureMoniMT INFO -- #3302698716 Features 0 0 0 0 0 0 0 0 0 0 0 0 - @@ -166,6 +229,9 @@ TrigSignatureMoniMT INFO -- #1703681121 Features TrigSignatureMoniMT INFO HLT_e26_lhtight_L1EM22VHI #1995263521 TrigSignatureMoniMT INFO -- #1995263521 Events 20 20 0 0 0 0 - - - - - - - - - 0 TrigSignatureMoniMT INFO -- #1995263521 Features 0 0 0 0 - - - - - - - - - +TrigSignatureMoniMT INFO HLT_e26_lhtight_ivarloose_L1EM22VHI #2918307206 +TrigSignatureMoniMT INFO -- #2918307206 Events 20 20 0 0 0 0 - - - - - - - - - 0 +TrigSignatureMoniMT INFO -- #2918307206 Features 0 0 0 0 - - - - - - - - - TrigSignatureMoniMT INFO HLT_e26_lhtight_nod0_L1EM22VHI #939763520 TrigSignatureMoniMT INFO -- #939763520 Events 20 20 0 0 0 0 - - - - - - - - - 0 TrigSignatureMoniMT INFO -- #939763520 Features 0 0 0 0 - - - - - - - - - @@ -301,12 +367,12 @@ TrigSignatureMoniMT INFO -- #4176355792 Features TrigSignatureMoniMT INFO HLT_j420_L1J100 #2659902019 TrigSignatureMoniMT INFO -- #2659902019 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 TrigSignatureMoniMT INFO -- #2659902019 Features 0 0 0 0 0 0 0 0 0 0 - - - -TrigSignatureMoniMT INFO HLT_j420_L1J20 #2205518067 -TrigSignatureMoniMT INFO -- #2205518067 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 -TrigSignatureMoniMT INFO -- #2205518067 Features 0 0 0 0 0 0 0 0 0 0 - - - -TrigSignatureMoniMT INFO HLT_j420_subjesgscIS_ftf_L1J20 #2116995085 -TrigSignatureMoniMT INFO -- #2116995085 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 -TrigSignatureMoniMT INFO -- #2116995085 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_j420_pf_subresjesgscIS_ftf_L1J100 #3936932891 +TrigSignatureMoniMT INFO -- #3936932891 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #3936932891 Features 0 0 0 0 0 0 0 0 0 0 - - - +TrigSignatureMoniMT INFO HLT_j420_subresjesgscIS_ftf_L1J100 #2477128298 +TrigSignatureMoniMT INFO -- #2477128298 Events 20 20 0 0 0 0 0 0 0 0 0 0 - - - 0 +TrigSignatureMoniMT INFO -- #2477128298 Features 0 0 0 0 0 0 0 0 0 0 - - - TrigSignatureMoniMT INFO HLT_j45_L1J15 #1364976160 TrigSignatureMoniMT INFO -- #1364976160 Events 20 20 0 0 0 0 0 0 0 0 0 6 - - - 6 TrigSignatureMoniMT INFO -- #1364976160 Features 0 0 0 0 0 0 0 0 0 6 - - - @@ -850,6 +916,9 @@ TrigSignatureMoniMT INFO -- #1063154655 Features TrigSignatureMoniMT INFO HLT_timeburner_L1All #819160059 TrigSignatureMoniMT INFO -- #819160059 Events 20 20 0 - - - - - - - - - - - - 0 TrigSignatureMoniMT INFO -- #819160059 Features 0 - - - - - - - - - - - - +TrigSignatureMoniMT INFO HLT_unconvtrk0_L1EM3 #2063803903 +TrigSignatureMoniMT INFO -- #2063803903 Events 20 20 0 - - - - - - - - - - - - 20 +TrigSignatureMoniMT INFO -- #2063803903 Features 0 - - - - - - - - - - - - TrigSignatureMoniMT INFO HLT_xe100_mht_L1XE50 #532175988 TrigSignatureMoniMT INFO -- #532175988 Events 20 20 0 0 0 0 0 0 0 0 0 1 - - - 1 TrigSignatureMoniMT INFO -- #532175988 Features 0 0 0 0 0 0 0 0 0 1 - - - diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDM.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDM.py index 03b000d1d0d3ce1311dad690d06357e7698fd7b1..958c933a3c3201cc7b45a42a3d149c6a5b25235c 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDM.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDM.py @@ -10,8 +10,8 @@ from TrigEDMConfig.TriggerEDMRun1 import TriggerL2List,TriggerEFList,TriggerResultsRun1List from TrigEDMConfig.TriggerEDMRun2 import TriggerResultsList,TriggerLvl1List,TriggerIDTruth,TriggerHLTList,EDMDetails,EDMLibraries,TriggerL2EvolutionList,TriggerEFEvolutionList -from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTListRun3, AllowedOutputFormats - +from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTListRun3, AllowedOutputFormats,addExtraCollectionsToEDMList +from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags from AthenaCommon.Logging import logging log = logging.getLogger('TriggerEDM') @@ -22,6 +22,12 @@ import six # For Run 3 # #************************************************************ +# Let adding collections via preExec for detailed validation +if flags.Trigger.ExtraEDMList: + log.info( "Adding extra collections to EDM (): {}".format(len(TriggerHLTListRun3), flags.Trigger.ExtraEDMList) ) + addExtraCollectionsToEDMList(TriggerHLTListRun3, flags.Trigger.ExtraEDMList) + log.info( "Number of EDM items after adding extra collections: {}".format(len(TriggerHLTListRun3)) ) + def getTriggerEDMList(key, runVersion): """ diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py index 166e4ac79d8fc2876614bb86919f3531b16b34cb..12494865fdc24243daea1e32e4471b0cc09bbcf9 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py @@ -545,3 +545,42 @@ def addHLTNavigationToEDMList(edmList, allDecisions, hypoDecisions): edmList.extend([ (typeName, HLTNavEDMTargets, 'Steer'), (typeNameAux, HLTNavEDMTargets, 'Steer')]) + +def addExtraCollectionsToEDMList(edmList, extraList): + """ + Extend edmList with extraList, keeping track whether a completely new + collection is being added, or a dynamic variable is added to an existing collection. + The format of extraList is the same as those of TriggerHLTListRun3. + """ + existing_collections = [(c[0].split("#")[1]).split(".")[0] for c in edmList] + for item in extraList: + colname = (item[0].split("#")[1]).split(".")[0] + if colname not in existing_collections: + # a new collection is added + edmList.append(item) + __log.info("added new item to Trigger EDM: {}".format(item)) + else: + if "Aux." in item[0]: + # probably an extra dynamic variable is added + # new variables to add: + dynVars = (item[0].split("#")[1]).split(".")[1:] + # find the index of the existing item + existing_item_nr = [i for i,s in enumerate(edmList) if colname == (s[0].split("#")[1]).split(".")[0]] + if len(existing_item_nr) != 1: + __log.error("Found {} existing edm items corresponding to new item {}, but it must be exactly one!".format(len(existing_item_nr), item)) + # merge lists of variables + existing_dynVars = (edmList[existing_item_nr[0]][0].split("#")[1]).split(".")[1:] + dynVars.extend(existing_dynVars) + # remove duplicates: + dynVars = list(dict.fromkeys(dynVars)) + newVars = '.'.join(dynVars) + typename = item[0].split("#")[0] + __log.info("old item in Trigger EDM: {}".format(edmList[existing_item_nr[0]])) + targets = edmList[existing_item_nr[0]][1] + signature = edmList[existing_item_nr[0]][2] + edmList.pop(existing_item_nr[0]) + edmList.insert(existing_item_nr[0] , (typename + "#" + colname + "." + newVars, targets, signature)) + __log.info("updated item in Trigger EDM: {}".format(edmList[existing_item_nr[0]])) + else: + # asking to add some collection which is already in the list - do nothing + pass diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/SliceFlagsMT.py b/Trigger/TriggerCommon/TriggerJobOpts/python/SliceFlagsMT.py index fc81778f69eed406788d2050be9561c5816099c0..63371925ede90ef4503d2d8a514c6b01ad378cb5 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/SliceFlagsMT.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/SliceFlagsMT.py @@ -16,4 +16,5 @@ import TriggerJobOpts.StreamingSliceFlags import TriggerJobOpts.MonitorSliceFlags import TriggerJobOpts.BeamspotSliceFlags import TriggerJobOpts.EnhancedBiasSliceFlags +import TriggerJobOpts.UnconventionalTrackingSliceFlags import TriggerJobOpts.TestSliceFlags diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py index 21712271096921c1c5a3109edaf6530c3d3271bd..24cb4b5f01dbee30919e8a3076d44c777acf2ca5 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py @@ -434,10 +434,17 @@ def triggerPOOLOutputCfg(flags, edmSet): return acc -def triggerMergeViewsAndAddMissingEDMCfg( edmSet, hypos, viewMakers, decObj, decObjHypoOut ): +def triggerMergeViewsAndAddMissingEDMCfg( flags, edmSet, hypos, viewMakers, decObj, decObjHypoOut ): HLTEDMCreatorAlg, HLTEDMCreator=CompFactory.getComps("HLTEDMCreatorAlg","HLTEDMCreator",) - from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTListRun3 + from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTListRun3, addExtraCollectionsToEDMList + + __log.info( "Number of EDM items in triggerMergeViewsAndAddMissingEDMCfg: {}".format(len(TriggerHLTListRun3)) ) + if flags.Trigger.ExtraEDMList: + __log.info( "Adding extra collections to EDM: {}".format(flags.Trigger.ExtraEDMList) ) + addExtraCollectionsToEDMList(TriggerHLTListRun3, flags.Trigger.ExtraEDMList) + __log.info( "Number of EDM items after adding extra collections: {}".format(len(TriggerHLTListRun3)) ) + alg = HLTEDMCreatorAlg("EDMCreatorAlg") @@ -578,14 +585,16 @@ def triggerRunCfg( flags, seqName = None, menu=None ): # Add HLT Navigation to EDM list from TrigEDMConfig import TriggerEDMRun3 + __log.info( "Number of EDM items before adding navigation: {}".format(len(TriggerEDMRun3.TriggerHLTListRun3)) ) TriggerEDMRun3.addHLTNavigationToEDMList(TriggerEDMRun3.TriggerHLTListRun3, decObj, decObjHypoOut) + __log.info( "Number of EDM items after adding navigation: {}".format(len(TriggerEDMRun3.TriggerHLTListRun3)) ) # Configure output writing outputAcc, edmSet = triggerOutputCfg( flags, summaryAlg ) acc.merge( outputAcc ) if edmSet: - mergingAlg = triggerMergeViewsAndAddMissingEDMCfg( [edmSet] , hypos, viewMakers, decObj, decObjHypoOut ) + mergingAlg = triggerMergeViewsAndAddMissingEDMCfg( flags, [edmSet] , hypos, viewMakers, decObj, decObjHypoOut ) acc.addEventAlgo( mergingAlg, sequenceName="HLTFinalizeSeq" ) return acc diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py index 20b243769ba91f9e613c0a16f74f0d592d7db22a..d46f3d48a559f3b82dc7136d69eb06fbb3bc82f2 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py @@ -154,6 +154,9 @@ def createTriggerFlags(): # list of objects to be written to ESD flags.addFlag('Trigger.ESDEDMSet', 'ESD') + # to allow stroing extra EDM items via preExec + flags.addFlag('Trigger.ExtraEDMList', []) + # tag to be used for condutions used by HLT code flags.addFlag('Trigger.OnlineCondTag', 'CONDBR2-HLTP-2018-01') diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/UnconventionalTrackingSliceFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/UnconventionalTrackingSliceFlags.py new file mode 100644 index 0000000000000000000000000000000000000000..0862c49c1a3f57c46e677087eaec455e90213dd5 --- /dev/null +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/UnconventionalTrackingSliceFlags.py @@ -0,0 +1,45 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +""" UnconventionalTracking slice specific flags """ + +from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer +from AthenaCommon.JobProperties import jobproperties # noqa: F401 +from TriggerJobOpts.CommonSignatureHelper import CommonSignatureHelper + +__doc__="UnconventionalTracking slice specific flags " + + +_flags = [] + + +class SliceList(JobProperty): + """ List of chains provided by the Unconventional Tracking slice """ + statusOn=True + allowedTypes=['list'] + StoredValue=[] +_flags.append(SliceList) + + +class signatures(JobProperty): + """ signatures in UnconventionalTracking slice """ + statusOn=True + allowedTypes = ['list'] + StoredValue = [] +_flags.append(signatures) + + +class UnconventionalTrackingSlice(JobPropertyContainer, CommonSignatureHelper): + """ UnconventionalTracking Slice Flags """ + +from TriggerJobOpts.TriggerFlags import TriggerFlags +TriggerFlags.add_Container(UnconventionalTrackingSlice) + +# add add common slice flags +#TriggerFlags.UnconventionalTrackingSlice.import_JobProperties('TriggerJobOpts.CommonSignatureFlags') + +for flag in _flags: + TriggerFlags.UnconventionalTrackingSlice.add_JobProperty(flag) +del _flags + +# make an alias +UnconventionalTrackingSliceFlags = TriggerFlags.UnconventionalTrackingSlice diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py index 2a9b7361c5a8f3d487307cb496d8149bcd5a35a5..8db42b0135da28dd333fdcb46e2a7a45c868d222 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py @@ -1,3 +1,4 @@ + # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ################################################################################ # TriggerJobOpts/runHLT_standalone.py @@ -60,6 +61,7 @@ class opt: doMonitorSlice = True doBeamspotSlice = True doCosmicSlice = True + doUnconventionalTrackingSlice = True reverseViews = False filterViews = False enabledSignatures = [] diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py index baa42bc230ff14e9b2237f2853db2e1c23cb12ea..c720effd018a51a877c7eaf34d5fcb2eaffbde31 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronDef.py @@ -29,6 +29,7 @@ def precisionCaloSequenceCfg( flags ): def precisionElectronSequenceCfg( flags ): return precisionElectronMenuSequence() + # this must be moved to the HypoTool file: def diElectronMassComboHypoToolFromDict(chainDict): from TrigEgammaHypo.TrigEgammaHypoConf import TrigEgammaDielectronMassHypoTool @@ -69,11 +70,21 @@ class ElectronChainConfiguration(ChainConfigurationBase): 'lhvloosenoringer' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], 'lhmediumnoringer' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], 'lhtightnoringer' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], + 'lhlooseivarloose' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], + 'lhlooseivarmedium' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], + 'lhlooseivartight' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], + 'lhlmediumivarloose' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], + 'lhlmediumivarmedium': ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], + 'lhlmediumivartight' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], + 'lhtightivarloose' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], + 'lhtightivarmedium' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], + 'lhtightivartight' : ['getFastCalo', 'getFastElectron', 'getPrecisionCaloElectron', 'getPrecisionElectron'], } log.debug('electron chain part = ' + str(self.chainPart)) key = self.chainPart['extra'] + self.chainPart['IDinfo'] + self.chainPart['L2IDAlg'] + self.chainPart['isoInfo'] + for addInfo in self.chainPart['addInfo']: key+=addInfo @@ -110,10 +121,14 @@ class ElectronChainConfiguration(ChainConfigurationBase): return self.getStep(3,stepName,[ precisionCaloSequenceCfg]) def getPrecisionElectron(self): + + isocut = self.chainPart['isoInfo'] + log.debug(' isolation cut = ' + str(isocut)) + if "Zee" in self.chainName: - stepName = "precision_topoelectron" + stepName = "precision_topoelectron"+isocut return self.getStep(4,stepName,sequenceCfgArray=[precisionElectronSequenceCfg], comboTools=[diElectronMassComboHypoToolFromDict]) else: - stepName = "precision_electron" + stepName = "precision_electron"+isocut return self.getStep(4,stepName,[ precisionElectronSequenceCfg]) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py index 43c8626b8c53888335abf2fec51b8454c0dc5f05..7b73ecb169f605a488a1900495dcebba736bc7d3 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/DictFromChainName.py @@ -276,7 +276,8 @@ def analyseChainName(chainName, L1thresholds, L1item): (AllowedCalibChainIdentifiers, 'Calib', 'calib'), (AllowedMonitorChainIdentifiers, 'Monitor', 'calib'), (AllowedBeamspotChainIdentifiers, 'Beamspot', 'beamspot'), - (['eb'], 'EnhancedBias', 'eb') ]: + (['eb'], 'EnhancedBias', 'eb'), + (['unconvtrk'], 'UnconventionalTracking', 'unconvtrk')]: if cpart in chainCategory[0]: log.debug('Doing chain type {}'.format(chainCategory[1])) multichainindex.append(hltChainNameShort.index(cpart)) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py index 139b8e871d87f2a9faa5eea11c9ae40af521edff..47b508b57744cead0aa12484615e0726b3d1844c 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py @@ -66,7 +66,7 @@ class GenerateMenuMT(object): self.signaturesToGenerate = [] self.allSignatures = ['Egamma', 'Muon', 'Jet', 'Bjet', 'Bphysics', 'MET', 'Tau', 'HeavyIon', 'Beamspot', 'Cosmic', 'EnhancedBias', - 'Monitor', 'Calib', 'Streaming', 'Combined', 'MinBias', 'Test'] #, AFP + 'Monitor', 'Calib', 'Streaming', 'Combined', 'MinBias', 'UnconventionalTracking', 'Test'] #, AFP self.calibCosmicMonSigs = ['Streaming','Monitor','Beamspot','Cosmic', 'Calib'] #others not implemented yet ['Beamspot', 'Cosmic', 'EnhancedBias', 'Monitor', 'Calib', 'Streaming'] # flags @@ -86,6 +86,7 @@ class GenerateMenuMT(object): self.doMonitorChains = True self.doBeamspotChains = True self.doEnhancedBiasChains = True + self.doUnconventionalTrackingChains = True self.doCombinedChains = True self.doTestChains = True diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py index 5e92b3a3add2a61f37bba94c3ab2b32c883ea6cc..8cb1cb454e15cb34937d47a02aa9895b36a8e518 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py @@ -189,7 +189,7 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None): appendCAtoAthena( monAcc ) Configurable.configurableRun3Behavior=1 - edmAlg = triggerMergeViewsAndAddMissingEDMCfg(['AOD', 'ESD'], hypos, viewMakers, decObj, decObjHypoOut) + edmAlg = triggerMergeViewsAndAddMissingEDMCfg(ConfigFlags, ['AOD', 'ESD'], hypos, viewMakers, decObj, decObjHypoOut) Configurable.configurableRun3Behavior=0 # C) Finally, we create the EDM output hltFinalizeSeq += conf2toConfigurable(edmAlg) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index d069fe24f82763ebc8d3a0c870246c8461dc8b2f..5ebd5fe57b0d008d8d6a991560d90677a3eb16e9 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -118,6 +118,7 @@ def setupMenu(): # Primary ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH', groups=SingleElectronGroup), ChainProp(name='HLT_e26_lhtight_L1EM22VHI', groups=SingleElectronGroup), + ChainProp(name='HLT_e26_lhtight_ivarloose_L1EM22VHI', groups=SingleElectronGroup), ChainProp(name='HLT_e26_lhtight_nod0_L1EM22VHI', groups=SingleElectronGroup), ChainProp(name='HLT_e26_lhtight_nod0_L1EM24VHI', groups=SingleElectronGroup), ChainProp(name='HLT_e60_lhmedium_L1EM22VHI', groups=SingleElectronGroup), @@ -191,7 +192,6 @@ def setupMenu(): TriggerFlags.JetSlice.signatures = TriggerFlags.JetSlice.signatures() + [ ChainProp(name='HLT_j85_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j45_L1J15', groups=SingleJetGroup), - ChainProp(name='HLT_j420_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j45_subjesgscIS_ftf_L1J15', groups=SingleJetGroup), ChainProp(name='HLT_j45_subresjesgscIS_ftf_L1J15', groups=SingleJetGroup), ChainProp(name='HLT_j45_subjesgscIS_ftf_011jvt_L1J15', groups=SingleJetGroup), @@ -200,14 +200,11 @@ def setupMenu(): ChainProp(name='HLT_j45_ftf_L1J15', groups=SingleJetGroup), ChainProp(name='HLT_j85_ftf_L1J20', groups=SingleJetGroup), - ChainProp(name='HLT_j45_pf_ftf_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j45_pf_subjesgscIS_ftf_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j45_pf_subresjesgscIS_ftf_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j85_pf_ftf_L1J20', groups=SingleJetGroup), - ChainProp(name='HLT_j420_subjesgscIS_ftf_L1J20', groups=SingleJetGroup), - ChainProp(name='HLT_j45_nojcalib_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j45_sktc_nojcalib_L1J20', groups=SingleJetGroup), ChainProp(name='HLT_j45_cssktc_nojcalib_L1J20', groups=SingleJetGroup), @@ -230,7 +227,6 @@ def setupMenu(): ChainProp(name='HLT_j460_a10sd_csskpf_jes_ftf_35smcINF_L1J100', groups=SingleJetGroup), ChainProp(name='HLT_2j330_a10sd_csskpf_jes_ftf_35smcINF_L1J100', groups=SingleJetGroup), - ChainProp(name='HLT_3j200_L1J20', groups=MultiJetGroup), ChainProp(name='HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20', groups=SingleJetGroup), # ATR-20624 @@ -239,6 +235,39 @@ def setupMenu(): # TLA test chain, ATR-20395 ChainProp(name='HLT_JetDS_j0_L1J100', stream=['JetDS'], groups=SingleJetGroup), + # ATR-22096 + ChainProp(name='HLT_j420_subresjesgscIS_ftf_L1J100', groups=SingleJetGroup), + ChainProp(name='HLT_j420_pf_subresjesgscIS_ftf_L1J100', groups=SingleJetGroup), + # + ChainProp(name='HLT_3j200_subresjesgscIS_ftf_L1J100', groups=MultiJetGroup), + ChainProp(name='HLT_3j200_pf_subresjesgscIS_ftf_L1J100', groups=MultiJetGroup), + # + ChainProp(name='HLT_4j120_subjesIS_L13J50', groups=MultiJetGroup), + ChainProp(name='HLT_4j120_subresjesgscIS_ftf_L13J50', groups=MultiJetGroup), + ChainProp(name='HLT_4j120_pf_subresjesgscIS_ftf_L13J50', groups=MultiJetGroup), + # + ChainProp(name='HLT_5j70_subresjesgscIS_ftf_0eta240_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_5j70_pf_subresjesgscIS_ftf_0eta240_L14J15', groups=MultiJetGroup), + # + ChainProp(name='HLT_5j85_subjesIS_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_5j85_subresjesgscIS_ftf_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_5j85_pf_subresjesgscIS_ftf_L14J15', groups=MultiJetGroup), + # + ChainProp(name='HLT_6j55_subjesIS_0eta240_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_6j55_subresjesgscIS_ftf_0eta240_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_6j55_pf_subresjesgscIS_ftf_0eta240_L14J15', groups=MultiJetGroup), + # + ChainProp(name='HLT_6j70_subjesIS_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_6j70_subresjesgscIS_ftf_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_6j70_pf_subresjesgscIS_ftf_L14J15', groups=MultiJetGroup), + # + ChainProp(name='HLT_7j45_subjesIS_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_7j45_subresjesgscIS_ftf_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_7j45_pf_subresjesgscIS_ftf_L14J15', groups=MultiJetGroup), + # + ChainProp(name='HLT_10j40_subjesIS_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_10j40_subresjesgscIS_ftf_L14J15', groups=MultiJetGroup), + ChainProp(name='HLT_10j40_pf_subresjesgscIS_ftf_L14J15', groups=MultiJetGroup), ] TriggerFlags.BjetSlice.signatures = TriggerFlags.BjetSlice.signatures() + [ @@ -352,4 +381,7 @@ def setupMenu(): TriggerFlags.EnhancedBiasSlice.signatures = TriggerFlags.EnhancedBiasSlice.signatures() + [ ] + TriggerFlags.UnconventionalTrackingSlice.signatures = TriggerFlags.UnconventionalTrackingSlice.signatures() + [ + ChainProp(name='HLT_unconvtrk0_L1EM3', groups=SinglePhotonGroup, l1SeedThresholds=['FSNOSEED']), + ] diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuAlignmentTools.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuAlignmentTools.py index 55a0690d61884ba351aff35323161257f3b7d95b..2d5252be534c8fec6cc94597afc10051cd999031 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuAlignmentTools.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuAlignmentTools.py @@ -20,7 +20,8 @@ the_signature_grouping = OrderedDict([ ('Jet','JetMET'), ('MET','JetMET'), ('Bjet','JetMET'), - ('MuonnoL1', 'MuonnoL1') + ('MuonnoL1', 'MuonnoL1'), + ('UnconventionalTracking','UnconventionalTracking'), ]) def getAlignmentGroupFromPattern(sName, extra): @@ -122,4 +123,3 @@ def setChainSignatures(signatures, lengthOfChainConfigs): # maybe they should all be added to the_signature_grouping, even if they never # need to be merged together return signatures, lengthOfChainConfigs - diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Physics_pp_run3_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Physics_pp_run3_v1.py index f00186c181c169bdee7aaf4bc32113d601619ff8..6ad08d81ca8fa866498fa49c3d3182269b5baebd 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Physics_pp_run3_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Physics_pp_run3_v1.py @@ -144,3 +144,4 @@ def setupMenu(): # Random Seeded EB chains which select at the HLT based on L1 TBP bits TriggerFlags.EnhancedBiasSlice.signatures = [ ] + TriggerFlags.UnconventionalTrackingSlice.signatures = [ ] diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py index 1f066bcdd9b7cecb0416938046e44e9eb2a00309..6672a64523cb933717cb0c5a6ff311167262e8be 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/SignatureDicts.py @@ -28,6 +28,7 @@ SliceIDDict = { 'Monitor' : 'mon', 'Beamspot' : 'beamspot', 'EnhancedBias' : 'eb', + 'UnconventionalTracking' : 'unconvtrk', 'Test' : 'TestChain', } @@ -36,6 +37,7 @@ AllowedSignatures = ["jet", "bjet", "ht", "muon", "met", "tau", + "unconvtrk", "minbias", "heavyion", "cosmic", @@ -62,7 +64,7 @@ ChainDictTemplate = { #========================================================== # Test chains #========================================================== -# ---- Test Dictinary of all allowed Values ---- +# ---- Test Dictionary of all allowed Values ---- TestChainParts = { 'L1threshold' : '', 'signature' : ['Test'], @@ -90,7 +92,7 @@ TestChainParts_Default = { # Jet #========================================================== AllowedTopos_jet = [] -# ---- Jet Dictinary of all allowed Values ---- +# ---- Jet Dictionary of all allowed Values ---- JetChainParts = { 'signature' : ['Jet'], 'alignmentGroup': ['Jet','JetMET'], @@ -135,7 +137,7 @@ JetChainParts = { 'smc' : ['30smcINF', '35smcINF', '40smcINF', '50smcINF', '60smcINF', 'nosmc'], } -# ---- Jet Dictinary of default Values ---- +# ---- Jet Dictionary of default Values ---- JetChainParts_Default = { 'signature' : ['Jet'], 'alignmentGroup': ['Jet'], @@ -173,13 +175,13 @@ bJetChainParts_Default = { #========================================================== # HT chains #========================================================== -# ---- HT Dictinary of all allowed Values ---- +# ---- HT Dictionary of all allowed Values ---- HTChainParts = deepcopy(JetChainParts) HTChainParts['signature'] = ['HT'] HTChainParts['trigType'] = ['ht'] HTChainParts['extra'] = ['j20', 'j25', 'j30', 'test4'] -# ---- HTDictinary of default Values ---- +# ---- HTDictionary of default Values ---- HTChainParts_Default = deepcopy(JetChainParts_Default) HTChainParts_Default['signature'] = ['HT'] HTChainParts_Default['trigType'] = 'ht' @@ -190,7 +192,7 @@ HTChainParts_Default['extra'] = '' #========================================================== AllowedTopos_mu = [] -# ---- Muon Dictinary of all allowed Values ---- +# ---- Muon Dictionary of all allowed Values ---- MuonChainParts = { 'signature' : ['Muon'], 'alignmentGroup' : ['Muon','MuonnoL1'], @@ -208,7 +210,7 @@ MuonChainParts = { 'topo' : AllowedTopos_mu, 'flavour' : [], } -# ---- MuonDictinary of default Values ---- +# ---- MuonDictionary of default Values ---- MuonChainParts_Default = { 'signature' : ['Muon'], 'alignmentGroup' : ['Muon'], @@ -231,12 +233,12 @@ MuonChainParts_Default = { #========================================================== AllowedTopos_Bphysics = ['bJpsimumu','bUpsimumu','bBmumu','bDimu','bDimu2700','bPhi','bTau'] -# ---- Bphysics Dictinary of all allowed Values ---- +# ---- Bphysics Dictionary of all allowed Values ---- BphysicsChainParts = deepcopy(MuonChainParts) BphysicsChainParts['signature'] = ['Bphysics'] BphysicsChainParts['topo'] = AllowedTopos_Bphysics -# ---- Bphysics Dictinary of default Values ---- +# ---- Bphysics Dictionary of default Values ---- BphysicsChainParts_Default = deepcopy(MuonChainParts_Default) BphysicsChainParts_Default['signature'] = ['Bphysics'] BphysicsChainParts_Default['topo'] = [] @@ -286,7 +288,7 @@ TauChainParts_Default = { # MET #========================================================== AllowedTopos_xe = [] -# ---- Met Dictinary of all allowed Values ---- +# ---- Met Dictionary of all allowed Values ---- METChainParts = { 'signature' : ['MET'], 'alignmentGroup' : ['MET','JetMET'], @@ -306,7 +308,7 @@ METChainParts = { 'EFmuonCorr' : [], 'addInfo' : ['FStracks'], } -# ---- MetDictinary of default Values ---- +# ---- MetDictionary of default Values ---- METChainParts_Default = { 'signature' : ['MET'], 'alignmentGroup' : ['MET'], @@ -327,12 +329,12 @@ METChainParts_Default = { #========================================================== # XS #========================================================== -# ---- xs Dictinary of all allowed Values ---- +# ---- xs Dictionary of all allowed Values ---- XSChainParts = METChainParts XSChainParts['signature'] = ['XS'] XSChainParts['trigType'] = ['xs'] -# ---- xs Dictinary of default Values ---- +# ---- xs Dictionary of default Values ---- XSChainParts_Default = METChainParts_Default XSChainParts_Default['signature'] = ['XS'] XSChainParts_Default['trigType'] = ['xs'] @@ -340,12 +342,12 @@ XSChainParts_Default['trigType'] = ['xs'] #========================================================== # TE #========================================================== -# ---- te Dictinary of all allowed Values ---- +# ---- te Dictionary of all allowed Values ---- TEChainParts = METChainParts TEChainParts['signature'] = ['TE'] TEChainParts['trigType'] = ['te'] -# ---- te Dictinary of default Values ---- +# ---- te Dictionary of default Values ---- TEChainParts_Default = METChainParts_Default TEChainParts_Default['signature'] = ['TE'] TEChainParts_Default['trigType'] = ['te'] @@ -354,7 +356,7 @@ TEChainParts_Default['trigType'] = ['te'] # Electron Chains #========================================================== AllowedTopos_e = ["Jpsiee","Zeg","Zee"] -# ---- Electron Dictinary of all allowed Values ---- +# ---- Electron Dictionary of all allowed Values ---- ElectronChainParts = { 'signature' : ['Electron'], 'alignmentGroup' : ['Electron','Egamma'], @@ -366,14 +368,14 @@ ElectronChainParts = { 'threshold' : '', 'etaRange' : [], 'IDinfo' : ['lhvloose','lhloose','lhmedium','lhtight'], - 'isoInfo' : [], + 'isoInfo' : ['ivarloose','ivarmedium','ivartight'], 'trkInfo' : ['nod0', 'idperf'], 'caloInfo' : [], 'lhInfo' : [], 'L2IDAlg' : ['noringer'], 'addInfo' : [ 'etcut', 'etcut1step',"v2","v3"], } -# ---- Egamma Dictinary of default Values ---- +# ---- Egamma Dictionary of default Values ---- ElectronChainParts_Default = { 'signature' : ['Electron'], 'alignmentGroup' : ['Electron'], @@ -400,7 +402,7 @@ ElectronChainParts_Default = { #========================================================== # Photon chains #========================================================== -# ---- Photon Dictinary of all allowed Values ---- +# ---- Photon Dictionary of all allowed Values ---- PhotonChainParts = { 'L1threshold' : '', 'signature' : ['Photon'], @@ -421,7 +423,7 @@ PhotonChainParts = { 'addInfo' : ['etcut',], } -# ---- Photon Dictinary of default Values ---- +# ---- Photon Dictionary of default Values ---- PhotonChainParts_Default = { 'signature' : ['Photon'], 'alignmentGroup' : ['Photon'], @@ -470,7 +472,7 @@ MinBiasChainParts = { 'recoAlg' : ['mbts', 'sptrk', 'sp', 'noalg', 'perf', 'hmt', 'hmtperf', 'idperf', 'zdcperf'], 'addInfo' : ['peb'], } -# ---- MinBiasDictinary of default Values ---- +# ---- MinBiasDictionary of default Values ---- MinBiasChainParts_Default = { 'signature' : ['MinBias'], 'alignmentGroup' : ['MinBias'], @@ -517,7 +519,7 @@ HeavyIonChainParts = { 'gap' : [], } -# ---- HeavyIonDictinary of default Values ---- +# ---- HeavyIonDictionary of default Values ---- HeavyIonChainParts_Default = { 'signature' : ['HeavyIon'], 'alignmentGroup' : ['HeavyIon'], @@ -547,7 +549,7 @@ AllowedCosmicChainIdentifiers = ['larps','larhec', 'tilecalib', 'sct', 'id',] -# ---- Cosmic Chain Dictinary of all allowed Values ---- +# ---- Cosmic Chain Dictionary of all allowed Values ---- CosmicChainParts = { 'signature' : ['Cosmic'], 'alignmentGroup' : ['Cosmic'], @@ -563,7 +565,7 @@ CosmicChainParts = { 'extra' : '', } -# ---- Cosmic Chain Default Dictinary of all allowed Values ---- +# ---- Cosmic Chain Default Dictionary of all allowed Values ---- CosmicChainParts_Default = { 'signature' : ['Cosmic'], 'alignmentGroup' : ['Cosmic'], @@ -585,7 +587,7 @@ CosmicChainParts_Default = { #========================================================== AllowedStreamingChainIdentifiers = ['noalg'] -# ---- Streaming Chain Dictinary of all allowed Values ---- +# ---- Streaming Chain Dictionary of all allowed Values ---- StreamingChainParts = { 'signature' : ['Streaming'], 'alignmentGroup' : ['Streaming'], @@ -603,7 +605,7 @@ StreamingChainParts = { 'algo' : ['NoAlg'] } -# ---- Cosmic Chain Default Dictinary of all allowed Values ---- +# ---- Cosmic Chain Default Dictionary of all allowed Values ---- StreamingChainParts_Default = { 'signature' : ['Streaming'], 'alignmentGroup' : ['Streaming'], @@ -629,7 +631,7 @@ AllowedCalibChainIdentifiers = ['csccalib', 'larcalib', 'calibAFP', ] -# ---- Calib Chain Dictinary of all allowed Values ---- +# ---- Calib Chain Dictionary of all allowed Values ---- ##stramingInfo not use in ChainConfiguration, only to distinguish streaming CalibChainParts = { @@ -648,7 +650,7 @@ CalibChainParts = { 'extra' : ['rerun','bs',''], } -# ---- Calib Chain Default Dictinary of all allowed Values ---- +# ---- Calib Chain Default Dictionary of all allowed Values ---- CalibChainParts_Default = { 'signature' : ['Calib'], 'alignmentGroup' : ['Calib'], @@ -676,7 +678,7 @@ AllowedMonitorChainIdentifiers = ['robrequest', 'timeburner', 'costmonitor', 'mistimemoncaltimenomu','mistimemoncaltime', 'mistimemonj400',] -# ---- Monitor Chain Dictinary of all allowed Values ---- +# ---- Monitor Chain Dictionary of all allowed Values ---- MonitorChainParts = { 'signature' : ['Monitor'], 'alignmentGroup' : ['Monitor'], @@ -690,7 +692,7 @@ MonitorChainParts = { 'extra' : '', } -# ---- Monitor Chain Default Dictinary of all allowed Values ---- +# ---- Monitor Chain Default Dictionary of all allowed Values ---- MonitorChainParts_Default = { 'signature' : ['Monitor'], 'alignmentGroup' : ['Monitor'], @@ -710,7 +712,7 @@ MonitorChainParts_Default = { #========================================================== AllowedEBChainIdentifiers = ['eb'] -# ---- Enhanced Bias Chain Dictinary of all allowed Values ---- +# ---- Enhanced Bias Chain Dictionary of all allowed Values ---- EnhancedBiasChainParts = { 'signature' : ['EnhancedBias'], 'alignmentGroup' : ['EnhancedBias'], @@ -723,7 +725,7 @@ EnhancedBiasChainParts = { 'extra' : '', } -# ---- EnhancedBias Chain Default Dictinary of all allowed Values ---- +# ---- EnhancedBias Chain Default Dictionary of all allowed Values ---- EnhancedBiasChainParts_Default = { 'signature' : ['EnhancedBias'], 'alignmentGroup' : ['EnhancedBias'], @@ -756,7 +758,7 @@ BeamspotChainParts = { 'extra' : '', } -# ---- Beamspot Chain Default Dictinary of all allowed Values ---- +# ---- Beamspot Chain Default Dictionary of all allowed Values ---- BeamspotChainParts_Default = { 'signature' : ['Beamspot'], 'alignmentGroup' : ['Beamspot'], @@ -773,17 +775,45 @@ BeamspotChainParts_Default = { 'extra' : '', } +#========================================================== +# Unconventional Tracking +#========================================================== +# ---- Unconventional Tracking Dictionary of all allowed Values ---- +UnconventionalTrackingChainParts = { + 'signature' : ['UnconventionalTracking'], + 'alignmentGroup' : ['UnconventionalTracking'], + 'L1threshold' : '', + 'chainPartName' : [], + 'multiplicity' : '', + 'trigType' : ['unconvtrk'], + 'threshold' : '', + 'extra' : '', + 'addInfo' : [], +} +# ---- Unconventional Tracking Dictionary of default Values ---- +UnconventionalTrackingChainParts_Default = { + 'signature' : ['UnconventionalTracking'], + 'alignmentGroup' : ['UnconventionalTracking'], + 'L1threshold' : '', + 'chainPartName' : [], + 'multiplicity' : '', + 'trigType' : ['unconvtrk'], + 'threshold' : '', + 'extra' : '', + 'addInfo' : [], +} + #========================================================== # Combined Chains #========================================================== AllowedTopos_comb = [] -# ---- Combined Dictinary of all allowed Values ---- +# ---- Combined Dictionary of all allowed Values ---- CombinedChainParts = deepcopy(PhotonChainParts) CombinedChainParts['signature'] = ['Photon','Muon'] CombinedChainParts['chainParts'] = ['g','mu'], CombinedChainParts['topo'] = AllowedTopos_comb -# ---- Combined Dictinary of default Values ---- +# ---- Combined Dictionary of default Values ---- CombinedChainParts_Default = deepcopy(PhotonChainParts_Default) CombinedChainParts_Default['signature'] = ['Photon','Muon'] CombinedChainParts_Default['chainParts'] = ['g','mu'], @@ -860,6 +890,8 @@ def getSignatureInformation(signature): return [BeamspotChainParts_Default, BeamspotChainParts] if signature == "EnhancedBias": return [EnhancedBiasChainParts_Default, EnhancedBiasChainParts] + if signature == "UnconventionalTracking": + return [UnconventionalTrackingChainParts_Default, UnconventionalTrackingChainParts] if signature == "Test": return [TestChainParts_Default, TestChainParts] else: diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/UnconventionalTracking/GenerateUnconventionalTrackingChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/UnconventionalTracking/GenerateUnconventionalTrackingChainDefs.py new file mode 100644 index 0000000000000000000000000000000000000000..a71d9b172722bdb9735b2d869392dec9f23c9c8e --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/UnconventionalTracking/GenerateUnconventionalTrackingChainDefs.py @@ -0,0 +1,21 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +from TriggerMenuMT.HLTMenuConfig.UnconventionalTracking.UnconventionalTrackingChainConfiguration import UnconventionalTrackingChainConfiguration + +import pprint +from AthenaCommon.Logging import logging +log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.UnconventionalTracking.generateChainConfigs' ) +log.info("Importing %s",__name__) + + + +def generateChainConfigs( chainDict ): + log.debug('dictionary is: %s\n', pprint.pformat(chainDict)) + + # Unconventional tracking chain is assembled always from the full dictionary (multiple legs are handled internally by the jet reco / hypo) + theChainDef = UnconventionalTrackingChainConfiguration(chainDict) + + unconventionalTrackingChain = theChainDef.assembleChain() + + + return unconventionalTrackingChain diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/UnconventionalTracking/UnconventionalTrackingChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/UnconventionalTracking/UnconventionalTrackingChainConfiguration.py new file mode 100644 index 0000000000000000000000000000000000000000..2f84064bc1494a34e1974fad43c77131e753578c --- /dev/null +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/UnconventionalTracking/UnconventionalTrackingChainConfiguration.py @@ -0,0 +1,50 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.Logging import logging +logging.getLogger().info("Importing %s",__name__) +log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.UnconventionalTracking.UnconventionalTrackingDef") + +from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase + + +def unconventionalTrackingChainParts(chainParts): + unconvtrkChainParts = [] + for p in chainParts: + if p['trigType'] == 'unconvtrk': + unconvtrkChainParts.append(p) + return unconvtrkChainParts + +#---------------------------------------------------------------- +# Class to configure chain +#---------------------------------------------------------------- +class UnconventionalTrackingChainConfiguration(ChainConfigurationBase): + + def __init__(self, chainDict): + ChainConfigurationBase.__init__(self,chainDict) + + # ---------------------- + # Assemble the chain depending on information from chainName + # ---------------------- + def assembleChain(self): + log.debug("Assembling chain " + self.chainName) + + steps=[self.getEmptyStep(1, 'unconv_empty')] + + chainSteps = [] + for step in steps: + chainSteps+=[step] + + myChain = self.buildChain(chainSteps) + return myChain + + + # -------------------- + # Configuration of steps + # -------------------- + def getUnconventionalTrackingChainStep(self): + pass + + + + +