if (!esdTrack) continue;
if (!IsAccepted(esdTrack)) continue;
if (esdTrack->Pt()<fCutMinTrackPt) continue;
- Double_t phi = esdTrack->Phi()*TMath::RadToDeg();
- if (TMath::Abs(esdTrack->Eta())>0.9 || phi <= 10 || phi >= 250 ) continue;
+
+ if ( TMath::Abs(esdTrack->Eta()) > 0.9 ) continue;
+
+ // Save some time and memory in case of no DCal present
+ if( geom->GetNumberOfSuperModules() < 13 )
+ {
+ Double_t phi = esdTrack->Phi()*TMath::RadToDeg();
+ if ( phi <= 10 || phi >= 250 ) continue;
+ }
+
if (!fITSTrackSA)
trackParam = const_cast<AliExternalTrackParam*>(esdTrack->GetInnerParam()); // if TPC Available
else
if (aodTrack->Pt()<fCutMinTrackPt) continue;
- Double_t phi = aodTrack->Phi()*TMath::RadToDeg();
- if (TMath::Abs(aodTrack->Eta())>0.9 || phi <= 10 || phi >= 250 )
- continue;
+ if ( TMath::Abs(aodTrack->Eta()) > 0.9 ) continue;
+
+ // Save some time and memory in case of no DCal present
+ if( geom->GetNumberOfSuperModules() < 13 )
+ {
+ Double_t phi = aodTrack->Phi()*TMath::RadToDeg();
+ if ( phi <= 10 || phi >= 250 ) continue;
+ }
+
Double_t pos[3],mom[3];
aodTrack->GetXYZ(pos);
aodTrack->GetPxPyPz(mom);
continue;
}
- if (TMath::Abs(eta)>0.75 || (phi) < 70*TMath::DegToRad() || (phi) > 190*TMath::DegToRad()) {
- if (aodevent && trackParam) delete trackParam;
- if (fITSTrackSA && trackParam) delete trackParam;
+ if ( TMath::Abs(eta) > 0.75 )
+ {
+ if ( trackParam && (aodevent || fITSTrackSA) ) delete trackParam;
continue;
}
-
+
+ // Save some time and memory in case of no DCal present
+ if ( geom->GetNumberOfSuperModules() < 13 &&
+ ( phi < 70*TMath::DegToRad() || phi > 190*TMath::DegToRad()))
+ {
+ if ( trackParam && (aodevent || fITSTrackSA) ) delete trackParam;
+ continue;
+ }
+
//Find matched clusters
Int_t index = -1;
Float_t dEta = -999, dPhi = -999;
// This function returns the index of matched cluster to input track
// Returns -1 if no match is found
Int_t index = -1;
- Double_t phiV = track->Phi()*TMath::RadToDeg();
- if (TMath::Abs(track->Eta())>0.9 || phiV <= 10 || phiV >= 250 ) return index;
+
+ if ( TMath::Abs(track->Eta()) > 0.9 ) return index;
+
+ // Save some time and memory in case of no DCal present
+ if( geom->GetNumberOfSuperModules() < 13 )
+ {
+ Double_t phiV = track->Phi()*TMath::RadToDeg();
+ if ( phiV <= 10 || phiV >= 250 ) return index;
+ }
+
AliExternalTrackParam *trackParam = 0;
if (!fITSTrackSA)
trackParam = const_cast<AliExternalTrackParam*>(track->GetInnerParam()); // If TPC
if (fITSTrackSA) delete trackParam;
return index;
}
- if (TMath::Abs(eta)>0.75 || (phi) < 70*TMath::DegToRad() || (phi) > 190*TMath::DegToRad()) {
+
+ if ( TMath::Abs(eta) > 0.75 )
+ {
if (fITSTrackSA) delete trackParam;
return index;
}
+ // Save some time and memory in case of no DCal present
+ if ( geom->GetNumberOfSuperModules() < 13 &&
+ ( phi < 70*TMath::DegToRad() || phi > 190*TMath::DegToRad()))
+ {
+ if (fITSTrackSA) delete trackParam;
+ return index;
+ }
+
TObjArray *clusterArr = new TObjArray(event->GetNumberOfCaloClusters());
for (Int_t icl=0; icl<event->GetNumberOfCaloClusters(); icl++)
track->SetTrackPhiEtaPtOnEMCal(-999, -999, -999);
- if (track->Pt()<minpt)
+ if ( track->Pt() < minpt )
return kFALSE;
- Double_t phi = track->Phi()*TMath::RadToDeg();
- if (TMath::Abs(track->Eta())>0.9 || phi <= 10 || phi >= 250)
- return kFALSE;
+ if ( TMath::Abs(track->Eta()) > 0.9 ) return kFALSE;
+
+ // Save some time and memory in case of no DCal present
+ AliEMCALGeometry* geom = AliEMCALGeometry::GetInstance();
+ if ( geom->GetNumberOfSuperModules() < 13 )
+ {
+ Double_t phi = track->Phi()*TMath::RadToDeg();
+ if ( phi <= 10 || phi >= 250 ) return kFALSE;
+ }
AliESDtrack *esdt = dynamic_cast<AliESDtrack*>(track);
AliAODTrack *aodt = 0;
etaout,
phiout,
ptout);
+
delete trackParam;
- if (!ret)
- return kFALSE;
- if (TMath::Abs(etaout)>0.75 || (phiout<70*TMath::DegToRad()) || (phiout>190*TMath::DegToRad()))
- return kFALSE;
+
+ if (!ret) return kFALSE;
+
+ if ( TMath::Abs(etaout) > 0.75 ) return kFALSE;
+
+ // Save some time and memory in case of no DCal present
+ if ( geom->GetNumberOfSuperModules() < 13 )
+ {
+ if ( (phiout < 70*TMath::DegToRad()) || (phiout > 190*TMath::DegToRad()) ) return kFALSE;
+ }
+
track->SetTrackPhiEtaPtOnEMCal(phiout, etaout, ptout);
+
return kTRUE;
}
//
// Load ESD tracks.
//
-
+
UInt_t mask1 = esd->GetESDRun()->GetDetectorsInDAQ();
UInt_t mask2 = esd->GetESDRun()->GetDetectorsInReco();
Bool_t desc1 = (mask1 >> 3) & 0x1;
Clear("TRACKS");
fTracks = new TObjArray(0);
-
+
Int_t nTracks = esd->GetNumberOfTracks();
//Bool_t isKink=kFALSE;
for (Int_t i = 0; i < nTracks; i++) {
if (esdTrack->GetNcls(1)<fCutNTPC) continue;
//Loose geometric cut
- Double_t phi = esdTrack->Phi()*TMath::RadToDeg();
- if (TMath::Abs(esdTrack->Eta())>0.9 || phi <= 10 || phi >= 250) continue;
+
+ if ( TMath::Abs(esdTrack->Eta()) > 0.9 ) continue;
+
+ // Save some time and memory in case of no DCal present
+
+ if(fGeom->GetNumberOfSuperModules() < 13)
+ {
+ Double_t phi = esdTrack->Phi()*TMath::RadToDeg();
+ if ( phi <= 10 || phi >= 250 ) continue;
+ }
+
fTracks->AddLast(esdTrack);
}
return 1;
}
+ if( !fGeom ) fGeom = AliEMCALGeometry::GetInstance();
+
// step 1: collect clusters
Int_t okLoadClusters = 0;
if (!fClusters || (fClusters && fClusters->IsEmpty()))
}
track->SetTrackPhiEtaPtOnEMCal(phi,eta,pt);
+
+ if ( TMath::Abs(eta) > 0.75 )
+ {
+ if (fITSTrackSA) delete trkParam;
+ return index;
+ }
- if (TMath::Abs(eta)>0.75 || (phi) < 70*TMath::DegToRad() || (phi) > 190*TMath::DegToRad())
+ // Save some time and memory in case of no DCal present
+ if ( fGeom->GetNumberOfSuperModules() < 13 &&
+ ( phi < 70*TMath::DegToRad() || phi > 190*TMath::DegToRad()))
{
if (fITSTrackSA) delete trkParam;
return index;