Skip to content

Commit

Permalink
Fixed conflict with ilcsoft version
Browse files Browse the repository at this point in the history
  • Loading branch information
pandreetto committed Feb 1, 2024
2 parents 944aec0 + dfe8ed1 commit 64539f3
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 105 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/key4hep.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 )
Expand Down
15 changes: 15 additions & 0 deletions doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
4 changes: 2 additions & 2 deletions source/Refitting/include/ExtrToTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ExtrToTracker : public marlin::Processor {

TrackerHitPlane* getSiHit(std::vector<TrackerHitPlane* >& hitsOnDetEl, MarlinTrk::IMarlinTrack*& marlin_trk);

TrackerHitPlane* getSiHit(std::vector<dd4hep::long64 >& vecElID, std::map<int , std::vector<TrackerHitPlane* > >& mapElHits, MarlinTrk::IMarlinTrack*& marlin_trk);
TrackerHitPlane* getSiHit(std::vector<dd4hep::CellID >& vecElID, std::map<int , std::vector<TrackerHitPlane* > >& mapElHits, MarlinTrk::IMarlinTrack*& marlin_trk);

/* void getNeighbours(int elID, std::vector<int >& vecIDs, std::string cellIDEcoding, std::map<int , int > mapLayerNModules); */

Expand Down Expand Up @@ -192,7 +192,7 @@ class ExtrToTracker : public marlin::Processor {
std::vector<int > _vecSubdetNLayers;
std::vector<int > _vecSubdetID;
std::vector<LCCollection* > _vecDigiHitsCol;
std::vector<std::map<dd4hep::long64 , std::vector<dd4hep::long64 > >* > _vecMapNeighbours;
std::vector<std::map<dd4hep::CellID , std::vector<dd4hep::CellID > >* > _vecMapNeighbours;

std::vector<std::map<int , std::vector<TrackerHitPlane* > > > _vecMapsElHits;

Expand Down
97 changes: 0 additions & 97 deletions source/Refitting/include/fpcompare.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// $Id$

#include <cmath>
#include <functional>


#ifndef CXXUTILS_FPCOMPARE_H
#define CXXUTILS_FPCOMPARE_H
Expand Down Expand Up @@ -123,101 +121,6 @@ bool less_equal (float a, float b)

} // namespace fpcompare


namespace fpcompare_fn {


struct equal
: public std::binary_function<double, double, bool>
{
bool
operator()(double a, double b) const
{ return fpcompare::equal (a, b); }
};


struct equalf
: public std::binary_function<float, float, bool>
{
bool
operator()(float a, float b) const
{ return fpcompare::equal (a, b); }
};


struct greater
: public std::binary_function<double, double, bool>
{
bool
operator()(double a, double b) const
{ return fpcompare::greater (a, b); }
};


struct greaterf
: public std::binary_function<float, float, bool>
{
bool
operator()(float a, float b) const
{ return fpcompare::greater (a, b); }
};


struct less
: public std::binary_function<double, double, bool>
{
bool
operator()(double a, double b) const
{ return fpcompare::less (a, b); }
};


struct lessf
: public std::binary_function<float, float, bool>
{
bool
operator()(float a, float b) const
{ return fpcompare::less (a, b); }
};


struct greater_equal
: public std::binary_function<double, double, bool>
{
bool
operator()(double a, double b) const
{ return fpcompare::greater_equal (a, b); }
};


struct greater_equalf
: public std::binary_function<float, float, bool>
{
bool
operator()(float a, float b) const
{ return fpcompare::greater_equal (a, b); }
};


struct less_equal
: public std::binary_function<double, double, bool>
{
bool
operator()(double a, double b) const
{ return fpcompare::less_equal (a, b); }
};


struct less_equalf
: public std::binary_function<float, float, bool>
{
bool
operator()(float a, float b) const
{ return fpcompare::less_equal (a, b); }
};


} // namespace fpcompare_fn
} // namespace CxxUtils


Expand Down
6 changes: 3 additions & 3 deletions source/Refitting/src/ExtrToTracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ void ExtrToTracker::getCellID0AndPositionInfo(LCCollection*& col ){
for (int i=0; i<col->getNumberOfElements(); i++){
TrackerHitPlane* trackerHit = dynamic_cast<TrackerHitPlane*>( 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()];
Expand Down Expand Up @@ -816,7 +816,7 @@ TrackerHitPlane* ExtrToTracker::getSiHit(std::vector<TrackerHitPlane* >& hitsOnD



TrackerHitPlane* ExtrToTracker::getSiHit(std::vector<dd4hep::long64 >& vecElID, std::map<int , std::vector<TrackerHitPlane* > >& mapElHits, MarlinTrk::IMarlinTrack*& marlin_trk){
TrackerHitPlane* ExtrToTracker::getSiHit(std::vector< dd4hep::CellID >& vecElID, std::map<int , std::vector<TrackerHitPlane* > >& mapElHits, MarlinTrk::IMarlinTrack*& marlin_trk){

double min = 9999999.;
double testChi2=0.;
Expand Down Expand Up @@ -1035,7 +1035,7 @@ void ExtrToTracker::FindAndAddHit(size_t& idet, int& elID, MarlinTrk::IMarlinTr

bool isSuccessfulFit = false;

std::vector<dd4hep::long64 > vecIDs;
std::vector<dd4hep::CellID > vecIDs;
vecIDs = _vecMapNeighbours.at(idet)->find(elID)->second;

vecIDs.insert( std::begin(vecIDs), elID );
Expand Down

0 comments on commit 64539f3

Please sign in to comment.