PWGJE EMCAL tasks
authoragrigora <alina.grigoras@cern.ch>
Thu, 4 Dec 2014 16:57:53 +0000 (17:57 +0100)
committeragrigora <alina.grigoras@cern.ch>
Mon, 15 Dec 2014 12:52:07 +0000 (13:52 +0100)
CMakeLists.txt
HLT/CMakeLists.txt
HLT/FJWrapper/AliHLTFJWLinkDef.h [new file with mode: 0644]
HLT/FJWrapper/CMakeLists.txt [new file with mode: 0644]
PWGJE/CMakeLists.txt
PWGJE/CMakelibPWGJEEMCALJetTasks.pkg.1 [new file with mode: 0644]
PWGJE/EMCALJetTasks/CMakeLists.txt [new file with mode: 0644]
PWGJE/EMCALJetTasks/PWGJEEMCALJetTasksLinkDef.h [moved from PWGJE/PWGJEEMCALJetTasksLinkDef.h with 100% similarity]

index e0b6208..cb18d66 100644 (file)
@@ -251,6 +251,7 @@ add_subdirectory(PWG)
 add_subdirectory(PWGGA)
 # Depends on CF and LF - To fix the dependencies
 add_subdirectory(PWGDQ)
+add_subdirectory(PWGJE)
 add_subdirectory(PWGLF)
 # Depends on PP - To fix depedencies
 add_subdirectory(PWGUD)
index 59c7f2b..47aa27a 100644 (file)
@@ -40,6 +40,7 @@ add_subdirectory(EMCAL)
 add_subdirectory(FMD)
 add_subdirectory(ITS)
 add_subdirectory(JET)
+#add_subdirectory(FJWrapper) - not needed
 add_subdirectory(MUON)
 add_subdirectory(pendolino)
 add_subdirectory(PHOS)
