]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
authorauras <antonio.uras@cern.ch>
Tue, 16 Dec 2014 16:46:13 +0000 (17:46 +0100)
committerauras <antonio.uras@cern.ch>
Tue, 16 Dec 2014 16:46:13 +0000 (17:46 +0100)
103 files changed:
ANALYSIS/ESDfilter/CMakeLists.txt
ANALYSIS/TenderSupplies/CMakeLists.txt
CMakeLists.txt
EMCAL/CMakeLists.txt
HLT/BASE/CMakeLists.txt
HLT/CMakeLists.txt
HLT/TPCLib/tracking-ca/cagpu/cuda/CMakeLists.txt
HLT/TPCLib/tracking-ca/cagpu/opencl/CMakeLists.txt
HLT/doc/doxygen.conf.in
HLT/doc/doxymodule.conf.in
INSTALL.txt
ITS/UPGRADE/macros/QA/AliITSUComparison.C
ITS/UPGRADE/macros/QA/AliITSUComparisonCooked.C
ITS/UPGRADE/macros/QA/AliTPCUComparison.C
ITS/UPGRADE/macros/QA/check_radii.C
ITS/UPGRADE/macros/QA/compClusHits.C
PMD/Readme.txt [new file with mode: 0644]
PMD/anal/AliPMDOfflineCalibTask.cxx [moved from PMD/AliPMDOfflineCalibTask.cxx with 100% similarity]
PMD/anal/AliPMDOfflineCalibTask.h [moved from PMD/AliPMDOfflineCalibTask.h with 100% similarity]
PMD/anal/AliPmdCustomCalibTask.cxx [new file with mode: 0644]
PMD/anal/AliPmdCustomCalibTask.h [new file with mode: 0644]
PMD/data/PMD_GAIN_CONFIGFILE [moved from PMD/PMD_GAIN_CONFIGFILE with 100% similarity]
PMD/data/PMD_Mapping_ddl0.dat [moved from PMD/PMD_Mapping_ddl0.dat with 100% similarity]
PMD/data/PMD_Mapping_ddl1.dat [moved from PMD/PMD_Mapping_ddl1.dat with 100% similarity]
PMD/data/PMD_Mapping_ddl2.dat [moved from PMD/PMD_Mapping_ddl2.dat with 100% similarity]
PMD/data/PMD_Mapping_ddl3.dat [moved from PMD/PMD_Mapping_ddl3.dat with 100% similarity]
PMD/data/PMD_Mapping_ddl4.dat [moved from PMD/PMD_Mapping_ddl4.dat with 100% similarity]
PMD/data/PMD_Mapping_ddl5.dat [moved from PMD/PMD_Mapping_ddl5.dat with 100% similarity]
PMD/data/PMD_PED.root [moved from PMD/PMD_PED.root with 100% similarity]
PMD/data/PMD_ddl_info.dat [moved from PMD/PMD_ddl_info.dat with 100% similarity]
PMD/data/PMD_removed_chains.dat [moved from PMD/PMD_removed_chains.dat with 100% similarity]
PMD/data/Survey_Points_PMD01.txt [moved from PMD/Survey_Points_PMD01.txt with 100% similarity]
PMD/data/xy.root [moved from PMD/xy.root with 100% similarity]
PMD/info/pmd_coordinates.jpg [moved from PMD/pmd_coordinates.jpg with 100% similarity]
PMD/info/pmd_da_info.txt [moved from PMD/pmd_da_info.txt with 100% similarity]
PMD/macro/AliPMDAlObjRnd.C [moved from PMD/AliPMDAlObjRnd.C with 100% similarity]
PMD/macro/AliPMDDigits2RawData.C [moved from PMD/AliPMDDigits2RawData.C with 100% similarity]
PMD/macro/AliPMDDigits2Recpoints.C [moved from PMD/AliPMDDigits2Recpoints.C with 100% similarity]
PMD/macro/AliPMDDigitsRead.C [moved from PMD/AliPMDDigitsRead.C with 100% similarity]
PMD/macro/AliPMDDoCalibration.C [moved from PMD/AliPMDDoCalibration.C with 100% similarity]
PMD/macro/AliPMDHits2Digits.C [moved from PMD/AliPMDHits2Digits.C with 100% similarity]
PMD/macro/AliPMDHits2SDigits.C [moved from PMD/AliPMDHits2SDigits.C with 100% similarity]
PMD/macro/AliPMDHitsRead.C [moved from PMD/AliPMDHitsRead.C with 100% similarity]
PMD/macro/AliPMDPutCalibration.C [moved from PMD/AliPMDPutCalibration.C with 100% similarity]
PMD/macro/AliPMDPutHot.C [moved from PMD/AliPMDPutHot.C with 100% similarity]
PMD/macro/AliPMDQualitycheck.C [moved from PMD/AliPMDQualitycheck.C with 100% similarity]
PMD/macro/AliPMDRaw2Digits.C [moved from PMD/AliPMDRaw2Digits.C with 100% similarity]
PMD/macro/AliPMDRaw2SDigits.C [moved from PMD/AliPMDRaw2SDigits.C with 100% similarity]
PMD/macro/AliPMDRawDataRead.C [moved from PMD/AliPMDRawDataRead.C with 100% similarity]
PMD/macro/AliPMDReadDdlinfo.C [moved from PMD/AliPMDReadDdlinfo.C with 100% similarity]
PMD/macro/AliPMDReadHot.C [moved from PMD/AliPMDReadHot.C with 100% similarity]
PMD/macro/AliPMDReadMapping.C [moved from PMD/AliPMDReadMapping.C with 100% similarity]
PMD/macro/AliPMDRec.C [moved from PMD/AliPMDRec.C with 100% similarity]
PMD/macro/AliPMDReconstruction.C [moved from PMD/AliPMDReconstruction.C with 100% similarity]
PMD/macro/AliPMDRecpointRead.C [moved from PMD/AliPMDRecpointRead.C with 100% similarity]
PMD/macro/AliPMDRootDataRead.C [moved from PMD/AliPMDRootDataRead.C with 100% similarity]
PMD/macro/AliPMDSDigits2Digits.C [moved from PMD/AliPMDSDigits2Digits.C with 100% similarity]
PMD/macro/AliPMDSDigitsRead.C [moved from PMD/AliPMDSDigitsRead.C with 100% similarity]
PMD/macro/AliPMDTrackRefRead.C [moved from PMD/AliPMDTrackRefRead.C with 100% similarity]
PMD/macro/AliPMDdigits.C [moved from PMD/AliPMDdigits.C with 100% similarity]
PMD/macro/AliPMDesdanal.C [moved from PMD/AliPMDesdanal.C with 100% similarity]
PMD/macro/AliPMDesdmake.C [moved from PMD/AliPMDesdmake.C with 100% similarity]
PMD/macro/AliPMDmerge.C [moved from PMD/AliPMDmerge.C with 100% similarity]
PMD/macro/CreateDDLinfoCDB.C [moved from PMD/CreateDDLinfoCDB.C with 100% similarity]
PMD/macro/CreateGainCDB.C [moved from PMD/CreateGainCDB.C with 100% similarity]
PMD/macro/CreateMappingCDB.C [moved from PMD/CreateMappingCDB.C with 100% similarity]
PMD/macro/CreateNoiseCut.C [moved from PMD/CreateNoiseCut.C with 100% similarity]
PMD/macro/CreatePedCDB.C [moved from PMD/CreatePedCDB.C with 100% similarity]
PMD/macro/MakePMDAlignmentObjs.C [moved from PMD/MakePMDAlignmentObjs.C with 100% similarity]
PMD/macro/MakePMDFullMisAlignment.C [moved from PMD/MakePMDFullMisAlignment.C with 100% similarity]
PMD/macro/MakePMDRecoParam.C [moved from PMD/MakePMDRecoParam.C with 100% similarity]
PMD/macro/MakePMDResMisAlignment.C [moved from PMD/MakePMDResMisAlignment.C with 100% similarity]
PMD/macro/MakePMDZeroMisAlignment.C [moved from PMD/MakePMDZeroMisAlignment.C with 100% similarity]
PMD/macro/PMDSurveyPointsGen_v1.C [moved from PMD/PMDSurveyPointsGen_v1.C with 100% similarity]
PMD/macro/PMDSurveyToAlignment_v1.C [moved from PMD/PMDSurveyToAlignment_v1.C with 100% similarity]
PMD/macro/ReadAlignmentData.C [moved from PMD/ReadAlignmentData.C with 100% similarity]
PMD/macro/ReadNoiseCut.C [moved from PMD/ReadNoiseCut.C with 100% similarity]
PMD/macro/TestPMDPreprocessor.C [moved from PMD/TestPMDPreprocessor.C with 100% similarity]
PMD/macro/TestPreprocessor.C [moved from PMD/TestPreprocessor.C with 100% similarity]
PMD/macro/ViewPMD.C [moved from PMD/ViewPMD.C with 100% similarity]
PWG/EMCAL/AliEmcalTriggerMaker.cxx
PWG/EMCAL/CMakeLists.txt
PWG/muon/AliAnalysisTaskAOD2MuonAOD.h
PWG/muon/CMakeLists.txt
PWG/muon/CpMacroWithFilter.C
PWG/muon/FILTER_AODMUONWITHTRACKLETS_rootlogon.C
PWG/muon/PWGmuonLinkDef.h
PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.cxx
PWGGA/PHOSTasks/CMakeLists.txt
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskChargedJetsPA.cxx
PWGJE/FlavourJetTasks/AliAnalysisTaskFlavourJetCorrelations.cxx
PWGJE/FlavourJetTasks/macros/AddTaskDFilterAndCorrelations.C
PWGPP/CMakeLists.txt
RAW/alimdc/CMakeLists.txt
RAW/dateStream/CMakeLists.txt
TPC/Base/test/UnitTest.C
TPC/TPCbase/AliTPCCalibGlobalMisalignment.cxx
TPC/TPCbase/AliTPCCalibGlobalMisalignment.h
TPC/TPCbase/AliTPCComposedCorrection.cxx
TPC/TPCbase/AliTPCExBBShape.cxx
TPC/TPCbase/AliTPCExBBShape.h
cmake/CMakeALICE.cmake
cmake/FindROOT.cmake

index 76a61b9b141bd967202533a23653d66b2ec5a59f..d9ca4497c599d035deeda444c145e3b74a3772c3 100644 (file)
@@ -64,4 +64,7 @@ endif(${CMAKE_SYSTEM} MATCHES Darwin)
 install(TARGETS ${MODULE}
   ARCHIVE DESTINATION lib
   LIBRARY DESTINATION lib)
-install(FILES ${HDRS} DESTINATION include)
\ No newline at end of file
+install(FILES ${HDRS} DESTINATION include)
+
+# Macros
+install(DIRECTORY macros DESTINATION ANALYSIS/ESDfilter)
\ No newline at end of file
index a42b1742286b2a29c206c4ff853dbfa16c76fe1a..725d658f5aaedc5c4f2aec703a44c3b7ffea3000 100644 (file)
@@ -97,3 +97,6 @@ install(TARGETS ${MODULE}
   LIBRARY DESTINATION lib)
 install(FILES ${HDRS} DESTINATION include)
 
+# Install macros
+install(FILES AddTaskTender.C DESTINATION ANALYSIS/TenderSupplies)
+
index a2e89c0b339ed355257e2efcd57b34e2272f851f..253f0ed6ec769b8352ff1d54365b0bb2b4be36b8 100644 (file)
@@ -25,9 +25,14 @@ message(STATUS "CMake platform: ${CMAKE_SYSTEM}")
 message(STATUS "Build folder: ${AliRoot_BINARY_DIR}")
 message(STATUS "Source folder: ${AliRoot_SOURCE_DIR}")
 message(STATUS "Installation folder: ${CMAKE_INSTALL_PREFIX}")
-if(CMAKE_BUILD_TYPE)
-    message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
-endif(CMAKE_BUILD_TYPE)
+
+# You can change the build type using 
+# cmake -DCMAKE_BUILD_TYPE=DEBUG | RELEASE | RELWITHDEBINFO | MINSIZEREL ...
+if (NOT CMAKE_BUILD_TYPE)
+  set(CMAKE_BUILD_TYPE RELWITHDEBINFO)
+endif(NOT CMAKE_BUILD_TYPE)
+message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
+
 
 if(CMAKE_INSTALL_PREFIX STREQUAL "${AliRoot_SOURCE_DIR}")
     message(FATAL_ERROR "Please choose a different installation point than the source tree!")
@@ -50,11 +55,10 @@ include(CheckGitVersion)
 #       - GCC_MAJOR.GCC_MINOR.GCC_PATCH
 include(CheckCompiler)
 
-# You can change the build type using 
-# cmake -DCMAKE_BUILD_TYPE=DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL...
-if (NOT CMAKE_BUILD_TYPE)
-  set(CMAKE_BUILD_TYPE RELWITHDEBINFO)
-endif(NOT CMAKE_BUILD_TYPE)
+# Shared library suffix
+if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+  set(CMAKE_SHARED_LIBRARY_SUFFIX .so)
+endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
 
 # ROOT dictionaries and maps
 include(CMakeALICE)
@@ -281,4 +285,4 @@ if(SHUTTLE)
     endif()
 endif(SHUTTLE)
 
-add_subdirectory(ALIROOT)
\ No newline at end of file
+add_subdirectory(ALIROOT)
index b291280675b139f911742ef5d018ca91be6da731..8d24c26338018b7e29fd408470c129df9dd05d2d 100644 (file)
@@ -25,7 +25,7 @@ if(DA)
 endif(DA)
 
 # Install the macros, docs
