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

Store decision for multiple JVT working points #1428

Open
jbossios opened this issue Mar 24, 2020 · 7 comments
Open

Store decision for multiple JVT working points #1428

jbossios opened this issue Mar 24, 2020 · 7 comments

Comments

@jbossios
Copy link
Contributor

Hello,

I'm trying to save the JVT decision for all the working points using TreeAlgo and JetSelector. TreeAlgo is creating the branches but is filling correctly only one, the rest are -1. Even when I have one JetSelector instance for each JVT working point. For some reason, only the decoration for the first JetSelector instance can be found. The output jet container from the first JetSelector instance is used as input for the second instance of JetSelector. I would thought that should make the trick but the decoration can only be found for the first working point. In addition, if I try to retrieve the decoration within the second instance of JetSelector, it can not be found too. I don't know what could be the problem.

Someone has any idea of what is going on?

Best,
Jona

@kratsg
Copy link
Contributor

kratsg commented Mar 24, 2020

Just a guess, but looking at

if ( m_infoSwitch.m_trackPV || m_infoSwitch.m_sfJVTName == "Loose" ) {
safeFill<char, int, xAOD::Jet>(jet, jvtPass_Loose, m_JvtPass_Loose, -1);
if ( m_mc ) {
if ( jvtSF_Loose.isAvailable( *jet ) ) {
m_JvtEff_SF_Loose->push_back( jvtSF_Loose( *jet ) );
} else {
m_JvtEff_SF_Loose->push_back( junkSF );
}
}
}
if ( m_infoSwitch.m_trackPV || m_infoSwitch.m_sfJVTName == "Medium" ) {
safeFill<char, int, xAOD::Jet>(jet, jvtPass_Medium, m_JvtPass_Medium, -1);
if ( m_mc ) {
if ( jvtSF_Medium.isAvailable( *jet ) ) {
m_JvtEff_SF_Medium->push_back( jvtSF_Medium( *jet ) );
} else {
m_JvtEff_SF_Medium->push_back( junkSF );
}
}
}
if ( m_infoSwitch.m_trackPV || m_infoSwitch.m_sfJVTName == "Tight" ) {
safeFill<char, int, xAOD::Jet>(jet, jvtPass_Tight, m_JvtPass_Tight, -1);
if ( m_mc ) {
if ( jvtSF_Tight.isAvailable( *jet ) ) {
m_JvtEff_SF_Tight->push_back( jvtSF_Tight( *jet ) );
} else {
m_JvtEff_SF_Tight->push_back( junkSF );
}
}
}
if ( m_infoSwitch.m_trackPV || m_infoSwitch.m_sffJVTName == "Medium" ) {
safeFill<char, int, xAOD::Jet>(jet, fjvtPass_Medium, m_fJvtPass_Medium, -1);
if ( m_mc ) {
if ( fjvtSF_Medium.isAvailable( *jet ) ) {
m_fJvtEff_SF_Medium->push_back( fjvtSF_Medium( *jet ) );
} else {
m_fJvtEff_SF_Medium->push_back( junkSF );
}
}
}
if ( m_infoSwitch.m_trackPV || m_infoSwitch.m_sffJVTName == "Tight" ) {
safeFill<char, int, xAOD::Jet>(jet, fjvtPass_Tight, m_fJvtPass_Tight, -1);
if ( m_mc ) {
if ( fjvtSF_Tight.isAvailable( *jet ) ) {
m_fJvtEff_SF_Tight->push_back( fjvtSF_Tight( *jet ) );
} else {
m_fJvtEff_SF_Tight->push_back( junkSF );
}
}
}

it looks like it only supports this for a single JVT working point unless you do m_trackPV. Perhaps an extra configuration could be added for m_JVT or m_JVTAll which flags them all on?

What's your infoswitch look like here?

@jbossios
Copy link
Contributor Author

I already have trackPV in m_jetDetailStr, I do have the branches but all of them except one is filled with -1. I checked and indeed those decorations do not exist, but then, in JetSelector the decoration is being created but if I check for the decoration right after it is created in JetSelector it can not find it. Something weird is going on.

@jbossios
Copy link
Contributor Author

jbossios commented Mar 26, 2020

I could prepare an example config that has that problem if it helps.

@kratsg
Copy link
Contributor

kratsg commented Mar 27, 2020

I could prepare an example config that crashes if it helps.

a way for me to repro would be good. so i can understand what collection and look into things step by step.

@jbossios
Copy link
Contributor Author

Hi @kratsg

You can find an example config here:
/afs/cern.ch/user/j/jbossios/work/public/xAODAnaHelpers/ReproduceEmptyJVTbranches/source/xAODAnaHelpers/data/config_Tree_MC16a_ZMUBJETS_AntiKt4EMPFlow_NominalOnly.py

You can use the following DAOD:
/eos/atlas/atlascerngroupdisk/phys-sm/ZHF_FullRun2/TestDxAODs/MC16a_Zmumu/STDM3/p3970/mc16_13TeV/DAOD_STDM3.19273088._000032.pool.root.1

You can find the output TTree here:
/afs/cern.ch/user/j/jbossios/work/public/xAODAnaHelpers/ReproduceEmptyJVTbranches/submitDir/data-tree

As you can see, the 'jet_JvtPass_Medium' branch is filled properly, while 'jet_JvtPass_Tight' is always -1.

Thanks for the help!

Best,
Jona

@jbossios
Copy link
Contributor Author

jbossios commented Apr 2, 2020

Hi @kratsg

Did you have a chance to try my config?

Thanks for your help!

Best,
Jona

@kratsg
Copy link
Contributor

kratsg commented Jun 23, 2020

So I looked at this, and struggled to find a good solution to make things work without rewriting everything and making it backwards-compatible. Basically, this portion:

static SG::AuxElement::ConstAccessor< float > jvt ("Jvt");
safeFill<float, float, xAOD::Jet>(jet, jvt, m_Jvt, -999);

I'm honestly out of ideas to make this work.

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

No branches or pull requests

2 participants