diff --git a/DetectorDescription/RegionSelector/python/RegSelSvcDefault.py b/DetectorDescription/RegionSelector/python/RegSelSvcDefault.py index 4a2231c261f39ac555b71bc363485e02bca267e1..9c1a98542ec8a20dffe8eb37defee62a62772469 100755 --- a/DetectorDescription/RegionSelector/python/RegSelSvcDefault.py +++ b/DetectorDescription/RegionSelector/python/RegSelSvcDefault.py @@ -39,23 +39,10 @@ class RegSelSvcDefault ( RegSelSvc ) : cscTable = None mmTable = None stgcTable = None - ftkTable = None from AthenaCommon.DetFlags import DetFlags if DetFlags.detdescr.ID_on(): - # if DetFlags.detdescr.ftk_on(): ### is the ftk properly integrated yet ??? - from InDetRegionSelector.InDetRegionSelectorConf import FTK_RegionSelectorTable - if DetFlags.detdescr.FTK_on(): - - ftkTable = FTK_RegionSelectorTable(name = "FTK_RegionSelectorTable", - ManagerName = "", - OutputFile = "RoITableFTK.txt", - PrintHashId = True, - PrintTable = False) - mlog.debug(ftkTable) - - if DetFlags.detdescr.pixel_on(): from InDetRegionSelector.InDetRegionSelectorConf import SiRegionSelectorTable pixTable = SiRegionSelectorTable(name = "PixelRegionSelectorTable", @@ -130,7 +117,6 @@ class RegSelSvcDefault ( RegSelSvc ) : self.PixelRegionLUT_CreatorTool = pixTable self.SCT_RegionLUT_CreatorTool = sctTable self.TRT_RegionLUT_CreatorTool = trtTable - self.FTKRegionSelectorTable = ftkTable self.LArRegionSelectorTable = larTable self.TileRegionSelectorTable = tileTable @@ -173,10 +159,6 @@ class RegSelSvcDefault ( RegSelSvc ) : self.enableTRT = True else: self.enableTRT = False - if DetFlags.detdescr.FTK_on(): - self.enableFTK = True - else: - self.enableFTK = False else: self.enableID = False @@ -226,7 +208,6 @@ class RegSelSvcDefault ( RegSelSvc ) : self.enablePixel = False self.enableSCT = False self.enableTRT = False - self.enableFTK = False self.enableCalo = False self.enableMuon = False diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx index 20f033ab91df365e6c3f53744b06d28a0dcdc83f..779f215d48af03c1a2b91580c83e58b9ab5e712d 100755 --- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx +++ b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx @@ -80,9 +80,6 @@ RegSelSvc::RegSelSvc(const std::string& name, ISvcLocator* sl) m_lutCreatorToolCSC ("CSC_RegionSelectorTable", this), m_lutCreatorToolMM ("MM_RegionSelectorTable", this), m_lutCreatorToolsTGC ("sTGC_RegionSelectorTable", this), - m_initFTK(false), - m_lutCreatorToolFTK ("FTK_RegionSelectorTable", this), - m_ftklut(nullptr), m_duplicateRemoval( true ) { //! Declare properties @@ -100,13 +97,11 @@ RegSelSvc::RegSelSvc(const std::string& name, ISvcLocator* sl) declareProperty( "enableCSC", m_initCSC, "enable CSC map" ); declareProperty( "enableMM", m_initMM, "enable MM map" ); declareProperty( "enablesTGC", m_initsTGC, "enable sTGC map" ); - declareProperty( "enableFTK", m_initFTK, "enable FTK map" ); declareProperty( "WriteTables", m_dumpTable, "write out maps to files for debugging" ); declareProperty( "OutputFile", m_roiFileName, "base filename used to write maps to" ); declareProperty( "PixelRegionLUT_CreatorTool", m_lutCreatorToolPixel); declareProperty( "SCT_RegionLUT_CreatorTool", m_lutCreatorToolSCT); declareProperty( "TRT_RegionLUT_CreatorTool", m_lutCreatorToolTRT); - declareProperty( "FTKRegionSelectorTable", m_lutCreatorToolFTK); declareProperty( "LArRegionSelectorTable", m_lutCreatorToolLAR); declareProperty( "TileRegionSelectorTable", m_lutCreatorToolTile); declareProperty( "RPCRegionSelectorTable", m_lutCreatorToolRPC); @@ -194,10 +189,6 @@ StatusCode RegSelSvc::initialize() { if ( !m_initTRT.value() ) trtflag = "disabled"; } - std::string ftkflag("enabled"); - if ( !m_initFTK.value() ) ftkflag = "disabled"; - - std::string rpcflag("enabled"); std::string mdtflag("enabled"); std::string tgcflag("enabled"); @@ -219,7 +210,7 @@ StatusCode RegSelSvc::initialize() { msg(MSG::INFO) << "detector switches:" << " indet=" << (m_initOnlyID.value() ? "enabled":"disabled"); if( m_initOnlyID.value() ) - msg() << " ( sct=" << sctflag << " pixel=" << pixelflag << " trt=" << trtflag << " ftk=" << ftkflag << " )"; + msg() << " ( sct=" << sctflag << " pixel=" << pixelflag << " trt=" << trtflag << " )"; msg() << " calo=" << (m_initOnlyCalo.value() ? "enabled":"disabled") << " muon=" << (m_initOnlyMuon.value() ? "enabled":"disabled"); @@ -456,32 +447,6 @@ bool RegSelSvc::handleID() { // do any more than just extract the tables. - if ( m_initFTK.value() ) { - - ATH_MSG_INFO( "setting up the FTK tables " ); - - StatusCode sc = readFromSG(m_lutCreatorToolFTK, m_ftklut); - - if (sc.isFailure()){ - ATH_MSG_WARNING( "Failed to initialize ftk lut" ); - errorFlag = true; - } - else { - if ( m_ftklut ) { - ATH_MSG_INFO( "retrieved ftk RegSelSiLUT" ); - } - else { - ATH_MSG_ERROR( "retrieved ftk RegSelSiLUT is NULL" ); - errorFlag = true; - } - } - - } - else { - ATH_MSG_INFO( "not setting up the FTK tables " ); - } - - //! Read PIXEL data from Detector Store if ( m_initPixel.value() ) { StatusCode sc = readFromSG(m_lutCreatorToolPixel, m_newpixel); @@ -991,11 +956,6 @@ void RegSelSvc::DetHashIDList(DETID detectorID, if ( m_newstgc ) m_newstgc->getHashList(selroi, IDList); break; } - case FTK: { // FTK - RegSelRoI roi2( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() ); - if ( m_ftklut ) m_ftklut->getHashList(roi2, IDList); - break; - } case LAR: { // Liquid Argon Calorimeter m_larData.regionSelector(etaMin, etaMax, phiMin, phiMax, IDList); break; @@ -1107,11 +1067,6 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer, if ( m_newstgc ) m_newstgc->getHashList(selroi, layer, IDList); break; } - case FTK: { // FTK - RegSelRoI roi2( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() ); - if ( m_ftklut ) m_ftklut->getHashList(roi2, layer, IDList); - break; - } case LAR: { // Liquid Argon Calorimeter m_larData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax, IDList); break; @@ -1196,10 +1151,6 @@ void RegSelSvc::DetHashIDList(DETID detectorID, if ( m_newstgc ) m_newstgc->getHashList(IDList); break; } - case FTK: { // FTK - if ( m_ftklut ) m_ftklut->getHashList(IDList); - break; - } case LAR: { // Liquid Argon Calorimeter /// NB: the tables themselves should have explicit, optimised full scan methods /// that don't need to check the eta/phi limits of the modules!! @@ -1290,10 +1241,6 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer, if ( m_newstgc ) m_newstgc->getHashList( layer, IDList); break; } - case FTK: { // FTK - if ( m_ftklut ) m_ftklut->getHashList( layer, IDList); - break; - } case LAR: { // Liquid Argon Calorimeter double etaMin=-4.8; double etaMax=4.8; double phiMin=-M_PI;double phiMax=M_PI; m_larData.regionSelector(sampling, etaMin, etaMax, phiMin, phiMax, IDList); @@ -1411,11 +1358,6 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, if ( m_newstgc ) m_newstgc->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); break; } - case FTK: { - RegSelRoI roi2( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() ); - if ( m_ftklut ) m_ftklut->getRobList(roi2, outputROBIDList, m_duplicateRemoval ); - break; - } case LAR: { // Liquid Argon Calorimeter m_larData.regionSelectorRobIdUint( etaMin, etaMax, phiMin, phiMax, outputROBIDList); break; @@ -1528,11 +1470,6 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer, if ( m_newstgc ) m_newstgc->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval ); break; } - case FTK: { - RegSelRoI roi2( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() ); - if ( m_ftklut ) m_ftklut->getRobList(roi2, layer, outputROBIDList, m_duplicateRemoval ); - break; - } case LAR: { // Liquid Argon Calorimeter m_larData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList); break; @@ -1601,10 +1538,6 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, if ( m_newcsc ) m_newcsc->getRobList(outputROBIDList); break; } - case FTK: { - if ( m_ftklut ) m_ftklut->getRobList(outputROBIDList); - break; - } case LAR: { // Liquid Argon Calorimeter double etaMin=-4.8; double etaMax=4.8; double phiMin=-M_PI;double phiMax=M_PI; m_larData.regionSelectorRobIdUint( etaMin, etaMax, phiMin, phiMax, outputROBIDList); @@ -1682,10 +1615,6 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer, if ( m_newcsc ) m_newcsc->getRobList( layer, outputROBIDList ); break; } - case FTK: { - if ( m_ftklut ) m_ftklut->getRobList( layer, outputROBIDList ); - break; - } case LAR: { // Liquid Argon Calorimeter double etaMin=-4.8; double etaMax=4.8; double phiMin=-M_PI;double phiMax=M_PI; m_larData.regionSelectorRobIdUint(sampling, etaMin, etaMax, phiMin, phiMax, outputROBIDList); @@ -1989,7 +1918,6 @@ void RegSelSvc::openDataStatus(StatusCode &sc, DETID type, case CSC: strcpy(strtmp,"CSC"); break; case MM: strcpy(strtmp,"MM"); break; case STGC: strcpy(strtmp,"sTGC"); break; - case FTK: strcpy(strtmp,"FTK"); break; default: break; } @@ -2028,7 +1956,6 @@ void RegSelSvc::openDataStatus(StatusCode &sc, DETID type, case CSC: strcpy(strtmp,"CSC"); break; case MM: strcpy(strtmp,"MM"); break; case STGC: strcpy(strtmp,"sTGC"); break; - case FTK: strcpy(strtmp,"FTK"); break; default: break; } @@ -2143,7 +2070,6 @@ void RegSelSvc::getDetname(const std::string& detTypeStr, std::vector<std::strin detName.push_back("PIXEL"); detName.push_back("SCT"); detName.push_back("TRT"); - detName.push_back("FTK"); } else if(detTypeStr == "Calorimeter"){ detName.push_back("LAR"); diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.h b/DetectorDescription/RegionSelector/src/RegSelSvc.h index 57f7966afb9a44cf22d2d65d72fccfc3c27b0b17..e71fe3da12b20e69b737a834de5d021e2f91b143 100755 --- a/DetectorDescription/RegionSelector/src/RegSelSvc.h +++ b/DetectorDescription/RegionSelector/src/RegSelSvc.h @@ -513,7 +513,6 @@ private: BooleanProperty m_initFTK; ToolHandle<IRegionIDLUT_Creator> m_lutCreatorToolFTK; - RegSelSiLUT* m_ftklut{nullptr}; bool m_duplicateRemoval; diff --git a/DetectorDescription/RegionSelector/src/obsolete.icc b/DetectorDescription/RegionSelector/src/obsolete.icc index d8124943ae2fc18b3cf7b80000c206d59f8ebc31..dea79b16ab50f3780a0bcc580cb0e6b379b012ae 100644 --- a/DetectorDescription/RegionSelector/src/obsolete.icc +++ b/DetectorDescription/RegionSelector/src/obsolete.icc @@ -785,10 +785,6 @@ void RegSelSvc::DetHashIDList(DETID detectorID, if ( m_newtrt ) m_newtrt->getHashList(roi, *IDList); break; } - case FTK: { - if ( m_ftklut ) m_ftklut->getModules(roi, *IDList); - break; - } case RPC: { // RPC (obviously) if ( m_newrpc ) m_newrpc->getHashList(roi, *IDList); break; diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/FTK_RegionSelectorTable.h b/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/FTK_RegionSelectorTable.h deleted file mode 100755 index c8f2c66a4cb5059df59ed9dcb8533c32d6d5b327..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDetDescr/InDetRegionSelector/InDetRegionSelector/FTK_RegionSelectorTable.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef InDetRegionSelector_FTK_RegionSelectorTable_h -#define InDetRegionSelector_FTK_RegionSelectorTable_h - -#include "RegSelLUT/IRegionIDLUT_Creator.h" - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" - -class RegSelSiLUT; - -#include <string> - -///////////////////////////////////////////////////////////////////////////// - -class FTK_RegionSelectorTable : public AthAlgTool, virtual public IRegionIDLUT_Creator -{ - -public: - FTK_RegionSelectorTable (const std::string&, - const std::string&, - const IInterface*); - virtual ~FTK_RegionSelectorTable(); - StatusCode initialize(); - StatusCode finalize(); - - virtual RegSelSiLUT* getLUT() const; - -private: - - StatusCode createTable(); - - RegSelSiLUT* m_regionLUT; - - // Algorithm properties - std::string m_managerName; - - std::string m_roiFileName; - bool m_printHashId; - bool m_printTable; - - // cablings - -}; - -#endif // InDetRegionSelector_FTK_RegionSelectorTable_h diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/doc/packagedoc.h b/InnerDetector/InDetDetDescr/InDetRegionSelector/doc/packagedoc.h index 4b3399fc763632c7ac1dcb74b4e743ffbd5194bc..038724ae8185850075b8069f35a5eb167016b3f0 100644 --- a/InnerDetector/InDetDetDescr/InDetRegionSelector/doc/packagedoc.h +++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/doc/packagedoc.h @@ -53,8 +53,6 @@ The package contains the two tools: - SiRegionSelectorTable: Pixel and SCT - TRT_RegionSelectorTable: For TRT. - - FTK_RegionSelectorTable: For FTK. - @section InDetRegionSelector_InDetRegionSelectorJobOptions Job Options diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/share/InDetRegionSelectorTable_jobOptions.py b/InnerDetector/InDetDetDescr/InDetRegionSelector/share/InDetRegionSelectorTable_jobOptions.py index 2fa3061db7c6d4487ae494c378ccd59d6da88eb2..9e7eeb7d4a9e15f71569d040befe4ae58b472ec3 100755 --- a/InnerDetector/InDetDetDescr/InDetRegionSelector/share/InDetRegionSelectorTable_jobOptions.py +++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/share/InDetRegionSelectorTable_jobOptions.py @@ -62,21 +62,6 @@ if DetFlags.detdescr.TRT_on(): print TRT_RegionSelectorTable else : TRT_RegionSelectorTable = None - -if DetFlags.detdescr.FTK_on(): - from InDetRegionSelector.InDetRegionSelectorConf import FTK_RegionSelectorTable - FTK_RegionSelectorTable = FTK_RegionSelectorTable(name = "FTK_RegionSelectorTable", - ManagerName = "FTK", - OutputFile = "RoITableFTK.txt", - PrintHashId = True, - PrintTable = False) - ToolSvc += FTK_RegionSelectorTable - print FTK_RegionSelectorTable -else : - print "FTK_RegionSelectorTable not being set up" - FTK_RegionSelectorTable = None - - # # --- now load algorithm # diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/FTK_RegionSelectorTable.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/FTK_RegionSelectorTable.cxx deleted file mode 100755 index c86044649505679ff48189c5602174d570d8e7fe..0000000000000000000000000000000000000000 --- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/FTK_RegionSelectorTable.cxx +++ /dev/null @@ -1,184 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "InDetRegionSelector/FTK_RegionSelectorTable.h" - -// #include "GaudiKernel/MsgStream.h" - -#include "CLHEP/Units/SystemOfUnits.h" - -#include "Identifier/IdentifierHash.h" - -#include <iostream> -#include <fstream> -#include <fstream> - -#include "RegSelLUT/StoreGateIDRS_ClassDEF.h" - -#include "RegSelLUT/RegSelSiLUT.h" - -using namespace std; - -#define USE_STOREGATE - - -///////////////////////////////////////////////////////////////////////////// - -FTK_RegionSelectorTable::FTK_RegionSelectorTable(const std::string& type, - const std::string& name, - const IInterface* parent) - : AthAlgTool(type,name,parent), - m_regionLUT(nullptr), - m_managerName(""), - m_roiFileName("RoITable.txt"), - m_printHashId(true), - m_printTable(false) -{ - declareInterface<IRegionIDLUT_Creator>(this); - declareProperty("ManagerName", m_managerName); - - // The remaining properties are for debugging purposes. - declareProperty("OutputFile", m_roiFileName); - declareProperty("PrintHashId", m_printHashId); - declareProperty("PrintTable", m_printTable); -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -StatusCode -FTK_RegionSelectorTable::initialize(){ - msg(MSG::INFO) << "initialize() " << name() << " " << PACKAGE_VERSION << endmsg; - msg(MSG::INFO) << "Tool Properties" << endmsg; - msg(MSG::INFO) << " Detector Manager: " << m_managerName << endmsg; - if( msgLvl(MSG::DEBUG) ) { - msg(MSG::DEBUG) << " Output File: " << m_roiFileName <<endmsg; - msg(MSG::DEBUG) << " Print hashId: " << ((m_printHashId) ? "true" : "false") <<endmsg; - msg(MSG::DEBUG) << " Print Table: " << ((m_printTable) ? "true" : "false") <<endmsg; - } - - if (m_managerName.empty()) { - msg(MSG::WARNING) << "no manager found - so far none for the FTK tables" << endmsg; - } - - StatusCode sc; - sc = createTable(); - return sc; -} - - -FTK_RegionSelectorTable::~FTK_RegionSelectorTable() -{ - // table is stored in storegate so nothing to delete. -#ifndef USE_STOREGATE - if ( m_regionLUT ) delete m_regionLUT; -#endif -} - - -// Get the lookup table. -RegSelSiLUT* FTK_RegionSelectorTable::getLUT() const -{ - return m_regionLUT; -} - - - -StatusCode -FTK_RegionSelectorTable::createTable() -{ - if ( msgLvl(MSG::DEBUG) ) msg(MSG::DEBUG) << "Creating region selector table" << endmsg; - RegSelSiLUT* rd = new RegSelSiLUT(RegSelSiLUT::FTK); /// NB: use default internal size parameters here - - /// Whay hey!!! so here we actually need to somehow create the lookup objects and - /// add them to the table - msg(MSG::INFO) << " initialising new map " << endmsg; - std::string detName; - std::string newkey; - newkey = "FTKRegSelSiLUT"; - detName = "FTK"; - -#ifndef USE_STOREGATE - if ( m_regionLUT ) delete m_regionLUT; -#endif - - m_regionLUT = rd; - - /// create here, some dummy modules and add them to the lookup table - /// NB: when the ftk code is set up, these modules will need to be - /// created from parameters extracted from an fk helper of some - /// sort - - - /// FIXME: these are just *fake* vlaues - really the values should - /// come automatically from the FTK detector manager - /// when they are abailable from there, this *must* be changed - /// to use it - - int hashid=0; - - const int Nz = 4; - const int Nphi = 32; - - /// fake limits in z - double zmin[Nz+1] = { -200, -100, 0, 100, 200 }; - double zmax[Nz+1] = { -5000, -2000, 0, 2000, 5000 }; - - /// fake limits in r - double rmin = 30; - double rmax = 600; - - /// just replace this by the loop over regions omn the FTK and - /// calculating the actual parameters - - double dphi = 2*M_PI/Nphi; - msg(MSG::INFO) << "generating dummy FTK modules" << endmsg; - for ( int i=0; i<Nphi ; i++ ) { - for ( int j=0; j<Nz ; j++ ) { - double phimin=j*dphi-M_PI; - double phimax=(j+1)*dphi-M_PI; - - /// use int rather than IdentifierHash here, since an IdentiferHash - /// is just a wrapper to an int, but has no ++ operator etc - RegSelModule m( zmin[j], zmin[j+1], - zmax[j], zmax[j+1], - rmin, rmax, phimin, phimax, 0, 0, hashid, hashid ); - - rd->addModule( m ); - - msg(MSG::DEBUG) << "\t" << m << endmsg; - - hashid++; - - } - } - - -#ifdef USE_STOREGATE - // save new map in StoreGate - if ( detStore()->contains< RegSelSiLUT >(newkey) ) { - msg(MSG::FATAL) << " RegSelSiLUT " << newkey << " already exists " << endmsg; - } else { - // create and store LUT - // needs to be modifiable so we can enable/disable modules - // from the RegSelSvc (probably not for FTK however) - StatusCode sc = detStore()->record(rd, newkey, true); - if ( sc.isFailure() ) { - msg(MSG::ERROR) << " could not register " << detName << " RegSelSiLUT" << endmsg; - return( StatusCode::FAILURE ); - } else { - msg(MSG::INFO) << detName << " RegSelSiLUT successfully saved in detector Store" << endmsg; - } - } -#endif - - return StatusCode::SUCCESS; -} - - - -StatusCode FTK_RegionSelectorTable::finalize() { - msg(MSG::INFO) << "finalize()" << endmsg; - return StatusCode::SUCCESS; -} - diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/components/InDetRegionSelector_entries.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/components/InDetRegionSelector_entries.cxx index 77b9d225e8ac636c4c4e6ab48cd2fb098fbdfe77..f0ea80f5cef4af197cc6bffed8d18c5f9e996f2f 100644 --- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/components/InDetRegionSelector_entries.cxx +++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/components/InDetRegionSelector_entries.cxx @@ -1,10 +1,8 @@ #include "InDetRegionSelector/InDetRegionSelectorLUT.h" #include "InDetRegionSelector/SiRegionSelectorTable.h" -#include "InDetRegionSelector/FTK_RegionSelectorTable.h" #include "InDetRegionSelector/TRT_RegionSelectorTable.h" DECLARE_COMPONENT( InDetDD::InDetRegionSelectorLUT ) DECLARE_COMPONENT( SiRegionSelectorTable ) DECLARE_COMPONENT( TRT_RegionSelectorTable ) -DECLARE_COMPONENT( FTK_RegionSelectorTable ) diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt index bca68cc0604d4a7206e1ac94880e9217e7dffc98..1f95e74391ff2ee91370d853308e9c91d3f0c486 100644 --- a/Projects/Athena/package_filters.txt +++ b/Projects/Athena/package_filters.txt @@ -45,7 +45,6 @@ - Reconstruction/Jet/JetJvtEfficiency - Reconstruction/Jet/JetReclustering - Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching -- Trigger/TrigFTK/FTKStandaloneMonitoring # Data quality packages that would generally go to AthDataQuality, but should be built in Athena # until we have Run 3 Tier-0 ops diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/CMakeLists.txt b/Trigger/TrigEvent/TrigEventAthenaPool/CMakeLists.txt index 2ee257d463062cc165383e4c727db295474c5f81..f285a8c19227baedd72745f1eb7d7b4913b07670 100644 --- a/Trigger/TrigEvent/TrigEventAthenaPool/CMakeLists.txt +++ b/Trigger/TrigEvent/TrigEventAthenaPool/CMakeLists.txt @@ -31,16 +31,14 @@ atlas_depends_on_subdirs( PUBLIC Trigger/TrigEvent/TrigParticle Trigger/TrigEvent/TrigParticleTPCnv Trigger/TrigEvent/TrigTopoEvent - Trigger/TrigEvent/TrigTopoEventTPCnv - Trigger/TrigFTK/TrigFTK_RawData - Trigger/TrigFTK/TrigFTK_RawDataTPCnv ) + Trigger/TrigEvent/TrigTopoEventTPCnv ) # Component(s) in the package: atlas_add_poolcnv_library( TrigEventAthenaPoolPoolCnv src/*.cxx - FILES TrigParticle/TrigL2BphysContainer.h TrigParticle/TrigElectronContainer.h TrigParticle/TrigTauContainer.h TrigParticle/TrigTau.h TrigParticle/TrigL2BjetContainer.h TrigParticle/TrigEFBjetContainer.h TrigParticle/TrigPhotonContainer.h TrigParticle/TrigEFBphysContainer.h TrigDecisionEvent/TrigDecision.h TrigInDetEvent/TrigInDetTrackCollection.h TrigInDetEvent/TrigVertexCollection.h TrigInDetEvent/TrigTauTracksInfo.h TrigInDetEvent/TrigTauTracksInfoCollection.h TrigInDetEvent/TrigHisto1D.h TrigInDetEvent/TrigHisto2D.h TrigInDetEvent/TrigSpacePointCounts.h TrigInDetEvent/TrigSpacePointCountsCollection.h TrigInDetEvent/TrigTrtHitCounts.h TrigInDetEvent/TrigTrtHitCountsCollection.h TrigInDetEvent/TrigTrackCounts.h TrigInDetEvent/TrigTrackCountsCollection.h TrigInDetEvent/TrigVertexCounts.h TrigInDetEvent/TrigVertexCountsCollection.h TrigCombinedEvent/TrigComposite.h TrigCombinedEvent/TrigCompositeContainer.h TrigMuonEvent/MuonFeature.h TrigMuonEvent/MuonFeatureContainer.h TrigMuonEvent/MuonFeatureDetails.h TrigMuonEvent/MuonFeatureDetailsContainer.h TrigMuonEvent/CombinedMuonFeature.h TrigMuonEvent/CombinedMuonFeatureContainer.h TrigMuonEvent/IsoMuonFeature.h TrigMuonEvent/IsoMuonFeatureContainer.h TrigMuonEvent/TrigMuonClusterFeature.h TrigMuonEvent/TrigMuonClusterFeatureContainer.h TrigMuonEvent/TileMuFeature.h TrigMuonEvent/TileMuFeatureContainer.h TrigMuonEvent/TileTrackMuFeature.h TrigMuonEvent/TileTrackMuFeatureContainer.h TrigMuonEvent/TrigMuonEFContainer.h TrigMuonEvent/TrigMuonEFInfoContainer.h TrigMuonEvent/TrigMuonEFIsolationContainer.h TrigMuonEvent/TrigCombDiMuonContainer.h TrigBphysicsEvent/TrigJpsi.h TrigBphysicsEvent/TrigJpsiContainer.h TrigCaloEvent/TrigEMCluster.h TrigCaloEvent/TrigEMClusterContainer.h TrigCaloEvent/TrigTauCluster.h TrigCaloEvent/TrigTauClusterContainer.h TrigCaloEvent/TrigTauClusterDetails.h TrigCaloEvent/TrigTauClusterDetailsContainer.h TrigCaloEvent/TrigT2MbtsBits.h TrigCaloEvent/TrigT2MbtsBitsContainer.h TrigCaloEvent/TrigT2ZdcSignals.h TrigCaloEvent/TrigT2ZdcSignalsContainer.h TrigCaloEvent/TrigT2Jet.h TrigCaloEvent/TrigT2JetContainer.h TrigMissingEtEvent/TrigMissingET.h TrigMissingEtEvent/TrigMissingETContainer.h TrigCaloEvent/RingerRings.h TrigCaloEvent/RingerRingsContainer.h TrigCaloEvent/TrigRNNOutput.h TrigCaloEvent/TrigRNNOutputContainer.h TrigCaloEvent/TrigCaloCluster.h TrigCaloEvent/TrigCaloClusterContainer.h TrigTopoEvent/ElectronMuonTopoInfo.h TrigTopoEvent/ElectronMuonTopoInfoContainer.h TrigMonitoringEvent/TrigMonEvent.h TrigMonitoringEvent/TrigMonEventCollection.h TrigMonitoringEvent/TrigMonConfig.h TrigMonitoringEvent/TrigMonConfigCollection.h TrigFTK_RawData/FTK_RawTrackContainer.h + FILES TrigParticle/TrigL2BphysContainer.h TrigParticle/TrigElectronContainer.h TrigParticle/TrigTauContainer.h TrigParticle/TrigTau.h TrigParticle/TrigL2BjetContainer.h TrigParticle/TrigEFBjetContainer.h TrigParticle/TrigPhotonContainer.h TrigParticle/TrigEFBphysContainer.h TrigDecisionEvent/TrigDecision.h TrigInDetEvent/TrigInDetTrackCollection.h TrigInDetEvent/TrigVertexCollection.h TrigInDetEvent/TrigTauTracksInfo.h TrigInDetEvent/TrigTauTracksInfoCollection.h TrigInDetEvent/TrigHisto1D.h TrigInDetEvent/TrigHisto2D.h TrigInDetEvent/TrigSpacePointCounts.h TrigInDetEvent/TrigSpacePointCountsCollection.h TrigInDetEvent/TrigTrtHitCounts.h TrigInDetEvent/TrigTrtHitCountsCollection.h TrigInDetEvent/TrigTrackCounts.h TrigInDetEvent/TrigTrackCountsCollection.h TrigInDetEvent/TrigVertexCounts.h TrigInDetEvent/TrigVertexCountsCollection.h TrigCombinedEvent/TrigComposite.h TrigCombinedEvent/TrigCompositeContainer.h TrigMuonEvent/MuonFeature.h TrigMuonEvent/MuonFeatureContainer.h TrigMuonEvent/MuonFeatureDetails.h TrigMuonEvent/MuonFeatureDetailsContainer.h TrigMuonEvent/CombinedMuonFeature.h TrigMuonEvent/CombinedMuonFeatureContainer.h TrigMuonEvent/IsoMuonFeature.h TrigMuonEvent/IsoMuonFeatureContainer.h TrigMuonEvent/TrigMuonClusterFeature.h TrigMuonEvent/TrigMuonClusterFeatureContainer.h TrigMuonEvent/TileMuFeature.h TrigMuonEvent/TileMuFeatureContainer.h TrigMuonEvent/TileTrackMuFeature.h TrigMuonEvent/TileTrackMuFeatureContainer.h TrigMuonEvent/TrigMuonEFContainer.h TrigMuonEvent/TrigMuonEFInfoContainer.h TrigMuonEvent/TrigMuonEFIsolationContainer.h TrigMuonEvent/TrigCombDiMuonContainer.h TrigBphysicsEvent/TrigJpsi.h TrigBphysicsEvent/TrigJpsiContainer.h TrigCaloEvent/TrigEMCluster.h TrigCaloEvent/TrigEMClusterContainer.h TrigCaloEvent/TrigTauCluster.h TrigCaloEvent/TrigTauClusterContainer.h TrigCaloEvent/TrigTauClusterDetails.h TrigCaloEvent/TrigTauClusterDetailsContainer.h TrigCaloEvent/TrigT2MbtsBits.h TrigCaloEvent/TrigT2MbtsBitsContainer.h TrigCaloEvent/TrigT2ZdcSignals.h TrigCaloEvent/TrigT2ZdcSignalsContainer.h TrigCaloEvent/TrigT2Jet.h TrigCaloEvent/TrigT2JetContainer.h TrigMissingEtEvent/TrigMissingET.h TrigMissingEtEvent/TrigMissingETContainer.h TrigCaloEvent/RingerRings.h TrigCaloEvent/RingerRingsContainer.h TrigCaloEvent/TrigRNNOutput.h TrigCaloEvent/TrigRNNOutputContainer.h TrigCaloEvent/TrigCaloCluster.h TrigCaloEvent/TrigCaloClusterContainer.h TrigTopoEvent/ElectronMuonTopoInfo.h TrigTopoEvent/ElectronMuonTopoInfoContainer.h TrigMonitoringEvent/TrigMonEvent.h TrigMonitoringEvent/TrigMonEventCollection.h TrigMonitoringEvent/TrigMonConfig.h TrigMonitoringEvent/TrigMonConfigCollection.h TYPES_WITH_NAMESPACE TrigDec::TrigDecision - LINK_LIBRARIES AthenaPoolUtilities GaudiKernel AthenaPoolCnvSvcLib RootConversions TrigBphysicsEvent TrigCaloEvent TrigCaloEventTPCnv TrigCombinedEvent TrigCombinedEventTPCnv TrigDecisionEvent TrigDecisionEventTPCnv TrigInDetEvent TrigInDetEventTPCnv TrigMissingEtEvent TrigMissingEtEventTPCnv TrigMonitoringEvent TrigMonitoringEventTPCnv TrigMuonEvent TrigMuonEventTPCnv TrigParticle TrigParticleTPCnv TrigTopoEvent TrigTopoEventTPCnv TrigFTK_RawData TrigFTK_RawDataTPCnv ) + LINK_LIBRARIES AthenaPoolUtilities GaudiKernel AthenaPoolCnvSvcLib RootConversions TrigBphysicsEvent TrigCaloEvent TrigCaloEventTPCnv TrigCombinedEvent TrigCombinedEventTPCnv TrigDecisionEvent TrigDecisionEventTPCnv TrigInDetEvent TrigInDetEventTPCnv TrigMissingEtEvent TrigMissingEtEventTPCnv TrigMonitoringEvent TrigMonitoringEventTPCnv TrigMuonEvent TrigMuonEventTPCnv TrigParticle TrigParticleTPCnv TrigTopoEvent TrigTopoEventTPCnv ) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.cxx b/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.cxx deleted file mode 100644 index ba5eab8f9d51731af9ee2211b1aab0ce49604e75..0000000000000000000000000000000000000000 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.cxx +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FTK_RawTrackContainerCnv.h" - -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_tlp1.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_tlp1.h" - -//constructor -FTK_RawTrackContainerCnv::FTK_RawTrackContainerCnv( ISvcLocator* svcloc ) : - FTK_RawTrackContainerCnvBase( svcloc ), - m_tlp_Converter (new FTK_RawTrackContainerCnv_PERS) -{} - -//destructor -FTK_RawTrackContainerCnv::~FTK_RawTrackContainerCnv() -{ - delete m_tlp_Converter; -} - - -//create persistent -FTK_RawTrackContainer_PERS* FTK_RawTrackContainerCnv::createPersistent(FTK_RawTrackContainer* transObj) { - MsgStream mlog(msgSvc(), "FTK_RawTrackContainerConverter" ); - mlog << MSG::DEBUG << "FTK_RawTrackContainerCnv::createPersistent" << endmsg; - - FTK_RawTrackContainer_PERS* persObj = m_tlp_Converter->createPersistent( transObj, mlog ); - - return persObj; -} - -//create transient -FTK_RawTrackContainer* FTK_RawTrackContainerCnv::createTransient() { - - MsgStream mlog(msgSvc(), "FTK_RawTrackContainerConverter" ); - mlog << MSG::DEBUG << "FTK_RawTrackContainerCnv::createTransient " << endmsg; - - static pool::Guid tlp1_guid("C1A5436E-8520-4399-82FC-E6828B19688D"); - - FTK_RawTrackContainer *transObj = 0; - if( compareClassGuid(tlp1_guid) ) { - - mlog << MSG::DEBUG << "FTK_RawTrackContainerCnv::reading tlp1 persistent object" << endmsg; - FTK_RawTrackContainerCnv_tlp1 tlp1_Converter; - poolReadObject< FTK_RawTrackContainer_tlp1 >( tlp1_Converter ); - transObj = tlp1_Converter.createTransient( mlog ); - } else { - throw std::runtime_error("Unsupported persistent version of Data container"); - } - - return transObj; -} diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.h b/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.h deleted file mode 100644 index 4c2ac89a740556f71433f6575e5f683a094de2d3..0000000000000000000000000000000000000000 --- a/Trigger/TrigEvent/TrigEventAthenaPool/src/FTK_RawTrackContainerCnv.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/********************************************************************************** - * @Project: Trigger - * @Package: TrigEventAthenaPool - * @class : TrigInDetTrackCollectionCnv - * - * @brief transient persistent converter for TrigInDetTrackCollection - * - * @author Andrew Hamilton <Andrew.Hamilton@cern.ch> - U. Geneva - * @author Francesca Bucci <f.bucci@cern.ch> - U. Geneva - * - * File and Version Information: - * $Id: FTK_RawTrackContainerCnv.h 716421 2016-01-05 14:33:14Z schaffer $ - **********************************************************************************/ -#ifndef TRIGEVENTATHENAPOOL_FTKRAWTRACKCONTAINERCNV_H -#define TRIGEVENTATHENAPOOL_FTKRAWTRACKCONTAINERCNV_H - -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" -#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" - -class FTK_RawTrackContainer_tlp1; -class FTK_RawTrackContainerCnv_tlp1; -typedef FTK_RawTrackContainer_tlp1 FTK_RawTrackContainer_PERS; -typedef FTK_RawTrackContainerCnv_tlp1 FTK_RawTrackContainerCnv_PERS; - -typedef T_AthenaPoolCustomCnv<FTK_RawTrackContainer, FTK_RawTrackContainer_PERS > FTK_RawTrackContainerCnvBase; - -class MsgStream; - -class FTK_RawTrackContainerCnv : public FTK_RawTrackContainerCnvBase{ - - friend class CnvFactory<FTK_RawTrackContainerCnv>; - - protected: - -public: - FTK_RawTrackContainerCnv(ISvcLocator* svcloc); - ~FTK_RawTrackContainerCnv(); - -protected: - virtual FTK_RawTrackContainer_PERS* createPersistent(FTK_RawTrackContainer* transObj); - virtual FTK_RawTrackContainer* createTransient (); - - private: - - FTK_RawTrackContainerCnv_PERS* m_tlp_Converter; - -}; - - -#endif diff --git a/Trigger/TrigEvent/TrigInDetPattRecoEvent/TrigInDetPattRecoEvent/TrigFTK_TrackSeed.h b/Trigger/TrigEvent/TrigInDetPattRecoEvent/TrigInDetPattRecoEvent/TrigFTK_TrackSeed.h deleted file mode 100644 index 1356716af42cd49370de01bbd9eb942a1070533d..0000000000000000000000000000000000000000 --- a/Trigger/TrigEvent/TrigInDetPattRecoEvent/TrigInDetPattRecoEvent/TrigFTK_TrackSeed.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef __TRIGFTKTRACKSEED_H__ -#define __TRIGFTKTRACKSEED_H__ - - -#include <list> -#include "TrkParameters/TrackParameters.h" -#include "GeoPrimitives/GeoPrimitives.h" - - -class TrigFTK_TrackSeed { - - public: - - TrigFTK_TrackSeed(); - TrigFTK_TrackSeed(const Trk::Perigee*); - TrigFTK_TrackSeed(const std::list<Amg::Vector3D>&); - TrigFTK_TrackSeed(const Trk::Perigee*, const std::list<Amg::Vector3D>&); - TrigFTK_TrackSeed(const TrigFTK_TrackSeed&); - ~TrigFTK_TrackSeed(); - - void InitMeasuredPerigee(const Trk::Perigee*); - void AddGlobalPosition(const Amg::Vector3D&); - - const Trk::Perigee* GetMeasuredPerigee() { return m_perigee; } - const std::list<Amg::Vector3D>& GetListOfGlobalPosition() { return m_gpList; } - - private: - - Trk::Perigee* m_perigee; - std::list<Amg::Vector3D> m_gpList; - - void DeleteMeasuredPerigee(); - -}; - -#endif - diff --git a/Trigger/TrigEvent/TrigInDetPattRecoEvent/src/TrigFTK_TrackSeed.cxx b/Trigger/TrigEvent/TrigInDetPattRecoEvent/src/TrigFTK_TrackSeed.cxx deleted file mode 100644 index b025bec311fd15413f68c8c97dacfcc24d2469cb..0000000000000000000000000000000000000000 --- a/Trigger/TrigEvent/TrigInDetPattRecoEvent/src/TrigFTK_TrackSeed.cxx +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigInDetPattRecoEvent/TrigFTK_TrackSeed.h" - - -TrigFTK_TrackSeed::TrigFTK_TrackSeed() : - m_perigee(0) -{ - -} - - -TrigFTK_TrackSeed::TrigFTK_TrackSeed(const Trk::Perigee* mp) : - m_perigee(0) -{ - - if (!mp) return; - m_perigee = new Trk::Perigee(*mp); - -} - - -TrigFTK_TrackSeed::TrigFTK_TrackSeed(const std::list<Amg::Vector3D>& gpList) : - m_perigee(0), m_gpList(gpList) -{ - -} - - -TrigFTK_TrackSeed::TrigFTK_TrackSeed(const Trk::Perigee* mp, const std::list<Amg::Vector3D>& gpList) : - m_perigee(0), m_gpList(gpList) -{ - - if (!mp) return; - m_perigee = new Trk::Perigee(*mp); - -} - - -TrigFTK_TrackSeed::TrigFTK_TrackSeed(const TrigFTK_TrackSeed& trackseed) : - m_perigee(0), m_gpList(trackseed.m_gpList) -{ - - if (!trackseed.m_perigee) return; - m_perigee = new Trk::Perigee(*trackseed.m_perigee); - -} - - -TrigFTK_TrackSeed::~TrigFTK_TrackSeed() -{ - - DeleteMeasuredPerigee(); - -} - - -void TrigFTK_TrackSeed::InitMeasuredPerigee(const Trk::Perigee* mp) -{ - - if (!mp) return; - - if (m_perigee) DeleteMeasuredPerigee(); - m_perigee = new Trk::Perigee(*mp); - -} - - -void TrigFTK_TrackSeed::AddGlobalPosition(const Amg::Vector3D& gp) -{ - - m_gpList.push_back(gp); - -} - -void TrigFTK_TrackSeed::DeleteMeasuredPerigee() -{ - - delete m_perigee; - m_perigee = 0; - -} diff --git a/Trigger/TrigFTK/FTK_RecToolInterfaces/CMakeLists.txt b/Trigger/TrigFTK/FTK_RecToolInterfaces/CMakeLists.txt deleted file mode 100644 index 45d9089aea77afd8924486172fc88c205b131128..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/FTK_RecToolInterfaces/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -################################################################################ -# Package: FTK_RecToolInterfaces -################################################################################ - -# Declare the package name: -atlas_subdir( FTK_RecToolInterfaces ) - - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - Tools/PyJobTransforms - Tracking/TrkEvent/TrkTrack - Trigger/TrigFTK/TrigFTK_RawData - Event/xAOD/xAODTracking ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - -# Install files from the package: -atlas_install_headers( FTK_RecToolInterfaces ) - diff --git a/Trigger/TrigFTK/FTK_RecToolInterfaces/FTK_RecToolInterfaces/IFTK_DuplicateTrackRemovalTool.h b/Trigger/TrigFTK/FTK_RecToolInterfaces/FTK_RecToolInterfaces/IFTK_DuplicateTrackRemovalTool.h deleted file mode 100644 index 841d17b2915849cb64957e8044d73fd72284a7b0..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/FTK_RecToolInterfaces/FTK_RecToolInterfaces/IFTK_DuplicateTrackRemovalTool.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -//abstract interface - -#ifndef __IFTK_DUPLICATETRACKREMOVAL_TOOL_H__ -#define __IFTK_DUPLICATETRACKREMOVAL_TOOL_H__ - -#include "GaudiKernel/IAlgTool.h" -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" - -static const InterfaceID IID_IFTK_DuplicateTrackRemovalTool("IFTK_DuplicateTrackRemovalTool",1,0); - -class IFTK_DuplicateTrackRemovalTool : virtual public IAlgTool { - - public: - /** other standard AlgTool methods */ - static const InterfaceID& interfaceID () //!< the Tool's interface - { return IID_IFTK_DuplicateTrackRemovalTool; } - - virtual FTK_RawTrackContainer* removeDuplicates(const FTK_RawTrackContainer* trks) = 0; - - private: - -}; - -#endif diff --git a/Trigger/TrigFTK/FTK_RecToolInterfaces/FTK_RecToolInterfaces/IFTK_HashIDTool.h b/Trigger/TrigFTK/FTK_RecToolInterfaces/FTK_RecToolInterfaces/IFTK_HashIDTool.h deleted file mode 100644 index 0184d6f2e3c1b73afa9812798b095f0966d52c80..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/FTK_RecToolInterfaces/FTK_RecToolInterfaces/IFTK_HashIDTool.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef IFTK_HASHIDTOOL_H -#define IFTK_HASHIDTOOL_H - - -#include "GaudiKernel/IAlgTool.h" -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" - -static const InterfaceID IID_IFTK_HashIDTool("IFTK_HashIDTool",1,0); - -class IFTK_HashIDTool: virtual public IAlgTool { - - public: - - static const InterfaceID& interfaceID () //!< the Tool's interface - { return IID_IFTK_HashIDTool; } - - virtual unsigned int getHash(unsigned int tower, unsigned int sector, unsigned int plane)=0; - - virtual unsigned int getHashFromAuxSector(unsigned int tower, unsigned int sector, unsigned int plane)=0; - - virtual bool findHash(unsigned int hash, bool isSCT, unsigned int& tower, unsigned int& sector, unsigned int& plane)=0; - - virtual FTK_RawTrackContainer* processTracks(const FTK_RawTrackContainer& inputTracks, const bool reverseIBL)=0; -}; - -#endif // IFTK_HASHIDTOOL_H diff --git a/Trigger/TrigFTK/FTK_RecToolInterfaces/FTK_RecToolInterfaces/IFTK_VertexFinderTool.h b/Trigger/TrigFTK/FTK_RecToolInterfaces/FTK_RecToolInterfaces/IFTK_VertexFinderTool.h deleted file mode 100644 index f61d72aac5571299231c0c494de5a54f1188b43e..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/FTK_RecToolInterfaces/FTK_RecToolInterfaces/IFTK_VertexFinderTool.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -//abstract interface - -#ifndef __IFTK_VERTEXFINDER_TOOL_H__ -#define __IFTK_VERTEXFINDER_TOOL_H__ - -#include "GaudiKernel/IAlgTool.h" -//#include "AthenaKernel/IOVSvcDefs.h" -class VxContainer; -#include "TrigFTK_RawData/FTK_RawTrack.h" -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" -#include "xAODTracking/VertexFwd.h" -//#include "xAODTracking/TrackParticleFwd.h" -#include "xAODTracking/VertexContainerFwd.h" -#include "xAODTracking/VertexAuxContainer.h" -#include "TrkTrack/TrackCollection.h" -//#include "xAODTracking/TrackParticleContainerFwd.h" -//namespace Trk { -//// class Track; -//} -static const InterfaceID IID_IFTK_VertexFinderTool("IFTK_VertexFinderTool",1,0); - -class IFTK_VertexFinderTool : virtual public IAlgTool { - - public: - /** other standard AlgTool methods */ - static const InterfaceID& interfaceID () //!< the Tool's interface - { return IID_IFTK_VertexFinderTool; } - - // virtual VxContainer* findVertex(const FTK_RawTrackContainer* trks) = 0; - virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const FTK_RawTrackContainer* trks) = 0; - virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*> findVertex(const TrackCollection* trks) = 0; - private: -}; - -#endif diff --git a/Trigger/TrigFTK/TrigFTKByteStream/CMakeLists.txt b/Trigger/TrigFTK/TrigFTKByteStream/CMakeLists.txt deleted file mode 100644 index 50fccc08d2343a56459f63e866541e33a066fe5f..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -################################################################################ -# Package: TrigFTKByteStream -################################################################################ - -# Declare the package name: -atlas_subdir( TrigFTKByteStream ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - Event/ByteStreamCnvSvcBase - Event/ByteStreamData - Tools/PyJobTransforms - GaudiKernel - Trigger/TrigFTK/TrigFTK_RawData - PRIVATE - AtlasTest/TestTools - Control/AthenaKernel - Control/StoreGate ) - -# External dependencies: -find_package( tdaq-common COMPONENTS eformat_write DataWriter ) - -# Component(s) in the package: -atlas_add_component( TrigFTKByteStream - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel TrigFTK_RawData TestTools AthenaKernel StoreGateLib SGtests ) - -# Install files from the package: -atlas_install_headers( TrigFTKByteStream ) -atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) diff --git a/Trigger/TrigFTK/TrigFTKByteStream/TrigFTKByteStream/IFTKByteStreamDecoderEncoderTool.h b/Trigger/TrigFTK/TrigFTKByteStream/TrigFTKByteStream/IFTKByteStreamDecoderEncoderTool.h deleted file mode 100644 index 95183b11e3f00c99c31d7062567fd19e01bbb17c..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/TrigFTKByteStream/IFTKByteStreamDecoderEncoderTool.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef IFTKBYTESTREAMDECODERENCODERTOOL_H -#define IFTKBYTESTREAMDECODERENCODERTOOL_H - -#include "GaudiKernel/IAlgTool.h" -#include "ByteStreamData/RawEvent.h" - -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" - - -static const InterfaceID IID_IFTKByteStreamDecoderEncoderTool("IFTKByteStreamDecoderEncoderTool",1,0); - -namespace FTK { - - class IFTKByteStreamDecoderEncoderTool : virtual public IAlgTool { - - public: - static const InterfaceID& interfaceID () - { return IID_IFTKByteStreamDecoderEncoderTool; } - - - virtual StatusCode decode(const uint32_t nDataWords, OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, FTK_RawTrackContainer* result)=0; - virtual StatusCode encode(const FTK_RawTrackContainer* result, std::vector<uint32_t>& payload)=0; - - - }; - -} -#endif diff --git a/Trigger/TrigFTK/TrigFTKByteStream/TrigFTKByteStream/TrigFTKByteStreamCnv.h b/Trigger/TrigFTK/TrigFTKByteStream/TrigFTKByteStream/TrigFTKByteStreamCnv.h deleted file mode 100755 index 34e22a0d94a5a60e4a879916e26e1c91f85520a9..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/TrigFTKByteStream/TrigFTKByteStreamCnv.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TrigTrigFTKByteStreamCnv_h -#define TrigTrigFTKByteStreamCnv_h - -/********************************************************************************** - * @Project: FTK - * @Package: TrigFTKByteStream - * @class : TrigFTKByteStreamCnv - * - * @brief Gaudi bytestream Converter for the TrigFTK class - * - **********************************************************************************/ - -#include "GaudiKernel/Converter.h" -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" -#include "ByteStreamCnvSvcBase/ByteStreamAddress.h" - -#include "TrigFTKByteStream/TrigFTKByteStreamTool.h" - -// forward declarations -class IROBDataProviderSvc; -class IByteStreamEventAccess; - -namespace FTK { - - class FTKByteStreamTool; - - - /** - @class TrigFTKByteStreamCnv - @brief Gaudi bytestream Converter for the FTKAthTrackContainer class - - This class essentially provides two methods: - 1. createObj(IOpaqueAddress*, DataObject*&) - 2. createRep(DataObject*, IOpaqueAddress*& ) - - The first one creates a DataObject from persistent information, captured in - IOpaqueAddress, and the second is supposed to write the DataObject to - a persistent representation. Here, DataObject will be casted to TrigFTK - - see here for a general ByteStream converter description: - http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/offline/Event/ByteStreamCnvSvc/doc/ByteStream.txt - - beginning of this file:<br> - ByteStream conversion Service (ByteStreamCnvSvc) provides a means to - convert the raw data in the ByteStream format to and from the transient - representation, Raw Data Objects (RDO). In Gaudi's terminology, ByteStream - can be considered as a persistency for reading and storing raw data. In - practice, the source of the ByteStream can be a file, or the online data - source (or its emulation) through network, for example. Together with the - IdentifiableContainer, used to contain the Raw Data Objects, ByteStreamCnvSvc - provides a mechanism for creating the RDOs on demand. - - */ - class TrigFTKByteStreamCnv : public Converter { - - public: - TrigFTKByteStreamCnv(ISvcLocator* svcloc); //!< std Gaudi converter constructor - ~TrigFTKByteStreamCnv(); - - - virtual StatusCode initialize(); //!< Gaudi initialize - virtual StatusCode finalize(); //!< Gaudi finalize - - virtual StatusCode createObj(IOpaqueAddress* pAddr, DataObject*& pObj); //!< create RDO (TrigFTK) from bytestream - virtual StatusCode createRep(DataObject* pObj, IOpaqueAddress*& pAddr); //!< create bytestream from RDOs (TrigFTK) - - // Storage type and class ID - static unsigned char storageType() { return ByteStreamAddress::storageType(); } //!< used for the converter - static const CLID& classID(); //!< CLID - - long repSvcType() const { return i_repSvcType(); } //!< return repSvcType - - private: - - MsgStream* m_log; //!< std message stream - - ToolHandle< TrigFTKByteStreamTool > m_tool ; //!< tool for conversion work - - ServiceHandle< IByteStreamEventAccess > m_ByteStreamEventAccess; //!< Gaudi helper - - ServiceHandle< IROBDataProviderSvc > m_robDataProvider; //!< Gaudi ROB helper - - }; -} - -#endif diff --git a/Trigger/TrigFTK/TrigFTKByteStream/TrigFTKByteStream/TrigFTKByteStreamTool.h b/Trigger/TrigFTK/TrigFTKByteStream/TrigFTKByteStream/TrigFTKByteStreamTool.h deleted file mode 100755 index 7a3f9f7e77125b54a13c9db6cdbcb3e653febd6e..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/TrigFTKByteStream/TrigFTKByteStreamTool.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/********************************************************************************** - * @Project: FTK - * @Package: TrigFTKByteStream - * @Class : TrigFTKByteStreamTool - * - * @brief Gaudi bytestream Converter tool for the TrigFTK class - * - * - * File and Version Information: - * $Id: - **********************************************************************************/ - -#ifndef TrigTrigFTKByteStreamTool_h -#define TrigTrigFTKByteStreamTool_h - -#include "AthenaBaseComps/AthAlgTool.h" - - -/* To be able to use OFFLINE_FRAGMENTS_NAMESPACE */ -#include "ByteStreamData/RawEvent.h" -#include "ByteStreamData/ROBData.h" -#include "ByteStreamCnvSvcBase/FullEventAssembler.h" - -/* the RDO structure */ -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" - -#include "TrigFTKByteStream/IFTKByteStreamDecoderEncoderTool.h" - -#include "eformat/SourceIdentifier.h" - -// forward declarations -class IROBDataProviderSvc; - -namespace FTK { - - // class IFTKByteStreamDecoderEncoderTool; - /** - @class TrigFTKByteStreamTool - @brief An AlgTool class to provide conversion from TrigFTK to ByteStream, and fill it in RawEvent - - This tool is used by the Gaudi converter class: TrigFTKByteStreamCnv. - */ - - class TrigFTKByteStreamTool: public AthAlgTool { - - public: - - TrigFTKByteStreamTool( const std::string& type, const std::string& name, - const IInterface* parent ) ; //!< std Gaudi tool constructor - - virtual ~TrigFTKByteStreamTool() ; //!< virtual destructor - - static const InterfaceID& interfaceID( ) ; //!< std Gaudi interface - - virtual StatusCode initialize(); //!< std Gaudi initialize -> call initialize from base class - virtual StatusCode finalize(); //!< std Gaudi finalize -> call finalize from base class - - - /// @brief convert ROBData to FTK_RawTrackContainer this function should be called from createObj - StatusCode convert(IROBDataProviderSvc& dataProvider, FTK_RawTrackContainer*& result, - const std::string& objName); - - /// @brief convert FTK_RawTrackContainer to ByteStream this function should be called from createRep - StatusCode convert( const FTK_RawTrackContainer* result, RawEventWrite* re, - const std::string& objName); - private: - FullEventAssembler<> m_fea; - ToolHandle <IFTKByteStreamDecoderEncoderTool> m_decoder; - ToolHandle <IFTKByteStreamDecoderEncoderTool> m_decoderAux; - uint16_t m_AuxFormat; - bool m_decodeAux; - std::vector<uint32_t> m_robID; - - }; -} - -#endif diff --git a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoder.cxx b/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoder.cxx deleted file mode 100644 index 61042b6eb7d7feb57892acf4681fdf24dad0958f..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoder.cxx +++ /dev/null @@ -1,304 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -/** - * FTKByteStreamDecoderEncoder bytestream encoding and decoding for the FTK - * - * original version by B. Mindur and T. Bold - * 2017/03/14 trailer [en,de]coding / J. Masik - */ - -#include "GaudiKernel/MsgStream.h" -#include "TrigFTKByteStream/IFTKByteStreamDecoderEncoderTool.h" -#include "FTKByteStreamDecoderEncoder.h" -#include "AthenaBaseComps/AthMessaging.h" - -using namespace FTKByteStreamDecoderEncoder; - - -namespace FTK { - - - /* - size_t decodeNumberOfTracks(OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData) { - uint16_t low, high; - uint32_t all; - unpackNumberOfTracks(rodData, low, high, all); - return all; - } - */ - - - FTKByteStreamDecoderEncoderTool::FTKByteStreamDecoderEncoderTool(const std::string& toolname, - const std::string& type, - const IInterface* parent) - : AthAlgTool(toolname, type, parent), - m_doHeader(false), - m_doTrailer(false) - { - declareInterface< IFTKByteStreamDecoderEncoderTool >( this ); - declareProperty("doHeader", m_doHeader); - declareProperty("doTrailer", m_doTrailer); - } - - FTKByteStreamDecoderEncoderTool::~FTKByteStreamDecoderEncoderTool(){;} - - StatusCode FTKByteStreamDecoderEncoderTool::initialize(){ - if (m_doHeader) ATH_MSG_INFO("Unpacking Header of size " << FTKByteStreamDecoderEncoder::headerSize); - if (m_doTrailer) ATH_MSG_INFO("Unpacking Trailer "); - return StatusCode::SUCCESS; - } - - StatusCode FTKByteStreamDecoderEncoderTool::finalize(){ - return StatusCode::SUCCESS; - } - - //not used - void FTKByteStreamDecoderEncoderTool::packNumberOfTracks(uint16_t nTracksLowPt, uint16_t nTracksHighPt, - std::vector<uint32_t>& rod ){ - uint32_t size_data = nTracksHighPt; - size_data <<= 16; - size_data |= nTracksLowPt; - rod.push_back( size_data ); - } - - //not used - void FTKByteStreamDecoderEncoderTool::unpackNumberOfTracks(OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, - uint16_t& nTracksLowPt, uint16_t& nTracksHighPt, uint32_t& nTracks){ - nTracksLowPt = rodData[0] & 0xffff; - nTracksHighPt = (rodData[0]>>16) & 0xffff; - - nTracks = nTracksLowPt; // conversion to 32 + assignement - nTracksLowPt += nTracksHighPt; // adding to more capable type - } - - - void FTKByteStreamDecoderEncoderTool::packPixelCluster(const FTK_RawPixelCluster& cluster, - std::vector<uint32_t>& payload){ - payload.push_back( cluster.getWordA() ); - payload.push_back( cluster.getWordB() ); - } - - - void FTKByteStreamDecoderEncoderTool::unpackPixCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, - FTK_RawPixelCluster& cluster){ - cluster.setWordA(*data); - cluster.setWordB(*(data+1)); - } - - void FTKByteStreamDecoderEncoderTool::packSCTCluster(const FTK_RawSCT_Cluster& cluster, - std::vector<uint32_t>& payload){ - payload.push_back( cluster.getWord() ); - } - - void FTKByteStreamDecoderEncoderTool::unpackSCTCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, - FTK_RawSCT_Cluster& cluster){ - cluster.setWord(*data); - } - - void FTKByteStreamDecoderEncoderTool::packTrack(const FTK_RawTrack* track, - std::vector<uint32_t>& payload){ - payload.push_back( track->getTH1() ); - payload.push_back( track->getTH2() ); - payload.push_back( track->getTH3() ); - payload.push_back( track->getTH4() ); - payload.push_back( track->getTH5() ); - payload.push_back( track->getTH6() ); - - for ( std::vector<FTK_RawPixelCluster>::const_iterator it = track->getPixelClusters().begin(); - it != track->getPixelClusters().end(); ++it ) { - packPixelCluster(*it, payload); - } - - for ( std::vector<FTK_RawSCT_Cluster>::const_iterator it = track->getSCTClusters().begin(); - it != track->getSCTClusters().end(); ++it ) { - packSCTCluster(*it, payload); - } - } - - FTK_RawTrack* FTKByteStreamDecoderEncoderTool::unpackFTTrack( OFFLINE_FRAGMENTS_NAMESPACE::PointerType data){ - uint32_t data2 = (data[2] & 0xffffff) | ((FTK_RAWTRACK_VERSION)<<24); // force to latest version - FTK_RawTrack* track = new FTK_RawTrack(data[0], data[1], data2, data[3], data[4], data[5]); // first six words are track params - ATH_MSG_DEBUG("[Track: " << track->getInvPt() << " " << track->getPhi() << " " - << track->getCotTh() << " " << track->getD0() << "]"); - track->setIsAuxFormat(false); - - data += TrackParamsBlobSize; - - // get pixel hits - track->getPixelClusters().resize(NPixLayers); - for ( size_t i = 0; i < size_t(NPixLayers); ++i) { - size_t offset = PixHitParamsBlobSize*i; - unpackPixCluster(data+offset, track->getPixelCluster(i) ); - } - data += PixHitParamsBlobSize*NPixLayers; - - // gets SCT hits - track->getSCTClusters().resize(NSCTLayers); - for ( size_t i = 0; i < size_t(NSCTLayers); ++i) { - size_t offset = SCTHitParamsBlobSize*i; - unpackSCTCluster(data+offset, track->getSCTCluster(i) ); - } - // data pointer shifted in the unpackFTTrack loop - return track; - } - - - void FTKByteStreamDecoderEncoderTool::packHeader(std::vector<uint32_t> &payload){ - payload.push_back(FTKByteStreamDecoderEncoder::headerMarker); - payload.push_back(FTKByteStreamDecoderEncoder::headerSize); - payload.push_back(1); //major and minor number - payload.push_back(11); //source identifier - payload.push_back(2); //run number - payload.push_back(3); //extended lvl1 ID - payload.push_back(3); //bunch crossing ID - payload.push_back(3); //lvl1 trigger type - payload.push_back(3); //detector event type - - if (payload.size() != FTKByteStreamDecoderEncoder::headerSize){ - ATH_MSG_ERROR("Inconsistent header size"); - } - } - - void FTKByteStreamDecoderEncoderTool::unpackHeader(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData){ - //marker - uint32_t marker = rodData[0]; - if (marker!=FTKByteStreamDecoderEncoder::headerMarker){ - ATH_MSG_DEBUG("Not dealing with an FTK fragment " << std::hex << marker << " vs the marker " << FTKByteStreamDecoderEncoder::headerMarker << std::dec ); - //rodData += FTKByteStreamDecoderEncoder::headerSize -1; - //return; - } - //skip to the end - rodData += FTKByteStreamDecoderEncoder::headerSize; - } - - void FTKByteStreamDecoderEncoderTool::packTrailer(std::vector<uint32_t> &payload){ - - // packMonitoring() - payload.push_back(1); //extL1id - payload.push_back(0); //error_flag - payload.push_back(10); //reserved word #1 - payload.push_back(20); //reserved word #2 - payload.push_back(0); //FLIC status - payload.push_back(0); //numelements - payload.push_back(0); //numdataelements - payload.push_back(0x1); //statusBlock - - } - - void FTKByteStreamDecoderEncoderTool::unpackMonitoring(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData){ - if ( (rodData[0] & 0xFFFF0000) == 0xE0DA0000) { - ATH_MSG_DEBUG("marker 0xE0DA0000 found"); - //while ( - } - return; - } - - - void FTKByteStreamDecoderEncoderTool::unpackTrailer(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData){ - auto beforeMonitoring = rodData; - unpackMonitoring(rodData); - if (rodData == beforeMonitoring){ - ATH_MSG_DEBUG("Extra monitoring records not found"); - } else { - ATH_MSG_DEBUG("Monitoring records of size " << (rodData-beforeMonitoring)/sizeof(OFFLINE_FRAGMENTS_NAMESPACE::PointerType)); - } - - uint32_t extL1id = rodData[0]; rodData++; - ATH_MSG_DEBUG("extL1id " << extL1id); - - uint32_t error_flag = rodData[0]; rodData++; - ATH_MSG_DEBUG("error_flag " << error_flag); - //2 reserved words - ATH_MSG_DEBUG("reserved " << rodData[0]); rodData++; - ATH_MSG_DEBUG("reserved " << rodData[0]); rodData++; - - //FLIC status (TBD) - ATH_MSG_DEBUG("FLIC " << rodData[0]); rodData++; - rodData++; - - // - uint32_t numStatusElems = rodData[0]; rodData++; - ATH_MSG_DEBUG("Number of Status Elements " << numStatusElems); - - uint32_t numDataElems = rodData[0]; rodData++; - ATH_MSG_DEBUG("Number of Data Elements " << numDataElems); - - //status block position - uint32_t statusBlock = rodData[0]; rodData++; - if (statusBlock != 0x1){ - ATH_MSG_ERROR("Status block position should read 0x1"); - } - } - - StatusCode FTKByteStreamDecoderEncoderTool::encode(const FTK_RawTrackContainer* container, std::vector<uint32_t>& payload) { - - // We used to have a word defining the number of low/high pt tracks, that is no longer necessary - // // do not know yet what tracks are high pT, so all will be low pT - // payload.reserve( 1 + TrackParamsBlobSize * container->size() ); - // packNumberOfTracks( container->size(), 0, payload ); - - payload.reserve(TrackParamsBlobSize * container->size() ); - - if (m_doHeader){ - packHeader(payload); - } - - for ( FTK_RawTrackContainer::const_iterator track = container->begin(); - track != container->end(); ++track ) { - packTrack(*track, payload); - } - - if (m_doTrailer){ - packTrailer(payload); - } - - return StatusCode::SUCCESS; - - } - - - StatusCode FTKByteStreamDecoderEncoderTool::decode(const uint32_t nDataWords, OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, FTK_RawTrackContainer* result) { - - uint32_t tracktotalsize=nDataWords; - if (m_doHeader){ - if (tracktotalsize > FTKByteStreamDecoderEncoder::headerSize) { - tracktotalsize -= FTKByteStreamDecoderEncoder::headerSize; - } else { - ATH_MSG_VERBOSE("FTKByteStreamDecoderEncoderAuxTool::decode for nDataWords= " << nDataWords << " Ntracks= 0"); - return StatusCode::SUCCESS; - } - } - if (m_doTrailer){ - if (tracktotalsize >FTKByteStreamDecoderEncoder:: trailerSize) { - tracktotalsize -= FTKByteStreamDecoderEncoder::trailerSize; - } else { - ATH_MSG_VERBOSE("FTKByteStreamDecoderEncoderAuxTool::decode for nDataWords= " << nDataWords << " Ntracks= 0"); - return StatusCode::SUCCESS; - } - } - uint32_t nTracks = tracktotalsize / TrackBlobSize; - ATH_MSG_VERBOSE("FTKByteStreamDecoderEncoderAuxTool::decode for nDataWords= " << nDataWords<< " Ntracks= " << nTracks); - - if (m_doHeader){ - unpackHeader(rodData); - } - ATH_MSG_DEBUG("rodData: " << rodData); - result->reserve(result->size() + nTracks); - for ( size_t i = 0; i < nTracks; ++i ) { - FTK_RawTrack* track = unpackFTTrack( rodData ); - rodData += TrackBlobSize; - result->push_back(track); - } - - if (m_doTrailer){ - unpackTrailer(rodData); - } - - return StatusCode::SUCCESS; - } - - -} diff --git a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoder.h b/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoder.h deleted file mode 100644 index 6af81671a474d8780a7faefbefb4ed78b76b4a89..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoder.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKBYTESTREAMDECODERENCODER_H -#define FTKBYTESTREAMDECODERENCODER_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "ByteStreamData/RawEvent.h" - -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" -#include "TrigFTK_RawData/FTK_RawPixelCluster.h" -#include "TrigFTK_RawData/FTK_RawSCT_Cluster.h" -#include "TrigFTKByteStream/IFTKByteStreamDecoderEncoderTool.h" - -namespace FTKByteStreamDecoderEncoder { - const uint32_t headerMarker = 0xee1234ee; - const uint32_t headerSize = 9; - const uint32_t trailerSize = 0; - const size_t TrackBlobSize = 22; // magic number from BS specification - const size_t TrackParamsBlobSize = 6; // --||-- - const size_t PixHitParamsBlobSize = 2; // --||-- - const size_t SCTHitParamsBlobSize = 1; // --||-- - const size_t NPixLayers=4; - const size_t NSCTLayers=8; - -} - -namespace FTK { - - class FTKByteStreamDecoderEncoderTool : public AthAlgTool, virtual public IFTKByteStreamDecoderEncoderTool { - - public: - FTKByteStreamDecoderEncoderTool(const std::string& name, const std::string& type, - const IInterface* parent); - virtual ~FTKByteStreamDecoderEncoderTool(); - - virtual StatusCode initialize(); - virtual StatusCode finalize(); - - StatusCode decode(uint32_t nDataWords, OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, FTK_RawTrackContainer* result); - StatusCode encode(const FTK_RawTrackContainer* result, std::vector<uint32_t>& payload); - - private: - //to be removed - void packNumberOfTracks(uint16_t nTracksLowPt, uint16_t nTracksHighPt, std::vector<uint32_t>& rod ); - void unpackNumberOfTracks(OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, - uint16_t& nTracksLowPt, uint16_t& nTracksHighPt, uint32_t& nTracks); - - // - void packPixelCluster(const FTK_RawPixelCluster& cluster, std::vector<uint32_t>& payload); - void unpackPixCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, FTK_RawPixelCluster& cluster); - - void packSCTCluster(const FTK_RawSCT_Cluster& cluster, std::vector<uint32_t>& payload); - void unpackSCTCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, FTK_RawSCT_Cluster& cluster); - - void packTrack(const FTK_RawTrack* track, std::vector<uint32_t>& payload); - FTK_RawTrack* unpackFTTrack( OFFLINE_FRAGMENTS_NAMESPACE::PointerType data); - - void packHeader(std::vector<uint32_t> &payload); - void unpackHeader(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData); - - void packTrailer(std::vector<uint32_t> &payload); - void unpackTrailer(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData); - - void unpackMonitoring(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData); - - bool m_doHeader; - bool m_doTrailer; - }; - -} -#endif diff --git a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoderAux.cxx b/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoderAux.cxx deleted file mode 100644 index 99884b075ab32ca3f1a2421b604ca880e1fa3f0f..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoderAux.cxx +++ /dev/null @@ -1,310 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -/** - * FTKByteStreamDecoderEncoderAux bytestream encoding and decoding for the FTK - * - * original version by B. Mindur and T. Bold - * 2017/03/14 trailer [en,de]coding / J. Masik - */ - -#include "GaudiKernel/MsgStream.h" -#include "FTKByteStreamDecoderEncoderAux.h" -#include "AthenaBaseComps/AthMessaging.h" - - -using namespace FTKByteStreamDecoderEncoderAux; - - -namespace FTK { - - - /* - size_t decodeNumberOfTracks(OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData) { - uint16_t low, high; - uint32_t all; - unpackNumberOfTracks(rodData, low, high, all); - return all; - } - */ - - - FTKByteStreamDecoderEncoderAuxTool::FTKByteStreamDecoderEncoderAuxTool(const std::string& toolname, - const std::string& type, - const IInterface* parent) - : AthAlgTool(toolname, type, parent), - m_doHeader(true), - m_doTrailer(false) - { - declareInterface< IFTKByteStreamDecoderEncoderTool >( this ); - declareProperty("doHeader", m_doHeader); - declareProperty("doTrailer", m_doTrailer); - declareProperty("towerID", m_towerID); - } - - - FTKByteStreamDecoderEncoderAuxTool::~FTKByteStreamDecoderEncoderAuxTool(){;} - - StatusCode FTKByteStreamDecoderEncoderAuxTool::initialize(){ - return StatusCode::SUCCESS; - } - - StatusCode FTKByteStreamDecoderEncoderAuxTool::finalize(){ - return StatusCode::SUCCESS; - } - - //not used - void FTKByteStreamDecoderEncoderAuxTool::packNumberOfTracks(uint16_t nTracksLowPt, uint16_t nTracksHighPt, - std::vector<uint32_t>& rod ){ - uint32_t size_data = nTracksHighPt; - size_data <<= 16; - size_data |= nTracksLowPt; - rod.push_back( size_data ); - } - - //not used - void FTKByteStreamDecoderEncoderAuxTool::unpackNumberOfTracks(OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, - uint16_t& nTracksLowPt, uint16_t& nTracksHighPt, uint32_t& nTracks){ - nTracksLowPt = rodData[0] & 0xffff; - nTracksHighPt = (rodData[0]>>16) & 0xffff; - - nTracks = nTracksLowPt; // conversion to 32 + assignement - nTracksLowPt += nTracksHighPt; // adding to more capable type - } - - - void FTKByteStreamDecoderEncoderAuxTool::packPixelCluster(const FTK_RawPixelCluster& cluster, - std::vector<uint32_t>& payload){ - payload.push_back( cluster.getWordA() ); - payload.push_back( cluster.getWordB() ); - } - - - void FTKByteStreamDecoderEncoderAuxTool::unpackPixCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, - FTK_RawPixelCluster& cluster){ - cluster.setWordA(0); // no moduleID - cluster.setWordB(*data); - } - - void FTKByteStreamDecoderEncoderAuxTool::packSCTCluster(const FTK_RawSCT_Cluster& cluster, - std::vector<uint32_t>& payload){ - - payload.push_back(0); - unsigned int word = (unsigned int) cluster.getHitCoord(); - unsigned int width = cluster.getHitWidth(); - if (width>0) width-=1; // store packed with 0-7 representing cluster widths 1-8 - if (width>7) width=7; - word += width<<12; - payload.push_back(word); - - } - - void FTKByteStreamDecoderEncoderAuxTool::unpackSCTCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, - FTK_RawSCT_Cluster& cluster){ - - uint32_t coord = (*data & 0x7ff); - uint32_t width = ( ((*data)>>12) & 0x7); - uint32_t word = (width<<28) + (coord<<16); - cluster.setWord(word); - } - - void FTKByteStreamDecoderEncoderAuxTool::packTrack(const FTK_RawTrack* track, - std::vector<uint32_t>& payload){ - unsigned int word = 0x80000000 | track->getSectorID() | (track->getTower()<<24); - payload.push_back( word ); - payload.push_back( track->getRoadID() ); - - for ( std::vector<FTK_RawPixelCluster>::const_iterator it = track->getPixelClusters().begin(); - it != track->getPixelClusters().end(); ++it ) { - packPixelCluster(*it, payload); - } - - for ( std::vector<FTK_RawSCT_Cluster>::const_iterator it = track->getSCTClusters().begin(); - it != track->getSCTClusters().end(); ++it ) { - packSCTCluster(*it, payload); - } - } - - FTK_RawTrack* FTKByteStreamDecoderEncoderAuxTool::unpackFTTrack( OFFLINE_FRAGMENTS_NAMESPACE::PointerType data){ - - FTK_RawTrack* track = new FTK_RawTrack(); - track->setSectorID(data[0] & 0xffff); - // track->setTower(m_towerID); // Bugfix for towerID set to 0 in data - track->setTower((data[0]>>24) & 0x3f); // Bugfix for towerID set to 0 in data - track->setRoadID(data[1] & 0xffffff); - uint32_t lay1 = (data[0]>>16)&0x1; - uint32_t lay2 = (data[0]>>17)&0x1; - uint32_t lay3 = (data[0]>>18)&0x1; - uint32_t lay4 = (data[0]>>19)&0x1; - uint32_t lay6 = (data[0]>>20)&0x1; - uint32_t lay8 = (data[0]>>21)&0x1; - uint32_t lay9 = (data[0]>>22)&0x1; - uint32_t lay10 = (data[0]>>23)&0x1; - uint32_t layermap = (lay1<<1 | lay2<<2 | lay3<<3 | lay4<<4 | lay6<<6 | lay8 <<8 | lay9 << 9 | lay10 << 10); - track->setLayerMap(layermap); - track->setIsAuxFormat(true); - - data += TrackParamsBlobSize; - - - - // get pixel hits - track->getPixelClusters().resize(NPixLayers); - for ( size_t i = 1; i < NPixLayers; ++i) { - unpackPixCluster(data, track->getPixelCluster(i) ); - data += PixHitParamsBlobSize; - - } - - // gets SCT hits - - - std::vector<size_t> sctplane={0,2,4,5,6}; - - track->getSCTClusters().resize(NSCTLayers); - for ( size_t i = 0; i < sctplane.size(); ++i) { - - unpackSCTCluster(data, track->getSCTCluster(sctplane[i]) ); - - data+= SCTHitParamsBlobSize; - } - // no more shifts needed - return track; - } - - - - void FTKByteStreamDecoderEncoderAuxTool::packHeader(std::vector<uint32_t> &payload){ - payload.push_back(0xb0f00000); - payload.push_back(0xff1234ff); - payload.push_back(2); //run number - payload.push_back(3); //extended lvl1 ID - payload.push_back(3); //TTCrcBCID - payload.push_back(3); //lvl1 trigger type - payload.push_back(3); //detector event type - - if (payload.size() != FTKByteStreamDecoderEncoderAux::headerSize){ - ATH_MSG_ERROR("Inconsistent header size"); - } - } - - void FTKByteStreamDecoderEncoderAuxTool::unpackHeader(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData){ - - //skip to the end - rodData += headerSize; - } - - void FTKByteStreamDecoderEncoderAuxTool::packTrailer(std::vector<uint32_t> &payload){ - - // packMonitoring() - payload.push_back(0xe0da0000); - payload.push_back(3); //extL1id - payload.push_back(0); //error_flag - payload.push_back(10); //reserved word #1 - payload.push_back(0); //module data word count - payload.push_back(0xe0f0000); - - } - - void FTKByteStreamDecoderEncoderAuxTool::unpackMonitoring(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData){ - if ( (rodData[0] & 0xFFFF0000) == 0xE0DA0000) { - ATH_MSG_VERBOSE("marker 0xE0DA0000 found"); - } - return; - } - - - void FTKByteStreamDecoderEncoderAuxTool::unpackTrailer(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData){ - auto beforeMonitoring = rodData; - unpackMonitoring(rodData); - if (rodData == beforeMonitoring){ - ATH_MSG_VERBOSE("Extra monitoring records not found"); - } else { - ATH_MSG_VERBOSE("Monitoring records of size " << (rodData-beforeMonitoring)/sizeof(OFFLINE_FRAGMENTS_NAMESPACE::PointerType)); - } - - //first word - uint32_t firstword = rodData[0]; - if (firstword != 0xe0da0000){ - ATH_MSG_ERROR("Trailer first word should read 0xe0da0000 but got 0x"<<std::hex<<firstword<<std::dec); - } - uint32_t extL1id = rodData[1]; - ATH_MSG_VERBOSE("extL1id " << extL1id); - - uint32_t error_flag = rodData[2]; - ATH_MSG_VERBOSE("error_flag " << error_flag); - //reserved word - ATH_MSG_VERBOSE("reserved " << rodData[3]); rodData++; - - uint32_t numDataElems = rodData[4]; - ATH_MSG_VERBOSE("Number of Data Elements " << numDataElems); - - //last word - uint32_t lastword = rodData[5]; - if (lastword != 0xe0f00000){ - ATH_MSG_ERROR("trailer lastword should read 0xe0f00000"); - } - } - - StatusCode FTKByteStreamDecoderEncoderAuxTool::encode(const FTK_RawTrackContainer* container, std::vector<uint32_t>& payload) { - - // We used to have a word defining the number of low/high pt tracks, that is no longer necessary - // // do not know yet what tracks are high pT, so all will be low pT - // payload.reserve( 1 + TrackParamsBlobSize * container->size() ); - // packNumberOfTracks( container->size(), 0, payload ); - - payload.reserve(TrackParamsBlobSize * container->size() ); - - if (m_doHeader){ - packHeader(payload); - } - - for ( FTK_RawTrackContainer::const_iterator track = container->begin(); - track != container->end(); ++track ) { - packTrack(*track, payload); - } - - if (m_doTrailer){ - packTrailer(payload); - } - - return StatusCode::SUCCESS; - - } - - - StatusCode FTKByteStreamDecoderEncoderAuxTool::decode(uint32_t nDataWords, OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, FTK_RawTrackContainer* result) { - - - if (nDataWords <= (headerSize + trailerSize)) { - ATH_MSG_VERBOSE("FTKByteStreamDecoderEncoderAuxTool::decode for nDataWords= " << nDataWords << " Ntracks= 0"); - return StatusCode::SUCCESS; - } - - uint32_t nTracks = (nDataWords - headerSize - trailerSize) / TrackBlobSize; - uint32_t nOver = nDataWords - nTracks*TrackBlobSize - headerSize - trailerSize; - - ATH_MSG_VERBOSE("FTKByteStreamDecoderEncoderAuxTool::decode for nDataWords= " << nDataWords<< " Ntracks= " << nTracks << " remainder (should be zero) " << nOver); - - if (m_doHeader){ - unpackHeader(rodData); - } - - result->reserve(result->size() + nTracks); - for ( size_t i = 0; i < nTracks; ++i ) { - FTK_RawTrack* track = unpackFTTrack( rodData ); - rodData += TrackBlobSize; - result->push_back(track); - } - - if (m_doTrailer){ - unpackTrailer(rodData); - } - - return StatusCode::SUCCESS; - } - - -} diff --git a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoderAux.h b/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoderAux.h deleted file mode 100644 index 2daaa3e060b6ab17440480891a68d15e7af69aed..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKByteStreamDecoderEncoderAux.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKBYTESTREAMDECODERENCODERAUX_H -#define FTKBYTESTREAMDECODERENCODERAUX_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "ByteStreamData/RawEvent.h" - -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" -#include "TrigFTK_RawData/FTK_RawPixelCluster.h" -#include "TrigFTK_RawData/FTK_RawSCT_Cluster.h" -#include "TrigFTKByteStream/IFTKByteStreamDecoderEncoderTool.h" - - -namespace FTKByteStreamDecoderEncoderAux { - - const size_t TrackBlobSize = 10; // magic number from BS specification - const size_t TrackParamsBlobSize = 2; // --||-- - const size_t PixHitParamsBlobSize = 1; // --||-- - const size_t SCTHitParamsBlobSize = 1; // --||-- - const size_t NPixLayers=4; // number of layers in FTK_RawTrack (not the no. layers in BS) - const size_t NSCTLayers=8; // number of layers in FTK_RawTrack (not the no. layers in BS) - - const uint32_t headerMarker = 0xb0f00000; - const uint32_t trailerMarker = 0xe0da0000; - const uint32_t headerSize = 8; - const uint32_t trailerSize = 3; - -} - -namespace FTK { - - class FTKByteStreamDecoderEncoderAuxTool : public AthAlgTool, virtual public IFTKByteStreamDecoderEncoderTool { - - public: - FTKByteStreamDecoderEncoderAuxTool(const std::string& name, const std::string& type, - const IInterface* parent); - virtual ~FTKByteStreamDecoderEncoderAuxTool(); - - virtual StatusCode initialize(); - virtual StatusCode finalize(); - - StatusCode decode(uint32_t nDataWords, OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, FTK_RawTrackContainer* result); - StatusCode encode(const FTK_RawTrackContainer* result, std::vector<uint32_t>& payload); - - static const InterfaceID& interfaceID( ) ; - - private: - //to be removed - void packNumberOfTracks(uint16_t nTracksLowPt, uint16_t nTracksHighPt, std::vector<uint32_t>& rod ); - void unpackNumberOfTracks(OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData, - uint16_t& nTracksLowPt, uint16_t& nTracksHighPt, uint32_t& nTracks); - - // - void packPixelCluster(const FTK_RawPixelCluster& cluster, std::vector<uint32_t>& payload); - void unpackPixCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, FTK_RawPixelCluster& cluster); - - void packSCTCluster(const FTK_RawSCT_Cluster& cluster, std::vector<uint32_t>& payload); - void unpackSCTCluster(OFFLINE_FRAGMENTS_NAMESPACE::PointerType data, FTK_RawSCT_Cluster& cluster); - - void packTrack(const FTK_RawTrack* track, std::vector<uint32_t>& payload); - FTK_RawTrack* unpackFTTrack( OFFLINE_FRAGMENTS_NAMESPACE::PointerType data); - - void packHeader(std::vector<uint32_t> &payload); - void unpackHeader(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData); - - void packTrailer(std::vector<uint32_t> &payload); - void unpackTrailer(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData); - - void unpackMonitoring(OFFLINE_FRAGMENTS_NAMESPACE::PointerType &rodData); - - bool m_doHeader; - bool m_doTrailer; - uint32_t m_towerID; - }; - -} -#endif diff --git a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKDump.cxx b/Trigger/TrigFTK/TrigFTKByteStream/src/FTKDump.cxx deleted file mode 100644 index 163c08debe4efc102a92425e1f79d4e6facf0df9..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKDump.cxx +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "FTKDump.h" -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" -#include "AthenaKernel/errorcheck.h" -#include "AthenaBaseComps/AthMessaging.h" - -FTKDump::FTKDump(const std::string &name, ISvcLocator *pSvcLocator) - : AthAlgorithm( name, pSvcLocator ) { - - -} - -FTKDump::~FTKDump(){ - -} - -StatusCode FTKDump::initialize() { - - return StatusCode::SUCCESS; -} - -StatusCode FTKDump::execute() { - - const FTK_RawTrackContainer* tracks_ptr; - - CHECK(evtStore()->retrieve(tracks_ptr, "FTK_RDO_Tracks")); - - - ATH_MSG_INFO( "Got the tracks " << tracks_ptr->size() ); - - return StatusCode::SUCCESS; -} - diff --git a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKDump.h b/Trigger/TrigFTK/TrigFTKByteStream/src/FTKDump.h deleted file mode 100644 index 8880e2192b58fcf2ef835dbcf13e7424ea40a161..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/src/FTKDump.h +++ /dev/null @@ -1,40 +0,0 @@ -// Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id$ -#ifndef FTK_DUMP_EXAMPLE_H -#define FTK_DUMP_EXAMPLE_H - -// Gaudi/Athena include(s): -#include "AthenaBaseComps/AthAlgorithm.h" -#include "GaudiKernel/ToolHandle.h" - - -class MsgStream; - -/** -* @short Example for the usage of FTKDump in C++ -* -* @author Bartosz Mindur <bartosz.mindur@cern.ch> AGH-UST Krakow -* -*/ -class FTKDump : public AthAlgorithm { - -public: - /// Regular algorithm constructor - FTKDump( const std::string &name, ISvcLocator *pSvcLocator ); - ~FTKDump(); - - /// Function called at the beginning of the job - virtual StatusCode initialize(); - /// Function called at each event - virtual StatusCode execute(); - -private: - // -}; // class FTKDump - -#endif // FTK_DUMP_EXAMPLE_H diff --git a/Trigger/TrigFTK/TrigFTKByteStream/src/TrigFTKByteStreamCnv.cxx b/Trigger/TrigFTK/TrigFTKByteStream/src/TrigFTKByteStreamCnv.cxx deleted file mode 100755 index 6a5ccd81255d61a46bce4af51a723d7746de0cf5..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/src/TrigFTKByteStreamCnv.cxx +++ /dev/null @@ -1,144 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "ByteStreamData/ROBData.h" -#include "ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h" -#include "ByteStreamCnvSvcBase/ByteStreamAddress.h" -#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" - -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/DataObject.h" -#include "GaudiKernel/IRegistry.h" - -#include "TrigFTKByteStream/TrigFTKByteStreamCnv.h" - -#include "StoreGate/StoreGate.h" -//#include "CLIDSvc/CLASS_DEF.h" - -// Tool -#include "GaudiKernel/IToolSvc.h" - -//------------------------------------------------------------------------------ -FTK::TrigFTKByteStreamCnv::TrigFTKByteStreamCnv(ISvcLocator* svcloc) : - Converter(storageType(), classID(),svcloc), - m_log(0), - m_tool("FTK::TrigFTKByteStreamTool"), - m_ByteStreamEventAccess("ByteStreamCnvSvc", "TrigFTKByteStreamCnv"), - m_robDataProvider("ROBDataProviderSvc", "TrigFTKByteStreamCnv") -{ } - -FTK::TrigFTKByteStreamCnv::~TrigFTKByteStreamCnv() { - delete m_log; -} - -//------------------------------------------------------------------------------ -const CLID& FTK::TrigFTKByteStreamCnv::classID() -{ - return ClassID_traits<FTK_RawTrackContainer>::ID() ; -} - -//------------------------------------------------------------------------------ -StatusCode FTK::TrigFTKByteStreamCnv::finalize() -{ - return StatusCode::SUCCESS; -} - -//------------------------------------------------------------------------------ -StatusCode FTK::TrigFTKByteStreamCnv::initialize() -{ - StatusCode sc = Converter::initialize(); - if(StatusCode::SUCCESS!=sc) - { - return sc; - } - - m_log = new MsgStream(msgSvc(), "TrigFTKByteStreamCnv"); - (*m_log) << MSG::DEBUG << "TrigFTKByteStreamCnv in initialize() " <<endmsg; - - //Get ByteStreamCnvSvc - if ( m_ByteStreamEventAccess.retrieve().isFailure() ) { - (*m_log) << MSG::FATAL << "failed to retrieve ByteStreamEventAccess service: " - << m_ByteStreamEventAccess << endmsg; - return StatusCode::FAILURE; - } else { - (*m_log) << MSG::DEBUG << "successfully retrieved ByteStreamEventAccess service: " - << m_ByteStreamEventAccess << endmsg; - } - - // get the converter tool: - if ( m_tool.retrieve().isFailure() ) { - (*m_log) << MSG::FATAL << "failed to retrieve converter tool : " - << m_tool << endmsg; - return StatusCode::FAILURE; - } else { - (*m_log) << MSG::DEBUG << "successfully retrieved converter tool: " - << m_tool << endmsg; - } - - - // Get ROBDataProvider - if (m_robDataProvider.retrieve().isFailure()) { - (*m_log) << MSG::FATAL << "failed to retrieve ROBDataProviderSvc service: " - << m_robDataProvider << endmsg; - return StatusCode::FAILURE; - } - - (*m_log) << MSG::DEBUG << "successfully retrieved ROBDataProviderSvc service: " - << m_robDataProvider << endmsg; - - return StatusCode::SUCCESS; -} - -//------------------------------------------------------------------------------ -StatusCode FTK::TrigFTKByteStreamCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj) -{ - FTK_RawTrackContainer* result(0); - - ByteStreamAddress *pBS_Addr; - pBS_Addr = dynamic_cast<ByteStreamAddress*>(pAddr); - if(!pBS_Addr) { - (*m_log) << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg ; - return StatusCode::FAILURE; - } - - const std::string object_name = *(pBS_Addr->par()) ; //< Params for tool converter - std::vector<ROBData> vRobData; - - - - StatusCode sc = m_tool->convert(*m_robDataProvider, result, object_name); //<Actual converstion - if (sc != StatusCode::SUCCESS) { - (*m_log) << MSG::ERROR << "Failed to convert object " << object_name << endmsg; - return sc; - } - - pObj = StoreGateSvc::asStorable(result); - return sc; -} - -//------------------------------------------------------------------------------ -StatusCode FTK::TrigFTKByteStreamCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAddr) -{ - - FTK_RawTrackContainer* result = 0; - StoreGateSvc::fromStorable(pObj, result); - - if (!result) { - (*m_log) << MSG::ERROR << " Cannot cast to FTK_RawTrackContainer " << endmsg ; - return StatusCode::FAILURE; - } - - std::string nm = pObj->registry()->name(); - - RawEventWrite* re = m_ByteStreamEventAccess->getRawEvent(); - // Convert to ByteStream - StatusCode sc = m_tool->convert(result, re, nm); - - ByteStreamAddress* addr = new ByteStreamAddress(classID(), nm, ""); - pAddr = addr; - - return sc; - -} diff --git a/Trigger/TrigFTK/TrigFTKByteStream/src/TrigFTKByteStreamTool.cxx b/Trigger/TrigFTK/TrigFTKByteStream/src/TrigFTKByteStreamTool.cxx deleted file mode 100755 index 5faf8c3e41aa7a6eeb320e85f4a765759cd355a8..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/src/TrigFTKByteStreamTool.cxx +++ /dev/null @@ -1,182 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "eformat/SourceIdentifier.h" -#include "GaudiKernel/MsgStream.h" - -#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" -#include "AthenaBaseComps/AthMsgStreamMacros.h" - -#include "TrigFTK_RawData/FTK_RawPixelCluster.h" -#include "TrigFTK_RawData/FTK_RawSCT_Cluster.h" - -#include "TrigFTKByteStream/IFTKByteStreamDecoderEncoderTool.h" - -#include "TrigFTKByteStream/TrigFTKByteStreamTool.h" -static const InterfaceID IID_ITrigFTKByteStreamTool("TrigFTKByteStreamTool", 1, 0); - - - -//------------------------------------------------------------------------------ -FTK::TrigFTKByteStreamTool::TrigFTKByteStreamTool( const std::string& type, const std::string& name, const IInterface* parent ) - : AthAlgTool(type,name,parent), - m_decoder("FTK::FTKByteStreamDecoderEncoderTool"), - m_decoderAux("FTK::FTKByteStreamDecoderEncoderAuxTool"), - m_AuxFormat(0x0001), - m_decodeAux(false) -{ - declareInterface< FTK::TrigFTKByteStreamTool >( this ); - declareProperty("AuxDataFormatID", m_AuxFormat); - declareProperty("decodeAuxData", m_decodeAux); - declareProperty("ROBIDlist",m_robID={0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xa,0xb,0xc,0xd,0xe,0xf,0x10}); -} - -//------------------------------------------------------------------------------ -FTK::TrigFTKByteStreamTool::~TrigFTKByteStreamTool() -{ -} - -//------------------------------------------------------------------------------ -const InterfaceID& FTK::TrigFTKByteStreamTool::interfaceID( ) -{ - return IID_ITrigFTKByteStreamTool; -} - -//------------------------------------------------------------------------------ -StatusCode FTK::TrigFTKByteStreamTool::initialize() -{ - ATH_MSG_DEBUG( "TrigFTKByteStreamTool has been loaded"); - if (m_decodeAux) { - if (m_decoderAux.retrieve().isFailure()){ - ATH_MSG_ERROR("could not retrieve " << m_decoderAux); - return StatusCode::FAILURE; - } - else { - ATH_MSG_DEBUG(m_decoderAux.name() << " retrieved successfully"); - } - ATH_MSG_INFO( "TrigFTKByteStreamTool will decode 8 layer Aux format data identified by Format ID 0x"<<std::hex<<m_AuxFormat<<std::dec); - } else { - ATH_MSG_INFO( "TrigFTKByteStreamTool will skip decoding of 8 layer Aux format data identified by Format ID 0x"<<std::hex<<m_AuxFormat<<std::dec); - } - if (m_decoder.retrieve().isFailure()){ - ATH_MSG_ERROR("could not retrieve " << m_decoder); - return StatusCode::FAILURE; - } - else { - ATH_MSG_DEBUG(m_decoder.name() << " retrieved successfully"); - } - - ATH_MSG_DEBUG(" ROBIDlist " << m_robID); - - return AlgTool::initialize(); -} - -//------------------------------------------------------------------------------ -StatusCode FTK::TrigFTKByteStreamTool::finalize() -{ - StatusCode sc = AlgTool::finalize(); - return sc; -} - - - - -uint32_t ftkROBID(uint32_t robID) { - return eformat::helper::SourceIdentifier(eformat::TDAQ_FTK, robID).code(); -} - - -//------------------------------------------------------------------------------ -StatusCode FTK::TrigFTKByteStreamTool::convert( const FTK_RawTrackContainer* container, - RawEventWrite* re, - const std::string& objName) { - ATH_MSG_DEBUG ( "[TrigFTKByteStreamTool::convert from FTK_RawTrackContainer]: " << objName ); - m_fea.clear(); - - FullEventAssembler<SrcIdMap>::RODDATA* theROD = m_fea.getRodData( ftkROBID(0x1) ); - std::vector<uint32_t>& payload = *theROD ; - - // CHECK(FTKByteStreamDecoderEncoder::encode(container, payload, msg())); - StatusCode stat = m_decoder->encode(container, payload); - if (stat.isFailure()){ - ATH_MSG_WARNING("problem in encoding the rob fragment"); - } - - m_fea.fill(re, msg()); - - return StatusCode::SUCCESS; -} - - - - - - -//------------------------------------------------------------------------------ -StatusCode FTK::TrigFTKByteStreamTool::convert(IROBDataProviderSvc& dataProvider, - FTK_RawTrackContainer*& result, const std::string& ) -{ - - IROBDataProviderSvc::VROBFRAG rob_frags; //typedef std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> VROBFRAG; - - std::vector<uint32_t> vID; - - for(auto irob:m_robID){ - vID.push_back( ftkROBID(irob) ); - } - - dataProvider.addROBData(vID); - dataProvider.getROBData(vID, rob_frags); - - ATH_MSG_DEBUG ( "[TrigFTKByteStreamTool::convert to FTK_RawTrackContainer] Got ROB fragments: "<< rob_frags.size() ); - result = new FTK_RawTrackContainer(); - - std::vector<uint32_t> ftk_content; - - for (IROBDataProviderSvc::VROBFRAG::const_iterator rob = rob_frags.begin(); rob != rob_frags.end(); ++rob) - { - - const uint32_t nData = (*rob)->rod_ndata(); - const size_t sourceID = (*rob)->rod_source_id(); - ATH_MSG_DEBUG ( "[convert to FTK_RawTrackContainer] Reading fragment of size " << nData - << " from source " << std::hex << sourceID << std::dec); - - if ( nData == 0 ) { - ATH_MSG_DEBUG( "[convert to FTK_RawTrackContainer] empty data payload" ); - } - - if ( nData == 1 ) { - ATH_MSG_DEBUG( "[convert to FTK_RawTrackContainer] only size in payload, no tracks" ); - return StatusCode::SUCCESS; - } - - - OFFLINE_FRAGMENTS_NAMESPACE::PointerType rodData = 0; - (*rob)->rod_data(rodData); - - eformat::helper::Version ver((*rob)->rod_version()); - uint16_t rodMinorVersion= ver.minor_version(); - - if (rodMinorVersion==m_AuxFormat) { - ATH_MSG_DEBUG("Unpacking Data in AUX Format with rodMinorVersion 0x" << std::hex << rodMinorVersion << std::dec<<" no. data words " << nData); - if (m_decodeAux) { - StatusCode scdca = m_decoderAux->decode(nData, rodData, result); - if (scdca.isFailure()){ - ATH_MSG_WARNING("problem in decoding the Aux format rob fragment"); - } - } else { - ATH_MSG_DEBUG("Skipping Data in AUX Format with rodMinorVersion 0x" << std::hex << rodMinorVersion << std::dec); - continue; - } - } else { - ATH_MSG_DEBUG("Unpacking Data in FLIC Format with rodMinorVersion 0x" << std::hex << rodMinorVersion << std::dec); - - StatusCode scdc = m_decoder->decode(nData, rodData, result); - if (scdc.isFailure()){ - ATH_MSG_WARNING("problem in decoding the rob fragment"); - } - } - } - return StatusCode::SUCCESS; -} diff --git a/Trigger/TrigFTK/TrigFTKByteStream/src/components/TrigTrigFTKByteStream_entries.cxx b/Trigger/TrigFTK/TrigFTKByteStream/src/components/TrigTrigFTKByteStream_entries.cxx deleted file mode 100644 index 8c8f15d675bdb554d6afa6a303e942e324e89a14..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/src/components/TrigTrigFTKByteStream_entries.cxx +++ /dev/null @@ -1,12 +0,0 @@ -#include "TrigFTKByteStream/TrigFTKByteStreamCnv.h" -#include "TrigFTKByteStream/TrigFTKByteStreamTool.h" -#include "../FTKByteStreamDecoderEncoder.h" -#include "../FTKByteStreamDecoderEncoderAux.h" -#include "../FTKDump.h" - -DECLARE_CONVERTER( FTK::TrigFTKByteStreamCnv ) -DECLARE_COMPONENT( FTK::TrigFTKByteStreamTool ) -DECLARE_COMPONENT( FTK::FTKByteStreamDecoderEncoderTool ) -DECLARE_COMPONENT( FTK::FTKByteStreamDecoderEncoderAuxTool ) -DECLARE_COMPONENT( FTKDump ) - diff --git a/Trigger/TrigFTK/TrigFTKByteStream/test/FTKEncodeDecode_CppUnit.cxx b/Trigger/TrigFTK/TrigFTKByteStream/test/FTKEncodeDecode_CppUnit.cxx deleted file mode 100644 index ac9666bcafc25bc12e8c665fe932c7b67672ee54..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKByteStream/test/FTKEncodeDecode_CppUnit.cxx +++ /dev/null @@ -1,139 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include <random> -#include "AthenaKernel/getMessageSvc.h" -#include "GaudiKernel/MsgStream.h" - - -#include <cppunit/extensions/HelperMacros.h> -#include <cppunit/Exception.h> - -#include "TrigFTK_RawData/FTK_RawTrack.h" -#include "../src/FTKByteStreamDecoderEncoder.h" -#include "../src/FTKByteStreamDecoderEncoder.cxx" - -//int main() { return 0; } - -class FTKEncodeDecodeTest : public CppUnit::TestFixture { - - CPPUNIT_TEST_SUITE (FTKEncodeDecodeTest); - CPPUNIT_TEST (emptyCollection); - CPPUNIT_TEST (filledCollection); - CPPUNIT_TEST (hugeCollection); - // CPPUNIT_TEST (truncatedData); - CPPUNIT_TEST_SUITE_END(); - -private: - std::random_device m_rd; - std::mt19937 m_gen; - std::uniform_int_distribution<uint32_t> m_urng; - - - -public: - FTKEncodeDecodeTest() - : m_gen(m_rd()), m_urng(0, 0xffffffff) {} - - void setUp() { - } - void tearDown(){} - - // no return as assertions will raise error when the tracks are different - // realy they shoudl be quality comparable - void compareTracks(const FTK_RawTrack* lhs, const FTK_RawTrack* rhs) { - CPPUNIT_ASSERT_EQUAL(lhs->getTH1(), rhs->getTH1()); - CPPUNIT_ASSERT_EQUAL(lhs->getTH2(), rhs->getTH2()); - CPPUNIT_ASSERT_EQUAL(lhs->getTH3(), rhs->getTH3()); - CPPUNIT_ASSERT_EQUAL(lhs->getTH4(), rhs->getTH4()); - CPPUNIT_ASSERT_EQUAL(lhs->getTH5(), rhs->getTH5()); - - for( size_t i = 0; i < 4; ++i ) { - CPPUNIT_ASSERT_EQUAL(lhs->getPixelCluster(i).getWordA(), rhs->getPixelCluster(i).getWordA()); - CPPUNIT_ASSERT_EQUAL(lhs->getPixelCluster(i).getWordB(), rhs->getPixelCluster(i).getWordB()); - } - - for( size_t i = 0; i < 8; ++i ) { - CPPUNIT_ASSERT_EQUAL(lhs->getSCTCluster(i).getWord(), rhs->getSCTCluster(i).getWord()); - } - - - - } - - uint32_t rnd() { - return m_urng(m_gen); - } - - FTK_RawTrack* generateTrack() { - FTK_RawTrack* trk = new FTK_RawTrack(rnd(),rnd(),rnd(),rnd(),rnd()); - - trk->getPixelClusters().resize(4); - for ( auto& cluster: trk->getPixelClusters() ) { - cluster.setWordA(rnd()); - cluster.setWordB(rnd()); - } - - trk->getSCTClusters().resize(8); - for ( auto& cluster: trk->getSCTClusters() ) { - cluster.setWord(rnd()); - } - return trk; - } - // one function testing various sizes - void createStreamUnstreamCheck(size_t ntrk) { - MsgStream log(Athena::getMessageSvc(), "FTKEncodeDecodeTest"); - log.setLevel(1); - using namespace FTKByteStreamDecoderEncoder; - FTK_RawTrackContainer cont; - - for ( size_t i = 0 ; i < ntrk; ++i ) { - cont.push_back(generateTrack()); - } - log << MSG::DEBUG << "prepareed collection of size " << cont.size() << endmsg; - std::vector<uint32_t> payload; - { - StatusCode sc = encode(&cont, payload, log); - CPPUNIT_ASSERT( sc.isSuccess() ); - } - log << MSG::DEBUG << "Serialized payload to size " << payload.size() << endmsg; - // copy payload to plain array - uint32_t * raw = new uint32_t[payload.size()]; - std::copy(payload.begin(), payload.end(), raw); - - CPPUNIT_ASSERT_EQUAL(ntrk, decodeNumberOfTracks(raw) ); - FTK_RawTrackContainer* newcont = new FTK_RawTrackContainer(); - { - StatusCode sc = decode(raw, newcont, log); - CPPUNIT_ASSERT( sc.isSuccess() ); - } - CPPUNIT_ASSERT_EQUAL(ntrk, newcont->size()); - delete [] raw; - - for ( size_t i = 0; i < ntrk; ++i ) { - compareTracks(cont.at(i), newcont->at(i)); - } - delete newcont; - } - - void emptyCollection() { - createStreamUnstreamCheck(0); - } - - void filledCollection() { - createStreamUnstreamCheck(10); - } - - void hugeCollection() { - createStreamUnstreamCheck(10000); - } - - -private: - - - -}; -CPPUNIT_TEST_SUITE_REGISTRATION (FTKEncodeDecodeTest); -#include <TestTools/CppUnit_testdriver.cxx> diff --git a/Trigger/TrigFTK/TrigFTKPool/CMakeLists.txt b/Trigger/TrigFTK/TrigFTKPool/CMakeLists.txt deleted file mode 100644 index 35e6a82004218b29a6fc28185bc7bf05bfcc721d..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/CMakeLists.txt +++ /dev/null @@ -1,53 +0,0 @@ -################################################################################ -# Package: TrigFTKPool -################################################################################ - -# Declare the package name: -atlas_subdir( TrigFTKPool ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - Control/AthContainers - Control/DataModelAthenaPool - PRIVATE - Database/AthenaPOOL/AthenaPoolCnvSvc - Database/AthenaPOOL/AthenaPoolUtilities ) - -# External dependencies: -find_package( ROOT COMPONENTS MathCore Core Tree Hist RIO pthread ) - -# Component(s) in the package: -atlas_add_library( TrigFTKPool - src/*.cxx - PUBLIC_HEADERS TrigFTKPool - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES AthContainers AthenaPoolCnvSvcLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolUtilities ) - -atlas_add_poolcnv_library( TrigFTKPoolPoolCnv - src/*.cxx - FILES TrigFTKPool/FTKTestData.h TrigFTKPool/FTKAthTrackContainer.h TrigFTKPool/FTKTrackFitterStats.h - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelAthenaPoolLib AthContainers AthenaPoolCnvSvcLib AthenaPoolUtilities TrigFTKPool ) - -atlas_add_dictionary( TrigFTKPoolDict - TrigFTKPool/TrigFTKPoolDict.h - TrigFTKPool/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelAthenaPoolLib AthContainers AthenaPoolCnvSvcLib AthenaPoolUtilities TrigFTKPool ) - -atlas_add_test( FTKAthTrackCnv_p1_test - SOURCES - test/FTKAthTrackCnv_p1_test.cxx - LINK_LIBRARIES TrigFTKPool ) - -atlas_add_test( FTKTrackFitterStatsCnv_p1_test - SOURCES - test/FTKTrackFitterStatsCnv_p1_test.cxx - LINK_LIBRARIES TrigFTKPool ) - -atlas_add_test( FTKTestDataCnv_p0_test - SOURCES - test/FTKTestDataCnv_p0_test.cxx - LINK_LIBRARIES TrigFTKPool ) diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrack.h b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrack.h deleted file mode 100644 index 07b77f1398ed747b016215e2baa7483891e92c4a..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrack.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTKSIM_FTKATHTRACK_H -#define TRIGFTKSIM_FTKATHTRACK_H - -#include <vector> - -class FTKAthTrack { -private: - int m_bankID; // Bank ID of the road related to this track - int m_roadID; // Road identifier - int m_patternID; // TODO add documentation - int m_sectorID; // Sector identifier - int m_trackID; // Unique track ID in this bank - - float m_invpt; // 1/(2*Pt) // aka 0.5*invpt - float m_d0; // impact paramter - float m_phi; // phi of the track - float m_z0; // z0 - float m_ctheta; // cot(theta) - float m_chi2; // chi2 of the track - float m_origchi2; // In the case of majority recovery, this is the chi2 of - // the full fit. In all other cases m_chi2 == m_origchi2 - - int m_nmissing; // number of missing coordinates - unsigned int m_typemask; // set on in bits related to the step recovery were used, ex.: 0 no recovery, 01, rec 1st step, 11, recovery in the 1st and the 2nd stage - unsigned int m_bitmask; - int m_ncoords; // number of coordinates for the track - float *m_coord; //[m_ncoords] coordinates used in the fit - - int m_HF_rejected; /* 0 if the track is accepted, >0 if rejected by hit filter - if negative, belongs to a HF rejected road - */ - int m_HW_rejected; /* The flag has 3 digit: [Q][RW][HW]: - Q : 1 if has a bad chi2, 0 if not - RW: is the RW level rejected the road, 0 if not rejected - HW: 1 if rejected by HW, 0 if not */ - int m_HW_track; // ID of the track excluded this track - - signed long m_eventindex; // matched particle event index - signed long m_barcode; // matched geant particle barcode - float m_barcode_frac; // largest "matching fraction" with any "good" - // geant particle, corresponding to the - // particle with m_barcode - -public: - FTKAthTrack(); - FTKAthTrack(int); - FTKAthTrack(const FTKAthTrack &); - virtual ~FTKAthTrack(); - - const int& getBankID() const { return m_bankID; } - int getRegion() const { return m_bankID%100; } - int getSubRegion() const { return m_bankID/100; } - const int& getRoadID() const { return m_roadID; } - const int& getPatternID() const { return m_patternID; } - const int& getSectorID() const { return m_sectorID; } - const int& getTrackID() const { return m_trackID; } - float getParameter(int) const; - const float& getHalfInvPt() const { return m_invpt; } - float getPt() const { return .5/m_invpt; } - const float& getIP() const { return m_d0; } - const float& getPhi() const { return m_phi; } - const float& getZ0() const { return m_z0; } - const float& getCotTheta() const { return m_ctheta; } - float getEta() const; - const float& getChi2() const { return m_chi2; } - float getChi2ndof() const { return m_chi2/(m_ncoords-m_nmissing-5); } - const float& getOrigChi2() const { return m_origchi2; } - float getOrigChi2ndof() const { return m_origchi2/(m_ncoords-m_nmissing-5); } - const int& getNMissing() const { return m_nmissing; } - const unsigned int& getTypeMask() const { return m_typemask; } - const unsigned int& getBitmask() const { return m_bitmask; } - const int& getNCoords() const { return m_ncoords; } - const float& getCoord(int i) const { return m_coord[i]; } - float *getCoords() { return m_coord; }; - const int& getHFRejected() const { return m_HF_rejected; } - const int& getHWRejected() const { return m_HW_rejected; } - const int& getHWTrackID() const { return m_HW_track; } - const signed long& getEventIndex() const { return m_eventindex; } - const signed long& getBarcode() const { return m_barcode; } - const float& getBarcodeFrac() const { return m_barcode_frac; } - - void setBankID(int v) { m_bankID = v; } - void setRoadID(int v) { m_roadID = v; } - void setPatternID(int v) { m_patternID = v; } - void setSectorID(int v) { m_sectorID = v; } - void setTrackID(int v) { m_trackID = v; } - void setParameter(int,float); - void setHalfInvPt(float v) { m_invpt = v; } - void setIP(float v) { m_d0 = v; } - void setPhi(float v,bool ForceRange=true); - void setZ0(float v) {m_z0 = v;} - void setCotTheta(float v) { m_ctheta = v; } - void setChi2(float v) { m_chi2 = v; } - void setOrigChi2(float v) { m_origchi2 = v; } - void setNMissing(int v) { m_nmissing = v; } - void setTypeMask(unsigned int v) { m_typemask = v; } - void setBitmask(unsigned int v) { m_bitmask = v; } - void setNCoords(int); - void setCoord(int i, float v) { m_coord[i] = v; } - void setEventIndex( const signed long& v ) { m_eventindex = v; } - void setBarcode( const signed long& v ) { m_barcode = v; } - void setBarcodeFrac(const float& v ) { m_barcode_frac = v; } - void setHFRejected(int v) { m_HF_rejected = v; } - void setHWRejected(int v) { m_HW_rejected = v; } - void setHWTrackID(int v) { m_HW_track = v; } - - // Function used by the HW to compare similar combinations - unsigned int getNCommonHits(const FTKAthTrack &, const float*) const; - int HWChoice(const FTKAthTrack&,const float*,const unsigned int,int) const; - - FTKAthTrack& operator=(const FTKAthTrack&); -}; - -#endif // TRIGFTKSIM_FTKATHTRACK_H diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrackContainer.h b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrackContainer.h deleted file mode 100644 index 45130c382613183b8f62228f69dc7f8e280f0aae..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrackContainer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKATHTRACKCONTAINER_H -#define FTKATHTRACKCONTAINER_H - -#include "AthContainers/DataVector.h" -#include "TrigFTKPool/FTKAthTrack.h" - -class FTKAthTrackContainer : public DataVector<FTKAthTrack> { -public : - FTKAthTrackContainer(SG::OwnershipPolicy ownPolicy = SG::OWN_ELEMENTS) : - DataVector<FTKAthTrack>(ownPolicy) {}; - virtual ~FTKAthTrackContainer() {}; -}; - -#include "AthenaKernel/CLASS_DEF.h" -CLASS_DEF(FTKAthTrackContainer,67458,1) - -#endif // FTKATHTRACKCONTAINER_H diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrackContainer_p1.h b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrackContainer_p1.h deleted file mode 100644 index 4ea92dd4ddae566bd1a8342f835a7df37b738505..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrackContainer_p1.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKATHTRACKCONTAINER_P1_H -#define FTKATHTRACKCONTAINER_P1_H - -#include <vector> -#include "TrigFTKPool/FTKAthTrack_p1.h" - -class FTKAthTrackContainer_p1 : public std::vector<FTKAthTrack_p1> { -}; - -#endif // FTKATHTRACKCONTAINER_P1_H diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrack_p1.h b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrack_p1.h deleted file mode 100644 index d1b0d952de9af09b7cc7c983201318b1c812f47d..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKAthTrack_p1.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTKSIM_FTKATHTRACK_P1_H -#define TRIGFTKSIM_FTKATHTRACK_P1_H - -#include <vector> - -class FTKAthTrack_p1 { -private: - int m_bankID; // Bank ID of the road related to this track - int m_roadID; // Road identifier - int m_patternID; // TODO add documentation - int m_sectorID; // Sector identifier - int m_trackID; // Unique track ID in this bank - - float m_invpt; // 1/(2*Pt), aka half of 1/pt - float m_d0; // impact paramter - float m_phi; // phi of the track - float m_z0; // z0 - float m_ctheta; // cot(theta) - float m_chi2; // chi2 of the track - float m_origchi2; // In the case of majority recovery, this is the chi2 of - // the full fit. In all other cases m_chi2 == m_origchi2 - - int m_nmissing; // number of missing coordinates - unsigned int m_typemask; // set on in bits related to the step recovery were used, ex.: 0 no recovery, 01, rec 1st step, 11, recovery in the 1st and the 2nd stage - unsigned int m_bitmask; - std::vector<float> m_coord; // coordinates used in the fit - - int m_HF_rejected; /* 0 if the track is accepted, >0 if rejected by hit filter - if negative, belongs to a HF rejected road - */ - int m_HW_rejected; /* The flag has 3 digit: [Q][RW][HW]: - Q : 1 if has a bad chi2, 0 if not - RW: is the RW level rejected the road, 0 if not rejected - HW: 1 if rejected by HW, 0 if not */ - int m_HW_track; // ID of the track excluded this track - - signed long m_eventindex; // matched particle event index - signed long m_barcode; // matched geant particle barcode - float m_barcode_frac; // largest "matching fraction" with any "good" - // geant particle, corresponding to the - // particle with m_barcode - -public: - FTKAthTrack_p1(); - - friend class FTKAthTrackCnv_p1; -}; - -#endif // TRIGFTKSIM_FTKATHTRACK_P1_H diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTestData.h b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTestData.h deleted file mode 100644 index 54ccbaaaa59f6c10f7ffd04682200777634eb1c7..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTestData.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKTestData_h -#define FTKTestData_h - -class FTKTestData { -private: - int m_ival; - -public: - FTKTestData() : m_ival(0) {;} - FTKTestData(int ival) : m_ival(ival) {;} - - void setValue(int); - int getValue() const; -}; - -#include "AthenaKernel/CLASS_DEF.h" -CLASS_DEF(FTKTestData,827647585,1) -#endif // FTKTestData_h diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTestData_p0.h b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTestData_p0.h deleted file mode 100644 index 3e16714f566478140a3add1540efd529fd2525c2..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTestData_p0.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKTestData_POOL_h -#define FTKTestData_POOL_h - -class FTKTestData_p0 { -private: - int m_ival; - -public: - - friend class FTKTestDataCnv_p0; -}; - -#endif // FTKTestData_POOL_h diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTrackFitterStats.h b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTrackFitterStats.h deleted file mode 100644 index 9f41c6f738d27d9a2aed5cd0e143ecc4d484af73..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTrackFitterStats.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKTRACKFITTERSTATS_H -#define FTKTRACKFITTERSTATS_H - -class FTKTrackFitterStats { -private: - unsigned int m_ncombs; // number of combinations - unsigned int m_nfits; // number of fitted combinations - unsigned int m_nfits_maj; // number of fitted combinations in majority roads - unsigned int m_nfits_maj_pix; // number of fitted combinations in majority roads for pix missing - unsigned int m_nfits_maj_SCT; // number of fitted combinations in majority roads for SCT missing - unsigned int m_nfits_rec; // number of full fits attempted to recover - unsigned int m_nfits_addrec; // additional fits performed because the recovery - unsigned int m_nfits_bad; // # fits with a bad chi^2 - unsigned int m_nfits_rej; // # of fits rejected because the HW - unsigned int m_nfits_badmaj; // # fits with a bad chi^2 - unsigned int m_nfits_rejmaj; // # of fits rejected because the HW - unsigned int m_nconn; // number of connections - unsigned int m_nextrapolatedTracks; - -public: - FTKTrackFitterStats(); - - void setNCombs(int v) { m_ncombs = v; } - void setNFits(int v) { m_nfits = v; } - void setNFitsMajority(int v) { m_nfits_maj = v; } - void setNFitsMajority_pix(int v) { m_nfits_maj_pix = v; } - void setNFitsMajority_SCT(int v) { m_nfits_maj_SCT = v; } - void setNFitsRecovery(int v) { m_nfits_rec = v; } - void setNAddFitsRecovery(int v) { m_nfits_addrec = v; } - void setNFitsBad(int v) { m_nfits_bad = v; } - void setNFitsHWRejected(int v) { m_nfits_rej = v; } - void setNFitsBadMajority(int v) { m_nfits_badmaj = v; } - void setNFitsHWRejectedMajority(int v) { m_nfits_rejmaj = v; } - void setNConn(int v) {m_nconn = v;} - void setNExtrapolatedTracks(int v) {m_nextrapolatedTracks = v;} - - void addNCombs(int v) { m_ncombs += v; } - void addNFits(int v) { m_nfits += v; } - void addNFitsMajority(int v) { m_nfits_maj += v; } - void addNFitsMajority_pix(int v) { m_nfits_maj_pix += v; } - void addNFitsMajority_SCT(int v) { m_nfits_maj_SCT += v; } - void addNFitsRecovery(int v) { m_nfits_rec += v; } - void addNAddFitsRecovery(int v) { m_nfits_addrec += v; } - void addNFitsBad(int v) { m_nfits_bad += v; } - void addNFitsHWRejected(int v) { m_nfits_rej += v; } - void addNFitsBadMajority(int v) { m_nfits_badmaj += v; } - void addNFitsHWRejectedMajority(int v) { m_nfits_rejmaj += v; } - void addNConnections(int v) {m_nconn += v;} - void addNExtrapolatedTracks(int v) {m_nextrapolatedTracks += v;} - - unsigned int getNCombs() const { return m_ncombs; } - unsigned int getNFits() const { return m_nfits; } - unsigned int getNFitsMajority() const { return m_nfits_maj; } - unsigned int getNFitsMajority_pix() const { return m_nfits_maj_pix; } - unsigned int getNFitsMajority_SCT() const { return m_nfits_maj_SCT; } - unsigned int getNFitsRecovery() const { return m_nfits_rec; } - unsigned int getNAddFitsRecovery() const { return m_nfits_addrec; } - unsigned int getNFitsBad() const { return m_nfits_bad; } - unsigned int getNFitsHWRejected() const { return m_nfits_rej; } - unsigned int getNFitsBadMajority() const { return m_nfits_badmaj; } - unsigned int getNFitsHWRejectedMajority() const { return m_nfits_rejmaj; } - unsigned int getNConn() const { return m_nconn;} - unsigned int getNExtrapolatedTracks() const {return m_nextrapolatedTracks;} -}; - -#include "AthenaKernel/CLASS_DEF.h" -CLASS_DEF(FTKTrackFitterStats,764785,3) - -#endif // FTKTRACKFITTERSTATS_H diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTrackFitterStats_p1.h b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTrackFitterStats_p1.h deleted file mode 100644 index 7ad838cfd5bc68fc66000c2ef74d8abedcab53dc..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/FTKTrackFitterStats_p1.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKTRACKFITTERSTATS_P1_H -#define FTKTRACKFITTERSTATS_P1_H - -class FTKTrackFitterStats_p1 { -private: - friend class FTKTrackFitterStatsCnv_p1; - - unsigned int m_ncombs; // number of combinations - unsigned int m_nfits; // number of fitted combinations - unsigned int m_nfits_maj; // number of fitted combinations in majority roads - unsigned int m_nfits_maj_pix; // number of fitted combinations in majority roads for pix missing - unsigned int m_nfits_maj_SCT; // number of fitted combinations in majority roads for SCT missing - unsigned int m_nfits_rec; // number of full fits attempted to recover - unsigned int m_nfits_addrec; // additional fits performed because the recovery - unsigned int m_nfits_bad; // # fits with a bad chi^2 - unsigned int m_nfits_rej; // # of fits rejected because the HW - unsigned int m_nfits_badmaj; // # fits with a bad chi^2 - unsigned int m_nfits_rejmaj; // # of fits rejected because the HW - -public: - FTKTrackFitterStats_p1(); - -}; -#endif // FTKTRACKFITTERSTATS_H diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/TrigFTKPoolDict.h b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/TrigFTKPoolDict.h deleted file mode 100644 index 6e0763a88d6b771f83074d08903e82313a7a3cdb..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/TrigFTKPoolDict.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TrigFTKPoolDict_h -#define TrigFTKPoolDict_h - -#include "TrigFTKPool/FTKTestData.h" -#include "TrigFTKPool/FTKTestData_p0.h" - -#include "TrigFTKPool/FTKAthTrack.h" -#include "TrigFTKPool/FTKAthTrackContainer.h" -#include "TrigFTKPool/FTKAthTrack_p1.h" -#include "TrigFTKPool/FTKAthTrackContainer_p1.h" - -#include "TrigFTKPool/FTKTrackFitterStats.h" -#include "TrigFTKPool/FTKTrackFitterStats_p1.h" - -#endif // TrigFTKEventPoolDict_h diff --git a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/selection.xml b/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/selection.xml deleted file mode 100644 index 53f50116fcda26ef399654519d1538821aad1de2..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/TrigFTKPool/selection.xml +++ /dev/null @@ -1,13 +0,0 @@ -<lcgdict> -<class name="FTKTestData" id="1F22CE79-5D49-4DDB-B282-CB894C10CFFD" /> -<class name="FTKTestData_p0" id="1F22CE79-5D39-4DDB-B882-CA894B26CFFD" /> - -<class name="FTKAthTrack" /> -<class name="FTKAthTrackContainer" id="A04672DA-185E-4363-B41E-06B55E4AF9AA" /> -<class name="FTKAthTrack_p1" /> -<class name="FTKAthTrackContainer_p1" id="94372D90-D05F-44B0-8E12-2E795342EAFC" /> - -<class name="FTKTrackFitterStats" id="09065382-0AA9-4926-A2A8-7FFC5ED7BAA7" /> -<class name="FTKTrackFitterStats_p1" id="09056832-AA09-9426-A2A8-7FC5ED7BFAA7" /> - -</lcgdict> diff --git a/Trigger/TrigFTK/TrigFTKPool/share/FTKAthTrackCnv_p1_test.ref b/Trigger/TrigFTK/TrigFTKPool/share/FTKAthTrackCnv_p1_test.ref deleted file mode 100644 index e863595e3ade5990e3983e826388c8abe9efbbf7..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/share/FTKAthTrackCnv_p1_test.ref +++ /dev/null @@ -1,2 +0,0 @@ -TrigFTKPool/FTKAthTrackCnv_p1_test -test1 diff --git a/Trigger/TrigFTK/TrigFTKPool/share/FTKTestDataCnv_p0_test.ref b/Trigger/TrigFTK/TrigFTKPool/share/FTKTestDataCnv_p0_test.ref deleted file mode 100644 index 3859dd262bae347e067c106a9404704595348af5..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/share/FTKTestDataCnv_p0_test.ref +++ /dev/null @@ -1,2 +0,0 @@ -TrigFTKPool/FTKTestDataCnv_p0_test -test1 diff --git a/Trigger/TrigFTK/TrigFTKPool/share/FTKTrackFitterStatsCnv_p1_test.ref b/Trigger/TrigFTK/TrigFTKPool/share/FTKTrackFitterStatsCnv_p1_test.ref deleted file mode 100644 index 7fafa399e3771af7830d5b0bd1d350b9f669124c..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/share/FTKTrackFitterStatsCnv_p1_test.ref +++ /dev/null @@ -1,2 +0,0 @@ -TrigFTKPool/FTKTrackFitterStatsCnv_p1_test -test1 diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrack.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrack.cxx deleted file mode 100644 index a35413424001d7fbe6e265186477ff7357083812..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrack.cxx +++ /dev/null @@ -1,291 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTKPool/FTKAthTrack.h" - -#include <iostream> -#include <TMath.h> -using namespace std; - -FTKAthTrack::FTKAthTrack() : - m_bankID(-1), m_roadID(-1), - m_patternID(0), - m_sectorID(-1), m_trackID(-1), - m_invpt(0), m_d0(0), m_phi(0), m_z0(0), - m_ctheta(0), m_chi2(0), m_origchi2(0), m_nmissing(0), - m_typemask(0), m_bitmask(0), m_ncoords(0), m_coord(0), - m_HF_rejected(0),m_HW_rejected(0),m_HW_track(-1), - m_eventindex(-1), m_barcode(-1), m_barcode_frac(0.) -{ - // nothing to do -} - -FTKAthTrack::FTKAthTrack(int ncoords) : - m_bankID(-1), m_roadID(-1), - m_patternID(0), - m_sectorID(-1), m_trackID(-1), - m_invpt(0), m_d0(0), m_phi(0), m_z0(0), - m_ctheta(0), m_chi2(0), m_origchi2(0), m_nmissing(0), - m_typemask(0), m_bitmask(0), m_ncoords(ncoords), - m_HF_rejected(0),m_HW_rejected(0),m_HW_track(-1), - m_eventindex(-1), m_barcode(-1), m_barcode_frac(0.) -{ - m_coord = new float[m_ncoords]; - for (int ix=0;ix!=m_ncoords;++ix) m_coord[ix] = 0.f; -} - - -FTKAthTrack::FTKAthTrack(const FTKAthTrack &cpy) -{ - m_bankID = cpy.m_bankID; - m_roadID = cpy.m_roadID; - m_sectorID = cpy.m_sectorID; - m_trackID = cpy.m_trackID; - m_invpt = cpy.m_invpt; - m_d0 = cpy.m_d0; - m_phi = cpy.m_phi; - m_ctheta = cpy.m_ctheta; - m_z0 = cpy.m_z0; - m_chi2 = cpy.m_chi2; - m_origchi2 = cpy.m_origchi2; - m_nmissing = cpy.m_nmissing; - m_typemask = cpy.m_typemask; - m_bitmask = cpy.m_bitmask; - m_ncoords = cpy.m_ncoords; - - m_eventindex = cpy.m_eventindex; - m_eventindex = cpy.m_eventindex; - m_barcode = cpy.m_barcode; - m_barcode_frac = cpy.m_barcode_frac; - - m_HF_rejected = cpy.m_HF_rejected; - - m_HW_rejected = cpy.m_HW_rejected; - m_HW_track = cpy.m_HW_track; - - m_patternID = cpy.m_patternID; - - m_coord = new float[m_ncoords]; - for (int i=0;i<m_ncoords;++i) - m_coord[i] = cpy.m_coord[i]; -} - - - -FTKAthTrack::~FTKAthTrack() -{ - if (m_ncoords>0) delete [] m_coord; -} - -// if ForceRange==true, then phi = [-pi..pi) -void FTKAthTrack::setPhi(float phi, bool ForceRange) { - if (ForceRange) { - // when phi is ridiculously large, there is no point in adjusting it - if(fabs(phi)>100) { - if(m_chi2<100) { // this is a BAD track, so fail it if chi2 hasn't done so already - std::cout << "FTKAthTrack warning: fitted phi = " << phi << ", but chi2 = " << m_chi2 - << ". Adjusting to chi2+=100!" << std::endl; - m_chi2+=100; // we want to fail this event anyway - } - } - else { - while (phi>= TMath::Pi()) phi -= TMath::TwoPi(); - while (phi< -TMath::Pi()) phi += TMath::TwoPi(); - } - } - m_phi = phi; -} - - -/** set the number of coordinates connected with this track, - a dim=0 is used to cleanup array content */ -void FTKAthTrack::setNCoords(int dim) -{ - if (m_ncoords>0) delete [] m_coord; - - m_ncoords = dim; - m_coord = new float[m_ncoords]; - for (int i=0;i<m_ncoords;++i) - m_coord[i] = 0; -} - -float FTKAthTrack::getParameter(int ipar) const -{ - switch (ipar) { - case 0: - return m_invpt; - break; - case 1: - return m_d0; - break; - case 2: - return m_phi; - break; - case 3: - return m_z0; - break; - case 4: - return m_ctheta; - break; - } - - return 0.; -} - - -/** return the number of the common hits */ -unsigned int FTKAthTrack::getNCommonHits(const FTKAthTrack &track, const float *HWdev) const -{ - unsigned int ncommon_hits(0); - - // match over the hits list - for (int ix=0;ix!=m_ncoords;++ix) { - if ( !((m_bitmask & track.m_bitmask) & (1<<ix)) ) { - // majority hits are always common - ncommon_hits += 1; - continue; - } - - double dist = TMath::Abs(getCoord(ix)-track.getCoord(ix)); - if ( dist < HWdev[ix] ) { - ++ncommon_hits; // a common hit - } - } // end loop over hits - - return ncommon_hits; -} - - -/** this function compare this track with a different tracks and returns: - 0 if according HW setup the two tracks are different - 1 are similar and the other has a worse quality parameter - -1 are similar and the other has a better quality parameter */ -int FTKAthTrack::HWChoice(const FTKAthTrack &other, const float *HW_dev, - const unsigned int HW_ndiff, int HW_level) const -{ - int accepted(0); - - // Choose hitwarrior severity level: 1=in-road, 2=global - if(HW_level<2) { - if(getBankID()!=other.getBankID()) return accepted; - if(getRoadID()!=other.getRoadID()) return accepted; - } - - unsigned int ncommon_hits = getNCommonHits(other,HW_dev); - - // FlagAK - simplistic hitwarrior. Makes no distinction between 1D and 2D - // If this doesn't work, we'll need to come up with something smarter - // check the criteria for considering two tracks the same - if ( m_ncoords-ncommon_hits<=HW_ndiff) { - // the track matches - if ( ( getHWRejected() && !other.getHWRejected()) || - (!getHWRejected() && other.getHWRejected()) ) { - - // keep the track in the accepted road - if (getHWRejected()) { - accepted = -1; - } - else { - accepted = 1; - } - - } - else if (other.getNMissing()==getNMissing()) { - // keep the track with the best chi2 - if (other.getChi2() > getChi2()) { - accepted = 1; - } - else { - accepted = -1; - } - } - else if (other.getNMissing() < getNMissing()) { - // keep the track using more real points - accepted = -1; - } - else if (other.getNMissing() > getNMissing()) { - accepted = 1; - } - } - - return accepted; -} - - -void FTKAthTrack::setParameter(int ipar, float val) -{ - switch (ipar) { - case 0: - m_invpt = val; - break; - case 1: - m_d0 = val; - break; - case 2: - m_phi = val; - break; - case 3: - m_z0 = val; - break; - case 4: - m_ctheta = val; - break; - } -} - - -float FTKAthTrack::getEta() const -{ - return TMath::ASinH(m_ctheta); -} - - - -FTKAthTrack& FTKAthTrack::operator=(const FTKAthTrack &tocpy) -{ -#ifdef PROTECT_SA // speedup - if (this != &tocpy) -#endif - { - m_bankID = tocpy.m_bankID; - m_roadID = tocpy.m_roadID; - m_sectorID = tocpy.m_sectorID; - m_trackID = tocpy.m_trackID; - m_invpt = tocpy.m_invpt; - m_d0 = tocpy.m_d0; - m_phi = tocpy.m_phi; - m_z0 = tocpy.m_z0; - m_ctheta = tocpy.m_ctheta; - m_chi2 = tocpy.m_chi2; - m_origchi2 = tocpy.m_origchi2; - m_nmissing = tocpy.m_nmissing; - m_typemask = tocpy.m_typemask; - m_bitmask = tocpy.m_bitmask; - - m_eventindex = tocpy.m_eventindex; - m_barcode = tocpy.m_barcode; - m_barcode_frac = tocpy.m_barcode_frac; - - m_HF_rejected = tocpy.m_HF_rejected; - - m_HW_rejected = tocpy.m_HW_rejected; - m_HW_track = tocpy.m_HW_track; - - if (m_ncoords!=tocpy.m_ncoords) { - m_ncoords = tocpy.m_ncoords; - if (m_coord) delete [] m_coord; - m_coord = new float[m_ncoords]; - } - - for (int i=0;i<m_ncoords;++i) { - m_coord[i] = tocpy.m_coord[i]; - } - - m_eventindex = tocpy.m_eventindex; - m_barcode = tocpy.m_barcode; - m_barcode_frac = tocpy.m_barcode_frac; - } - - return *this; -} diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackCnv_p1.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackCnv_p1.cxx deleted file mode 100644 index 7a1ea97e2729a729ac452d95b73976d156b77475..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackCnv_p1.cxx +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTKPool/FTKAthTrack.h" - -#include "FTKAthTrackCnv_p1.h" - -void FTKAthTrackCnv_p1::persToTrans(const FTKAthTrack_p1 *persObj, - FTKAthTrack *transObj, MsgStream&) const -{ - transObj->setBankID (persObj->m_bankID); - transObj->setRoadID (persObj->m_roadID); - transObj->setPatternID (persObj->m_patternID); - transObj->setSectorID (persObj->m_sectorID); - transObj->setTrackID (persObj->m_trackID); - transObj->setHalfInvPt (persObj->m_invpt); - transObj->setIP (persObj->m_d0); - transObj->setPhi (persObj->m_phi, false); - transObj->setZ0 (persObj->m_z0); - transObj->setCotTheta (persObj->m_ctheta); - transObj->setChi2 (persObj->m_chi2); - transObj->setOrigChi2 (persObj->m_origchi2); - transObj->setNMissing (persObj->m_nmissing); - transObj->setTypeMask (persObj->m_typemask); - transObj->setBitmask (persObj->m_bitmask); - - transObj->setNCoords (persObj->m_coord.size()); - for (size_t ic=0;ic!=persObj->m_coord.size();++ic) - transObj->setCoord(ic, persObj->m_coord[ic]); - - transObj->setHFRejected (persObj->m_HF_rejected); - transObj->setHWRejected (persObj->m_HW_rejected); - transObj->setHWTrackID (persObj->m_HW_track); - transObj->setEventIndex (persObj->m_eventindex); - transObj->setBarcode (persObj->m_barcode); - transObj->setBarcodeFrac (persObj->m_barcode_frac); -} - - -void FTKAthTrackCnv_p1::transToPers(const FTKAthTrack *transObj, - FTKAthTrack_p1 *persObj, MsgStream&) const -{ - persObj->m_bankID = transObj->getBankID(); - persObj->m_roadID = transObj->getRoadID(); - persObj->m_patternID = transObj->getPatternID(); - persObj->m_sectorID = transObj->getSectorID(); - persObj->m_trackID = transObj->getTrackID(); - persObj->m_invpt = transObj->getHalfInvPt(); - persObj->m_d0 = transObj->getIP(); - persObj->m_phi = transObj->getPhi(); - persObj->m_z0 = transObj->getZ0(); - persObj->m_ctheta = transObj->getCotTheta(); - persObj->m_chi2 = transObj->getChi2(); - persObj->m_origchi2 = transObj->getOrigChi2(); - persObj->m_nmissing = transObj->getNMissing(); - persObj->m_typemask = transObj->getTypeMask(); - persObj->m_bitmask = transObj->getBitmask(); - - persObj->m_coord.resize(transObj->getNCoords()); - for (int ic=0;ic!=transObj->getNCoords();++ic) - persObj->m_coord[ic] = transObj->getCoord(ic); - - persObj->m_HF_rejected = transObj->getHFRejected(); - persObj->m_HW_rejected = transObj->getHWRejected(); - persObj->m_HW_track = transObj->getHWTrackID(); - persObj->m_eventindex = transObj->getEventIndex(); - persObj->m_barcode = transObj->getBarcode(); - persObj->m_barcode_frac = transObj->getBarcodeFrac(); -} diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackCnv_p1.h b/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackCnv_p1.h deleted file mode 100644 index 88809016487ca22706ae2fee682b66186c7a3cf1..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackCnv_p1.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKAthTrackCnv_p1_h -#define FTKAthTrackCnv_p1_h - -#include "TrigFTKPool/FTKAthTrack_p1.h" -#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" - -class MsgStream; -class FTKAthTrack; - -class FTKAthTrackCnv_p1 : public T_AthenaPoolTPCnvConstBase<FTKAthTrack, FTKAthTrack_p1> { -public: - using base_class::transToPers; - using base_class::persToTrans; - - FTKAthTrackCnv_p1() {;} - - virtual void persToTrans(const FTKAthTrack_p1 *persObj, FTKAthTrack *transObj, MsgStream&) const override; - virtual void transToPers(const FTKAthTrack *transObj, FTKAthTrack_p1 *persObj, MsgStream&) const override; -}; -#endif // FTKAthTrackCnv_p1_h diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackContainerCnv.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackContainerCnv.cxx deleted file mode 100644 index 3cc638e6497db60781dfbd49ca0550fe8ef9cf9a..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackContainerCnv.cxx +++ /dev/null @@ -1,6 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// Trigger/TrigFTK/TrigFTKPool/serc/FTKAthTrackContainerCnv.cxx -// Dummy source so that the build system knows that this is a custom converter. diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackContainerCnv.h b/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackContainerCnv.h deleted file mode 100644 index 34ca451df2403d52b423edaff2b7a106ea9d4835..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackContainerCnv.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKATHTRACKCONTAINERCNV_H -#define FTKATHTRACKCONTAINERCNV_H - -#include "AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.h" -#include "FTKAthTrackContainerCnv_p1.h" // last persistency version - -#include "TrigFTKPool/FTKAthTrackContainer_p1.h" -#include "TrigFTKPool/FTKAthTrackContainer.h" - -#include <memory> - -typedef T_AthenaPoolTPCnvCnv< FTKAthTrackContainer, - FTKAthTrackContainerCnv_p1 > - FTKAthTrackContainerCnv; - - -#endif // FTKATHTRACKCONTAINERCNV_H - diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackContainerCnv_p1.h b/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackContainerCnv_p1.h deleted file mode 100644 index 67642037ec8ce5c511d33986ed7342743a1555ad..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrackContainerCnv_p1.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKATHTRACKCONTAINERCNV_P1_H -#define FTKATHTRACKCONTAINERCNV_P1_H - -#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" -#include "TrigFTKPool/FTKAthTrackContainer.h" -#include "TrigFTKPool/FTKAthTrackContainer_p1.h" -#include "FTKAthTrackCnv_p1.h" - -typedef T_AthenaPoolTPCnvVectorConst<FTKAthTrackContainer, FTKAthTrackContainer_p1, FTKAthTrackCnv_p1> FTKAthTrackContainerCnv_p1; - -template<> -class T_TPCnv<FTKAthTrackContainer, FTKAthTrackContainer_p1> : public FTKAthTrackContainerCnv_p1 { -public: -}; - -#endif // FTKATHTRACKCONTAINERCNV_P1_H diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrack_p1.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrack_p1.cxx deleted file mode 100644 index 73d67fc3ae9d098fd11f3da19bd8854fd6a22667..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKAthTrack_p1.cxx +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "TrigFTKPool/FTKAthTrack_p1.h" - - -FTKAthTrack_p1::FTKAthTrack_p1() : - m_bankID(-1), m_roadID(-1), - m_patternID(0), - m_sectorID(-1), m_trackID(-1), - m_invpt(0), m_d0(0), m_phi(0), m_z0(0), - m_ctheta(0), m_chi2(0), m_origchi2(0), m_nmissing(0), - m_typemask(0), m_bitmask(0), - m_HF_rejected(0),m_HW_rejected(0),m_HW_track(-1), - m_eventindex(-1), m_barcode(-1), m_barcode_frac(0.) -{ -} diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTestData.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKTestData.cxx deleted file mode 100644 index cad877c37442ac4e2adc23718e834fed3edb836b..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTestData.cxx +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTKPool/FTKTestData.h" - -void FTKTestData::setValue(int ival) -{ - m_ival = ival; -} - - -int FTKTestData::getValue() const -{ - return m_ival; -} diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTestDataCnv_p0.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKTestDataCnv_p0.cxx deleted file mode 100644 index 660066e5aae80ea188bbc6fcc32ea4ee8b8c019f..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTestDataCnv_p0.cxx +++ /dev/null @@ -1,19 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTKPool/FTKTestData.h" -#include "FTKTestDataCnv_p0.h" - -void FTKTestDataCnv_p0::persToTrans(const FTKTestData_p0 *persObj, - FTKTestData *transObj, MsgStream&) const -{ - transObj->setValue (persObj->m_ival); -} - - -void FTKTestDataCnv_p0::transToPers(const FTKTestData *transObj, - FTKTestData_p0 *persObj, MsgStream&) const -{ - persObj->m_ival = transObj->getValue(); -} diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTestDataCnv_p0.h b/Trigger/TrigFTK/TrigFTKPool/src/FTKTestDataCnv_p0.h deleted file mode 100644 index 04249dcf7df04842c98343cd73a488592f31e92c..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTestDataCnv_p0.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKTestDataCnv_p0_h -#define FTKTestDataCnv_p0_h - -#include "TrigFTKPool/FTKTestData_p0.h" -#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" - -class MsgStream; -class FTKTestData; - -class FTKTestDataCnv_p0 : public T_AthenaPoolTPCnvConstBase<FTKTestData, FTKTestData_p0> { -public: - using base_class::transToPers; - using base_class::persToTrans; - - FTKTestDataCnv_p0() {;} - - virtual void persToTrans(const FTKTestData_p0 *persObj, FTKTestData *transObj, MsgStream&) const override; - virtual void transToPers(const FTKTestData *transObj, FTKTestData_p0 *persObj, MsgStream&) const override; -}; -#endif // FTKTestDataCnv_p0_h diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTestData_p0.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKTestData_p0.cxx deleted file mode 100644 index 58cf6573ee425a4695649ed759de2293df4f06d5..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTestData_p0.cxx +++ /dev/null @@ -1,6 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTKPool/FTKTestData_p0.h" - diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStats.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStats.cxx deleted file mode 100644 index a3a31565212ca8acbf4e6e57684c43512530a222..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStats.cxx +++ /dev/null @@ -1,10 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTKPool/FTKTrackFitterStats.h" - -FTKTrackFitterStats::FTKTrackFitterStats() : - m_ncombs(0), m_nfits(0), m_nfits_maj(0), m_nfits_maj_pix(0), m_nfits_maj_SCT(0), m_nfits_rec(0), m_nfits_addrec(0), - m_nfits_bad(0), m_nfits_rej(0), m_nfits_badmaj(0), m_nfits_rejmaj(0) -{} diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv.cxx deleted file mode 100644 index c16797eb3bb93123c56e74896326ee5621ead2f8..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv.cxx +++ /dev/null @@ -1,6 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// Trigger/TrigFTK/TrigFTKPool/serc/FTKTrackFitterStatsCnv.cxx -// Dummy source so that the build system knows that this is a custom converter. diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv.h b/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv.h deleted file mode 100644 index 53a2b24e77c6047c88300c7c13ee7c6d976be593..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKTRACKFITTERSTATSCNV_H -#define FTKTRACKFITTERSTATSCNV_H - -#include "AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.h" -#include "FTKTrackFitterStatsCnv_p1.h" // last persistency version -#include "TrigFTKPool/FTKTrackFitterStats_p1.h" -#include "TrigFTKPool/FTKTrackFitterStats.h" - -#include <memory> - -typedef T_AthenaPoolTPCnvCnv< FTKTrackFitterStats, - FTKTrackFitterStatsCnv_p1 > - FTKTrackFitterStatsCnv; - - -#endif // FTKTRACKFITTERSTATSCNV_H diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv_p1.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv_p1.cxx deleted file mode 100644 index cfb4262573813309e30687f53ce0fe26335ff1e5..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv_p1.cxx +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTKPool/FTKTrackFitterStats.h" - -#include "FTKTrackFitterStatsCnv_p1.h" - -void FTKTrackFitterStatsCnv_p1::persToTrans(const FTKTrackFitterStats_p1 *persObj, - FTKTrackFitterStats *transObj, MsgStream&) const -{ - transObj->setNCombs (persObj->m_ncombs); - transObj->setNFits (persObj->m_nfits); - transObj->setNFitsMajority (persObj->m_nfits_maj); - transObj->setNFitsMajority_pix (persObj->m_nfits_maj_pix); - transObj->setNFitsMajority_SCT (persObj->m_nfits_maj_SCT); - transObj->setNFitsRecovery (persObj->m_nfits_rec); - transObj->setNAddFitsRecovery (persObj->m_nfits_addrec); - transObj->setNFitsBad (persObj->m_nfits_bad); - transObj->setNFitsHWRejected (persObj->m_nfits_rej); - transObj->setNFitsBadMajority (persObj->m_nfits_badmaj); - transObj->setNFitsHWRejectedMajority (persObj->m_nfits_rejmaj); -} - - -void FTKTrackFitterStatsCnv_p1::transToPers(const FTKTrackFitterStats *transObj, - FTKTrackFitterStats_p1 *persObj, MsgStream&) const -{ - persObj->m_ncombs = transObj->getNCombs(); - persObj->m_nfits = transObj->getNFits(); - persObj->m_nfits_maj = transObj->getNFitsMajority(); - persObj->m_nfits_maj_pix = transObj->getNFitsMajority_pix(); - persObj->m_nfits_maj_SCT = transObj->getNFitsMajority_SCT(); - persObj->m_nfits_rec = transObj->getNFitsRecovery(); - persObj->m_nfits_addrec = transObj->getNAddFitsRecovery(); - persObj->m_nfits_bad = transObj->getNFitsBad(); - persObj->m_nfits_rej = transObj->getNFitsHWRejected(); - persObj->m_nfits_badmaj = transObj->getNFitsBadMajority(); - persObj->m_nfits_rejmaj = transObj->getNFitsHWRejectedMajority(); -} diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv_p1.h b/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv_p1.h deleted file mode 100644 index a8cbcfbe35e7eacdb62e7a7f10dda7b73af830a3..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStatsCnv_p1.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTKTrackFitterStatsCnv_p1_h -#define FTKTrackFitterStatsCnv_p1_h - -#include "TrigFTKPool/FTKTrackFitterStats_p1.h" -#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" - -class MsgStream; -class FTKTrackFitterStats; - -class FTKTrackFitterStatsCnv_p1 : public T_AthenaPoolTPCnvConstBase<FTKTrackFitterStats, FTKTrackFitterStats_p1> { -public: - using base_class::transToPers; - using base_class::persToTrans; - - - FTKTrackFitterStatsCnv_p1() {;} - - virtual void persToTrans(const FTKTrackFitterStats_p1 *persObj, FTKTrackFitterStats *transObj, MsgStream&) const override; - virtual void transToPers(const FTKTrackFitterStats *transObj, FTKTrackFitterStats_p1 *persObj, MsgStream&) const override; -}; -#endif // FTKTrackFitterStatsCnv_p1_h diff --git a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStats_p1.cxx b/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStats_p1.cxx deleted file mode 100644 index 8de00f57c0b899c08a6887d10d0b6330e05cd061..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/src/FTKTrackFitterStats_p1.cxx +++ /dev/null @@ -1,10 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTKPool/FTKTrackFitterStats_p1.h" - -FTKTrackFitterStats_p1::FTKTrackFitterStats_p1() : - m_ncombs(0), m_nfits(0), m_nfits_maj(0), m_nfits_maj_pix(0), m_nfits_maj_SCT(0), m_nfits_rec(0), m_nfits_addrec(0), - m_nfits_bad(0), m_nfits_rej(0), m_nfits_badmaj(0), m_nfits_rejmaj(0) -{} diff --git a/Trigger/TrigFTK/TrigFTKPool/test/FTKAthTrackCnv_p1_test.cxx b/Trigger/TrigFTK/TrigFTKPool/test/FTKAthTrackCnv_p1_test.cxx deleted file mode 100644 index 968b8ac9c7a1618028c77e1e04b36e223112ed61..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/test/FTKAthTrackCnv_p1_test.cxx +++ /dev/null @@ -1,107 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ -/** - * @file TrigFTKPool/test/FTKAthTrackCnv_p1_test.cxx - * @author scott snyder <snyder@bnl.gov> - * @date Jan, 2020 - * @brief Tests for FTKAthTrackCnv_p1. - */ - - -#undef NDEBUG -#include "../src/FTKAthTrackCnv_p1.h" -#include "TrigFTKPool/FTKAthTrack.h" -#include "TestTools/leakcheck.h" -#include "GaudiKernel/MsgStream.h" -#include <cassert> -#include <iostream> - - -void compare (const FTKAthTrack& p1, - const FTKAthTrack& p2) -{ - assert (p1.getBankID() == p2.getBankID()); - assert (p1.getRoadID() == p2.getRoadID()); - assert (p1.getPatternID() == p2.getPatternID()); - assert (p1.getSectorID() == p2.getSectorID()); - assert (p1.getTrackID() == p2.getTrackID()); - assert (p1.getHalfInvPt() == p2.getHalfInvPt()); - assert (p1.getIP() == p2.getIP()); - assert (p1.getPhi() == p2.getPhi()); - assert (p1.getZ0() == p2.getZ0()); - assert (p1.getCotTheta() == p2.getCotTheta()); - assert (p1.getChi2() == p2.getChi2()); - assert (p1.getOrigChi2() == p2.getOrigChi2()); - assert (p1.getNMissing() == p2.getNMissing()); - assert (p1.getTypeMask() == p2.getTypeMask()); - assert (p1.getBitmask() == p2.getBitmask()); - assert (p1.getHFRejected() == p2.getHFRejected()); - assert (p1.getHWRejected() == p2.getHWRejected()); - assert (p1.getHWTrackID() == p2.getHWTrackID()); - assert (p1.getEventIndex() == p2.getEventIndex()); - assert (p1.getBarcode() == p2.getBarcode()); - assert (p1.getBarcodeFrac() == p2.getBarcodeFrac()); - - assert (p1.getNCoords() == p2.getNCoords()); - for (int i = 0; i < p1.getNCoords(); i++) { - assert (p1.getCoord(i) == p2.getCoord(i)); - } -} - - -void testit (const FTKAthTrack& trans1) -{ - MsgStream log (0, "test"); - FTKAthTrackCnv_p1 cnv; - FTKAthTrack_p1 pers; - cnv.transToPers (&trans1, &pers, log); - FTKAthTrack trans2; - cnv.persToTrans (&pers, &trans2, log); - - compare (trans1, trans2); -} - - -void test1() -{ - std::cout << "test1\n"; - - FTKAthTrack trans1 (3); - trans1.setBankID (1); - trans1.setRoadID (2); - trans1.setPatternID (3); - trans1.setSectorID (4); - trans1.setTrackID (5); - trans1.setHalfInvPt (6.5); - trans1.setIP (7.5); - trans1.setPhi (8.5); - trans1.setZ0 (8.5); - trans1.setCotTheta (9.5); - trans1.setChi2 (10.5); - trans1.setOrigChi2 (11.5); - trans1.setNMissing (12); - trans1.setTypeMask (13); - trans1.setBitmask (14); - trans1.setHFRejected (15); - trans1.setHWRejected (16); - trans1.setHWTrackID (17); - trans1.setEventIndex (19); - trans1.setBarcode (20); - trans1.setBarcodeFrac (21.5); - - trans1.setCoord (0, 22.5); - trans1.setCoord (1, 23.5); - trans1.setCoord (2, 24.5); - - Athena_test::Leakcheck check; - testit (trans1); -} - - -int main() -{ - std::cout << "TrigFTKPool/FTKAthTrackCnv_p1_test\n"; - test1(); - return 0; -} diff --git a/Trigger/TrigFTK/TrigFTKPool/test/FTKTestDataCnv_p0_test.cxx b/Trigger/TrigFTK/TrigFTKPool/test/FTKTestDataCnv_p0_test.cxx deleted file mode 100644 index ad6aa0c55d2198eb877b7759bf8e3d627e2f2cc6..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/test/FTKTestDataCnv_p0_test.cxx +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ -/** - * @file TrigFTKPool/test/FTKTestDataCnv_p0_test.cxx - * @author scott snyder <snyder@bnl.gov> - * @date Jan, 2020 - * @brief Tests for FTKTestDataCnv_p0. - */ - - -#undef NDEBUG -#include "../src/FTKTestDataCnv_p0.h" -#include "TrigFTKPool/FTKTestData.h" -#include "TestTools/leakcheck.h" -#include "GaudiKernel/MsgStream.h" -#include <cassert> -#include <iostream> - - -void compare (const FTKTestData& p1, - const FTKTestData& p2) -{ - assert (p1.getValue() == p2.getValue()); -} - - -void testit (const FTKTestData& trans1) -{ - MsgStream log (0, "test"); - FTKTestDataCnv_p0 cnv; - FTKTestData_p0 pers; - cnv.transToPers (&trans1, &pers, log); - FTKTestData trans2; - cnv.persToTrans (&pers, &trans2, log); - - compare (trans1, trans2); -} - - -void test1() -{ - std::cout << "test1\n"; - - FTKTestData trans1; - trans1.setValue (1); - - Athena_test::Leakcheck check; - testit (trans1); -} - - -int main() -{ - std::cout << "TrigFTKPool/FTKTestDataCnv_p0_test\n"; - test1(); - return 0; -} diff --git a/Trigger/TrigFTK/TrigFTKPool/test/FTKTrackFitterStatsCnv_p1_test.cxx b/Trigger/TrigFTK/TrigFTKPool/test/FTKTrackFitterStatsCnv_p1_test.cxx deleted file mode 100644 index 74f3f0eaff866faf41ee32cddc8c09b7779ea7c6..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTKPool/test/FTKTrackFitterStatsCnv_p1_test.cxx +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ -/** - * @file TrigFTKPool/test/FTKTrackFitterStatsCnv_p1_test.cxx - * @author scott snyder <snyder@bnl.gov> - * @date Jan, 2020 - * @brief Tests for FTKTrackFitterStatsCnv_p1. - */ - - -#undef NDEBUG -#include "../src/FTKTrackFitterStatsCnv_p1.h" -#include "TrigFTKPool/FTKTrackFitterStats.h" -#include "TestTools/leakcheck.h" -#include "GaudiKernel/MsgStream.h" -#include <cassert> -#include <iostream> - - -void compare (const FTKTrackFitterStats& p1, - const FTKTrackFitterStats& p2) -{ - assert (p1.getNCombs() == p2.getNCombs()); - assert (p1.getNFits() == p2.getNFits()); - assert (p1.getNFitsMajority() == p2.getNFitsMajority()); - assert (p1.getNFitsMajority_pix() == p2.getNFitsMajority_pix()); - assert (p1.getNFitsMajority_SCT() == p2.getNFitsMajority_SCT()); - assert (p1.getNFitsRecovery() == p2.getNFitsRecovery()); - assert (p1.getNAddFitsRecovery() == p2.getNAddFitsRecovery()); - assert (p1.getNFitsBad() == p2.getNFitsBad()); - assert (p1.getNFitsHWRejected() == p2.getNFitsHWRejected()); - assert (p1.getNFitsBadMajority() == p2.getNFitsBadMajority()); - assert (p1.getNFitsHWRejectedMajority() == p2.getNFitsHWRejectedMajority()); - //assert (p1.getNConn() == p2.getNConn()); // not saved - //assert (p1.getNExtrapolatedTracks() == p2.getNExtrapolatedTracks()); // not saved -} - - -void testit (const FTKTrackFitterStats& trans1) -{ - MsgStream log (0, "test"); - FTKTrackFitterStatsCnv_p1 cnv; - FTKTrackFitterStats_p1 pers; - cnv.transToPers (&trans1, &pers, log); - FTKTrackFitterStats trans2; - cnv.persToTrans (&pers, &trans2, log); - - compare (trans1, trans2); -} - - -void test1() -{ - std::cout << "test1\n"; - - FTKTrackFitterStats trans1; - trans1.setNCombs (1); - trans1.setNFits (2); - trans1.setNFitsMajority (3); - trans1.setNFitsMajority_pix (4); - trans1.setNFitsMajority_SCT (5); - trans1.setNFitsRecovery (6); - trans1.setNAddFitsRecovery (6); - trans1.setNFitsBad (7); - trans1.setNFitsHWRejected (8); - trans1.setNFitsBadMajority (9); - trans1.setNFitsHWRejectedMajority (9); - trans1.setNConn (10); - trans1.setNExtrapolatedTracks (11); - - Athena_test::Leakcheck check; - testit (trans1); -} - - -int main() -{ - std::cout << "TrigFTKPool/FTKTrackFitterStatsCnv_p1_test\n"; - test1(); - return 0; -} diff --git a/Trigger/TrigFTK/TrigFTK_RawData/CMakeLists.txt b/Trigger/TrigFTK/TrigFTK_RawData/CMakeLists.txt deleted file mode 100644 index 63739afe3469ac5f9c709f4fe5e68a4e9bd71f3d..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -################################################################################ -# Package: TrigFTK_RawData -################################################################################ - -# Declare the package name: -atlas_subdir( TrigFTK_RawData ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - Control/AthContainers ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) -find_package(Eigen) - -# Component(s) in the package: -atlas_add_library( TrigFTK_RawData - src/*.cxx - PUBLIC_HEADERS TrigFTK_RawData - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthContainers AthenaKernel - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ) - -atlas_add_dictionary( TrigFTK_RawDataDict - TrigFTK_RawData/TrigFTK_RawDataDict.h - TrigFTK_RawData/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthContainers AthenaKernel TrigFTK_RawData - DATA_LINKS FTK_RawTrack FTK_RawPixelCluster FTK_RawSCT_Cluster - ELEMENT_LINKS FTK_RawTrackContainer ) - diff --git a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawPixelCluster.h b/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawPixelCluster.h deleted file mode 100644 index 1dee5d7d4b8fbccc7538f2aa98b8bd0256c9f98b..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawPixelCluster.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTK_RAWDATA_FTK_RAWPIXELCLUSTER_H -#define TRIGFTK_RAWDATA_FTK_RAWPIXELCLUSTER_H - -#include <stdint.h> -#include "AthenaKernel/CLASS_DEF.h" - -class FTK_RawPixelCluster { -private: - - uint32_t m_word_a; - uint32_t m_word_b; - long int m_barcode; - -public: - - FTK_RawPixelCluster(); - FTK_RawPixelCluster( uint32_t, uint32_t); - FTK_RawPixelCluster( uint32_t, uint32_t, long int); - virtual ~FTK_RawPixelCluster(); - - void setWordA(uint32_t word_a){ m_word_a = word_a;} - void setWordB(uint32_t word_b){ m_word_b = word_b;} - void setColWidth(unsigned int col_width); - void setRowWidth(unsigned int row_width); - void setColCoord(float col_coord); - void setRowCoord(float row_coord); - void setBarcode(signed long barcode){ m_barcode = barcode;} - void setModuleID(unsigned int module_id); - - uint32_t getWordA() const { return m_word_a;} - uint32_t getWordB() const { return m_word_b;} - unsigned int getColWidth() const; - unsigned int getRowWidth() const; - float getColCoord() const; - float getRowCoord() const; - long int getBarcode() const {return m_barcode;} - unsigned int getModuleID() const; -}; - -CLASS_DEF( FTK_RawPixelCluster , 121694371 , 1 ) - -#endif // TRIGFTK_RAWDATA_FTK_RAWPIXELCLUSTER_H diff --git a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawSCT_Cluster.h b/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawSCT_Cluster.h deleted file mode 100644 index 7bcdaea2de6dde642d472344c138c99c052c8e25..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawSCT_Cluster.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTK_RAWDATA_FTK_RAWSCT_CLUSTER_H -#define TRIGFTK_RAWDATA_FTK_RAWSCT_CLUSTER_H - -#include <stdint.h> -#include "AthenaKernel/CLASS_DEF.h" - -class FTK_RawSCT_Cluster { -private: - uint32_t m_word; - long int m_barcode; - -public: - - FTK_RawSCT_Cluster(); - FTK_RawSCT_Cluster(uint32_t); - FTK_RawSCT_Cluster(uint32_t, signed long); - virtual ~FTK_RawSCT_Cluster(); - - void setBarcode(signed long barcode){ m_barcode = barcode;} - void setWord(uint32_t word); - void setHitCoord(float hit_coord); - void setHitWidth(unsigned int hit_width); - void setModuleID(unsigned int module_id); - - uint32_t getWord() const { return m_word;} - long int getBarcode() const { return m_barcode;} - float getHitCoord() const; - unsigned int getHitWidth() const; - unsigned int getModuleID() const; -}; - - -CLASS_DEF( FTK_RawSCT_Cluster , 178057777 , 1 ) - -#endif // TRIGFTK_RAWDATA_FTK_RAWSCT_CLUSTER_H - diff --git a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawTrack.h b/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawTrack.h deleted file mode 100644 index a151f87cfa5566e595889c3ef93ad94e57f76c5c..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawTrack.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTK_RAWDATA_FTK_RAWTRACK_H -#define TRIGFTK_RAWDATA_FTK_RAWTRACK_H - -/************************************************************** - -NAME: FTK_RawTrack.h -PACKAGE: atlasoff/Trigger/TrigFTK/TrigFTK_RawData - -AUTHORS: James Howarth -CREATED: February 2014 - -PURPOSE: A base class for RAW FTK tracks. - Based on proposed format by Jinlong Zhang. -**************************************************************/ - -#include <stdint.h> -#include "AthenaKernel/CLASS_DEF.h" -#include "TrigFTK_RawData/FTK_RawSCT_Cluster.h" -#include "TrigFTK_RawData/FTK_RawPixelCluster.h" - -//#define NPIXLAYERS 4 -//#define NSCTLAYERS 8 //0,2,4,6 = Axial, 1,3,5,7 = Stero - -#define FTK_RAWTRACK_VERSION 0x2 - -class FTK_RawTrack { - - public: - FTK_RawTrack(); - FTK_RawTrack(const FTK_RawTrack&); - FTK_RawTrack(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t); - FTK_RawTrack(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, const std::vector<FTK_RawPixelCluster>&, const std::vector<FTK_RawSCT_Cluster>&); - ~FTK_RawTrack(); - - unsigned int getSectorID() const; - unsigned int getLayerMap() const; - unsigned int getTower() const; - bool isMissingLayer(unsigned int ilayer) const; - bool isMissingPixelLayer(unsigned int ilayer) const; - bool isMissingSCTLayer(unsigned int ilayer) const; - - float getD0() const; - float getZ0() const; - float getPhi() const; - double getCotTh() const; - double getInvPt() const; - double getChi2() const; - // double getQuality() const; - - uint32_t getRoadID() const {return m_word_th3 & 0xffffff; } - uint32_t getTH1() const {return m_word_th1; } - uint32_t getTH2() const {return m_word_th2; } - uint32_t getTH3() const {return m_word_th3; } - uint32_t getTH4() const {return m_word_th4; } - uint32_t getTH5() const {return m_word_th5; } - uint32_t getTH6() const {return m_word_th6; } - uint32_t getPixelWordA( int ) const; - uint32_t getPixelWordB( int ) const; - uint32_t getPixelBarcode( int ) const; - uint32_t getSCTWord( int ) const; - uint32_t getSCTBarcode( int ) const; - bool getIsAuxFormat() const; - - signed long getBarcode() const {return m_barcode; } - FTK_RawPixelCluster& getPixelCluster( int ); - FTK_RawSCT_Cluster& getSCTCluster( int ); - - const FTK_RawPixelCluster& getPixelCluster( int ) const; - const FTK_RawSCT_Cluster& getSCTCluster( int ) const; - - std::vector<FTK_RawPixelCluster>& getPixelClusters() { return m_pix_clusters;} - std::vector<FTK_RawSCT_Cluster>& getSCTClusters() { return m_sct_clusters;} - - const std::vector<FTK_RawPixelCluster>& getPixelClusters() const { return m_pix_clusters;} - const std::vector<FTK_RawSCT_Cluster>& getSCTClusters() const { return m_sct_clusters;} - - void setRoadID(unsigned int v); - void setTH1(uint32_t v) { m_word_th1 = v; } - void setTH2(uint32_t v) { m_word_th2 = v; } - void setTH3(uint32_t v) { m_word_th3 = v; } - void setTH4(uint32_t v) { m_word_th4 = v; } - void setTH5(uint32_t v) { m_word_th5 = v; } - void setTH6(uint32_t v) { m_word_th6 = v; } - void setSectorID(unsigned int); - void setLayerMap(unsigned int); - void setTower(unsigned int); - void setD0(float); - void setZ0(float); - void setPhi(float); - void setCotTh(float); - void setInvPt(float); - void setChi2(float); - void setIsAuxFormat(bool); - - // void setQuality(float); - void setPixelCluster(unsigned int layer, const FTK_RawPixelCluster& ); - void setSCTCluster( unsigned int layer, const FTK_RawSCT_Cluster& ); - void setPixelClusters( std::vector<FTK_RawPixelCluster>& ); - void setSCTClusters( std::vector<FTK_RawSCT_Cluster>& ); - void setBarcode(signed long barcode) { m_barcode = barcode; } - - private: - - inline unsigned int trackVersion() const - { - return (m_word_th3>>24); - } - - - uint32_t m_word_th1; - uint32_t m_word_th2; - uint32_t m_word_th3; - uint32_t m_word_th4; - uint32_t m_word_th5; - uint32_t m_word_th6; - std::vector<FTK_RawPixelCluster> m_pix_clusters; - std::vector<FTK_RawSCT_Cluster> m_sct_clusters; - signed long m_barcode; - - static const int s_npixlayers = 4; - static const int s_nsctlayers = 8; - static const int s_nlayers=12; - static const int s_sixteen_bit_offset = 32767; // 2**15 -1 - static const int s_sixteen_bit_max = 65535; // 2**16 -1 - static const float s_d0_multiplier; - static const float s_z0_multiplier; - static const float s_phi_multiplier; - static const float s_curv_multiplier; - static const float s_cot_multiplier; - static const float s_chi2_multiplier; - // static const float s_quality_multiplier; - static const float s_invpt_multiplier; - -}; - -CLASS_DEF( FTK_RawTrack , 239377431 , 2 ) - -#endif // TRIGFTK_RAWDATA_FTK_RAWTRACK_H diff --git a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawTrackContainer.h b/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawTrackContainer.h deleted file mode 100644 index 2c3d9c988d9676b315c8d12703b0aa433cde7efe..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/FTK_RawTrackContainer.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FTK_RAWTRACKCONTAINER_H -#define FTK_RAWTRACKCONTAINER_H - -/************************************************************** - -NAME: FTK_RawTrackContainer.h -PACKAGE: atlasoff/Trigger/TrigFTK/TrigFTKRaw - -AUTHORS: James Howarth -CREATED: February 2014 - -PURPOSE: A container for a collection of FTK_RawTrack objects. - Based on code from Trigger/TrigEvent/TrigMuonEFContainer.h -**************************************************************/ - - -#include "AthContainers/DataVector.h" -#include "AthenaKernel/BaseInfo.h" - -#include "TrigFTK_RawData/FTK_RawTrack.h" // Change this once added to svn - -typedef DataVector<FTK_RawTrack> FTK_RawTrackContainer; -CLASS_DEF( FTK_RawTrackContainer , 1294480537 , 1 ) - -//SG_BASE(FTK_RawTrackContainer, DataVector<FTK_RawTrack>); - -#endif // FTK_RAWTRACKCONTAINER diff --git a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/TrigFTK_RawDataDict.h b/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/TrigFTK_RawDataDict.h deleted file mode 100644 index 6fdf6387a81c9b437d22e7486acdd7afce83d2bb..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/TrigFTK_RawDataDict.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TrigFTK_RawDataDict_h -#define TrigFTK_RawDataDict_h 1 - -#include "TrigFTK_RawData/FTK_RawTrack.h" -#include "TrigFTK_RawData/FTK_RawPixelCluster.h" -#include "TrigFTK_RawData/FTK_RawSCT_Cluster.h" -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" - -#endif //> not TrigFTKEventPoolDict_h diff --git a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/selection.xml b/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/selection.xml deleted file mode 100644 index 9cf81acb7985922e77257899d487fff587575cfd..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/TrigFTK_RawData/selection.xml +++ /dev/null @@ -1,6 +0,0 @@ -<lcgdict> -<class name="FTK_RawTrack" id="60581BB5-6510-4837-8572-6316F7676C5F"/> -<class name="FTK_RawPixelCluster" id="5B916D3D-6371-4649-8B97-29C5F1BC572F"/> -<class name="FTK_RawSCT_Cluster" id="90C9ED08-3B76-4AFB-A1E6-E69DD06FB1AA"/> -<class name="FTK_RawTrackContainer" id="193F7fA2-E650-4E0B-9F67-4311D2E72346"/> -</lcgdict> diff --git a/Trigger/TrigFTK/TrigFTK_RawData/src/EigenHalf.h b/Trigger/TrigFTK/TrigFTK_RawData/src/EigenHalf.h deleted file mode 100644 index 65d20b741f8385b113123a2f2a9c1cc5a12b83b0..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/src/EigenHalf.h +++ /dev/null @@ -1,673 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -// -// The original license follows: -// -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted. -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Standard 16-bit float type, mostly useful for GPUs. Defines a new -// type Eigen::half (inheriting from CUDA's __half struct) with -// operator overloads such that it behaves basically as an arithmetic -// type. It will be quite slow on CPUs (so it is recommended to stay -// in fp32 for CPUs, except for simple parameter conversions, I/O -// to disk and the likes), but fast on GPUs. - - -#ifndef EIGEN_HALF_CUDA_H -#define EIGEN_HALF_CUDA_H - -#if __cplusplus > 199711L -#define EIGEN_EXPLICIT_CAST(tgt_type) explicit operator tgt_type() -#else -#define EIGEN_EXPLICIT_CAST(tgt_type) operator tgt_type() -#endif - - -namespace Eigen { - -struct half; - -namespace half_impl { - -#if !defined(EIGEN_HAS_CUDA_FP16) -// Make our own __half_raw definition that is similar to CUDA's. -struct __half_raw { - EIGEN_DEVICE_FUNC __half_raw() : x(0) {} - explicit EIGEN_DEVICE_FUNC __half_raw(unsigned short raw) : x(raw) {} - unsigned short x; -}; -#elif defined(EIGEN_CUDACC_VER) && EIGEN_CUDACC_VER < 90000 -// In CUDA < 9.0, __half is the equivalent of CUDA 9's __half_raw -typedef __half __half_raw; -#endif - -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw raw_uint16_to_half(unsigned short x); -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw float_to_half_rtne(float ff); -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC float half_to_float(__half_raw h); - -struct half_base : public __half_raw { - EIGEN_DEVICE_FUNC half_base() {} - EIGEN_DEVICE_FUNC half_base(const half_base& h) : __half_raw(h) {} - EIGEN_DEVICE_FUNC half_base(const __half_raw& h) : __half_raw(h) {} -#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDACC_VER) && EIGEN_CUDACC_VER >= 90000 - EIGEN_DEVICE_FUNC half_base(const __half& h) : __half_raw(*(__half_raw*)&h) {} -#endif -}; - -} // namespace half_impl - -// Class definition. -struct half : public half_impl::half_base { - #if !defined(EIGEN_HAS_CUDA_FP16) || (defined(EIGEN_CUDACC_VER) && EIGEN_CUDACC_VER < 90000) - typedef half_impl::__half_raw __half_raw; - #endif - - EIGEN_DEVICE_FUNC half() {} - - EIGEN_DEVICE_FUNC half(const __half_raw& h) : half_impl::half_base(h) {} - EIGEN_DEVICE_FUNC half(const half& h) : half_impl::half_base(h) {} -#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDACC_VER) && EIGEN_CUDACC_VER >= 90000 - EIGEN_DEVICE_FUNC half(const __half& h) : half_impl::half_base(h) {} -#endif - - explicit EIGEN_DEVICE_FUNC half(bool b) - : half_impl::half_base(half_impl::raw_uint16_to_half(b ? 0x3c00 : 0)) {} - template<class T> - explicit EIGEN_DEVICE_FUNC half(const T& val) - : half_impl::half_base(half_impl::float_to_half_rtne(static_cast<float>(val))) {} - explicit EIGEN_DEVICE_FUNC half(float f) - : half_impl::half_base(half_impl::float_to_half_rtne(f)) {} - - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(bool) const { - // +0.0 and -0.0 become false, everything else becomes true. - return (x & 0x7fff) != 0; - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(signed char) const { - return static_cast<signed char>(half_impl::half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned char) const { - return static_cast<unsigned char>(half_impl::half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(short) const { - return static_cast<short>(half_impl::half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned short) const { - return static_cast<unsigned short>(half_impl::half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(int) const { - return static_cast<int>(half_impl::half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned int) const { - return static_cast<unsigned int>(half_impl::half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(long) const { - return static_cast<long>(half_impl::half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned long) const { - return static_cast<unsigned long>(half_impl::half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(long long) const { - return static_cast<long long>(half_impl::half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned long long) const { - return static_cast<unsigned long long>(half_to_float(*this)); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(float) const { - return half_impl::half_to_float(*this); - } - EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(double) const { - return static_cast<double>(half_impl::half_to_float(*this)); - } - - EIGEN_DEVICE_FUNC half& operator=(const half& other) { - x = other.x; - return *this; - } -}; - -} // end namespace Eigen - -namespace std { -template<> -struct numeric_limits<Eigen::half> { - static const bool is_specialized = true; - static const bool is_signed = true; - static const bool is_integer = false; - static const bool is_exact = false; - static const bool has_infinity = true; - static const bool has_quiet_NaN = true; - static const bool has_signaling_NaN = true; - static const float_denorm_style has_denorm = denorm_present; - static const bool has_denorm_loss = false; - static const std::float_round_style round_style = std::round_to_nearest; - static const bool is_iec559 = false; - static const bool is_bounded = false; - static const bool is_modulo = false; - static const int digits = 11; - static const int digits10 = 3; // according to http://half.sourceforge.net/structstd_1_1numeric__limits_3_01half__float_1_1half_01_4.html - static const int max_digits10 = 5; // according to http://half.sourceforge.net/structstd_1_1numeric__limits_3_01half__float_1_1half_01_4.html - static const int radix = 2; - static const int min_exponent = -13; - static const int min_exponent10 = -4; - static const int max_exponent = 16; - static const int max_exponent10 = 4; - static const bool traps = true; - static const bool tinyness_before = false; - - static Eigen::half (min)() { return Eigen::half_impl::raw_uint16_to_half(0x400); } - static Eigen::half lowest() { return Eigen::half_impl::raw_uint16_to_half(0xfbff); } - static Eigen::half (max)() { return Eigen::half_impl::raw_uint16_to_half(0x7bff); } - static Eigen::half epsilon() { return Eigen::half_impl::raw_uint16_to_half(0x0800); } - static Eigen::half round_error() { return Eigen::half(0.5); } - static Eigen::half infinity() { return Eigen::half_impl::raw_uint16_to_half(0x7c00); } - static Eigen::half quiet_NaN() { return Eigen::half_impl::raw_uint16_to_half(0x7e00); } - static Eigen::half signaling_NaN() { return Eigen::half_impl::raw_uint16_to_half(0x7e00); } - static Eigen::half denorm_min() { return Eigen::half_impl::raw_uint16_to_half(0x1); } -}; - -// If std::numeric_limits<T> is specialized, should also specialize -// std::numeric_limits<const T>, std::numeric_limits<volatile T>, and -// std::numeric_limits<const volatile T> -// https://stackoverflow.com/a/16519653/ -template<> -struct numeric_limits<const Eigen::half> : numeric_limits<Eigen::half> {}; -template<> -struct numeric_limits<volatile Eigen::half> : numeric_limits<Eigen::half> {}; -template<> -struct numeric_limits<const volatile Eigen::half> : numeric_limits<Eigen::half> {}; -} // end namespace std - -namespace Eigen { - -namespace half_impl { - -#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530 - -// Intrinsics for native fp16 support. Note that on current hardware, -// these are no faster than fp32 arithmetic (you need to use the half2 -// versions to get the ALU speed increased), but you do save the -// conversion steps back and forth. - -EIGEN_STRONG_INLINE __device__ half operator + (const half& a, const half& b) { - return __hadd(a, b); -} -EIGEN_STRONG_INLINE __device__ half operator * (const half& a, const half& b) { - return __hmul(a, b); -} -EIGEN_STRONG_INLINE __device__ half operator - (const half& a, const half& b) { - return __hsub(a, b); -} -EIGEN_STRONG_INLINE __device__ half operator / (const half& a, const half& b) { - float num = __half2float(a); - float denom = __half2float(b); - return __float2half(num / denom); -} -EIGEN_STRONG_INLINE __device__ half operator - (const half& a) { - return __hneg(a); -} -EIGEN_STRONG_INLINE __device__ half& operator += (half& a, const half& b) { - a = a + b; - return a; -} -EIGEN_STRONG_INLINE __device__ half& operator *= (half& a, const half& b) { - a = a * b; - return a; -} -EIGEN_STRONG_INLINE __device__ half& operator -= (half& a, const half& b) { - a = a - b; - return a; -} -EIGEN_STRONG_INLINE __device__ half& operator /= (half& a, const half& b) { - a = a / b; - return a; -} -EIGEN_STRONG_INLINE __device__ bool operator == (const half& a, const half& b) { - return __heq(a, b); -} -EIGEN_STRONG_INLINE __device__ bool operator != (const half& a, const half& b) { - return __hne(a, b); -} -EIGEN_STRONG_INLINE __device__ bool operator < (const half& a, const half& b) { - return __hlt(a, b); -} -EIGEN_STRONG_INLINE __device__ bool operator <= (const half& a, const half& b) { - return __hle(a, b); -} -EIGEN_STRONG_INLINE __device__ bool operator > (const half& a, const half& b) { - return __hgt(a, b); -} -EIGEN_STRONG_INLINE __device__ bool operator >= (const half& a, const half& b) { - return __hge(a, b); -} - -#else // Emulate support for half floats - -// Definitions for CPUs and older CUDA, mostly working through conversion -// to/from fp32. - -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator + (const half& a, const half& b) { - return half(float(a) + float(b)); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator * (const half& a, const half& b) { - return half(float(a) * float(b)); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator - (const half& a, const half& b) { - return half(float(a) - float(b)); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator / (const half& a, const half& b) { - return half(float(a) / float(b)); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator - (const half& a) { - half result; - result.x = a.x ^ 0x8000; - return result; -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half& operator += (half& a, const half& b) { - a = half(float(a) + float(b)); - return a; -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half& operator *= (half& a, const half& b) { - a = half(float(a) * float(b)); - return a; -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half& operator -= (half& a, const half& b) { - a = half(float(a) - float(b)); - return a; -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half& operator /= (half& a, const half& b) { - a = half(float(a) / float(b)); - return a; -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator == (const half& a, const half& b) { - return float(a) == float(b); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator != (const half& a, const half& b) { - return float(a) != float(b); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator < (const half& a, const half& b) { - return float(a) < float(b); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator <= (const half& a, const half& b) { - return float(a) <= float(b); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator > (const half& a, const half& b) { - return float(a) > float(b); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator >= (const half& a, const half& b) { - return float(a) >= float(b); -} - -#endif // Emulate support for half floats - -// Division by an index. Do it in full float precision to avoid accuracy -// issues in converting the denominator to half. -//EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half operator / (const half& a, Index b) { -// return half(static_cast<float>(a) / static_cast<float>(b)); -//} - -// Conversion routines, including fallbacks for the host or older CUDA. -// Note that newer Intel CPUs (Haswell or newer) have vectorized versions of -// these in hardware. If we need more performance on older/other CPUs, they are -// also possible to vectorize directly. - -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw raw_uint16_to_half(unsigned short x) { - __half_raw h; - h.x = x; - return h; -} - -union FP32 { - unsigned int u; - float f; -}; - -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC __half_raw float_to_half_rtne(float ff) { -#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300 - __half tmp_ff = __float2half(ff); - return *(__half_raw*)&tmp_ff; - -#elif defined(EIGEN_HAS_FP16_C) - __half_raw h; - h.x = _cvtss_sh(ff, 0); - return h; - -#else - FP32 f; f.f = ff; - - const FP32 f32infty = { 255 << 23 }; - const FP32 f16max = { (127 + 16) << 23 }; - const FP32 denorm_magic = { ((127 - 15) + (23 - 10) + 1) << 23 }; - unsigned int sign_mask = 0x80000000u; - __half_raw o; - o.x = static_cast<unsigned short>(0x0u); - - unsigned int sign = f.u & sign_mask; - f.u ^= sign; - - // NOTE all the integer compares in this function can be safely - // compiled into signed compares since all operands are below - // 0x80000000. Important if you want fast straight SSE2 code - // (since there's no unsigned PCMPGTD). - - if (f.u >= f16max.u) { // result is Inf or NaN (all exponent bits set) - o.x = (f.u > f32infty.u) ? 0x7e00 : 0x7c00; // NaN->qNaN and Inf->Inf - } else { // (De)normalized number or zero - if (f.u < (113 << 23)) { // resulting FP16 is subnormal or zero - // use a magic value to align our 10 mantissa bits at the bottom of - // the float. as long as FP addition is round-to-nearest-even this - // just works. - f.f += denorm_magic.f; - - // and one integer subtract of the bias later, we have our final float! - o.x = static_cast<unsigned short>(f.u - denorm_magic.u); - } else { - unsigned int mant_odd = (f.u >> 13) & 1; // resulting mantissa is odd - - // update exponent, rounding bias part 1 - f.u += ((unsigned int)(15 - 127) << 23) + 0xfff; - // rounding bias part 2 - f.u += mant_odd; - // take the bits! - o.x = static_cast<unsigned short>(f.u >> 13); - } - } - - o.x |= static_cast<unsigned short>(sign >> 16); - return o; -#endif -} - -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC float half_to_float(__half_raw h) { -#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300 - return __half2float(h); - -#elif defined(EIGEN_HAS_FP16_C) - return _cvtsh_ss(h.x); - -#else - const FP32 magic = { 113 << 23 }; - const unsigned int shifted_exp = 0x7c00 << 13; // exponent mask after shift - FP32 o; - - o.u = (h.x & 0x7fff) << 13; // exponent/mantissa bits - unsigned int exp = shifted_exp & o.u; // just the exponent - o.u += (127 - 15) << 23; // exponent adjust - - // handle exponent special cases - if (exp == shifted_exp) { // Inf/NaN? - o.u += (128 - 16) << 23; // extra exp adjust - } else if (exp == 0) { // Zero/Denormal? - o.u += 1 << 23; // extra exp adjust - o.f -= magic.f; // renormalize - } - - o.u |= (h.x & 0x8000) << 16; // sign bit - return o.f; -#endif -} - -// --- standard functions --- - -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isinf)(const half& a) { - return (a.x & 0x7fff) == 0x7c00; -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isnan)(const half& a) { -#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530 - return __hisnan(a); -#else - return (a.x & 0x7fff) > 0x7c00; -#endif -} -//EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool (isfinite)(const half& a) { -// return !(isinf EIGEN_NOT_A_MACRO (a)) && !(isnan EIGEN_NOT_A_MACRO (a)); -//} - -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half abs(const half& a) { - half result; - result.x = a.x & 0x7FFF; - return result; -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half exp(const half& a) { -#if EIGEN_CUDACC_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 530 - return half(hexp(a)); -#else - return half(::expf(float(a))); -#endif -} -//EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half expm1(const half& a) { -// return half(numext::expm1(float(a))); -//} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half log(const half& a) { -#if defined(EIGEN_HAS_CUDA_FP16) && EIGEN_CUDACC_VER >= 80000 && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530 - return half(::hlog(a)); -#else - return half(::logf(float(a))); -#endif -} -//EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half log1p(const half& a) { -// return half(numext::log1p(float(a))); -//} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half log10(const half& a) { - return half(::log10f(float(a))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half sqrt(const half& a) { -#if EIGEN_CUDACC_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 530 - return half(hsqrt(a)); -#else - return half(::sqrtf(float(a))); -#endif -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half pow(const half& a, const half& b) { - return half(::powf(float(a), float(b))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half sin(const half& a) { - return half(::sinf(float(a))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half cos(const half& a) { - return half(::cosf(float(a))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half tan(const half& a) { - return half(::tanf(float(a))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half tanh(const half& a) { - return half(::tanhf(float(a))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half floor(const half& a) { -#if EIGEN_CUDACC_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 300 - return half(hfloor(a)); -#else - return half(::floorf(float(a))); -#endif -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half ceil(const half& a) { -#if EIGEN_CUDACC_VER >= 80000 && defined EIGEN_CUDA_ARCH && EIGEN_CUDA_ARCH >= 300 - return half(hceil(a)); -#else - return half(::ceilf(float(a))); -#endif -} - -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (min)(const half& a, const half& b) { -#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530 - return __hlt(b, a) ? b : a; -#else - const float f1 = static_cast<float>(a); - const float f2 = static_cast<float>(b); - return f2 < f1 ? b : a; -#endif -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half (max)(const half& a, const half& b) { -#if defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530 - return __hlt(a, b) ? b : a; -#else - const float f1 = static_cast<float>(a); - const float f2 = static_cast<float>(b); - return f1 < f2 ? b : a; -#endif -} - -EIGEN_ALWAYS_INLINE std::ostream& operator << (std::ostream& os, const half& v) { - os << static_cast<float>(v); - return os; -} - -} // end namespace half_impl - -// import Eigen::half_impl::half into Eigen namespace -// using half_impl::half; - -namespace internal { - -template<> -struct random_default_impl<half, false, false> -{ - static inline half run(const half& x, const half& y) - { - return x + (y-x) * half(float(std::rand()) / float(RAND_MAX)); - } - static inline half run() - { - return run(half(-1.f), half(1.f)); - } -}; - -template<> struct is_arithmetic<half> { enum { value = true }; }; - -} // end namespace internal - -template<> struct NumTraits<Eigen::half> - : GenericNumTraits<Eigen::half> -{ - enum { - IsSigned = true, - IsInteger = false, - IsComplex = false, - RequireInitialization = false - }; - - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half epsilon() { - return half_impl::raw_uint16_to_half(0x0800); - } - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half dummy_precision() { return Eigen::half(1e-2f); } - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half highest() { - return half_impl::raw_uint16_to_half(0x7bff); - } - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half lowest() { - return half_impl::raw_uint16_to_half(0xfbff); - } - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half infinity() { - return half_impl::raw_uint16_to_half(0x7c00); - } - EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Eigen::half quiet_NaN() { - return half_impl::raw_uint16_to_half(0x7c01); - } -}; - -} // end namespace Eigen - -// C-like standard mathematical functions and trancendentals. -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half fabsh(const Eigen::half& a) { - Eigen::half result; - result.x = a.x & 0x7FFF; - return result; -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half exph(const Eigen::half& a) { - return Eigen::half(::expf(float(a))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half logh(const Eigen::half& a) { -#if EIGEN_CUDACC_VER >= 80000 && defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 530 - return Eigen::half(::hlog(a)); -#else - return Eigen::half(::logf(float(a))); -#endif -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half sqrth(const Eigen::half& a) { - return Eigen::half(::sqrtf(float(a))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half powh(const Eigen::half& a, const Eigen::half& b) { - return Eigen::half(::powf(float(a), float(b))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half floorh(const Eigen::half& a) { - return Eigen::half(::floorf(float(a))); -} -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half ceilh(const Eigen::half& a) { - return Eigen::half(::ceilf(float(a))); -} - -namespace std { - -#if __cplusplus > 199711L -template <> -struct hash<Eigen::half> { - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::size_t operator()(const Eigen::half& a) const { - return static_cast<std::size_t>(a.x); - } -}; -#endif - -} // end namespace std - - -// Add the missing shfl_xor intrinsic -#if defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 300 -__device__ EIGEN_STRONG_INLINE Eigen::half __shfl_xor(Eigen::half var, int laneMask, int width=warpSize) { - #if EIGEN_CUDACC_VER < 90000 - return static_cast<Eigen::half>(__shfl_xor(static_cast<float>(var), laneMask, width)); - #else - return static_cast<Eigen::half>(__shfl_xor_sync(0xFFFFFFFF, static_cast<float>(var), laneMask, width)); - #endif -} -#endif - -// ldg() has an overload for __half_raw, but we also need one for Eigen::half. -#if defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 350 -EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::half __ldg(const Eigen::half* ptr) { - return Eigen::half_impl::raw_uint16_to_half( - __ldg(reinterpret_cast<const unsigned short*>(ptr))); -} -#endif - - -#if defined(EIGEN_CUDA_ARCH) -namespace Eigen { -namespace numext { - -template<> -EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -bool (isnan)(const Eigen::half& h) { - return (half_impl::isnan)(h); -} - -template<> -EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -bool (isinf)(const Eigen::half& h) { - return (half_impl::isinf)(h); -} - -template<> -EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -bool (isfinite)(const Eigen::half& h) { - return (half_impl::isfinite)(h); -} - -} // namespace Eigen -} // namespace numext -#endif - -#endif // EIGEN_HALF_CUDA_H diff --git a/Trigger/TrigFTK/TrigFTK_RawData/src/FTK_RawPixelCluster.cxx b/Trigger/TrigFTK/TrigFTK_RawData/src/FTK_RawPixelCluster.cxx deleted file mode 100644 index 80c359ff6f00b27e0fa6828c59c2c67a1b89bf6b..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/src/FTK_RawPixelCluster.cxx +++ /dev/null @@ -1,166 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTK_RawData/FTK_RawPixelCluster.h" -#include <iostream> - -#define NINT(a) ((a) >= 0.0 ? (int)((a)+0.5) : (int)((a)-0.5)) - -using namespace std; - -FTK_RawPixelCluster::FTK_RawPixelCluster(): - m_word_a(0), - m_word_b(0), - m_barcode(0) -{ - // nothing to do -} - - -FTK_RawPixelCluster::FTK_RawPixelCluster(uint32_t word_a, uint32_t word_b){ - m_word_a = word_a; - m_word_b = word_b; - m_barcode = 0; -} - -FTK_RawPixelCluster::FTK_RawPixelCluster(uint32_t word_a, uint32_t word_b, long int barcode){ - m_word_a = word_a; - m_word_b = word_b; - m_barcode = barcode; -} - -FTK_RawPixelCluster::~FTK_RawPixelCluster() -{ - // nothing to do -} - -void FTK_RawPixelCluster::setColWidth(unsigned int col_width){ - - uint32_t width = col_width; - - // Store width starting with 0 - if (width>0) width-=1; //transform from width=1 to 8 to packed width 0-7 - - if (width>7) width=7; - - width = width << 28; // fill bits 28-30 - m_word_b = width | m_word_b; - - return; -} - -void FTK_RawPixelCluster::setColCoord(float col_coord){ - - // float multiplier = 10.; - //////// float range_top = 166; // 144 for non-IBL layers - float range_top = 4096; - float range_bot = 0.; - int position = 16; - - uint32_t coord = 0; - if(col_coord > range_bot && col_coord < range_top){ - // coord = NINT( multiplier*col_coord); - coord = NINT(col_coord); - coord = coord << position; - m_word_b = (coord | m_word_b); - } - - return; -} - -void FTK_RawPixelCluster::setRowWidth(unsigned int row_width){ - - uint32_t width = row_width; - - // Store width starting with 0 - if (width>0) width-=1; //transform from width=1 to 8 to packed width 0-7 - - - if (width>7) width=7; - - width = width << 12; // fill bits 12-14 - m_word_b = width | m_word_b; - - return; -} - -void FTK_RawPixelCluster::setRowCoord(float row_coord){ - - // int multiplier = 10; - int range_top = 4096; // 328 for non-IBL layers - // int range_top = 336; // 328 for non-IBL layers - int range_bot = 0; - int offset = 0; - int position = 0; - - uint32_t coord = 0; - if( (row_coord > range_bot) && (row_coord < range_top)){ - coord = row_coord + offset; - // coord = multiplier*row_coord + offset; - } - - coord = coord << position; - m_word_b = (coord | m_word_b); - - return; -} - -unsigned int FTK_RawPixelCluster::getModuleID() const{ - - uint32_t id = m_word_a & 0xfff; // first 12 bits - return id; -} - -void FTK_RawPixelCluster::setModuleID(unsigned int module_id){ - - uint32_t id = module_id; - id = id & 0xfff; // first 12 bits - m_word_a = (id | m_word_a); - - return; -} - - -float FTK_RawPixelCluster::getColCoord() const{ - - // float multiplier = 10.; - - uint32_t col = 0; - col = col | (m_word_b & 0xfff0000); // bits 16-27 - col = col >> 16; - - // float col_coord = ((float)(col)/multiplier); - // return col_coord; - - return col; -} - -float FTK_RawPixelCluster::getRowCoord() const { - - /// float multiplier = 10.; - int offset = 0; - uint16_t row = 0; - row = m_word_b & 0xfff; // first 12 bits - // float row_coord = (((float)(row - offset))/multiplier); - float row_coord = (float)(row - offset); - - return row_coord; - -} - -unsigned int FTK_RawPixelCluster::getColWidth() const { - - uint32_t col = (m_word_b & 0x70000000) >> 28; //bits 28-30 - return (unsigned int) (col+1); // transform from packed width=0 to 7 to width 1-8 -} - -unsigned int FTK_RawPixelCluster::getRowWidth() const { - - uint16_t row = (m_word_b & 0x7000)>>12; // select bits 12-14 - return (unsigned int) (row+1); // transform from packed width=0 to 7 to width 1-8 -} - -#if defined(__MAKECINT__) -#pragma link C++ class FTK_RawPixelCluster; -#endif diff --git a/Trigger/TrigFTK/TrigFTK_RawData/src/FTK_RawSCT_Cluster.cxx b/Trigger/TrigFTK/TrigFTK_RawData/src/FTK_RawSCT_Cluster.cxx deleted file mode 100644 index 20e693c60eccb95b2c5646ab08606065f2ea33f2..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/src/FTK_RawSCT_Cluster.cxx +++ /dev/null @@ -1,114 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTK_RawData/FTK_RawSCT_Cluster.h" -#include <iostream> - -#define NINT(a) ((a) >= 0.0 ? (int)((a)+0.5) : (int)((a)-0.5)) - -using namespace std; - -FTK_RawSCT_Cluster::FTK_RawSCT_Cluster() : - m_word(0), - m_barcode(0) -{ - // nothing to do -} - - -FTK_RawSCT_Cluster::FTK_RawSCT_Cluster(uint32_t word) -{ - m_word = word; - m_barcode = 0; -} - -FTK_RawSCT_Cluster::FTK_RawSCT_Cluster(uint32_t word, signed long barcode) -{ - m_word = word; - m_barcode = barcode; -} - - -FTK_RawSCT_Cluster::~FTK_RawSCT_Cluster() -{ - // nothing to do -} - - void FTK_RawSCT_Cluster::setWord(uint32_t word){ - m_word = word; - } - -float FTK_RawSCT_Cluster::getHitCoord() const{ - - // Hit coordinate is 11 bits, starting at bit 16 - - uint32_t hit = (m_word & (0x7ff << 16)) >> 16; - - // return 0.5 * (float)hit; - return (float)hit; -} - -void FTK_RawSCT_Cluster::setHitCoord( float hit_coord ){ - - // TopBit 23 BottomBit 13 (11 bits) Max 2048 - - uint32_t hit = uint32_t (hit_coord); - // uint32_t hit = uint32_t (hit_coord*2.); - - if ( hit < 2048 ){ - hit = hit << 16 ; - m_word = (hit | m_word); - } - return; -} - -unsigned int FTK_RawSCT_Cluster::getHitWidth() const{ - - // width is 3 bits, starting at bit 28 - unsigned int width = (m_word & 0x70000000)>> 28; - - return (width+1); // transform from packed width=0 to 7 to width 1-8 - -} - -void FTK_RawSCT_Cluster::setHitWidth( unsigned int hit_width ){ - - // TopBit 26 BottomBit 24 (3 bits) Max 8 - - uint32_t width = hit_width; - - if (width>0) width-=1; // transform from width=1 to 8 to packed width 0-7 - - if(width > 7) width = 7; - width = width << 28; - - m_word = (width | m_word); - - return; - -} - -// JAA modified this to use 13 bits -unsigned int FTK_RawSCT_Cluster::getModuleID() const{ - - // First 13 bits - uint32_t module_id = (m_word & 0x1fff); - return module_id; - -} -// JAA modified this to use 13 bits -void FTK_RawSCT_Cluster::setModuleID( unsigned int module_id ){ - - uint32_t id = module_id; - - if (id < 8192) m_word = (id | m_word); - - return; -} - - - -#if defined(__MAKECINT__) -#pragma link C++ class FTK_RawSCT_Cluster; -#endif diff --git a/Trigger/TrigFTK/TrigFTK_RawData/src/FTK_RawTrack.cxx b/Trigger/TrigFTK/TrigFTK_RawData/src/FTK_RawTrack.cxx deleted file mode 100644 index b5cb88e48fada6b56b4dbdadbd82a22b8ef11e8b..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawData/src/FTK_RawTrack.cxx +++ /dev/null @@ -1,407 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTK_RawData/FTK_RawTrack.h" -#include "Eigen/Core" -#define EIGEN_DEVICE_FUNC -#include "EigenHalf.h" -#undef EIGEN_DEVICE_FUNC -#include <iostream> -#include <TMath.h> -#include <cmath> - -using Eigen::half_impl::__half_raw; - -const float FTK_RawTrack::s_d0_multiplier = 1000.; // reciprocal of precision -const float FTK_RawTrack::s_z0_multiplier = 100.; -const float FTK_RawTrack::s_phi_multiplier = 10000.; -const float FTK_RawTrack::s_invpt_multiplier = 2.e7; -const float FTK_RawTrack::s_cot_multiplier = 4000.; -const float FTK_RawTrack::s_chi2_multiplier = 1000.; -//const float FTK_RawTrack::s_quality_multiplier = 1000.; - - -// The Default constructor sets the version to the current version. -// The constructors with datawords tak ethe version set in the dataword. - -FTK_RawTrack::FTK_RawTrack() : - m_word_th1((0xbda)<<16), // sector (16 bit), 0xa (4 bit), 0d (4 bit), 0xb (4 bit), reserved (3 bit), is fSSB (1 bit) - m_word_th2(0), // layermap (12 bit), reserved (4 bit), tower (7 bit), reserved (1bit), TF num (3 bit), reserved (5 bit) - m_word_th3((FTK_RAWTRACK_VERSION)<<24), // road (24 bit), reserved (8 bit) - m_word_th4(0), // TRACK_D0, TRACK_CHISQ 16-bit, 16-bit - m_word_th5(0), // TRACK_COTTH, TRACK_Z0 16-bit, 16-bit - m_word_th6(0), // TRACK_CURV, TRACK_PHI0 16-bit, 16-bit - m_barcode(0) -{ - m_pix_clusters.reserve(s_npixlayers); - m_sct_clusters.reserve(s_nsctlayers); - - // Initialise dummy Pixel clusters - for (int i = 0; i < s_npixlayers; ++i){ - m_pix_clusters.push_back(FTK_RawPixelCluster()); - } - - // Initialise dummy SCT clusters - for (int i = 0; i < s_nsctlayers; ++i){ - m_sct_clusters.push_back(FTK_RawSCT_Cluster()); - } -} - -FTK_RawTrack::FTK_RawTrack(const FTK_RawTrack& track) { - - m_pix_clusters.reserve(track.getPixelClusters().size()); - m_sct_clusters.reserve(track.getSCTClusters().size()); - - unsigned int layer=0; - for (unsigned int ipix=0; ipix < track.getPixelClusters().size(); ++ipix,++layer){ - m_pix_clusters.push_back(track.getPixelCluster(layer)); - } - for (unsigned int isct=0; isct < track.getSCTClusters().size(); ++isct,++layer){ - m_sct_clusters.push_back(track.getSCTCluster(layer)); - } - m_word_th1 = track.getTH1(); - m_word_th2 = track.getTH2(); - m_word_th3 = track.getTH3(); - m_word_th4 = track.getTH4(); - m_word_th5 = track.getTH5(); - m_word_th6 = track.getTH6(); - - m_barcode=track.getBarcode(); -} - -FTK_RawTrack::FTK_RawTrack(uint32_t word_th1, uint32_t word_th2, uint32_t word_th3, uint32_t word_th4, uint32_t word_th5, uint32_t word_th6) -{ - m_barcode = 0; - m_word_th1 = word_th1; - m_word_th2 = word_th2; - m_word_th3 = word_th3; - m_word_th4 = word_th4; - m_word_th5 = word_th5; - m_word_th6 = word_th6; - - m_pix_clusters.reserve(s_npixlayers); - m_sct_clusters.reserve(s_nsctlayers); - - // Initialise dummy Pixel clusters - for (int i = 0; i < s_npixlayers; ++i){ - m_pix_clusters.push_back(FTK_RawPixelCluster()); - } - - // Initialise dummy SCT clusters - for (int i = 0; i < s_nsctlayers; ++i){ - m_sct_clusters.push_back(FTK_RawSCT_Cluster()); - } -} - -FTK_RawTrack::FTK_RawTrack(uint32_t word_th1, uint32_t word_th2, uint32_t word_th3, uint32_t word_th4, uint32_t word_th5, uint32_t word_th6, const std::vector<FTK_RawPixelCluster>& pixel_clusters, const std::vector<FTK_RawSCT_Cluster>& SCT_clusters){ - - - m_barcode = 0; - m_word_th1 = word_th1; - m_word_th2 = word_th2; - m_word_th3 = word_th3; - m_word_th4 = word_th4; - m_word_th5 = word_th5; - m_word_th6 = word_th6; - - // Initialise dummy Pixel clusters - m_pix_clusters = pixel_clusters; - - // Initialise dummy SCT clusters - m_sct_clusters = SCT_clusters; -} - -FTK_RawTrack::~FTK_RawTrack() -{ -} - -const FTK_RawPixelCluster& FTK_RawTrack::getPixelCluster( int v ) const { - if ( v > s_npixlayers || v < 0 || v > int(m_pix_clusters.size())) { - return m_pix_clusters[0]; - } else { - return m_pix_clusters[v]; - } -} - -FTK_RawPixelCluster& FTK_RawTrack::getPixelCluster( int v ) { - if ( v > s_npixlayers || v < 0 || v > int(m_pix_clusters.size())) { - return m_pix_clusters[0]; - } else { - return m_pix_clusters[v]; - } -} - -uint32_t FTK_RawTrack::getPixelWordA( int v ) const { - return m_pix_clusters[v].getWordA(); -} -uint32_t FTK_RawTrack::getPixelWordB( int v ) const { - return m_pix_clusters[v].getWordB(); -} -uint32_t FTK_RawTrack::getPixelBarcode( int v ) const { - return m_pix_clusters[v].getBarcode(); -} -uint32_t FTK_RawTrack::getSCTWord( int v ) const { - return m_sct_clusters[v].getWord(); -} -uint32_t FTK_RawTrack::getSCTBarcode( int v ) const { - return m_sct_clusters[v].getBarcode(); -} - -const FTK_RawSCT_Cluster& FTK_RawTrack::getSCTCluster( int v ) const { - if ( v > s_nsctlayers || v < 0 || v > int(m_sct_clusters.size()) ) { - return m_sct_clusters[0]; - } else { - return m_sct_clusters[v]; - } -} - -FTK_RawSCT_Cluster& FTK_RawTrack::getSCTCluster( int v ) { - if ( v > s_nsctlayers || v < 0 || v > int(m_sct_clusters.size()) ) { - return m_sct_clusters[0]; - } else { - return m_sct_clusters[v]; - } -} - -void FTK_RawTrack::setPixelCluster( const unsigned int layer, const FTK_RawPixelCluster &v ) { - if ( layer > m_pix_clusters.size()) { - return; - } - m_pix_clusters[layer] = v; - return; -} - -void FTK_RawTrack::setSCTCluster( const unsigned int layer, const FTK_RawSCT_Cluster &v ) { - unsigned int sct_layer = layer -s_npixlayers; - if ( sct_layer > m_sct_clusters.size()) { - return; - } - m_sct_clusters[sct_layer] = v; - return; -} - -void FTK_RawTrack::setPixelClusters( std::vector<FTK_RawPixelCluster> &clusters ) { - m_pix_clusters = clusters; - return; -} - -void FTK_RawTrack::setSCTClusters( std::vector<FTK_RawSCT_Cluster> &clusters ) { - m_sct_clusters = clusters; - return; -} - -void FTK_RawTrack::setRoadID(unsigned int v) { - v = v & 0xffffff; - m_word_th3 = (m_word_th3 | v); -} - -void FTK_RawTrack::setSectorID(unsigned int sector) { - sector = sector & 0xffff; - m_word_th1 = (m_word_th1 | sector); -} - -unsigned int FTK_RawTrack::getSectorID() const { - return m_word_th1 & 0xffff; -} - - -unsigned int FTK_RawTrack::getLayerMap() const { - return m_word_th2 & 0xfff; -} - -bool FTK_RawTrack::isMissingLayer(unsigned int i) const { - bool missingLayer=true; - if (i<s_nlayers) { - if ( (m_word_th2 & (0x1<<i)) !=0) missingLayer=false; - } - return missingLayer; - } - -bool FTK_RawTrack::isMissingPixelLayer(const unsigned int i) const { - bool missingLayer=true; - if (i<s_npixlayers) { - if ( (m_word_th2 & (0x1<<i)) !=0) missingLayer=false; - } - return missingLayer; - } - -bool FTK_RawTrack::isMissingSCTLayer(const unsigned int i) const { - bool missingLayer=true; - - int isct=i+s_npixlayers; - if (isct<s_nlayers) { - if ( (m_word_th2 & (0x1<<isct)) !=0) missingLayer=false; - } - return missingLayer; - } - -unsigned int FTK_RawTrack::getTower() const { - return (m_word_th2>>16) & 0x7f; -} - - -void FTK_RawTrack::setLayerMap(unsigned int layerMap) { - layerMap = layerMap & 0xfff; - m_word_th2 = (m_word_th2 | layerMap); -} - -void FTK_RawTrack::setTower(unsigned int tower) { - tower = (tower & 0x7f) << 16; - m_word_th2 = (m_word_th2 | tower); -} - -void FTK_RawTrack::setD0(float track_d0){ - - uint16_t d0 = Eigen::half(track_d0).x; - - m_word_th4 = (d0 | m_word_th4); - - return; -} - -void FTK_RawTrack::setZ0(float track_z0){ - - uint16_t z0 = Eigen::half(track_z0).x; - - m_word_th5 = (z0 << 16) | m_word_th5; - - return; -} - -void FTK_RawTrack::setCotTh(float track_cot){ - - uint16_t cot = Eigen::half(track_cot).x; - - m_word_th5 = cot | m_word_th5; - - return; -} - -double FTK_RawTrack::getCotTh() const{ - double cot_f=0.; - uint16_t cot = m_word_th5 & 0xffff; - if ((this->trackVersion())==0) { - cot_f = (double) cot; - cot_f = cot_f-s_sixteen_bit_offset; - cot_f = cot_f/s_cot_multiplier; - } else { - cot_f = float(Eigen::half(__half_raw(cot))); - } - return cot_f; -} - - - -void FTK_RawTrack::setPhi(float track_phi){ - - uint16_t phi = Eigen::half(track_phi).x; - - m_word_th6 = (phi<<16) | m_word_th6; - - return; -} - -void FTK_RawTrack::setInvPt(float track_invpt){ - - uint16_t invpt = Eigen::half(0.5*track_invpt).x;// 1/(2pt) is stored in dataword from version 2 onwards - - m_word_th6 = invpt | m_word_th6; - return; -} - - -double FTK_RawTrack::getInvPt() const{ - - - double invpt_f = 0.; - - if (this->trackVersion()==0) { - uint32_t invpt = (m_word_th6 & 0xffff); - invpt_f = (invpt-s_sixteen_bit_offset); - invpt_f = invpt_f /s_invpt_multiplier; - } else { - uint16_t invpt = (m_word_th6 & 0xffff); - invpt_f = float(Eigen::half(__half_raw(invpt))); - } - return ( (this->trackVersion()>1)? 2*invpt_f:invpt_f); // 1/2pt is stored in dataword from version 2 onwards -} - - - -void FTK_RawTrack::setChi2(float track_chi2){ - - uint16_t chi2 = Eigen::half(track_chi2).x; - m_word_th4 = (chi2<< 16) | m_word_th4; - - return; -} - -float FTK_RawTrack::getD0() const{ - double d0_f = 0.; - if (this->trackVersion()==0) { - uint32_t d0=m_word_th4 & 0xffff; - d0_f = ((double)d0 - (double)s_sixteen_bit_offset)/s_d0_multiplier; - } else { - uint16_t d0=m_word_th4 & 0xffff; - d0_f = float(Eigen::half(__half_raw(d0))); - } - return d0_f; - -} - -float FTK_RawTrack::getZ0() const{ - double z0_f=0.; - if (this->trackVersion()==0) { - uint32_t z0 = (m_word_th5 & 0xffff0000) >> 16; - z0_f = ((double)z0 - (double) s_sixteen_bit_offset)/s_z0_multiplier; - } else { - uint16_t z0 = (m_word_th5 & 0xffff0000) >> 16; - z0_f = float(Eigen::half(__half_raw(z0))); - } - return z0_f; -} - -float FTK_RawTrack::getPhi() const{ - double phi_f=0.; - if (this->trackVersion()==0) { - uint32_t phi = (m_word_th6 & 0xffff0000) >> 16; - phi_f = ((double)phi - (double) s_sixteen_bit_offset)/s_phi_multiplier; - } else { - uint16_t phi = (m_word_th6 & 0xffff0000) >> 16; - phi_f = float(Eigen::half(__half_raw(phi))); - } - return phi_f; -} - - -double FTK_RawTrack::getChi2() const{ - double chi2_f = 0.; - if (this->trackVersion()==0) { - uint32_t chi2 = (m_word_th4 & 0xffff0000) >> 16; - chi2_f = (double)chi2/s_chi2_multiplier; - } else { - uint16_t chi2 = (m_word_th4 & 0xffff0000) >> 16; - chi2_f = float(Eigen::half(__half_raw(chi2))); - } - return chi2_f; - -} - - -void FTK_RawTrack::setIsAuxFormat(bool isAux) { - if (isAux) { - m_word_th2 = m_word_th2 | 0x1000; - } else { - m_word_th2 = m_word_th2 & 0xFFFFEFFF; - } -} - -bool FTK_RawTrack::getIsAuxFormat() const { - return ((m_word_th2 & 0x1000) !=0); -} - - -#if defined(__MAKECINT__) -#pragma link C++ class FTK_RawTrack; -#endif diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/CMakeLists.txt b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/CMakeLists.txt deleted file mode 100644 index 7766e36c283aec2cffe6cd95d88b0977080b0a1e..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -################################################################################ -# Package: TrigFTK_RawDataTPCnv -################################################################################ - -# Declare the package name: -atlas_subdir( TrigFTK_RawDataTPCnv ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Database/AthenaPOOL/AthenaPoolCnvSvc - Database/AthenaPOOL/AthenaPoolUtilities - Trigger/TrigFTK/TrigFTK_RawData - PRIVATE - AtlasTest/TestTools - Control/AthenaKernel - GaudiKernel ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - -# Component(s) in the package: -atlas_add_tpcnv_library( TrigFTK_RawDataTPCnv - src/*.cxx - PUBLIC_HEADERS TrigFTK_RawDataTPCnv - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib AthenaPoolUtilities TrigFTK_RawData TestTools AthenaKernel GaudiKernel ) - -atlas_add_dictionary( TrigFTK_RawDataTPCnvDict - TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnvDict.h - TrigFTK_RawDataTPCnv/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib AthenaPoolUtilities TrigFTK_RawData TestTools AthenaKernel GaudiKernel TrigFTK_RawDataTPCnv ) - -atlas_add_test( FTK_RawTrackCnv_p1_test - SOURCES - test/FTK_RawTrackCnv_p1_test.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib AthenaPoolUtilities TrigFTK_RawData TestTools AthenaKernel GaudiKernel TrigFTK_RawDataTPCnv ) - diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackCnv_p1.h b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackCnv_p1.h deleted file mode 100644 index 994b85a06b3a359fe14fd8287d90103d6432db64..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackCnv_p1.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTK_RAWTRACKTPCNV_FTK_RAWTRACKCNV_p1_H -#define TRIGFTK_RAWTRACKTPCNV_FTK_RAWTRACKCNV_p1_H - -#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" - -#include "TrigFTK_RawData/FTK_RawTrack.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrack_p1.h" - -class MsgStream; - -class FTK_RawTrackCnv_p1: public T_AthenaPoolTPCnvBase<FTK_RawTrack, FTK_RawTrack_p1> -{ -public: - - FTK_RawTrackCnv_p1() {} - - virtual void persToTrans( const FTK_RawTrack_p1 *, FTK_RawTrack *, MsgStream& ); - virtual void transToPers( const FTK_RawTrack *, FTK_RawTrack_p1 *, MsgStream& ); - - enum {th1=0, th2=1, th3=2, th4=3, th5=4,th6=5}; - -}; - -#endif diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_p1.h b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_p1.h deleted file mode 100644 index 2644d2055840777c733101a9f5213f427a06dc88..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_p1.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTK_RAWTRACKTPCNV_FTK_RAWTRACKCONTAINERCNV_P1_H -#define TRIGFTK_RAWTRACKTPCNV_FTK_RAWTRACKCONTAINERCNV_P1_H - -#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" - -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackCnv_p1.h" -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_p1.h" - -class MsgStream; - -class FTK_RawTrackContainerCnv_p1 - : public T_AthenaPoolTPCnvBase<FTK_RawTrackContainer, FTK_RawTrackContainer_p1> -{ - - public: - - FTK_RawTrackContainerCnv_p1() {} - - virtual void persToTrans( const FTK_RawTrackContainer_p1*, FTK_RawTrackContainer*, MsgStream& ); - virtual void transToPers( const FTK_RawTrackContainer*, FTK_RawTrackContainer_p1*, MsgStream& ); - - virtual void initPrivateConverters( AthenaPoolTopLevelTPCnvBase *topCnv ) { - m_FTK_RawTrackVectorCnv.setTopConverter( topCnv, 0 ); - } - - private: - - typedef T_AthenaPoolTPPtrVectorCnv< FTK_RawTrackContainer, - std::vector<TPObjRef>, - ITPConverterFor<FTK_RawTrack> > FTK_RawTrackVectorCnv_p1; - - FTK_RawTrackVectorCnv_p1 m_FTK_RawTrackVectorCnv; - -}; - - -#endif diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_tlp1.h b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_tlp1.h deleted file mode 100644 index 23bac6c4faecbe5ff29f55bb2487db4efe2128e5..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_tlp1.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTK_RAWDATATPCNV_FTK_RAWTRACKCONTAINERCNV_tlp1_H -#define TRIGFTK_RAWDATATPCNV_FTK_RAWTRACKCONTAINERCNV_tlp1_H - -#include "AthenaPoolCnvSvc/AthenaPoolTopLevelTPConverter.h" - -#include "FTK_RawTrackContainerCnv_p1.h" -#include "FTK_RawTrackCnv_p1.h" -#include "FTK_RawTrackContainer_tlp1.h" - -class FTK_RawTrackContainerCnv_tlp1 : public AthenaPoolTopLevelTPConverter<FTK_RawTrackContainerCnv_p1, FTK_RawTrackContainer_tlp1> -{ - - public: - - FTK_RawTrackContainerCnv_tlp1(); - virtual ~FTK_RawTrackContainerCnv_tlp1() {} - - virtual void setPStorage( FTK_RawTrackContainer_tlp1 *storage ); - - - protected: - - FTK_RawTrackContainerCnv_p1 m_FTK_RawTrackContainerCnv; - FTK_RawTrackCnv_p1 m_FTK_RawTrackCnv; - - -}; - -#endif diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_p1.h b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_p1.h deleted file mode 100644 index 3f1496e488b06ca27fdf894920ff361fe42e4a55..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_p1.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGINDETEVENT_FTK_RAWTRACKCONTAINER_P1_H -#define TRIGINDETEVENT_FTK_RAWTRACKCONTAINER_P1_H - -#include "AthenaPoolUtilities/TPObjRef.h" -#include <vector> - -class FTK_RawTrackContainer_p1{ - - public: - - FTK_RawTrackContainer_p1() {} - friend class FTK_RawTrackContainerCnv_p1; - - private: - - std::vector<TPObjRef> m_FTK_RawTrackVector; - -}; - -#endif - diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_tlp1.h b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_tlp1.h deleted file mode 100644 index 33924d2e02d87d89d4fd56897df0049fa693546b..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_tlp1.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTK_RAWDATATPCNV_FTK_RAWTRACKCONTAINER_tlp4_H -#define TRIGFTK_RAWDATATPCNV_FTK_RAWTRACKCONTAINER_tlp4_H - -#include "FTK_RawTrackContainer_p1.h" -#include "FTK_RawTrack_p1.h" - -class FTK_RawTrackContainer_tlp1 -{ - public: - - FTK_RawTrackContainer_tlp1() {} - friend class FTK_RawTrackContainerCnv_tlp1; - - private: - - std::vector< FTK_RawTrackContainer_p1 > m_FTK_RawTrackContainers; - std::vector< FTK_RawTrack_p1 > m_FTK_RawTracks; - -}; - -#endif diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrack_p1.h b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrack_p1.h deleted file mode 100644 index 77f7771b4a9840737562e3dcf82600f2c1a8de3f..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/FTK_RawTrack_p1.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TrigFTK_RawDataTPCnv_FTK_RawTrack_p1_H -#define TrigFTK_RawDataTPCnv_FTK_RawTrack_p1_H - -#include "TrigFTK_RawData/FTK_RawTrack.h" -#include <stdint.h> - -class FTK_RawTrack_p1 -{ - - public: - - FTK_RawTrack_p1() {} - friend class FTK_RawTrackCnv_p1; - - private: - - uint32_t m_pars[6]; - uint32_t m_pars_pix[8]; - uint32_t m_pars_sct[8]; - signed long m_barcodes_sct[8]; - signed long m_barcodes_pix[4]; - signed long m_barcode; - -}; - -#endif diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnvDict.h b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnvDict.h deleted file mode 100644 index f6ad12cec0f9b9df6865cca8be6272b82e1f2011..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnvDict.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TRIGFTK_RAWDATATPCNV_TRIGINDETEVENTTPCNVDICT_H -#define TRIGFTK_RAWDATATPCNV_TRIGINDETEVENTTPCNVDICT_H - -#include "TrigFTK_RawDataTPCnv/FTK_RawTrack_p1.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_p1.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_tlp1.h" - -//dummy instances of all objects using std::vector<TPObjRef> for the dictionary -struct dummy_TrigFTK_RawDataTPCnvDict -{ - - std::vector<FTK_RawTrackContainer_p1> m_dummyFTK_RawTrackContainer_p1; - std::vector<FTK_RawTrack_p1> m_dummyFTK_RawTrack_p1; - -}; - -#endif diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/selection.xml b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/selection.xml deleted file mode 100644 index 6dd7b78ccfc9e34448d074606f6556820c8678c0..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnv/selection.xml +++ /dev/null @@ -1,10 +0,0 @@ -<lcgdict> - -<!-- FTKRawTrack--> - <class name="FTK_RawTrack_p1" /> - <class name="std::vector<FTK_RawTrack_p1>" /> - <class name="FTK_RawTrackContainer_tlp1" id="C1A5436E-8520-4399-82FC-E6828B19688D" /> - <class name="FTK_RawTrackContainer_p1" id="FF688A0E-527F-4F88-9738-830F97EC0CFD" /> - <class name="std::vector<FTK_RawTrackContainer_p1>"/> - -</lcgdict> diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/share/FTK_RawTrackCnv_p1_test.ref b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/share/FTK_RawTrackCnv_p1_test.ref deleted file mode 100644 index a5bce3fd2565d8f458555a0c6f42d0504a848bd5..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/share/FTK_RawTrackCnv_p1_test.ref +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/FTK_RawTrackCnv_p1.cxx b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/FTK_RawTrackCnv_p1.cxx deleted file mode 100644 index 14f30172d1d5b3672cbe3cb7f0fcb88381bb5f41..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/FTK_RawTrackCnv_p1.cxx +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTK_RawData/FTK_RawTrack.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackCnv_p1.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrack_p1.h" - -void FTK_RawTrackCnv_p1::persToTrans(const FTK_RawTrack_p1* persObj, - FTK_RawTrack* transObj, - MsgStream &/*log*/) -{ - - transObj->setTH1(persObj->m_pars[th1]); - transObj->setTH2(persObj->m_pars[th2]); - transObj->setTH3(persObj->m_pars[th3]); - transObj->setTH4(persObj->m_pars[th4]); - transObj->setTH5(persObj->m_pars[th5]); - transObj->setTH6(persObj->m_pars[th6]); - transObj->setBarcode(persObj->m_barcode); - - // Pixel Clusters // - std::vector<FTK_RawPixelCluster> pix_clusters; - unsigned int iword=0; - for (unsigned int ipix=0; ipix<4; ipix++) { - FTK_RawPixelCluster pix_clus(persObj->m_pars_pix[iword], persObj->m_pars_pix[iword+1],persObj->m_barcodes_pix[ipix]); - iword+=2; - pix_clusters.push_back(pix_clus); - } - transObj->setPixelClusters(pix_clusters); - - std::vector<FTK_RawSCT_Cluster> sct_clusters; - - for (unsigned int isct=0; isct<8; isct++) { - FTK_RawSCT_Cluster sct_clus(persObj->m_pars_sct[isct], persObj->m_barcodes_sct[isct]); - sct_clusters.push_back(sct_clus); - } - transObj->setSCTClusters(sct_clusters); -} - -void FTK_RawTrackCnv_p1::transToPers(const FTK_RawTrack* transObj, - FTK_RawTrack_p1* persObj, - MsgStream &log) -{ - log << MSG::DEBUG << "FTK_RawTrackCnv_p1::transToPers called" << endmsg; - - persObj->m_pars[th1] = transObj->getTH1(); - persObj->m_pars[th2] = transObj->getTH2(); - persObj->m_pars[th3] = transObj->getTH3(); - persObj->m_pars[th4] = transObj->getTH4(); - persObj->m_pars[th5] = transObj->getTH5(); - persObj->m_pars[th6] = transObj->getTH6(); - persObj->m_barcode = transObj->getBarcode(); - - //Pixel Clusters - persObj->m_pars_pix[0] = transObj->getPixelWordA(0); - persObj->m_pars_pix[1] = transObj->getPixelWordB(0); - persObj->m_barcodes_pix[0] = transObj->getPixelBarcode(0); - - - persObj->m_pars_pix[2] = transObj->getPixelCluster(1).getWordA(); - persObj->m_pars_pix[3] = transObj->getPixelCluster(1).getWordB(); - persObj->m_barcodes_pix[1] = transObj->getPixelCluster(1).getBarcode(); - - persObj->m_pars_pix[4] = transObj->getPixelCluster(2).getWordA(); - persObj->m_pars_pix[5] = transObj->getPixelCluster(2).getWordB(); - persObj->m_barcodes_pix[2] = transObj->getPixelCluster(2).getBarcode(); - - persObj->m_pars_pix[6] = transObj->getPixelCluster(3).getWordA(); - persObj->m_pars_pix[7] = transObj->getPixelCluster(3).getWordB(); - persObj->m_barcodes_pix[3] = transObj->getPixelCluster(3).getBarcode(); - - // SCT Clusters // - persObj->m_pars_sct[0] = transObj->getSCTCluster(0).getWord(); - persObj->m_barcodes_sct[0] = transObj->getSCTCluster(0).getBarcode(); - - persObj->m_pars_sct[1] = transObj->getSCTCluster(1).getWord(); - persObj->m_barcodes_sct[1] = transObj->getSCTCluster(1).getBarcode(); - - persObj->m_pars_sct[2] = transObj->getSCTCluster(2).getWord(); - persObj->m_barcodes_sct[2] = transObj->getSCTCluster(2).getBarcode(); - - persObj->m_pars_sct[3] = transObj->getSCTCluster(3).getWord(); - persObj->m_barcodes_sct[3] = transObj->getSCTCluster(3).getBarcode(); - - persObj->m_pars_sct[4] = transObj->getSCTCluster(4).getWord(); - persObj->m_barcodes_sct[4] = transObj->getSCTCluster(4).getBarcode(); - - persObj->m_pars_sct[5] = transObj->getSCTCluster(5).getWord(); - persObj->m_barcodes_sct[5] = transObj->getSCTCluster(5).getBarcode(); - - persObj->m_pars_sct[6] = transObj->getSCTCluster(6).getWord(); - persObj->m_barcodes_sct[6] = transObj->getSCTCluster(6).getBarcode(); - - persObj->m_pars_sct[7] = transObj->getSCTCluster(7).getWord(); - persObj->m_barcodes_sct[7] = transObj->getSCTCluster(7).getBarcode(); -} - - diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/FTK_RawTrackContainerCnv_p1.cxx b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/FTK_RawTrackContainerCnv_p1.cxx deleted file mode 100644 index 154486c91347d7a4a56373509a06a12faf78c37b..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/FTK_RawTrackContainerCnv_p1.cxx +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTK_RawData/FTK_RawTrackContainer.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_p1.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_p1.h" - -void FTK_RawTrackContainerCnv_p1::persToTrans(const FTK_RawTrackContainer_p1* persObj, - FTK_RawTrackContainer* transObj, - MsgStream &log) -{ - log << MSG::DEBUG << "FTK_RawTrackContainerCnv_p1::persToTrans called " << endmsg; - - m_FTK_RawTrackVectorCnv.persToTrans( &(persObj->m_FTK_RawTrackVector), transObj, log ); -} - - -void FTK_RawTrackContainerCnv_p1::transToPers(const FTK_RawTrackContainer* transObj, - FTK_RawTrackContainer_p1* persObj, - MsgStream &log) -{ - log << MSG::DEBUG << "FTK_RawTrackContainerCnv_p1::transToPers called " << endmsg; - - m_FTK_RawTrackVectorCnv.transToPers( transObj, &(persObj->m_FTK_RawTrackVector), log ); - -} diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/FTK_RawTrackContainerCnv_tlp1.cxx b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/FTK_RawTrackContainerCnv_tlp1.cxx deleted file mode 100644 index 8321c9e537501abfa1390803a294e88967b4743a..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/FTK_RawTrackContainerCnv_tlp1.cxx +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_tlp1.h" - - -//constructor -FTK_RawTrackContainerCnv_tlp1::FTK_RawTrackContainerCnv_tlp1(){ - - // add the "main" base class converter - addMainTPConverter(); - - // add all converters needed in the top level converter - // do not change the order of adding converters - addTPConverter( &m_FTK_RawTrackCnv ); - -} - -void FTK_RawTrackContainerCnv_tlp1::setPStorage( FTK_RawTrackContainer_tlp1* storage ){ - - //for the base class converter - setMainCnvPStorage( &storage->m_FTK_RawTrackContainers ); - - //for all other converters defined in the base class - m_FTK_RawTrackCnv. setPStorage( &storage->m_FTK_RawTracks ); - -} - - diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/TrigFTK_RawDataTPCnv.cxx b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/TrigFTK_RawDataTPCnv.cxx deleted file mode 100644 index b25bad76146846db493f01896070592a09a93e33..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/src/TrigFTK_RawDataTPCnv.cxx +++ /dev/null @@ -1,17 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// generate the T/P converter entries -#include "AthenaKernel/TPCnvFactory.h" - -#include "TrigFTK_RawDataTPCnv/FTK_RawTrack_p1.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_p1.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainerCnv_tlp1.h" -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackContainer_tlp1.h" - -DECLARE_TPCNV_FACTORY(FTK_RawTrackContainerCnv_tlp1, - FTK_RawTrackContainer, - FTK_RawTrackContainer_tlp1, - Athena::TPCnvVers::Current) - diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/test/FTK_RawTrackCnv_p1_test.cxx b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/test/FTK_RawTrackCnv_p1_test.cxx deleted file mode 100644 index 64350b15fd082182f6fec88eaa2a10c9d5b46ff2..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/test/FTK_RawTrackCnv_p1_test.cxx +++ /dev/null @@ -1,110 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id$ -/** - * @file TrigFTK_RawDataTPCnv/test/FTK_RawTrackCnv_p1_test.cxx - * @author scott snyder <snyder@bnl.gov> - * @date Feb, 2016 - * @brief Tests for FTK_RawTrackCnv_p1. - */ - - -#undef NDEBUG -#include "TrigFTK_RawDataTPCnv/FTK_RawTrackCnv_p1.h" -#include "GaudiKernel/MsgStream.h" -#include "TestTools/leakcheck.h" -#include <cassert> -#include <iostream> - - -void compare (const FTK_RawPixelCluster& p1, - const FTK_RawPixelCluster& p2) -{ - assert (p1.getWordA() == p2.getWordA()); - assert (p1.getWordB() == p2.getWordB()); - assert (p1.getBarcode() == p2.getBarcode()); -} - - -void compare (const FTK_RawSCT_Cluster& p1, - const FTK_RawSCT_Cluster& p2) -{ - assert (p1.getWord() == p2.getWord()); - assert (p1.getBarcode() == p2.getBarcode()); -} - - -void compare (const std::vector<FTK_RawPixelCluster>& p1, - const std::vector<FTK_RawPixelCluster>& p2) -{ - assert (p1.size() == p2.size()); - for (size_t i = 0; i < p1.size(); i++) - compare (p1[i], p2[i]); -} - - -void compare (const std::vector<FTK_RawSCT_Cluster>& p1, - const std::vector<FTK_RawSCT_Cluster>& p2) -{ - assert (p1.size() == p2.size()); - for (size_t i = 0; i < p1.size(); i++) - compare (p1[i], p2[i]); -} - - -void compare (const FTK_RawTrack& p1, - const FTK_RawTrack& p2) -{ - assert (p1.getTH1() == p2.getTH1()); - assert (p1.getTH2() == p2.getTH2()); - assert (p1.getTH3() == p2.getTH3()); - assert (p1.getTH4() == p2.getTH4()); - assert (p1.getTH5() == p2.getTH5()); - assert (p1.getTH6() == p2.getTH6()); - assert (p1.getBarcode() == p2.getBarcode()); - compare (p1.getPixelClusters(), p2.getPixelClusters()); - compare (p1.getSCTClusters(), p2.getSCTClusters()); -} - - -void testit (const FTK_RawTrack& trans1) -{ - MsgStream log (0, "test"); - FTK_RawTrackCnv_p1 cnv; - FTK_RawTrack_p1 pers; - cnv.transToPers (&trans1, &pers, log); - FTK_RawTrack trans2; - cnv.persToTrans (&pers, &trans2, log); - - compare (trans1, trans2); -} - - -void test1() -{ - std::cout << "test1\n"; - Athena_test::Leakcheck check; - - FTK_RawTrack trans1 (123, 234, 345, 456, 567, 678); - trans1.setBarcode (789); - - for (size_t i=0; i < trans1.getPixelClusters().size(); i++) { - trans1.setPixelCluster (i,FTK_RawPixelCluster (11 + i*100, 22 + i*100)); - trans1.getPixelClusters()[i].setBarcode (33 + i*100); - } - - for (size_t i=0; i < trans1.getSCTClusters().size(); i++) { - trans1.setSCTCluster (i,FTK_RawSCT_Cluster (44 + i*100, 55 + i*100)); - } - - testit (trans1); -} - - -int main() -{ - test1(); - return 0; -} diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/test/TrigFTK_RawDataTPCnv.xml b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/test/TrigFTK_RawDataTPCnv.xml deleted file mode 100755 index 267e4d8a978710e5f40d6c7c0f6406b85856ba7e..0000000000000000000000000000000000000000 --- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/test/TrigFTK_RawDataTPCnv.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0"?> -<atn> - <TEST name="TrigFTK_RawDataTPCnvTests" type="makecheck"> - <package>rigger/TrigFTK/TrigFTK_RawDataTPCnv</package> - <author> scott snyder </author> - <mailto> snyder@bnl.gov </mailto> - <expectations> - <errorMessage>Athena exited abnormally</errorMessage> - <warningMessage> # WARNING_MESSAGE : post.sh> ERROR</warningMessage> - <successMessage>check ok</successMessage> - <returnValue>0</returnValue> - </expectations> - </TEST> -</atn> diff --git a/Trigger/TrigHypothesis/TrigFTKHypo/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigHypothesis/TrigFTKHypo/ATLAS_CHECK_THREAD_SAFETY deleted file mode 100644 index 5da676a1343b5dca1c4ad10a26b8ab7a1c1115bc..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigFTKHypo/ATLAS_CHECK_THREAD_SAFETY +++ /dev/null @@ -1 +0,0 @@ -Trigger/TrigHypothesis/TrigFTKHypo diff --git a/Trigger/TrigHypothesis/TrigFTKHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigFTKHypo/CMakeLists.txt deleted file mode 100644 index a7a25fe531e4deccf355f2ce13e1e06052b1f076..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigFTKHypo/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -################################################################################ -# Package: TrigFTKHypo -################################################################################ - -# Declare the package name: -atlas_subdir( TrigFTKHypo ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - GaudiKernel - Trigger/TrigSteer/TrigInterfaces - DetectorDescription/IRegionSelector - Event/xAOD/xAODEventInfo - Trigger/TrigTools/TrigTimeAlgs ) - -# External dependencies: -find_package( tdaq-common ) - -# # Component(s) in the package: -atlas_add_component( TrigFTKHypo - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS} - LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} GaudiKernel xAODEventInfo TrigInterfacesLib IRegionSelector TrigTimeAlgsLib ) - -# Install files from the package: -atlas_install_python_modules( python/*.py ) - diff --git a/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.cxx b/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.cxx deleted file mode 100644 index 1ba2cb6f65806e641387ee479c335bd99b7351ae..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.cxx +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrigFTKAvailableHypo.h" - -#include "eformat/DetectorMask.h" -#include "eformat/SourceIdentifier.h" -#include "xAODEventInfo/EventInfo.h" - -#include "TrigTimeAlgs/TrigTimerSvc.h" - -//--------------------------------------------------------------------------------- - -TrigFTKAvailableHypo::TrigFTKAvailableHypo(const std::string& name, ISvcLocator* pSvcLocator) - : HLT::HypoAlgo(name, pSvcLocator), - m_acceptAll(0), - m_ftk_in(false) -{ - - -} - -//--------------------------------------------------------------------------------- - -TrigFTKAvailableHypo::~TrigFTKAvailableHypo() { -} - -//--------------------------------------------------------------------------------- - -HLT::ErrorCode TrigFTKAvailableHypo::hltInitialize() { - return HLT::OK; -} - -//--------------------------------------------------------------------------------------------------------------------------------------------- - -HLT::ErrorCode TrigFTKAvailableHypo::checkDetMask() { - - const xAOD::EventInfo* evinfo = nullptr; - if (store()->retrieve(evinfo).isFailure()) { - ATH_MSG_ERROR("Cannot retrieve xAOD::EventInfo"); - return HLT::SG_ERROR; - } - else { - ATH_MSG_DEBUG(evinfo->runNumber() - << " / " << evinfo->eventNumber() - << " / " << evinfo->lumiBlock() - << " / 0x" << std::hex << evinfo->detectorMask() << std::dec); - - uint64_t mask = evinfo->detectorMask(); - eformat::helper::DetectorMask decoder(mask); - - if (mask == 0) { - ATH_MSG_DEBUG("DetMask=0"); - m_ftk_in=true; - } else { - m_ftk_in = decoder.is_set(eformat::TDAQ_FTK); - ATH_MSG_DEBUG("FTK in DetMask " << m_ftk_in); - } - - - } - return HLT::OK; -} - -HLT::ErrorCode TrigFTKAvailableHypo::hltExecute(const HLT::TriggerElement* /* outputTE*/, bool& pass){ - - pass = false; - - HLT::ErrorCode ec = checkDetMask(); - if (ec != HLT::OK) return ec; - - if (m_acceptAll || m_ftk_in) - pass = true; - - return HLT::OK; -} - -//--------------------------------------------------------------------------------------------------------------------------------------------- - -HLT::ErrorCode TrigFTKAvailableHypo::hltFinalize() { - return HLT::OK; -} - diff --git a/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.h b/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.h deleted file mode 100644 index a422adf5da674ec255aa0e784bd89e4e5ff033c5..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -<<<<<<< HEAD -======= -*/ -/* ->>>>>>> upstream/master -*/ - -/** @class TrigFTKAvailableHypo - @author Jiri Masik <jiri.masik@manchester.ac.uk> - - Test availability of the FTK in the event and - -*/ - -#ifndef TRIG_FTKAvailableHypo_H -#define TRIG_FTKAvailableHypo_H - -// general athena stuff -#include "GaudiKernel/MsgStream.h" -#include "GaudiKernel/IToolSvc.h" -#include "GaudiKernel/StatusCode.h" - -// trigger includes -#include "TrigInterfaces/HypoAlgo.h" - - -class TrigFTKAvailableHypo: public HLT::HypoAlgo { - - public: - TrigFTKAvailableHypo(const std::string & name, ISvcLocator* pSvcLocator); - ~TrigFTKAvailableHypo(); - - HLT::ErrorCode hltInitialize(); - HLT::ErrorCode hltFinalize(); - HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass); - HLT::ErrorCode checkDetMask(); - - private: - - bool m_acceptAll; //!< true will accept all events - bool m_ftk_in; //!< FTK availability in the data / from DetMask - -}; - -#endif - - - - diff --git a/Trigger/TrigHypothesis/TrigFTKHypo/src/components/TrigFTKHypo_entries.cxx b/Trigger/TrigHypothesis/TrigFTKHypo/src/components/TrigFTKHypo_entries.cxx deleted file mode 100644 index ea87fa4c331891f3e327c8b5209bb4704a620fc6..0000000000000000000000000000000000000000 --- a/Trigger/TrigHypothesis/TrigFTKHypo/src/components/TrigFTKHypo_entries.cxx +++ /dev/null @@ -1,4 +0,0 @@ -#include "src/TrigFTKAvailableHypo.h" - -DECLARE_COMPONENT( TrigFTKAvailableHypo ) - diff --git a/Trigger/TrigTools/TrigFTKToolInterfaces/CMakeLists.txt b/Trigger/TrigTools/TrigFTKToolInterfaces/CMakeLists.txt deleted file mode 100644 index 5d2a919073bf2ae98adec8ed46ed7868802fd00d..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigFTKToolInterfaces/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -################################################################################ -# Package: TrigFTKToolInterfaces -################################################################################ - -# Declare the package name: -atlas_subdir( TrigFTKToolInterfaces ) - -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaBaseComps - GaudiKernel - InnerDetector/InDetRecEvent/InDetPrepRawData - Tracking/TrkEvent/TrkTrack - Tracking/TrkEvent/TrkTruthData - Trigger/TrigEvent/TrigInDetEvent ) - -# Install files from the package: -atlas_install_headers( TrigFTKToolInterfaces ) - diff --git a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ATLAS_CHECK_THREAD_SAFETY deleted file mode 100644 index 7c7df6b31a1808c0f3dd9d7fb76284a98c66e09f..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ATLAS_CHECK_THREAD_SAFETY +++ /dev/null @@ -1 +0,0 @@ -Trigger/TrigTools/TrigFTKToolInterfaces diff --git a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h b/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h deleted file mode 100644 index 30935c69e69ba6318ebc0bd7566f4a2c2db7bb38..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -//abstract interface - -#ifndef __ITRIG_FTK_CLUSTER_CONVERTER_TOOL_H__ -#define __ITRIG_FTK_CLUSTER_CONVERTER_TOOL_H__ - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/IAlgTool.h" -#include "TrkTrack/TrackCollection.h" - -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" - -#include "TrigInDetEvent/TrigInDetTrack.h" -#include "TrigInDetEvent/TrigInDetTrackCollection.h" - -#include "InDetPrepRawData/PixelClusterContainer.h" -#include "InDetPrepRawData/SCT_ClusterContainer.h" - -#include "TrkTruthData/PRD_MultiTruthCollection.h" -#include <vector> - - -class StoreGateSvc; - -class AtlasDetectorID; -class PixelID; -class Identifier; -class IdentifierHash; - -namespace InDet { - class PixelCluster; - class SCT_Cluster; -} - -class FTKHit; -class IdentifierHash; -class MultiTruth; -class PRD_MultiTruthCollection; -class McEventCollection; - -static const InterfaceID IID_ITrigFTKClusterConverterTool("ITrigFTKClusterConverterTool",1,0); - -/** @class ITrigFTKClusterConverterTool - - provides the abstract interface for FTK cluster conversion into Pixel/SCT clusters - - @author Z.Jiang, L.Tompkins <http://consult.cern.ch/xwho> -*/ - -class ITrigFTKClusterConverterTool : virtual public IAlgTool { - - public: - /** other standard AlgTool methods */ - - static const InterfaceID& interfaceID () //!< the Tool's interface - { return IID_ITrigFTKClusterConverterTool; } - - virtual InDet::SCT_Cluster* createSCT_Cluster(IdentifierHash , float , int) = 0; - virtual InDet::PixelCluster* createPixelCluster(IdentifierHash , float , float, float, float, float) = 0; - virtual InDet::PixelClusterCollection* getCollection(InDet::PixelClusterContainer*, IdentifierHash) =0; - virtual InDet::SCT_ClusterCollection* getCollection(InDet::SCT_ClusterContainer*, IdentifierHash) =0; - - virtual StatusCode getMcTruthCollections( StoreGateSvc*, const McEventCollection*, std::string, std::string, std::string ) = 0; - virtual void createSCT_Truth(Identifier, const MultiTruth& , PRD_MultiTruthCollection*, const McEventCollection*, StoreGateSvc*, std::string)=0; - virtual void createPixelTruth(Identifier, const MultiTruth& , PRD_MultiTruthCollection*, const McEventCollection*, StoreGateSvc*, std::string)=0; - -}; - -#endif diff --git a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKSectorMatchTool.h b/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKSectorMatchTool.h deleted file mode 100644 index edec7d95a04b085c034531fbf874d039f1be56ac..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKSectorMatchTool.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -//abstract interface - -#ifndef __ITRIG_FTK_SECTOR_MATCH_TOOL_H__ -#define __ITRIG_FTK_SECTOR_MATCH_TOOL_H__ - -#include "GaudiKernel/IAlgTool.h" - -#include <unordered_map> -#include <vector> - -class FTKTruthTrajectory; - -static const InterfaceID IID_ITrigFTKSectorMatchTool("ITrigFTKSectorMatchTool",1,0); - -/** @class ITrigFTKSectorMatchTool - - Interface for the matching of a truth FTK track to an FTK sector -*/ - -class ITrigFTKSectorMatchTool : virtual public IAlgTool -{ -public: - static const InterfaceID& interfaceID () //!< the Tool's interface - { return IID_ITrigFTKSectorMatchTool; } - - // Match an FTKTruthTrajectory to all possible FTK sectors, and - // fill the mapping of hit index to plane for each sector, as - // well as the region and sector IDs for each sector. - // Return true if at least one successful match could be made. - virtual bool match(const FTKTruthTrajectory &traj, - std::vector<std::unordered_map<int, int> >& sectorHitToPlaneMap, - std::vector<int>& regions, - std::vector<int>& sectors) const = 0; -}; - -#endif diff --git a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKTrackBuilderTool.h b/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKTrackBuilderTool.h deleted file mode 100644 index ac5b36fb4246835c88392cfa4165c7e2ec853b17..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKTrackBuilderTool.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -//abstract interface - -#ifndef __ITRIG_FTK_TRACK_BUILDER_TOOL_H__ -#define __ITRIG_FTK_TRACK_BUILDER_TOOL_H__ - -#include "GaudiKernel/IAlgTool.h" - -#include <memory> -#include <unordered_map> -#include <vector> - - -class FTKTrack; -class FTKTruthTrajectory; - -static const InterfaceID IID_ITrigFTKTrackBuilderTool("ITrigFTKTrackBuilderTool",1,0); - -/** @class ITrigFTKTrackBuilderTool - - Interface for FTK truth trajectory conversion into an FTK track -*/ - -class ITrigFTKTrackBuilderTool : virtual public IAlgTool -{ -public: - /** other standard AlgTool methods */ - - static const InterfaceID& interfaceID () //!< the Tool's interface - { return IID_ITrigFTKTrackBuilderTool; } - - // Create the FTK track from the truth trajectory best matching to any - // of the sectors - virtual std::unique_ptr<FTKTrack> createFTKTrack(const FTKTruthTrajectory& traj, - const std::vector<std::unordered_map<int, int> >& sectorHitToPlaneMap, - const std::vector<int>& regions, - const std::vector<int>& sectors) const = 0; -}; - -#endif diff --git a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKTrackConverter.h b/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKTrackConverter.h deleted file mode 100644 index 61b3935cf8ef80967fdeccc539031bc28a85a16c..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKTrackConverter.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -//abstract interface - -#ifndef __ITRIG_FTK_TRACK_CONVERTER_TOOL_H__ -#define __ITRIG_FTK_TRACK_CONVERTER_TOOL_H__ - -#include "GaudiKernel/IAlgTool.h" -#include "TrkTrack/TrackCollection.h" -#include "TrigInDetEvent/TrigInDetTrack.h" -#include "TrigInDetEvent/TrigInDetTrackCollection.h" -#include "InDetPrepRawData/PixelClusterContainer.h" -#include "InDetPrepRawData/SCT_ClusterContainer.h" - -#include <vector> - -class FTKTrack; - -static const InterfaceID IID_ITrigFTKTrackConverter("ITrigFTKTrackConverter",1,0); - -/** @class ITrigFTKTrackConverter - - provides the abstract interface for FTK track conversion into Trk::Track and Pixel/SCT clusters - - @author D.Emeliyanov <http://consult.cern.ch/xwho> -*/ - -class ITrigFTKTrackConverter : virtual public IAlgTool { - - public: - /** other standard AlgTool methods */ - - static const InterfaceID& interfaceID () //!< the Tool's interface - { return IID_ITrigFTKTrackConverter; } - - virtual StatusCode convert(const std::vector<FTKTrack*>&, InDet::PixelClusterContainer*, - InDet::SCT_ClusterContainer*, TrackCollection*) = 0; - virtual StatusCode convert(const TrackCollection*, TrigInDetTrackCollection*) = 0; - virtual StatusCode addSiHitInfo(const FTKTrack*, TrigInDetTrack*) = 0; -}; - -#endif diff --git a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKUncertiantyTool.h b/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKUncertiantyTool.h deleted file mode 100644 index d33f6b9e36dd649cd4e57abc71113578fcfa2df3..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigFTKToolInterfaces/TrigFTKToolInterfaces/ITrigFTKUncertiantyTool.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -//abstract interface - -#ifndef __ITRIG_FTK_UNCERTIANTY_TOOL_H__ -#define __ITRIG_FTK_UNCERTIANTY_TOOL_H__ - -#include "GaudiKernel/IAlgTool.h" - -class FTKTrack; - -// -// Name the track paramaters -// -namespace FTKTrackParam{ - enum TP { - d0 = 0, - z0 = 1, - phi = 2, - eta = 3, - Ipt = 4, - qOp = 5, - theta = 6, - pt = 7 - }; -} - -static const InterfaceID IID_ITrigFTKUncertiantyTool("ITrigFTKUncertiantyTool",1,0); - -/** @class ITrigFTKUncertiantyTool - - provides the abstract interface for FTK track uncertianty Tool - - @author John Alison John.Alison@cern.ch -*/ - -class ITrigFTKUncertiantyTool : virtual public IAlgTool { - - public: - /** other standard AlgTool methods */ - - static const InterfaceID& interfaceID () //!< the Tool's interface - { return IID_ITrigFTKUncertiantyTool; } - - virtual double getParamCovMtx (const FTKTrack* trk, int id0, int id1) = 0; - -}; - -#endif diff --git a/Trigger/TrigTools/TrigInDetRecoTools/TrigInDetRecoTools/FTK_DataProviderTool.h b/Trigger/TrigTools/TrigInDetRecoTools/TrigInDetRecoTools/FTK_DataProviderTool.h deleted file mode 100644 index 0deb33529899d3b7ba49c93e79a4a610b6dc4e84..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigInDetRecoTools/TrigInDetRecoTools/FTK_DataProviderTool.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef __FTK_DATAPROVIDERTOOL_H__ -#define __FTK_DATAPROVIDERTOOL_H__ - -#include <string> -#include <vector> - -//#include "GaudiKernel/IAlgTool.h" -#include "TrigInDetToolInterfaces/IFTK_DataProviderTool.h" - -#include "AthenaBaseComps/AthAlgTool.h" -//#include "GaudiKernel/ToolHandle.h" -//#include "GaudiKernel/ServiceHandle.h" - -#include "TrkTrack/TrackCollection.h" -//#include "TrigInDetPattRecoEvent/TrigFTK_TrackSeed.h" - -class IRoiDescriptor; -class TrigFTK_TrackSeed; - - -class FTK_DataProviderTool: public AthAlgTool, virtual public IFTK_DataProviderTool { - -public: - - FTK_DataProviderTool(const std::string&, const std::string&, const IInterface*); - virtual ~FTK_DataProviderTool(); - - virtual StatusCode initialize(); - virtual StatusCode finalize(); - - virtual StatusCode retrieveFTK_Data(TrackCollection&); - virtual StatusCode retrieveFTK_Data(const IRoiDescriptor&, TrackCollection&); - virtual StatusCode retrieveFTK_Data(const IRoiDescriptor&, std::vector<const Trk::Track*>&); - virtual StatusCode retrieveFTK_Data(std::vector<const Trk::Track*>&); - virtual StatusCode retrieveFTK_Data(const IRoiDescriptor&, std::vector<TrigFTK_TrackSeed>&); - virtual StatusCode retrieveFTK_Data(std::vector<TrigFTK_TrackSeed>&); - -private: - - std::string m_ftkTracksName; - const TrackCollection* m_ftkTrackContainer; - - StatusCode getTrackCollection(); - Trk::Track* createOutputTrack(const Trk::Track*); - -}; - - -#endif diff --git a/Trigger/TrigTools/TrigInDetRecoTools/TrigInDetRecoTools/TrigL2PattRecoStrategyF.h b/Trigger/TrigTools/TrigInDetRecoTools/TrigInDetRecoTools/TrigL2PattRecoStrategyF.h deleted file mode 100644 index 7d236674ae69dfb8f4cce34c2a791ce4dee53fa0..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigInDetRecoTools/TrigInDetRecoTools/TrigL2PattRecoStrategyF.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef __TRIG_L2_PATT_RECO_STRATEGY_F_H__ -#define __TRIG_L2_PATT_RECO_STRATEGY_F_H__ - -#include<vector> - -#include "GaudiKernel/IAlgTool.h" -#include "TrigSteeringEvent/Enums.h" -#include "TrigInDetRecoTools/ITrigL2PattRecoStrategy.h" - -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/ToolHandle.h" -#include "GaudiKernel/ServiceHandle.h" - - - -class TrigSiSpacePoint; -class IRoiDescriptor; -class TrigInDetTrackCollection; - -//class SpacePointCollection; -//class SpacePointContainer; - -class IRegSelSvc; - -class SCT_ID; -class PixelID; - -#include "TrigInDetEvent/TrigSiSpacePointCollection.h" - - -class TrigTimer; -//class IRegSelSvc; - -class TrigL2PattRecoStrategyF: public AthAlgTool, virtual public ITrigL2PattRecoStrategy { - - public: - TrigL2PattRecoStrategyF(const std::string&, const std::string&, const IInterface* ); - virtual ~TrigL2PattRecoStrategyF(); - virtual StatusCode initialize(); - virtual StatusCode finalize(); - - using ITrigL2PattRecoStrategy::findTracks; - - HLT::ErrorCode findTracks(const std::vector<const TrigSiSpacePoint*>&, - const IRoiDescriptor&, - TrigInDetTrackCollection*); - - HLT::ErrorCode findTracks(const std::vector<const TrigSiSpacePoint*>&, - TrigInDetTrackCollection*); - - inline double getTimingA() const { - return m_pattRecoTiming; - } - - private: - - ServiceHandle<IRegSelSvc> m_regionSelector; //!< region selector service - std::string m_ftkTracksName; - - double m_ptCut; - double m_chi2Cut; - - const TrigInDetTrackCollection* m_ftkTracksContainer; - - std::vector<const TrigInDetTrackCollection*> m_selectedFtkTracks; - - StatusCode getFTK_Tracks(); - StatusCode getFTK_Tracks(const std::vector<IdentifierHash>&); - - StatusCode retrieveIDC(); - TrigInDetTrack* createOutputTrack(const TrigInDetTrack*); - - const SCT_ID* m_sctId; - const PixelID* m_pixelId; - - bool m_timers; - TrigTimer* m_timer[10]; - - double m_pattRecoTiming; - -}; - - - -#endif - - - diff --git a/Trigger/TrigTools/TrigInDetRecoTools/python/ConfiguredSettings.py b/Trigger/TrigTools/TrigInDetRecoTools/python/ConfiguredSettings.py index fa785c78ce195d751897979918766b70cf4cc017..17f04c55bf337137b1903b4cdb918666f8a6516b 100644 --- a/Trigger/TrigTools/TrigInDetRecoTools/python/ConfiguredSettings.py +++ b/Trigger/TrigTools/TrigInDetRecoTools/python/ConfiguredSettings.py @@ -134,18 +134,6 @@ class SettingsForStrategyC(CommonSettings) : self.db['nHolesMax'] = nholesmax self.db['nHolesGapMax'] = nholesgapmax -class SettingsForStrategyF(CommonSettings) : - def __init__(self): - CommonSettings.__init__(self) - # strategy-specific settings defined below - chi2cut = {} - for i in self.allowedInstanceNames : - chi2cut[i] = 1000.0 - - # customize setting here: for example width['Tau'] = 20. - # extend settings database - self.db['Chi2Cut']=chi2cut - class SettingsForStrategyA(CommonSettings) : def __init__(self): CommonSettings.__init__(self) diff --git a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_Config.py b/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_Config.py index 4bd1306e717c62547f6e1fcbe206196c6f366093..38e810fc8c6beecb3e2c913ce8b0d095ba345430 100644 --- a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_Config.py +++ b/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_Config.py @@ -3,7 +3,6 @@ from TrigInDetRecoTools.ConfiguredSettings import CommonSettings from TrigInDetRecoTools.TrigInDetRecoTools_ConfigB import FactoryForStrategyB from TrigInDetRecoTools.TrigInDetRecoTools_ConfigC import FactoryForStrategyC -from TrigInDetRecoTools.TrigInDetRecoTools_ConfigF import FactoryForStrategyF from TrigInDetRecoTools.TrigInDetRecoTools_ConfigA import FactoryForStrategyA class TrigL2PattRecoStrategyFactory() : @@ -14,7 +13,6 @@ class TrigL2PattRecoStrategyFactory() : self.commonSettings = CommonSettings() self.factoryForStrB = FactoryForStrategyB() self.factoryForStrC = FactoryForStrategyC() - self.factoryForStrF = FactoryForStrategyF() self.factoryForStrA = FactoryForStrategyA() def createStrategy(self, instName, strName, roiPhi=0.1, roiEta=0.1, ptCut = 2500.0) : if strName in self.allowedStrNames : @@ -32,10 +30,6 @@ class TrigL2PattRecoStrategyFactory() : configuredStrC = self.factoryForStrC.createStrategy(instName) return configuredStrC - if strName=='F' : - configuredStrF = self.factoryForStrF.createStrategy(instName) - return configuredStrF - else : print "Instance "+instName+" of the Strategy"+strName+" is not supported !" return None diff --git a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigF.py b/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigF.py deleted file mode 100644 index ecf6ccb35de1636728721619dcd08f809bdf30ef..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigInDetRecoTools/python/TrigInDetRecoTools_ConfigF.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from TrigInDetRecoTools.TrigInDetRecoToolsConf import TrigL2PattRecoStrategyF -from TrigInDetRecoTools.ConfiguredSettings import SettingsForStrategyF - -from AthenaCommon.Logging import logging -log = logging.getLogger("FactoryForStrategyF") - -class FactoryForStrategyF() : - __slots__=[] - def __init__(self, name = 'FactoryForStrategyF') : - self.strategy = None - self.settings = SettingsForStrategyF() - - def createStrategy(self, instName) : - if instName in self.settings.allowedInstanceNames : - self.strategy = TrigL2PattRecoStrategyF("StrategyF_"+instName) - self.strategy.pTCut = self.settings[('pTmin',instName)] - self.strategy.Chi2Cut = self.settings[('Chi2Cut',instName)] - return self.strategy - else : - print "Instance "+instName+" of the Strategy F is not supported !" - return None - - - diff --git a/Trigger/TrigTools/TrigInDetRecoTools/src/FTK_DataProviderTool.cxx b/Trigger/TrigTools/TrigInDetRecoTools/src/FTK_DataProviderTool.cxx deleted file mode 100644 index 7b9d0dce27e202d646230ab9df5360feb442d43a..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigInDetRecoTools/src/FTK_DataProviderTool.cxx +++ /dev/null @@ -1,449 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include <bitset> -#include "TrigInDetRecoTools/FTK_DataProviderTool.h" -#include "TrkParameters/TrackParameters.h" -//#include "TrkParameters/Perigee.h" -//#include "TrkParameters/MeasuredPerigee.h" -#include "GeoPrimitives/GeoPrimitives.h" -#include "TrkTrack/TrackStateOnSurface.h" -#include "IRegionSelector/IRoiDescriptor.h" - - -FTK_DataProviderTool::FTK_DataProviderTool(const std::string& t, const std::string& n, const IInterface* p) : - AthAlgTool(t,n,p), - m_ftkTracksName("FTK_Trk_Tracks"), - m_ftkTrackContainer(0) -{ - - declareInterface<IFTK_DataProviderTool>( this ); - -} - - - -FTK_DataProviderTool::~FTK_DataProviderTool() -{ - -} - - - -StatusCode FTK_DataProviderTool::initialize() -{ - - StatusCode sc = AthAlgTool::initialize(); - MsgStream athenaLog(msgSvc(), name()); - - athenaLog << MSG::INFO << "FTK_DataProviderTool initialized" << endmsg; - - return sc; - -} - - - -StatusCode FTK_DataProviderTool::finalize() -{ - - StatusCode sc = AthAlgTool::finalize(); - - return sc; - -} - - -StatusCode FTK_DataProviderTool::retrieveFTK_Data(TrackCollection& trackCollection) -{ - - StatusCode sc(StatusCode::SUCCESS); - - MsgStream athenaLog(msgSvc(), name()); - int outputLevel = msgSvc()->outputLevel( name() ); - - if (outputLevel <= MSG::INFO) { - athenaLog << MSG::INFO << "FTK_DataProviderTool called in full-scan mode to retrieve FTK TrackCollection from StoreGate and return TrackCollection" << endmsg; - } - - sc = getTrackCollection(); - - if (sc.isFailure()) { - athenaLog << MSG::ERROR << "Failed to retrieve FTK TrackCollection" << endmsg; - return sc; - } - - trackCollection.clear(); - - TrackCollection::const_iterator trkItEnd = m_ftkTrackContainer->end(); - for (TrackCollection::const_iterator trkIt = m_ftkTrackContainer->begin(); trkIt != trkItEnd; ++trkIt) { - - const Trk::Track* inTrkTrack = (*trkIt); - if (!inTrkTrack) continue; - - Trk::Track* outTrkTrack = createOutputTrack(inTrkTrack); - if (!outTrkTrack) continue; - - trackCollection.push_back(outTrkTrack); - - } - - if (outputLevel <= MSG::INFO) { - athenaLog << MSG::INFO << "Number of retrieved tracks : " << trackCollection.size() << " (out of " << m_ftkTrackContainer->size() << ")" << endmsg; - } - - return sc; - -} - - -StatusCode FTK_DataProviderTool::retrieveFTK_Data(const IRoiDescriptor& roi, TrackCollection& trackCollection) -{ - - StatusCode sc(StatusCode::SUCCESS); - - MsgStream athenaLog(msgSvc(), name()); - int outputLevel = msgSvc()->outputLevel( name() ); - - if (outputLevel <= MSG::INFO) { - athenaLog << MSG::INFO << "FTK_DataProviderTool called in RoI-based mode to retrieve FTK TrackCollection from StoreGate and return TrackCollection" << endmsg; - } - - sc = getTrackCollection(); - - if(sc.isFailure()) { - athenaLog << MSG::ERROR << "Failed to retrieve FTK Tracks" << endmsg; - return sc; - } - - double roiPhiMin = roi.phiMinus(); - double roiPhiMax = roi.phiPlus(); - double roiEtaMin = roi.etaMinus(); - double roiEtaMax = roi.etaPlus(); - - trackCollection.clear(); - - TrackCollection::const_iterator trkItEnd = m_ftkTrackContainer->end(); - for (TrackCollection::const_iterator trkIt = m_ftkTrackContainer->begin(); trkIt != trkItEnd; ++trkIt) { - - const Trk::Track* inTrkTrack = (*trkIt); - if (!inTrkTrack) continue; - - const Trk::Perigee* perigee = inTrkTrack->perigeeParameters(); - if (!perigee) continue; - - double pEta = perigee->eta(); - double pPhi = perigee->parameters()[Trk::phi0]; - - if (pEta<roiEtaMin || pEta>roiEtaMax || pPhi<roiPhiMin || pPhi>roiPhiMax) continue; - - Trk::Track* outTrkTrack = createOutputTrack(inTrkTrack); - if (!outTrkTrack) continue; - - trackCollection.push_back(outTrkTrack); - - } - - athenaLog << MSG::INFO << "Number of retrieved tracks : " << trackCollection.size() << " (out of " << m_ftkTrackContainer->size() << ")" << endmsg; - - return sc; - -} - - -StatusCode FTK_DataProviderTool::retrieveFTK_Data(std::vector<const Trk::Track*>& vtrack) -{ - - StatusCode sc(StatusCode::SUCCESS); - - MsgStream athenaLog(msgSvc(), name()); - int outputLevel = msgSvc()->outputLevel( name() ); - - if (outputLevel <= MSG::INFO) { - athenaLog << MSG::INFO << "FTK_DataProviderTool called in full-scan mode to retrieve FTK TrackCollection from StoreGate and return std::vector<const Trk:Track*>" << endmsg; - } - - sc = getTrackCollection(); - - if (sc.isFailure()) { - athenaLog << MSG::ERROR << "Failed to retrieve FTK Tracks" << endmsg; - return sc; - } - - vtrack.clear(); - vtrack.reserve(m_ftkTrackContainer->size()); - - TrackCollection::const_iterator trkItEnd = m_ftkTrackContainer->end(); - for (TrackCollection::const_iterator trkIt = m_ftkTrackContainer->begin(); trkIt != trkItEnd; ++trkIt) { - - const Trk::Track* inTrkTrack = (*trkIt); - if (!inTrkTrack) continue; - - Trk::Track* outTrkTrack = createOutputTrack(inTrkTrack); - if (!outTrkTrack) continue; - - vtrack.push_back(outTrkTrack); - - } - - if (vtrack.size() != m_ftkTrackContainer->size()) { - athenaLog << MSG::WARNING << "Only " << vtrack.size() << " tracks out of " << m_ftkTrackContainer->size() << " successfully retrieved!" << endmsg; - } - - return sc; - -} - - -StatusCode FTK_DataProviderTool::retrieveFTK_Data(const IRoiDescriptor& roi, std::vector<const Trk::Track*>& vtrack) -{ - - StatusCode sc(StatusCode::SUCCESS); - - MsgStream athenaLog(msgSvc(), name()); - int outputLevel = msgSvc()->outputLevel( name() ); - - if (outputLevel <= MSG::INFO) { - athenaLog << MSG::INFO << "FTK_DataProviderTool called in RoI-based mode to retrieve FTK TrackCollection from StoreGate and return std::vector<const Trk::Track*>" << endmsg; - } - - sc = getTrackCollection(); - - if(sc.isFailure()) { - athenaLog << MSG::ERROR << "Failed to retrieve FTK Tracks" << endmsg; - return sc; - } - - double roiPhiMin = roi.phiMinus(); - double roiPhiMax = roi.phiPlus(); - double roiEtaMin = roi.etaMinus(); - double roiEtaMax = roi.etaPlus(); - - vtrack.clear(); - - TrackCollection::const_iterator trkItEnd = m_ftkTrackContainer->end(); - for (TrackCollection::const_iterator trkIt = m_ftkTrackContainer->begin(); trkIt != trkItEnd; ++trkIt) { - - const Trk::Track* inTrkTrack = (*trkIt); - if (!inTrkTrack) continue; - - const Trk::Perigee* perigee = inTrkTrack->perigeeParameters(); - if (!perigee) continue; - - double pEta = perigee->eta(); - double pPhi = perigee->parameters()[Trk::phi0]; - - if (pEta<roiEtaMin || pEta>roiEtaMax || pPhi<roiPhiMin || pPhi>roiPhiMax) continue; - - Trk::Track* outTrkTrack = createOutputTrack(inTrkTrack); - if (!outTrkTrack) continue; - - vtrack.push_back(outTrkTrack); - - } - - return sc; - -} - - -StatusCode FTK_DataProviderTool::retrieveFTK_Data(std::vector<TrigFTK_TrackSeed>& vtrackseed) -{ - - StatusCode sc(StatusCode::SUCCESS); - - MsgStream athenaLog(msgSvc(), name()); - int outputLevel = msgSvc()->outputLevel( name() ); - - if (outputLevel <= MSG::INFO) { - athenaLog << MSG::INFO << "FTK_DataProviderTool called in full-scan mode to retrieve FTK TrackCollection from StoreGate and return std::vector<TrigFTK_TrackSeed>" << endmsg; - } - - sc = getTrackCollection(); - - if(sc.isFailure()) { - athenaLog << MSG::ERROR << "Failed to retrieve FTK Tracks" << endmsg; - return sc; - } - - vtrackseed.clear(); - vtrackseed.reserve(m_ftkTrackContainer->size()); - - TrackCollection::const_iterator trkItEnd = m_ftkTrackContainer->end(); - for (TrackCollection::const_iterator trkIt = m_ftkTrackContainer->begin(); trkIt != trkItEnd; ++trkIt) { - - const Trk::Track* inTrkTrack = (*trkIt); - if (!inTrkTrack) continue; - - TrigFTK_TrackSeed trackseed; - - const Trk::Perigee* perigee = inTrkTrack->perigeeParameters(); - if (!perigee) continue; - - //const Trk::MeasuredPerigee* mp = dynamic_cast<const Trk::MeasuredPerigee*>(perigee); - //if (!mp) continue; - - //trackseed.InitMeasuredPerigee(mp); - trackseed.InitMeasuredPerigee(perigee); - - const DataVector<const Trk::TrackStateOnSurface>* DVtsos = inTrkTrack->trackStateOnSurfaces(); - - if (DVtsos!=0) { - - DataVector<const Trk::TrackStateOnSurface>::const_iterator tsosItEnd = DVtsos->end(); - for (DataVector<const Trk::TrackStateOnSurface>::const_iterator tsosIt = DVtsos->begin(); tsosIt != tsosItEnd; ++tsosIt) { - - const Trk::TrackStateOnSurface* tsos = (*tsosIt); - if (tsos==0) continue; - - if (tsos->type(Trk::TrackStateOnSurface::Measurement)) { - - //const Trk::GlobalPosition* pGP = tsos->surface().localToGlobal(tsos->trackParameters()->localPosition()); - const Amg::Vector3D* pGP = tsos->surface().localToGlobal(tsos->trackParameters()->localPosition()); - if (!pGP) continue; - - trackseed.AddGlobalPosition(*pGP); - - delete pGP; - - } - - } - - } - - vtrackseed.push_back(trackseed); - - } - - return sc; - -} - - -StatusCode FTK_DataProviderTool::retrieveFTK_Data(const IRoiDescriptor& roi, std::vector<TrigFTK_TrackSeed>& vtrackseed) -{ - - StatusCode sc(StatusCode::SUCCESS); - - MsgStream athenaLog(msgSvc(), name()); - int outputLevel = msgSvc()->outputLevel( name() ); - - if (outputLevel <= MSG::INFO) { - athenaLog << MSG::INFO << "FTK_DataProviderTool called in RoI-based mode to retrieve FTK TrackCollection from StoreGate and return std::vector<TrigFTK_TrackSeed>" << endmsg; - } - - sc = getTrackCollection(); - - if(sc.isFailure()) { - athenaLog << MSG::ERROR << "Failed to retrieve FTK Tracks" << endmsg; - return sc; - } - - double roiPhiMin = roi.phiMinus(); - double roiPhiMax = roi.phiPlus(); - double roiEtaMin = roi.etaMinus(); - double roiEtaMax = roi.etaPlus(); - - vtrackseed.clear(); - - TrackCollection::const_iterator trkItEnd = m_ftkTrackContainer->end(); - for (TrackCollection::const_iterator trkIt = m_ftkTrackContainer->begin(); trkIt != trkItEnd; ++trkIt) { - - const Trk::Track* inTrkTrack = (*trkIt); - if (!inTrkTrack) continue; - - const Trk::Perigee* perigee = inTrkTrack->perigeeParameters(); - if (!perigee) continue; - - double pEta = perigee->eta(); - double pPhi = perigee->parameters()[Trk::phi0]; - - if (pEta<roiEtaMin || pEta>roiEtaMax || pPhi<roiPhiMin || pPhi>roiPhiMax) continue; - - TrigFTK_TrackSeed trackseed; - - //const Trk::MeasuredPerigee* mp = dynamic_cast<const Trk::MeasuredPerigee*>(perigee); - //if (!mp) continue; - - //trackseed.InitMeasuredPerigee(mp); - trackseed.InitMeasuredPerigee(perigee); - - const DataVector<const Trk::TrackStateOnSurface>* DVtsos = inTrkTrack->trackStateOnSurfaces(); - - if (DVtsos!=0) { - - DataVector<const Trk::TrackStateOnSurface>::const_iterator tsosItEnd = DVtsos->end(); - for (DataVector<const Trk::TrackStateOnSurface>::const_iterator tsosIt = DVtsos->begin(); tsosIt != tsosItEnd; ++tsosIt) { - - const Trk::TrackStateOnSurface* tsos = (*tsosIt); - if (tsos==0) continue; - - if (tsos->type(Trk::TrackStateOnSurface::Measurement)) { - - //const Trk::GlobalPosition* pGP = tsos->surface().localToGlobal(tsos->trackParameters()->localPosition()); - const Amg::Vector3D* pGP = tsos->surface().localToGlobal(tsos->trackParameters()->localPosition()); - if (!pGP) continue; - - trackseed.AddGlobalPosition(*pGP); - - delete pGP; - - } - - } - - } - - vtrackseed.push_back(trackseed); - - } - - return sc; - -} - - -StatusCode FTK_DataProviderTool::getTrackCollection() -{ - // Set member pointer 'm_ftkTrackContainer' to point to - // the FTK TrackCollection from StoreGate - - StatusCode sc(StatusCode::SUCCESS); - - MsgStream athenaLog(msgSvc(), name()); - - m_ftkTrackContainer = nullptr; - - if (!evtStore()->transientContains<TrackCollection>(m_ftkTracksName)) { - athenaLog << MSG::WARNING << " FTK tracks " << m_ftkTracksName << " not found in StoreGate !" << endmsg; - return sc; - } - else { - sc = evtStore()->retrieve(m_ftkTrackContainer, m_ftkTracksName); - if (sc.isFailure()) { - athenaLog << MSG::ERROR << "Failed to get FTK Tracks Container" << endmsg; - return sc; - } - } - - if (!m_ftkTrackContainer) sc = StatusCode::FAILURE; - - return sc; - -} - - -Trk::Track* FTK_DataProviderTool::createOutputTrack(const Trk::Track* inTrack) -{ - - // Return a copy of 'inTrack' - - Trk::Track* outTrack = nullptr; - - if (inTrack) outTrack = new Trk::Track(*inTrack); - - return outTrack; - -} diff --git a/Trigger/TrigTools/TrigInDetRecoTools/src/TrigL2PattRecoStrategyF.cxx b/Trigger/TrigTools/TrigInDetRecoTools/src/TrigL2PattRecoStrategyF.cxx deleted file mode 100644 index 73e0019649a3167af00a64444a8b6de6b15b8f9d..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigInDetRecoTools/src/TrigL2PattRecoStrategyF.cxx +++ /dev/null @@ -1,341 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -//////////////////////////////////////////////////////////////////////////////// -// TrigL2PattRecoStrategyF -// ------------------------------- -// ATLAS Collaboration -// -// 16.01.2011 Package created -// -// Author: Dmitry Emeliyanov, RAL -// e-mail: Dmitry.Emeliyanov@cern.ch -// -// implements a track-reading strategy that retrieves and -// selects FTK tracks -// -//////////////////////////////////////////////////////////////////////////////// - -#include <cmath> -#include <iostream> -#include <list> - -#include "TrigInDetEvent/TrigInDetTrack.h" -#include "TrigInDetEvent/TrigInDetTrackCollection.h" - -#include "TrigInDetRecoTools/ITrigL2PattRecoStrategy.h" - -#include "IRegionSelector/IRoiDescriptor.h" - -#include "SiSpacePoint/SCT_SpacePoint.h" -#include "SiSpacePoint/PixelSpacePoint.h" -#include "InDetIdentifier/PixelID.h" -#include "InDetIdentifier/SCT_ID.h" -#include "InDetPrepRawData/SiClusterContainer.h" -#include "InDetPrepRawData/PixelClusterCollection.h" -#include "InDetPrepRawData/SCT_ClusterCollection.h" -//#include "DataModel/tools/IdentContIndex.h" - -#include "TrigTimeAlgs/TrigTimerSvc.h" - -#include "IRegionSelector/IRegSelSvc.h" - -#include "TrigInDetRecoTools/TrigL2PattRecoStrategyF.h" -//#include "TrigInDetRecoTools/TrigL2DataConversionUtils.h" - -TrigL2PattRecoStrategyF::TrigL2PattRecoStrategyF(const std::string& t, - const std::string& n, - const IInterface* p ): - AthAlgTool(t,n,p), - - m_regionSelector("RegSelSvc", n), - m_ftkTracksName ("FTK_LVL2_Tracks"), - m_ptCut (1.0), - m_chi2Cut(1000.0) -{ - declareInterface< ITrigL2PattRecoStrategy >( this ); - - declareProperty("FTK_Tracks_Location" ,m_ftkTracksName ); - declareProperty("pTCut" ,m_ptCut ); - declareProperty("Chi2Cut" ,m_chi2Cut ); -} - -StatusCode TrigL2PattRecoStrategyF::initialize() -{ - StatusCode sc = AthAlgTool::initialize(); - MsgStream athenaLog(msgSvc(), name()); - - sc = m_regionSelector.retrieve(); - if ( sc.isFailure() ) { - athenaLog << MSG::FATAL<< "Unable to retrieve RegionSelector tool "<< m_regionSelector.type() << endmsg; - return sc; - } - - // Get SCT & pixel Identifier helpers - - if (detStore()->retrieve(m_pixelId, "PixelID").isFailure()) { - athenaLog << MSG::FATAL << "Could not get Pixel ID helper" << endmsg; - return StatusCode::FAILURE; - } - - if (detStore()->retrieve(m_sctId, "SCT_ID").isFailure()) { - athenaLog << MSG::FATAL << "Could not get SCT ID helper" << endmsg; - return StatusCode::FAILURE; - } - - ITrigTimerSvc* timerSvc; - StatusCode scTime = service( "TrigTimerSvc", timerSvc); - if( scTime.isFailure() ) { - athenaLog << MSG::INFO<< "Unable to locate Service TrigTimerSvc " << endmsg; - m_timers = false; - } - else{ - m_timers = true; - } - if ( m_timers ) { - m_timer[0] = timerSvc->addItem("StrF_PattReco"); - - } - - athenaLog << MSG::INFO << "TrigL2PattRecoStrategyF initialized "<< endmsg; - return sc; -} - -StatusCode TrigL2PattRecoStrategyF::finalize() { - - StatusCode sc = AthAlgTool::finalize(); - return sc; -} - -TrigL2PattRecoStrategyF::~TrigL2PattRecoStrategyF() { - -} - -HLT::ErrorCode TrigL2PattRecoStrategyF::findTracks(const std::vector<const TrigSiSpacePoint*>& /*vsp*/, - const IRoiDescriptor& roi, - TrigInDetTrackCollection* trackColl) { - - m_pattRecoTiming=0.0; - HLT::ErrorCode rc=HLT::OK; - - m_zVertices.clear(); - - MsgStream athenaLog(msgSvc(), name()); - int outputLevel = msgSvc()->outputLevel( name() ); - - if (outputLevel <= MSG::DEBUG) - athenaLog<< MSG::DEBUG<<"TrigL2PattRecoStrategyF called in RoI-based mode "<<endmsg; - - std::vector<IdentifierHash> listOfFTKIds; - - - - double roiPhiMin = roi.phiMinus(); - double roiPhiMax = roi.phiPlus(); - double roiEtaMin = roi.etaMinus(); - double roiEtaMax = roi.etaPlus(); - - // m_regionSelector->DetHashIDList(FTK, listOfFTKIds ); - - - StatusCode sc=getFTK_Tracks(listOfFTKIds); - - if(sc.isFailure()) { - if (outputLevel <= MSG::DEBUG) - athenaLog<< MSG::DEBUG<<"Failed to retrieve FTK Tracks "<<endmsg; - return rc;// job can continue but the trackColl will be empty - } - - if(m_timers) m_timer[0]->start(); - - for(std::vector<const TrigInDetTrackCollection*>::iterator collIt = m_selectedFtkTracks.begin(); - collIt != m_selectedFtkTracks.end(); ++collIt) { - const TrigInDetTrackCollection* pColl = (*collIt); - if(pColl==NULL) continue; - - if (outputLevel <= MSG::DEBUG) - athenaLog<< MSG::DEBUG<<"FTK collection size="<<pColl->size()<<endmsg; - - for(TrigInDetTrackCollection::const_iterator trIt = pColl->begin(); trIt!=pColl->end();++trIt) { - const TrigInDetTrack* pTrack = (*trIt); - if(pTrack==NULL) continue; - - if(pTrack->chi2()> m_chi2Cut) continue; - const TrigInDetTrackFitPar* pPar = pTrack->param(); - - if(pPar==NULL) continue; - // if(fabs(pPar->pT())<m_ptCut) continue; - - if((pPar->eta()<roiEtaMin) || (pPar->eta()>roiEtaMax)) continue; - - if(roiPhiMin<roiPhiMax) { // pi-boundary check - if((pPar->phi0()<roiPhiMin) || (pPar->phi0() > roiPhiMax)) continue; - } - else { - if((pPar->phi0()<roiPhiMax) && (pPar->phi0() > roiPhiMin)) continue; - } - - TrigInDetTrack* p = createOutputTrack(pTrack); - if(p==NULL) continue; - - trackColl->push_back(p); - /* - std::cout<<"Selected FTK track: d0="<<pPar->a0()<<" z0="<<pPar->z0()<<" phi0="<<pPar->phi0()<<" eta="<<pPar->eta() - <<" pT="<<pPar->pT()<<std::endl; - */ - } - } - - /* - for (size_t i=0; i<foundTracks->size() ; i++){ - TrigInDetTrack* p = convertOutputTracks(foundTracks->at(i)); - if(p!=NULL) { - trackColl->push_back(p); - } - } - */ - - if(m_timers) { - m_timer[0]->stop(); - m_pattRecoTiming=m_timer[0]->elapsed(); - } - - return rc; -} - - -HLT::ErrorCode TrigL2PattRecoStrategyF::findTracks(const std::vector<const TrigSiSpacePoint*>& //vsp - , - TrigInDetTrackCollection* trackColl) { - - m_pattRecoTiming=0.0; - m_zVertices.clear(); - - MsgStream athenaLog(msgSvc(), name()); - int outputLevel = msgSvc()->outputLevel( name() ); - - HLT::ErrorCode rc=HLT::OK; - if (outputLevel <= MSG::DEBUG) - athenaLog<< MSG::DEBUG<<"TrigL2PattRecoStrategyF called in full-scan mode "<<endmsg; - - StatusCode sc=getFTK_Tracks(); - - if(sc.isFailure()) { - if (outputLevel <= MSG::DEBUG) - athenaLog<< MSG::DEBUG<<"Failed to retrieve FTK Tracks "<<endmsg; - return rc;// job can continue but the trackColl will be empty - } - - if(m_timers) m_timer[0]->start(); - - for(std::vector<const TrigInDetTrackCollection*>::iterator collIt = m_selectedFtkTracks.begin(); - collIt != m_selectedFtkTracks.end(); ++collIt) { - const TrigInDetTrackCollection* pColl = (*collIt); - if(pColl==NULL) continue; - - if (outputLevel <= MSG::DEBUG) - athenaLog<< MSG::DEBUG<<"FTK collection size="<<pColl->size()<<endmsg; - - for(TrigInDetTrackCollection::const_iterator trIt = pColl->begin(); trIt!=pColl->end();++trIt) { - const TrigInDetTrack* pTrack = (*trIt); - if(pTrack==NULL) continue; - - if(pTrack->chi2()> m_chi2Cut) continue; - const TrigInDetTrackFitPar* pPar = pTrack->param(); - - if(pPar==NULL) continue; - // if(fabs(pPar->pT())<m_ptCut) continue; - - TrigInDetTrack* p = createOutputTrack(pTrack); - if(p==NULL) continue; - - trackColl->push_back(p); - /* - std::cout<<"Selected FTK track: d0="<<pPar->a0()<<" z0="<<pPar->z0()<<" phi0="<<pPar->phi0()<<" eta="<<pPar->eta() - <<" pT="<<pPar->pT()<<std::endl; - */ - } - } - - if(m_timers) { - m_timer[0]->stop(); - m_pattRecoTiming=m_timer[0]->elapsed(); - } - - return rc; -} - - -StatusCode TrigL2PattRecoStrategyF::getFTK_Tracks(const std::vector<IdentifierHash>& //ftkIds - ) { - - StatusCode sc = retrieveIDC(); - - if(sc.isFailure()) return sc; - - // TO-DO select only collections with given IDs ... - - m_selectedFtkTracks.clear(); - m_selectedFtkTracks.push_back(m_ftkTracksContainer); - - return sc; -} - -StatusCode TrigL2PattRecoStrategyF::getFTK_Tracks() { - - StatusCode sc = retrieveIDC(); - if(sc.isFailure()) return sc; - - m_selectedFtkTracks.clear(); - m_selectedFtkTracks.push_back(m_ftkTracksContainer);// adding all tracks - - return sc; -} - -StatusCode TrigL2PattRecoStrategyF::retrieveIDC() { - - MsgStream athenaLog(msgSvc(), name()); - StatusCode sc(StatusCode::SUCCESS); - - m_ftkTracksContainer = NULL; - - int outputLevel = msgSvc()->outputLevel( name() ); - - if( !evtStore()->transientContains<TrigInDetTrackCollection>(m_ftkTracksName)){ - if (outputLevel <= MSG::DEBUG) - athenaLog<< MSG::DEBUG<< " FTK tracks " << m_ftkTracksName << " not found in StoreGate !" << endmsg; - return sc; - } - else { - sc = evtStore()->retrieve(m_ftkTracksContainer, m_ftkTracksName); - if (sc.isFailure()) { - athenaLog << MSG::ERROR << "Failed to get FTK Tracks Container" << endmsg; - return sc; - } - } - return sc; -} - -TrigInDetTrack* TrigL2PattRecoStrategyF::createOutputTrack(const TrigInDetTrack* oldTrack) { - - TrigInDetTrack* pTrack = NULL; - const TrigInDetTrackFitPar* pPar = oldTrack->param(); - - double D0 = pPar->a0(); - double Z0 = pPar->z0(); - double Phi0 = pPar->phi0(); - double Eta = pPar->eta(); - if(Phi0>M_PI) Phi0-=2*M_PI; - if(Phi0<-M_PI) Phi0+=2*M_PI; - double Pt=pPar->pT(); - - const TrigInDetTrackFitPar* tidtfp = new TrigInDetTrackFitPar(D0,Phi0,Z0,Eta,Pt,NULL); - std::vector<const TrigSiSpacePoint*>* pvsp = new std::vector<const TrigSiSpacePoint*>; - pvsp->clear(); - pTrack = new TrigInDetTrack(pvsp,tidtfp); - pTrack->algorithmId(TrigInDetTrack::STRATEGY_F_ID); - pTrack->chi2(oldTrack->chi2()); - - return pTrack; -} diff --git a/Trigger/TrigTools/TrigInDetRecoTools/src/components/TrigInDetRecoTools_entries.cxx b/Trigger/TrigTools/TrigInDetRecoTools/src/components/TrigInDetRecoTools_entries.cxx index d9b524092b76dbaf1630e11c8b7eb49f014452de..aabeab08a9c093ce9a657f15ba8e3011e26d9c1d 100644 --- a/Trigger/TrigTools/TrigInDetRecoTools/src/components/TrigInDetRecoTools_entries.cxx +++ b/Trigger/TrigTools/TrigInDetRecoTools/src/components/TrigInDetRecoTools_entries.cxx @@ -2,21 +2,17 @@ #include "TrigInDetRecoTools/TrigL2PattRecoStrategyA.h" #include "TrigInDetRecoTools/TrigL2PattRecoStrategyB.h" #include "TrigInDetRecoTools/TrigL2PattRecoStrategyC.h" -#include "TrigInDetRecoTools/TrigL2PattRecoStrategyF.h" #include "TrigInDetRecoTools/TrigL2PattRecoStrategyT.h" #include "TrigInDetRecoTools/TrigL2DupTrackRemovalTool.h" #include "TrigInDetRecoTools/TrigInDetRoadMakerTool.h" -#include "TrigInDetRecoTools/FTK_DataProviderTool.h" #include "../TrigL2LayerSetPredictorTool.h" DECLARE_COMPONENT( TrigL2PattRecoStrategyA ) DECLARE_COMPONENT( TrigL2PattRecoStrategyB ) DECLARE_COMPONENT( TrigL2PattRecoStrategyC ) -DECLARE_COMPONENT( TrigL2PattRecoStrategyF ) DECLARE_COMPONENT( TrigL2PattRecoStrategyT ) DECLARE_COMPONENT( TrigL2DupTrackRemovalTool ) DECLARE_COMPONENT( TrigInDetRoadMakerTool ) -DECLARE_COMPONENT( FTK_DataProviderTool ) DECLARE_COMPONENT( TrigL2LayerSetPredictorTool ) diff --git a/Trigger/TrigTools/TrigInDetToolInterfaces/TrigInDetToolInterfaces/IFTK_DataProviderTool.h b/Trigger/TrigTools/TrigInDetToolInterfaces/TrigInDetToolInterfaces/IFTK_DataProviderTool.h deleted file mode 100644 index 475d1152838e9e598906bb3ebdb5780c3c3e99b1..0000000000000000000000000000000000000000 --- a/Trigger/TrigTools/TrigInDetToolInterfaces/TrigInDetToolInterfaces/IFTK_DataProviderTool.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef __IFTK_DATAPROVIDERTOOL_H__ -#define __IFTK_DATAPROVIDERTOOL_H__ - -#include "GaudiKernel/IAlgTool.h" -#include "TrkTrack/TrackCollection.h" -#include "TrigInDetPattRecoEvent/TrigFTK_TrackSeed.h" -#include "IRegionSelector/IRoiDescriptor.h" -#include <vector> - -static const InterfaceID IID_IFTK_DataProviderTool("IFTK_DataProviderTool",1,0); - -class IFTK_DataProviderTool : virtual public IAlgTool { - public: - /** other standard AlgTool methods */ - - static const InterfaceID& interfaceID () { //!< the Tool's interface - return IID_IFTK_DataProviderTool; - } - - /** virtual functions here */ - virtual StatusCode retrieveFTK_Data(TrackCollection&) = 0; - virtual StatusCode retrieveFTK_Data(const IRoiDescriptor&, TrackCollection&) = 0; - virtual StatusCode retrieveFTK_Data(const IRoiDescriptor&, std::vector<const Trk::Track*>&) = 0; - virtual StatusCode retrieveFTK_Data(std::vector<const Trk::Track*>&) = 0; - virtual StatusCode retrieveFTK_Data(const IRoiDescriptor&, std::vector<TrigFTK_TrackSeed>&) = 0; - virtual StatusCode retrieveFTK_Data(std::vector<TrigFTK_TrackSeed>&) = 0; - -}; - -#endif