]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/src/AliHLTReconstructor.cxx
Changes to integrate the MLUC libs from
[u/mrichter/AliRoot.git] / HLT / src / AliHLTReconstructor.cxx
index daf1b0ee6f5393d1ce675dacf79db54077e7cfa6..59954d7aa5779deaa17bd4e922d9b1fcabac7daf 100644 (file)
 #include <TSystem.h>
 #include <TArrayF.h>
 
+#include <AliRunLoader.h>
+#include <AliHeader.h>
+#include <AliGenEventHeader.h>
+#include <AliESD.h>
+#include <AliESDHLTtrack.h>
+
 #include "AliL3StandardIncludes.h"
 #include "AliL3Logging.h"
 #include "AliLevel3.h"
 #include "AliL3Track.h"
 #include "AliL3HoughTrack.h"
 #include "AliL3TrackArray.h"
-#include "AliRunLoader.h"
-#include "AliHeader.h"
-#include "AliGenEventHeader.h"
-#include "AliESD.h"
-#include "AliESDHLTtrack.h"
 
 #if __GNUC__== 3
 using namespace std;
@@ -39,8 +40,11 @@ using namespace std;
 ClassImp(AliHLTReconstructor)
 
 AliHLTReconstructor::AliHLTReconstructor(): AliReconstructor() 
-{
+{ 
+  //constructor
+#ifndef use_logging
   AliL3Log::fgLevel=AliL3Log::kWarning;
+#endif
   fDoTracker=1;
   fDoHough=1;
   fDoBench=0;
@@ -48,8 +52,11 @@ AliHLTReconstructor::AliHLTReconstructor(): AliReconstructor()
 }
 
 AliHLTReconstructor::AliHLTReconstructor(Bool_t doTracker, Bool_t doHough): AliReconstructor() 
-{
+{ 
+  //constructor
+#ifndef use_logging
   AliL3Log::fgLevel=AliL3Log::kWarning;
+#endif
   fDoTracker=doTracker;
   fDoHough=doHough;
   fDoBench=0;
@@ -57,7 +64,8 @@ AliHLTReconstructor::AliHLTReconstructor(Bool_t doTracker, Bool_t doHough): AliR
 }
 
 AliHLTReconstructor::~AliHLTReconstructor()
-{
+{ 
+  //deconstructor
   if(fDoCleanUp){
     char name[256];
     gSystem->Exec("rm -rf hlt");
@@ -71,6 +79,7 @@ AliHLTReconstructor::~AliHLTReconstructor()
 
 void AliHLTReconstructor::Reconstruct(AliRunLoader* runLoader) const
 {
+  // do the standard and hough reconstruction chain
   if(!runLoader) {
     LOG(AliL3Log::kFatal,"AliHLTReconstructor::Reconstruct","RunLoader")
       <<" Missing RunLoader! 0x0"<<ENDLOG;
@@ -100,6 +109,7 @@ void AliHLTReconstructor::Reconstruct(AliRunLoader* runLoader) const
 
 void AliHLTReconstructor::ReconstructWithConformalMapping(AliRunLoader* runLoader,Int_t iEvent) const
 {
+  // reconstruct with conformal mapper
   AliLevel3 *fHLT = new AliLevel3(runLoader);
   fHLT->Init("./", AliLevel3::kRunLoader, 1);
 
@@ -147,11 +157,16 @@ void AliHLTReconstructor::ReconstructWithConformalMapping(AliRunLoader* runLoade
 
 void AliHLTReconstructor::ReconstructWithHoughTransform(AliRunLoader* runLoader,Int_t iEvent) const
 {
+  //reconstruct with hough
   Float_t ptmin = 0.1*AliL3Transform::GetSolenoidField();
 
   Float_t zvertex = 0;
   TArrayF mcVertex(3); 
-  runLoader->GetHeader()->GenEventHeader()->PrimaryVertex(mcVertex);
+  AliHeader * header = runLoader->GetHeader();
+  if (header) {
+    AliGenEventHeader * genHeader = header->GenEventHeader();
+    if (genHeader) genHeader->PrimaryVertex(mcVertex);
+  }
   zvertex = mcVertex[2];
 
   LOG(AliL3Log::kInformational,"AliHLTReconstructor::Reconstruct","HoughTransform")
@@ -189,6 +204,7 @@ void AliHLTReconstructor::ReconstructWithHoughTransform(AliRunLoader* runLoader,
 void AliHLTReconstructor::FillESD(AliRunLoader* runLoader, 
                                  AliESD* esd) const
 {
+  //fill the esd file with found tracks
   Int_t iEvent = runLoader->GetEventNumber();
 
   if(fDoTracker) FillESDforConformalMapping(esd,iEvent);
@@ -197,10 +213,11 @@ void AliHLTReconstructor::FillESD(AliRunLoader* runLoader,
 
 void AliHLTReconstructor::FillESDforConformalMapping(AliESD* esd,Int_t iEvent) const
 {
-  //Assign MC labels for found tracks
+  //fill esd with tracks from conformal mapping
   Int_t slicerange[2]={0,35};
   Int_t good = (int)(0.4*AliL3Transform::GetNRows());
   Int_t nclusters = (int)(0.4*AliL3Transform::GetNRows());
+  Int_t nminpointsontracks = (int)(0.3*AliL3Transform::GetNRows());
   Float_t ptmin = 0.;
   Float_t ptmax = 0.;
   Float_t maxfalseratio = 0.1;
@@ -219,6 +236,7 @@ void AliHLTReconstructor::FillESDforConformalMapping(AliESD* esd,Int_t iEvent) c
     {
       AliL3Track *tpt = (AliL3Track *)fTracks->GetCheckedTrack(i);
       if(!tpt) continue; 
+      if(tpt->GetNumberOfPoints() < nminpointsontracks) continue;
       
       AliESDHLTtrack *esdtrack = new AliESDHLTtrack() ; 
 
@@ -243,6 +261,7 @@ void AliHLTReconstructor::FillESDforConformalMapping(AliESD* esd,Int_t iEvent) c
 
 void AliHLTReconstructor::FillESDforHoughTransform(AliESD* esd,Int_t iEvent) const
 {
+  //fill esd with tracks from hough
   char filename[256];
   sprintf(filename,"./hough/tracks_%d.raw",iEvent);