IAP GITLAB

Commit b539ea66 authored by Tanguy Pierog's avatar Tanguy Pierog

update README


git-svn-id: https://devel-ik.fzk.de/svn/mc/crmc/tags/crmc.v1.5.4@4858 c7a5e08c-de06-0410-9364-b41cf42a0b17
parent 78e11388
This diff is collapsed.
##################################################################
# This module tries to find the HepMC installation on your system.
# Usage:
# FIND_PACKAGE( HepMC [REQUIRED] [COMPONENTS HepMCfio ...] )
#
# It sets the following variables:
# ${HEPMC_FOUND}
# ${HepMC_INCLUDE_DIRS}
# ${HepMC_LIBRARY_DIRS}
# ${HepMC_LIBRARIES}
#
# ${HepMC_HEPEVT_SIZE}
#
##################################################################
MESSAGE(STATUS "Looking for HepMC...")
# default hepmc common block size:
Set( HepMC_HEPEVT_SIZE 99990 )
## try to find each HepMC components in user defined path
FOREACH (COMPONENT ${HepMC_FIND_COMPONENTS})
FIND_LIBRARY(${COMPONENT}_PATH
NAMES
${COMPONENT}
PATHS
/usr
/usr/local
${HEPMC_PREFIX}
${HEPMC_ROOT}
${HEPMC_ROOT_DIR}
${HEP_ROOT}
$ENV{HEPMC_PREFIX}
$ENV{HEPMC_ROOT}
$ENV{HEPMC_ROOT_DIR}
$ENV{HEP_ROOT}
PATH_SUFFIXES
lib
lib64
)
# set found flag
IF ({${${COMPONENT}_PATH} MATCHES "${COMPONENT}_PATH-NOTFOUND")
SET(HEPMC_FOUND FALSE)
ELSE ({${${COMPONENT}_PATH} MATCHES "${COMPONENT}_PATH-NOTFOUND")
MESSAGE (STATUS "HepMC ${COMPONENT} library path found: ${${COMPONENT}_PATH}")
ENDIF ({${${COMPONENT}_PATH} MATCHES "${COMPONENT}_PATH-NOTFOUND")
ENDFOREACH (COMPONENT HepMC_FIND_COMPONENTS)
## search for include path
FIND_PATH(HepMC_INCLUDE_DIRS
NAMES
HepMC/GenEvent.h
PATHS
/usr
/usr/local
${HEPMC_PREFIX}
${HEPMC_ROOT}
${HEPMC_ROOT_DIR}
${HEP_ROOT}
$ENV{HEPMC_PREFIX}
$ENV{HEPMC_ROOT}
$ENV{HEPMC_ROOT_DIR}
$ENV{HEP_ROOT}
PATH_SUFFIXES
include
)
# set found flag
IF (${HepMC_INCLUDE_DIRS} MATCHES "HepMC_INCLUDE_DIRS-NOTFOUND")
SET(HEPMC_FOUND FALSE)
ELSE (${HepMC_INCLUDE_DIRS} MATCHES "HepMC_INCLUDE_DIRS-NOTFOUND")
MESSAGE(STATUS "HepMC include path found: " ${HepMC_INCLUDE_DIRS} )
ENDIF (${HepMC_INCLUDE_DIRS} MATCHES "HepMC_INCLUDE_DIRS-NOTFOUND")
## final printout
# if not found
IF(${HEPMC_FOUND} MATCHES "FALSE")
IF (HepMC_FIND_REQUIRED)
MESSAGE( FATAL_ERROR
"HepMC shared library or includes not found\n"
"Please install HepMC and/or set HEPMC_PREFIX environment\n"
)
ELSE (HepMC_FIND_REQUIRED)
MESSAGE( WARNING
"HepMC shared library or includes not found\n"
"Please install HepMC and/or set HEPMC_PREFIX environment\n"
)
ENDIF (HepMC_FIND_REQUIRED)
# end if not found
# if found :
ELSE(${HEPMC_FOUND} MATCHES "FALSE")
SET(HEPMC_FOUND TRUE)
# find length of hepmc common block pre-defined and use this for epos
EXECUTE_PROCESS (COMMAND cat ${HepMC_INCLUDE_DIRS}/HepMC/HEPEVT_Wrapper.h
COMMAND grep "#define HEPEVT_EntriesAllocation"
COMMAND awk "{print $3}"
COMMAND tr "\n" " "
COMMAND sed "s/ //"
OUTPUT_VARIABLE HepMC_HEPEVT_SIZE
)
MESSAGE( INFO "-HepMC: HEPEVT_EntriesAllocation in file \"${HepMC_INCLUDE_DIRS}/HepMC/HEPEVT_Wrapper.h\" is \"${HepMC_HEPEVT_SIZE}\"" )
MESSAGE( INFO "-HepMC: This limits the maximum number of particles per event you can have. " )
MESSAGE( INFO "-HepMC: Change you HepMC library if you run into limitation! " )
#set HepMC_LIBRARY_DIRS (extract from first component)
list(GET HepMC_FIND_COMPONENTS 0 TMP)
#extract the path from variable component_path and put in hepmc_library_dirs
GET_FILENAME_COMPONENT(HepMC_LIBRARY_DIRS ${TMP}_PATH PATH)
#set HepMC_LIBRARIES
FOREACH(COMPONENT ${HepMC_FIND_COMPONENTS})
list(APPEND HepMC_LIBRARIES ${${COMPONENT}_PATH})
ENDFOREACH(COMPONENT ${HepMC_FIND_COMPONENTS})
ENDIF(${HEPMC_FOUND} MATCHES "FALSE")
#This code is adapted from FindRoot used in Offline (http://arxiv.org/abs/0707.1652)
################################################################################
# Module to find Root #
# #
# This sets the following variables: #
# - Root_FOUND #
# - ROOT_LIBRARIES #
# - ROOT_GUI_LIBRARIES #
# - ROOT_INCLUDE_DIR #
# - ROOT_BIN_DIR #
# - ROOTSYS #
# - ROOTCINT #
# - ROOT_CPPFLAGS #
# - ROOT_LDFLAGS #
# - ROOT_VERSION #
# #
# And these might be needed as well... we'll see: #
# - ROOT_LIBS #
# - ROOT_GLIBS #
# - ROOT_LIBDIR #
################################################################################
# If root was found already, don't find it again.
# This works because Root_FOUND is not cached
IF (NOT Root_FOUND)
# Minimum ROOT requirements.
SET (ROOT_MIN_REQUIRED_VERSION "5.16.00")
# the following disables all default paths (either from cmake, from environment)
FIND_PATH (ROOT_BIN_DIR root-config
PATHS
${ROOTSYS}/bin
$ENV{ROOTSYS}/bin
$ENV{AUGER_BASE}/External/ROOT/pro/bin
NO_DEFAULT_PATH
)
# now defaults are allowed but if nothing is found it is not overwritten
# (because it is cached)
FIND_PATH (ROOT_BIN_DIR root-config)
GET_FILENAME_COMPONENT (ROOTSYS ${ROOT_BIN_DIR} PATH)
IF (NOT ENV{ROOTSYS})
SET (ENV{ROOTSYS} ${ROOTSYS})
ENDIF (NOT ENV{ROOTSYS})
IF (ROOTSYS)
# ----------------------------------------------------------------------------
# Get ROOT version, re-express in form XX.YY.ZZ, compare to requirements.
# ----------------------------------------------------------------------------
EXECUTE_PROCESS (COMMAND ${ROOT_BIN_DIR}/root-config --version
OUTPUT_VARIABLE ROOT_VERSION
)
STRING (REGEX REPLACE "[ \t\r\n]+" "" ROOT_VERSION "${ROOT_VERSION}")
STRING (REGEX REPLACE "/" "." ROOT_VERSION "${ROOT_VERSION}")
# Note: letters sometimes appended to ROOT patches (e.g., 5.14/00e) will be
# ignored in the version comparison.
IF ("${ROOT_VERSION}" VERSION_GREATER ${ROOT_MIN_REQUIRED_VERSION})
SET(_have_MIN_ROOT_VER 1)
ENDIF ("${ROOT_VERSION}" VERSION_GREATER ${ROOT_MIN_REQUIRED_VERSION})
IF (${_have_MIN_ROOT_VER} GREATER 0 OR ${_have_MIN_ROOT_VER} EQUAL 0)
# --------------------------------------------------------------------------
# Set ROOT compilation flags.
# --------------------------------------------------------------------------
SET (Root_FOUND TRUE)
SET (HAVE_ROOT 1)
EXECUTE_PROCESS (COMMAND ${ROOT_BIN_DIR}/root-config --noldflags --libs
OUTPUT_VARIABLE ROOT_LIBS
)
STRING (REGEX REPLACE "[ \t\r\n]+" " " ROOT_LIBS "${ROOT_LIBS}")
# Check if ROOT has Minuit2
EXECUTE_PROCESS (COMMAND ${ROOT_BIN_DIR}/root-config --has-minuit2
OUTPUT_VARIABLE HAVE_MINUIT2)
IF (${HAVE_MINUIT2} STREQUAL "yes\n")
SET (ROOT_LIBS "${ROOT_LIBS} -lMinuit2")
SET (ROOT_MINUIT2_FOUND TRUE)
ENDIF (${HAVE_MINUIT2} STREQUAL "yes\n")
EXECUTE_PROCESS (COMMAND ${ROOT_BIN_DIR}/root-config --libs
OUTPUT_VARIABLE ROOT_LDFLAGS
)
STRING (REGEX REPLACE "[ \t\r\n]+" " " ROOT_LDFLAGS "${ROOT_LDFLAGS}")
EXECUTE_PROCESS (COMMAND ${ROOT_BIN_DIR}/root-config --glibs
OUTPUT_VARIABLE ROOT_GLIBS
)
STRING (REGEX REPLACE "[ \t\r\n]+" "" ROOT_GLIBS "${ROOT_GLIBS}")
EXECUTE_PROCESS (COMMAND ${ROOT_BIN_DIR}/root-config --libdir
OUTPUT_VARIABLE _ROOT_LIBDIR
)
STRING (REGEX REPLACE "[ \t\r\n]+" "" ROOT_LIBDIR "${_ROOT_LIBDIR}")
EXECUTE_PROCESS (COMMAND ${ROOT_BIN_DIR}/root-config --incdir
OUTPUT_VARIABLE ROOT_INCLUDE_DIR
)
STRING (REGEX REPLACE "[ \t\r\n]+" "" ROOT_INCLUDE_DIR "${ROOT_INCLUDE_DIR}")
EXECUTE_PROCESS (COMMAND ${ROOT_BIN_DIR}/root-config --cflags
OUTPUT_VARIABLE ROOT_CPPFLAGS
)
STRING (REGEX REPLACE "[ \t\r\n]+" " " ROOT_CPPFLAGS "${ROOT_CPPFLAGS}")
SET (ROOTCINT ${ROOT_BIN_DIR}/rootcint)
# --------------------------------------------------------------------------
# Find ROOT libraries.
# --------------------------------------------------------------------------
STRING (REGEX REPLACE "-l" " " CRAP "${ROOT_LIBS}")
STRING (REGEX REPLACE "-" " " CRAP "${CRAP}")
SEPARATE_ARGUMENTS (CRAP)
FOREACH (_file ${CRAP})
FIND_LIBRARY (_LIBY${_file} ${_file} ${ROOT_LIBDIR} NO_DEFAULT_PATH)
IF (_LIBY${_file})
LIST (APPEND ROOT_LIBRARIES ${_LIBY${_file}})
ENDIF (_LIBY${_file})
SET (_LIBY${_file} ${_LIBY${_file}} CACHE INTERNAL "" FORCE)
ENDFOREACH (_file)
STRING (REGEX REPLACE "-l" " " CRAP "${ROOT_GLIBS}")
STRING (REGEX REPLACE "-" " " CRAP "${CRAP}")
SEPARATE_ARGUMENTS (CRAP)
FOREACH (_file ${CRAP})
FIND_LIBRARY (_LIBY${_file} ${_file} ${ROOT_LIBDIR} NO_DEFAULT_PATH)
IF (_LIBY${_file})
LIST (APPEND ROOT_GUI_LIBRARIES ${_LIBY${_file}})
ENDIF (_LIBY${_file})
SET (_LIBY${_file} ${_LIBY${_file}} CACHE INTERNAL "" FORCE)
ENDFOREACH (_file)
FIND_LIBRARY (_ROOT_GQT_LIBRARY GQt ${ROOT_LIBDIR} NO_DEFAULT_PATH)
FIND_LIBRARY (_ROOT_QTROOT_LIBRARY QtRoot ${ROOT_LIBDIR} NO_DEFAULT_PATH)
IF (_ROOT_GQT_LIBRARY AND _ROOT_QTROOT_LIBRARY)
SET (ROOT_QTROOT_LIBRARIES ${_ROOT_GQT_LIBRARY} ${_ROOT_QTROOT_LIBRARY} ${ROOT_GUI_LIBRARIES})
ENDIF (_ROOT_GQT_LIBRARY AND _ROOT_QTROOT_LIBRARY)
ELSE (${_have_MIN_ROOT_VER} GREATER 0 OR ${_have_MIN_ROOT_VER} EQUAL 0)
SET (Root_FOUND FALSE)
SET (HAVE_ROOT 0)
IF (NOT Root_FIND_QUIETLY)
MESSAGE (STATUS
"Compatible version of ROOT not found. "
"Minimum required version: ${ROOT_MIN_REQUIRED_VERSION}")
ENDIF (NOT Root_FIND_QUIETLY)
ENDIF (${_have_MIN_ROOT_VER} GREATER 0 OR ${_have_MIN_ROOT_VER} EQUAL 0)
ENDIF (ROOTSYS)
SET (_DIRECTORIES)
IF (NOT DL_LIBRARY)
FIND_LIBRARY (DL_LIBRARY dl)
MARK_AS_ADVANCED (DL_LIBRARY)
ENDIF (NOT DL_LIBRARY)
SET (ROOT_LIBRARIES ${ROOT_LIBRARIES} ${DL_LIBRARY})
IF (Root_FOUND)
#add minuit
FIND_LIBRARY (ROOT_MINUIT_LIB Minuit ${ROOT_LIBDIR} NO_DEFAULT_PATH)
IF (Root_FIND_REQUIRED_Minuit2 AND NOT ROOT_MINUIT2_FOUND)
MESSAGE(FATAL_ERROR "
------------------------------------------------
Could not find required Minuit2 library
------------------------------------------------\n")
ENDIF (Root_FIND_REQUIRED_Minuit2 AND NOT ROOT_MINUIT2_FOUND)
IF (ROOT_MINUIT_LIB)
SET (ROOT_LDFLAGS "${ROOT_LDFLAGS} -lMinuit")
SET (ROOT_MINUIT_LIB ${ROOT_MINUIT_LIB} CACHE INTERNAL "" FORCE)
ELSE (ROOT_MINUIT_LIB)
MESSAGE(FATAL_ERROR "Could not find TMinuit library in ${ROOT_LIBDIR}")
ENDIF (ROOT_MINUIT_LIB)
LIST (APPEND ROOT_LIBRARIES ${ROOT_MINUIT_LIB})
IF (NOT Root_FIND_QUIETLY)
MESSAGE (STATUS "Root: ${ROOTSYS}")
ENDIF (NOT Root_FIND_QUIETLY)
ELSE (Root_FOUND)
IF (Root_FIND_REQUIRED)
MESSAGE (FATAL_ERROR "Could not find Root")
else (Root_FIND_REQUIRED)
if (NOT Root_FIND_QUIETLY)
MESSAGE (STATUS "Could not find Root")
endif (NOT Root_FIND_QUIETLY)
ENDIF (Root_FIND_REQUIRED)
ENDIF (Root_FOUND)
###########################################
#
# Macros for building ROOT dictionary
#
###########################################
# The following macro creates rules for a dictionary
# If the LinkDef file is called SomeLinkDef.h
# it will create the files SomeDictionary.cc and SomeDictionary.h
# it defines the variables $Some_DICT_DOURCE and $Some_DICT_HEADER
# $Some_INFILES $Some_INCLUDE_DIRS $Some_VERBOSE
# local variables: _LINKDEF _INCLUDE_DIRS _NAME _current_FILE
MACRO (ROOT_GENERATE_DICTIONARY _NAME)
PARSE_ARGUMENTS (${_NAME}
"LINKDEF;INFILES;INCLUDE_DIRS;DEFINE_FLAGS"
"VERBOSE"
${ARGN}
)
SET (_INCLUDE_DIRS)
SET (${_NAME}_DICT_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${_NAME}Dictionary.cc)
SET (${_NAME}_DICT_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${_NAME}Dictionary.h)
# Set up the list of includes
FOREACH (_current_FILE ${${_NAME}_INCLUDE_DIRS} ${_DIR_INCLUDES})
SET (_INCLUDE_DIRS ${_INCLUDE_DIRS} -I${_current_FILE})
ENDFOREACH (_current_FILE ${${_NAME}_INCLUDE_DIRS})
# Set up the list of compiler definitions
FOREACH (_current_DEF ${${_NAME}_DEFINE_FLAGS} ${_DEF_FLAGS})
SET (_DEFINE_FLAGS ${_DEFINE_FLAGS} -D${_current_DEF})
ENDFOREACH (_current_DEF ${${_NAME}_DEFINE_FLAGS})
# Set up the call to rootcint
IF (${_NAME}_VERBOSE)
MESSAGE (STATUS "Root dictionary:\n ${_NAME}_INFILES: ${${_NAME}_INFILES}")
MESSAGE (" OutFILEs: ${${_NAME}_DICT_SOURCE} ${${_NAME}_DICT_HEADER}")
MESSAGE (" LINKDEF: ${${_NAME}_LINKDEF}")
ENDIF (${_NAME}_VERBOSE)
ADD_CUSTOM_COMMAND (OUTPUT ${${_NAME}_DICT_SOURCE} ${${_NAME}_DICT_HEADER}
COMMAND ${ROOTCINT} -f ${${_NAME}_DICT_SOURCE} -c ${_INCLUDE_DIRS} ${_DEFINE_FLAGS} ${${_NAME}_INFILES} ${${_NAME}_LINKDEF}
DEPENDS ${${_NAME}_INFILES}
)
ENDMACRO (ROOT_GENERATE_DICTIONARY)
ENDIF (NOT Root_FOUND)
SYSTEM=$(shell uname)
SYSTEM2=$(shell uname -m)
m32=$(shell if [ "$(SYSTEM2)" = "i686" ]; then echo "-m32"; fi)
SOURCE_DIR=src/
VER=199
LIBDIR=obj/
CFLAGS = $(m32) -ggdb3 -pipe -Wall
CXXFLAGS = $(m32) -ggdb3 -pipe -Wall
CXXFLAGS += -Wpacked -malign-double -mpreferred-stack-boundary=8
ifndef CXX
CXX = g++
endif
ifndef CC
CC = gcc
endif
ROOTCFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs) -lEG
HEPCFLAGS = -I$(HEP_ROOT)/include
HEPLIBS = -L$(HEP_ROOT)/lib -lHepMC -lHepMCfio
BOOSTLIBS = -lboost_iostreams -lboost_system
CFLAGS = $(ROOTCFLAGS) $(HEPCFLAGS)
LIBS = $(ROOTLIBS) $(HEPLIBS) $(BOOSTLIBS)
CXXFILES=analysis.cc
OBJS=$(FILES:%.f=$(LIBDIR)%.o)
CXXOBJS=$(CXXFILES:%.cc=$(LIBDIR)%.o)
all: check dirs bin_dir bin/analyse
.PHONY : check
check:
@if [ -z "$(HEP_ROOT)" ]; then echo "Please set HEP_ROOT to the root directory of HepMC2"; exit 1; fi
@if [ -z "$(ROOTSYS)" ]; then echo "Please set ROOTSYS to the root directory of root"; exit 1; fi
bin/analyse: $(OBJS) $(CXXOBJS)
$(CXX) $(CXXFLAGS) $(OBJS) $(CXXOBJS) -o $@ $(LIBS)
@(echo "")
@(echo "==> compilation successful!")
@(echo "==> type bin/analyse")
@(echo "")
$(OBJS) : $(LIBDIR)%.o : $(SOURCE_DIR)%.f
$(FC) -o $@ -c $<
$(CXXOBJS) : $(LIBDIR)%.o : $(SOURCE_DIR)%.cc src/analysis.h
$(CXX) $(CXXFLAGS) $(CFLAGS) -o $@ -c $<
dirs:
@if [ ! -d $(LIBDIR) ] ;then \
set -x; mkdir -p $(LIBDIR); set +x;\
fi
bin_dir:
@if [ ! -d bin ] ;then \
set -x; mkdir -p bin; set +x; \
fi
clean:
rm -rf $(LIBDIR)
rm -rf bin
rm -f *.copy *.check fort*
rm -f IO_GenEvent.dat
rm -f *~ \#*\# */*~
#;;; Emacs Setup
#;;; Local Variables:
#;;; mode: Makefile
#;;; End:
This diff is collapsed.
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <stdexcept>
#include <string>
#include <sstream>
#include <fstream>
#include <math.h>
#include <stdlib.h>
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include "HepMC/IO_HEPEVT.h"
#include "HepMC/GenParticle.h"
#include <HepMC/HeavyIon.h>
#include "HepMC/HEPEVT_Wrapper.h"
#include "HepMC/IO_GenEvent.h"
#include "HepMC/Units.h"
#include "HepMC/GenEvent.h"
#include <TFile.h>
#include <TH1D.h>
#include "analysis.h"
namespace io = boost::iostreams;
using namespace std;
int main (int argc, char **argv)
{
//-------------------SET UP DATA
TFile* theOutFile;
string outFileName ("new_histogram_file.root");
cout << " ! Opening output file: " << outFileName << endl;
theOutFile = new TFile (outFileName.c_str(),"RECREATE");
vector<string> filesModel1;
filesModel1.push_back ("files/test.hepmc"); //add your files here with additional push_back()
DataManager data;
data.SetFiles (filesModel1); //for more models, loop over models and call SetFiles each time
theOutFile->mkdir ("model1");
//------------------SET UP HISTOGRAMS
TH1D* exampleHist = new TH1D ("dNdeta",";#eta;dN/d#eta",21,-10,10);
//-------------------EVENT LOOP
int nEvts = 0;
while (data.GetNextEvent ())
{
++nEvts;
//HepMC::HeavyIon* heavyIonInfo = NULL; //helpful to get cross section: heavyIonInfo->sigma_inel_NN ()
//heavyIonInfo = data.evt->heavy_ion ();
//-------------------PARTICLE LOOP
HepMC::GenEvent::particle_const_iterator par = data.evt->particles_begin ();
for (; par != data.evt->particles_end (); ++par)
{
HepMC::GenParticle* p = (*par);
if (p->status () != 1) continue; //get final state particles. status == 2 are decayed particles, status == 4 is beam particles
//HepMC::GenVertex* parent_vertex = p->production_vertex();
//const int id = p->pdg_id ();
const double eta = p->momentum ().eta ();
//const double pt = p->momentum ().perp ();
//const double e = p->momentum ().e ();
//for more advance paramters see HepMC documentation or load #include <TParticle.h> and fill object (see analysis.h)
//-------------------EVENT SELECTION
//-------------------FILL HISTOGRAMS WITH PER PARTICLE VARIABLES
exampleHist->Fill (eta);
}//PARTICLE LOOP
//-------------------FILL HISTOGRAMS WITH PER EVENT VARIABLES
}//EVENT LOOP
//---------------FINALISE HISTOGRAMS
exampleHist->Scale (1. / nEvts, "width");
//----------------Closing Files
std::cout << " ! Writing output file: " << outFileName << std::endl;
theOutFile->Write();
delete exampleHist;
exampleHist = 0;
std::cout << " ! Closing output file: " << outFileName << std::endl;
theOutFile->Close();
delete theOutFile;
theOutFile = 0;
return 0;
}
#ifndef __analysis__h__
#define __analysis__h__
#include <string>
#include <map>
#include <vector>
#include <stdexcept>
#include <exception>
#include "HepMC/IO_GenEvent.h"
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filter/zlib.hpp>
// #include <TParticle.h> //nice class for more information about particles
// #include <TParticlePDG.h>
// TParticle* CopyHepMC2ROOT(HepMC::GenParticle* a);
class DataManager
{
private:
std::vector<std::string> filelist;
std::vector<std::string>::iterator current_file;
boost::iostreams::filtering_istream in;
HepMC::IO_GenEvent* ascii_in;