Skip to content

Troubleshooting (*)

Brenda Fabela edited this page May 17, 2020 · 4 revisions

This page is mostly based on a document written for previous versions of the Analyzer (old README.md file). New information will become available as issues appear and get fixed.


Possible errors

In this section, some errors you can find during installation and how to solve them. If you don't see yours here, contact the team for help providing as much information as possible and how the issue was fixed. The intention is to make a bank of errors and solutions in this page accessible to all users.


Installation

1. Special analyzer

Issue: After building the Analyzer with make -j8, you see the following error:

src/main.cc:5:21: fatal error: AFSpecAna/SpechialAnalysis.h: No such file or directory
 #include QUOTE(MYANA)
                     ^
compilation terminated.
make: *** [Makefile:98: obj/main.o] Error 1

Possible cause: You have set in your bash export MYANA=AFSpecAna (this also includes your ~/.bashrc or ~/.bash_profile files).

Solution:

  • You have to provide a AFSpecAna/SpechialAnalysis.h or,
  • Set the environment variable MYANA to the default SpecialAnalyzer included in your installation, if you don't want to use this functionality.
export MYANA=SpecialAna

For more information about the SpecialAnalyzer, see this page.


README.md (outdated)

If you have problems at compilation, you might want to compile with debug flags and get the debug symbols. In your Analyzer directory type:

make clean 
DEBUG=1 make -j8

Then, run in DEBUG mode:

gdb --args ./Analyzer -in root://cmsxrootd.fnal.gov///store/mc/RunIISummer16NanoAODv6/TT_TuneCUETP8M2T4_13TeV-powheg-pythia8/NANOAODSIM/PUMoriond17_Nano25Oct2019_102X_mcRun2_asymptotic_v7-v2/20000/35CE4B6A-2C53-D544-B50B-53A54910AB7D.root -out test_2.root

Then type run and when it crashes, type where. Some examples of when to use this are below:

A: Segmentation Fault

If you get a segmentation fault, it can mean one of two things. If the error looks like:

$ ./Analyzer OutTree.root test.root
setup start
TOTAL EVENTS: ###
setup complete

 *** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
...
...
###  0x00007fc6e0d9d3f7 in std::__throw_out_of_range (__s=__s entry=0x47dd90 "_Map_base::at") at ../../../../../libstdc++-v3/src/c++11/functexcept.cc:90
...

This is a map out of bound error. This means one of your values is not named correctly or is being parsed as the wrong values. To check which values, look at the top of the stack. I should look something like this:

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
...
...
#12 Analyzer::getGoodRecoLeptons (this=this
entry=0x7fff69207790, lep=..., ePos=ePos
entry=CUTS::eRTau1, eGenPos=eGenPos
entry=CUTS::eGTau, stats=...) at src/Analyzer.cc:561
#13 0x0000000000463110 in Analyzer::preprocess (this=0x7fff69207790, event=0) at src/Analyzer.cc:130
#14 0x000000000041d4ac in main ()
===========================================================

In this example, we can see in line #12, the function called getGoodRecoLeptons, and based on the CUTS value sent in (eRTau1), we can see that the RecoTau1 has a value that is wrong. Now we have to just go into PartDet/Tau_info.in and look under Tau1 to find the error. To help with this, one can look through the function in src/Analyzer.cc.

B: Segmentation fault with TBranch Error

If the error looks like:

$ ./Analyzer TNT.root test.root
setup start
TOTAL EVENTS: 493
Error in <TTree::SetBranchStatus>: unknown branch -> Tau_byTightIsolationMVArun2v1DBnewDMwLT
Error in <TTree::SetBranchAddress>: unknown branch -> Tau_byTightIsolationMVArun2v1DBnewDMwLT
setup complete

 *** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
...
...
...

The error is being thrown by ROOT because some of the Branches haven't been set correctly. This can happen because the these branches have different names in the NanoAOD version of the samples you are analyzing, or because the name is simply misspelled. ROOT tells you which branch has been set wrong.