]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
build system: configure checks added
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Feb 2007 10:24:18 +0000 (10:24 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Feb 2007 10:24:18 +0000 (10:24 +0000)
- for version of AliExternalTrackParam needed by AliHLTTPCTrack conversion to ESD format
- for AliCaloRawStream.h needed by PHOS

HLT/TPCLib/AliHLTTPCEsdWriterComponent.cxx
HLT/TPCLib/AliHLTTPCTrack.cxx
HLT/configure.ac

index 9e2f09e1c0d94aec9ca676e3862e8a07dfd398f2..bad27f294fa4803549dd053a4fd84d035e3b33b4 100644 (file)
@@ -126,6 +126,8 @@ int AliHLTTPCEsdWriterComponent::Tracks2ESD(AliHLTTPCTrackArray* pTracks, AliESD
     for (int i=0; i<pTracks->GetNTracks() && iResult>=0; i++) {
       AliHLTTPCTrack* pTrack=(*pTracks)[i];
       if (pTrack) {
+       //HLTDebug("convert track %d", i);
+       //pTrack->Print();
        int iLocal=pTrack->Convert2AliKalmanTrack();
        if (iLocal>=0) {
        AliESDtrack iotrack;
index 37cc91cd408e74b01f28c1ceb1ae37e744b8614d..f676cdc30bad1703a64e93db910ee903618a037f 100644 (file)
@@ -632,28 +632,28 @@ int AliHLTTPCTrack::Convert2AliKalmanTrack()
   // The method has been copied from AliHLTHoughKalmanTrack and adapted
   // to the TPC conformal mapping track parametrization
 
-  SetChi2(0.);
-  SetNumberOfClusters(GetLastRow()-GetFirstRow());
-  SetLabel(GetMCid());
-  SetFakeRatio(0.);
-  SetMass(0.13957); // just a guess
+//   SetChi2(0.);
+//   SetNumberOfClusters(GetLastRow()-GetFirstRow());
+//   SetLabel(GetMCid());
+//   SetFakeRatio(0.);
+//   SetMass(0.13957); // just a guess
 
-  fdEdx=0;
+//   fdEdx=0;
   Double_t alpha = fmod((GetSector()+0.5)*(2*TMath::Pi()/18),2*TMath::Pi());
   if      (alpha < -TMath::Pi()) alpha += 2*TMath::Pi();
   else if (alpha >= TMath::Pi()) alpha -= 2*TMath::Pi();
 
-  Double_t xhit=GetFirstPointX();
-  Double_t yhit=GetFirstPointY();
-  Double_t zhit=GetFirstPointZ();
-  Double_t psi = GetPsi();
-  Double_t kappa = GetKappa();
-  Double_t radius = GetRadius();
-  Double_t centerx = GetCenterX();
+//   Double_t xhit=GetFirstPointX();
+//   Double_t yhit=GetFirstPointY();
+//   Double_t zhit=GetFirstPointZ();
+//   Double_t psi = GetPsi();
+//   Double_t kappa = GetKappa();
+//   Double_t radius = GetRadius();
+//   Double_t centerx = GetCenterX();
 
-  Double_t tanl = GetTgl();
+//   Double_t tanl = GetTgl();
 
-  Double_t cnv=1.;
+//   Double_t cnv=1.;
   // TODO: think about how to get the magnetic field
   //Double_t cnv=1./(GetBz()*kB2C);
 
@@ -666,15 +666,22 @@ int AliHLTTPCTrack::Convert2AliKalmanTrack()
     0.,  0.,  0.,  0.,  0.
   };
 
+  const Double_t xhit = 82.97;
   Double_t xx[5];
-  xx[0] = yhit;
-  xx[1] = zhit;
-  xx[2] = (xhit-centerx)/radius;
-  xx[3] = tanl;
-  xx[4] = kappa*cnv;
+  xx[0] = GetFirstPointY();
+  xx[1] = GetFirstPointZ();
+  xx[2] = GetPsi();
+  xx[3] = GetTgl();
+  xx[4] = GetPt();
   // the Set function was not available in earlier versions, check required in
   // configure.ac
-  //Set(xhit,alpha,xx,cov);
+#ifdef EXTERNALTRACKPARAM_V1
+#warning track conversion to ESD format needs AliRoot version > v4-05-04
+  //TODO (Feb 07): make this a real warning when logging system is adapted
+  //HLTWarning("track conversion to ESD format needs AliRoot version > v4-05-04");
+#else
+  Set(xhit,alpha,xx,cov);
+#endif
 
   return iResult;
 }
index f8640d051ca679007aaf0959dfa6bc8beb00ae09..c237796f405c0103ed308c873cf7ab85072656e1 100644 (file)
@@ -184,6 +184,20 @@ if test ! "x$have_aliroot" = "xno" ; then
   AC_MSG_CHECKING(for AliRawReader classes in RAWData libraries)
   AC_MSG_RESULT($have_alirawdata)
 
+  dnl
+  dnl Check for the interface of AliExternalTrackParam which has been changed
+  dnl in revision 1.17 of AliExternalTrackParam.h (AliRoot version v4-05-04
+  dnl or higher)
+  externaltrackparam_version=1
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliExternalTrackParam.h>], 
+                                  [AliExternalTrackParam trackparam;
+                                  Double_t param[[5]]; Double_t covar[[15]];
+                                  trackparam.Set(0., 0., param, covar);])],
+                                  [externaltrackparam_version=2],
+                                 [AC_DEFINE(EXTERNALTRACKPARAM_V1)])
+  AC_MSG_CHECKING(for version of AliExternalTrackParam)
+  AC_MSG_RESULT($externaltrackparam_version)
+
   LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
   CHECKLIB=STEER
   AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
