3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 //* Timm Steinbeck <timm@kip.uni-heidelberg.de> *
9 //* for The ALICE HLT Project. *
11 //* Permission to use, copy, modify and distribute this software and its *
12 //* documentation strictly for non-commercial purposes is hereby granted *
13 //* without fee, provided that the above copyright notice appears in all *
14 //* copies and that both the copyright notice and this permission notice *
15 //* appear in the supporting documentation. The authors make no claims *
16 //* about the suitability of this software for any purpose. It is *
17 //* provided "as is" without express or implied warranty. *
18 //**************************************************************************
20 /** @file AliHLTTPCSliceTrackerComponent.cxx
21 @author Timm Steinbeck, Matthias Richter
23 @brief The TPC conformal mapping tracker component.
31 #include "AliHLTTPCSliceTrackerComponent.h"
32 #include "AliHLTTPCTransform.h"
33 #include "AliHLTTPCConfMapper.h"
34 #include "AliHLTTPCVertex.h"
35 #include "AliHLTTPCVertexData.h"
36 #include "AliHLTTPCClusterDataFormat.h"
37 #include "AliHLTTPCTransform.h"
38 #include "AliHLTTPCTrackSegmentData.h"
39 #include "AliHLTTPCTrackArray.h"
40 #include "AliHLTTPCTrackletDataFormat.h"
41 #include "AliHLTTPCInterMerger.h"
42 #include "AliHLTTPCMemHandler.h"
43 #include "AliHLTTPCDefinitions.h"
44 #include "AliHLTCommonCDBEntries.h"
46 #include "TObjString.h"
47 #include "TObjArray.h"
48 #include "AliCDBEntry.h"
49 #include "AliCDBManager.h"
50 #include "AliCDBStorage.h"
51 #include "TGeoGlobalMagField.h"
52 //#include "AliHLTTPC.h"
56 /** ROOT macro for the implementation of ROOT specific class methods */
57 ClassImp(AliHLTTPCSliceTrackerComponent)
59 AliHLTTPCSliceTrackerComponent::AliHLTTPCSliceTrackerComponent()
68 fnonvertextracking(kFALSE),
69 fmainvertextracking(kTRUE),
87 // see header file for class documentation
89 // refer to README to build package
91 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
96 AliHLTTPCSliceTrackerComponent::~AliHLTTPCSliceTrackerComponent()
98 // see header file for class documentation
101 // Public functions to implement AliHLTComponent's interface.
102 // These functions are required for the registration process
104 const char* AliHLTTPCSliceTrackerComponent::GetComponentID()
106 // see header file for class documentation
108 return "TPCSliceTracker";
111 void AliHLTTPCSliceTrackerComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list)
113 // see header file for class documentation
115 list.push_back( AliHLTTPCDefinitions::fgkClustersDataType );
116 list.push_back( AliHLTTPCDefinitions::fgkVertexDataType );
119 AliHLTComponentDataType AliHLTTPCSliceTrackerComponent::GetOutputDataType()
121 // see header file for class documentation
122 return AliHLTTPCDefinitions::fgkTrackSegmentsDataType;
125 void AliHLTTPCSliceTrackerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
127 // see header file for class documentation
128 // XXX TODO: Find more realistic values.
133 AliHLTComponent* AliHLTTPCSliceTrackerComponent::Spawn()
135 // see header file for class documentation
136 return new AliHLTTPCSliceTrackerComponent;
139 void AliHLTTPCSliceTrackerComponent::SetTrackerParam(Int_t phiSegments, Int_t etaSegments,
140 Int_t trackletlength, Int_t tracklength,
141 Int_t rowscopetracklet, Int_t rowscopetrack,
142 Double_t minPtFit, Double_t maxangle,
143 Double_t goodDist, Double_t hitChi2Cut,
144 Double_t goodHitChi2, Double_t trackChi2Cut,
145 Int_t maxdist, Double_t maxphi,Double_t maxeta)
147 // see header file for class documentation
148 //fTracker->SetClusterFinderParam( fXYClusterError, fZClusterError, kTRUE ); // ??
149 //Set parameters input to the tracker
150 //If no arguments are given, default parameters will be used
152 fTracker->SetNSegments(phiSegments,etaSegments);
153 fTracker->SetMaxDca(minPtFit);
154 // fTracker->MainVertexSettings(trackletlength,tracklength,rowscopetracklet,rowscopetrack);
156 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "==============================" );
158 if ( fmainvertextracking == kTRUE && fnonvertextracking == kFALSE){
159 fTracker->SetTrackCuts(hitChi2Cut,goodHitChi2,trackChi2Cut,maxdist,kTRUE);
160 fTracker->SetTrackletCuts(maxangle,goodDist,kTRUE);
162 fTracker->MainVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack, maxphi, maxeta);
163 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "MAINVERTEXTRACKING" );
165 else if ( fmainvertextracking == kTRUE && fnonvertextracking == kTRUE){
166 fTracker->SetTrackCuts(hitChi2Cut,goodHitChi2,trackChi2Cut,maxdist,kTRUE);
167 fTracker->SetTrackCuts(hitChi2Cut,goodHitChi2,trackChi2Cut,maxdist,kFALSE);
168 fTracker->SetTrackletCuts(maxangle,goodDist,kTRUE);
169 fTracker->SetTrackletCuts(maxangle,goodDist,kFALSE);
171 fTracker->MainVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack, maxphi, maxeta);
172 fTracker->NonVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack);
173 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "MAINVERTEXTRACKING - NONVERTEXTRACKING" );
175 else if ( fmainvertextracking == kFALSE && fnonvertextracking == kTRUE){
176 fTracker->SetTrackCuts(hitChi2Cut,goodHitChi2,trackChi2Cut,maxdist,kFALSE);
177 fTracker->SetTrackletCuts(maxangle,goodDist,kFALSE);
179 fTracker->NonVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack);
180 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "NONVERTEXTRACKING" );
183 //fTracker->SetParamDone(true);
184 /* Matthias 13.12.2006
185 * the global variable AliHLTTPCS::fgDoVertexFit has never been used so far
186 * and has always been kTRUE.
187 * In order to remove the AliHLTTPC class (which is the old steering class for
188 * HLT (TPC) tracking) from the compilation, this function can not be activated
189 * again. We have to think about a more elegant way to specify the parameters
190 * anyway. The following line was surely for some testing, but was never active
191 * in a tested release.
193 //AliHLTTPC::SetVertexFit( kFALSE );
195 fTracker->InitVolumes();
199 void AliHLTTPCSliceTrackerComponent::SetTrackerParam( Bool_t doPP, Bool_t doPbPb, Int_t multiplicity,
200 Double_t bField, Int_t etasegment, Double_t hitchi2cut,
201 Int_t rowscopetracklet, Int_t rowscopetrack,
202 Int_t trackletlength, Int_t tracklength )
204 // see header file for class documentation
205 AliHLTTPCTransform::SetBField( bField );
206 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "BField", "Setting b field to %f T\n", bField );
210 //tracker->SetClusterFinderParam(xyerror,zerror,kTRUE); // ??
212 SetTrackerParam( 50, 100, 3, 60,
215 5, 50, 50, 0.1, 0.1);
219 int mults[] = { 1000, 2000, 4000, 8000 };
223 int multDist, tmpMultDist;
224 if ( multiplicity>mults[closestMult] )
225 multDist = multiplicity-mults[closestMult];
227 multDist = mults[closestMult]-multiplicity;
228 for ( i = 1; i < multCount; i++ )
230 if ( multiplicity>mults[i] )
231 tmpMultDist = multiplicity-mults[i];
233 tmpMultDist = mults[i]-multiplicity;
234 if ( tmpMultDist < multDist )
237 multDist = tmpMultDist;
241 double bfs[] = { 0.2, 0.4 };
244 double bfDist, tmpBFDist;
245 if ( bField>bfs[closestBf] )
246 bfDist = bField-bfs[closestBf];
248 bfDist = bfs[closestBf]-bField;
249 for ( i = 1; i < bfCount; i++ )
252 tmpBFDist = bField-bfs[i];
254 tmpBFDist = bfs[i]-bField;
255 if ( tmpBFDist < bfDist )
262 switch ( closestMult )
268 SetTrackerParam( 50, 100, 3, 10,
271 5, 50, 50, 0.1, 0.1);
274 SetTrackerParam( 50, 100, 3, 10,
277 5, 50, 50, 0.1, 0.1);
285 SetTrackerParam( 50, 100, 3, 10,
288 5, 20, 50, 0.1, 0.1);
291 SetTrackerParam( 50, 100, 3, 10,
294 5, 20, 50, 0.1, 0.1);
302 SetTrackerParam( 50, 100, 3, 10,
305 5, 10 , 50, 0.1, 0.1);
308 SetTrackerParam( 50, 100, 3, 10,
311 5, 10, 50, 0.1, 0.1);
319 SetTrackerParam( 50, 100, 3, 10,
325 SetTrackerParam( 50, 100, 3, 10,
333 // Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "BField", "Setting b field to %f\n", bfs[closestBf] );
334 // AliHLTTPCTransform::SetBField( bfs[closestBf] );
335 // AliHLTTPCTransform::SetBField( bField );
336 // Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "BField", "Setting b field to %f\n", bField );
340 SetTrackerParam( 50, etasegment, trackletlength, tracklength,
341 rowscopetracklet, rowscopetrack,
342 0, 0.1745, 5, hitchi2cut,
343 5, 50, 50, 0.1, 0.1);
347 int AliHLTTPCSliceTrackerComponent::DoInit( int argc, const char** argv )
349 // see header file for class documentation
350 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "DoInit", "DoInit()" );
352 if ( fTracker || fVertex )
354 fTracker = new AliHLTTPCConfMapper();
355 fVertex = new AliHLTTPCVertex();
358 fDoNonVertex = false;
359 fMultiplicity = 4000;
380 TString configuration="";
382 for (int i=0; i<argc && iResult>=0; i++) {
384 if (!configuration.IsNull()) configuration+=" ";
385 configuration+=argument;
388 if (!configuration.IsNull()) {
389 iResult=Configure(configuration.Data());
391 iResult=Reconfigure(NULL, NULL);
397 int AliHLTTPCSliceTrackerComponent::DoDeinit()
399 // see header file for class documentation
407 delete fpInterMerger;
413 int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
414 AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr,
415 AliHLTUInt32_t& size, AliHLTComponentBlockDataList& outputBlocks )
417 // see header file for class documentation
419 AliHLTUInt32_t capacity=size;
422 if (!IsDataEvent()) return 0;
424 if ( evtData.fBlockCnt<=0 )
426 Logging( kHLTLogWarning, "HLT::TPCSliceTracker::DoEvent", "DoEvent", "no blocks in event" );
429 const AliHLTComponentBlockData* iter = NULL;
431 AliHLTTPCClusterData* inPtrSP;
432 AliHLTTPCVertexData* inPtrV = NULL;
433 const AliHLTComponentBlockData* vertexIter=NULL;
434 AliHLTTPCTrackletData* outPtr;
435 AliHLTUInt8_t* outBPtr;
436 AliHLTUInt32_t vSize = 0;
437 UInt_t offset=0, mysize, tSize = 0;
439 Int_t slice=-1, patch=-1, row[2];
440 Int_t minPatch=INT_MAX, maxPatch = 0;
442 std::vector<Int_t> slices;
443 std::vector<Int_t>::iterator slIter, slEnd;
444 std::vector<unsigned> sliceCnts;
445 std::vector<unsigned>::iterator slCntIter;
446 Int_t vertexSlice=-1;
448 // Find min/max rows used in total and find and read out vertex if it is present
449 // also determine correct slice number, if multiple slice numbers are present in event
450 // (which should not happen in the first place) we use the one that occurs the most times
454 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
458 bool bIsClusterDataBlock=false;
459 bool bIsVertexDataBlock=false;
460 if(!(bIsClusterDataBlock=(iter->fDataType==AliHLTTPCDefinitions::fgkClustersDataType)) &&
461 !(bIsVertexDataBlock=(iter->fDataType==AliHLTTPCDefinitions::fgkVertexDataType))){
465 slice = AliHLTTPCDefinitions::GetMinSliceNr( *iter );
466 if (slice<0 || slice>=AliHLTTPCTransform::GetNSlice()) {
467 HLTError("invalid slice number %d extracted from specification 0x%08lx, skipping block of type %s",
468 slice, iter->fSpecification, DataType2Text(iter->fDataType).c_str());
469 // just remember the error, if there are other valid blocks ignore the
470 // error, return code otherwise
474 if (slice!=AliHLTTPCDefinitions::GetMaxSliceNr( *iter )) {
475 // the code was not written for/ never used with multiple slices
476 // in one data block/ specification
477 HLTWarning("specification 0x%08lx indicates multiple slices in data block %s: never used before, please audit the code",
478 iter->fSpecification, DataType2Text(iter->fDataType).c_str());
481 slIter = slices.begin();
482 slEnd = slices.end();
483 slCntIter = sliceCnts.begin();
484 while ( slIter != slEnd )
486 if ( *slIter == slice )
496 slices.insert( slices.end(), slice );
497 sliceCnts.insert( sliceCnts.end(), 1 );
502 if (bIsVertexDataBlock)
504 inPtrV = (AliHLTTPCVertexData*)(iter->fPtr);
507 fVertex->Read( inPtrV );
510 if (bIsClusterDataBlock)
512 patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
513 if ( minPatch>patch )
516 row[0] = AliHLTTPCTransform::GetFirstRow( patch );
518 if ( maxPatch<patch )
521 row[1] = AliHLTTPCTransform::GetLastRow( patch );
526 // Determine slice number to really use.
527 if ( slices.size()>1 )
529 Logging( kHLTLogError, "HLT::TPCSliceTracker::DoEvent", "Multiple slices found in event",
530 "Multiple slice numbers found in event 0x%08lX (%lu). Determining maximum occuring slice number...",
531 evtData.fEventID, evtData.fEventID );
532 unsigned maxCntSlice=0;
533 slIter = slices.begin();
534 slEnd = slices.end();
535 slCntIter = sliceCnts.begin();
536 while ( slIter != slEnd )
538 Logging( kHLTLogError, "HLT::TPCSliceTracker::DoEvent", "Multiple slices found in event",
539 "Slice %lu found %lu times.", *slIter, *slCntIter );
540 if ( maxCntSlice<*slCntIter )
542 maxCntSlice = *slCntIter;
548 Logging( kHLTLogError, "HLT::TPCSliceTracker::DoEvent", "Multiple slices found in event",
549 "Using slice %lu.", slice );
551 else if ( slices.size()>0 )
553 slice = *(slices.begin());
557 // there is no sense in running the tracker without input, do not send an
558 // empty output block
564 if ( vertexSlice != slice )
566 // multiple vertex blocks in event and we used the wrong one...
568 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
571 if ( iter->fDataType == AliHLTTPCDefinitions::fgkVertexDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) )
573 inPtrV = (AliHLTTPCVertexData*)(iter->fPtr);
576 fVertex->Read( inPtrV );
582 fTracker->InitSector( slice, row, fEta );
583 fTracker->SetVertex(fVertex);
586 std::vector<unsigned long> patchIndices;
587 std::vector<unsigned long>::iterator pIter, pEnd;
588 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
592 if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) )
594 patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
595 pIter = patchIndices.begin();
596 pEnd = patchIndices.end();
597 while ( pIter!=pEnd && AliHLTTPCDefinitions::GetMinSliceNr( blocks[*pIter] ) < patch )
599 patchIndices.insert( pIter, ndx );
602 pIter = patchIndices.begin();
603 pEnd = patchIndices.end();
604 while ( pIter!=pEnd )
609 patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
610 inPtrSP = (AliHLTTPCClusterData*)(iter->fPtr);
612 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Reading hits",
613 "Reading hits for slice %d - patch %d", slice, patch );
614 //fTracker->ReadHits( inPtrSP->fSpacePointCnt, inPtrSP->fSpacePoints );
615 fTracker->ReadHitsChecked(inPtrSP->fSpacePointCnt, inPtrSP->fSpacePoints,iter->fSize );
620 if ( fmainvertextracking == kTRUE && fnonvertextracking == kFALSE){
621 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---MAINVERTEXTRACKING---");
622 fTracker->MainVertexTrackingA();
623 fTracker->MainVertexTrackingB();
624 fTracker->FillTracks();
626 else if ( fmainvertextracking == kTRUE && fnonvertextracking == kTRUE){
627 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---MAINVERTEXTRACKING---");
628 fTracker->MainVertexTrackingA();
629 fTracker->MainVertexTrackingB();
630 fTracker->FillTracks();
631 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---NONVERTEXTRACKING---");
632 fTracker->NonVertexTracking();
634 else if ( fmainvertextracking == kFALSE && fnonvertextracking == kTRUE){
635 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---NONVERTEXTRACKING---");
636 fTracker->NonVertexTracking();
637 fTracker->FillTracks();
642 AliHLTTPCMemHandler memory;
643 AliHLTTPCTrackSegmentData *trackdata0 =
644 (AliHLTTPCTrackSegmentData *) memory.Allocate(fTracker->GetTracks());
645 memory.TrackArray2Memory(ntracks0,trackdata0,fTracker->GetTracks());
646 fpInterMerger->Reset();
647 fpInterMerger->Init(row,patch);
648 fpInterMerger->FillTracks(ntracks0,trackdata0);
649 fpInterMerger->Merge();
652 AliHLTTPCTrackArray* pArray=fTracker->GetTracks();
653 if (pArray->GetOutSize()+sizeof(AliHLTTPCTrackletData)<=capacity) {
654 outPtr = (AliHLTTPCTrackletData*)(outBPtr);
655 mysize = pArray->WriteTracks( ntracks0, outPtr->fTracklets );
656 outPtr->fTrackletCnt = ntracks0;
658 // Matthias 2009-05-22
659 // Somehow the ConfMapFit uses a different sign convention for the magnetic field.
660 // In order to avoid conversions further upstream we change the sign here.
661 // The CM tracker is not the first priority any more as the CA tracker is
662 // going to be used for online TPC reconstruction. But CM tracker has to
663 // remain functional.
664 // Further investigation is ongoing
665 AliHLTTPCTrackSegmentData* segment=outPtr->fTracklets;
666 for (unsigned int trackno=0; trackno<ntracks0; trackno++, segment++) {
667 segment->fCharge*=-1;
670 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracks",
671 "Input: Number of tracks: %lu Slice/MinPatch/MaxPatch/RowMin/RowMax: %lu/%lu/%lu/%lu/%lu.",
672 ntracks0, slice, minPatch, maxPatch, row[0], row[1] );
676 AliHLTComponentBlockData bd;
679 bd.fSize = mysize+sizeof(AliHLTTPCTrackletData);
680 bd.fSpecification = AliHLTTPCDefinitions::EncodeDataSpecification( slice, slice, minPatch, maxPatch );
681 outputBlocks.push_back( bd );
689 #ifdef FORWARD_VERTEX_BLOCK
692 // Copy the descriptor block for the vertex information.
694 outputBlocks.push_back( bd );
696 #endif // FORWARD_VERTEX_BLOCK
702 int AliHLTTPCSliceTrackerComponent::Configure(const char* arguments)
704 // see header file for class documentation
706 if (!arguments) return iResult;
709 if (!TGeoGlobalMagField::Instance()) {
710 HLTError("magnetic field not initialized, please set up TGeoGlobalMagField and AliMagF");
714 TString allArgs=arguments;
717 Bool_t bDoMerger=kTRUE;
719 TObjArray* pTokens=allArgs.Tokenize(" ");
721 for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
722 argument=((TObjString*)pTokens->At(i))->GetString();
723 if (argument.IsNull()) continue;
725 if (argument.CompareTo("-disable-merger")==0) {
726 HLTInfo("Disabled Inter Merger");
730 else if (argument.CompareTo("-pp-run")==0) {
731 HLTInfo("Using Trackparameters for pp-run");
735 else if (argument.CompareTo("-PbPb-run")==0) {
736 HLTInfo("Using Trackparameters for Pb-Pb-run");
740 else if (argument.CompareTo("-nonvertextracking")==0) {
741 HLTInfo("Doing Nonvertex Tracking");
742 fnonvertextracking = kTRUE;
745 else if (argument.CompareTo("-mainvertextrackingoff")==0) {
746 HLTInfo("Mainvertex Tracking off");
747 fmainvertextracking = kFALSE;
750 else if (argument.CompareTo("-multiplicity")==0) {
751 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
752 HLTInfo("Multiplicity set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
753 fMultiplicity=((TObjString*)pTokens->At(i))->GetString().Atoi();
756 else if (argument.CompareTo("-solenoidBz")==0) {
757 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
758 HLTWarning("parameter -solenoidBz deprecated, magnetic field handled by global AliMagF object and TGeoGlobalMagField");
761 else if (argument.CompareTo("-bfield")==0) {
762 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
763 HLTWarning("parameter -bfield deprecated, magnetic field handled by global AliMagF object and TGeoGlobalMagField");
766 else if (argument.CompareTo("-etarange")==0) {
767 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
768 HLTInfo("Etarange set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
769 fEta[1]=((TObjString*)pTokens->At(i))->GetString().Atof();
772 else if (argument.CompareTo("-etasegment")==0) {
773 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
774 HLTInfo("Number of Etasegment: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
775 fEtasegment=((TObjString*)pTokens->At(i))->GetString().Atoi();
778 else if (argument.CompareTo("-chi2cut")==0) {
779 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
780 HLTInfo("chi2cut set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
781 fHitChi2Cut=((TObjString*)pTokens->At(i))->GetString().Atof();
784 else if (argument.CompareTo("-rowscopetracklet")==0) {
785 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
786 HLTInfo("Number of row to look for next cluster for tracklet: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
787 fRowscopetracklet=((TObjString*)pTokens->At(i))->GetString().Atoi();
790 else if (argument.CompareTo("-rowscopetrack")==0) {
791 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
792 HLTInfo("Number of row to look for next cluster for track: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
793 fRowscopetrack=((TObjString*)pTokens->At(i))->GetString().Atoi();
796 else if (argument.CompareTo("-trackletlength")==0) {
797 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
798 HLTInfo("Minimum number of clusters on a Tracklet: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
799 fTrackletlength=((TObjString*)pTokens->At(i))->GetString().Atoi();
802 else if (argument.CompareTo("-tracklength")==0) {
803 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
804 HLTInfo("Minimum number of clusters on a Track: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
805 fTracklength=((TObjString*)pTokens->At(i))->GetString().Atoi();
808 else if (argument.CompareTo("-clusterZ")==0) {
809 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
810 HLTInfo("Minimum number of clusters on a Track: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
811 fTracker->SetClusterCutZ(((TObjString*)pTokens->At(i))->GetString().Atoi());
815 HLTError("unknown argument %s", argument.Data());
823 HLTError("missing parameter for argument %s", argument.Data());
826 fBField=GetBz()/10.0;
828 // parameter for B=0 T
830 fnonvertextracking = kTRUE;
831 fmainvertextracking = kFALSE;
835 fpInterMerger = new AliHLTTPCInterMerger();
837 fpInterMerger = NULL;
839 SetTrackerParam(fDoPP,fDoPbPb,fMultiplicity,fBField,fEtasegment,fHitChi2Cut,fRowscopetracklet,fRowscopetrack,fTrackletlength,fTracklength);
844 int AliHLTTPCSliceTrackerComponent::ReadPreprocessorValues(const char* modules)
846 // see header file for class documentation
849 TString str(modules);
850 if(str.Contains("HLT") || str.Contains("TPC") || str.Contains("GRP")){
852 const char* pathBField=NULL;
855 HLTInfo("reconfigure B-Field from entry %s, modules %s", pathBField,(modules!=NULL && modules[0]!=0)?modules:"<none>");
856 //AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(pathBField/*,GetRunNo()*/);
858 AliCDBPath path(pathBField);
860 AliCDBStorage *stor = AliCDBManager::Instance()->GetDefaultStorage();
861 Int_t version = stor->GetLatestVersion(pathBField, GetRunNo());
862 Int_t subVersion = stor->GetLatestSubVersion(pathBField, GetRunNo(), version);
863 AliCDBEntry *pEntry = stor->Get(path,GetRunNo(), version, subVersion);
865 HLTImportant("RunNo %d, Version %d, subversion %d", GetRunNo(), version, subVersion);
868 TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
870 HLTImportant("received configuration object string: \'%s\'", pString->GetString().Data());
871 iResult=Configure(pString->GetString().Data());
873 HLTError("configuration object \"%s\" has wrong type, required TObjString", pathBField);
876 HLTError("cannot fetch object \"%s\" from CDB", pathBField);
883 int AliHLTTPCSliceTrackerComponent::Reconfigure(const char* cdbEntry, const char* chainId)
885 // see header file for class documentation
888 const char* path="HLT/ConfigTPC/SliceTrackerComponent";
889 const char* defaultNotify="";
892 defaultNotify=" (default)";
895 HLTInfo("reconfigure from entry %s%s, chain id %s", path, defaultNotify,(chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
896 AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
898 TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
900 HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
901 iResult=Configure(pString->GetString().Data());
903 HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
906 HLTError("cannot fetch object \"%s\" from CDB", path);
910 const char* pathBField=NULL;
913 HLTInfo("reconfigure B-Field from entry %s, chain id %s", path,(chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
914 AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(pathBField/*,GetRunNo()*/);
916 TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
918 HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
919 iResult=Configure(pString->GetString().Data());
921 HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
924 HLTError("cannot fetch object \"%s\" from CDB", path);
932 void AliHLTTPCSliceTrackerComponent::SetTrackerParam1()
934 // see header file for class documentation
935 SetTrackerParam( 10, 20, 5, 10, 2,2,
937 50, 100, 50, 0.1, 0.1);