91 #include "AliCodeTimer.h"
92 #include "AliTracker.h"
94 #include <TClonesArray.h>
99 #include <Riostream.h>
114 fClusterServer(clusterServer),
115 fkRecoParam(recoParam),
116 fkTransformer(transformer),
123 fRecTracksPtr =
new TClonesArray(
"AliMUONTrack", 100);
130 Double_t inverseBendingP = (GetRecoParam()->GetMinBendingMomentum() > 0.) ? 1./GetRecoParam()->GetMinBendingMomentum() : 1.;
160 AliCodeTimerAuto(
"",0);
206 track->SetUniqueID(i+1);
207 trackStore.
Add(*track);
219 Double_t z = trackParam.
GetZ();
223 Double_t angleMCS2 = 0.;
224 Double_t impactMCS2 = 0.;
228 for (Int_t iCh=0; iCh<=chamber; iCh++) {
230 angleMCS2 += localMCS2;
237 for (Int_t iCh=0; iCh<=chamber; iCh++) {
248 Double_t nonBendingSlopeErr = TMath::Sqrt(kParamCov(1,1) + angleMCS2);
255 Double_t nonBendingImpactParamErr = TMath::Sqrt(kParamCov(0,0) + z * z * kParamCov(1,1) - 2. * z * kParamCov(0,1) + impactMCS2);
256 if ((nonBendingImpactParam - sigmaCut * nonBendingImpactParamErr) > (3. *
GetRecoParam()->GetNonBendingVertexDispersion()))
return kFALSE;
265 Double_t bendingMomentumErr = TMath::Sqrt(kParamCov(4,4)) * bendingMomentum * bendingMomentum;
266 if (chamber < 6 && (bendingMomentum + sigmaCut * bendingMomentumErr) <
GetRecoParam()->GetMinBendingMomentum())
return kFALSE;
267 else if ((bendingMomentum + 3. * bendingMomentumErr) <
GetRecoParam()->GetMinBendingMomentum())
return kFALSE;
274 Double_t bendingSlopeErr = TMath::Sqrt(kParamCov(3,3) + angleMCS2);
281 Double_t bendingImpactParamErr = TMath::Sqrt(kParamCov(2,2) + z * z * kParamCov(3,3) - 2. * z * kParamCov(2,3) + impactMCS2);
282 if ((bendingImpactParam - sigmaCut * bendingImpactParamErr) > (3. *
GetRecoParam()->GetBendingVertexDispersion()))
return kFALSE;
297 AliDebug(1,Form(
"Enter MakeSegmentsBetweenChambers (1..) %d-%d", ch1+1, ch2+1));
298 AliCodeTimerAuto(
"",0);
302 Double_t z1 = 0., z2 = 0.,
dZ = 0.;
303 Double_t nonBendingSlope = 0., nonBendingSlopeErr = 0., nonBendingImpactParam = 0., nonBendingImpactParamErr = 0.;
304 Double_t bendingSlope = 0., bendingSlopeErr = 0., bendingImpactParam = 0., bendingImpactParamErr = 0., bendingImpactParamErr2 = 0.;
305 Double_t bendingMomentum = 0., bendingMomentumErr = 0.;
307 Double_t angleMCS2 = 0.;
308 Double_t impactMCS2 = 0.;
309 for (Int_t iCh=0; iCh<=ch1; iCh++) {
320 static TClonesArray *segments =
new TClonesArray(
"AliMUONObjectPair", 100);
321 segments->Clear(
"C");
324 while ( ( cluster1 = static_cast<AliMUONVCluster*>(nextInCh1()) ) ) {
325 z1 = cluster1->
GetZ();
331 while ( ( cluster2 = static_cast<AliMUONVCluster*>(nextInCh2()) ) ) {
332 z2 = cluster2->
GetZ();
336 nonBendingSlope = (cluster1->
GetX() - cluster2->
GetX()) /
dZ;
340 nonBendingSlopeErr = TMath::Sqrt((cluster1->
GetErrX2() + cluster2->
GetErrX2()) /
dZ /
dZ + angleMCS2);
341 if ((TMath::Abs(nonBendingSlope) - sigmaCut * nonBendingSlopeErr) >
GetRecoParam()->GetMaxNonBendingSlope())
continue;
346 nonBendingImpactParam = TMath::Abs(cluster1->
GetX() - cluster1->
GetZ() * nonBendingSlope);
347 nonBendingImpactParamErr = TMath::Sqrt((z1 * z1 * cluster2->
GetErrX2() + z2 * z2 * cluster1->
GetErrX2()) /
dZ /
dZ + impactMCS2);
348 if ((nonBendingImpactParam - sigmaCut * nonBendingImpactParamErr) > (3. *
GetRecoParam()->GetNonBendingVertexDispersion()))
continue;
353 bendingSlope = (cluster1->
GetY() - cluster2->
GetY()) /
dZ;
357 bendingImpactParam = cluster1->
GetY() - cluster1->
GetZ() * bendingSlope;
358 bendingImpactParamErr2 = (z1 * z1 * cluster2->
GetErrY2() + z2 * z2 * cluster1->
GetErrY2()) /
dZ /
dZ + impactMCS2;
360 bendingMomentumErr = TMath::Sqrt((bendingVertexDispersion2 + bendingImpactParamErr2) /
361 bendingImpactParam / bendingImpactParam + 0.01) * bendingMomentum;
362 if ((bendingMomentum + 3. * bendingMomentumErr) <
GetRecoParam()->GetMinBendingMomentum())
continue;
369 bendingSlopeErr = TMath::Sqrt((cluster1->
GetErrY2() + cluster2->
GetErrY2()) /
dZ /
dZ + angleMCS2);
370 if ((TMath::Abs(bendingSlope) - sigmaCut * bendingSlopeErr) >
GetRecoParam()->GetMaxBendingSlope())
continue;
375 bendingImpactParam = TMath::Abs(cluster1->
GetY() - cluster1->
GetZ() * bendingSlope);
376 bendingImpactParamErr = TMath::Sqrt((z1 * z1 * cluster2->
GetErrY2() + z2 * z2 * cluster1->
GetErrY2()) /
dZ /
dZ + impactMCS2);
377 if ((bendingImpactParam - sigmaCut * bendingImpactParamErr) > (3. *
GetRecoParam()->GetBendingVertexDispersion()))
continue;
384 segment =
new ((*segments)[segments->GetLast()+1])
AliMUONObjectPair(cluster1, cluster2, kFALSE, kFALSE);
387 if (AliLog::GetGlobalDebugLevel() > 1) {
388 cout <<
"segmentIndex(0...): " << segments->GetLast() << endl;
390 cout <<
"Cluster in first chamber" << endl;
392 cout <<
"Cluster in second chamber" << endl;
401 AliDebug(1,Form(
"chambers%d-%d: NSegments = %d ", ch1+1, ch2+1, segments->GetEntriesFast()));
410 AliDebug(1,
"Enter RemoveUsedSegments");
411 Int_t nSegments = segments.GetEntriesFast();
416 Bool_t foundCluster1, foundCluster2, removeSegment;
419 for (Int_t iSegment=0; iSegment<nSegments; iSegment++) {
424 removeSegment = kFALSE;
427 for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
431 if (!track)
continue;
433 foundCluster1 = kFALSE;
434 foundCluster2 = kFALSE;
438 for (Int_t iCluster = 0; iCluster < nClusters; iCluster++) {
442 if (cluster == cluster1) foundCluster1 = kTRUE;
443 else if (cluster == cluster2) foundCluster2 = kTRUE;
445 if (foundCluster1 && foundCluster2) {
446 removeSegment = kTRUE;
452 if (removeSegment)
break;
456 if (removeSegment) segments.RemoveAt(iSegment);
463 AliDebug(1,Form(
"NSegments = %d ", segments.GetEntriesFast()));
474 Int_t clustersInCommon, nClusters1, nClusters2;
476 for (Int_t iTrack1 = 0; iTrack1 < nTracks; iTrack1++) {
479 if (!track1)
continue;
482 for (Int_t iTrack2 = iTrack1+1; iTrack2 < nTracks; iTrack2++) {
485 if (!track2)
continue;
490 if ((clustersInCommon == nClusters1) || (clustersInCommon == nClusters2)) {
492 if (nClusters2 > nClusters1) {
518 Int_t clustersInCommon2, nClusters1, nClusters2;
520 for (Int_t iTrack1 = 0; iTrack1 < nTracks; iTrack1++) {
523 if (!track1)
continue;
526 for (Int_t iTrack2 = iTrack1+1; iTrack2 < nTracks; iTrack2++) {
529 if (!track2)
continue;
534 if (clustersInCommon2 > nClusters1 || clustersInCommon2 > nClusters2) {
558 Bool_t trackRemoved = kFALSE;
566 AliWarning(
"problem occured somewhere during the tracking --> discard track");
569 trackRemoved = kTRUE;
594 for (Int_t i = 0; i < nTracks; i++) {
614 Int_t nClusters1, nClusters2;
621 for (Int_t iTrack1 = 0; iTrack1 < nTracks; iTrack1++) {
625 for (Int_t iTrack2 = iTrack1+1; iTrack2 < nTracks; iTrack2++) {
669 static const Double_t kMaxDZ = 15.;
677 Double_t errX2 = kParamCov(0,0) + kMaxDZ * kMaxDZ * kParamCov(1,1) + 2. * kMaxDZ * TMath::Abs(kParamCov(0,1)) +
679 Double_t errY2 = kParamCov(2,2) + kMaxDZ * kMaxDZ * kParamCov(3,3) + 2. * kMaxDZ * TMath::Abs(kParamCov(2,3)) +
716 trackParamAtCluster = trackParam;
727 Double_t sigmaX2 = kParamCov(0,0) + cluster->
GetErrX2();
728 Double_t sigmaY2 = kParamCov(2,2) + cluster->
GetErrY2();
729 Double_t covXY = kParamCov(0,2);
730 Double_t det = sigmaX2 * sigmaY2 - covXY * covXY;
734 return (dX * dX * sigmaY2 + dY * dY * sigmaX2 - 2. * dX * dY * covXY) / det;
746 Double_t
dZ = cluster->
GetZ() - trackParam.
GetZ();
750 Double_t errX2 = kParamCov(0,0) + dZ * dZ * kParamCov(1,1) + 2. * dZ * kParamCov(0,1) + cluster->
GetErrX2();
751 Double_t errY2 = kParamCov(2,2) + dZ * dZ * kParamCov(3,3) + 2. * dZ * kParamCov(2,3) + cluster->
GetErrY2();
758 if (TMath::Abs(dX) > dXmax || TMath::Abs(dY) > dYmax)
return kFALSE;
774 trackParamAtCluster2 = trackParamAtCluster1;
788 const TMatrixD& kParamCov1 = trackParamAtCluster1.
GetCovariances();
789 const TMatrixD& kParamCov2 = trackParamAtCluster2.
GetCovariances();
790 Double_t
dZ = trackParamAtCluster2.
GetZ() - trackParamAtCluster1.
GetZ();
791 Double_t sigma2X1 = kParamCov1(0,0) + cluster1->
GetErrX2();
792 Double_t sigma2X2 = kParamCov2(0,0) + cluster2->
GetErrX2();
793 Double_t covX1X2 = kParamCov1(0,0) + dZ * kParamCov1(0,1);
794 Double_t sigma2Y1 = kParamCov1(2,2) + cluster1->
GetErrY2();
795 Double_t sigma2Y2 = kParamCov2(2,2) + cluster2->
GetErrY2();
796 Double_t covY1Y2 = kParamCov1(2,2) + dZ * kParamCov1(2,3);
799 Double_t detX = sigma2X1 * sigma2X2 - covX1X2 * covX1X2;
800 Double_t detY = sigma2Y1 * sigma2Y2 - covY1Y2 * covY1Y2;
802 return (dX1 * dX1 * sigma2X2 + dX2 * dX2 * sigma2X1 - 2. * dX1 * dX2 * covX1X2) / detX
803 + (dY1 * dY1 * sigma2Y2 + dY2 * dY2 * sigma2Y1 - 2. * dY1 * dY2 * covY1Y2) / detY;
818 AliDebug(1,Form(
"Enter FollowLinearTrackInChamber(1..) %d", nextChamber+1));
823 Double_t bestChi2WithOneCluster = maxChi2WithOneCluster;
824 Bool_t foundOneCluster = kFALSE;
836 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 2) || (AliLog::GetGlobalDebugLevel() >= 2)) {
837 cout<<endl<<
"Track parameters and covariances at first cluster:"<<endl;
846 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
847 cout <<
"FollowLinearTrackInChamber: look for cluster in chamber(1..): " << nextChamber+1 << endl;
854 while ( ( cluster = static_cast<AliMUONVCluster*>(next()) ) ) {
860 extrapTrackParamAtCluster = trackParam;
862 chi2WithOneCluster =
TryOneCluster(extrapTrackParamAtCluster, cluster, extrapTrackParamAtCluster);
865 if (chi2WithOneCluster < maxChi2WithOneCluster) {
866 foundOneCluster = kTRUE;
869 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
870 cout <<
"FollowLinearTrackInChamber: found one cluster in chamber(1..): " << nextChamber+1
871 <<
" (Chi2 = " << chi2WithOneCluster <<
")" << endl;
886 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
887 cout <<
"FollowLinearTrackInChamber: added one cluster in chamber(1..): " << nextChamber+1 << endl;
888 if (AliLog::GetGlobalDebugLevel() >= 3) newTrack->
RecursiveDump();
891 }
else if (chi2WithOneCluster < bestChi2WithOneCluster) {
893 bestChi2WithOneCluster = chi2WithOneCluster;
894 bestTrackParamAtCluster = extrapTrackParamAtCluster;
903 if (foundOneCluster) {
911 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
912 cout <<
"FollowLinearTrackInChamber: added the best cluster in chamber(1..): " << bestTrackParamAtCluster.
GetClusterPtr()->
GetChamberId()+1 << endl;
913 if (AliLog::GetGlobalDebugLevel() >= 3) newTrack->
RecursiveDump();
916 }
else return kFALSE;
918 }
else if (foundOneCluster) {
924 }
else return kFALSE;
941 AliDebug(1,Form(
"Enter FollowLinearTrackInStation(1..) %d", nextStation+1));
947 if (nextStation==4) {
948 ch1 = 2*nextStation+1;
952 ch2 = 2*nextStation+1;
961 Double_t bestChi2WithOneCluster = maxChi2WithOneCluster;
962 Double_t bestChi2WithTwoClusters = maxChi2WithTwoClusters;
963 Bool_t foundOneCluster = kFALSE;
964 Bool_t foundTwoClusters = kFALSE;
973 Int_t nClusters = clusterStore.
GetSize();
974 Bool_t *clusterCh1Used =
new Bool_t[nClusters];
975 for (Int_t i = 0; i < nClusters; i++) clusterCh1Used[i] = kFALSE;
983 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 2) || (AliLog::GetGlobalDebugLevel() >= 2)) {
984 cout<<endl<<
"Track parameters and covariances at first cluster:"<<endl;
993 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
994 cout <<
"FollowLinearTrackInStation: look for clusters in chamber(1..): " << ch2+1 << endl;
1002 while ( ( clusterCh2 = static_cast<AliMUONVCluster*>(nextInCh2()) ) ) {
1008 extrapTrackParamAtCluster2 = trackParam;
1010 chi2WithOneCluster =
TryOneCluster(extrapTrackParamAtCluster2, clusterCh2, extrapTrackParamAtCluster2);
1013 if (chi2WithOneCluster < maxChi2WithOneCluster) {
1014 Bool_t foundSecondCluster = kFALSE;
1017 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
1018 cout <<
"FollowLinearTrackInStation: found one cluster in chamber(1..): " << ch2+1
1019 <<
" (Chi2 = " << chi2WithOneCluster <<
")" << endl;
1020 clusterCh2->
Print();
1021 cout <<
" look for second clusters in chamber(1..): " << ch1+1 <<
" ..." << endl;
1032 while ( ( clusterCh1 = static_cast<AliMUONVCluster*>(nextInCh1()) ) ) {
1039 chi2WithTwoClusters =
TryTwoClustersFast(extrapTrackParamAtCluster2, clusterCh1, extrapTrackParamAtCluster1);
1042 if (chi2WithTwoClusters < maxChi2WithTwoClusters) {
1043 foundSecondCluster = kTRUE;
1044 foundTwoClusters = kTRUE;
1047 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
1048 cout <<
"FollowLinearTrackInStation: found one cluster in chamber(1..): " << ch1+1
1049 <<
" (Chi2 = " << chi2WithTwoClusters <<
")" << endl;
1050 clusterCh1->
Print();
1064 clusterCh1Used[iCluster1] = kTRUE;
1067 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
1068 cout <<
"FollowLinearTrackInStation: added two clusters in station(1..): " << nextStation+1 << endl;
1069 if (AliLog::GetGlobalDebugLevel() >= 3) newTrack->
RecursiveDump();
1072 }
else if (chi2WithTwoClusters < bestChi2WithTwoClusters) {
1074 bestChi2WithTwoClusters = chi2WithTwoClusters;
1075 bestTrackParamAtCluster1 = extrapTrackParamAtCluster1;
1076 bestTrackParamAtCluster2 = extrapTrackParamAtCluster2;
1084 if (!foundSecondCluster) {
1085 foundOneCluster = kTRUE;
1098 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
1099 cout <<
"FollowLinearTrackInStation: added one cluster in chamber(1..): " << ch2+1 << endl;
1100 if (AliLog::GetGlobalDebugLevel() >= 3) newTrack->
RecursiveDump();
1103 }
else if (!foundTwoClusters && chi2WithOneCluster < bestChi2WithOneCluster) {
1105 bestChi2WithOneCluster = chi2WithOneCluster;
1106 bestTrackParamAtCluster1 = extrapTrackParamAtCluster2;
1117 if (
GetRecoParam()->TrackAllTracks() || !foundTwoClusters) {
1120 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
1121 cout <<
"FollowLinearTrackInStation: look for single cluster in chamber(1..): " << ch1+1 << endl;
1135 while ( ( clusterCh1 = static_cast<AliMUONVCluster*>(nextInCh1()) ) ) {
1138 if (clusterCh1Used[iCluster1])
continue;
1144 extrapTrackParamAtCluster1 = trackParam;
1146 chi2WithOneCluster =
TryOneCluster(extrapTrackParamAtCluster1, clusterCh1, extrapTrackParamAtCluster1);
1150 if (chi2WithOneCluster < maxChi2WithOneCluster) {
1151 foundOneCluster = kTRUE;
1154 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
1155 cout <<
"FollowLinearTrackInStation: found one cluster in chamber(1..): " << ch1+1
1156 <<
" (Chi2 = " << chi2WithOneCluster <<
")" << endl;
1157 clusterCh1->
Print();
1171 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
1172 cout <<
"FollowLinearTrackInStation: added one cluster in chamber(1..): " << ch1+1 << endl;
1173 if (AliLog::GetGlobalDebugLevel() >= 3) newTrack->
RecursiveDump();
1176 }
else if (chi2WithOneCluster < bestChi2WithOneCluster) {
1178 bestChi2WithOneCluster = chi2WithOneCluster;
1179 bestTrackParamAtCluster1 = extrapTrackParamAtCluster1;
1190 if (foundTwoClusters) {
1198 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
1199 cout <<
"FollowLinearTrackInStation: added the two best clusters in station(1..): " << nextStation+1 << endl;
1200 if (AliLog::GetGlobalDebugLevel() >= 3) newTrack->
RecursiveDump();
1203 }
else if (foundOneCluster) {
1211 if ((AliLog::GetDebugLevel(
"MUON",
"AliMUONVTrackReconstructor") >= 1) || (AliLog::GetGlobalDebugLevel() >= 1)) {
1212 cout <<
"FollowLinearTrackInStation: added the best cluster in chamber(1..): " << bestTrackParamAtCluster1.
GetClusterPtr()->
GetChamberId()+1 << endl;
1213 if (AliLog::GetGlobalDebugLevel() >= 3) newTrack->
RecursiveDump();
1217 delete [] clusterCh1Used;
1221 }
else if (foundOneCluster || foundTwoClusters) {
1228 delete [] clusterCh1Used;
1232 delete [] clusterCh1Used;
1242 AliDebug(1,
"Enter ImproveTracks");
1276 Bool_t trackRemoved = kFALSE;
1287 trackRemoved = kTRUE;
1306 if (!
fkTransformer) AliFatal(
"missing geometry transformer");
1309 Bool_t trackRemoved = kFALSE;
1321 trackRemoved = kTRUE;
1342 for (Int_t iCluster = 0; iCluster < nClusters; iCluster++) {
1358 if (!seg1 || !seg2)
continue;
1362 Double_t gX = cluster->
GetX();
1363 Double_t gY = cluster->
GetY();
1364 Double_t gZ = cluster->
GetZ();
1376 Bool_t hasNonBending = kFALSE;
1377 Bool_t hasBending = kFALSE;
1378 for (Int_t iDigit = 0; iDigit < cluster->
GetNDigits(); iDigit++) {
1380 UInt_t digitId = cluster->
GetDigitId(iDigit);
1382 if (digitId == padId1) {
1385 if (hasNonBending)
break;
1387 }
else if (digitId == padId2) {
1389 hasNonBending = kTRUE;
1390 if (hasBending)
break;
1411 AliCodeTimerAuto(
"",0);
1424 AliCodeTimerAuto(
"",0);
1428 UChar_t gloTrigPat = 0;
1440 while ( ( locTrg = static_cast<AliMUONLocalTrigger*>(next()) ) )
1442 if ( locTrg->IsTrigX() && locTrg->IsTrigY() )
1446 triggerTrackStore.
Add(triggerTrack);
1456 UChar_t globalTriggerPattern)
1461 const Double_t kSqrt12 = TMath::Sqrt(12.);
1463 TMatrixD trigCov(3,3);
1465 Int_t localBoardId = locTrg.
LoCircuit();
1472 Int_t stripX21 = locTrg.
LoStripX()+deviation+1;
1473 Float_t y21 = circuit.
GetY21Pos(localBoardId, stripX21);
1474 Float_t z21 = circuit.
GetZ21Pos(localBoardId, stripX21);
1477 AliDebug(1, Form(
" MakeTriggerTrack %3d %2d %2d %2d (%f %f %f) (%f %f)\n",locTrg.
LoCircuit(),
1480 if (TMath::Abs(z11) < 0.00001)
return kFALSE;
1482 Double_t deltaZ = z11 - z21;
1484 Float_t slopeX = x11/z11;
1485 Float_t slopeY = (y11-y21) / deltaZ;
1492 trigCov(0,0) = kTrigNonBendReso * kTrigNonBendReso + sigmaX * sigmaX;
1493 trigCov(1,1) = kTrigBendReso * kTrigBendReso + sigmaY * sigmaY;
1495 (2. * kTrigBendReso * kTrigBendReso + sigmaY * sigmaY + sigmaY21 * sigmaY21 ) / deltaZ / deltaZ;
1496 trigCov(1,2) = trigCov(2,1) = trigCov(1,1) / deltaZ;
1498 triggerTrack.
SetX11(x11);
1499 triggerTrack.
SetY11(y11);
1500 triggerTrack.
SetZ11(z11);
1501 triggerTrack.
SetZ21(z21);
1507 triggerTrack.SetUniqueID(locTrg.GetUniqueID());
void AskForNewClustersInStation(const AliMUONTrackParam &trackParam, AliMUONVClusterStore &clusterStore, Int_t station)
Bool_t FollowLinearTrackInStation(AliMUONTrack &trackCandidate, const AliMUONVClusterStore &clusterStore, Int_t nextStation)
Base class of a track container.
Virtual class for the MUON track reconstruction.
Int_t GetNClusters() const
return the number of clusters attached to the track
Double_t GetMaxBendingSlope() const
return the maximum value of the bending slope
const AliMpVSegmentation * GetMpSegmentation(Int_t detElemId, AliMp::CathodType cath, Bool_t warn=true) const
virtual Int_t Clusterize(Int_t chamberId, AliMUONVClusterStore &clusterStore, const AliMpArea &area, const AliMUONRecoParam *recoParam=0x0)=0
Find and add clusters from a given region of a given chamber to the store.
Float_t GetY21Pos(Int_t localBoardId, Int_t istrip) const
void ImproveTracks(Bool_t flag)
switch on/off the track improvement and keep the default cut in sigma to apply on cluster (local chi2...
virtual void ImproveTrack(AliMUONTrack &track)=0
Improve the given reconstructed track.
virtual Bool_t MakeMoreTrackCandidates(AliMUONVClusterStore &clusterStore)=0
Make extra track candidates from clusters in stations(1..) 4 and 5.
Double_t GetSigmaCutForTracking() const
return the cut in sigma to apply on cluster (local chi2) and track (global chi2) during tracking ...
static AliMpSegmentation * Instance(Bool_t warn=true)
virtual Double_t GetZ() const =0
Return coordinate Z (cm)
virtual Bool_t RefitTrack(AliMUONTrack &track, Bool_t enableImprovement=kTRUE)=0
Re-fit the given track.
static Int_t NTrackingCh()
Return number of tracking chambers.
virtual Bool_t FinalizeTrack(AliMUONTrack &track)=0
Finalize the given track.
Double_t GetBendingCoor() const
return bending coordinate (cm)
Int_t ClustersInCommon(AliMUONTrack *track, Int_t stMin=0, Int_t stMax=4) const
void ValidateTracksWithTrigger(AliMUONVTrackStore &trackStore, const AliMUONVTriggerTrackStore &triggerTrackStore, const AliMUONVTriggerStore &triggerStore, const AliMUONTrackHitPattern &trackHitPattern)
Double_t TryOneCluster(const AliMUONTrackParam &trackParam, AliMUONVCluster *cluster, AliMUONTrackParam &trackParamAtCluster, Bool_t updatePropagator=kFALSE)
const TMatrixD & GetParameters() const
return track parameters
void RemoveUsedSegments(TClonesArray &segments)
Double_t GetMaxNonBendingDistanceToTrack() const
return the maximum distance to the track to search for compatible cluster(s) in non bending direction...
Double_t GetDefaultNonBendingReso(Int_t iCh) const
Get the default non bending resolution of chamber iCh.
void SetSlopeY(Float_t slopeY)
Set track slope in Y.
void SelectOnTrackSlope(Bool_t flag)
switch on/off the track selection according to their slope (instead of their impact parameter) ...
Interface of a cluster finder for combined tracking.
void DiscardMonoCathodClusters()
void RemoveIdenticalTracks()
virtual Bool_t ComplementTracks(const AliMUONVClusterStore &clusterStore)=0
Complement the reconstructed tracks.
virtual Int_t GetSize() const =0
The number of objects stored.
virtual Bool_t Add(TObject *object)
Add.
virtual Double_t GetErrX() const =0
Return resolution (cm) on coordinate X.
Double_t GetZ() const
return Z coordinate (cm)
A rectangle area positioned in plane..
Float_t GetZ11Pos(Int_t localBoardId, Int_t istrip) const
Track parameters in ALICE dimuon spectrometer.
static Double_t TriggerBendingReso()
Return default trigger chamber resolution DUE TO ALIGNMENT ONLY in bending direction.
Class with MUON reconstruction parameters.
Bool_t IsAcceptable(AliMUONTrackParam &trackParam)
virtual Double_t GetErrX2() const =0
Return resolution**2 (cm**2) on coordinate X.
AliMpDetElement * GetDetElement(Int_t detElemId, Bool_t warn=true) const
TObject * First() const
Return the first element of the pair.
Reconstructed trigger track in ALICE dimuon spectrometer.
The class defines the electronics properties of detection element.
Bool_t TryOneClusterFast(const AliMUONTrackParam &trackParam, const AliMUONVCluster *cluster)
virtual void SetErrXY(Double_t errX, Double_t errY)=0
Set resolution (cm) on coordinates (X,Y)
Int_t LoStripY() const
Return Y strip in MT11.
Double_t GetMaxBendingDistanceToTrack() const
return the maximum distance to the track to search for compatible cluster(s) in bending direction ...
void AskForNewClustersInChamber(const AliMUONTrackParam &trackParam, AliMUONVClusterStore &clusterStore, Int_t chamber)
Bool_t TriggerToTrack(const AliMUONTriggerCircuit &circuit, const AliMUONLocalTrigger &locTrg, AliMUONTriggerTrack &triggerTrack, UChar_t globalTriggerPattern=0)
Base class of a trigger information store.
Double_t GetInverseBendingMomentum() const
return inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) ...
Double_t GetBendingVertexDispersion() const
return the vertex dispersion (cm) in bending plane
Float_t GetZ21Pos(Int_t localBoardId, Int_t istrip) const
Double_t TryTwoClustersFast(const AliMUONTrackParam &trackParamAtCluster1, AliMUONVCluster *cluster2, AliMUONTrackParam &trackParamAtCluster2)
virtual TIterator * CreateIterator() const
Create iterator (on local card)
Double_t GetMonoCathodClBendingRes() const
Get the bending resolution of mono-cathod clusters when the bending plane is missing.
Int_t GetManuChannel() const
virtual UInt_t GetDigitId(Int_t i) const =0
Return Id of digits i.
void SetLoTrgNum(Int_t loTrgNum)
Set local trigger number.
const AliMUONRecoParam * GetRecoParam() const
Return reco parameters.
virtual void Print(Option_t *option="") const
static AliMpDDLStore * Instance(Bool_t warn=true)
Double_t GetBendingSlope() const
return bending slope (cm ** -1)
Int_t LoStripX() const
Return X strip in MT11.
abstract base class for clusters
void SetSlopeX(Float_t slopeX)
Set track slope in X.
Reconstructed Local Trigger object.
AliMUONVClusterServer * fClusterServer
reference to our cluster server
virtual Bool_t MakeTrackCandidates(AliMUONVClusterStore &clusterStore)=0
Make track candidates from clusters in stations(1..) 4 and 5.
Double_t GetGlobalChi2() const
return the minimum value of the function minimized by the fit
Float_t GetY11Pos(Int_t localBoardId, Int_t istrip) const
Class for the MUON track hit pattern.
void SetClusterPtr(AliMUONVCluster *cluster, Bool_t owner=kFALSE)
void SetZ21(Float_t z)
Set z position of fired X strip in MC21.
TObject * Second() const
Return the second element of the pair.
Bool_t FollowLinearTrackInChamber(AliMUONTrack &trackCandidate, const AliMUONVClusterStore &clusterStore, Int_t nextChamber)
void AddTrackParamAtCluster(const AliMUONTrackParam &trackParam, AliMUONVCluster &cluster, Bool_t copy=kFALSE)
void ComplementTracks(Bool_t flag)
switch on/off the completion of reconstructed track
virtual Double_t GetErrY() const =0
Return resolution (cm) on coordinate Y.
Double_t * fMaxMCSAngle2
maximum angle dispersion due to MCS
TClonesArray * MakeSegmentsBetweenChambers(const AliMUONVClusterStore &clusterStore, Int_t ch1, Int_t ch2)
virtual Int_t GetNDigits() const =0
Return number of associated digits.
Interface of a cluster container.
virtual Bool_t FollowTracks(AliMUONVClusterStore &clusterStore)=0
Follow tracks in stations(1..) 3, 2 and 1.
Double_t GetMaxNonBendingSlope() const
return the maximum value of the non bending slope
Double_t GetDefaultBendingReso(Int_t iCh) const
Get the default bending resolution of chamber iCh.
virtual AliMUONGlobalTrigger * Global() const =0
Return global trigger.
void ChangeMonoCathodClusterRes(AliMUONTrack &track)
virtual TIterator * CreateChamberIterator(Int_t firstChamberId, Int_t lastChamberId) const =0
Return an iterator to loop over the store in the given chamber range.
void TagConnectedTracks(Int_t stMin, Int_t stMax, Bool_t all)
Base class of a trigger track store.
virtual Double_t GetErrY2() const =0
Return resolution**2 (cm**2) on coordinate Y.
Int_t GetDeviation() const
void RemoveConnectedTracks(Int_t stMin, Int_t stMax, Bool_t all)
void ExecuteValidation(const AliMUONVTrackStore &trackStore, const AliMUONVTriggerTrackStore &triggerTrackStore, const AliMUONVTriggerStore &triggerStore) const
void SetX11(Float_t x)
Set x position of fired Y strip in MC11.
static UInt_t BuildUniqueID(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode)
Bool_t IsValid() const
Return validity.
static Int_t GetChamberId(UInt_t uniqueID)
Return chamber id (0..), part of the uniqueID.
void Connected(Bool_t flag=kTRUE)
set the flag which is kTRUE if that track shares cluster(s) with another
void SetInverseBendingMomentum(Double_t inverseBendingMomentum)
set inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) ...
virtual Double_t GetY() const =0
Return coordinate Y (cm)
virtual AliMpPad PadByPosition(Double_t x, Double_t y, Bool_t warning=true) const =0
Find pad by position.
AliMp::CathodType GetCathodType(AliMp::PlaneType planeType) const
The abstract base class for the segmentation.
UChar_t GetGlobalResponse() const
virtual ~AliMUONVTrackReconstructor()
static Float_t * DefaultChamberZ()
Return pointer to array of positions.
void RequestStation(Int_t iSt, Bool_t flag)
request or not at least one cluster in the station to validate the track
Double_t GetNonBendingCoor() const
return non bending coordinate (cm)
void RemoveDoubleTracks()
void SetRemovable(Bool_t removable)
set the flag telling whether the associated cluster can be removed from the track it belongs to or no...
AliMUONVCluster * GetClusterPtr() const
get pointeur to associated cluster
Int_t fNRecTracks
number of reconstructed tracks
static Double_t ChamberThicknessInX0(Int_t chId)
Return chamber thickness in X0.
void SetY11(Float_t y)
Set y position of fired X strip in MC11.
Class which encapsuate all information about a pad.
Float_t GetY11Width(Int_t localBoardId, Int_t istrip) const
static Int_t GetDetElemId(UInt_t uniqueID)
Return detection element id, part of the uniqueID.
virtual Double_t GetX() const =0
Return coordinate X (cm)
void SetZ11(Float_t z)
Set z position of fired X strip in MC11.
void RecursiveDump(void) const
void EventReconstructTrigger(const AliMUONTriggerCircuit &triggerCircuit, const AliMUONVTriggerStore &triggerStore, AliMUONVTriggerTrackStore &triggerTrackStore)
static Double_t TriggerNonBendingReso()
Return default trigger chamber resolution DUE TO ALIGNMENT ONLY in non bending direction.
Reconstructed track in ALICE dimuon spectrometer.
Bool_t IsImproved() const
return kTRUE if the track has been improved
void SetCovariances(const TMatrixD &covariances)
virtual Bool_t Add(TObject *object)
Add an object, if of the right type.
Float_t GetY21Width(Int_t localBoardId, Int_t istrip) const
void SetGTPattern(UChar_t pat)
Set Global trigger pattern (do not work with static statement)
const AliMUONGeometryTransformer * fkTransformer
! geometry transformer (not owner)
const TMatrixD & GetCovariances() const
void EventReconstruct(AliMUONVClusterStore &clusterStore, AliMUONVTrackStore &trackStore)
Int_t LoCircuit() const
Return Circuit number.
TClonesArray * fRecTracksPtr
pointer to array of reconstructed tracks
The equivalent of a std::pair<TObject*,TObject*> ;-)
Float_t GetX11Pos(Int_t localBoardId, Int_t istrip) const
static Double_t MaxChi2()
return the maximum chi2 above which the track can be considered as abnormal (due to extrapolation fai...
Float_t GetX11Width(Int_t localBoardId, Int_t istrip) const
TObjArray * GetTrackParamAtCluster() const
void SetGlobalChi2(Double_t chi2)
set the minimum value of the function minimized by the fit
Double_t GetNonBendingSlope() const
return non bending slope (cm ** -1)