From 8f6115e261b12cc5ea5c40e3606cf7bc6308d318 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 16 Dec 2025 09:05:51 +0100 Subject: [PATCH 1/3] Switch to still existing clicdp nightly --- .github/workflows/linux.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6cbc7ea..5e2e1e8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -7,23 +7,20 @@ jobs: strategy: fail-fast: false matrix: - COMPILER: [gcc10, clang11] - LCG: [100] - include: - - COMPILER: gcc8 - LCG: 99python2 + COMPILER: [gcc11] + LCG: [104] steps: - - uses: actions/checkout@v2 - - uses: cvmfs-contrib/github-action-cvmfs@v2 - - uses: aidasoft/run-lcg-view@v3 + - uses: actions/checkout@v5 + - uses: cvmfs-contrib/github-action-cvmfs@v5 + - uses: aidasoft/run-lcg-view@v5 with: view-path: "/cvmfs/clicdp.cern.ch/iLCSoft/lcg/${{ matrix.LCG }}/nightly/x86_64-centos7-${{ matrix.COMPILER }}-opt" setup-script: "init_ilcsoft.sh" run: | mkdir build cd build - cmake -GNinja -C ${ILCSOFT}/ILCSoft.cmake -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " -DINSTALL_DOC=ON .. + cmake -GNinja -C ${ILCSOFT}/ILCSoft.cmake -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always -Werror " .. ninja -k0 ctest --output-on-failure ninja install From 027666754f0209d9651803dd99865bbef7123db7 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 16 Dec 2025 09:06:17 +0100 Subject: [PATCH 2/3] Add a Key4hep based CI workflow --- .github/workflows/key4hep.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/key4hep.yml diff --git a/.github/workflows/key4hep.yml b/.github/workflows/key4hep.yml new file mode 100644 index 0000000..6d48791 --- /dev/null +++ b/.github/workflows/key4hep.yml @@ -0,0 +1,35 @@ +name: keyh4ep +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + schedule: + - cron: 16 4 * * 1 + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + matrix: + build_type: ["release", "nightly"] + image: ["alma9"] + stack: ["key4hep"] + include: + - build_type: nightly + image: ubuntu24 + stack: key4hep + fail-fast: false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: key4hep/key4hep-actions/cache-external-data@main + - uses: key4hep/key4hep-actions/key4hep-build@main + with: + build_type: ${{ matrix.build_type }} + image: ${{ matrix.image }} + stack: ${{ matrix.stack }} From bca99d6394e3c9ffed92321fa4d80ccdea199cf4 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Tue, 16 Dec 2025 09:24:37 +0100 Subject: [PATCH 3/3] Fix warnings --- include/ZH5CFit.h | 12 ++++++++---- include/ZHllqq5CFit.h | 2 +- src/MassConstraintFitter.cc | 5 +++-- src/WW5CFit.cc | 5 +++-- src/ZH5CFit.cc | 24 ++++++++++++------------ 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/include/ZH5CFit.h b/include/ZH5CFit.h index 0f2a5b2..03f7b50 100644 --- a/include/ZH5CFit.h +++ b/include/ZH5CFit.h @@ -40,6 +40,11 @@ class ZH5CFit : public Processor { ZH5CFit() ; + ZH5CFit(const ZH5CFit&) = delete; + ZH5CFit& operator=(const ZH5CFit&) = delete; + ZH5CFit( ZH5CFit&&) = delete; + ZH5CFit& operator=(ZH5CFit&&) = delete; + /** Called at the begin of the job before anything is read. * Use to initialize the processor, e.g. book histograms. */ @@ -80,8 +85,8 @@ class ZH5CFit : public Processor { double b{}, ISRPzMaxB{}; float prob{}, bestprob{}, bestnit{}, bestmassZ{}, bestmassH{}, beststartmassZ{}, beststartmassH{}, bestphotonenergy{}, startmassZ{}, startmassH{}, variable{}; - float chi2best; - float errorcode; + float chi2best{}; + float errorcode{}; float Zmomentum[3]{}, Hmomentum[3]{}, ISRmomentum[3]{}; float Z_Energy{}, H_Energy{}; float momentum[3]{}, energy{}; @@ -117,8 +122,7 @@ class ZH5CFit : public Processor { typedef std::vector IntVector; IntVector B_index{}; IntVector C_index{}; - double E_lab; - double Elab; + double E_lab{}; int _NuE{}; int _useErrorFlow{}; float sigmaScaleFactor{}; diff --git a/include/ZHllqq5CFit.h b/include/ZHllqq5CFit.h index 08b1556..7fe668d 100644 --- a/include/ZHllqq5CFit.h +++ b/include/ZHllqq5CFit.h @@ -72,7 +72,7 @@ class ZHllqq5CFit : public Processor { int _fitISR{}, _ifitter{}, _ievttrace{}; bool _traceall{}; double _errene{}, _errtheta{}, _errphi{}; - float _sigmaScaleFactor; + float _sigmaScaleFactor{}; /** Output collections names. */ std::string _PostFitRecoCol{}; diff --git a/src/MassConstraintFitter.cc b/src/MassConstraintFitter.cc index 3e0d109..b6f0f84 100644 --- a/src/MassConstraintFitter.cc +++ b/src/MassConstraintFitter.cc @@ -220,9 +220,10 @@ void MassConstraintFitter::init() { evtNo=0; // rejects = new TH1D("hrejects","Rejected Events",5,1.0,5.0); - if(_fitAnalysis) + if(_fitAnalysis) { rootFile = new TFile(m_rootFile.c_str(),"RECREATE"); - rejects = new TH1D("hrejects","Rejected Events",5,0.5,5.5); + } + rejects = new TH1D("hrejects","Rejected Events",5,0.5,5.5); //////////////////////////////////////////////////////// ///fit and measured analysis tree init //_fitAnalysis includes the general analysis from the reconstructed particles diff --git a/src/WW5CFit.cc b/src/WW5CFit.cc index d2d04e1..934c3d3 100644 --- a/src/WW5CFit.cc +++ b/src/WW5CFit.cc @@ -387,10 +387,11 @@ void WW5CFit::processEvent( LCEvent * evt ) { streamlog_out(DEBUG) << "ECM = " << _ecm << std::endl ; MomentumConstraint ec(1, 0, 0, 0, _ecm); ec.setName("sum(E)"); - for (int i = 0; i < NJETS; ++i) + for (int i = 0; i < NJETS; ++i) { ec.addToFOList (*(permutedjets[i])); + } - streamlog_out(DEBUG) << "Value of pxc before fit: " << pxc.getValue() << std::endl ; + streamlog_out(DEBUG) << "Value of pxc before fit: " << pxc.getValue() << std::endl ; streamlog_out(DEBUG) << "Value of pyc before fit: " << pyc.getValue() << std::endl ; streamlog_out(DEBUG) << "Value of pzc before fit: " << pzc.getValue() << std::endl ; streamlog_out(DEBUG) << "Value of ec before fit: " << ec.getValue() << std::endl ; diff --git a/src/ZH5CFit.cc b/src/ZH5CFit.cc index 09698db..ee77e1f 100644 --- a/src/ZH5CFit.cc +++ b/src/ZH5CFit.cc @@ -432,7 +432,7 @@ void ZH5CFit::processEvent( LCEvent * evt ) { //event start sldcol = evt->getCollection( _SLDCol ); streamlog_out(MESSAGE) << _SLDCol << " collection available*********" << std::endl; } - catch( lcio::DataNotAvailableException e ) + catch( const lcio::DataNotAvailableException& e ) { streamlog_out(WARNING) << _SLDCol << " collection not available****" << std::endl; sldcol = NULL; @@ -455,7 +455,7 @@ void ZH5CFit::processEvent( LCEvent * evt ) { //event start nucol = evt->getCollection( _NuCorrector ); streamlog_out(MESSAGE) << _NuCorrector << " collection available*********" << std::endl; } - catch( lcio::DataNotAvailableException e ) + catch(const lcio::DataNotAvailableException& e ) { streamlog_out(WARNING) << _NuCorrector << " collection not available****" << std::endl; nucol = NULL; @@ -466,10 +466,10 @@ void ZH5CFit::processEvent( LCEvent * evt ) { //event start ENuminus=nucol->getParameters().getFloatVal("recENuMinus"); - for ( int i=0; i< B_index.size(); i++){ + for ( auto i=0u; i< B_index.size(); i++){ streamlog_out(DEBUG) << " Index of B[" << i <<"]: " << B_index[i] << std::endl; } - for ( int i=0; i< C_index.size(); i++){ + for ( auto i=0u; i< C_index.size(); i++){ streamlog_out(DEBUG) << " Index of C[" << i <<"]: " << C_index[i] << std::endl; } @@ -479,10 +479,10 @@ void ZH5CFit::processEvent( LCEvent * evt ) { //event start if(nSLDB == 1 && nSLDC == 0) { streamlog_out(DEBUG) << "SLD-B is 1 ------******************" << std::endl ; if(B_index.size()!=0){ - for (int nB=0; nB( mccol->getElementAt(B_index[nB])) ; + for (const auto bIndex : B_index) { + MCParticle* mcpB = dynamic_cast( mccol->getElementAt(bIndex)) ; MCParticleVec mcpBD = mcpB->getDaughters() ; - for(int nBD=0; nBDgetPDG() <getPDG()) == 11) || (std::abs(mcpBD[nBD]->getPDG()) == 13) || (std::abs(mcpBD[nBD]->getPDG()) == 15)){ l_theta=0. ; l_phi=0.; @@ -517,8 +517,8 @@ void ZH5CFit::processEvent( LCEvent * evt ) { //event start bestjet_th=0; bestjet_phi=0; bestjet=1000000; - float diff_besttheta; - float diff_bestphi; + // float diff_besttheta; + // float diff_bestphi; //-----------------------------------find the jet which should have the neutrino------------------- if(nSLDB == 1 && nSLDC == 0){// if # SLD-B =1 @@ -548,8 +548,8 @@ void ZH5CFit::processEvent( LCEvent * evt ) { //event start } if (bestjet_th != bestjet_phi){ streamlog_out(DEBUG) << "BESTJET FOR THETA: " < 0.5 && abs(delta_phi[bestjet_th]) >0.5 ){ //2 @@ -929,7 +929,7 @@ void ZH5CFit::processEvent( LCEvent * evt ) { //event start streamlog_out(DEBUG4) << "constraints added" << std::endl ; // don't constrain Higgs mass, just use constraints for convenient mass calculation - //fitter.addConstraint (h);\ + // fitter.addConstraint (h); // initial value of Z mass constraint if (fabs(startmassZ-91.2) + fabs(startmassH-125.) < bestzvalue) {