Skip to content

Commit

Permalink
Merge pull request #3 from MuonColliderSoft/mergeILC
Browse files Browse the repository at this point in the history
Merge with ilcSoft v00-12
  • Loading branch information
gianelle authored Feb 28, 2023
2 parents 32e1edb + c6804a8 commit 2f5f3ba
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 112 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: coverity

on:
schedule:
- cron: '0 0 * * *'

jobs:
run-coverity:
runs-on: ubuntu-latest
if: github.repository == 'iLCSoft/DDMarlinPandora'
steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: aidasoft/run-lcg-view@v3
with:
coverity-cmake-command: 'cmake -C $ILCSOFT/ILCSoft.cmake ..'
coverity-project: 'iLCSoft%2FDDMarlinPandora'
coverity-project-token: ${{ secrets.DDMARLINPANDORA_COVERITY_TOKEN }}
github-pat: ${{ secrets.READ_COVERITY_IMAGE }}
view-path: "/cvmfs/clicdp.cern.ch/iLCSoft/lcg/100/nightly/x86_64-centos7-gcc10-opt"
setup-script: "init_ilcsoft.sh"
29 changes: 29 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: linux
on: [push, pull_request]

jobs:
centos7:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
COMPILER: [gcc10, clang11]
LCG: [100]
include:
- COMPILER: gcc8
LCG: 99python2

steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: aidasoft/run-lcg-view@v3
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 " ..
ninja -k0
ctest --output-on-failure
ninja install
12 changes: 0 additions & 12 deletions .travis-ci.d/compile_and_test.sh

This file was deleted.

12 changes: 0 additions & 12 deletions .travis-ci.d/coverity_scan.sh

This file was deleted.

72 changes: 0 additions & 72 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PROJECT( DDMarlinPandora )

# project version# continuing from MarlinPandora version 2.0.0 revision 1934
SET( DDMarlinPandora_VERSION_MAJOR 0 )
SET( DDMarlinPandora_VERSION_MINOR 13 )
SET( DDMarlinPandora_VERSION_MINOR 14 )
SET( DDMarlinPandora_VERSION_PATCH 0 )


Expand Down
9 changes: 9 additions & 0 deletions doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v00-12

