#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;
ClassImp(AliHLTReconstructor)
AliHLTReconstructor::AliHLTReconstructor(): AliReconstructor()
-{
+{
+ //constructor
+#ifndef use_logging
AliL3Log::fgLevel=AliL3Log::kWarning;
+#endif
fDoTracker=1;
fDoHough=1;
fDoBench=0;
}
AliHLTReconstructor::AliHLTReconstructor(Bool_t doTracker, Bool_t doHough): AliReconstructor()
-{
+{
+ //constructor
+#ifndef use_logging
AliL3Log::fgLevel=AliL3Log::kWarning;
+#endif
fDoTracker=doTracker;
fDoHough=doHough;
fDoBench=0;
}
AliHLTReconstructor::~AliHLTReconstructor()
-{
+{
+ //deconstructor
if(fDoCleanUp){
char name[256];
gSystem->Exec("rm -rf hlt");
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;
void AliHLTReconstructor::ReconstructWithConformalMapping(AliRunLoader* runLoader,Int_t iEvent) const
{
+ // reconstruct with conformal mapper
AliLevel3 *fHLT = new AliLevel3(runLoader);
fHLT->Init("./", AliLevel3::kRunLoader, 1);
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")
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);
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;
{
AliL3Track *tpt = (AliL3Track *)fTracks->GetCheckedTrack(i);
if(!tpt) continue;
+ if(tpt->GetNumberOfPoints() < nminpointsontracks) continue;
AliESDHLTtrack *esdtrack = new AliESDHLTtrack() ;
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);