@@ -236,7 +250,7 @@ if test ! "x$have_aliroot" = "xno" ; then
 
   have_tpc_mapping=no
   if test ! "x$have_aliroot" = "xno" ; then
-    # the TPCLib/AliHLTTPCRawReader needs the actual Pad layot of the TPC 
+    # the TPCLib/AliHLTTPCRawReader needs the actual Pad layout of the TPC 
     # which is stored in the TPC/mapping/Patchx.data files from
     # AliRoot version v4-04-Release (May 2006)
     AH_TEMPLATE([HAVE_TPC_MAPPING],[TPC pad mapping available])
@@ -251,7 +265,24 @@ if test ! "x$have_aliroot" = "xno" ; then
   AC_MSG_CHECKING([for TPC mapping layout])
   AM_CONDITIONAL(USE_TPC_MAPPING, test x$have_tpc_mapping = xyes)
   AC_MSG_RESULT([$have_tpc_mapping])
-  
+
+  dnl
+  dnl required header files and libraries for the AliHLTPHOS library  
+  dnl
+  have_alicalorawstream=no
+  if test ! "x$have_aliroot" = "xno" ; then
+    # this can not be used as AliCaloRawStream.h indirectly depends on TString.h
+    #AC_CHECK_HEADERS([AliCaloRawStream.h], [have_alicalorawstream=yes])
+    AC_MSG_CHECKING([for AliCaloRawStream.h usability])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <TString.h>
+                                    #include <AliCaloRawStream.h>], 
+                                    [int i])],
+                                    [AC_DEFINE(HAVE_ALICALORAWSTREAM)
+                                    have_alicalorawstream=yes], 
+                                   [])
+    AC_MSG_RESULT([$have_alicalorawstream])
+  fi
+
   if test "x$have_aliroot" = "xno" ; then
     ALIROOT_CPPFLAGS=
     ALIROOT_LDFLAGS=
@@ -406,6 +437,8 @@ AC_ARG_ENABLE(phos,
   [],[enable_phos=yes])
 if test "x$have_aliroot" = "xno" ; then
    enable_phos="no...requires.AliRoot"
+elif ! test "x$have_alicalorawstream" = "xyes"; then
+   enable_phos="no...requires.AliRoot>v4-05-07"
 fi
 if test "x$enable_phos" = "xyes" ; then 
   AC_DEFINE(HLT_PHOS)