-
Notifications
You must be signed in to change notification settings - Fork 18
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
Jet Substructure #13
base: main
Are you sure you want to change the base?
Jet Substructure #13
Conversation
Note: Object isolation module is different from the main branch. This has been detached from the clustering module completely and moved to the event reconstruction module. madanalysis5/tools/SampleAnalyzer/Process/JetClustering/JetClusterer.cpp Lines 598 to 620 in c2c0410
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked the readme file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal regarding the possible clash between FastJet and Delphes interfaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You enforce the jet collection and the imported samples to have different names. However, is this really a necessary requirement (except to avoid things to become a mess)?
Note that I have nothing about this restriction (and I am even if favour of it), but I naively raise the question.
If user uses the same name for jet and a dataset then it would not be possible to modify a defined jet or dataset. For instance
Hence after the jet definition it will basically overwrite the name so user wont be able to set anything for the sample or jet depending the order of definition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In cmd_define.py, I do not understand the following lines
62 # Multi-cluster protection
63 logging.getLogger('MA5').warning("Constituent-based smearing will be applied.")
64 self.main.superfastsim.jetrecomode = 'constituents'
Why do we have to set the jetrecomode
option to constituents
as soon as an extra jet definition is required? Can't we do this independently of what is done for the "standard" collection (the one defined through main.fastim
)?
If there are multiple jet definition in use and user wants to do detector simulation this has to be done in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed a missing reset function in run_recast.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In jet_configuration.py, I am wondering whether we should forbid the usage of any non-IR-safe jet algorithm. Who use such an algorithm today anyways? Any thoughts? If we agree on this, this change will have to be pushed everywhere...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in makefile_writer.py, we have:
169 # @JACK: cant use FASTJET_USE tag, it clashes with ROOT
170 self.ma5_fastjet_mode = False
I assume this will be fixed due to our discussion of earlier today. Is this correct?
Yes I believe it can all be controlled through |
I believe that should be up to the user, we have the options and flexibility. It might be useful for an analysis where IR safety is implemented in a later stage (have absolutely no example and never saw them being used). |
Perfect. Then we will update the python and make it clearer later on (added on the to-do list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding Jet Tagging
// Storing | ||
for (MAuint32 i=0;i<jets.size();i++) | ||
for (MAuint32 ijet=0;ijet<jets.size();ijet++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BFuks I'm thinking about moving the entire tagging module into this loop. We can merge truth and SFS level tagging together and trigger SFS if there is an old version of tagging commands in place so that the python interface would be unchanged. Do you agree?
Yes I do. |
By reviewing the code, I think we should mention somewhere some information about the HT ET and Meff computations that are inclusive quantities that do not care about pTmin requirements set on jet. I leave this here as a side note for later (see tools/SampleAnalyzer/Interfaces/fastjet/ClusterAlgoFastJet.cpp). |
Please double check MAbool ClusterAlgoFastJet::Cluster(EventFormat& myEvent, std::string JetID). I have added a missing return statement. |
The new softdrop method will have to be heavily documented. |
@@ -40,8 +40,8 @@ using namespace MA5; | |||
// Initializing static data members | |||
// ----------------------------------------------------------------------------- | |||
// DO NOT TOUCH THESE LINES | |||
const std::string Configuration::sampleanalyzer_version_ = "1.10.1"; | |||
const std::string Configuration::sampleanalyzer_date_ = "2022/01/15"; | |||
const std::string Configuration::sampleanalyzer_version_ = "1.10.2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BFuks shall we leave version bump to for the end of the PR? Each PR can correspond a version bump thats why I'm creating a new PR per update. Substrucutre module will come after all the other updates that we have been merging. Please lets keep them separated. They can all merge in the main together with appropriate version bumps otherwise we will constantly face with conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep... I didn't one to git add
those... It is a mistake :D
Bugfix for Delphes in Jet-Substructure module
Context
This branch is dedicated to implementing substructure tools to the MadAnalysis framework.
Description of the change and benefits
Interface updates
madanalysis/jet_clustering/.
jet_algorithm
: This module is separate from the original jet clustering interface within Ma5.This module can be activated using the following command
where
my_jet
is a user-defined jet identifier,antikt
is the algorithm to be used whichcan be chosen from
antikt
,cambridge
,genkt
,kt
,gridjet
,cdfjetclu
,cdfmidpoint
,and
siscone
. The rest of the arguments are optional if the user won't define the radius, ptmin etc.default parameters will be chosen. Each algorithm has its own unique set of parameters i.e.
antikt
,cambridge
radius=0.4
,ptmin=5.
genkt
radius=0.4
,ptmin=5.
,exclusive=False
,p=-1
kt
radius=0.4
,ptmin=5.
,exclusive=False
gridjet
ymax=3.
,ptmin=5.
cdfjetclu
radius=0.4
,ptmin=5.
,overlap=0.5
,seed=1.
,iratch=0.
cdfmidpoint
radius=0.4
,ptmin=5.
,overlap=0.5
,seed=1.
,iratch=0.
,areafraction=1.
siscone
radius=0.4
,ptmin=5.
,overlap=0.5
,input_ptmin=5.
,npassmax=1.
VariableR
rho=2000.
,minR=0.
,maxR=2.
,ptmin=20.
exclusive=False
clustertype=CALIKE
strategy=Best
It is also possible to modify the entry after defining it
Note that when a
jet_algorithm
is defined MadAnalysis interface will automatically switch to constituent smearing mode.set my_jet.+<tab>
will show the dedicated options available for that particular algorithm.It is possible to display all the jets available in the current session by using
display jet_algorithm
command:Here primary jet is defined with the original jet definition syntax of MadAnalysis 5 where since we did not specify anything, it uses default
antikt
configuration. For more info on how to define primary jet see arXiv:2006.09387. Other jet definitions show all the jets which are defined viajet_algorithm
keyword.To remove a
jet_algorithm
definition one can useremove my_jet
command. Note that one can also change the name of the primary jet which isMa5Jet
by default.Link to SFS: There can only be one jet smearing/tagging definition where in case of existing multi-jet definitions smearing will be applied in constituent level which is used by all jets defined in the framework. Jet tagging is only available for the primary jet.
Updates in expert mode structure
Expert mode is designed to automatically realize and construct the MadAnalysis framework according to the given
.ma5
command script. This command script can include all the SFS construction mentioned in arXiv:2006.09387 and it can also include multijet definitionssfs_card_cms_exo_xx_yy.ma5
:sfs_card_cms_exo_xx_yy.ma5
shows a simple example of multi-jet clustering and detector simulation implementation. First, it chooses the FastJet package asfastsim
interpreter, then defines multijet and in the following defines a simple detector simulation. This file can be executed as follows;here
cms_exo_xx_yy
is a given analysis andsfs_card_cms_exo_xx_yy.ma5
holds the information for the detector simulation (PAD requiressfs_card_cms_exo_xx_yy.ma5
to setup detector simulation for the analysis code, it automatically writes the detector simulation according to the givensfs_card
file. Note that if there is a card with the same name for multiple analysis files, those analyses can be executed at the same time, hence allowing more efficient execution.). This command will write a folder calledcms_exo_xx_yy
including all MadAnalysis 5 framework within.cms_exo_xx_yy/Build/Main/main.cpp
(do not change) as follows;all these inputs are interpreted by
JetClusterer
machinery within MadAnalysis 5. AdditionallyMakefile
has been modified viaCXXFLAGS += -DMA5_FASTJET_MODE
flag to enable FastJet use within MadAnalysis data structure, without this flag fastjet dependent accessors will not work.cms_exo_xx_yy/Build/SampleAnalyzer/User/Analyzer
This folder includes all the definitions writtenfor the detector simulation;
cms_exo_xx_yy.*
are the analysis files and the rest are detector simulation modules (Please do not change those files when the analysis submitted in PAD onlycms_exo_xx_yy.*
,cms_exo_xx_yy.info
andsfs_card_cms_exo_xx_yy.ma5
files are allowed. If you need to modify detector simulation, please modifysfs_card_cms_exo_xx_yy.ma5
and re-execute the workspace or include your personal modifications incms_exo_xx_yy.cpp
).c++
interface through their unique identifiers. Primary jet isa special case where one can use
event.rec()->jet()
accessor to see all primary jets. Rest of the jets can be found usingevent.rec()->jet("AK08")
orevent.rec()->jet("CA15")
respectively.Update on expert mode compilation
In order to separate the execution method for Delphes and SFS-FastJet based analyses, a command line option has been added to the
setup.sh
. In order to enable SFS-FastJet mode use following commands;or simply type
source setup.sh -h
for details.New shortcuts
FastJet Contrib toolset
SoftDrop
Cluster
Execute with reconstructed event sample
Other execution modes:
Filter clustered object
Recluster
Nsubjettiness
Available axes definitions:
Available measure definitions
VariableR Plugin
Initialize through normal mode
define jet_algorithm my_varR VariableR rho=2000 minR=0 maxR=2 ptmin=15 exclusive=False clustertype=CALIKE strategy=Best
Initialisation through analysis:
OR
Execution for the reco event:
Execution with reconstructed jets:
Execution with a single jet:
Filter clustered object
Pruner
execute with a single jet
vector execution
Jet Filtering
Energy Correlator
Tests were done for backwards compatibility
Not tested.
TODO
Drawbacks: Drawbacks have been elevated by splitting delphes and sfs based execution modes. This hasn't been extensively tested yet but should solve the problem.