Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding substructure variables #10

Merged
merged 4 commits into from May 18, 2018
Merged

Adding substructure variables #10

merged 4 commits into from May 18, 2018

Conversation

lstroem
Copy link
Contributor

@lstroem lstroem commented May 4, 2018

BEGINRELEASENOTES

  • Implemented substructure parameters commonly used for top tagging. The definition of these new variables can be adjusted from the steering file (added options to steer how to calculate the energy correlation function (energyCorrelator) and how to calculate NSubjettiness (axesMode and measureMode). Only recommended options are implemented. The beta parameter would typically be the same as used for jet clustering but can also be varied separately (beta weights the angular distances between the jet constituents compared to their pt in the calculation of the energy correlation function and subjettiness).
  • The substructure variables are added to the file as a collection "TopTaggerSubStructure" of seven elements (order: C2, D2, C3, D3, tau1, tau2, tau3).
  • This update is backwards compatible, with the only difference being the addition of this collection.

ENDRELEASENOTES

@lstroem
Copy link
Contributor Author

lstroem commented May 4, 2018

*DONE - Currently adding option to name the output collection from the steering file
*DONE - Adding also a bool to activate substructure variables or not (default will be false, i.e. nothing new added)

@lstroem lstroem changed the title Adding substructure variables [WIP] Adding substructure variables May 8, 2018
@@ -17,15 +17,37 @@
#include <IMPL/LCCollectionVec.h>
#include <EVENT/ReconstructedParticle.h>
#include "IMPL/LCCollectionVec.h"
#include <IMPL/ReconstructedParticleImpl.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sort the includes. LCCollectionVec.h is already there, twice. (please remove the one with quotes)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


//Substructure parameters
registerProcessorParameter("beta",
"Beta is called angular exponent and weights the angular distances between the jet constituents compated to their pt in the calculation of the energy correlation function and subjettiness.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compated --> compared?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

double tau2 = nSubJettiness2(*it); lcgSubStructureTau2->setDoubleVal(index, tau2);
double tau3 = nSubJettiness3(*it); lcgSubStructureTau3->setDoubleVal(index, tau3);

//John-Hopkins top tagger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Johns-Hopkins

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -286,6 +362,22 @@ void FastJetTopTagger::processEvent(LCEvent * evt){

} //end processEvent

double FastJetTopTagger::getECF(PseudoJet& jet, int whichECF, double beta, std::string energyCorrelator){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass the energyCorrelator as constant reference (std::string const& energ...), to avoid making copies of the object every time the function is called.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

#include "fastjet/contrib/EnergyCorrelator.hh"

#include <iomanip>
#include <stdlib.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need all these includes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, cleaned up

if(!jet.has_constituents())
return -1.0;

EnergyCorrelator ECF(whichECF, beta, _energyCorrMap[energyCorrelator]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The objects can be instantiated once, and then used, instead of creating one every time the function is called

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


//Forward declaration
using namespace fastjet;
using namespace fastjet::contrib;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove using namespace from header file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@lstroem
Copy link
Contributor Author

lstroem commented May 15, 2018

  • Will add support for VLC algorithm in determination of substructure variables

@lstroem lstroem changed the title [WIP] Adding substructure variables Adding substructure variables May 15, 2018
@andresailer andresailer merged commit 7a71692 into iLCSoft:master May 18, 2018
@gaede
Copy link
Contributor

gaede commented May 22, 2018

@lstroem @andresailer Hi, this breaks our nightly builds with:

[ 75%] Building CXX object CMakeFiles/MarlinFastJet.dir/src/FastJetTopTagger.cpp.o
In file included from /scratch/nbuilds/gcc49/2018-05-21/MarlinFastJet/HEAD/src/FastJetTopTagger.cpp:13:0:
/scratch/nbuilds/gcc49/2018-05-21/MarlinFastJet/HEAD/./include/VLCAxes.h:3:45: fatal error: fastjet/contrib/AxesDefinition.hh: No such file or directory
#include <fastjet/contrib/AxesDefinition.hh>

Which version and configuration of fastjet is required for this to work ?

@petricm
Copy link
Contributor

petricm commented May 22, 2018

This was tested in the CI with 3.2.1

@lstroem
Copy link
Contributor Author

lstroem commented May 22, 2018 via email

@petricm
Copy link
Contributor

petricm commented May 22, 2018

As this is a contrib thing, did you build FastJetContrib with Nsubjettiness?

@gaede
Copy link
Contributor

gaede commented May 22, 2018

I don't know - we built it with the standard ilcsoft install script and:

ilcsoft.install( FastJet( FastJet_version ))
ilcsoft.module("FastJet").fjcontrib_version="1.017"

Which script did you use to build it ?

@petricm
Copy link
Contributor

petricm commented May 22, 2018

I think contrib 1.017 is too old (released 2015-05-05), and approx 3 year ago this was added to Nsubjettiness

https://fastjet.hepforge.org/trac/browser/contrib/contribs/Nsubjettiness/trunk

Why are you mixing fastjet 3.2.0 (released 2016-03-17) with fastjet-contrib 1.017(released 2015-05-05)? Did you maybe forget to bump the contrib version when updating the fastjet version? As 3.2.0 would go with 1.022 (which has AxesDefinition.hh).

We don't use iLCSoft to install external packages, they are provided independently.

@gaede
Copy link
Contributor

gaede commented May 22, 2018

Indeed, this is a bug in our script - in the versions file we have:

FastJet_version = "3.2.0"
FastJetcontrib_version = "1.024"

but then ignore the contrib version...
I can't find 'valid' combinations of FastJet and contrib versions on their website - which contrib versions did you use for your installations of FastJet (3.2.1, 3.2.2 and 3.3.0 ) ?

@petricm
Copy link
Contributor

petricm commented May 22, 2018

Indeed there is no "valid" pairing of the two, the releases are usually "quite" together

3.2.0 17 March 2016
1.022 30 March 2016

but then patches are fairly random. We use 3.2.1+1.025 since the release is from 11/2016.

@gaede
Copy link
Contributor

gaede commented May 22, 2018

Ok, thanks. Will then also use 3.2.1+1.025, to be compatible (and rely on the testing you've already done with this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants