jet substructure example

Asked by safa gaid

Hi,

I'm using the expert mode and trying to apply jet substructure. I'm testing the example from the substructure branch, the Pruner file. I faced many errors. and this is what the terminal shows when I try to build a Madanalysis job.

hp@hp-HP-Pavilion-15-Notebook-PC:~/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/my_workspace/Build$ make all clean
-e --------------------------------------------------------
-e Building MadAnalysis Job
-e --------------------------------------------------------
-e --------------------------------------------------------
-e Compilation
-e --------------------------------------------------------
c++ -Wall -O3 -fPIC -I/home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/ -I./ -pthread -std=c++11 -m64 -I/usr/local/root-6.20.06/obj/include -o Main/main.o -c Main/main.cpp
In file included from ./SampleAnalyzer/User/Analyzer/analysisList.h:1,
                 from Main/main.cpp:12:
./SampleAnalyzer/User/Analyzer/test.h:9:1: error: expected class-name before ‘{’ token
    9 | {
      | ^
./SampleAnalyzer/User/Analyzer/test.h:11:23: error: ‘Pruner’ in namespace ‘Substructure’ does not name a type
   11 | Substructure::Pruner pruner;
      | ^~~~~~
./SampleAnalyzer/User/Analyzer/test.h:27:30: error: ‘SampleFormat’ has not been declared
   27 | virtual bool Execute(SampleFormat& sample, const EventFormat& event)
      | ^~~~~~~~~~~~
./SampleAnalyzer/User/Analyzer/test.h:27:58: error: ‘EventFormat’ does not name a type; did you mean ‘EventFormat_h’?
   27 | virtual bool Execute(SampleFormat& sample, const EventFormat& event)
      | ^~~~~~~~~~~
      | EventFormat_h
./SampleAnalyzer/User/Analyzer/test.h:48:2: error: expected ‘;’ after class definition
   48 | }
      | ^
      | ;
./SampleAnalyzer/User/Analyzer/test.h: In member function ‘virtual bool Substructure::test::Initialize(const MA5::Configuration&, const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&)’:
./SampleAnalyzer/User/Analyzer/test.h:17:13: error: ‘AddDefaultHadronic’ was not declared in this scope
   17 | AddDefaultHadronic();
      | ^~~~~~~~~~~~~~~~~~
./SampleAnalyzer/User/Analyzer/test.h:18:13: error: ‘AddDefaultInvisible’ was not declared in this scope
   18 | AddDefaultInvisible();
      | ^~~~~~~~~~~~~~~~~~~
./SampleAnalyzer/User/Analyzer/test.h:24:13: error: ‘pruner’ was not declared in this scope
   24 | pruner.Initialize(Substructure::cambridge, 0.2, 0.2, 0.3);
      | ^~~~~~
./SampleAnalyzer/User/Analyzer/test.h:24:45: error: ‘cambridge’ is not a member of ‘Substructure’
   24 | pruner.Initialize(Substructure::cambridge, 0.2, 0.2, 0.3);
      | ^~~~~~~~~
./SampleAnalyzer/User/Analyzer/test.h: In member function ‘virtual bool Substructure::test::Execute(int&, const int&)’:
./SampleAnalyzer/User/Analyzer/test.h:30:13: error: ‘RecJets’ was not declared in this scope
   30 | RecJets AK08 = filter(event.rec()->jets("AK08"), 200., 2.5);
      | ^~~~~~~
./SampleAnalyzer/User/Analyzer/test.h:32:17: error: ‘AK08’ was not declared in this scope
   32 | if (AK08.size() > 0)
      | ^~~~
./SampleAnalyzer/User/Analyzer/test.h:34:58: error: ‘endmsg’ was not declared in this scope; did you mean ‘MA5::endmsg’?
   34 | INFO << "Prune the leading AK08 jet:" << endmsg;
      | ^~~~~~
      | MA5::endmsg
In file included from /home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/SampleAnalyzer/Commons/Service/LogService.h:38,
                 from /home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/SampleAnalyzer/Process/Core/SampleAnalyzer.h:37,
                 from Main/main.cpp:11:
/home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/SampleAnalyzer/Commons/Service/LogStream.h:460:12: note: ‘MA5::endmsg’ declared here
  460 | LogStream& endmsg(LogStream& os);
      | ^~~~~~
In file included from ./SampleAnalyzer/User/Analyzer/analysisList.h:1,
                 from Main/main.cpp:12:
./SampleAnalyzer/User/Analyzer/test.h:35:23: error: ‘RecJet’ does not name a type
   35 | const RecJet prunedjet = pruner.Execute(AK08[0]);
      | ^~~~~~
./SampleAnalyzer/User/Analyzer/test.h:36:44: error: ‘prunedjet’ was not declared in this scope
   36 | INFO << "pT(j_filt) = " << prunedjet->pt() << " pT(j_1) = " << AK08[0]->pt() << endmsg;
      | ^~~~~~~~~
./SampleAnalyzer/User/Analyzer/test.h:40:20: error: expected ‘;’ before ‘AK08_pruned’
   40 | RecJets AK08_pruned = pruner.Execute(AK08);
      | ^~~~~~~~~~~~
      | ;
./SampleAnalyzer/User/Analyzer/test.h:41:34: error: ‘AK08_pruned’ was not declared in this scope
   41 | for (MAuint32 i=0; i<AK08_pruned.size(); i++)
      | ^~~~~~~~~~~
./SampleAnalyzer/User/Analyzer/test.h:44:62: error: ‘AK08’ was not declared in this scope
   44 | << "Original Jet(" << i << ") pT = " << AK08[i]->pt() << endmsg;
      | ^~~~
./SampleAnalyzer/User/Analyzer/test.h:44:79: error: ‘endmsg’ was not declared in this scope; did you mean ‘MA5::endmsg’?
   44 | << "Original Jet(" << i << ") pT = " << AK08[i]->pt() << endmsg;
      | ^~~~~~
      | MA5::endmsg
In file included from /home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/SampleAnalyzer/Commons/Service/LogService.h:38,
                 from /home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/SampleAnalyzer/Process/Core/SampleAnalyzer.h:37,
                 from Main/main.cpp:11:
/home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/SampleAnalyzer/Commons/Service/LogStream.h:460:12: note: ‘MA5::endmsg’ declared here
  460 | LogStream& endmsg(LogStream& os);
      | ^~~~~~
In file included from Main/main.cpp:12:
./SampleAnalyzer/User/Analyzer/analysisList.h: In function ‘void Substructure::BuildUserTable(MA5::AnalyzerManager&)’:
./SampleAnalyzer/User/Analyzer/analysisList.h:12:22: error: cannot convert ‘Substructure::test*’ to ‘MA5::AnalyzerBase*’
   12 | manager.Add("test",new test);
      | ^~~~~~~~
      | |
      | Substructure::test*
In file included from /home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/SampleAnalyzer/Process/Reader/ReaderManager.h:31,
                 from /home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/SampleAnalyzer/Process/Core/SampleAnalyzer.h:40,
                 from Main/main.cpp:11:
/home/hp/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/tools/SampleAnalyzer/Process/Core/ManagerBase.h:155:49: note: initializing argument 2 of ‘MAbool MA5::ManagerBase<T>::Add(std::string, T*) [with T = MA5::AnalyzerBase; MAbool = bool; std::string = std::__cxx11::basic_string<char>]’
  155 | MAbool ManagerBase<T>::Add(std::string name, T* object)
      | ~~~^~~~~~
Main/main.cpp: At global scope:
Main/main.cpp:120:1: error: expected ‘}’ at end of input
  120 | }
      | ^
In file included from ./SampleAnalyzer/User/Analyzer/analysisList.h:1,
                 from Main/main.cpp:12:
./SampleAnalyzer/User/Analyzer/test.h:7:1: note: to match this ‘{’
    7 | {
      | ^
make: *** [Makefile:101: Main/main.o] Error 1
hp@hp-HP-Pavilion-15-Notebook-PC:~/MG5_aMC_v3_3_1/HEPTools/madanalysis5/madanalysis5/my_workspace/Build$

Question information

Language:
English Edit question
Status:
Answered
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jack Y. Araz (jackaraz) said :
#1

** MadAnalysis 5 has been mitigated to GitHub! If you have any questions or bug reports please refer to the Issues section in our new GitHub repository. Launchpad will no longer be used.

 - GitHub Repository: https://github.com/MadAnalysis/madanalysis5
 - Issues: https://github.com/MadAnalysis/madanalysis5/issues
 - Discussions: https://github.com/MadAnalysis/madanalysis5/discussions
 - Latest MadAnalysis 5 release: https://github.com/MadAnalysis/madanalysis5/releases

Can you help with this problem?

Provide an answer of your own, or ask safa gaid for more information if necessary.

To post a message you must log in.