X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2FTPCLib%2FAliHLTTPCConfMapper.cxx;h=6a42af76e9a6584ba65d919bc695c8c9dfc3b120;hb=b7d1d8915550cc8b6fe02a7ecf8b28cbd6c8acf1;hp=87ac29733e19b9a0e866351eae65401a94c1e7ea;hpb=2a083ac4a12be2e438501cd150f0e1ce6d45e8a6;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/TPCLib/AliHLTTPCConfMapper.cxx b/HLT/TPCLib/AliHLTTPCConfMapper.cxx index 87ac29733e1..6a42af76e9a 100644 --- a/HLT/TPCLib/AliHLTTPCConfMapper.cxx +++ b/HLT/TPCLib/AliHLTTPCConfMapper.cxx @@ -1,18 +1,30 @@ // @(#) $Id$ // Original: AliHLTConfMapper.cxx,v 1.26 2005/06/14 10:55:21 cvetan Exp $ -/** \class AliHLTTPCConfMapper -
-//_____________________________________________________________
-// AliHLTTPCConfMapper
-//
-// Conformal mapping base class
-//
-// Author: Anders Vestbo 
-// Copyright © ALICE HLT Group
-
+//************************************************************************** +//* This file is property of and copyright by the ALICE HLT Project * +//* ALICE Experiment at CERN, All rights reserved. * +//* * +//* Primary Authors: Anders Vestbo, maintained by +//* Matthias Richter * +//* for The ALICE HLT Project. * +//* * +//* Permission to use, copy, modify and distribute this software and its * +//* documentation strictly for non-commercial purposes is hereby granted * +//* without fee, provided that the above copyright notice appears in all * +//* copies and that both the copyright notice and this permission notice * +//* appear in the supporting documentation. The authors make no claims * +//* about the suitability of this software for any purpose. It is * +//* provided "as is" without express or implied warranty. * +//************************************************************************** + +/** @file AliHLTTPCConfMapper.cxx + @author Anders Vestbo, Matthias Richter + @date Conformal mapping base class. + @brief */ +#include #include #include "AliHLTTPCRootTypes.h" @@ -37,7 +49,7 @@ AliHLTTPCConfMapper::AliHLTTPCConfMapper() fNTracks(0), fVertex(NULL), fVertexFinder(kFALSE), - fHit(NULL), + fHit(), fTrack(NULL), fMaxDca(0.0), // no clue whether this is reasonable, but at least better than without initialization fVolume(NULL), @@ -58,65 +70,25 @@ AliHLTTPCConfMapper::AliHLTTPCConfMapper() fEtaMax(0), fRowMin(0), fRowMax(0), - fVertexConstraint(kTRUE) + fVertexConstraint(kTRUE), + fGoodDist(0.0), + fMaxPhi(0.0), + fMaxEta(0.0), + fMainVertexTracks(0), + fClustersUnused(0), + fClusterCutZ(-1) { //Default constructor fParamSet[0]=0; fParamSet[1]=0; } -AliHLTTPCConfMapper::AliHLTTPCConfMapper(const AliHLTTPCConfMapper&) - : - fBench(kTRUE), - fNTracks(0), - fVertex(NULL), - fVertexFinder(kFALSE), - fHit(NULL), - fTrack(NULL), - fMaxDca(0.0), // no clue whether this is reasonable, but at least better than without initialization - fVolume(NULL), - fRow(NULL), - fNumRowSegment(0), - fNumPhiSegment(0), - fNumEtaSegment(0), - fNumRowSegmentPlusOne(0), - fNumPhiSegmentPlusOne(0), - fNumEtaSegmentPlusOne(0), - fNumPhiEtaSegmentPlusOne(0), - fBounds(0), - fPhiHitsOutOfRange(0), - fEtaHitsOutOfRange(0), - fPhiMin(0), - fPhiMax(0), - fEtaMin(0), - fEtaMax(0), - fRowMin(0), - fRowMax(0), - fVertexConstraint(kTRUE) -{ - // dummy copy constructor - //HLTFatal("copy constructor untested"); -} - -AliHLTTPCConfMapper& AliHLTTPCConfMapper::operator=(const AliHLTTPCConfMapper&) -{ - // dummy assignment operator - //HLTFatal("assignment operator untested"); - return *this; -} - AliHLTTPCConfMapper::~AliHLTTPCConfMapper() { // Destructor. - if(fVolume) { - delete [] fVolume; - } if(fRow) { delete [] fRow; } - if(fHit) { - delete [] fHit; - } if(fTrack) { delete fTrack; } @@ -134,32 +106,21 @@ void AliHLTTPCConfMapper::InitVolumes() fNumEtaSegmentPlusOne = fNumEtaSegment+1; fNumPhiEtaSegmentPlusOne = fNumPhiSegmentPlusOne*fNumEtaSegmentPlusOne; fBounds = fNumRowSegmentPlusOne * fNumPhiSegmentPlusOne * fNumEtaSegmentPlusOne; + + Reset(); - //Allocate volumes: + fTrack = new AliHLTTPCTrackArray("AliHLTTPCConfMapTrack",10); +} + +void AliHLTTPCConfMapper::Reset() +{ if(fVolume) delete [] fVolume; + fVolume=NULL; if(fRow) delete [] fRow; + fRow=NULL; - LOG(AliHLTTPCLog::kInformational,"AliHLTTPCConfMapper::InitVolumes","Memory")<=fClustersUnused+count); + for (Int_t i=0;(UInt_t)i0 && ((AliHLTUInt8_t*)hit)+sizeof(AliHLTTPCSpacePointData)>((AliHLTUInt8_t*)hits)+sizeInByte) { + LOG(AliHLTTPCLog::kWarning,"AliHLTTPCConfMapper::ReadHits","")<<"Wrong size of data (" << sizeInByte << " byte), skipping array of AliHLTTPCSpacePointData" <=fClustersUnused+count); + for (Int_t i=0;(UInt_t)i0 && ((AliHLTUInt8_t*)hit)+sizeof(AliHLTTPCSpacePointData)>((AliHLTUInt8_t*)hits)+sizeInByte) { + LOG(AliHLTTPCLog::kWarning,"AliHLTTPCConfMapper::ReadHits","")<<"Wrong size of data (" << sizeInByte << " byte), skipping array of AliHLTTPCSpacePointData" < fClusterCutZ || hits[i].fZ < -1*fClusterCutZ){ + ++skipped; + continue; + } + fHit[i+fClustersUnused-skipped].Reset(); + fHit[i+fClustersUnused-skipped].Read(hits[i]); + } + fClustersUnused += count - skipped; + fHit.resize(fClustersUnused); + } - LOG(AliHLTTPCLog::kInformational,"AliHLTTPCConfMapper::ReadHits","#hits") - <=fClustersUnused); for(Int_t j=0; jAt(j); AliHLTTPCConfMapPoint *thisHit = &(fHit[j]); thisHit->Setup(fVertex); @@ -293,15 +303,20 @@ void AliHLTTPCConfMapper::SetPointers() fRow[(localrow-fRowMin)].last = (void *)thisHit; } + //If a cluster has an Eta outside the Eta or Phi range set in the Tracker, it will go in to + //the if here. This has been seen for high Eta clusters most likely from signal from the gating grid. + //These clusters are read in, but not used in the Tracking. +#ifdef PACKAGE_STRING if(fClustersUnused>0 && localcounter==0) - LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapper::SetPointers","Parameters") + LOG(AliHLTTPCLog::kDebug,"AliHLTTPCConfMapper::SetPointers","Parameters") <GetNextVolumeHit()) { @@ -726,17 +743,10 @@ AliHLTTPCConfMapPoint *AliHLTTPCConfMapper::GetNextNeighbor(AliHLTTPCConfMapPoin if(track)//track search - look for nearest neighbor to extrapolated track { -// BEGINN ############################################## MODIFIY JMT -#if 1 - if (fVertexConstraint) { - if(!VerifyRange(starthit,hit)) - continue; - } -#else - if(!VerifyRange(starthit,hit)) - continue; -#endif -// END ################################################# MODIFIY JMT + if (fVertexConstraint) { + if(!VerifyRange(starthit,hit)) + continue; + } testhit = EvaluateHit(starthit,hit,track); if(testhit == 0)//chi2 not good enough, keep looking @@ -753,17 +763,10 @@ AliHLTTPCConfMapPoint *AliHLTTPCConfMapper::GetNextNeighbor(AliHLTTPCConfMapPoin if((dist=CalcDistance(starthit,hit)) < closestdist) { -// BEGINN ############################################## MODIFIY JMT -#if 1 - if (fVertexConstraint) { + if (fVertexConstraint) { if(!VerifyRange(starthit,hit)) - continue; - } -#else - if(!VerifyRange(starthit,hit)) - continue; -#endif -// END ################################################# MODIFIY JMT + continue; + } closestdist = dist; closesthit = hit; @@ -878,9 +881,9 @@ Double_t AliHLTTPCConfMapper::TrackletAngle(AliHLTTPCConfMapTrack *track,Int_t n if(n<3) return 0; - Double_t x1[2]; - Double_t x2[2]; - Double_t x3[2]; + Double_t x1[2]={0,0}; + Double_t x2[2]={0,0}; + Double_t x3[2]={0,0}; Double_t angle1,angle2; Int_t counter=0; for(track->StartLoop(); track->LoopDone(); track->GetNextHit()) @@ -943,7 +946,7 @@ Int_t AliHLTTPCConfMapper::FillTracks() Int_t numoftracks = fNTracks; if(fNTracks == 0) { - LOG(AliHLTTPCLog::kError,"AliHLTTPCConfMapper::FillTracks","fNTracks")<