diff --git a/HLT/FJWrapper/AliHLTFJWLinkDef.h b/HLT/FJWrapper/AliHLTFJWLinkDef.h
new file mode 100644 (file)
index 0000000..6273526
--- /dev/null
@@ -0,0 +1,6 @@
+#ifdef __CINT__
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+#pragma link C++ class AliFJWrapper+;
+#endif
diff --git a/HLT/FJWrapper/CMakeLists.txt b/HLT/FJWrapper/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5e244ab
--- /dev/null
@@ -0,0 +1,90 @@
+# **************************************************************************
+# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
+# *                                                                        *
+# * Author: The ALICE Off-line Project.                                    *
+# * Contributors are mentioned in the code where appropriate.              *
+# *                                                                        *
+# * Permission to use, copy, modify and distribute this software and its   *
+# * documentation strictly for non-commercial purposes is hereby granted   *
+# * without fee, provided that the above copyright notice appears in all   *
+# * copies and that both the copyright notice and this permission notice   *
+# * appear in the supporting documentation. The authors make no claims     *
+# * about the suitability of this software for any purpose. It is          *
+# * provided "as is" without express or implied warranty.                  *
+# **************************************************************************
+
+# Module
+set(MODULE AliHLTFJW)
+
+# Module include folder
+include_directories(${AliRoot_SOURCE_DIR}/HLT/FJWrapper
+                   )
+
+# Additional include folders in alphabetical order except ROOT
+include_directories(
+                    ${AliRoot_SOURCE_DIR}/STEER/STEERBase
+                   )
+
+# Sources in alphabetical order
+set(SRCS
+    AliFJWrapper.cxx
+   )
+
+# Headers from sources
+string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
+
+if(FASTJET_FOUND)
+    include_directories(${FASTJET_INCLUDE_DIR})
+    link_directories(${FASTJET_LIBS_DIR})
+    add_definitions(${FASTJET_DEFINITIONS})
+    add_definitions(-DWITHFASTJET)
+endif(FASTJET_FOUND)
+
+# Generate the dictionary
+# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
+get_directory_property(incdirs INCLUDE_DIRECTORIES)
+generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
+
+set(ROOT_DEPENDENCIES Core)
+set(ALIROOT_DEPENDENCIES STEERBase)
+# Generate the ROOT map
+# Dependecies
+set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
+generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+
+# Create an object to be reused in case of static libraries 
+# Otherwise the sources will be compiled twice
+add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx)
+# Follow headers dependencies
+add_dependencies(${MODULE}-object ${ALIROOT_DEPENDENCIES})
+# Add a library to the project using the object
+add_library(${MODULE} SHARED $<TARGET_OBJECTS:HLTbase-object>)
+target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
+
+# Additional compilation flags
+set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS " ")
+
+# System dependent: Modify the way the library is build
+if(${CMAKE_SYSTEM} MATCHES Darwin)
+    set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+endif(${CMAKE_SYSTEM} MATCHES Darwin)
+
+# Installation
+install(TARGETS ${MODULE}
+        ARCHIVE DESTINATION lib
+        LIBRARY DESTINATION lib)
+
+install(FILES ${HDRS} DESTINATION include)
+
+# Static version if DA enabled
+if(ALIROOT_STATIC)
+    add_library(${MODULE}-static STATIC $<TARGET_OBJECTS:HLTbase-object>)
+    set_target_properties(${MODULE}-static PROPERTIES OUTPUT_NAME ${MODULE})
+    target_link_libraries(${MODULE}-static STEERBase-static RAWDatabase-static AliHLTHOMER-static Root RootExtra)
+    set_target_properties(${MODULE}-static PROPERTIES LINK_FLAGS "-Wl,--whole-archive")
+    
+    # Installation
+    install(TARGETS ${MODULE}-static
+            ARCHIVE DESTINATION lib
+            LIBRARY DESTINATION lib)
+endif(ALIROOT_STATIC)
index 0a81568..a9b812d 100644 (file)
@@ -1,10 +1,18 @@
-# AliRoot Build System CMakeLists for PWGJE
-#
-# Author: Johny Jose m(johny.jose@cern.ch)
-#         Port of previous Makefile build to cmake
+# **************************************************************************
+# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
+# *                                                                        *
+# * Author: The ALICE Off-line Project.                                    *
+# * Contributors are mentioned in the code where appropriate.              *
+# *                                                                        *
+# * Permission to use, copy, modify and distribute this software and its   *
+# * documentation strictly for non-commercial purposes is hereby granted   *
+# * without fee, provided that the above copyright notice appears in all   *
+# * copies and that both the copyright notice and this permission notice   *
+# * appear in the supporting documentation. The authors make no claims     *
+# * about the suitability of this software for any purpose. It is          *
+# * provided "as is" without express or implied warranty.                  *
+# **************************************************************************
 
-cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
+add_subdirectory(EMCALJetTasks)
 
