Final TOF DAs
[u/mrichter/AliRoot.git] / PWGLF / CMakelibPWGLFforward2.pkg
1 # -*- mode: CMake -*-
2 #------------------------------------------------------------------------#
3 # Package File for PWGLFforward2                                         #
4 # Author : Christian Holm Christensen (cholm@nbi.dk)                     #
5 # Variables Defined :                                                    #
6 #                                                                        #
7 # SRCS - C++ source files                                                #
8 # HDRS - C++ header files                                                #
9 # DHDR - ROOT Dictionary Linkdef header file                             #
10 # CSRCS - C source files                                                 #
11 # CHDRS - C header files                                                 #
12 # EINCLUDE - Include directories                                         #
13 # EDEFINE - Compiler definitions                                         #
14 # ELIBS - Extra libraries to link                                        #
15 # ELIBSDIR - Extra library directories                                   #
16 # PACKFFLAGS - Fortran compiler flags for package                        #
17 # PACKCXXFLAGS - C++ compiler flags for package                          #
18 # PACKCFLAGS - C compiler flags for package                              #
19 # PACKSOFLAGS - Shared library linking flags                             #
20 # PACKLDFLAGS - Module linker flags                                      #
21 # PACKBLIBS - Libraries to link (Executables only)                       #
22 # EXPORT - Header files to be exported                                   #
23 # CINTHDRS - Dictionary header files                                     #
24 # CINTAUTOLINK - Set automatic dictionary generation                     #
25 # ARLIBS - Archive Libraries and objects for linking (Executables only)  #
26 # SHLIBS - Shared Libraries and objects for linking (Executables only)   #
27 #------------------------------------------------------------------------#
28
29 if((DEFINED ALIROOT_SVN_REVISION)) 
30   add_definitions(-DALIROOT_SVN_REVISION=${ALIROOT_SVN_REVISION})
31 elseif((DEFINED ALIROOT_REVISION)) 
32   add_definitions(-DALIROOT_REVISION=\"${ALIROOT_REVISION}\")
33 endif((DEFINED ALIROOT_SVN_REVISION)) 
34 if((DEFINED ALIROOT_SVN_BRANCH)) 
35   add_definitions(-DALIROOT_SVN_BRANCH=\"${ALIROOT_SVN_BRANCH}\")
36 elseif((DEFINED ALIROOT_BRANCH)) 
37   add_definitions(-DALIROOT_BRANCH=\"${ALIROOT_BRANCH}\")
38 endif((DEFINED ALIROOT_SVN_BRANCH))
39
40 set ( SRCS   
41   # ZDC tasks
42   FORWARD/GEO/AliAnalysisTaskZDCPbPb.cxx
43   FORWARD/GEO/AliAnalysisTaskZDCTreeMaker.cxx
44   FORWARD/GEO/AliAnalysisTaskZDCpAcalib.cxx
45   # AOD objects
46   FORWARD/analysis2/AliAODCentralMult.cxx
47   FORWARD/analysis2/AliAODForwardEP.cxx
48   FORWARD/analysis2/AliAODForwardMult.cxx
49   # Interface to OADB backed by a TTree 
50   FORWARD/analysis2/AliOADBForward.cxx
51   # Correction managers 
52   FORWARD/analysis2/AliCorrectionManagerBase.cxx 
53   FORWARD/analysis2/AliForwardCorrectionManager.cxx
54   FORWARD/analysis2/AliCentralCorrectionManager.cxx
55   # Central (SPD) code 
56   FORWARD/analysis2/AliCentralCorrAcceptance.cxx 
57   FORWARD/analysis2/AliCentralCorrSecondaryMap.cxx
58   FORWARD/analysis2/AliCentraldNdetaTask.cxx
59   FORWARD/analysis2/AliCentralMCCorrectionsTask.cxx
60   FORWARD/analysis2/AliCentralMCMultiplicityTask.cxx
61   FORWARD/analysis2/AliCentralMultiplicityTask.cxx
62   FORWARD/analysis2/AliSPDMCTrackDensity.cxx
63   # Aux tasks and code 
64   FORWARD/analysis2/AliCopyHeaderTask.cxx
65   FORWARD/analysis2/AliBasedNdetaTask.cxx
66   FORWARD/analysis2/AliBaseMCTrackDensity.cxx
67   FORWARD/analysis2/AliMCTruthdNdetaTask.cxx
68   FORWARD/analysis2/AliDisplacedVertexSelection.cxx
69   FORWARD/analysis2/AliPoissonCalculator.cxx
70   FORWARD/analysis2/AliMCAuxHandler.cxx
71   # Forward Aux
72   FORWARD/analysis2/AliForwardFlowWeights.cxx
73   FORWARD/analysis2/AliForwardUtil.cxx
74   FORWARD/analysis2/AliFMDMultCuts.cxx
75   # FMD corrections
76   FORWARD/analysis2/AliFMDCorrAcceptance.cxx
77   FORWARD/analysis2/AliFMDCorrDoubleHit.cxx
78   FORWARD/analysis2/AliFMDCorrector.cxx 
79   FORWARD/analysis2/AliFMDCorrELossFit.cxx 
80   FORWARD/analysis2/AliFMDCorrMergingEfficiency.cxx
81   FORWARD/analysis2/AliFMDCorrSecondaryMap.cxx 
82   FORWARD/analysis2/AliFMDCorrVertexBias.cxx
83   # FMD algortithmns 
84   FORWARD/analysis2/AliFMDDensityCalculator.cxx
85   FORWARD/analysis2/AliFMDEnergyFitter.cxx
86   FORWARD/analysis2/AliFMDEventInspector.cxx
87   FORWARD/analysis2/AliFMDEventPlaneFinder.cxx
88   FORWARD/analysis2/AliFMDHistCollector.cxx
89   FORWARD/analysis2/AliFMDESDFixer.cxx
90   FORWARD/analysis2/AliFMDSharingFilter.cxx
91   # FMD MC algorithms
92   FORWARD/analysis2/AliFMDMCCorrector.cxx
93   FORWARD/analysis2/AliFMDMCDensityCalculator.cxx
94   FORWARD/analysis2/AliFMDMCEventInspector.cxx
95   FORWARD/analysis2/AliFMDMCSharingFilter.cxx
96   FORWARD/analysis2/AliFMDMCTrackDensity.cxx
97   # Forward tasks 
98   FORWARD/analysis2/AliBaseESDTask.cxx
99   FORWARD/analysis2/AliBaseAODTask.cxx
100   FORWARD/analysis2/AliBaseMCCorrectionsTask.cxx
101   FORWARD/analysis2/AliFMDEnergyFitterTask.cxx 
102   FORWARD/analysis2/AliFMDEventPlaneTask.cxx
103   FORWARD/analysis2/AliForwarddNdetaTask.cxx
104   FORWARD/analysis2/AliForwardFlowTaskQC.cxx
105   FORWARD/analysis2/AliForwardMCCorrectionsTask.cxx
106   FORWARD/analysis2/AliForwardMCFlowTaskQC.cxx
107   FORWARD/analysis2/AliForwardMCMultiplicityTask.cxx 
108   FORWARD/analysis2/AliForwardMultiplicityBase.cxx
109   FORWARD/analysis2/AliForwardMultiplicityTask.cxx
110   FORWARD/analysis2/AliForwardQATask.cxx
111   FORWARD/analysis2/AliForwardCreateResponseMatrices.cxx
112   FORWARD/analysis2/AliForwardMultiplicityDistribution.cxx
113   FORWARD/analysis2/AliForwardMultDists.cxx
114   # MC investigations 
115   FORWARD/analysis2/AliFMDMCTrackELoss.cxx
116   FORWARD/analysis2/AliFMDMCTrackInspector.cxx 
117   FORWARD/analysis2/AliFMDMCTrackInspectorTask.cxx 
118   # Photons 
119   FORWARD/photons/AliAnalysisTaskPMD.cxx
120   FORWARD/photons/AliAnalysisTaskPMDSim.cxx
121 )
122
123 string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" )
124 set ( HDRS ${HDRS} 
125   FORWARD/analysis2/AliFMDStripIndex.h 
126   FORWARD/analysis2/AliFMDEncodedEdx.h 
127   FORWARD/analysis2/AliLandauGaus.h 
128   FORWARD/analysis2/AliLandauGausFitter.h 
129   FORWARD/analysis2/AliFMDCorrNoiseGain.h
130   )
131
132 set ( EINCLUDE  
133   ANALYSIS 
134   PWGLF/FORWARD/analysis2  
135   PWGLF/FORWARD/GEO 
136   FORWARD/analysis2  
137   FORWARD/GEO 
138   PWG0 
139   OADB
140   STEER/ESD 
141   STEER/STEERBase)
142
143 set ( EXPORT FORWARD/analysis2/AliAODForwardMult.h 
144              FORWARD/analysis2/AliAODCentralMult.h 
145              FORWARD/analysis2/AliOADBForward.h
146              FORWARD/analysis2/AliForwardUtil.h  
147              FORWARD/analysis2/AliLandauGaus.h 
148              FORWARD/analysis2/AliLandauGausFitter.h 
149              FORWARD/analysis2/AliFMDEventInspector.h
150              FORWARD/analysis2/AliFMDMCEventInspector.h
151              FORWARD/analysis2/AliForwardCorrectionManager.h
152              FORWARD/analysis2/AliCentralCorrectionManager.h
153              FORWARD/analysis2/AliCorrectionManagerBase.h
154              FORWARD/analysis2/AliFMDCorrAcceptance.h
155              FORWARD/analysis2/AliFMDCorrSecondaryMap.h
156              FORWARD/analysis2/AliFMDCorrELossFit.h
157              FORWARD/analysis2/AliFMDCorrNoiseGain.h
158              FORWARD/analysis2/AliBaseESDTask.h
159              FORWARD/analysis2/AliBaseAODTask.h
160              FORWARD/analysis2/AliFMDEnergyFitter.h
161              FORWARD/analysis2/AliMCAuxHandler.h
162              FORWARD/analysis2/AliDisplacedVertexSelection.h
163              FORWARD/analysis2/AliFMDMCTrackELoss.h
164              FORWARD/analysis2/AliFMDEncodedEdx.h
165              FORWARD/analysis2/AliFMDStripIndex.h 
166              FORWARD/analysis2/AliBaseMCTrackDensity.h
167              FORWARD/analysis2/AliForwardFlowWeights.h
168              FORWARD/GEO/AliAnalysisTaskZDCPbPb.h
169              FORWARD/GEO/AliAnalysisTaskZDCpAcalib.h
170              FORWARD/GEO/AliAnalysisTaskZDCTreeMaker.h)
171
172 set ( DHDR  PWGLFforward2LinkDef.h)
173
174 # add_executable(runTrain
175 #   FORWARD/analysis2/trains/runMain.cxx)
176 # target_link_libraries(runTrain 
177 #   ${ARLIBS} ${SHLIBS} ${PBLIBS} ${EXEFLAGS} ${ROOTCLIBS})
178 # install(TARGETS runTrain 
179 #   RUNTIME DESTINATION bin/tgt_${ALICE_TARGET})
180
181 add_executable(runTrain
182   FORWARD/trains/trainMain.cxx)
183 set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS}")
184 target_link_libraries(runTrain 
185   ${BINLIBDIRS} ${ARLIBS} ${SHLIBS} ${PBLIBS} ${EXEFLAGS} ${ROOTCLIBS} 
186   -lSTEERBase -lESD -lAOD -lOADB -lANALYSIS -lANALYSISalice)
187 install(TARGETS runTrain 
188   RUNTIME DESTINATION bin/tgt_${ALICE_TARGET})
189 add_dependencies(runTrain STEERBase ESD AOD OADB ANALYSIS ANALYSISalice)
190
191 # --------------------------------------------------------------------
192 # Extra targets 
193 #
194 add_custom_command( OUTPUT FORWARD/doc/alice-int-2012-040.pdf 
195                     COMMAND pdflatex alice-int-2012-040
196                     COMMAND pdflatex alice-int-2012-040
197                     COMMAND pdflatex alice-int-2012-040
198                     COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc
199                     COMMAND mv alice-int-2012-040.pdf ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc/
200                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/FORWARD/doc
201                     MAIN_DEPENDENCY FORWARD/doc/alice-int-2012-040.tex)
202
203 add_custom_command( OUTPUT FORWARD/doc/html/index.html 
204                     COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc
205                     COMMAND sed -e 's,\\.\\./,${CMAKE_CURRENT_SOURCE_DIR}/FORWARD/,' -e 's,OUTPUT_DIRECTORY *=.*,OUTPUT_DIRECTORY = FORWARD/doc/,' < ${CMAKE_CURRENT_SOURCE_DIR}/FORWARD/doc/Doxyfile > ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc/Doxyfile
206                     COMMAND doxygen ${CMAKE_CURRENT_BINARY_DIR}/FORWARD/doc/Doxyfile
207                     DEPENDS ${SRCS} ${HDRS})
208
209 add_custom_target( PWGLFforward-doc DEPENDS FORWARD/doc/alice-int-2012-040.pdf )
210 add_custom_target( PWGLFforward-doxy DEPENDS FORWARD/doc/html/index.html )
211
212 add_custom_target( install-PWGLFforward2.par 
213   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${PACKAGE}.par ${CMAKE_INSTALL_PREFIX}
214   COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green --bold "${PACKAGE}.par installed in ${CMAKE_INSTALL_PREFIX}"
215   DEPENDS ${CMAKE_BINARY_DIR}/${PACKAGE}.par
216   DEPENDS test-${PACKAGE}.par)
217
218 # --------------------------------------------------------------------
219 # Extra installation targets 
220 #
221 # Install scripts 
222 install ( DIRECTORY FORWARD/analysis2/scripts 
223           DESTINATION PWGLF/FORWARD/analysis2 
224           USE_SOURCE_PERMISSIONS
225           PATTERN "*~"    EXCLUDE
226           PATTERN ".svn"  EXCLUDE
227           PATTERN "*.d"   EXCLUDE 
228           PATTERN "*.so"  EXCLUDE)
229
230 # install QA scripts 
231 install ( DIRECTORY FORWARD/analysis2/qa
232           DESTINATION PWGLF/FORWARD/analysis2 
233           USE_SOURCE_PERMISSIONS
234           PATTERN "*~"    EXCLUDE
235           PATTERN ".svn"  EXCLUDE
236           PATTERN "*.d"   EXCLUDE 
237           PATTERN "*.so"  EXCLUDE)
238
239 # install correction scripts 
240 install ( DIRECTORY FORWARD/analysis2/corrs
241           DESTINATION PWGLF/FORWARD/analysis2 
242           PATTERN "*~"    EXCLUDE
243           PATTERN ".svn"  EXCLUDE
244           PATTERN "*.d"   EXCLUDE 
245           PATTERN "*.so"  EXCLUDE)
246
247 # install trains 
248 install ( DIRECTORY FORWARD/analysis2/trains 
249           DESTINATION PWGLF/FORWARD/analysis2 
250           PATTERN "*~"   EXCLUDE
251           PATTERN ".svn" EXCLUDE
252           PATTERN "*.d"  EXCLUDE 
253           PATTERN "*.so" EXCLUDE)
254
255 # install sim 
256 install ( DIRECTORY FORWARD/analysis2/sim 
257           DESTINATION PWGLF/FORWARD/analysis2 
258           PATTERN "*~"   EXCLUDE
259           PATTERN ".svn" EXCLUDE
260           PATTERN "*.d"  EXCLUDE 
261           PATTERN "*.so" EXCLUDE)
262         
263 # install trains 
264 install ( DIRECTORY FORWARD/trains 
265           DESTINATION PWGLF/FORWARD 
266           FILES_MATCHING PATTERN "*.C"
267           PATTERN "*~"        EXCLUDE
268           PATTERN ".svn"      EXCLUDE)
269           # PATTERN "*.d"       EXCLUDE 
270           # PATTERN "*.so"      EXCLUDE
271           # PATTERN "*.root"    EXCLUDE
272           # PATTERN "*.png"     EXCLUDE
273           # PATTERN "test*"     EXCLUDE
274           # PATTERN "export*.C" EXCLUDE
275           # PATTERN "dndeta_*.C" EXCLUDE
276           # PATTERN "dndeta_*.root" EXCLUDE
277
278 # Install other scripts
279 install ( FILES FORWARD/analysis2/AddTaskCentraldNdeta.C
280                 FORWARD/analysis2/AddTaskCentralMCCorr.C
281                 FORWARD/analysis2/AddTaskCentralMult.C
282                 FORWARD/analysis2/AddTaskCentralTracks.C
283                 FORWARD/analysis2/AddTaskCopyHeader.C
284                 FORWARD/analysis2/AddTaskFMDELoss.C
285                 FORWARD/analysis2/AddTaskFMDEventPlane.C
286                 FORWARD/analysis2/AddTaskFMDMCTracks.C
287                 FORWARD/analysis2/AddTaskForwardFlowQC.C
288                 FORWARD/analysis2/AddTaskForwardMCCorr.C
289                 FORWARD/analysis2/AddTaskForwardMult.C
290                 FORWARD/analysis2/AddTaskForwardMultDists.C
291                 FORWARD/analysis2/AddTaskForwardQA.C
292                 FORWARD/analysis2/AddTaskForwarddNdeta.C
293                 FORWARD/analysis2/AddTaskMCTruthdNdeta.C
294                 FORWARD/analysis2/AddTaskMCParticleFilter.C
295                 FORWARD/analysis2/DrawdNdeta.C
296                 FORWARD/analysis2/DrawdNdetaSummary.C
297                 FORWARD/analysis2/DrawMCCorrSummary.C
298                 FORWARD/analysis2/DrawAODSummary.C
299                 FORWARD/analysis2/DrawMultDistsSummary.C
300                 FORWARD/analysis2/DrawUnfoldedSummary.C
301                 FORWARD/analysis2/ForwardAODConfig.C
302                 FORWARD/analysis2/CentralAODConfig.C
303                 FORWARD/analysis2/dNdetaConfig.C
304                 FORWARD/analysis2/MakeAOD.C
305                 FORWARD/analysis2/MakedNdeta.C
306                 FORWARD/analysis2/MakeELossFits.C
307                 FORWARD/analysis2/MakeEvaluateTriggers.C
308                 FORWARD/analysis2/MakeFlow.C
309                 FORWARD/analysis2/MakeFMDEventPlane.C
310                 FORWARD/analysis2/MakeForwardQA.C
311                 FORWARD/analysis2/MakeMCCorr.C          
312                 FORWARD/analysis2/OtherData.C
313                 FORWARD/analysis2/other.root
314            DESTINATION PWGLF/FORWARD/analysis2 )
315
316          # FORWARD/analysis2/AliFMDCorrAcceptance.h
317          # FORWARD/analysis2/AliFMDCorrDoubleHit.h
318          # FORWARD/analysis2/AliFMDCorrector.h
319          # FORWARD/analysis2/AliFMDCorrELossFit.h
320          # FORWARD/analysis2/AliFMDCorrMergingEfficiency.h
321          # FORWARD/analysis2/AliFMDCorrSecondaryMap.h
322          # FORWARD/analysis2/AliFMDCorrVertexBias.h
323          # FORWARD/analysis2/AliForwardUtil.h
324          # FORWARD/analysis2/AliForwardCorrectionManager.h
325          # FORWARD/analysis2/AliCorrectionManagerBase.h
326
327 # Install corrections 
328 install ( DIRECTORY FORWARD/corrections/Empirical
329                     FORWARD/corrections/Normalization
330           DESTINATION PWGLF/FORWARD/corrections 
331           PATTERN "*~"   EXCLUDE
332           PATTERN ".svn" EXCLUDE)
333
334 # Install shell script 
335 install ( FILES FORWARD/analysis2/Run.sh 
336                 FORWARD/analysis2/liteAnalysis.sh
337                 FORWARD/analysis2/gridAnalysis.sh
338                 FORWARD/analysis2/baseAnalysis.sh
339           DESTINATION PWGLF/FORWARD/analysis2 
340           PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
341                       GROUP_EXECUTE GROUP_READ
342                       WORLD_EXECUTE WORLD_READ )
343
344
345 # --------------------------------------------------------------------
346 #
347 # EOF
348