fCutAlphaMax(200.0),
fCutAngle(100.0),
fMaxDist(10.0),
+ fCutNITS(3.0),
+ fCutNTPC(20.0),
fRho(1.0),
fX0(1.0),
fTracks(0),
// and all collections to NULL.
// Output file name is set to a default value.
//
-
- InitParameters();
+ InitParameters();
}
//
//------------------------------------------------------------------------------
fCutAlphaMax(copy.fCutAlphaMax),
fCutAngle(copy.fCutAngle),
fMaxDist(copy.fMaxDist),
+ fCutNITS(copy.fCutNITS),
+ fCutNTPC(copy.fCutNTPC),
fRho(copy.fRho),
fX0(copy.fX0),
fTracks((TObjArray*)copy.fTracks->Clone()),
fCutAlphaMax = copy.fCutAlphaMax;
fCutAngle = copy.fCutAngle;
fMaxDist = copy.fMaxDist;
+ fCutNITS = copy.fCutNITS;
+ fCutNTPC = copy.fCutNTPC;
fTracks = (TObjArray*)copy.fTracks->Clone();
fClusters = (TObjArray*)copy.fClusters->Clone();
//
// Check if the instance of AliEMCALRecParam exists,
- const AliEMCALRecParam* recParam = AliEMCALReconstructor::GetRecParam();
+ const AliEMCALRecParam* recParam = new AliEMCALRecParam();
+
if(!recParam){
AliFatal("Reconstruction parameters for EMCAL not set!");
}
fCutAngle = recParam->GetTrkCutAngle();
fCutAlphaMin = recParam->GetTrkCutAlphaMin();
fCutAlphaMax = recParam->GetTrkCutAlphaMax();
-
+ fCutNITS = recParam->GetTrkCutNITS();
+ fCutNTPC = recParam->GetTrkCutNTPC();
+
}
//
//------------------------------------------------------------------------------
// make sure that tracks/clusters collections are empty
Clear("CLUSTERS");
- Int_t start = esd->GetFirstEMCALCluster();
- Int_t nClustersEMC = esd->GetNumberOfEMCALClusters();
+ Int_t start = 0;
+ Int_t nClustersEMC = esd->GetNumberOfCaloClusters();
Int_t end = start + nClustersEMC;
fClusters = new TObjArray(0);
for (i = start; i < end; i++) {
AliESDCaloCluster *cluster = esd->GetCaloCluster(i);
if (!cluster) continue;
- if (cluster->GetClusterType() != AliESDCaloCluster::kEMCALClusterv1) continue;
+ if (!cluster->IsEMCAL()) continue ;
AliEMCALMatchCluster *matchCluster = new AliEMCALMatchCluster(i, cluster);
fClusters->AddLast(matchCluster);
}
trackID = track->GetSeedIndex();
AliESDtrack *esdTrack = esd->GetTrack(trackID);
if (!esdTrack) continue;
+
+ // cut on its and tpc track hits
+ if(esdTrack->GetNcls(0)<=fCutNITS)continue;
+ if(esdTrack->GetNcls(1)<=fCutNTPC)continue;
+
if (TMath::Abs(esdTrack->GetLabel()) == cluster->Label()) {
esdTrack->SetEMCALcluster(cluster->Index());
nGood++;
//
AliEMCALTracker::AliEMCALMatchCluster::AliEMCALMatchCluster(Int_t index, AliEMCALRecPoint *recPoint)
: fIndex(index),
- fLabel(recPoint->GetPrimaryIndex()),
+ fLabel(recPoint->GetPrimaryIndex()), //wrong! fixed below
fX(0.),
fY(0.),
fZ(0.)
fX = clpos.X();
fY = clpos.Y();
fZ = clpos.Z();
+
+ //AliEMCALRecPoint stores the track labels in the parents
+ //list, sorted according to the fractional contribution to the
+ //RecPoint. The zeroth parent gave the highest contribution
+ Int_t multparent = 0;
+ Int_t *parents = recPoint->GetParents(multparent);
+ if(multparent > 0)
+ fLabel = parents[0];
+ else
+ fLabel = -1;
+
}
//
//------------------------------------------------------------------------------