Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/key4hep.yml
Original file line number Diff line number Diff line change
@@ -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 }}
15 changes: 6 additions & 9 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 8 additions & 4 deletions include/ZH5CFit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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{};
Expand Down Expand Up @@ -117,8 +122,7 @@ class ZH5CFit : public Processor {
typedef std::vector<int> IntVector;
IntVector B_index{};
IntVector C_index{};
double E_lab;
double Elab;
double E_lab{};
int _NuE{};
int _useErrorFlow{};
float sigmaScaleFactor{};
Expand Down
2 changes: 1 addition & 1 deletion include/ZHllqq5CFit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
Expand Down
5 changes: 3 additions & 2 deletions src/MassConstraintFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/WW5CFit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand Down
24 changes: 12 additions & 12 deletions src/ZH5CFit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
}

Expand All @@ -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<B_index.size(); nB++ ){
MCParticle* mcpB = dynamic_cast<MCParticle*>( mccol->getElementAt(B_index[nB])) ;
for (const auto bIndex : B_index) {
MCParticle* mcpB = dynamic_cast<MCParticle*>( mccol->getElementAt(bIndex)) ;
MCParticleVec mcpBD = mcpB->getDaughters() ;
for(int nBD=0; nBD<mcpBD.size(); nBD++){
for(auto nBD=0u; nBD<mcpBD.size(); nBD++){
// streamlog_out(ERROR) << "PDG OF DAUGHTER:[" << nBD<< "], is " << mcpBD[nBD]->getPDG() <<std::endl ;
if((std::abs(mcpBD[nBD]->getPDG()) == 11) || (std::abs(mcpBD[nBD]->getPDG()) == 13) || (std::abs(mcpBD[nBD]->getPDG()) == 15)){
l_theta=0. ; l_phi=0.;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -548,8 +548,8 @@ void ZH5CFit::processEvent( LCEvent * evt ) { //event start
}
if (bestjet_th != bestjet_phi){
streamlog_out(DEBUG) << "BESTJET FOR THETA: " <<bestjet_th << " and BESTJET FOR PHI: " <<bestjet_phi<< " are different " <<std::endl ;
diff_besttheta= std::abs(delta_theta[bestjet_phi])-std::abs(delta_theta[bestjet_th]);
diff_bestphi=std::abs(delta_phi[bestjet_phi])-std::abs(delta_phi[bestjet_th]);
// diff_besttheta= std::abs(delta_theta[bestjet_phi])-std::abs(delta_theta[bestjet_th]);
// diff_bestphi=std::abs(delta_phi[bestjet_phi])-std::abs(delta_phi[bestjet_th]);

if (abs(delta_theta[bestjet_phi]) < 0.5 && abs(delta_phi[bestjet_phi]) <0.5){ // 1
if ( abs(delta_theta[bestjet_th]) > 0.5 && abs(delta_phi[bestjet_th]) >0.5 ){ //2
Expand Down Expand Up @@ -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) {
Expand Down