]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/offline/AliHLTTPCOfflineTrackerComponent.cxx
Major update required to handle old and new AliHLTEventDDL structures within HLT...
[u/mrichter/AliRoot.git] / HLT / TPCLib / offline / AliHLTTPCOfflineTrackerComponent.cxx
index befd5b88fe8a4160cf83ef4d19e497f07139ee01..9d2c2216e1e5f347ced6d965f23460d52c3f5684 100644 (file)
@@ -30,7 +30,6 @@
 #include "AliCDBManager.h"
 #include "AliCDBEntry.h"
 #include "AliGeomManager.h"
-#include "AliMagFMaps.h"
 #include "AliTPCReconstructor.h"
 #include "AliTPCParam.h"
 #include "AliTPCRecoParam.h"
@@ -39,7 +38,6 @@
 #include "AliTPCClustersRow.h"
 #include "AliTPCseed.h"
 #include "AliESDEvent.h"
-#include "AliESDfriend.h"
 #include "AliHLTTPCDefinitions.h"
 
 /** ROOT macro for the implementation of ROOT specific class methods */
@@ -49,8 +47,7 @@ AliHLTTPCOfflineTrackerComponent::AliHLTTPCOfflineTrackerComponent() : AliHLTPro
 fGeometryFileName(""),
 fTPCGeomParam(0),
 fTracker(0),
-fESD(0),
-fESDfriend(0)
+fESD(0)
 {
   // Default constructor
   fGeometryFileName = getenv("ALICE_ROOT");
@@ -140,9 +137,8 @@ int AliHLTTPCOfflineTrackerComponent::DoInit( int argc, const char** argv )
   //
   // initialisation
   //
-   
   // Load geometry
-  HLTInfo("Geometry file %s",fGeometryFileName.c_str());
   AliGeomManager::LoadGeometry(fGeometryFileName.c_str());
   if((AliGeomManager::GetGeometry()) == 0) {
     HLTError("Cannot load geometry from file %s",fGeometryFileName.c_str());
@@ -150,9 +146,10 @@ int AliHLTTPCOfflineTrackerComponent::DoInit( int argc, const char** argv )
   }
 
   // TPC reconstruction parameters
-  //AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLowFluxParam();
   AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetHLTParam();
   if(tpcRecoParam) {
+    tpcRecoParam->SetClusterSharing(kTRUE);
+
     AliTPCReconstructor tpcReconstructor;
     tpcReconstructor.SetRecoParam(tpcRecoParam);
   }
@@ -171,10 +168,6 @@ int AliHLTTPCOfflineTrackerComponent::DoInit( int argc, const char** argv )
   fESD = new AliESDEvent();
   if (fESD) {
     fESD->CreateStdContent();
-
-    // add ESD friend
-    fESDfriend = new AliESDfriend();
-    if(fESDfriend) fESD->AddObject(fESDfriend);
   }
 
   if (!fTracker || !fESD || !fTPCGeomParam) {
@@ -197,7 +190,6 @@ int AliHLTTPCOfflineTrackerComponent::DoDeinit()
   if(fTPCGeomParam) delete fTPCGeomParam; fTPCGeomParam = 0; 
   if(fTracker) delete fTracker; fTracker = 0; 
   if(fESD) delete fESD; fESD = 0;
-  //Note: fESD is owner of fESDfriends
 
   return 0;
 }
@@ -209,7 +201,6 @@ int AliHLTTPCOfflineTrackerComponent::DoEvent( const AliHLTComponentEventData& /
 
   int iResult=0;
   TClonesArray *clusterArray=0;
-  TObjArray *seedArray=0;
   int slice, patch;
 
   const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(kAliHLTDataTypeTObjArray|kAliHLTDataOriginTPC); 
@@ -259,38 +250,11 @@ int AliHLTTPCOfflineTrackerComponent::DoEvent( const AliHLTComponentEventData& /
     // run tracker
     fTracker->Clusters2Tracks(fESD);
 
-    // add TPC seed to the AliESDtrack
-    seedArray = fTracker->GetSeeds();
-    if(seedArray) {
-       Int_t nseed = seedArray->GetEntriesFast();
-       HLTInfo("Number TPC seeds %d",nseed);
-
-       for(Int_t i=0; i<nseed; ++i) {
-          AliTPCseed *seed = (AliTPCseed*)seedArray->UncheckedAt(i);
-          if(!seed) continue; 
-
-          //HLTInfo("TPC seed:  sec %d, row %d",seed->GetSector(), seed->GetRow());
-
-          AliESDtrack *esdtrack=fESD->GetTrack(i);
-          if(esdtrack) esdtrack->AddCalibObject((TObject*)seed);
-         else 
-            HLTInfo("Cannot add TPC seed to AliESDtrack %d", i);
-       }
-    seedArray->Clear();
-    }
-
-    // reset ESDs friends (no Reset function!)
-    fESDfriend->~AliESDfriend();
-    new (fESDfriend) AliESDfriend(); // Reset ...
-
-    // add ESDfriend to AliESDEvent
-    fESD->GetESDfriend(fESDfriend);
-
     // unload clusters
     fTracker->UnloadClusters();
 
     Int_t nTracks = fESD->GetNumberOfTracks();
-    HLTInfo("Number of tracks %d", nTracks);
+    HLTInfo("Number TPC tracks %d", nTracks);
 
     // calculate specification from the specification of input data blocks
     AliHLTUInt32_t iSpecification = AliHLTTPCDefinitions::EncodeDataSpecification( minSlice, maxSlice, minPatch, maxPatch );
@@ -327,33 +291,8 @@ int AliHLTTPCOfflineTrackerComponent::Configure(const char* arguments)
       if (argument.IsNull()) continue;
 
       if (argument.CompareTo("-solenoidBz")==0) {
-       if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
-       // TODO: check if there is common functionality in the AliMagF* classes
-       float SolenoidBz=((TObjString*)pTokens->At(i))->GetString().Atof();
-       if (SolenoidBz<kAlmost0Field) SolenoidBz=kAlmost0Field;
-       float factor=1.;
-       int map=AliMagFMaps::k2kG;
-       if (SolenoidBz<3.) {
-         map=AliMagFMaps::k2kG;
-         factor=SolenoidBz/2;
-       } else if (SolenoidBz>=3. && SolenoidBz<4.5) {
-         map=AliMagFMaps::k4kG;
-         factor=SolenoidBz/4;
-       } else {
-         map=AliMagFMaps::k5kG;
-         factor=SolenoidBz/5;
-       }
-       // the magnetic field map is not supposed to change
-       // field initialization should be done once in the beginning
-       // TODO: does the factor need adjustment?
-       const AliMagF* currentMap=AliTracker::GetFieldMap();
-       if (!currentMap) {
-         AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., map);
-         AliTracker::SetFieldMap(field,kFALSE);
-         HLTInfo("Solenoid Field set to: %f map %d", SolenoidBz, map);
-       } else if (currentMap->Map()!=map) {
-         HLTWarning("omitting request to override field map %s with %s", currentMap->Map(), map);
-       }
+       if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
+       HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
        continue;
       } else {
        HLTError("unknown argument %s", argument.Data());