-file(GLOB PACKAGES CMake*.pkg)
-
-ALICE_BuildModule()
+message(STATUS "PWGJE enabled")
diff --git a/PWGJE/CMakelibPWGJEEMCALJetTasks.pkg.1 b/PWGJE/CMakelibPWGJEEMCALJetTasks.pkg.1
new file mode 100644 (file)
index 0000000..6e818dd
--- /dev/null
@@ -0,0 +1,107 @@
+# -*- mode: Makefile -*-
+# $Id$
+#--------------------------------------------------------------------------------#
+# Variables Defined :                                                            #
+#                                                                                #
+# SRCS - C++ source files                                                        #
+# HDRS - C++ header files                                                        #
+# DHDR - ROOT Dictionary Linkdef header file                                     #
+# CSRCS - C source files                                                         #
+# CHDRS - C header files                                                         #
+# EINCLUDE - Include directories                                                 #
+# EDEFINE - Compiler definitions                                                 #
+# ELIBS - Extra libraries to link                                                #
+# ELIBSDIR - Extra library directories                                           #
+# PACKFFLAGS - Fortran compiler flags for package                                #
+# PACKCXXFLAGS - C++ compiler flags for package                                  #
+# PACKCFLAGS - C compiler flags for package                                      #
+# PACKSOFLAGS - Shared library linking flags                                     #
+# PACKLDFLAGS - Module linker flags                                              #
+# PACKBLIBS - Libraries to link (Executables only)                               #
+# EXPORT - Header files to be exported                                           #
+# CINTHDRS - Dictionary header files                                             #
+# CINTAUTOLINK - Set automatic dictionary generation                             #
+# ARLIBS - Archive Libraries and objects for linking (Executables only)          #
+# SHLIBS - Shared Libraries and objects for linking (Executables only)           #
+#--------------------------------------------------------------------------------#
+
+set ( SRCS 
+ EMCALJetTasks/AliAnalysisTaskDeltaPt.cxx
+ EMCALJetTasks/AliAnalysisTaskEmcalJet.cxx
+ EMCALJetTasks/AliAnalysisTaskEmcalJetSample.cxx
+ EMCALJetTasks/AliAnalysisTaskRho.cxx
+ EMCALJetTasks/AliAnalysisTaskRhoAverage.cxx
+ EMCALJetTasks/AliAnalysisTaskRhoBase.cxx
+ EMCALJetTasks/AliAnalysisTaskRhoFlow.cxx
+ EMCALJetTasks/AliAnalysisTaskRhoSparse.cxx
+ EMCALJetTasks/AliAnalysisTaskLocalRho.cxx
+ EMCALJetTasks/AliAnalysisTaskScale.cxx
+ EMCALJetTasks/AliEmcalJet.cxx
+ EMCALJetTasks/AliEmcalPicoTrackInGridMaker.cxx
+ EMCALJetTasks/AliJetConstituentTagCopier.cxx
+ EMCALJetTasks/AliJetContainer.cxx
+ EMCALJetTasks/AliJetEmbeddingFromGenTask.cxx
+ EMCALJetTasks/AliJetEmbeddingFromPYTHIATask.cxx
+ EMCALJetTasks/AliJetEmbeddingTask.cxx
+ EMCALJetTasks/AliJetFastSimulation.cxx
+ EMCALJetTasks/AliJetModelBaseTask.cxx
+ EMCALJetTasks/AliJetModelCopyTracks.cxx
+ EMCALJetTasks/AliJetModelMergeBranches.cxx
+ EMCALJetTasks/AliJetRandomizerTask.cxx
+ EMCALJetTasks/AliJetResponseMaker.cxx
+ EMCALJetTasks/AliJetTriggerSelectionTask.cxx
+ EMCALJetTasks/AliLocalRhoParameter.cxx
+ EMCALJetTasks/AliRhoParameter.cxx
+ EMCALJetTasks/AliPythiaInfo.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskCLQA.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskChargedJetsPA.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskDcalDijetPerf.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskDeltaPtJEmb.cxx        
+ EMCALJetTasks/UserTasks/AliAnalysisTaskDijetHadron.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalBadCells.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetResponse.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalHighMultTrigger.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalHJetMass.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetHMEC.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetHadCorQA.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetHadEPpid.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetMass.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetMassBkg.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetMassResponse.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetMassStructure.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetPatchTriggerQA.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetSpectra.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetSpectraMECpA.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetTagger.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetTriggerQA.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalQGTagging.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalTriggerInfoQA.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskHJetEmbed.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskJetJTJT.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskJetShapeDeriv.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskJetShapeConst.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskJetShapeGR.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskJetMassResponseDet.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskJetMatching.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskJetV2.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetv2QA.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskRhoMass.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskRhoMassBase.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskRhoMassScale.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskSAJF.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskSAQA.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskV0sInJetsEmcal.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskSOH.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskTriggerRejection.cxx
+ EMCALJetTasks/UserTasks/AliEmcalPicoTrackFromJetMaker.cxx
+ EMCALJetTasks/UserTasks/AliCutValueRange.cxx 
+ EMCALJetTasks/UserTasks/AliEMCalHistoContainer.cxx 
+ EMCALJetTasks/UserTasks/AliAnalysisTaskPtEMCalTrigger.cxx 
+ EMCALJetTasks/UserTasks/AliEMCalPtTaskVTrackSelection.cxx
+ EMCALJetTasks/UserTasks/AliEMCalPtTaskTrackSelectionESD.cxx
+ EMCALJetTasks/UserTasks/AliEMCalPtTaskTrackSelectionAOD.cxx
+ EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalTriggerTreeWriter.cxx
+)
+
diff --git a/PWGJE/EMCALJetTasks/CMakeLists.txt b/PWGJE/EMCALJetTasks/CMakeLists.txt
new file mode 100644 (file)
index 0000000..03e1365
--- /dev/null
@@ -0,0 +1,206 @@
+# **************************************************************************
+# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
+# *                                                                        *
+# * Author: The ALICE Off-line Project.                                    *
+# * Contributors are mentioned in the code where appropriate.              *
+# *                                                                        *
+# * Permission to use, copy, modify and distribute this software and its   *
+# * documentation strictly for non-commercial purposes is hereby granted   *
+# * without fee, provided that the above copyright notice appears in all   *
+# * copies and that both the copyright notice and this permission notice   *
+# * appear in the supporting documentation. The authors make no claims     *
+# * about the suitability of this software for any purpose. It is          *
+# * provided "as is" without express or implied warranty.                  *
+# **************************************************************************
+
+# Module
+set(MODULE PWGJEEMCALJetTasks)
+
+# Module include folder
+include_directories(${AliRoot_SOURCE_DIR}/PWGJE/EMCALJetTasks
+                    ${AliRoot_SOURCE_DIR}/PWGJE/EMCALJetTasks/UserTasks
+                   )
+
+# Additional include folders in alphabetical order except ROOT
+include_directories(${ROOT_INCLUDE_DIRS}
+                    ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSIS
+                    ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSISalice
+                    ${AliRoot_SOURCE_DIR}/EMCAL/EMCALbase
+                    ${AliRoot_SOURCE_DIR}/EMCAL/EMCALUtils
+                    ${AliRoot_SOURCE_DIR}/PWG/EMCAL
+                    ${AliRoot_SOURCE_DIR}/PWG/Tools
+                    ${AliRoot_SOURCE_DIR}/PYTHIA6/pythia6
+                    ${AliRoot_SOURCE_DIR}/STEER/AOD
+                    ${AliRoot_SOURCE_DIR}/STEER/ESD
+                    ${AliRoot_SOURCE_DIR}/STEER/STEER
+                    ${AliRoot_SOURCE_DIR}/STEER/STEERBase
+                   )
+
+# Sources in alphabetical order
+set(SRCS
+    AliAnalysisTaskDeltaPt.cxx
+    AliAnalysisTaskEmcalJet.cxx
+    AliAnalysisTaskEmcalJetSample.cxx
+    AliAnalysisTaskLocalRho.cxx
+    AliAnalysisTaskRhoAverage.cxx
+    AliAnalysisTaskRhoBase.cxx
+    AliAnalysisTaskRho.cxx
+    AliAnalysisTaskRhoFlow.cxx
+    AliAnalysisTaskRhoSparse.cxx
+    AliAnalysisTaskScale.cxx
+    AliEmcalJet.cxx
+    AliEmcalPicoTrackInGridMaker.cxx
+    AliJetConstituentTagCopier.cxx
+    AliJetContainer.cxx
+    AliJetEmbeddingFromGenTask.cxx
+    AliJetEmbeddingFromPYTHIATask.cxx
+    AliJetEmbeddingTask.cxx
+    AliJetFastSimulation.cxx
+    AliJetModelBaseTask.cxx
+    AliJetModelCopyTracks.cxx
+    AliJetModelMergeBranches.cxx
+    AliJetRandomizerTask.cxx
+    AliJetResponseMaker.cxx
+    AliJetTriggerSelectionTask.cxx
+    AliLocalRhoParameter.cxx
+    AliPythiaInfo.cxx
+    AliRhoParameter.cxx
+    UserTasks/AliAnalysisTaskChargedJetsPA.cxx
+    UserTasks/AliAnalysisTaskCLQA.cxx
+    UserTasks/AliAnalysisTaskDcalDijetPerf.cxx
+    UserTasks/AliAnalysisTaskDeltaPtJEmb.cxx
+    UserTasks/AliAnalysisTaskDijetHadron.cxx
+    UserTasks/AliAnalysisTaskEmcalBadCells.cxx
+    UserTasks/AliAnalysisTaskEmcalDiJetAna.cxx
+    UserTasks/AliAnalysisTaskEmcalDiJetBase.cxx
+    UserTasks/AliAnalysisTaskEmcalDiJetResponse.cxx
+    UserTasks/AliAnalysisTaskEmcalHighMultTrigger.cxx
+    UserTasks/AliAnalysisTaskEmcalHJetMass.cxx
+    UserTasks/AliAnalysisTaskEmcalJetHadCorQA.cxx
+    UserTasks/AliAnalysisTaskEmcalJetHadEPpid.cxx
+    UserTasks/AliAnalysisTaskEmcalJetHMEC.cxx
+    UserTasks/AliAnalysisTaskEmcalJetMassBkg.cxx
+    UserTasks/AliAnalysisTaskEmcalJetMass.cxx
+    UserTasks/AliAnalysisTaskEmcalJetMassResponse.cxx
+    UserTasks/AliAnalysisTaskEmcalJetMassStructure.cxx
+    UserTasks/AliAnalysisTaskEmcalJetPatchTriggerQA.cxx
+    UserTasks/AliAnalysisTaskEmcalJetSpectra.cxx
+    UserTasks/AliAnalysisTaskEmcalJetSpectraMECpA.cxx
+    UserTasks/AliAnalysisTaskEmcalJetTagger.cxx
+    UserTasks/AliAnalysisTaskEmcalJetTriggerQA.cxx
+    UserTasks/AliAnalysisTaskEmcalJetv2QA.cxx
+    UserTasks/AliAnalysisTaskEmcalQGTagging.cxx
+    UserTasks/AliAnalysisTaskEmcalTriggerInfoQA.cxx
+    UserTasks/AliAnalysisTaskEmcalTriggerTreeWriter.cxx
+    UserTasks/AliAnalysisTaskHJetEmbed.cxx
+    UserTasks/AliAnalysisTaskJetJTJT.cxx
+    UserTasks/AliAnalysisTaskJetMassResponseDet.cxx
+    UserTasks/AliAnalysisTaskJetMatching.cxx
+    UserTasks/AliAnalysisTaskJetShapeConst.cxx
+    UserTasks/AliAnalysisTaskJetShapeDeriv.cxx
+    UserTasks/AliAnalysisTaskJetShapeGR.cxx
+    UserTasks/AliAnalysisTaskJetV2.cxx
+    UserTasks/AliAnalysisTaskPtEMCalTrigger.cxx
+    UserTasks/AliAnalysisTaskRhoMassBase.cxx
+    UserTasks/AliAnalysisTaskRhoMass.cxx
+    UserTasks/AliAnalysisTaskRhoMassScale.cxx
+    UserTasks/AliAnalysisTaskSAJF.cxx
+    UserTasks/AliAnalysisTaskSAQA.cxx
+    UserTasks/AliAnalysisTaskSOH.cxx
+    UserTasks/AliAnalysisTaskTriggerRejection.cxx
+    UserTasks/AliAnalysisTaskV0sInJetsEmcal.cxx
+    UserTasks/AliCutValueRange.cxx
+    UserTasks/AliEMCalHistoContainer.cxx
+    UserTasks/AliEmcalPicoTrackFromJetMaker.cxx
+    UserTasks/AliEMCalPtTaskTrackSelectionAOD.cxx
+    UserTasks/AliEMCalPtTaskTrackSelectionESD.cxx
+    UserTasks/AliEMCalPtTaskVTrackSelection.cxx
+   )
+
+if(FASTJET_FOUND)
+    set(SRCS ${SRCS}
+        AliFJWrapper.cxx
+        AliEmcalJetTask.cxx
+        AliEmcalJetFinder.cxx
+        AliJetEmbeddingFromAODTask.cxx
+        UserTasks/AliAnalysisTaskFullpAJets.cxx
+        UserTasks/AliAnalysisTaskFullppJet.cxx
+        UserTasks/AliAnalysisTaskHJetDphi.cxx
+        UserTasks/AliAnalysisTaskHJetSpectra.cxx
+       )
+
+    include_directories(#${AliRoot_SOURCE_DIR}/HLT/FJWrapper
+                        ${AliRoot_SOURCE_DIR}/JETAN/JETAN
+                       )
+    include_directories(${FASTJET_INCLUDE_DIR})
+    link_directories(${FASTJET_LIBS_DIR})
+    add_definitions(${FASTJET_DEFINITIONS})
+endif(FASTJET_FOUND)
+
+
+# Headers from sources
+string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
+
+if(FASTJET_FOUND)
+  set(HDRS ${HDRS}
+      FJ_includes.h
+     )
+endif(FASTJET_FOUND)
+
+# Generate the dictionary
+# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
+get_directory_property(incdirs INCLUDE_DIRECTORIES)
+generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
+
+set(ROOT_DEPENDENCIES Core EG GenVector Geom Gpad Hist MathCore Matrix Net Physics RIO Tree)
+set(ALIROOT_DEPENDENCIES ANALYSIS ANALYSISalice AOD EMCALbase EMCALUtils ESD STEER STEERBase PWGEMCAL PWGTools pythia6)
+if(FASTJET_FOUND)
+    set(ALIROOT_DEPENDENCIES JETAN ${ALIROOT_DEPENDENCIES})
+endif(FASTJET_FOUND)
+
+# Generate the ROOT map
+# Dependecies
+set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
+generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+
+# Create an object to be reused in case of static libraries 
+# Otherwise the sources will be compiled twice
+add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx)
+# Add a library to the project using the object
+add_library(${MODULE} SHARED $<TARGET_OBJECTS:${MODULE}-object>)
+target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
+
+# Setting the correct headers for the object as gathered from the dependencies
+target_include_directories(${MODULE}-object PUBLIC $<TARGET_PROPERTY:${MODULE},INCLUDE_DIRECTORIES>)
+set_target_properties(${MODULE}-object PROPERTIES COMPILE_DEFINITIONS $<TARGET_PROPERTY:${MODULE},COMPILE_DEFINITIONS>)
+
+# Public include folders that will be propagated to the dependecies
+target_include_directories(${MODULE} PUBLIC ${incdirs})
+
+set(MODULE_COMPILE_FLAGS)
+set(MODULE_LINK_FLAGS)
+
+if(DATE_FOUND)
+    set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}")
+    set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}")
+endif(DATE_FOUND)
+
+# Additional compilation and linking flags
+set(MODULE_COMPILE_FLAGS " ${MODULE_COMPILE_FLAGS}")
+
+# System dependent: Modify the way the library is build
+if(${CMAKE_SYSTEM} MATCHES Darwin)
+    set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
+endif(${CMAKE_SYSTEM} MATCHES Darwin)
+
+# Setting compilation flags for the object
+set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
+# Setting the linking flags for the library
+set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
+
+# Installation
+install(TARGETS ${MODULE}
+        ARCHIVE DESTINATION lib
+        LIBRARY DESTINATION lib)
+
+install(FILES ${HDRS} DESTINATION include)
\ No newline at end of file