diff --git a/.github/workflows/key4hep.yml b/.github/workflows/key4hep.yml new file mode 100644 index 0000000..bb4e45b --- /dev/null +++ b/.github/workflows/key4hep.yml @@ -0,0 +1,31 @@ +name: keyh4ep +on: [push, pull_request] + +jobs: + build-and-test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - uses: cvmfs-contrib/github-action-cvmfs@v3 + - uses: aidasoft/run-lcg-view@v4 + with: + container: centos7 + view-path: /cvmfs/sw-nightlies.hsf.org/key4hep + run: | + mkdir build + cd build + echo "::group::Run CMake" + cmake -GNinja \ + -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_INSTALL_PREFIX=../install \ + .. + echo "::endgroup::" && echo "::group::Build" + ninja -k0 + echo "::endgroup::" && echo "::group::Run Tests" + ctest --output-on-failure + echo "::endgroup::" && echo "::group::Install" + ninja install diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b54322..7d8c667 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,8 @@ PROJECT( MarlinTrkProcessors ) # project version SET( ${PROJECT_NAME}_VERSION_MAJOR 2 ) -SET( ${PROJECT_NAME}_VERSION_MINOR 14 ) -SET( ${PROJECT_NAME}_VERSION_PATCH 0 ) +SET( ${PROJECT_NAME}_VERSION_MINOR 15 ) +SET( ${PROJECT_NAME}_VERSION_PATCH 1 ) cmake_policy(SET CMP0008 NEW) @@ -75,7 +75,7 @@ if(DD4HEP_USE_XERCESC) find_package(XercesC) endif() include(DD4hep_XML_setup) -INCLUDE_DIRECTORIES( SYSTEM ${DD4hep_INCLUDE_DIRS} ) +INCLUDE_DIRECTORIES( BEFORE SYSTEM ${DD4hep_INCLUDE_DIRS} ) LINK_LIBRARIES( ${DD4hep_LIBRARIES} ${DD4hep_COMPONENT_LIBRARIES} ) #FIND_PACKAGE( ROOT REQUIRED ) diff --git a/doc/ReleaseNotes.md b/doc/ReleaseNotes.md index f3a6457..3b7b78f 100644 --- a/doc/ReleaseNotes.md +++ b/doc/ReleaseNotes.md @@ -1,3 +1,18 @@ +# v02-12-04 + +* 2023-06-12 tmadlener ([PR#66](https://github.com/iLCSoft/MarlinTrkProcessors/pull/66)) + - Switch from `dd4hep::long64` to the more appropriate `dd4hep::CellID` after [AIDASoft/DD4hep#1125](https://github.com/AIDASoft/DD4hep/pull/1125) + - Update CI + - Switch to latest versions of github actions + - Remove gcc8 based workflows + - Add key4hep based workflow + - Remove unused and deprecated usage of `std::binary_function` + +# v02-12-03 + +* 2022-12-02 Thomas Madlener ([PR#64](https://github.com/iLCSoft/MarlinTrkProcessors/pull/64)) + - Remove the obsolote gcc8 based workflow and update github actions to the latest versions + # v02-12-02 * 2022-11-23 Thomas Madlener ([PR#62](https://github.com/iLCSoft/MarlinTrkProcessors/pull/62)) diff --git a/source/Refitting/include/ExtrToTracker.h b/source/Refitting/include/ExtrToTracker.h index 439c8b5..c35a3bd 100644 --- a/source/Refitting/include/ExtrToTracker.h +++ b/source/Refitting/include/ExtrToTracker.h @@ -110,7 +110,7 @@ class ExtrToTracker : public marlin::Processor { TrackerHitPlane* getSiHit(std::vector& hitsOnDetEl, MarlinTrk::IMarlinTrack*& marlin_trk); - TrackerHitPlane* getSiHit(std::vector& vecElID, std::map >& mapElHits, MarlinTrk::IMarlinTrack*& marlin_trk); + TrackerHitPlane* getSiHit(std::vector& vecElID, std::map >& mapElHits, MarlinTrk::IMarlinTrack*& marlin_trk); /* void getNeighbours(int elID, std::vector& vecIDs, std::string cellIDEcoding, std::map mapLayerNModules); */ @@ -192,7 +192,7 @@ class ExtrToTracker : public marlin::Processor { std::vector _vecSubdetNLayers; std::vector _vecSubdetID; std::vector _vecDigiHitsCol; - std::vector >* > _vecMapNeighbours; + std::vector >* > _vecMapNeighbours; std::vector > > _vecMapsElHits; diff --git a/source/Refitting/include/fpcompare.h b/source/Refitting/include/fpcompare.h index 6b1ca8f..66721c2 100644 --- a/source/Refitting/include/fpcompare.h +++ b/source/Refitting/include/fpcompare.h @@ -2,8 +2,6 @@ // $Id$ #include -#include - #ifndef CXXUTILS_FPCOMPARE_H #define CXXUTILS_FPCOMPARE_H @@ -123,101 +121,6 @@ bool less_equal (float a, float b) } // namespace fpcompare - -namespace fpcompare_fn { - - -struct equal - : public std::binary_function -{ - bool - operator()(double a, double b) const - { return fpcompare::equal (a, b); } -}; - - -struct equalf - : public std::binary_function -{ - bool - operator()(float a, float b) const - { return fpcompare::equal (a, b); } -}; - - -struct greater - : public std::binary_function -{ - bool - operator()(double a, double b) const - { return fpcompare::greater (a, b); } -}; - - -struct greaterf - : public std::binary_function -{ - bool - operator()(float a, float b) const - { return fpcompare::greater (a, b); } -}; - - -struct less - : public std::binary_function -{ - bool - operator()(double a, double b) const - { return fpcompare::less (a, b); } -}; - - -struct lessf - : public std::binary_function -{ - bool - operator()(float a, float b) const - { return fpcompare::less (a, b); } -}; - - -struct greater_equal - : public std::binary_function -{ - bool - operator()(double a, double b) const - { return fpcompare::greater_equal (a, b); } -}; - - -struct greater_equalf - : public std::binary_function -{ - bool - operator()(float a, float b) const - { return fpcompare::greater_equal (a, b); } -}; - - -struct less_equal - : public std::binary_function -{ - bool - operator()(double a, double b) const - { return fpcompare::less_equal (a, b); } -}; - - -struct less_equalf - : public std::binary_function -{ - bool - operator()(float a, float b) const - { return fpcompare::less_equal (a, b); } -}; - - -} // namespace fpcompare_fn } // namespace CxxUtils diff --git a/source/Refitting/src/ExtrToTracker.cc b/source/Refitting/src/ExtrToTracker.cc index 7c58e99..d8e9d90 100644 --- a/source/Refitting/src/ExtrToTracker.cc +++ b/source/Refitting/src/ExtrToTracker.cc @@ -718,7 +718,7 @@ void ExtrToTracker::getCellID0AndPositionInfo(LCCollection*& col ){ for (int i=0; igetNumberOfElements(); i++){ TrackerHitPlane* trackerHit = dynamic_cast( col->getElementAt(i) ) ; - dd4hep::long64 id = trackerHit->getCellID0() ; + const dd4hep::CellID id = trackerHit->getCellID0() ; cellid_decoder.setValue( id ) ; int subdet = cellid_decoder[UTIL::LCTrackerCellID::subdet()]; @@ -816,7 +816,7 @@ TrackerHitPlane* ExtrToTracker::getSiHit(std::vector& hitsOnD -TrackerHitPlane* ExtrToTracker::getSiHit(std::vector& vecElID, std::map >& mapElHits, MarlinTrk::IMarlinTrack*& marlin_trk){ +TrackerHitPlane* ExtrToTracker::getSiHit(std::vector< dd4hep::CellID >& vecElID, std::map >& mapElHits, MarlinTrk::IMarlinTrack*& marlin_trk){ double min = 9999999.; double testChi2=0.; @@ -1035,7 +1035,7 @@ void ExtrToTracker::FindAndAddHit(size_t& idet, int& elID, MarlinTrk::IMarlinTr bool isSuccessfulFit = false; - std::vector vecIDs; + std::vector vecIDs; vecIDs = _vecMapNeighbours.at(idet)->find(elID)->second; vecIDs.insert( std::begin(vecIDs), elID );