]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
final integration of ITS SAP tracker + filling of ITSOut to friends
authorshahoian <ruben.shahoyan@cern.ch>
Tue, 23 Sep 2014 16:07:19 +0000 (18:07 +0200)
committershahoian <ruben.shahoyan@cern.ch>
Tue, 23 Sep 2014 16:07:49 +0000 (18:07 +0200)
HLT/ITS/trackingSAP/AliHLTITSSAPTrackerComponent.cxx
HLT/global/AliHLTGlobalAgent.cxx
HLT/global/AliHLTGlobalEsdConverterComponent.cxx

index 2ad6bfbf66bff4cdbf8cbc691dab8b5010c61fc5..5d805cd3b1975384f4e86cacd665eb4f029d4071 100644 (file)
@@ -474,7 +474,7 @@ int AliHLTITSSAPTrackerComponent::DoEvent
   fBenchmark.Stop(0);
 
   // Set log level to "Warning" for on-line system monitoring
-  HLTInfo( "ITS SAP Tracker: output %d tracks;  input %d clusters, VertexTracks: %s",
+  HLTWarning( "ITS SAP Tracker: output %d tracks;  input %d clusters, VertexTracks: %s",
           nAddedTracks, nClTotal, vtxOK ? "OK" : "Found" );
 
   HLTInfo(fBenchmark.GetStatistics());
index 1c8c32b7c97e5357b52c7c8a12b9d373ca4b2524..1982a4d34f2c86a6453738dc0b34d76442977244 100644 (file)
@@ -143,7 +143,7 @@ int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler
   // assembly of the global ESD
 
   // define the inputs to the global ESD
-  TString esdInputs="TPC-globalmerger TPC-mcTrackMarker ITS-tracker TPC-ClusterTransformation GLOBAL-vertexer ITS-SPD-vertexer TPC-dEdx VZERO-RECO";
+  TString esdInputs="TPC-globalmerger TPC-mcTrackMarker ITS-tracker TPC-ClusterTransformation GLOBAL-vertexer ITS-SPD-vertexer TPC-dEdx VZERO-RECO ITS-SAPtracker";
 
   // check for the availibility
   pTokens=esdInputs.Tokenize(" ");
index 17c02bbb6329b8ca5f891164bacc33d7fb475905..f9a3c09c02c64a4ca5743b8df4353cc197e72d7d 100644 (file)
@@ -39,6 +39,7 @@
 #include "AliHLTTPCClusterDataFormat.h"
 #include "AliTPCclusterMI.h"
 #include "AliTPCseed.h"
+#include "AliITStrackV2.h"
 #include "AliESDfriend.h"
 #include "AliESDfriendTrack.h"
 #include "AliHLTTPCTransform.h"
@@ -63,6 +64,8 @@
 #include "AliHLTGlobalVertexerComponent.h"
 #include "AliHLTVertexFinderBase.h"
 #include "AliSysInfo.h"
+#include "AliHLTSAPTrackerData.h"
+#include "AliFlatESDVertex.h"
 
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTGlobalEsdConverterComponent)
@@ -179,6 +182,8 @@ void AliHLTGlobalEsdConverterComponent::GetInputDataTypes(AliHLTComponentDataTyp
   list.push_back(kAliHLTDataTypePrimaryFinder); // array of track ids for prim vertex
   list.push_back(kAliHLTDataTypeESDContent);
   list.push_back( AliHLTTPCDefinitions::fgkClustersDataType   );
+  list.push_back(kAliHLTDataTypeFlatESDVertex); // VertexTracks resonctructed using SAP ITS tracks
+  list.push_back(kAliHLTDataTypeITSSAPData);    // SAP ITS tracks
 }
 
 AliHLTComponentDataType AliHLTGlobalEsdConverterComponent::GetOutputDataType()
@@ -499,7 +504,20 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent*
 
   // read the clusters
   // ---------- Access to clusters --------------------//
