-// $Id: AliEmcalAodTrackFilterTask.cxx | Fri Dec 6 10:29:20 2013 +0100 | Constantin Loizides $
//
// Class to filter Aod tracks
//
fTracksOutName("PicoTracks"),
fTracksInName("tracks"),
fIncludeNoITS(kTRUE),
- fCutMaxFrShTPCClus(0.4),
+ fCutMaxFrShTPCClus(0),
fUseNegativeLabels(kTRUE),
fIsMC(kFALSE),
fDoPropagation(kFALSE),
+ fAttemptProp(kFALSE),
+ fAttemptPropMatch(kFALSE),
fDist(440),
+ fTrackEfficiency(0),
fTracksIn(0),
fTracksOut(0)
{
fTracksOutName("PicoTracks"),
fTracksInName("tracks"),
fIncludeNoITS(kTRUE),
- fCutMaxFrShTPCClus(0.4),
+ fCutMaxFrShTPCClus(0),
fUseNegativeLabels(kTRUE),
fIsMC(kFALSE),
fDoPropagation(kFALSE),
+ fAttemptProp(kFALSE),
+ fAttemptPropMatch(kFALSE),
fDist(440),
+ fTrackEfficiency(0),
fTracksIn(0),
fTracksOut(0)
{
if (fCutMaxFrShTPCClus > 0) {
Double_t frac = Double_t(track->GetTPCnclsS()) / Double_t(track->GetTPCncls());
- if (frac > fCutMaxFrShTPCClus)
+ if (frac > fCutMaxFrShTPCClus) {
continue;
+ }
+ }
+
+ if (fTrackEfficiency) {
+ Double_t r = gRandom->Rndm();
+ if (fTrackEfficiency->Eval(track->Pt()) < r)
+ continue;
}
AliAODTrack *newt = new ((*fTracksOut)[nacc]) AliAODTrack(*track);
+ newt->SetUniqueID(0);
+ newt->ResetBit(TObject::kHasUUID);
+ newt->ResetBit(TObject::kIsReferenced);
+
+ Bool_t propthistrack = kFALSE;
if (fDoPropagation)
+ propthistrack = kTRUE;
+ else if (!newt->IsExtrapolatedToEMCAL()) {
+ if (fAttemptProp)
+ propthistrack = kTRUE;
+ else if (fAttemptPropMatch && newt->IsEMCAL())
+ propthistrack = kTRUE;
+ }
+ if (propthistrack)
AliEMCALRecoUtils::ExtrapolateTrackToEMCalSurface(newt,fDist);
+
Int_t label = 0;
if (fIsMC) {
if (fUseNegativeLabels)
if (label == 0)
AliDebug(2,Form("Track %d with label==0", iTracks));
}
+ newt->SetLabel(label);
if (type==0) {
newt->SetBit(BIT(22),0);
newt->SetBit(BIT(23),0);