* 2021-09-06 Placido Fernandez Declara ([PR#21](https://github.com/iLCSoft/DDMarlinPandora/pull/21))
- DDCaloDigi: Add setting of the fromType and toType parameters for the LCRelation collection between CaloHit and SimCaloHit
- DDSimpleMuonDigi: Add setting of the fromType and toType parameters for the LCRelation collection between CaloHit and SimCaloHit

* 2021-08-23 Andre Sailer ([PR#22](https://github.com/iLCSoft/DDMarlinPandora/pull/22))
- CI: build against LCG_99python2 gcc8 and LCG_100 gcc10, clang11

# v00-11

* 2019-12-11 Ete Remi ([PR#19](https://github.com/iLCSoft/DDMarlinPandora/pull/19))
Expand Down
32 changes: 21 additions & 11 deletions src/DDCaloDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <EVENT/LCParameters.h>
#include <UTIL/CellIDDecoder.h>
#include <UTIL/CellIDEncoder.h>
#include <UTIL/LCRelationNavigator.h>
#include <iostream>
#include <string>
#include <algorithm>
Expand Down Expand Up @@ -684,7 +685,10 @@ void DDCaloDigi::processRunHeader( LCRunHeader* /*run*/) {
void DDCaloDigi::processEvent( LCEvent * evt ) {

// create the output collections
LCCollectionVec *relcol = new LCCollectionVec(LCIO::LCRELATION);

// Relation collection CalorimeterHit, SimCalorimeterHit
LCCollection* chschcol = 0;
UTIL::LCRelationNavigator calohitNav = UTIL::LCRelationNavigator( LCIO::CALORIMETERHIT, LCIO::SIMCALORIMETERHIT );

// copy the flags from the input collection
_flag.setBit(LCIO::CHBIT_LONG);
Expand Down Expand Up @@ -901,8 +905,10 @@ void DDCaloDigi::processEvent( LCEvent * evt ) {
calhit->setType( CHT( CHT::em, CHT::ecal , caloLayout , layer ) );
calhit->setRawHit(hit);
ecalcol->addElement(calhit);
LCRelationImpl *rel = new LCRelationImpl(calhit,hit,1.0);
relcol->addElement( rel );

// Set relation with LCRelationNavigator
calohitNav.addRelation(calhit, hit, 1.0);

}else{
// if(caloLayout==CHT::barrel)std::cout << " Drop ECAL Barrel hit : " << timei << " " << calibr_coeff*energyi << std::endl;
}
Expand Down Expand Up @@ -932,8 +938,9 @@ void DDCaloDigi::processEvent( LCEvent * evt ) {
calhit->setType( CHT( CHT::em, CHT::ecal , caloLayout , layer ) );
calhit->setRawHit(hit);
ecalcol->addElement(calhit);
LCRelationImpl *rel = new LCRelationImpl(calhit,hit,1.0);
relcol->addElement( rel );

// Set relation with LCRelationNavigator
calohitNav.addRelation(calhit, hit, 1.0);
} // timing if...else


Expand Down Expand Up @@ -1128,8 +1135,10 @@ void DDCaloDigi::processEvent( LCEvent * evt ) {
calhit->setType( CHT( CHT::had, CHT::hcal , caloLayout , layer ) );
calhit->setRawHit(hit);
hcalcol->addElement(calhit);
LCRelationImpl *rel = new LCRelationImpl(calhit,hit,1.0);
relcol->addElement( rel );

// Set relation with LCRelationNavigator
calohitNav.addRelation(calhit, hit, 1.0);

}else{
// std::cout << "Drop HCAL hit : " << timei << " " << calibr_coeff*energyi << std::endl;
}
Expand Down Expand Up @@ -1159,8 +1168,8 @@ void DDCaloDigi::processEvent( LCEvent * evt ) {
calhit->setType( CHT( CHT::had, CHT::hcal , caloLayout , layer ) );
calhit->setRawHit(hit);
hcalcol->addElement(calhit);
LCRelationImpl *rel = new LCRelationImpl(calhit,hit,1.0);
relcol->addElement( rel );

calohitNav.addRelation(calhit, hit, 1.0);
}

// std::cout << hit->getTimeCont(0) << " count = " << count << " EHCAL = " << energyCal << " - " << eCellInTime << " - " << eCellOutput << std::endl;
Expand All @@ -1175,8 +1184,9 @@ void DDCaloDigi::processEvent( LCEvent * evt ) {
}
}

// add relation collection for ECAL/HCAL to event
evt->addCollection(relcol,_outputRelCollection.c_str());
// Create and add relation collection for ECAL/HCAL to event
chschcol = calohitNav.createLCCollection();
evt->addCollection(chschcol,_outputRelCollection.c_str());

_nEvt++;

Expand Down
12 changes: 8 additions & 4 deletions src/DDSimpleMuonDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <IMPL/LCRelationImpl.h>
#include <EVENT/LCParameters.h>
#include <UTIL/CellIDDecoder.h>
#include <UTIL/LCRelationNavigator.h>

// #include <algorithm>
// #include <string>
Expand Down Expand Up @@ -178,7 +179,9 @@ void DDSimpleMuonDigi::processEvent( LCEvent * evt ) {


LCCollectionVec *muoncol = new LCCollectionVec(LCIO::CALORIMETERHIT);
LCCollectionVec *relcol = new LCCollectionVec(LCIO::LCRELATION);
// Relation collection CalorimeterHit, SimCalorimeterHit
LCCollection* chschcol = 0;
UTIL::LCRelationNavigator calohitNav = UTIL::LCRelationNavigator( LCIO::CALORIMETERHIT, LCIO::SIMCALORIMETERHIT );

LCFlagImpl flag;

Expand Down Expand Up @@ -227,8 +230,7 @@ void DDSimpleMuonDigi::processEvent( LCEvent * evt ) {
calhit->setTime( computeHitTime(hit) );
calhit->setRawHit(hit);
muoncol->addElement(calhit);
LCRelationImpl *rel = new LCRelationImpl(calhit,hit,1.);
relcol->addElement( rel );
calohitNav.addRelation(calhit, hit, 1.0);
}

}
Expand All @@ -238,7 +240,9 @@ void DDSimpleMuonDigi::processEvent( LCEvent * evt ) {
}
muoncol->parameters().setValue(LCIO::CellIDEncoding,initString);
evt->addCollection(muoncol,_outputMuonCollection.c_str());
evt->addCollection(relcol,_outputRelCollection.c_str());
// Create and add relation collection for ECAL/HCAL to event
chschcol = calohitNav.createLCCollection();
evt->addCollection(chschcol,_outputRelCollection.c_str());


_nEvt++;
Expand Down

0 comments on commit 2f5f3ba

Please sign in to comment.