-
+  /*
+  const AliHLTComponentBlockData* pBl0=GetFirstInputBlock();
+  int cnt = 0;
+  while (pBl0) {
+    char tp[9],org[5];
+    strncpy(tp,pBl0->fDataType.fID,8);
+    tp[8] = '0';
+    strncpy(org,pBl0->fDataType.fOrigin,4);
+    org[4] = '0';
+    //
+    printf(">>> Bl%3d %8s|%4s of size %d\n",cnt++,tp,org,pBl0->fSize);
+    pBl0 = GetNextInputBlock();
+  };
+  */
   for(Int_t i=0; i<fkNPartition; i++){
     delete[] fPartitionClusters[i];    
     fPartitionClusters[i]  = 0;
@@ -771,6 +789,55 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent*
     pESD->SetPrimaryVertexSPD( vtx );
   }
 
+  // Get ITS Standalone primaries (SAP) vertexTracks
+  {
+    const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(kAliHLTDataTypeFlatESDVertex|kAliHLTDataOriginITS);
+    if (pBlock) {
+      fBenchmark.AddInput(pBlock->fSize);
+      AliFlatESDVertex *vtxFlat =  reinterpret_cast<AliFlatESDVertex*>( pBlock->fPtr );
+      if (vtxFlat->GetNContributors()>0) {
+       cout<<"\n\n ESD converter: input vertexTrackSAP with "<<vtxFlat->GetNContributors()<<" contributors"<<endl;
+       AliESDVertex vtx;
+       vtxFlat->GetESDVertex(vtx);
+       vtx.SetTitle("vertexITSSAP");
+       pESD->SetPrimaryVertexSPD( &vtx );
+      }
+    }
+  }
+
+  // Get ITS Standalone primary (SAP) Tracks
+  {
+    const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(kAliHLTDataTypeITSSAPData|kAliHLTDataOriginITS);
+    if (pBlock) {
+      fBenchmark.AddInput(pBlock->fSize);
+      const AliHLTITSSAPTrackerDataContainer *dataSAP = reinterpret_cast<const AliHLTITSSAPTrackerDataContainer*>(pBlock->fPtr);
+      AliITStrackV2 trcV2;
+      int ntrITSSAP = dataSAP->fCount;
+      cout<<"\n\n ESD converter: input "<<ntrITSSAP<<" ITS SAP tracks"<<endl;
+      for (int itr=0;itr<ntrITSSAP;itr++) {
+       const AliHLTITSSAPTrackerData& trcFlatSAP = dataSAP->fTracks[itr];
+       AliESDtrack inpESDtrc;
+       inpESDtrc.SetID(pESD->GetNumberOfTracks());
+       trcFlatSAP.paramInw.GetExternalTrackParam(trcV2); // track at the vertex
+       trcV2.SetLabel(trcFlatSAP.label);
+       trcV2.SetNumberOfClusters(trcFlatSAP.ncl);
+       trcV2.SetChi2(trcFlatSAP.chi2);
+       inpESDtrc.UpdateTrackParams(&trcV2,AliESDtrack::kITSrefit);
+       inpESDtrc.SetStatus( (AliESDtrack::kITSin|AliESDtrack::kITSout|AliESDtrack::kITSpureSA) );
+       pESD->AddTrack(&inpESDtrc);
+       //
+       if( pESDfriend ) {
+         AliESDfriendTrack friendTrack;
+         trcFlatSAP.paramOut.GetExternalTrackParam(trcV2); // track at the vertex
+         friendTrack.SetITSOut(trcV2);
+         pESDfriend->AddTrack(&friendTrack);
+       }
+      }
+    }
+  }
+  
+
+
   // 3.1. now update ESD tracks with the ITSOut info
   // updating track parameters with flag kITSout will overwrite parameter set above with flag kTPCout
   // TODO 2010-07-12 there are some issues with this updating sequence, for the moment update with