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 "AliHLTTPC.h"
55 /** ROOT macro for the implementation of ROOT specific class methods */
56 ClassImp(AliHLTTPCSliceTrackerComponent)
58 AliHLTTPCSliceTrackerComponent::AliHLTTPCSliceTrackerComponent()
67 fnonvertextracking(kFALSE),
68 fmainvertextracking(kTRUE),
86 // see header file for class documentation
88 // refer to README to build package
90 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
95 AliHLTTPCSliceTrackerComponent::~AliHLTTPCSliceTrackerComponent()
97 // see header file for class documentation
100 // Public functions to implement AliHLTComponent's interface.
101 // These functions are required for the registration process
103 const char* AliHLTTPCSliceTrackerComponent::GetComponentID()
105 // see header file for class documentation
107 return "TPCSliceTracker";
110 void AliHLTTPCSliceTrackerComponent::GetInputDataTypes(AliHLTComponentDataTypeList& list)
112 // see header file for class documentation
114 list.push_back( AliHLTTPCDefinitions::fgkClustersDataType );
115 list.push_back( AliHLTTPCDefinitions::fgkVertexDataType );
118 AliHLTComponentDataType AliHLTTPCSliceTrackerComponent::GetOutputDataType()
120 // see header file for class documentation
121 return AliHLTTPCDefinitions::fgkTrackSegmentsDataType;
124 void AliHLTTPCSliceTrackerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
126 // see header file for class documentation
127 // XXX TODO: Find more realistic values.
132 AliHLTComponent* AliHLTTPCSliceTrackerComponent::Spawn()
134 // see header file for class documentation
135 return new AliHLTTPCSliceTrackerComponent;
138 void AliHLTTPCSliceTrackerComponent::SetTrackerParam(Int_t phiSegments, Int_t etaSegments,
139 Int_t trackletlength, Int_t tracklength,
140 Int_t rowscopetracklet, Int_t rowscopetrack,
141 Double_t minPtFit, Double_t maxangle,
142 Double_t goodDist, Double_t hitChi2Cut,
143 Double_t goodHitChi2, Double_t trackChi2Cut,
144 Int_t maxdist, Double_t maxphi,Double_t maxeta)
146 // see header file for class documentation
147 //fTracker->SetClusterFinderParam( fXYClusterError, fZClusterError, kTRUE ); // ??
148 //Set parameters input to the tracker
149 //If no arguments are given, default parameters will be used
151 fTracker->SetNSegments(phiSegments,etaSegments);
152 fTracker->SetMaxDca(minPtFit);
153 // fTracker->MainVertexSettings(trackletlength,tracklength,rowscopetracklet,rowscopetrack);
155 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "==============================" );
157 if ( fmainvertextracking == kTRUE && fnonvertextracking == kFALSE){
158 fTracker->SetTrackCuts(hitChi2Cut,goodHitChi2,trackChi2Cut,maxdist,kTRUE);
159 fTracker->SetTrackletCuts(maxangle,goodDist,kTRUE);
161 fTracker->MainVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack, maxphi, maxeta);
162 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "MAINVERTEXTRACKING" );
164 else if ( fmainvertextracking == kTRUE && fnonvertextracking == kTRUE){
165 fTracker->SetTrackCuts(hitChi2Cut,goodHitChi2,trackChi2Cut,maxdist,kTRUE);
166 fTracker->SetTrackCuts(hitChi2Cut,goodHitChi2,trackChi2Cut,maxdist,kFALSE);
167 fTracker->SetTrackletCuts(maxangle,goodDist,kTRUE);
168 fTracker->SetTrackletCuts(maxangle,goodDist,kFALSE);
170 fTracker->MainVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack, maxphi, maxeta);
171 fTracker->NonVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack);
172 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "MAINVERTEXTRACKING - NONVERTEXTRACKING" );
174 else if ( fmainvertextracking == kFALSE && fnonvertextracking == kTRUE){
175 fTracker->SetTrackCuts(hitChi2Cut,goodHitChi2,trackChi2Cut,maxdist,kFALSE);
176 fTracker->SetTrackletCuts(maxangle,goodDist,kFALSE);
178 fTracker->NonVertexSettings( trackletlength, tracklength, rowscopetracklet, rowscopetrack);
179 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::SetTrackerParam", "Tracking", "NONVERTEXTRACKING" );
182 //fTracker->SetParamDone(true);
183 /* Matthias 13.12.2006
184 * the global variable AliHLTTPCS::fgDoVertexFit has never been used so far
185 * and has always been kTRUE.
186 * In order to remove the AliHLTTPC class (which is the old steering class for
187 * HLT (TPC) tracking) from the compilation, this function can not be activated
188 * again. We have to think about a more elegant way to specify the parameters
189 * anyway. The following line was surely for some testing, but was never active
190 * in a tested release.
192 //AliHLTTPC::SetVertexFit( kFALSE );
194 fTracker->InitVolumes();
198 void AliHLTTPCSliceTrackerComponent::SetTrackerParam( Bool_t doPP, Bool_t doPbPb, Int_t multiplicity,
199 Double_t bField, Int_t etasegment, Double_t hitchi2cut,
200 Int_t rowscopetracklet, Int_t rowscopetrack,
201 Int_t trackletlength, Int_t tracklength )
203 // see header file for class documentation
204 AliHLTTPCTransform::SetBField( bField );
205 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "BField", "Setting b field to %f T\n", bField );
209 //tracker->SetClusterFinderParam(xyerror,zerror,kTRUE); // ??
211 SetTrackerParam( 50, 100, 3, 60,
214 5, 50, 50, 0.1, 0.1);
218 int mults[] = { 1000, 2000, 4000, 8000 };
222 int multDist, tmpMultDist;
223 if ( multiplicity>mults[closestMult] )
224 multDist = multiplicity-mults[closestMult];
226 multDist = mults[closestMult]-multiplicity;
227 for ( i = 1; i < multCount; i++ )
229 if ( multiplicity>mults[i] )
230 tmpMultDist = multiplicity-mults[i];
232 tmpMultDist = mults[i]-multiplicity;
233 if ( tmpMultDist < multDist )
236 multDist = tmpMultDist;
240 double bfs[] = { 0.2, 0.4 };
243 double bfDist, tmpBFDist;
244 if ( bField>bfs[closestBf] )
245 bfDist = bField-bfs[closestBf];
247 bfDist = bfs[closestBf]-bField;
248 for ( i = 1; i < bfCount; i++ )
251 tmpBFDist = bField-bfs[i];
253 tmpBFDist = bfs[i]-bField;
254 if ( tmpBFDist < bfDist )
261 switch ( closestMult )
267 SetTrackerParam( 50, 100, 3, 10,
270 5, 50, 50, 0.1, 0.1);
273 SetTrackerParam( 50, 100, 3, 10,
276 5, 50, 50, 0.1, 0.1);
284 SetTrackerParam( 50, 100, 3, 10,
287 5, 20, 50, 0.1, 0.1);
290 SetTrackerParam( 50, 100, 3, 10,
293 5, 20, 50, 0.1, 0.1);
301 SetTrackerParam( 50, 100, 3, 10,
304 5, 10 , 50, 0.1, 0.1);
307 SetTrackerParam( 50, 100, 3, 10,
310 5, 10, 50, 0.1, 0.1);
318 SetTrackerParam( 50, 100, 3, 10,
324 SetTrackerParam( 50, 100, 3, 10,
332 // Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "BField", "Setting b field to %f\n", bfs[closestBf] );
333 // AliHLTTPCTransform::SetBField( bfs[closestBf] );
334 // AliHLTTPCTransform::SetBField( bField );
335 // Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "BField", "Setting b field to %f\n", bField );
339 SetTrackerParam( 50, etasegment, trackletlength, tracklength,
340 rowscopetracklet, rowscopetrack,
341 0, 0.1745, 5, hitchi2cut,
342 5, 50, 50, 0.1, 0.1);
346 int AliHLTTPCSliceTrackerComponent::DoInit( int argc, const char** argv )
348 // see header file for class documentation
349 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoInit", "DoInit", "DoInit()" );
351 if ( fTracker || fVertex )
353 fTracker = new AliHLTTPCConfMapper();
354 fVertex = new AliHLTTPCVertex();
357 fDoNonVertex = false;
358 fMultiplicity = 4000;
379 TString configuration="";
381 for (int i=0; i<argc && iResult>=0; i++) {
383 if (!configuration.IsNull()) configuration+=" ";
384 configuration+=argument;
387 if (!configuration.IsNull()) {
388 iResult=Configure(configuration.Data());
390 iResult=Reconfigure(NULL, NULL);
396 int AliHLTTPCSliceTrackerComponent::DoDeinit()
398 // see header file for class documentation
406 delete fpInterMerger;
412 int AliHLTTPCSliceTrackerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
413 AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr,
414 AliHLTUInt32_t& size, AliHLTComponentBlockDataList& outputBlocks )
416 // see header file for class documentation
418 AliHLTUInt32_t capacity=size;
421 if (!IsDataEvent()) return 0;
423 if ( evtData.fBlockCnt<=0 )
425 Logging( kHLTLogWarning, "HLT::TPCSliceTracker::DoEvent", "DoEvent", "no blocks in event" );
428 const AliHLTComponentBlockData* iter = NULL;
430 AliHLTTPCClusterData* inPtrSP;
431 AliHLTTPCVertexData* inPtrV = NULL;
432 const AliHLTComponentBlockData* vertexIter=NULL;
433 AliHLTTPCTrackletData* outPtr;
434 AliHLTUInt8_t* outBPtr;
435 AliHLTUInt32_t vSize = 0;
436 UInt_t offset=0, mysize, tSize = 0;
438 Int_t slice=-1, patch=-1, row[2];
439 Int_t minPatch=INT_MAX, maxPatch = 0;
441 std::vector<Int_t> slices;
442 std::vector<Int_t>::iterator slIter, slEnd;
443 std::vector<unsigned> sliceCnts;
444 std::vector<unsigned>::iterator slCntIter;
445 Int_t vertexSlice=-1;
447 // Find min/max rows used in total and find and read out vertex if it is present
448 // also determine correct slice number, if multiple slice numbers are present in event
449 // (which should not happen in the first place) we use the one that occurs the most times
453 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
457 bool bIsClusterDataBlock=false;
458 bool bIsVertexDataBlock=false;
459 if(!(bIsClusterDataBlock=(iter->fDataType==AliHLTTPCDefinitions::fgkClustersDataType)) &&
460 !(bIsVertexDataBlock=(iter->fDataType==AliHLTTPCDefinitions::fgkVertexDataType))){
464 slice = AliHLTTPCDefinitions::GetMinSliceNr( *iter );
465 if (slice<0 || slice>=AliHLTTPCTransform::GetNSlice()) {
466 HLTError("invalid slice number %d extracted from specification 0x%08lx, skipping block of type %s",
467 slice, iter->fSpecification, DataType2Text(iter->fDataType).c_str());
468 // just remember the error, if there are other valid blocks ignore the
469 // error, return code otherwise
473 if (slice!=AliHLTTPCDefinitions::GetMaxSliceNr( *iter )) {
474 // the code was not written for/ never used with multiple slices
475 // in one data block/ specification
476 HLTWarning("specification 0x%08lx indicates multiple slices in data block %s: never used before, please audit the code",
477 iter->fSpecification, DataType2Text(iter->fDataType).c_str());
480 slIter = slices.begin();
481 slEnd = slices.end();
482 slCntIter = sliceCnts.begin();
483 while ( slIter != slEnd )
485 if ( *slIter == slice )
495 slices.insert( slices.end(), slice );
496 sliceCnts.insert( sliceCnts.end(), 1 );
501 if (bIsVertexDataBlock)
503 inPtrV = (AliHLTTPCVertexData*)(iter->fPtr);
506 fVertex->Read( inPtrV );
509 if (bIsClusterDataBlock)
511 patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
512 if ( minPatch>patch )
515 row[0] = AliHLTTPCTransform::GetFirstRow( patch );
517 if ( maxPatch<patch )
520 row[1] = AliHLTTPCTransform::GetLastRow( patch );
525 // Determine slice number to really use.
526 if ( slices.size()>1 )
528 Logging( kHLTLogError, "HLT::TPCSliceTracker::DoEvent", "Multiple slices found in event",
529 "Multiple slice numbers found in event 0x%08lX (%lu). Determining maximum occuring slice number...",
530 evtData.fEventID, evtData.fEventID );
531 unsigned maxCntSlice=0;
532 slIter = slices.begin();
533 slEnd = slices.end();
534 slCntIter = sliceCnts.begin();
535 while ( slIter != slEnd )
537 Logging( kHLTLogError, "HLT::TPCSliceTracker::DoEvent", "Multiple slices found in event",
538 "Slice %lu found %lu times.", *slIter, *slCntIter );
539 if ( maxCntSlice<*slCntIter )
541 maxCntSlice = *slCntIter;
547 Logging( kHLTLogError, "HLT::TPCSliceTracker::DoEvent", "Multiple slices found in event",
548 "Using slice %lu.", slice );
550 else if ( slices.size()>0 )
552 slice = *(slices.begin());
556 // there is no sense in running the tracker without input, do not send an
557 // empty output block
563 if ( vertexSlice != slice )
565 // multiple vertex blocks in event and we used the wrong one...
567 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
570 if ( iter->fDataType == AliHLTTPCDefinitions::fgkVertexDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) )
572 inPtrV = (AliHLTTPCVertexData*)(iter->fPtr);
575 fVertex->Read( inPtrV );
581 fTracker->InitSector( slice, row, fEta );
582 fTracker->SetVertex(fVertex);
585 std::vector<unsigned long> patchIndices;
586 std::vector<unsigned long>::iterator pIter, pEnd;
587 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
591 if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType && slice==AliHLTTPCDefinitions::GetMinSliceNr( *iter ) )
593 patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
594 pIter = patchIndices.begin();
595 pEnd = patchIndices.end();
596 while ( pIter!=pEnd && AliHLTTPCDefinitions::GetMinSliceNr( blocks[*pIter] ) < patch )
598 patchIndices.insert( pIter, ndx );
601 pIter = patchIndices.begin();
602 pEnd = patchIndices.end();
603 while ( pIter!=pEnd )
608 patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
609 inPtrSP = (AliHLTTPCClusterData*)(iter->fPtr);
611 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Reading hits",
612 "Reading hits for slice %d - patch %d", slice, patch );
613 //fTracker->ReadHits( inPtrSP->fSpacePointCnt, inPtrSP->fSpacePoints );
614 fTracker->ReadHitsChecked(inPtrSP->fSpacePointCnt, inPtrSP->fSpacePoints,iter->fSize );
619 if ( fmainvertextracking == kTRUE && fnonvertextracking == kFALSE){
620 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---MAINVERTEXTRACKING---");
621 fTracker->MainVertexTrackingA();
622 fTracker->MainVertexTrackingB();
623 fTracker->FillTracks();
625 else if ( fmainvertextracking == kTRUE && fnonvertextracking == kTRUE){
626 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---MAINVERTEXTRACKING---");
627 fTracker->MainVertexTrackingA();
628 fTracker->MainVertexTrackingB();
629 fTracker->FillTracks();
630 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---NONVERTEXTRACKING---");
631 fTracker->NonVertexTracking();
633 else if ( fmainvertextracking == kFALSE && fnonvertextracking == kTRUE){
634 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracking", " ---NONVERTEXTRACKING---");
635 fTracker->NonVertexTracking();
636 fTracker->FillTracks();
641 AliHLTTPCMemHandler memory;
642 AliHLTTPCTrackSegmentData *trackdata0 =
643 (AliHLTTPCTrackSegmentData *) memory.Allocate(fTracker->GetTracks());
644 memory.TrackArray2Memory(ntracks0,trackdata0,fTracker->GetTracks());
645 fpInterMerger->Reset();
646 fpInterMerger->Init(row,patch);
647 fpInterMerger->FillTracks(ntracks0,trackdata0);
648 fpInterMerger->Merge();
651 AliHLTTPCTrackArray* pArray=fTracker->GetTracks();
652 if (pArray->GetOutSize()+sizeof(AliHLTTPCTrackletData)<=capacity) {
653 outPtr = (AliHLTTPCTrackletData*)(outBPtr);
654 mysize = pArray->WriteTracks( ntracks0, outPtr->fTracklets );
655 outPtr->fTrackletCnt = ntracks0;
657 Logging( kHLTLogDebug, "HLT::TPCSliceTracker::DoEvent", "Tracks",
658 "Input: Number of tracks: %lu Slice/MinPatch/MaxPatch/RowMin/RowMax: %lu/%lu/%lu/%lu/%lu.",
659 ntracks0, slice, minPatch, maxPatch, row[0], row[1] );
663 AliHLTComponentBlockData bd;
666 bd.fSize = mysize+sizeof(AliHLTTPCTrackletData);
667 bd.fSpecification = AliHLTTPCDefinitions::EncodeDataSpecification( slice, slice, minPatch, maxPatch );
668 outputBlocks.push_back( bd );
676 #ifdef FORWARD_VERTEX_BLOCK
679 // Copy the descriptor block for the vertex information.
681 outputBlocks.push_back( bd );
683 #endif // FORWARD_VERTEX_BLOCK
689 int AliHLTTPCSliceTrackerComponent::Configure(const char* arguments)
691 // see header file for class documentation
693 if (!arguments) return iResult;
695 TString allArgs=arguments;
698 Bool_t bDoMerger=kTRUE;
700 TObjArray* pTokens=allArgs.Tokenize(" ");
702 for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
703 argument=((TObjString*)pTokens->At(i))->GetString();
704 if (argument.IsNull()) continue;
706 if (argument.CompareTo("-disable-merger")==0) {
707 HLTInfo("Disabled Inter Merger");
711 else if (argument.CompareTo("-pp-run")==0) {
712 HLTInfo("Using Trackparameters for pp-run");
716 else if (argument.CompareTo("-PbPb-run")==0) {
717 HLTInfo("Using Trackparameters for Pb-Pb-run");
721 else if (argument.CompareTo("-nonvertextracking")==0) {
722 HLTInfo("Doing Nonvertex Tracking");
723 fnonvertextracking = kTRUE;
726 else if (argument.CompareTo("-mainvertextrackingoff")==0) {
727 HLTInfo("Mainvertex Tracking off");
728 fmainvertextracking = kFALSE;
731 else if (argument.CompareTo("-multiplicity")==0) {
732 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
733 HLTInfo("Multiplicity set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
734 fMultiplicity=((TObjString*)pTokens->At(i))->GetString().Atoi();
737 else if (argument.CompareTo("-solenoidBz")==0 || argument.CompareTo("-bfield")==0) {
738 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
739 HLTInfo("Magnetic Field set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
740 fBField=((TObjString*)pTokens->At(i))->GetString().Atof();
741 fBField=fBField/10.0;
744 else if (argument.CompareTo("-bfield")==0) {
745 HLTWarning("-bfield is the old way. The field is set, but please use -solenoidBz.");
746 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
747 HLTInfo("Magnetic field set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
748 fBField=((TObjString*)pTokens->At(i))->GetString().Atoi();
751 else if (argument.CompareTo("-etarange")==0) {
752 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
753 HLTInfo("Etarange set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
754 fEta[1]=((TObjString*)pTokens->At(i))->GetString().Atof();
757 else if (argument.CompareTo("-etasegment")==0) {
758 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
759 HLTInfo("Number of Etasegment: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
760 fEtasegment=((TObjString*)pTokens->At(i))->GetString().Atoi();
763 else if (argument.CompareTo("-chi2cut")==0) {
764 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
765 HLTInfo("chi2cut set to: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
766 fHitChi2Cut=((TObjString*)pTokens->At(i))->GetString().Atof();
769 else if (argument.CompareTo("-rowscopetracklet")==0) {
770 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
771 HLTInfo("Number of row to look for next cluster for tracklet: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
772 fRowscopetracklet=((TObjString*)pTokens->At(i))->GetString().Atoi();
775 else if (argument.CompareTo("-rowscopetrack")==0) {
776 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
777 HLTInfo("Number of row to look for next cluster for track: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
778 fRowscopetrack=((TObjString*)pTokens->At(i))->GetString().Atoi();
781 else if (argument.CompareTo("-trackletlength")==0) {
782 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
783 HLTInfo("Minimum number of clusters on a Tracklet: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
784 fTrackletlength=((TObjString*)pTokens->At(i))->GetString().Atoi();
787 else if (argument.CompareTo("-tracklength")==0) {
788 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
789 HLTInfo("Minimum number of clusters on a Track: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
790 fTracklength=((TObjString*)pTokens->At(i))->GetString().Atoi();
793 else if (argument.CompareTo("-clusterZ")==0) {
794 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
795 HLTInfo("Minimum number of clusters on a Track: %s", ((TObjString*)pTokens->At(i))->GetString().Data());
796 fTracker->SetClusterCutZ(((TObjString*)pTokens->At(i))->GetString().Atoi());
800 HLTError("unknown argument %s", argument.Data());
808 HLTError("missing parameter for argument %s", argument.Data());
812 // parameter for B=0 T
814 fnonvertextracking = kTRUE;
815 fmainvertextracking = kFALSE;
819 fpInterMerger = new AliHLTTPCInterMerger();
821 fpInterMerger = NULL;
823 SetTrackerParam(fDoPP,fDoPbPb,fMultiplicity,fBField,fEtasegment,fHitChi2Cut,fRowscopetracklet,fRowscopetrack,fTrackletlength,fTracklength);
828 int AliHLTTPCSliceTrackerComponent::ReadPreprocessorValues(const char* modules)
830 // see header file for class documentation
833 TString str(modules);
834 if(str.Contains("HLT") || str.Contains("TPC") || str.Contains("GRP")){
836 const char* pathBField=kAliHLTCDBSolenoidBz;
839 HLTInfo("reconfigure B-Field from entry %s, modules %s", pathBField,(modules!=NULL && modules[0]!=0)?modules:"<none>");
840 //AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(pathBField/*,GetRunNo()*/);
842 AliCDBPath path(pathBField);
844 AliCDBStorage *stor = AliCDBManager::Instance()->GetDefaultStorage();
845 Int_t version = stor->GetLatestVersion(pathBField, GetRunNo());
846 Int_t subVersion = stor->GetLatestSubVersion(pathBField, GetRunNo(), version);
847 AliCDBEntry *pEntry = stor->Get(path,GetRunNo(), version, subVersion);
849 HLTImportant("RunNo %d, Version %d, subversion %d", GetRunNo(), version, subVersion);
852 TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
854 HLTImportant("received configuration object string: \'%s\'", pString->GetString().Data());
855 iResult=Configure(pString->GetString().Data());
857 HLTError("configuration object \"%s\" has wrong type, required TObjString", pathBField);
860 HLTError("cannot fetch object \"%s\" from CDB", pathBField);
867 int AliHLTTPCSliceTrackerComponent::Reconfigure(const char* cdbEntry, const char* chainId)
869 // see header file for class documentation
872 const char* path="HLT/ConfigTPC/SliceTrackerComponent";
873 const char* defaultNotify="";
876 defaultNotify=" (default)";
879 HLTInfo("reconfigure from entry %s%s, chain id %s", path, defaultNotify,(chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
880 AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
882 TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
884 HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
885 iResult=Configure(pString->GetString().Data());
887 HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
890 HLTError("cannot fetch object \"%s\" from CDB", path);
894 const char* pathBField=kAliHLTCDBSolenoidBz;
897 HLTInfo("reconfigure B-Field from entry %s, chain id %s", path,(chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
898 AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(pathBField/*,GetRunNo()*/);
900 TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
902 HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
903 iResult=Configure(pString->GetString().Data());
905 HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
908 HLTError("cannot fetch object \"%s\" from CDB", path);
916 void AliHLTTPCSliceTrackerComponent::SetTrackerParam1()
918 // see header file for class documentation
919 SetTrackerParam( 10, 20, 5, 10, 2,2,
921 50, 100, 50, 0.1, 0.1);