#include "AliMUONVCluster.h"
#include "AliMUONVClusterStore.h"
#include "AliMUONObjectPair.h"
-#include "AliMUONConstants.h"
#include "AliMUONTrackExtrap.h"
+#include "AliMUONConstants.h"
+#include "AliMUONTrackParam.h"
#include "AliLog.h"
#include <TMath.h>
-#include <TMatrixD.h>
#include <Riostream.h>
ClassImp(AliMUONTrack) // Class implementation in ROOT context
/// \endcond
+
+const Double_t AliMUONTrack::fgkMaxChi2 = 1.e10; ///< maximum chi2 above which the track can be considered as abnormal
+
+
//__________________________________________________________________________
AliMUONTrack::AliMUONTrack()
: TObject(),
fMatchTrigger(-1),
floTrgNum(-1),
fChi2MatchTrigger(0.),
- fTrackID(0),
+ fTrackID(-1),
fTrackParamAtVertex(0x0),
fHitsPatternInTrigCh(0),
fLocalTrigger(0)
fMatchTrigger(-1),
floTrgNum(-1),
fChi2MatchTrigger(0.),
- fTrackID(0),
+ fTrackID(-1),
fTrackParamAtVertex(0x0),
fHitsPatternInTrigCh(0),
fLocalTrigger(0)
paramCov(3,2) = paramCov(2,3);
paramCov(3,3) = ( firstCluster->GetErrY2() + lastCluster->GetErrY2() ) / dZ / dZ;
// Inverse bending momentum (vertex resolution + bending slope resolution + 10% error on dipole parameters+field)
- paramCov(4,4) = ( ( bendingVertexDispersion*bendingVertexDispersion +
- (z1 * z1 * lastCluster->GetErrY2() + z2 * z2 * firstCluster->GetErrY2()) / dZ / dZ) /
- bendingImpact / bendingImpact + 0.1 * 0.1) * inverseBendingMomentum * inverseBendingMomentum ;
- paramCov(2,4) = - z2 * firstCluster->GetErrY2() * inverseBendingMomentum / bendingImpact / dZ;
- paramCov(4,2) = paramCov(2,4);
- paramCov(3,4) = - (z1 * lastCluster->GetErrY2() + z2 * firstCluster->GetErrY2()) * inverseBendingMomentum / bendingImpact / dZ / dZ;
- paramCov(4,3) = paramCov(3,4);
-
- // Set covariances
+ if (AliMUONTrackExtrap::IsFieldON()) {
+ paramCov(4,4) = ( ( bendingVertexDispersion*bendingVertexDispersion +
+ (z1 * z1 * lastCluster->GetErrY2() + z2 * z2 * firstCluster->GetErrY2()) / dZ / dZ) /
+ bendingImpact / bendingImpact + 0.1 * 0.1) * inverseBendingMomentum * inverseBendingMomentum ;
+ paramCov(2,4) = - z2 * firstCluster->GetErrY2() * inverseBendingMomentum / bendingImpact / dZ;
+ paramCov(4,2) = paramCov(2,4);
+ paramCov(3,4) = - (z1 * lastCluster->GetErrY2() + z2 * firstCluster->GetErrY2()) * inverseBendingMomentum / bendingImpact / dZ / dZ;
+ paramCov(4,3) = paramCov(3,4);
+ } else paramCov(4,4) = inverseBendingMomentum*inverseBendingMomentum;
trackParamAtFirstCluster.SetCovariances(paramCov);
// Compute and set track parameters covariances at last cluster
- paramCov(1,0) = - paramCov(1,0);
- paramCov(0,1) = - paramCov(0,1);
- paramCov(3,2) = - paramCov(3,2);
- paramCov(2,3) = - paramCov(2,3);
- paramCov(2,4) = z1 * lastCluster->GetErrY2() * inverseBendingMomentum / bendingImpact / dZ;
- paramCov(4,2) = paramCov(2,4);
+ // Non bending plane
+ paramCov(0,0) = lastCluster->GetErrX2();
+ paramCov(0,1) = - lastCluster->GetErrX2() / dZ;
+ paramCov(1,0) = paramCov(0,1);
+ // Bending plane
+ paramCov(2,2) = lastCluster->GetErrY2();
+ paramCov(2,3) = - lastCluster->GetErrY2() / dZ;
+ paramCov(3,2) = paramCov(2,3);
+ // Inverse bending momentum (vertex resolution + bending slope resolution + 10% error on dipole parameters+field)
+ if (AliMUONTrackExtrap::IsFieldON()) {
+ paramCov(2,4) = z1 * lastCluster->GetErrY2() * inverseBendingMomentum / bendingImpact / dZ;
+ paramCov(4,2) = paramCov(2,4);
+ }
trackParamAtLastCluster.SetCovariances(paramCov);
// Add track parameters at clusters
fMatchTrigger = -1;
floTrgNum = -1;
fChi2MatchTrigger = 0.;
- fTrackID = 0;
+ fTrackID = -1;
fHitsPatternInTrigCh = 0;
fLocalTrigger = 0;
delete fTrackParamAtCluster; fTrackParamAtCluster = 0x0;
}
//__________________________________________________________________________
-void AliMUONTrack::UpdateTrackParamAtCluster()
+Bool_t AliMUONTrack::UpdateTrackParamAtCluster()
{
/// Update track parameters at each attached cluster
+ /// Return kFALSE in case of failure (i.e. extrapolation problem)
if (GetNClusters() == 0) {
AliWarning("no cluster attached to the track");
- return;
+ return kFALSE;
}
+ Bool_t extrapStatus = kTRUE;
AliMUONTrackParam* startingTrackParam = (AliMUONTrackParam*) fTrackParamAtCluster->First();
AliMUONTrackParam* trackParamAtCluster = (AliMUONTrackParam*) fTrackParamAtCluster->After(startingTrackParam);
while (trackParamAtCluster) {
trackParamAtCluster->SetZ(startingTrackParam->GetZ());
// extrapolation to the given z
- AliMUONTrackExtrap::ExtrapToZ(trackParamAtCluster, trackParamAtCluster->GetClusterPtr()->GetZ());
+ if (!AliMUONTrackExtrap::ExtrapToZ(trackParamAtCluster, trackParamAtCluster->GetClusterPtr()->GetZ())) extrapStatus = kFALSE;
// prepare next step
startingTrackParam = trackParamAtCluster;
trackParamAtCluster = (AliMUONTrackParam*) (fTrackParamAtCluster->After(trackParamAtCluster));
}
+ // set global chi2 to max value in case of problem during track extrapolation
+ if (!extrapStatus) SetGlobalChi2(2.*MaxChi2());
+ return extrapStatus;
+
}
//__________________________________________________________________________
-void AliMUONTrack::UpdateCovTrackParamAtCluster()
+Bool_t AliMUONTrack::UpdateCovTrackParamAtCluster()
{
/// Update track parameters and their covariances at each attached cluster
/// Include effects of multiple scattering in chambers
+ /// Return kFALSE in case of failure (i.e. extrapolation problem)
if (GetNClusters() == 0) {
AliWarning("no cluster attached to the track");
- return;
+ return kFALSE;
}
+ Bool_t extrapStatus = kTRUE;
AliMUONTrackParam* startingTrackParam = (AliMUONTrackParam*) fTrackParamAtCluster->First();
AliMUONTrackParam* trackParamAtCluster = (AliMUONTrackParam*) fTrackParamAtCluster->After(startingTrackParam);
Int_t expectedChamber = startingTrackParam->GetClusterPtr()->GetChamberId() + 1;
trackParamAtCluster->SetCovariances(startingTrackParam->GetCovariances());
// add MCS effect
- AliMUONTrackExtrap::AddMCSEffect(trackParamAtCluster,AliMUONConstants::ChamberThicknessInX0(),1.);
+ AliMUONTrackExtrap::AddMCSEffect(trackParamAtCluster,AliMUONConstants::ChamberThicknessInX0(),-1.);
// add MCS in missing chambers if any
currentChamber = trackParamAtCluster->GetClusterPtr()->GetChamberId();
while (currentChamber > expectedChamber) {
// extrapolation to the missing chamber
- AliMUONTrackExtrap::ExtrapToZCov(trackParamAtCluster, AliMUONConstants::DefaultChamberZ(expectedChamber));
+ if (!AliMUONTrackExtrap::ExtrapToZCov(trackParamAtCluster, AliMUONConstants::DefaultChamberZ(expectedChamber))) extrapStatus = kFALSE;
// add MCS effect
- AliMUONTrackExtrap::AddMCSEffect(trackParamAtCluster,AliMUONConstants::ChamberThicknessInX0(),1.);
+ AliMUONTrackExtrap::AddMCSEffect(trackParamAtCluster,AliMUONConstants::ChamberThicknessInX0(),-1.);
expectedChamber++;
}
// extrapolation to the z of the current cluster
- AliMUONTrackExtrap::ExtrapToZCov(trackParamAtCluster, trackParamAtCluster->GetClusterPtr()->GetZ());
+ if (!AliMUONTrackExtrap::ExtrapToZCov(trackParamAtCluster, trackParamAtCluster->GetClusterPtr()->GetZ())) extrapStatus = kFALSE;
// prepare next step
expectedChamber = currentChamber + 1;
trackParamAtCluster = (AliMUONTrackParam*) (fTrackParamAtCluster->After(trackParamAtCluster));
}
+ // set global chi2 to max value in case of problem during track extrapolation
+ if (!extrapStatus) SetGlobalChi2(2.*MaxChi2());
+ return extrapStatus;
+
}
//__________________________________________________________________________
Bool_t AliMUONTrack::IsValid(UInt_t requestedStationMask)
{
- /// check the validity of the current track (at least one cluster per requested station)
+ /// check the validity of the current track:
+ /// at least one cluster per requested station
+ /// and at least 2 chambers in stations 4 & 5 that contain cluster(s)
Int_t nClusters = GetNClusters();
AliMUONTrackParam *trackParam;
- Int_t currentStation(0);
+ Int_t currentCh, currentSt, previousCh = -1, nChHitInSt45 = 0;
UInt_t presentStationMask(0);
+ // first loop over clusters
for (Int_t i = 0; i < nClusters; i++) {
trackParam = (AliMUONTrackParam*) fTrackParamAtCluster->UncheckedAt(i);
- currentStation = trackParam->GetClusterPtr()->GetChamberId()/2;
- presentStationMask |= ( 1 << currentStation );
+
+ currentCh = trackParam->GetClusterPtr()->GetChamberId();
+ currentSt = currentCh/2;
+
+ // build present station mask
+ presentStationMask |= ( 1 << currentSt );
+
+ // count the number of chambers in station 4 & 5 that contain cluster(s)
+ if (currentCh > 5 && currentCh != previousCh) {
+ nChHitInSt45++;
+ previousCh = currentCh;
+ }
+
}
- return ( (requestedStationMask & presentStationMask) == requestedStationMask );
+ return (((requestedStationMask & presentStationMask) == requestedStationMask) && (nChHitInSt45 >= 2));
}
//__________________________________________________________________________
void AliMUONTrack::TagRemovableClusters(UInt_t requestedStationMask) {
/// Identify clusters that can be removed from the track,
- /// with the only requirement to have at least 1 cluster per requested station
+ /// with the only requirements to have at least 1 cluster per requested station
+ /// and at least 2 chambers over 4 in stations 4 & 5 that contain cluster(s)
Int_t nClusters = GetNClusters();
AliMUONTrackParam *trackParam, *nextTrackParam;
- Int_t currentCh, nextCh;
+ Int_t currentCh, nextCh, currentSt, nextSt, previousCh = -1, nChHitInSt45 = 0;
- // reset flags to kFALSE for all clusters in required station
+ // first loop over clusters
for (Int_t i = 0; i < nClusters; i++) {
trackParam = (AliMUONTrackParam*) fTrackParamAtCluster->UncheckedAt(i);
- Int_t stationId = ( 1 << (trackParam->GetClusterPtr()->GetChamberId()/2) );
- UInt_t m = ( 1 << stationId );
- if ( m & requestedStationMask )
- trackParam->SetRemovable(kFALSE);
+
+ currentCh = trackParam->GetClusterPtr()->GetChamberId();
+ currentSt = currentCh/2;
+
+ // reset flags to kFALSE for all clusters in required station
+ if ((1 << currentSt) & requestedStationMask) trackParam->SetRemovable(kFALSE);
else trackParam->SetRemovable(kTRUE);
+
+ // count the number of chambers in station 4 & 5 that contain cluster(s)
+ if (currentCh > 5 && currentCh != previousCh) {
+ nChHitInSt45++;
+ previousCh = currentCh;
+ }
+
}
- // loop over track parameters
+ // second loop over clusters
for (Int_t i = 0; i < nClusters; i++) {
trackParam = (AliMUONTrackParam*) fTrackParamAtCluster->UncheckedAt(i);
currentCh = trackParam->GetClusterPtr()->GetChamberId();
+ currentSt = currentCh/2;
- // loop over next track parameters
- for (Int_t j = i+1; j < nClusters; j++) {
- nextTrackParam = (AliMUONTrackParam*) fTrackParamAtCluster->UncheckedAt(j);
+ // make sure they are more than 2 clusters in 2 different chambers of stations 4 & 5
+ // but 2 clusters in he same chamber will still be flagged as removable
+ if (nChHitInSt45 < 3 && currentSt > 2) {
+
+ if (i == nClusters-1) {
+
+ trackParam->SetRemovable(kFALSE);
+
+ } else {
+
+ nextTrackParam = (AliMUONTrackParam*) fTrackParamAtCluster->UncheckedAt(i+1);
+ nextCh = nextTrackParam->GetClusterPtr()->GetChamberId();
+
+ // set clusters in the same chamber as being removable
+ if (nextCh == currentCh) {
+ trackParam->SetRemovable(kTRUE);
+ nextTrackParam->SetRemovable(kTRUE);
+ i++; // skip cluster already checked
+ } else {
+ trackParam->SetRemovable(kFALSE);
+ }
+
+ }
- nextCh = nextTrackParam->GetClusterPtr()->GetChamberId();
+ } else {
- // check if the 2 clusters are on the same station
- if (nextCh/2 != currentCh/2) break;
+ // skip clusters already flag as removable
+ if (trackParam->IsRemovable()) continue;
- // set clusters in the same station as being removable
- trackParam->SetRemovable(kTRUE);
- nextTrackParam->SetRemovable(kTRUE);
+ // loop over next track parameters
+ for (Int_t j = i+1; j < nClusters; j++) {
+ nextTrackParam = (AliMUONTrackParam*) fTrackParamAtCluster->UncheckedAt(j);
+
+ nextCh = nextTrackParam->GetClusterPtr()->GetChamberId();
+ nextSt = nextCh/2;
+
+ // set clusters in the same station as being removable
+ if (nextSt == currentSt) {
+ trackParam->SetRemovable(kTRUE);
+ nextTrackParam->SetRemovable(kTRUE);
+ i++; // skip cluster already checked
+ }
+
+ }
}
-
+
}
}
/// Compute the chi2 of the track accounting for multiple scattering or not according to the flag
/// - Assume that track parameters at each cluster are corrects
/// - Assume the cluster weights matrices are corrects
- /// - Return negative value if chi2 computation failed
+ /// - Return a value of chi2 higher than the maximum allowed if computation failed
AliDebug(1,"Enter ComputeGlobalChi2");
if (!fTrackParamAtCluster) {
AliWarning("no cluster attached to this track");
- return 1.e10;
+ return 2.*MaxChi2();
}
Double_t chi2 = 0.;
/// Returns the number of clusters in common between the current track ("this")
/// and the track pointed to by "track".
if (!fTrackParamAtCluster || !this->fTrackParamAtCluster) return 0;
+ Int_t nCluster1 = this->GetNClusters();
+ Int_t nCluster2 = track->GetNClusters();
Int_t clustersInCommon = 0;
AliMUONTrackParam *trackParamAtCluster1, *trackParamAtCluster2;
// Loop over clusters of first track
- trackParamAtCluster1 = (AliMUONTrackParam*) this->fTrackParamAtCluster->First();
- while (trackParamAtCluster1) {
+ for(Int_t iCluster1 = 0; iCluster1 < nCluster1; iCluster1++) {
+ trackParamAtCluster1 = (AliMUONTrackParam*) this->fTrackParamAtCluster->UncheckedAt(iCluster1);
// Loop over clusters of second track
- trackParamAtCluster2 = (AliMUONTrackParam*) track->fTrackParamAtCluster->First();
- while (trackParamAtCluster2) {
+ for(Int_t iCluster2 = 0; iCluster2 < nCluster2; iCluster2++) {
+ trackParamAtCluster2 = (AliMUONTrackParam*) track->fTrackParamAtCluster->UncheckedAt(iCluster2);
// Increment "clustersInCommon" if both trackParamAtCluster1 & 2 point to the same cluster
if ((trackParamAtCluster1->GetClusterPtr()) == (trackParamAtCluster2->GetClusterPtr())) {
- clustersInCommon++;
+ clustersInCommon++;
break;
}
- trackParamAtCluster2 = (AliMUONTrackParam*) track->fTrackParamAtCluster->After(trackParamAtCluster2);
- } // trackParamAtCluster2
- trackParamAtCluster1 = (AliMUONTrackParam*) this->fTrackParamAtCluster->After(trackParamAtCluster1);
- } // trackParamAtCluster1
+ }
+ }
+ return clustersInCommon;
+}
+
+ //__________________________________________________________________________
+Int_t AliMUONTrack::ClustersInCommonInSt345(AliMUONTrack* track) const
+{
+ /// Returns the number of clusters in common on stations 3, 4 and 5
+ /// between the current track ("this") and the track pointed to by "track".
+ if (!fTrackParamAtCluster || !this->fTrackParamAtCluster) return 0;
+ Int_t nCluster1 = this->GetNClusters();
+ Int_t nCluster2 = track->GetNClusters();
+ Int_t clustersInCommon = 0;
+ AliMUONTrackParam *trackParamAtCluster1, *trackParamAtCluster2;
+ // Loop over clusters of first track
+ for(Int_t iCluster1 = 0; iCluster1 < nCluster1; iCluster1++) {
+ trackParamAtCluster1 = (AliMUONTrackParam*) this->fTrackParamAtCluster->UncheckedAt(iCluster1);
+ if (trackParamAtCluster1->GetClusterPtr()->GetChamberId() < 4) continue;
+ // Loop over clusters of second track
+ for(Int_t iCluster2 = 0; iCluster2 < nCluster2; iCluster2++) {
+ trackParamAtCluster2 = (AliMUONTrackParam*) track->fTrackParamAtCluster->UncheckedAt(iCluster2);
+ if (trackParamAtCluster2->GetClusterPtr()->GetChamberId() < 4) continue;
+ // Increment "clustersInCommon" if both trackParamAtCluster1 & 2 point to the same cluster
+ if ((trackParamAtCluster1->GetClusterPtr()) == (trackParamAtCluster2->GetClusterPtr())) {
+ clustersInCommon++;
+ break;
+ }
+ }
+ }
return clustersInCommon;
}
+ //__________________________________________________________________________
+Int_t AliMUONTrack::GetNDF() const
+{
+ /// return the number of degrees of freedom
+
+ Int_t ndf = 2 * GetNClusters() - 5;
+ return (ndf > 0) ? ndf : 0;
+}
+
//__________________________________________________________________________
Double_t AliMUONTrack::GetNormalizedChi2() const
{
- /// return the chi2 value divided by the number of degrees of freedom (or 1.e10 if ndf < 0)
+ /// return the chi2 value divided by the number of degrees of freedom (or FLT_MAX if ndf <= 0)
- Double_t numberOfDegFree = (2. * GetNClusters() - 5.);
- if (numberOfDegFree > 0.) return fGlobalChi2 / numberOfDegFree;
- else return fGlobalChi2; // system is under-constraint
+ Double_t ndf = (Double_t) GetNDF();
+ return (ndf > 0.) ? fGlobalChi2 / ndf : 2.*MaxChi2();
}
//__________________________________________________________________________
-Bool_t* AliMUONTrack::CompatibleTrack(AliMUONTrack *track, Double_t sigmaCut) const
+Int_t AliMUONTrack::CompatibleTrack(AliMUONTrack* track, Double_t sigmaCut, Bool_t compatibleCluster[10]) const
{
- /// for each chamber: return kTRUE (kFALSE) if clusters are compatible (not compatible)
+ /// for each chamber: return kTRUE (kFALSE) if clusters are compatible (not compatible).
+ /// nMatchClusters = number of clusters of "this" track matched with one cluster of track "track"
AliMUONTrackParam *trackParamAtCluster1, *trackParamAtCluster2;
AliMUONVCluster *cluster1, *cluster2;
- Double_t chi2, dX, dY, dZ;
+ Double_t chi2, dX, dY;
Double_t chi2Max = sigmaCut * sigmaCut;
- Double_t dZMax = 1.; // 1 cm
- Bool_t *compatibleCluster = new Bool_t[AliMUONConstants::NTrackingCh()];
+ // initialization
+ Int_t nMatchClusters = 0;
for ( Int_t ch = 0; ch < AliMUONConstants::NTrackingCh(); ch++) compatibleCluster[ch] = kFALSE;
- if (!fTrackParamAtCluster || !this->fTrackParamAtCluster) return compatibleCluster;
+ if (!fTrackParamAtCluster || !this->fTrackParamAtCluster) return nMatchClusters;
// Loop over clusters of first track
trackParamAtCluster1 = (AliMUONTrackParam*) this->fTrackParamAtCluster->First();
//prepare next step
trackParamAtCluster2 = (AliMUONTrackParam*) track->fTrackParamAtCluster->After(trackParamAtCluster2);
- // z direction
- dZ = cluster1->GetZ() - cluster2->GetZ();
- if (dZ > dZMax) continue;
+ // check DE Id
+ if (cluster1->GetDetElemId() != cluster2->GetDetElemId()) continue;
- // non bending direction
+ // check local chi2
dX = cluster1->GetX() - cluster2->GetX();
- chi2 = dX * dX / (cluster1->GetErrX2() + cluster2->GetErrX2());
- if (chi2 > chi2Max) continue;
-
- // bending direction
dY = cluster1->GetY() - cluster2->GetY();
- chi2 = dY * dY / (cluster1->GetErrY2() + cluster2->GetErrY2());
- if (chi2 > chi2Max) continue;
+ chi2 = dX * dX / (cluster1->GetErrX2() + cluster2->GetErrX2()) + dY * dY / (cluster1->GetErrY2() + cluster2->GetErrY2());
+ if (chi2 > 2. * chi2Max) continue; // 2 because 2 quantities in chi2
compatibleCluster[cluster1->GetChamberId()] = kTRUE;
+ nMatchClusters++;
break;
}
trackParamAtCluster1 = (AliMUONTrackParam*) this->fTrackParamAtCluster->After(trackParamAtCluster1);
}
- return compatibleCluster;
+ return nMatchClusters;
}
//__________________________________________________________________________
", Match2Trig=" << setw(1) << GetMatchTrigger() <<
", LoTrgNum=" << setw(3) << GetLoTrgNum() <<
", Chi2-tracking-trigger=" << setw(8) << setprecision(5) << GetChi2MatchTrigger();
- cout << Form(" HitTriggerPattern %x",fHitsPatternInTrigCh) << endl;
+ cout << Form(" HitTriggerPattern %x",fHitsPatternInTrigCh);
+ cout << Form(" MClabel=%d",fTrackID) << endl;
if (fTrackParamAtCluster) fTrackParamAtCluster->First()->Print("FULL");
}
}
+//__________________________________________________________________________
+void AliMUONTrack::FindMCLabel()
+{
+ /// Determine the MC label from the label of the attached clusters and fill fMCLabel data member:
+ /// More than 50% of clusters, including 1 before and 1 after the dipole, must share the same label
+
+ Int_t nClusters = GetNClusters();
+ Int_t halfCluster = nClusters/2;
+
+ // reset MC label
+ fTrackID = -1;
+
+ // loop over first clusters (if nClusters left < (nClusters-halfCluster) the conditions cannot be fulfilled)
+ for (Int_t iCluster1 = 0; iCluster1 < nClusters-halfCluster; iCluster1++) {
+ AliMUONVCluster* cluster1 = ((AliMUONTrackParam*) fTrackParamAtCluster->UncheckedAt(iCluster1))->GetClusterPtr();
+
+ // if the first cluster is not on station 1 or 2 the conditions cannot be fulfilled
+ if (cluster1->GetChamberId() > 3) return;
+
+ Int_t label1 = cluster1->GetMCLabel();
+ if (label1 < 0) continue;
+
+ Int_t nIdenticalLabel = 1;
+
+ // Loop over next clusters
+ for (Int_t iCluster2 = iCluster1+1; iCluster2 < nClusters; iCluster2++) {
+ AliMUONVCluster* cluster2 = ((AliMUONTrackParam*) fTrackParamAtCluster->UncheckedAt(iCluster2))->GetClusterPtr();
+
+ if (cluster2->GetMCLabel() != label1) continue;
+
+ nIdenticalLabel++;
+
+ // stop as soon as conditions are fulfilled
+ if (nIdenticalLabel > halfCluster && cluster2->GetChamberId() > 5) {
+ fTrackID = label1;
+ return;
+ }
+
+ }
+
+ }
+
+}
+