-install(DIRECTORY macros DESTINATION ACORDE)
-install(DIRECTORY doc DESTINATION ACORDER)
+install(DIRECTORY macros DESTINATION EMCAL)
+install(DIRECTORY doc DESTINATION EMCAL)
 
 message(STATUS "EMCAL enabled")
index 808ab636ebc6292bd3f035ef01897d049d194ed1..8aa1106afc2abfbcb6d13bc9357ce8a4fbcb512f 100644 (file)
@@ -34,6 +34,13 @@ include_directories(
                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
                    )
 
+option(USE_DLOPEN "Use \"dlopen()\" in favor of \"gSystem->Load()\" to load HLT component libraries." OFF)
+
+if(USE_DLOPEN)
+  add_definitions(-DHAVE_DLFCN_H)
+  message(STATUS "Using dlopen() for HLT component libs.")
+endif(USE_DLOPEN)
+
 # Sources in alphabetical order
 set(SRCS
     AliHLTBlockDataCollection.cxx
index 47aa27a72af005debedb038d1aa12fdbe290b2fa..960583ad391a1c06e58083f8578b72d10561a7b4 100644 (file)
@@ -60,4 +60,6 @@ add_subdirectory(rec)
 add_subdirectory(shuttle)
 add_subdirectory(sim)
 
+include("CMakehltdoc.conf")
+
 message(STATUS "HLT enabled")
index 14429117a3c81fcdd3cae93215e7db82bf387e01..05927ea912a0774082d95212d27779fc5e739ae3 100644 (file)
@@ -27,6 +27,17 @@ set(CUDA_NVCC_FLAGS --use_fast_math --maxrregcount 64 -O4 -Xptxas -O4 -gencode a
 #for convenience
 set(CAGPUDIR ${AliRoot_SOURCE_DIR}/HLT/TPCLib/tracking-ca/cagpu)
 
+# Module include folder
+include_directories(${AliRoot_SOURCE_DIR}/HLT/TPCLib/tracking-ca/cagpu/cuda
+                    ${AliRoot_SOURCE_DIR}/HLT/TPCLib/tracking-ca/cagpu
+                    ${AliRoot_SOURCE_DIR}/HLT/TPCLib/tracking-ca
+                   )
+
+# Additional include folders in alphabetical order except ROOT
+include_directories(${ROOT_INCLUDE_DIRS}
+                    ${AliRoot_SOURCE_DIR}/HLT/BASE
+                   )
+
 #nvcc fails with std=c++11, remove it temporarily
 string(FIND ${CMAKE_CXX_FLAGS} "-std=c++11" STDCXX11FOUND )
 if(STDCXX11FOUND GREATER -1)
@@ -49,17 +60,6 @@ endif()
 # not sure why __ROOT__ is used here, could just as well be something else
 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/G__AliHLTTPCCAGPU.cxx PROPERTIES COMPILE_DEFINITIONS "cudaError_t=int;__ROOT__")
 
-# Module include folder
-include_directories(${AliRoot_SOURCE_DIR}/HLT/TPCLib/tracking-ca/cagpu/cuda
-                    ${AliRoot_SOURCE_DIR}/HLT/TPCLib/tracking-ca/cagpu
-                    ${AliRoot_SOURCE_DIR}/HLT/TPCLib/tracking-ca
-                   )
-
-# Additional include folders in alphabetical order except ROOT
-include_directories(${ROOT_INCLUDE_DIRS}
-                    ${AliRoot_SOURCE_DIR}/HLT/BASE
-                   )
-
 # Sources in alphabetical order
 set(SRCS
     ${CAGPUDIR}/AliHLTTPCCAGPUTrackerBase.cxx
@@ -67,31 +67,34 @@ set(SRCS
    )
 
 # Headers from sources
-set(HDRS
+set(CINTHDRS
     ${CAGPUDIR}/AliHLTTPCCAGPUTrackerBase.h
     AliHLTTPCCAGPUTrackerNVCC.h
-    AliHLTTPCCAGPUTrackerCommon.h
+    )
+  
+set(HDRS
+    ${CINTHDRS}
+    ${CAGPUDIR}/AliHLTTPCCAGPUTrackerCommon.h
   )
 
 # 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}")
+generate_dictionary("${MODULE}" "" "${CINTHDRS}" "${incdirs}")
 
 # Generate the ROOT map
 # Dependecies
-set(LIBDEPS ${CUDA_LIBRARIES} cuda)
-generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+generate_rootmap("${MODULE}" "" "")
 
 # Add a library to the project using the specified source files
 add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
 #CUDA run-time and driver
-target_link_libraries(${MODULE} ${CUDA_LIBRARIES} cuda)
+target_link_libraries(${MODULE} ${CUDA_LIBRARIES})
 
 # Additional compilation flags
 set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "")
 
-*# Installation
+# Installation
 install(TARGETS ${MODULE}
         ARCHIVE DESTINATION lib
         LIBRARY DESTINATION lib)
index 939d630e256130f844a11200c9d4aabc6b1e7431..6c431086497bda1efc6f1d941c971b43b1ac3388 100644 (file)
@@ -35,14 +35,17 @@ endif()
 #convenience variables
 set(CAGPUDIR ${AliRoot_SOURCE_DIR}/HLT/TPCLib/tracking-ca/cagpu)
 
+#libdir path
+link_directories(${AMDAPPSDKROOT}/lib/x86_64)
+
 # build the OpenCL compile wrapper:
 # -- checks the correct vendor implementation (AMD)
 # -- builds binary code (blob) for the found platform(s)
 add_executable(opencl_compiler ${CAGPUDIR}/makefiles/makefile_opencl_compiler.cpp)
-target_link_libraries(opencl_compiler -L${AMDAPPSDKROOT}/lib/x86_64 amdocl64 OpenCL)
+target_link_libraries(opencl_compiler amdocl64 OpenCL)
 
 #convenience variables
-set(CL_SRC AliHLTTPCCAGPUTrackerOpenCL.cl )
+set(CL_SRC ${CAGPUDIR}/opencl/AliHLTTPCCAGPUTrackerOpenCL.cl )
 set(CL_BIN ${CMAKE_CURRENT_BINARY_DIR}/AliHLTTPCCAGPUTrackerOpenCLCode.bin )
 set(CL_INC
     -I${AliRoot_SOURCE_DIR}/HLT/BASE 
@@ -88,33 +91,31 @@ set(SRCS
    )
 
 # Headers from sources
-set(HDRS
+set(CINTHDRS
     ${CAGPUDIR}/AliHLTTPCCAGPUTrackerBase.h
-    ${CAGPUDIR}/AliHLTTPCCAGPUTrackerCommon.h
     AliHLTTPCCAGPUTrackerOpenCL.h
+)
+
+set(HDRS
+    ${CINTHDRS}
+    ${CAGPUDIR}/AliHLTTPCCAGPUTrackerCommon.h
     AliHLTTPCCAGPUTrackerOpenCLInternals.h
   )
 
 # 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}")
+generate_dictionary("${MODULE}" "" "${CINTHDRS}" "${incdirs}")
 
 # Generate the ROOT map
-# Dependecies
-set(LIBDEPS ${CUDA_LIBRARIES} cuda)
-generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
+generate_rootmap("${MODULE}" "" "")
 
 # Add a library to the project using the specified source files
 add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
-#CUDA run-time and driver
-link_directories(${AMDAPPSDKROOT}/lib/x86_64)
-target_link_libraries(amdocl64 OpenCL)
-
-# Additional compilation flags
-set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "")
+#MAD OpenCL run-time and driver
+target_link_libraries(${MODULE} amdocl64 OpenCL)
 
-*# Installation
+# Installation
 install(TARGETS ${MODULE}
         ARCHIVE DESTINATION lib
         LIBRARY DESTINATION lib)
index fc256b233ebd896f3e080cf27efb2e56564384d5..d9e8f1fb823b11d70440c96aaa3acd0ee17665d4 100644 (file)
@@ -45,7 +45,6 @@ IDL_PROPERTY_SUPPORT   = YES
 DISTRIBUTE_GROUP_DOC   = NO
 SUBGROUPING            = YES
 TYPEDEF_HIDES_STRUCT   = NO
-SYMBOL_CACHE_SIZE      = 0
 
 #---------------------------------------------------------------------------
 # Build related configuration options
index 8bc735152add9f95218425228181e56ed1130527..0521fc98dcdf79293d804224e46b2fcd8009750d 100644 (file)
@@ -45,7 +45,6 @@ IDL_PROPERTY_SUPPORT   = YES
 DISTRIBUTE_GROUP_DOC   = NO
 SUBGROUPING            = YES
 TYPEDEF_HIDES_STRUCT   = NO
-SYMBOL_CACHE_SIZE      = 0
 
 #---------------------------------------------------------------------------
 # Build related configuration options
index 20d65814c1655ea60015a521237ca4a8da9a8a16..89f6624d6726a9687b2b97caa65198672b359e6d 100644 (file)
@@ -69,7 +69,7 @@ for the generation of DAs (full documentation HERE -> link to daq documentation)
     The full list of AliRoot configuration parameters
     - CMAKE_INSTALL_PREFIX - mandatory standard CMake paramenter. It points to AliRoot installation directory.
     - ROOTSYS - mandatory Root installation directory.
-    - ALIEN - AliEn2 installation directory. This configuration parameter is mandatory if Root was build with 
+    - ALIEN - AliEn2 root installation directory. This configuration parameter is mandatory if Root was build with 
               AliEn2 support
     - FASTJET - FastJet installation point
     - ZEROMQ - ZeroMQ custom installation point. Not needed if ZeroMQ is installed on the system.
index 2a734df48c56018fe365771fda154d5de67cc9db..ab1e7697ae2ded6ad72ebb6ace7ba5cdbd27d46a 100644 (file)
@@ -35,8 +35,8 @@
   #include "AliESDEvent.h"
   #include "AliESDtrack.h"
 
-  #include "UPGRADE/AliITSUClusterPix.h"
-  #include "UPGRADE/AliITSULoader.h"
+  #include "AliITSUClusterPix.h"
+  #include "AliITSULoader.h"
 #endif
 
 Int_t GoodTracksITS(const Char_t *dir=".");
index 3aec0d468cfd6a0eac373ad10b3cfdc71ae15aa3..b5a74cf0c8fd00c7ab88bbd894fad7b821d78676 100644 (file)
@@ -40,8 +40,8 @@
   #include "AliESDEvent.h"
   #include "AliESDtrack.h"
 
-  #include "UPGRADE/AliITSUClusterPix.h"
-  #include "UPGRADE/AliITSULoader.h"
+  #include "AliITSUClusterPix.h"
+  #include "AliITSULoader.h"
 #endif
 
 Int_t GoodTracksCooked(const Char_t *dir=".");
index 077c6d1975e0e096136f1dfc69d6e50339e24d5a..b4e96d6d7138fc7e5ae8d32b6ea211bbe18ef5d9 100644 (file)
   #include "AliESDEvent.h"
   #include "AliESDtrack.h"
 
-  #include "Base/AliSimDigits.h"
-  #include "Base/AliTPCParamSR.h"
-  #include "Base/AliTPCLoader.h"
-  #include "Base/AliTPCcalibDB.h"
-  #include "Sim/AliTPC.h"
-  #include "Rec/AliTPCClustersRow.h"
+  #include "AliSimDigits.h"
+  #include "AliTPCParamSR.h"
+  #include "AliTPCLoader.h"
+  #include "AliTPCcalibDB.h"
+//  #include "AliTPC.h"
+  #include "AliTPCClustersRow.h"
 
   #include "AliCDBManager.h"
 #endif
@@ -397,8 +397,8 @@ Int_t GoodTracksTPC(const Char_t *dir) {
       return 2;
    }
       
-   AliTPC *TPC=(AliTPC*)rl->GetAliRun()->GetDetector("TPC");
-   Int_t ver = TPC->IsVersion(); 
+   //AliTPC *TPC=(AliTPC*)rl->GetAliRun()->GetDetector("TPC");
+   Int_t ver = 2; //TPC->IsVersion(); 
    cout<<"TPC version "<<ver<<" has been found !\n";
    if (ver==1) tpcl->LoadRecPoints();
    else if (ver==2) tpcl->LoadDigits();
index bcf3de995add2c5abfa6c187046fca6a2f0b8bab..f7da8699e99be2a4dc9566dd672419532738a942 100644 (file)
@@ -26,9 +26,9 @@
   #include "AliESDEvent.h"
   #include "AliESDtrack.h"
 
-  #include "UPGRADE/AliITSUClusterPix.h"
-  #include "UPGRADE/AliITSULoader.h"
-  #include "UPGRADE/AliITSUGeomTGeo.h"
+  #include "AliITSUClusterPix.h"
+  #include "AliITSULoader.h"
+  #include "AliITSUGeomTGeo.h"
 #endif
 
 
index dfba17898a0e9982fc28679eb245599bcf3425a9..ba37682a550ab8f4786ef03cff2a87babc688e95 100644 (file)
@@ -3,11 +3,11 @@
 #include "TFile.h"
 #include "TTree.h"
 #include "TH1F.h"
-#include "../ITS/UPGRADE/AliITSUClusterPix.h"
-#include "../ITS/UPGRADE/AliITSURecoLayer.h"
-#include "../ITS/UPGRADE/AliITSURecoDet.h"
-#include "../ITS/UPGRADE/AliITSUHit.h"
-#include "../ITS/UPGRADE/AliITSUGeomTGeo.h"
+#include "AliITSUClusterPix.h"
+#include "AliITSURecoLayer.h"
+#include "AliITSURecoDet.h"
+#include "AliITSUHit.h"
+#include "AliITSUGeomTGeo.h"
 #include "AliITSsegmentation.h"
 #include "AliGeomManager.h"
 #include "AliStack.h"
diff --git a/PMD/Readme.txt b/PMD/Readme.txt
new file mode 100644 (file)
index 0000000..6844c40
--- /dev/null
@@ -0,0 +1,27 @@
+PMD Codes
+++++++++++++++++++++++++++
+Author: Satyajit Jena
+Tue Dec 16 17:12:47 CET 2014 
++++++++++++++++++++++++++
+
+CMakeLists.txt : List of modules
+
+PMDbase: PMD base classes        
+PMDsim : Simulation Module        
+PMDrec : Reconstructoin Module         
+DA     : Detector Algorithm Module            
+
+anal
+    : Analysis related codes, calibration, cleanup
+    : template reader
+           
+info/
+    : To keep brief infos
+
+data/ 
+    : Ascii mapping info + some default data           
+macro/ 
+    : Contains all Example Files
+
+Readme.txt : This file    
+
diff --git a/PMD/anal/AliPmdCustomCalibTask.cxx b/PMD/anal/AliPmdCustomCalibTask.cxx
new file mode 100644 (file)
index 0000000..1f4ee3f
--- /dev/null
@@ -0,0 +1,190 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, 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.                  *
+ **************************************************************************/
+
+#include "Riostream.h"
+#include "TChain.h"
+#include "TTree.h"
+#include "TH1F.h"
+#include "TH2F.h"
+#include "TCanvas.h"
+#include "TList.h"
+
+#include "AliAnalysisTaskSE.h"
+#include "AliAnalysisManager.h"
+#include "AliStack.h"
+#include "AliESDtrackCuts.h"
+#include "AliESDEvent.h"
+#include "AliVEvent.h"
+#include "AliESDInputHandler.h"
+#include "AliAODEvent.h"
+#include "AliMCEvent.h"
+#include "AliESDPmdTrack.h"
+
+#include "AliPmdCustomCalibTask.h"
+
+/*------------------------------------------------------------------------
+  .  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
+  . 
+  .              PMD Offiline Calibration Task to run Over
+  .             ESDs - can be used in user task 
+  .                  - runs for single module in both plan
+  .                  - Centrality is not needed for PbPb
+  .                   - (Let me know if you need any updates)
+  .
+  .                 Satyajit Jena, IIT Bombay
+  .                 sjena@cern.ch
+  .                 3/8/2011
+  .   
+  .                 
+  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
+  ------------------------------------------------------------------------*/
+
+ClassImp(AliPmdCustomCalibTask)
+
+//________________________________________________________________________
+AliPmdCustomCalibTask::AliPmdCustomCalibTask() : AliAnalysisTaskSE(),
+  fOutput(0),
+  fSmn(10), 
+  fHistAdcPre(0), 
+  fHistAdcCpv(0),
+  fHistClusterXYPre(0),           
+  fHistClusterXYCpv(0) {
+  for(Int_t i =0;i<48;i++) {
+    for(Int_t j=0;j<96;j++)  {
+      fHistAdcPreRC[i][j] = NULL;
+      fHistAdcCpvRC[i][j] = NULL;
+    }
+  }
+}
+
+//________________________________________________________________________
+AliPmdCustomCalibTask::AliPmdCustomCalibTask(const char *name) 
+  :AliAnalysisTaskSE(name),
+   fOutput(0), 
+   fSmn(10),
+   fHistAdcPre(0), 
+   fHistAdcCpv(0),
+   fHistClusterXYPre(0),           
+   fHistClusterXYCpv(0) {
+  for(Int_t i =0;i<48;i++) {
+    for(Int_t j=0;j<96;j++)  {
+      fHistAdcPreRC[i][j] = NULL;
+      fHistAdcCpvRC[i][j] = NULL;
+    }
+  }
+  DefineOutput(1, TList::Class());                                       }
+
+//________________________________________________________________________
+AliPmdCustomCalibTask::~AliPmdCustomCalibTask() {
+  if (fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode()) delete fOutput;
+}
+
+//________________________________________________________________________
+void AliPmdCustomCalibTask::UserCreateOutputObjects() {
+  fOutput = new TList();
+  fOutput->SetOwner(kTRUE);  
+  
+  // Module wise ADC
+  fHistAdcPre = new TH1F("fHistAdcPre", "ADC Distribution for PRE module", 120, 0, 1200);
+  fHistAdcCpv = new TH1F("fHistAdcCpv", "ADC Distribution for CPV module", 120, 0, 1200);
+  
+  // XY QA
+  fHistClusterXYPre = new TH2F("fHistClusterXYPre", "ClusterX-Y Plot for PRE module", 400,-200,200,400,-200,200);
+  fHistClusterXYCpv = new TH2F("fHistClusterXYCpv", "ClusterX-Y Plot for CPV module", 400,-200,200,400,-200,200);
+
+  fOutput->Add(fHistAdcPre);
+  fOutput->Add(fHistAdcCpv);
+  fOutput->Add(fHistClusterXYPre);
+  fOutput->Add(fHistClusterXYCpv);
+  
+  Char_t *name  = new Char_t[100];
+  Char_t *title = new Char_t[200];
+
+  // Cell-wise ADC
+  for(Int_t i = 0; i < 48; i++)  {
+    for(Int_t j = 0; j < 96; j++) {
+      sprintf(name,"fHistPreAdcRaw%02dCol%02d",i,j);
+      sprintf(title,"ADC Distribution for PRE | SM %d - Raw%02dCol%02d",fSmn,i,j);
+      fHistAdcPreRC[i][j] = new TH1F(name,title,120,0,1200);
+      fOutput->Add(fHistAdcPreRC[i][j]);
+      
+      sprintf(name,"fHistCpvAdcRaw%02dCol%02d",i,j);
+      sprintf(title,"ADC Distribution for CPV | SM %d - Raw%02dCol%02d",fSmn,i,j);
+      fHistAdcCpvRC[i][j] = new TH1F(name,title,120,0,1200);
+      fOutput->Add(fHistAdcCpvRC[i][j]);
+    }
+  }    
+  PostData(1, fOutput);   
+}
+
+//________________________________________________________________________
+void AliPmdCustomCalibTask::UserExec(Option_t *) {
+  AliVEvent *event = InputEvent();
+  
+  if (!event) { Printf("ERROR: Could not retrieve event"); return; }
+  AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event);
+  if (!esd) {
+    AliError("Cannot get the ESD event");
+    return;
+  }  
+  
+   
+
+  Int_t npmdcl = esd->GetNumberOfPmdTracks();
+  
+  while (npmdcl--) {
+    AliESDPmdTrack *pmdtr = esd->GetPmdTrack(npmdcl);
+
+    Int_t   smn   = pmdtr->GetSmn();
+
+    if (smn != fSmn) continue; // if not the SM go back
+
+    Float_t adc   = pmdtr->GetClusterADC();
+    if(adc>1200)  continue;
+
+    Float_t sTag  = pmdtr->GetClusterSigmaX();
+    if(sTag < 999. || sTag > 1000.) continue; // Isolated Cell Section
+    
+    Int_t   det   = pmdtr->GetDetector();
+    
+    Float_t clsX  = pmdtr->GetClusterX();
+    Float_t clsY  = pmdtr->GetClusterY();
+
+    Float_t sRowCol = pmdtr->GetClusterSigmaY();
+    Int_t row = (Int_t)sRowCol/100;
+    Int_t col = (Int_t)sRowCol - row*100;
+    
+    if(det == 0) {
+      fHistAdcPre->Fill(adc);
+      fHistAdcPreRC[row][col]->Fill(adc);  
+      fHistClusterXYPre->Fill(clsX,clsY);    
+    } else if(det == 1) {
+      fHistAdcCpv->Fill(adc);    
+      fHistAdcCpvRC[row][col]->Fill(adc);
+      fHistClusterXYCpv->Fill(clsX,clsY);    
+    }
+  }
+  
+  PostData(1, fOutput);
+}
+
+//________________________________________________________________________
+void AliPmdCustomCalibTask::Terminate(Option_t *) {
+  fOutput = dynamic_cast<TList*> (GetOutputData(1));
+  if(!fOutput) { Printf("ERROR: could not retrieve TList fOutput"); return; }
+}
+                 
diff --git a/PMD/anal/AliPmdCustomCalibTask.h b/PMD/anal/AliPmdCustomCalibTask.h
new file mode 100644 (file)
index 0000000..db61a7f
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef AliPmdCustomCalibTask_h
+#define AliPmdCustomCalibTask_h
+
+
+/*------------------------------------------------------------------------
+  .  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
+  .                 Satyajit Jena, IIT Bombay
+  .                 sjena@cern.ch
+  .                 3/8/2011
+  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
+  ------------------------------------------------------------------------*/
+
+class TH1F;
+class TH2F;
+class TList;
+
+#ifndef ALIANALYSISTASKSE_H
+#include "AliAnalysisTaskSE.h"
+#endif
+
+class AliPmdCustomCalibTask : public AliAnalysisTaskSE {
+ public:
+    AliPmdCustomCalibTask();
+    AliPmdCustomCalibTask(const char *name);
+    virtual ~AliPmdCustomCalibTask();
+    
+    virtual void     UserCreateOutputObjects();
+    virtual void     UserExec(Option_t *option);
+    virtual void     Terminate(Option_t *);
+    
+    void SetSmn(Int_t i ) {fSmn = i; }
+
+
+ private:
+    
+    TList *fOutput;              //! Output list
+    Int_t fSmn;                  //! Module under Consideration 
+    TH1F *fHistAdcPre;           //! ADC spectrum for PRE for entire module 
+    TH1F *fHistAdcCpv;           //! ADC spectrum for CPV for entire module
+    TH2F *fHistClusterXYPre;     //! cluster XY for PRE for entire module
+    TH2F *fHistClusterXYCpv;     //! cluster XY for CPV for entir module
+    
+    TH1F *fHistAdcPreRC[48][96]; //! cell-wise ADC PRE
+    TH1F *fHistAdcCpvRC[48][96]; //! cell-wise ADC CPV
+       
+    AliPmdCustomCalibTask(const AliPmdCustomCalibTask&); // not implemented
+    AliPmdCustomCalibTask& operator=(const AliPmdCustomCalibTask&); // not implemented
+    
+    ClassDef(AliPmdCustomCalibTask, 1); // example of analysis
+};
+
+#endif
+
similarity index 100%
rename from PMD/PMD_PED.root
rename to PMD/data/PMD_PED.root
similarity index 100%
rename from PMD/xy.root
rename to PMD/data/xy.root
similarity index 100%
rename from PMD/pmd_da_info.txt
rename to PMD/info/pmd_da_info.txt
similarity index 100%
rename from PMD/AliPMDPutHot.C
rename to PMD/macro/AliPMDPutHot.C
similarity index 100%
rename from PMD/AliPMDRec.C
rename to PMD/macro/AliPMDRec.C
similarity index 100%
rename from PMD/AliPMDdigits.C
rename to PMD/macro/AliPMDdigits.C
similarity index 100%
rename from PMD/AliPMDmerge.C
rename to PMD/macro/AliPMDmerge.C
similarity index 100%
rename from PMD/CreatePedCDB.C
rename to PMD/macro/CreatePedCDB.C
similarity index 100%
rename from PMD/ReadNoiseCut.C
rename to PMD/macro/ReadNoiseCut.C
similarity index 100%
rename from PMD/ViewPMD.C
rename to PMD/macro/ViewPMD.C
index 0b9ba77817fdf536142ad90fac37ddfa457c1d98..84b41176cebe7ebe0c916d0f06bc5332a3eae801 100644 (file)
@@ -430,9 +430,6 @@ AliEmcalTriggerPatchInfo* AliEmcalTriggerMaker::ProcessPatch(TriggerMakerTrigger
   else
     fSimpleOfflineTriggers->GetPosition(globCol, globRow);
 
-  // In case of level0 reject triggers with an odd row-col combination
-  // if(type == kTMEMCalLevel0 && (globRow % 2 != 0 || globCol % 2 != 0)) return 0;
-
   // get the absolute trigger ID
   Int_t absId=-1;
   fGeom->GetAbsFastORIndexFromPositionInEMCAL(globCol, globRow, absId);
@@ -790,7 +787,10 @@ Bool_t AliEmcalTriggerMaker::CheckForL0(const AliVCaloTrigger& trg) const {
     trg.GetTriggerBits(tbits);
     return tbits & (1 << fTriggerBitConfig->GetLevel0Bit());
   } else {
-    // For Data check from the level0 times if the trigger has fired at level0
+    // For Data check from the level0 times if the trigger has fired at level0,
+    // accept the patch only in case row and col are even
+    Int_t row, col;trg.GetPosition(row, col);   // @MF: temporarily for understanding, under the asumption that the L0 algorithm has no overlapping fast-ors, to be replaced by a refined trigger patch selection based on ADC above threshold
+    if(row %2 || col % 2) return false;
     Int_t nl0times(0);
     Bool_t l0fired(kFALSE);
     trg.GetNL0Times(nl0times);
index 50473b31e59a1d836d0ec9f400d77d43bb8c4d73..b0d15c1ca6d91c036f8817e7e9b46a873397e173 100644 (file)
@@ -110,3 +110,4 @@ install(FILES ${HDRS} DESTINATION include)
 
 # Installing the macros
 install (DIRECTORY macros DESTINATION PWG/EMCAL)
+install (DIRECTORY data DESTINATION PWG/EMCAL)
index b13b6909877bdcc35d54a4cb2d3fbfea31d56c98..fbbaaa844a031ac74d8434d87d1cf845c6a829cb 100644 (file)
@@ -18,7 +18,7 @@ class AliAODBranchReplicator;
 class AliAnalysisTaskAOD2MuonAOD : public AliAnalysisTaskSE
 {
 public:
-  AliAnalysisTaskAOD2MuonAOD(Int_t mcMode=1, Bool_t withSPDTracklets=kFALSE);
+  AliAnalysisTaskAOD2MuonAOD(Int_t mcMode=3, Bool_t withSPDTracklets=kTRUE);
   virtual ~AliAnalysisTaskAOD2MuonAOD();
 
   virtual void UserCreateOutputObjects();
index 9939988796000d1acb32ab1a6889adce49847754..29c17226ebda5c9ff84976571ac9738dd65f1352 100644 (file)
@@ -32,7 +32,8 @@ include_directories(${ROOT_INCLUDE_DIRS}
 # Sources - alphabetical order
 set(SRCS
   AliAnalysisTaskMuMu.cxx 
-  AliHistogramCollection.cxx 
+  AliHistogramCollection.cxx
+  AliAnalysisTaskAOD2MuonAOD.cxx
   AliAnalysisTaskESDMuonFilter.cxx 
   AliAnalysisTaskMuonAODfromGeneral.cxx 
   AliAnalysisTaskFromStandardToMuonAOD.cxx 
index 4de2d3b10bc11c74a7f0e731abde377594c66d2e..b1eb3f05c69d89c71c66d923af08ea992a275d0a 100644 (file)
@@ -46,7 +46,11 @@ Int_t CpMacroWithFilter(TString from, TString to)
     TString part = from(ix,from.Length()-ix+1);
     TObjArray* tmp = part.Tokenize(".");
     TObjString* ostr = static_cast<TObjString*>(tmp->First());
-    if (!ostr) break;
+    if (!ostr)
+    {
+      std::cerr << "Could not get filter ??? Filename does not look right !!!" << std::endl;
+      return -2;
+    }
     filterName = ostr->String();
     delete tmp;
     ix = filterName.Index("_WITH_");
index 721476574433703dfa1fb72bb20e5f89a8509f05..49d4810075eda1aa54c75aa3aa8af8bc87be6d6a 100644 (file)
   gSystem->Load("libCDB");
   gSystem->Load("libSTEER");
   gSystem->Load("libANALYSISalice");
-  
-  //    gSystem->Load("libCORRFW");
-  //    gSystem->Load("libPWGmuon");
-  
-  gROOT->LoadMacro("AliAnalysisNonMuonTrackCuts.cxx+");
-  gROOT->LoadMacro("AliAnalysisNonPrimaryVertices.cxx+");
-  gROOT->LoadMacro("AliAODMuonReplicator.cxx+");
-  gROOT->LoadMacro("AliAnalysisTaskESDMuonFilter.cxx+");
-  gROOT->LoadMacro("AliAnalysisTaskAOD2MuonAOD.cxx+");
+  gSystem->Load("libCORRFW");
+  gSystem->Load("libPWGmuon");
 }
index 3a585a0f910365805e5395e8a4e00a828aa9e90f..237f838f94ccd7e9d3faf27e30f5e2818692ddd0 100644 (file)
@@ -5,6 +5,7 @@
 #pragma link off all functions;
 
 #pragma link C++ class AliAODEventInfo+;
+#pragma link C++ class AliAnalysisTaskAOD2MuonAOD+;
 #pragma link C++ class AliAnalysisTaskMuonAODfromGeneral+;
 #pragma link C++ class AliAnalysisTaskFromStandardToMuonAOD+;
 #pragma link C++ class AliAnalysisTaskSingleMu+;
index 9f8b38a47c612d06baa201e9fbc71b60138977dc..b0759fe6e97606a586828864610a1a7d7b1e8232 100644 (file)
@@ -833,27 +833,29 @@ void AliAnalysisTaskEMCALIsoPhoton::FillClusHists()
     GetTrIso(clsVec, triso, trphiband, trcore);
     Int_t nInConePairs = 0;
     Double_t onePairMass = 0;
-    if(c->GetM02()>0.1 && c->GetM02()<0.3 && isCPV){
-      TObjArray *inConeInvMassArr = (TObjArray*)fInConeInvMass.Tokenize(";");
-      TObjArray *inConePairClEt =  (TObjArray*)fInConePairClEt.Tokenize(";");
-      nInConePairs = inConeInvMassArr->GetEntriesFast();
-      Int_t nInConePi0 = inConePairClEt->GetEntriesFast();
-      if(nInConePairs != nInConePi0)
-       printf("Inconsistent number of in cone pairs!!!\n");
-      for(int ipair=0;ipair<nInConePairs;ipair++){
-       TObjString *obs = (TObjString*)inConeInvMassArr->At(ipair);
-       TObjString *obet = (TObjString*)inConePairClEt->At(ipair);
-       TString smass = obs->GetString();
-       TString spairEt = obet->GetString();
-       Double_t pairmass = smass.Atof();
-       Double_t pairEt = spairEt.Atof();//this must be zero when inv mass outside pi0 range
-       if(0==ipair && nInConePairs==1)
-         onePairMass = pairmass;
-       if(fDebug)
-         printf("=================+++++++++++++++Inv mass inside the cone for photon range: %1.1f,%1.1f,%1.1f+-++++-+-+-+-++-+-+-\n",Et,pairmass,ceiso+triso);
-       fEtCandIsoAndIsoWoPairEt->Fill(Et,ceiso+triso,ceiso+triso-pairEt);
-      }
+    //---
+    //if(c->GetM02()>0.1 && c->GetM02()<0.3 && isCPV){
+    TObjArray *inConeInvMassArr = (TObjArray*)fInConeInvMass.Tokenize(";");
+    TObjArray *inConePairClEt =  (TObjArray*)fInConePairClEt.Tokenize(";");
+    nInConePairs = inConeInvMassArr->GetEntriesFast();
+    Int_t nInConePi0 = inConePairClEt->GetEntriesFast();
+    if(nInConePairs != nInConePi0)
+      printf("Inconsistent number of in cone pairs!!!\n");
+    for(int ipair=0;ipair<nInConePairs;ipair++){
+      TObjString *obs = (TObjString*)inConeInvMassArr->At(ipair);
+      TObjString *obet = (TObjString*)inConePairClEt->At(ipair);
+      TString smass = obs->GetString();
+      TString spairEt = obet->GetString();
+      Double_t pairmass = smass.Atof();
+      Double_t pairEt = spairEt.Atof();//this must be zero when inv mass outside pi0 range
+      if(0==ipair && nInConePairs==1)
+       onePairMass = pairmass;
+      if(fDebug)
+       printf("=================+++++++++++++++Inv mass inside the cone for photon range: %1.1f,%1.1f,%1.1f+-++++-+-+-+-++-+-+-\n",Et,pairmass,ceiso+triso);
+      fEtCandIsoAndIsoWoPairEt->Fill(Et,ceiso+triso,ceiso+triso-pairEt);
     }
+    //}
+    //---
     Double_t dr = TMath::Sqrt(c->GetTrackDx()*c->GetTrackDx() + c->GetTrackDz()*c->GetTrackDz());
     if(Et>10 && Et<15 && dr>0.025){
       fHigherPtConeM02->Fill(fHigherPtCone,c->GetM02());
@@ -1032,12 +1034,12 @@ void AliAnalysisTaskEMCALIsoPhoton::GetCeIso(TVector3 vec, Int_t maxid, Float_t
        if(lpair.M()>0.11 && lpair.M()<0.165){
          fInConePairedClusEtVsCandEt->Fill(EtCl,Et);
          fInConePairClEt += Form("%f;",Et);
-         continue;
+         //continue;
        }
        else 
          fInConePairClEt += Form("%f;",0.0);
-       if(lpair.M()>0.52 && lpair.M()<0.58)
-         continue;
+       /*if(lpair.M()>0.52 && lpair.M()<0.58)
+         continue;*/
       }
       totiso += nEt;
       if(R<0.04)
index f0224600ae7b9a33dfbf543fd33362be68d18735..7c6a2f506cfa7354dd067d717216f656a3266a3b 100644 (file)
@@ -138,6 +138,10 @@ install(FILES ${HDRS} DESTINATION include)
 # Install the macros
 install(DIRECTORY PHOS_PbPb DESTINATION PWGGA/PHOSTasks)
 install(DIRECTORY UserTasks/macros DESTINATION  PWGGA/PHOSTasks/UserTasks)
+install(DIRECTORY CaloCellQA/macros DESTINATION PWGGA/PHOSTasks/CaloCellQA)
+install(DIRECTORY PHOS_PbPbQA/macros DESTINATION PWGGA/PHOSTasks/PHOS_PbPbQA)
+install(DIRECTORY PHOS_TriggerQA/macros DESTINATION PWGGA/PHOSTasks/PHOS_TriggerQA)
 install(FILES PHOS_Correlation/AddTaskPi0Correlations.C DESTINATION PWGGA/PHOSTasks/PHOS_Correlation)
 install(FILES PHOS_EpRatio/AddTaskPHOSEpRatio.C DESTINATION PWGGA/PHOSTasks/PHOS_EpRatio)
-install(FILES PHOS_Tagging/AddTaskPHOSTagging.C DESTINATION PWGGA/PHOSTasks/PHOS_Tagging)
\ No newline at end of file
+install(FILES PHOS_Tagging/AddTaskPHOSTagging.C DESTINATION PWGGA/PHOSTasks/PHOS_Tagging)
+
index c23df1f93b19ba935f51e86bb5a9b03a2ed676d0..61c5e98eca40c3db07ac9536f76569e45d5e8fc2 100644 (file)
@@ -64,14 +64,19 @@ void AliAnalysisTaskChargedJetsPA::Init()
 
   SetCurrentOutputList(0);
 
-  // Cuts
+  TH1* tmpHisto = AddHistogram1D<TH1D>("hVertexAcceptance", "Accepted vertices for different conditions", "", 4, 0, 4, "stage","N^{Events}/cut");
+  tmpHisto->GetXaxis()->SetBinLabel(1, "Triggered all");
+  tmpHisto->GetXaxis()->SetBinLabel(2, "Triggered w/ vertex");
+  tmpHisto->GetXaxis()->SetBinLabel(3, "Pile-up corrected all");
+  tmpHisto->GetXaxis()->SetBinLabel(4, "Pile-up corrected w vertex");
+
   TH2* tmpHisto2D = AddHistogram2D<TH2D>("hCentrality", Form("Accepted events in centrality (%s)", fCentralityType.Data()), "COLZ", 102, 0., 102., 4, 0,4,"Centrality","Cut stage","dN^{Events}");
   tmpHisto2D->GetYaxis()->SetBinLabel(1, "Before cuts");
   tmpHisto2D->GetYaxis()->SetBinLabel(2, "After pile up");
   tmpHisto2D->GetYaxis()->SetBinLabel(3, "After vertex demand");
   tmpHisto2D->GetYaxis()->SetBinLabel(4, "After vertex cuts");
 
-  TH1* tmpHisto = AddHistogram1D<TH1D>("hTrackAcceptance", "Accepted tracks (0 = before cuts, 1 = after eta, 2 = after pT)", "", 3, 0, 3, "stage","N^{Tracks}/cut");
+  tmpHisto = AddHistogram1D<TH1D>("hTrackAcceptance", "Accepted tracks (0 = before cuts, 1 = after eta, 2 = after pT)", "", 3, 0, 3, "stage","N^{Tracks}/cut");
   tmpHisto->GetXaxis()->SetBinLabel(1, "Before cuts");
   tmpHisto->GetXaxis()->SetBinLabel(2, "After eta");
   tmpHisto->GetXaxis()->SetBinLabel(3, "After p_{T}");
@@ -1020,8 +1025,40 @@ inline Bool_t AliAnalysisTaskChargedJetsPA::IsEventInAcceptance(AliVEvent* event
   if (!event)
     return kFALSE;
 
-  // ### Get centrality values
+  fPrimaryVertex = event->GetPrimaryVertex();
+
+  // ### Create plot for vertex acceptance
+  fHelperClass->SetMaxVtxZ(10000.);
+
+  // Check vertex existance
+  Bool_t hasVertex = kFALSE;
+  if(fUseDefaultVertexCut)
+  {
+    if(fHelperClass->IsVertexSelected2013pA(event))
+      hasVertex = kTRUE;
+  }
+  else
+  {
+    if(!fPrimaryVertex || (fPrimaryVertex->GetNContributors()<2) || (TMath::Sqrt(fPrimaryVertex->GetX()*fPrimaryVertex->GetX() + fPrimaryVertex->GetY()*fPrimaryVertex->GetY()) > 1.0)) 
+      hasVertex = kTRUE;
+  }
+
+  // All triggered events
+  FillHistogram("hVertexAcceptance", 0.5); // all triggered events all
+  if(hasVertex)
+    FillHistogram("hVertexAcceptance", 1.5); // all triggered events w/ vertex
+
+  // Pile-up corrected events
+  if(!fHelperClass->IsPileUpEvent(event))
+  {
+    FillHistogram("hVertexAcceptance", 2.5); // pile-up corr. events all
+    if(hasVertex)
+      FillHistogram("hVertexAcceptance", 3.5); // pile-up corr. events w/ vertex
+  }
 
+  fHelperClass->SetMaxVtxZ(10.);
+
+  // ### Get centrality values
   AliCentrality* tmpCentrality = event->GetCentrality();
   Double_t centralityPercentile = -1.0;
   if (tmpCentrality != NULL)
@@ -1044,23 +1081,9 @@ inline Bool_t AliAnalysisTaskChargedJetsPA::IsEventInAcceptance(AliVEvent* event
   FillHistogram("hCentrality", centralityPercentile, 1.5); // after pileup cut
 
   // ### CUT STAGE 2: Existence of primary vertex
-  fPrimaryVertex = event->GetPrimaryVertex();
 
-  if(fUseDefaultVertexCut)
-  {
-    fHelperClass->SetMaxVtxZ(10000.);
-    if(!fHelperClass->IsVertexSelected2013pA(event))
-    {
-      fHelperClass->SetMaxVtxZ(10.);
-      return kFALSE; 
-    }
-    fHelperClass->SetMaxVtxZ(10.);
-  }
-  else // Vertex cut for pp
-  {
-    if(!fPrimaryVertex || (fPrimaryVertex->GetNContributors()<2) || (TMath::Sqrt(fPrimaryVertex->GetX()*fPrimaryVertex->GetX() + fPrimaryVertex->GetY()*fPrimaryVertex->GetY()) > 1.0)) 
-      return kFALSE;
-  }
+  if(!hasVertex)
+    return kFALSE; 
 
   FillHistogram("hVertexZ",fPrimaryVertex->GetZ());
   FillHistogram("hCentrality", centralityPercentile, 2.5); // after vertex existance cut
index 4b5b9f5b421e756a5bbbe69dbd498cea14404f55..a48ea796ac4cd18e4758cb53d100be53a5fe2be8 100644 (file)
@@ -528,9 +528,8 @@ Bool_t AliAnalysisTaskFlavourJetCorrelations::Run()
     //If there's no background subtraction rhoval=0 and momentum is simply not took into account
     AliRhoParameter *rho = 0;
     Double_t rhoval = 0;
-    TString sname("Rho");
-    if (!sname.IsNull()) {
-        rho = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(sname));
+    if (!fJetCont->GetRhoName().IsNull()) {
+        rho = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(fJetCont->GetRhoName()));
         if(rho) rhoval = rho->GetVal();
     }
 
@@ -685,7 +684,7 @@ Bool_t AliAnalysisTaskFlavourJetCorrelations::Run()
             //It corrects the jet momentum due to D daughters out of the jet
            RecalculateMomentum(pjet,fPmissing);                            
            fPtJet=TMath::Sqrt(pjet[0]*pjet[0]+pjet[1]*pjet[1]); //recalculated jet pt
-           
+           if((jet->Pt()-jet->Area()*rhoval)<0) fPtJet = -fPtJet;
            
            //debugging histograms
            Double_t pmissing=TMath::Sqrt(fPmissing[0]*fPmissing[0]+fPmissing[1]*fPmissing[1]+fPmissing[2]*fPmissing[2]); //recalculated jet total momentum
@@ -719,7 +718,7 @@ Bool_t AliAnalysisTaskFlavourJetCorrelations::Run()
                //It corrects the jet momentum due to D daughters out of the jet
               RecalculateMomentum(pjet,fPmissing);                                 
               fPtJet=TMath::Sqrt(pjet[0]*pjet[0]+pjet[1]*pjet[1]); //recalculated jet pt
-              
+              if((jet->Pt()-jet->Area()*rhoval)<0) fPtJet = -fPtJet;
               SideBandBackground(sbcand,jet);
               
            }
@@ -744,7 +743,7 @@ Bool_t AliAnalysisTaskFlavourJetCorrelations::Run()
                //It corrects the jet momentum due to D daughters out of the jet
               RecalculateMomentum(pjet,fPmissing);                                 
               fPtJet=TMath::Sqrt(pjet[0]*pjet[0]+pjet[1]*pjet[1]); //recalculated jet pt
-              
+              if((jet->Pt()-jet->Area()*rhoval)<0) fPtJet = -fPtJet;
               MCBackground(charmbg,jet);
            }
         }
@@ -838,9 +837,8 @@ Double_t AliAnalysisTaskFlavourJetCorrelations::Z(AliVParticle* part,AliEmcalJet
     //It corrects the each component of the jet momentum for Z calculation
     AliRhoParameter *rho = 0;
     Double_t rhoval = 0;
-    TString sname("Rho");
-    if (!sname.IsNull()) {
-        rho = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(sname));
+    if (!fJetCont->GetRhoName().IsNull()) {
+        rho = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(fJetCont->GetRhoName()));
         if(rho){
             rhoval = rho->GetVal();
             pj[0] = jet->Px() - jet->Area()*(rhoval*TMath::Cos(jet->AreaPhi()));
@@ -916,7 +914,9 @@ Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
    fOutput->Add(fhstat);
    
    const Int_t nbinsmass=300;
-   const Int_t nbinsptjet=500;
+   const Int_t nbinspttrack=500;
+   Int_t nbinsptjet=500;
+   if(!fJetCont->GetRhoName().IsNull()) nbinsptjet=400;
    const Int_t nbinsptD=100;
    const Int_t nbinsz=100;
    const Int_t nbinsphi=200;
@@ -932,7 +932,9 @@ Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
    const Int_t nbinsSpsContrib=100;
    const Int_t nbinsSpsA=100;
     
-   const Float_t ptjetlims[2]={0.,200.};
+   const Float_t pttracklims[2]={0.,200.};
+   Float_t ptjetlims[2]={0.,200.};
+   if(!fJetCont->GetRhoName().IsNull()) ptjetlims[0]=-200.;
    const Float_t ptDlims[2]={0.,50.};
    const Float_t zlims[2]={0.,1.2};
    const Float_t philims[2]={0.,6.3};
@@ -948,7 +950,7 @@ Bool_t  AliAnalysisTaskFlavourJetCorrelations::DefineHistoForAnalysis(){
    fhPhiJetTrks->Sumw2();
    fhEtaJetTrks    = new TH1F("hEtaJetTrks","Jet tracks #eta distribution; #eta",  nbinseta,etalims[0],etalims[1]);
    fhEtaJetTrks->Sumw2();
-   fhPtJetTrks     = new TH1F("hPtJetTrks",  "Jet tracks Pt distribution; p_{T} (GeV/c)",nbinsptjet,ptjetlims[0],ptjetlims[1]);
+   fhPtJetTrks     = new TH1F("hPtJetTrks",  "Jet tracks Pt distribution; p_{T} (GeV/c)",nbinspttrack,pttracklims[0],pttracklims[1]);
    fhPtJetTrks->Sumw2();
    
    fhEjet      = new TH1F("hEjet",  "Jet energy distribution;Energy (GeV)",500,0,200);
@@ -1624,10 +1626,10 @@ Float_t AliAnalysisTaskFlavourJetCorrelations::DeltaR(AliEmcalJet *p1, AliVParti
     Double_t phi1=p1->Phi(),eta1=p1->Eta();
     
     //It subtracts the backgroud of jets if it was asked for it.
-    TString sname("Rho");
-    if (!sname.IsNull()) {
+
+    if (!fJetCont->GetRhoName().IsNull()) {
         AliRhoParameter *rho = 0;
-        rho = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(sname));
+        rho = dynamic_cast<AliRhoParameter*>(InputEvent()->FindListObject(fJetCont->GetRhoName()));
         if(rho){
             Double_t pj[3];
             Bool_t okpj=p1->PxPyPz(pj);
index 36aaabfc3a3ad07ee7020d32ca86e7a6f0530c5a..68744c22f7ea8fb6c11ca21c59b8df452d4c662c 100644 (file)
@@ -105,6 +105,7 @@ AliAnalysisTaskSE *AddTaskDFilterAndCorrelations(
      //jetCont->SetJetAcceptanceType(cutType);
      jetCont->SetJetPtCut(jptcut);
      jetCont->SetPercAreaCut(percjetareacut);
+     jetCont->SetRhoName(rhoname); 
   }
   taskCorr->SetMC(theMCon);
   taskCorr->SetUseReco(reco);
index 190b4b9d70cd6a30192d0e029d7500e977423ac1..e4875b9573cdfd707b62c78f01ebbba11eb2be9b 100644 (file)
@@ -277,6 +277,7 @@ install(FILES ${HDRS} DESTINATION include)
 install(DIRECTORY macros DESTINATION PWGPP)
 install(DIRECTORY CalibMacros DESTINATION PWGPP)
 install(DIRECTORY PilotTrain DESTINATION PWGPP)
+install(DIRECTORY CalibMacros DESTINATION PWGPP)
 install(FILES HMPID/AddTaskHmpidQA.C DESTINATION PWGPP/HMPID)
 install(FILES T0/AddTaskT0QA.C  DESTINATION PWGPP/T0)
 install(FILES TOF/AddTaskTOFQA.C
index a04d5f32092965f7179a5484d249e3cfac4d7bd3..c8cfd77a339325ac35587ddeef4070f7f9a53ed2 100644 (file)
@@ -26,18 +26,12 @@ include_directories(${ROOT_INCLUDE_DIRS}
                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
                    )
 
-link_directories(${ROOT_LIBDIR})
-
-# ROOT libraries that are not in root-config --libs
-set(ROOT_DEPENDENCIES Geom VMC Minuit)
-set(ALIROOT_DEPENDENCIES STEERBase ESD MDC RAWDatabase RAWDatarec)
-
 # Create an object to be reused in case of static libraries 
 # Otherwise the sources will be compiled twice
 add_library(${MODULE}-object OBJECT alimdc_main.cxx)
 # Add a library to the project using the object
 add_executable(${MODULE} $<TARGET_OBJECTS:${MODULE}-object>)
-target_link_libraries(${MODULE} STEERBase ESD MDC RAWDatabase RAWDatarec ${ROOT_DEPENDENCIES} ${ROOT_LIBRARIES})
+target_link_libraries(${MODULE} STEERBase ESD MDC RAWDatabase RAWDatarec)
 
 # Compile and link flags
 set(MODULE_COMPILE_FLAGS)
@@ -48,14 +42,6 @@ if(DATE_FOUND)
     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 target compile and linking flags
 set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
@@ -105,4 +91,4 @@ if(MDCRPM)
     # install RPM into $CMAKE_INSTALL_PREFIX/darpms
     install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/alimdc-rpm/RPMS/ DESTINATION mdcrpm PATTERN "\\.rpm")
 
-endif(MDCRPM)
\ No newline at end of file
+endif(MDCRPM)
index 79991ddc007abece95e4a5771347a9b72b98bd46..69618d23fb4f51c23aeaa9c88b20a0e8d94207d5 100644 (file)
@@ -18,24 +18,10 @@ set(MODULE dateStream)
 
 include_directories(${AliRoot_SOURCE_DIR}/${MODULE})
 
-# Aditional include folders in alphabetical order except ROOT
-include_directories(${ROOT_INCLUDE_DIRS}
-                    ${AliRoot_SOURCE_DIR}/RAW/RAWDatabase
-                    ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec
-                    ${AliRoot_SOURCE_DIR}/STEER/STEERBase
-                   )
-
-
-link_directories(${ROOT_LIBDIR})
-
-# Aditional ROOT libraries that are not shoed by root-config --libs
-set(ROOTEXTRALIBS Geom VMC Minuit)
-
 # Add an executable to the project using the specified source files
 add_executable(${MODULE} dateStream.cxx)
-target_link_libraries(${MODULE} STEERBase RAWDatabase ${ROOTEXTRALIBS} ${ROOT_LIBRARIES})
 
-# compile and link flags
+# compile and link flags from DATE (probably not needed)
 set(MODULE_COMPILE_FLAGS)
 set(MODULE_LINK_FLAGS)
 
@@ -44,14 +30,6 @@ if(DATE_FOUND)
     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 target compile and linking flags
 set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
index 2c6ffc8c6c9a3445ff9f69d66b9051430f54163c..898d562307305f8e9db589ea99da1c9d30fadad0 100644 (file)
@@ -1,14 +1,12 @@
 /*
   Unit test for some functions classes  used in the $ALICE_ROOT/TPC/Base directory:
-  gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/ -I$ALICE_ROOT/include -I$ALICE_ROOT/STEER\
-   -I$ALICE_ROOT/TPC -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TRD -I$ALICE_ROOT/TOF -I$ALICE_ROOT/RAW -I$ALICE_ROOT/PWG1 -I$ALICE_ROOT/STAT -I$ALICE_ROOT/TPC/Base -I$ALICE_ROOT/TPC/Calib");
-   
+    
+gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/ -I$ALICE_ROOT/include -I$ALICE_ROOT/STEER   -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TRD -I$ALICE_ROOT/TOF -I$ALICE_ROOT/RAW  -I$ALICE_ROOT/STAT -I$ALICE_ROOT/TPC/TPCbase -I$ALICE_ROOT/TPCcalib");
+
+
   .L $ALICE_ROOT/TPC/Base/test/UnitTest.C+ 
-  UnitTestAliTPCCalPadTree();
-  TestCorrection_AliTPCExBTwistAddCorrectionCompact();
-  TestCorrection_AliTPCFCVoltError3DAddCorrectionCompact();
-  TestCorrection_AliTPCRocVoltError3DAddCorrectionCompact();
-  TestCorrection_AliTPCBoundaryVoltErrorAddCorrectionCompact();
+G UnitTestAliTPCCalPadTree();
+  TestCorrection_AliTPCCorrection_AddCorrectionCompact();
 
 */
 
 #include "AliTPCFCVoltError3D.h"
 #include "AliTPCROCVoltError3D.h"
 #include "AliTPCBoundaryVoltError.h"
+#include "AliTPCCalibGlobalMisalignment.h"
+#include "AliCDBEntry.h"
+#include "TStopwatch.h"
+#include "TGeoMatrix.h"
+
 //
 // PARAMETERS to set from outside:
 //
@@ -38,6 +40,14 @@ TString baseDir="/hera/alice/wiechula/calib/guiTrees";  // TO  FIX specification
 //
 //
 
+Bool_t  TestCorrection_AliTPCCorrection_AddCorrectionCompact();
+Bool_t  TestCorrection_AliTPCExBTwistAddCorrectionCompact();
+Bool_t  TestCorrection_AliTPCFCVoltError3DAddCorrectionCompact();
+Bool_t  TestCorrection_AliTPCRocVoltError3DAddCorrectionCompact();
+Bool_t  TestCorrection_AliTPCBoundaryVoltErrorAddCorrectionCompact();
+Bool_t  TestCorrection_AliTPCCalibGlobalMisalignmentAddCorrectionCompact();
+Bool_t  TestCorrection_AliTPCComposedCorrectionAddCorrectionCompact();
+
 
 void  UnitTestAliTPCCalPadTree(){
   //
@@ -115,11 +125,14 @@ Bool_t  TestCorrection_AliTPCExBTwistAddCorrectionCompact(){
   AliTPCExBTwist  *twistY    = new  AliTPCExBTwist;
   twistX->SetXTwist(0.001);  // 1 mrad twist in x
   twistY->SetYTwist(0.001);  // 1 mrad twist in x
-  isOK[0]&=compCorrTwist->AddCorrectionCompact(twistX,1);
-  isOK[0]&=compCorrTwist->AddCorrectionCompact(twistY,1);
+  isOK[0]&=compCorrTwist->AddCorrectionCompact(twistX,0.5);
+  isOK[0]&=compCorrTwist->AddCorrectionCompact(twistY,0.5);
+  isOK[0]&=compCorrTwist->AddCorrectionCompact(twistX,0.5);
+  isOK[0]&=compCorrTwist->AddCorrectionCompact(twistY,0.5);
   isOK[0]&=compCorrTwist->AddCorrectionCompact(twistY,-1);
   isOK[0]&=compCorrTwist->AddCorrectionCompact(twistX,-1);
   isOK[1]=compCorrTwist->GetCorrections()->GetEntries()==1;
+
   AliTPCExBTwist  *twistRes=0;
   if (isOK[1]==kFALSE){
     isOK[2]=kFALSE;
@@ -177,8 +190,10 @@ Bool_t  TestCorrection_AliTPCFCVoltError3DAddCorrectionCompact(){
     corr1->SetCopperRodShiftC(isec,TMath::Sin(TMath::Pi()*isec/36),kFALSE);
   }
   //
-  isOK[0]&=compCorrComp->AddCorrectionCompact(corr0,1);
-  isOK[0]&=compCorrComp->AddCorrectionCompact(corr1,1);
+  isOK[0]&=compCorrComp->AddCorrectionCompact(corr0,0.5);
+  isOK[0]&=compCorrComp->AddCorrectionCompact(corr1,0.5);
+  isOK[0]&=compCorrComp->AddCorrectionCompact(corr0,0.5);
+  isOK[0]&=compCorrComp->AddCorrectionCompact(corr1,0.5);
   isOK[0]&=compCorrComp->AddCorrectionCompact(corr1,-1);
   isOK[0]&=compCorrComp->AddCorrectionCompact(corr0,-1);
   isOK[1]=compCorrComp->GetCorrections()->GetEntries()==1;
@@ -245,8 +260,10 @@ Bool_t  TestCorrection_AliTPCRocVoltError3DAddCorrectionCompact(){
   matrixDz*=0.5;
   corr1->SetROCData(&matrixDz);
   //
-  isOK[0]&=compCorrROCVoltError3D->AddCorrectionCompact(corr0,1);
-  isOK[0]&=compCorrROCVoltError3D->AddCorrectionCompact(corr1,1);
+  isOK[0]&=compCorrROCVoltError3D->AddCorrectionCompact(corr0,0.5);
+  isOK[0]&=compCorrROCVoltError3D->AddCorrectionCompact(corr1,0.5);
+  isOK[0]&=compCorrROCVoltError3D->AddCorrectionCompact(corr0,0.5);
+  isOK[0]&=compCorrROCVoltError3D->AddCorrectionCompact(corr1,0.5);
   isOK[0]&=compCorrROCVoltError3D->AddCorrectionCompact(corr1,-1);
   isOK[0]&=compCorrROCVoltError3D->AddCorrectionCompact(corr0,-1);
   isOK[1]=compCorrROCVoltError3D->GetCorrections()->GetEntries()==1;
@@ -307,8 +324,10 @@ Bool_t  TestCorrection_AliTPCBoundaryVoltErrorAddCorrectionCompact(){
   corr0->SetBoundariesA(boundaries);
   corr1->SetBoundariesA(boundaries);  
   //
-  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr0,1);
-  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr1,1);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr0,0.5);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr1,0.5);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr0,0.5);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr1,0.5);
   isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr1,-1);
   isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr0,-1);
   isOK[1]=compCorrBoundaryVoltError->GetCorrections()->GetEntries()==1;
@@ -351,3 +370,184 @@ Bool_t  TestCorrection_AliTPCBoundaryVoltErrorAddCorrectionCompact(){
   }    
   return res;
 } 
+
+
+
+
+
+Bool_t  TestCorrection_AliTPCCalibGlobalMisalignmentAddCorrectionCompact(){
+  //
+  // AliTPCCalibGlobalMisalignmentAddCorrectionCompact
+  // Invariant used in test is not exact it is only approximate - as matrix multiplication is not comulative
+  //  !!!! BUG FOUND ????
+  //  hmatrix1->GetTranslation()[idelta]=xxx; // does not work as expected Translation is set,  visible in Print but not used  later
+  const Float_t kEpsilon=0.0001;
+  Bool_t isOK[10]={kTRUE,kTRUE,kTRUE,kTRUE,kTRUE,kTRUE};
+  Double_t delta[3]={0.01,0.02,0.03};
+  
+  AliTPCComposedCorrection *compCorrBoundaryVoltError = new AliTPCComposedCorrection();
+  AliTPCCalibGlobalMisalignment  *corr0    = new  AliTPCCalibGlobalMisalignment;
+  AliTPCCalibGlobalMisalignment  *corr1    = new  AliTPCCalibGlobalMisalignment;
+  AliTPCCalibGlobalMisalignment  *corr2    = new  AliTPCCalibGlobalMisalignment;
+  TObjArray sectorAlign(72);
+  
+  TGeoHMatrix *hmatrix0 = new TGeoHMatrix;
+  TGeoHMatrix *hmatrix1 = new TGeoHMatrix;
+  hmatrix0->RotateX(TMath::RadToDeg()*0.0001);
+  hmatrix0->RotateY(TMath::RadToDeg()*0.0002);
+  hmatrix0->RotateZ(TMath::RadToDeg()*0.0003);
+  hmatrix1->SetTranslation(delta);
+  for (Int_t isec=0; isec<72; isec++){
+    if ((isec%2)==0) sectorAlign.AddAt(hmatrix0,isec);
+    if ((isec%2)==1) sectorAlign.AddAt(hmatrix1,isec);
+  }
+  corr0->SetAlignGlobal(hmatrix0);
+  corr1->SetAlignGlobal(hmatrix1);
+  corr0->SetAlignGlobalDelta(hmatrix1);
+  corr1->SetAlignGlobalDelta(hmatrix0);
+  corr2->SetAlignSectors(&sectorAlign);
+  //
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr0,0.5);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr1,0.5);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr0,0.5);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr1,0.5);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr0,-1);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr1,-1);
+  //
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr2,1);
+  isOK[0]&=compCorrBoundaryVoltError->AddCorrectionCompact(corr2,-1);
+  //
+  //
+  isOK[1]=compCorrBoundaryVoltError->GetCorrections()->GetEntries()==1;
+  AliTPCCalibGlobalMisalignment  *corrRes=0;
+  if (isOK[1]==kFALSE){
+    isOK[2]=kFALSE;
+    isOK[3]=kFALSE;
+    isOK[4]=kFALSE;
+  }else{
+    corrRes=  dynamic_cast<AliTPCCalibGlobalMisalignment *>(compCorrBoundaryVoltError->GetSubCorrection(0));
+    if (corrRes==NULL){
+      isOK[2]=kFALSE;
+      isOK[3]=kFALSE;
+      isOK[4]=kFALSE;
+    }else{
+      for (Int_t itrans=0; itrans<3; itrans++){
+       isOK[2+itrans]&=TMath::Abs(corrRes->GetAlignGlobal()->GetTranslation()[itrans])<kEpsilon;
+       for (Int_t isec=0; isec<72; isec++){
+         isOK[2+itrans]&=TMath::Abs(((TGeoHMatrix*)(corrRes->GetAlignSectors()->At(isec)))->GetTranslation()[itrans])<kEpsilon;
+       }
+      }
+      corrRes->GetAlignGlobal()->Print();
+      corrRes->GetAlignSectors()->At(0)->Print();
+      corrRes->GetAlignSectors()->At(1)->Print();      
+    }
+  }
+  Bool_t res=kTRUE; 
+  for (Int_t i=0; i<5; i++) res&=isOK[i];
+  {
+    if (isOK[0]==kFALSE){
+      ::Error("TestCorrection_AddCorrectionCompact","AliTPCCalibGlobalMisalignment -ADD FAILED");
+    }else{
+      ::Info("TestCorrection_AddCorrectionCompact","AliTPCCalibGlobalMisalignment -ADD OK");
+    }
+    if (isOK[1]==kFALSE){
+      ::Error("TestCorrection_AddCorrectionCompact","AliTPCCalibGlobalMisalignment - wrong entries  FAILED");
+    }else{
+      ::Info("TestCorrection_AddCorrectionCompact","AliTPCCalibGlobalMisalignment - entries  OK");
+    }
+    if (isOK[2]==kFALSE || isOK[3]==kFALSE ||isOK[4]==kFALSE ){
+      ::Error("TestCorrection_AddCorrectionCompact","AliTPCCalibGlobalMisalignment - inconsitent entries  FAILED");    
+    }else{
+      ::Info("TestCorrection_AddCorrectionCompact","AliTPCCalibGlobalMisalignment - consistent entries  OK");    
+    }
+  }    
+  return res;
+} 
+
+Bool_t  TestCorrection_AliTPCCorrection_AddCorrectionCompact(){
+  //
+  //
+  //
+  TestCorrection_AliTPCExBTwistAddCorrectionCompact();
+  TestCorrection_AliTPCFCVoltError3DAddCorrectionCompact();
+  TestCorrection_AliTPCRocVoltError3DAddCorrectionCompact();
+  TestCorrection_AliTPCBoundaryVoltErrorAddCorrectionCompact();
+  TestCorrection_AliTPCCalibGlobalMisalignmentAddCorrectionCompact();
+}
+
+
+Bool_t TestCorrection_AliTPCComposedCorrectionAddCorrectionCompact(){
+  //
+  // Tests of AliTPCComposedCorrection
+  //  1.) Make linear combination  correction example using weights.  
+  //      Test correction  checking invariant inverse x orig  (there are simpler way to do inversion using AliTPCInverseCorrection)
+  //
+  //  2.) Make compact for of the Composed correction. Test correction  checking invariant inverse x orig
+  //          
+  const Int_t npointsTest=10000;
+  const Float_t kEpsilon=0.0001;  // using Floating point precission
+
+  //
+  // 0.) Read an input OCDB entry 
+  //
+  TFile * f = TFile::Open("$ALICE_OCDB/alice/data/2010/OCDB/TPC/Calib/Correction/Run0_999999999_v8_s0.root");
+  AliCDBEntry * entry=(AliCDBEntry*)f->Get("AliCDBEntry");
+  TObjArray * corrArray  = (TObjArray *)entry->GetObject();
+  AliTPCComposedCorrection *compInput = (AliTPCComposedCorrection *)corrArray->At(0);
+  //
+  // 1.) Make linear combination  correction example using weights.
+  //     Test correction  checking invariant inverse x orig  (there are simpler way to do inversion using AliTPCInverseCorrection)
+  AliTPCComposedCorrection *compInverse = new AliTPCComposedCorrection();
+  Bool_t isOK1[10]={kTRUE};
+  TObjArray * collection=   dynamic_cast<TObjArray*>(compInput->GetCorrections());
+  Int_t entries = collection->GetEntries();
+  TVectorD weights(entries+1);
+  for (Int_t i=0; i<entries+1; i++) weights[i]=-1.0;
+  weights[0]=1.;
+  TObjArray * arrayInvariant = new TObjArray(entries+1);
+  arrayInvariant->AddLast(compInput);
+  for (Int_t i=0; i<entries; i++) arrayInvariant->AddLast( collection->At(i));
+  compInverse->SetCorrections( arrayInvariant);
+  compInverse->SetWeights(&weights);
+  compInverse->AddVisualCorrection(compInverse,1);
+  compInput->AddVisualCorrection(compInput,2);
+  TF1 finv1("finv1","AliTPCCorrection::GetCorrXYZ(x,x,100,0,1)",85,245);
+  //
+  TVectorD vecCompInverse(npointsTest);
+  for (Int_t icoord=0; icoord<3; icoord++){
+    for (Int_t ipoint=0; ipoint<npointsTest; ipoint++){
+      Double_t r= 85.+gRandom->Rndm()*150;
+      Double_t phi= gRandom->Rndm()*TMath::TwoPi();
+      Double_t z=500*(gRandom->Rndm()-0.5);
+    vecCompInverse[ipoint]=AliTPCCorrection::GetCorrXYZ(r*TMath::Cos(phi),r*TMath::Sin(phi),z, icoord, 1);
+    }
+    Double_t rms=TMath::RMS(npointsTest,vecCompInverse.GetMatrixArray());
+    Double_t mean=TMath::Mean(npointsTest,vecCompInverse.GetMatrixArray());
+    isOK1[icoord]=TMath::Abs(rms)<kEpsilon;
+    isOK1[icoord]&=TMath::Abs(mean)<kEpsilon;
+  }
+  if (isOK1[0]==kFALSE || isOK1[1]==kFALSE ||isOK1[2]==kFALSE ){
+    ::Error("TestCorrection_AddCorrectionCompact",TString::Format("AliTPCComposedCorrection - Test1 (%d,%d,%d) FAILED",isOK1[0], isOK1[1],isOK1[2]).Data());    
+  }else{
+    ::Info("TestCorrection_AddCorrectionCompact","AliTPCComposedCorrection - Test1  OK");    
+  } 
+  //
+  //  2.) Make compact for of the Composed correction. Test correction  checking invariant inverse x orig
+  //      This take time - dostortion has to be recalculated
+  AliTPCComposedCorrection *compOutInverseCompact = new AliTPCComposedCorrection();
+  compOutInverseCompact->AddCorrectionCompact(compInput,-1);
+  compOutInverseCompact->AddCorrectionCompact(compInput, 1);
+  compOutInverseCompact->SetOmegaTauT1T2(0,1,1);
+  compInput->SetOmegaTauT1T2(0,1,1);
+  compOutInverseCompact->AddVisualCorrection(compOutInverseCompact,10);  
+  compInput->AddVisualCorrection(compInput,2);
+  TStopwatch timer;
+  //
+  TF1 fcomp("fcomp","AliTPCCorrection::GetCorrXYZ(x,x,100,0,10)",85,245);
+  TF1 forig("forig","-AliTPCCorrection::GetCorrXYZ(x,x,100,0,2)",85,245);
+  TF1 fdiff("fdiff","AliTPCCorrection::GetCorrXYZ(x,x,100,0,10)+AliTPCCorrection::GetCorrXYZ(x,x,100,0,2)",85,245);
+  timer.Print();
+
+
+  return kTRUE;
+}
index d7744a5b4d62da050042cae526a10bef6e1771b7..826ad52987865af4b3c74bb04063987f7a57c3b2 100644 (file)
@@ -76,6 +76,149 @@ AliTPCCalibGlobalMisalignment::~AliTPCCalibGlobalMisalignment() {
   delete fArraySector;  // sector matrices
 }
  
+
+
+Bool_t AliTPCCalibGlobalMisalignment::AddCorrectionCompact(AliTPCCorrection* corr, Double_t weight){
+  //
+  // Add correction  and make them compact
+  // Assumptions:
+  //  - origin of distortion/correction are additive
+  //  - only correction ot the same type supported ()
+  if (corr==NULL) {
+    //AliError("Zerro pointer - correction");
+    return kFALSE;
+  }  
+  AliTPCCalibGlobalMisalignment* corrC = dynamic_cast<AliTPCCalibGlobalMisalignment *>(corr);
+  if (corrC == NULL) {
+    //AliError(TString::Format("Inconsistent class types: %s\%s",IsA()->GetName(),corr->IsA()->GetName()).Data());
+    return kFALSE;
+  }
+  //
+  AliTPCCalibGlobalMisalignment & add = *corrC;
+  fXShift+=weight*add.fXShift;               // Shift in global X [cm]
+  fYShift+=weight*add.fYShift;               // Shift in global Y [cm]
+  fZShift+=weight*add.fZShift;               // Shift in global Z [cm]
+
+  fRotPhiA+=weight*add.fRotPhiA;      // simple rotation of A side read-out plane around the Z axis [rad]
+  fRotPhiC+=weight*add.fRotPhiC;      // simple rotation of C side read-out plane around the Z axis [rad]
+  fdRPhiOffsetA+=weight*add.fdRPhiOffsetA;  // add a constant offset of dRPhi (or local Y) in [cm]: purely for calibration purposes!
+  fdRPhiOffsetC+=weight*add.fdRPhiOffsetC;  // add a constant offset of dRPhi (or local Y) in [cm]: purely for calibration purposes!
+  //
+  // Quadrant alignment
+  //
+  if (add.fQuadrantQ0) {
+    if (fQuadrantQ0)  fQuadrantQ0->Add(weight*(*(add.fQuadrantQ0)));
+    if (!fQuadrantQ0) {
+      fQuadrantQ0 = (TVectorD*)(add.fQuadrantQ0->Clone());
+      (*fQuadrantQ0)*=weight;
+    }
+  }
+  if (add.fQuadrantRQ0) {
+    if (fQuadrantRQ0) fQuadrantRQ0->Add(weight*(*(add.fQuadrantRQ0)));
+    if (!fQuadrantRQ0) {
+      fQuadrantRQ0 = (TVectorD*)(add.fQuadrantRQ0->Clone());
+      (*fQuadrantRQ0)*=weight;
+    }
+  }
+  //
+  if (add.fQuadrantQ1) {
+    if (fQuadrantQ1) fQuadrantQ1->Add(weight*(*(add.fQuadrantQ1)));
+    if (!fQuadrantQ1) {
+      fQuadrantQ1 = (TVectorD*)(add.fQuadrantQ1->Clone());
+       (*fQuadrantQ1)*=weight;
+    }
+  }
+  if (add.fQuadrantRQ1) {
+    if (fQuadrantRQ1) fQuadrantRQ1->Add(weight*(*(add.fQuadrantRQ1)));
+    if (!fQuadrantRQ1) {
+      fQuadrantRQ1 = (TVectorD*)(add.fQuadrantRQ1->Clone());
+       (*fQuadrantRQ1)*=weight;
+    }
+  }
+  //
+  if (add.fQuadrantQ2) {
+    if (fQuadrantQ2) fQuadrantQ2->Add(weight*(*(add.fQuadrantQ2)));
+    if (!fQuadrantQ2) {
+      fQuadrantQ2 = (TVectorD*)(add.fQuadrantQ2->Clone());
+      (*fQuadrantQ2)*=weight;
+    }
+  }
+  if (add.fQuadrantRQ2) {
+    if (fQuadrantRQ2) fQuadrantRQ2->Add(weight*(*(add.fQuadrantRQ2)));
+    if (!fQuadrantRQ2) {
+      fQuadrantRQ2 = (TVectorD*)(add.fQuadrantRQ2->Clone());
+      (*fQuadrantQ2)*=weight;
+    }
+  }
+  //
+  // Global alignment - use native ROOT representation
+  //
+  Double_t delta[3]={0};
+  if (add.fMatrixGlobal){
+    TGeoHMatrix matrixW=*(add.fMatrixGlobal);
+    TGeoHMatrix matrixScaled;
+    const Double_t *rotMatrix   = matrixW.GetRotationMatrix();
+    const Double_t *transMatrix = matrixW.GetTranslation();
+    matrixScaled.RotateZ(-rotMatrix[1]*TMath::RadToDeg()*weight);
+    matrixScaled.RotateY(rotMatrix[2]*TMath::RadToDeg()*weight);
+    matrixScaled.RotateX(-rotMatrix[5]*TMath::RadToDeg()*weight);
+    for (Int_t i=0; i<3; i++) delta[i]=weight*transMatrix[i];
+    matrixScaled.SetTranslation(delta);
+    // (matrixScaled*matrixW).Print(); in case weight -1 should be unit matrix
+    //
+    if (!fMatrixGlobal)  {
+      fMatrixGlobal = new TGeoHMatrix(matrixScaled); 
+    }else{
+      ((TGeoHMatrix*)fMatrixGlobal)->Multiply(&matrixScaled); 
+    }
+  }
+  if (add.fMatrixGlobalDelta){
+    TGeoHMatrix matrixW=*(add.fMatrixGlobalDelta);
+    TGeoHMatrix matrixScaled;
+    const Double_t *rotMatrix   = matrixW.GetRotationMatrix();
+    const Double_t *transMatrix = matrixW.GetTranslation();
+    matrixScaled.RotateZ(-rotMatrix[1]*TMath::RadToDeg()*weight);
+    matrixScaled.RotateY(rotMatrix[2]*TMath::RadToDeg()*weight);
+    matrixScaled.RotateX(-rotMatrix[5]*TMath::RadToDeg()*weight);
+    for (Int_t i=0; i<3; i++) delta[i]=weight*transMatrix[i];
+    matrixScaled.SetTranslation(delta);
+    // (matrixScaled*matrixW).Print(); in case weight -1 should be unit matrix
+    //
+    if (!fMatrixGlobalDelta)  {
+      fMatrixGlobalDelta = new TGeoHMatrix(matrixScaled); 
+    }else{
+      ((TGeoHMatrix*)fMatrixGlobalDelta)->Multiply(&matrixScaled); 
+    }
+  }
+  if (add.fArraySector){
+    if (!fArraySector) {
+      fArraySector = new TObjArray(72);
+      for (Int_t isec=0; isec<72; isec++) fArraySector->AddAt(new TGeoHMatrix,isec);
+    }
+    for (Int_t isec=0; isec<72; isec++){
+      TGeoHMatrix *mat0= (TGeoHMatrix*)fArraySector->At(isec);
+      TGeoHMatrix *mat1= (TGeoHMatrix*)add.fArraySector->At(isec);     
+      if (mat0&&mat1){
+       TGeoHMatrix matrixW=*(mat1);
+       TGeoHMatrix matrixScaled;
+       const Double_t *rotMatrix   = matrixW.GetRotationMatrix();
+       const Double_t *transMatrix = matrixW.GetTranslation();
+       matrixScaled.RotateZ(-rotMatrix[1]*TMath::RadToDeg()*weight);
+       matrixScaled.RotateY(rotMatrix[2]*TMath::RadToDeg()*weight);
+       matrixScaled.RotateX(-rotMatrix[5]*TMath::RadToDeg()*weight);
+       for (Int_t i=0; i<3; i++) delta[i]=weight*transMatrix[i];
+       matrixScaled.SetTranslation(delta); 
+         mat0->Multiply(&matrixScaled);
+      }
+    }    
+  }
+  //
+  return kTRUE;
+}
+
+
+
+
 void AliTPCCalibGlobalMisalignment::SetQuadranAlign(const TVectorD *quadrantQ0, const TVectorD *quadrantRQ0, const TVectorD *quadrantQ1,const TVectorD *quadrantRQ1,  const TVectorD *quadrantQ2,  const TVectorD *quadrantRQ2){
   //
   // Set quadrant alignment
@@ -252,7 +395,7 @@ void AliTPCCalibGlobalMisalignment::GetCorrection(const Float_t x[],const Short_
   }
 }
 
-void AliTPCCalibGlobalMisalignment::Print(Option_t* /*option*/ ) const {
+void AliTPCCalibGlobalMisalignment::Print(Option_t* option )  const{
   //
   // Print function to check the settings 
   //
@@ -261,8 +404,21 @@ void AliTPCCalibGlobalMisalignment::Print(Option_t* /*option*/ ) const {
   printf(" - X-Shift: %1.3f cm, Y-Shift: %1.3f cm, Z-Shift: %1.3f cm \n",fXShift,fYShift,fZShift);
   printf(" - Phi-Rotations: A side: %1.5f rad, C side: %1.5f rad\n",fRotPhiA,fRotPhiC);
   printf(" - dRPhi offsets: A side: %1.5f cm, C side: %1.5f cm\n",fdRPhiOffsetA,fdRPhiOffsetC);
+  TString opt = option; opt.ToLower();
+  if (opt.Contains("a")){
+    if (GetAlignGlobal()){
+      printf("GetAlignGlobal()\n");
+      GetAlignGlobal()->Print();
+    }
+    if (GetAlignGlobalDelta()){
+      printf("GetAlignGlobalDelta()\n");
+      GetAlignGlobalDelta()->Print();
+    }
+    if (GetAlignSectors()){
+      printf("GetAlignSectors()\n");    
+      GetAlignSectors()->Print();
+    }
+  }
 }
 
 void AliTPCCalibGlobalMisalignment::AddAlign(const  AliTPCCalibGlobalMisalignment & add){
index 4e849f8d1e81007d9dee8bbd13b099791e795d25..e6d9bf8a23f1dde0a67303d5b0950ae41b2dec13 100644 (file)
@@ -26,7 +26,7 @@ class AliTPCCalibGlobalMisalignment : public AliTPCCorrection {
 public:
   AliTPCCalibGlobalMisalignment();
   virtual ~AliTPCCalibGlobalMisalignment();
-  
+  virtual Bool_t AddCorrectionCompact(AliTPCCorrection* corr, Double_t weight);
   // initialization and update functions
   //  virtual void Init();
   //  virtual void Update(const TTimeStamp &timeStamp);
@@ -47,7 +47,7 @@ public:
   Float_t GetRotPhiC() const {return fRotPhiC;}
   Float_t GetdRPhiOffsetA() const {return fdRPhiOffsetA;}
   Float_t GetdRPhiOffsetC() const {return fdRPhiOffsetC;}
-  virtual void Print(Option_t* option="") const;
+  virtual void Print(Option_t* option="") const ;
   void SetQuadranAlign(const TVectorD *quadrantQ0, const TVectorD *quadrantRQ0, const TVectorD *quadrantQ1,const TVectorD *quadrantRQ1,  const TVectorD *quadrantQ2,  const TVectorD *quadrantRQ2);
   // 
   // Alignment manipulation using TGeoMatrix
index d7d396cfdec0ad026ae3effa9dc4ebbdc15124fa..d7b7d833e8723a419f3d5acd4654caf4aa009c94 100644 (file)
@@ -130,7 +130,8 @@ Bool_t AliTPCComposedCorrection::AddCorrectionCompact(AliTPCCorrection* corr, Do
     Int_t ncorrs= corrC->fCorrections->GetEntries();
     Bool_t isOK=kTRUE;
     for (Int_t icorr=0; icorr<ncorrs; icorr++){
-      isOK&=AddCorrectionCompact(corrC->GetSubCorrection(icorr),weight*(*((corrC->fWeights)))[icorr]);
+      Double_t weight0=((corrC->fWeights)==NULL)?1:(*(corrC->fWeights))[icorr];
+      isOK&=AddCorrectionCompact(corrC->GetSubCorrection(icorr),weight*weight0);
     }
     return isOK;
   }
index 9f95e82321c1a69fd663394e65d0a248c9078a8a..bf1dafafd8830430e4179dd89ca8b7e0b251d23d 100644 (file)
@@ -28,6 +28,7 @@
 AliTPCExBBShape::AliTPCExBBShape()
   : AliTPCCorrection("exb_bshape","ExB B-shape"),
     fC1(0.),fC2(0.),
+    fScaling(1.),
     fBField(0)
 {
   //
@@ -41,6 +42,30 @@ AliTPCExBBShape::~AliTPCExBBShape() {
   //
 }
 
+
+
+
+Bool_t AliTPCExBBShape::AddCorrectionCompact(AliTPCCorrection* corr, Double_t weight){
+  //
+  // Add correction  and make them compact
+  // Assumptions:
+  //  - origin of distortion/correction are additive
+  //  - only correction ot the same type supported ()
+  if (corr==NULL) {
+    AliError("Zerro pointer - correction"); 
+    return kFALSE;
+  }  
+  AliTPCExBBShape* corrC = dynamic_cast<AliTPCExBBShape *>(corr);
+  if (corrC == NULL) {
+    AliError(TString::Format("Inconsistent class types: %s\%s",IsA()->GetName(),corr->IsA()->GetName()).Data());
+    return kFALSE;
+  }
+  fScaling= weight;
+  //
+  return kTRUE;
+}
+
+
 void AliTPCExBBShape::Init() {
   //
   // Initialization funtion
@@ -101,8 +126,8 @@ void AliTPCExBBShape::GetCorrection(const Float_t x[],const Short_t roc,Float_t
   fBField->GetTPCRatInt(xStart,intBStart);
   fBField->GetTPCRatInt(xEnd,  intBEnd  );
 
-  const Float_t intBxOverBz=(intBEnd[0]-intBStart[0]);
-  const Float_t intByOverBz=(intBEnd[1]-intBStart[1]);
+  const Float_t intBxOverBz=fScaling*(intBEnd[0]-intBStart[0]);
+  const Float_t intByOverBz=fScaling*(intBEnd[1]-intBStart[1]);
   
   dx[0]=fC2*intBxOverBz-fC1*intByOverBz;
   dx[1]=fC1*intBxOverBz+fC2*intByOverBz;
@@ -131,8 +156,8 @@ void AliTPCExBBShape::GetBxAndByOverBz(const Float_t x[],const Short_t roc,Float
   fBField->GetTPCRatInt(xStart,intBStart);
   fBField->GetTPCRatInt(xEnd,  intBEnd  );
 
-  const Float_t intBxOverBz=(intBEnd[0]-intBStart[0]);
-  const Float_t intByOverBz=(intBEnd[1]-intBStart[1]);
+  const Float_t intBxOverBz=fScaling*(intBEnd[0]-intBStart[0]);
+  const Float_t intByOverBz=fScaling*(intBEnd[1]-intBStart[1]);
   
   BxByOverBz[0]=intBxOverBz;
   BxByOverBz[1]=intByOverBz;
index fde0c6da41a9c2fdb165dfa9b12d9bfecc142601..2e3db4478fd1505c731c766f593eb8a0fbf079b8 100644 (file)
@@ -41,7 +41,8 @@ class AliMagF;
 class AliTPCExBBShape : public AliTPCCorrection {
 public:
   AliTPCExBBShape();
-  virtual ~AliTPCExBBShape();
+  virtual ~AliTPCExBBShape();  
+  virtual Bool_t AddCorrectionCompact(AliTPCCorrection* corr, Double_t weight);
 
  // initialization and update functions
   virtual void Init();
@@ -66,11 +67,11 @@ public:
 
   virtual void Print(Option_t* option="") const;
   static Double_t GetBFieldXYZ(Double_t gx, Double_t gy, Double_t gz, Int_t axisType);
-
+  Double_t GetScaling() const {return fScaling;}
 private:
   Float_t fC1; // coefficient C1          (compare Jim Thomas's notes for definitions)
   Float_t fC2; // coefficient C2          (compare Jim Thomas's notes for definitions)
-
+  Float_t fScaling; // scaling factor to rescale distortion    - for tests purposes only
   AliMagF *fBField;       // pointer to magnetic field
 
   AliTPCExBBShape & operator =(const AliTPCExBBShape &); // dummy assignment operator
index 2af0ea904bb08e960097945548268bcd8b5e1253..3e44a149b25513ad78dc96a8242ad8179dc3897d 100644 (file)
@@ -129,7 +129,7 @@ macro(getDAdescription _detector _daname)
         message(FATAL_ERROR "{_detector}${_daname}da.cxx does not contain a description. Please add the description as the first /*comment*/ in the file")
     else()
         string(SUBSTRING "${tmpinfo}" ${_first_position}  ${_second_position} _da_description)
-        string(STRIP ${_da_description} _da_description)
+        string(STRIP "${_da_description}" _da_description)
         
         # The variable can be accesed by the parent
         set(RPM_DESCRIPTION ${_da_description})
@@ -216,4 +216,4 @@ macro(createDArpm DETECTOR ALGORITHM)
     
     # install RPM into $CMAKE_INSTALL_PREFIX/darpms
     install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/da-${_ALGORITHM}-rpm/RPMS/ DESTINATION darpms PATTERN "\\.rpm")
-endmacro()
\ No newline at end of file
+endmacro()
index a78c96ea355debad0c63110225041d566b1177d8..c13114996805ef0391a3542875240f2b704f31c3 100644 (file)
@@ -70,7 +70,7 @@ if(ROOTSYS)
     if(error)
         message(FATAL_ERROR "Error retrieving ROOT version : ${error}")
     endif(error)
-    string(STRIP ${ROOT_VERSION} ROOT_VERSION)
+    string(STRIP "${ROOT_VERSION}" ROOT_VERSION)
 
     # Extract major, minor, and patch versions from
     string(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" ROOT_VERSION_MAJOR "${ROOT_VERSION}")
@@ -85,28 +85,28 @@ if(ROOTSYS)
     else()
         message(STATUS "ROOT was build with the following features: ${ROOT_FEATURES}")
     endif(error)
-    string(STRIP ${ROOT_FEATURES} ROOT_FEATURES)
+    string(STRIP "${ROOT_FEATURES}" ROOT_FEATURES)
 
     # Checking for ROOT libdir
     execute_process(COMMAND ${ROOT_CONFIG} --libdir OUTPUT_VARIABLE ROOT_LIBDIR ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
     if(error)
         message(FATAL_ERROR "Error retrieving ROOT libdir: ${error}")
     endif(error)
-    string(STRIP ${ROOT_LIBDIR} ROOT_LIBDIR)
+    string(STRIP "${ROOT_LIBDIR}" ROOT_LIBDIR)
 
     # Checking for ROOT libs
     execute_process(COMMAND ${ROOT_CONFIG} --noldflags --libs OUTPUT_VARIABLE ROOT_LIBS ERROR_VARIABLE error OUTPUT_STRIP_TRAILING_WHITESPACE )
     if(error)
         message(FATAL_ERROR "Error retrieving ROOT libdir: ${error}")
     endif(error)
-    string(STRIP ${ROOT_LIBS} ROOT_LIBS)
+    string(STRIP "${ROOT_LIBS}" ROOT_LIBS)
 
     foreach(lib ${ROOT_LIBS})
         string(REPLACE "-rdynamic" "" new_lib ${lib})
         string(REPLACE "-l" "" lib ${new_lib})
         set(ROOT_LIBRARIES ${ROOT_LIBRARIES} ${lib})
     endforeach()
-    string(STRIP ${ROOT_LIBRARIES} ROOT_LIBRARIES)
+    string(STRIP "${ROOT_LIBRARIES}" ROOT_LIBRARIES)
     separate_arguments(ROOT_LIBRARIES)
 
     # Checking for ROOT incdir
@@ -114,7 +114,7 @@ if(ROOTSYS)
     if(error)
         message(FATAL_ERROR "Error retrieving ROOT incdir: ${error}")
     endif(error)
-    string(STRIP ${ROOT_INCDIR} ROOT_INCDIR)
+    string(STRIP "${ROOT_INCDIR}" ROOT_INCDIR)
     set(ROOT_INCLUDE_DIR ${ROOT_INCDIR})
 
     # Checking for glibs
@@ -124,14 +124,14 @@ if(ROOTSYS)
     endif(error)
 
     # Checking for glibs
-    string(STRIP ${ROOT_GLIBS} ROOT_GLIBS)
+    string(STRIP "${ROOT_GLIBS}" ROOT_GLIBS)
 
     foreach(lib ${ROOT_GLIBS})
         string(REPLACE "-rdynamic" "" new_lib "${lib}")
         string(REPLACE "-l" "" lib "${new_lib}")
         set(ROOT_GLIBRARIES ${ROOT_GLIBRARIES} ${lib})
     endforeach()
-    string(STRIP ${ROOT_GLIBRARIES} ROOT_GLIBRARIES)
+    string(STRIP "${ROOT_GLIBRARIES}" ROOT_GLIBRARIES)
     separate_arguments(ROOT_GLIBRARIES)
 
     # Checking for AliEn support
@@ -143,17 +143,30 @@ if(ROOTSYS)
     
     #if defined
     if(ROOT_HASALIEN)
-        string(STRIP ${ROOT_HASALIEN} ROOT_HASALIEN)
+        string(STRIP "${ROOT_HASALIEN}" ROOT_HASALIEN)
         if(ROOT_HASALIEN STREQUAL "yes")
            if(ALIEN)
                add_definitions(-DWITHALIEN)
                
-               # AliEn might bring some system libraries, we need to follow them
-               link_directories(${ALIEN}/lib)
-               link_directories(${ALIEN}/api/lib)
+               # AliEn might bring some system libraries, we need to use them
+               if(EXISTS "${ALIEN}/lib")
+                   link_directories(${ALIEN}/lib)
+               endif()
+               
+               # api/lib should always exists
+               if(EXISTS "${ALIEN}/api/lib")
+                   link_directories(${ALIEN}/api/lib)
+               endif()
                
                # include for AliEn
-               include_directories(${ALIEN}/include)
+               if(EXISTS "${ALIEN}/include")
+                   include_directories(${ALIEN}/include)
+               endif()
+               
+               # api/include always exists
+               if(EXISTS "${ALIEN}/api/include")
+                   include_directories(${ALIEN}/api/include)
+               endif()
                
                set(ROOT_HASALIEN TRUE)
            else(ALIEN)
@@ -172,7 +185,7 @@ if(ROOTSYS)
     
     # if defined
     if(ROOT_HASXML)
-        string(STRIP ${ROOT_HASXML} ROOT_HASXML)
+        string(STRIP "${ROOT_HASXML}" ROOT_HASXML)
         if(ROOT_HASXML STREQUAL "yes")
             add_definitions(-DWITHXML)
             set(ROOT_HASXML TRUE)
@@ -188,7 +201,7 @@ if(ROOTSYS)
     endif(error)
     
     if(ROOT_HASOPENGL)
-        string(STRIP ${ROOT_HASOPENGL} ROOT_HASOPENGL)
+        string(STRIP "${ROOT_HASOPENGL}" ROOT_HASOPENGL)
         if(ROOT_HASOPENGL STREQUAL "yes")
             set(ROOT_HASOPENGL TRUE)
         else()
@@ -202,7 +215,7 @@ if(ROOTSYS)
     if(error)
         message(FATAL_ERROR "Error checking ROOT fortran compiler: ${error}")
     endif(error)
-    string(STRIP ${ROOT_FORTRAN} ROOT_FORTRAN)
+    string(STRIP "${ROOT_FORTRAN}" ROOT_FORTRAN)
 
     # adding the libraries and the inc dir
     link_directories(${ROOT_LIBDIR})
@@ -238,4 +251,4 @@ if(ROOTSYS)
     endif(ALIROOT_STATIC)
 else()
     message(FATAL_ERROR "ROOT installation not found! Please point to the ROOT installation using -DROOTSYS=ROOT_INSTALL_DIR.")
-endif(ROOTSYS)
\ No newline at end of file
+endif(ROOTSYS)