// only for plane efficiency evaluation
if (AliITSReconstructor::GetRecoParam()->GetComputePlaneEff()) {
- for(Int_t ilay=0;ilay<6;ilay++) {
- if(AliITSReconstructor::GetRecoParam()->GetLayersToSkip(ilay)) {
- if (ilay<2) fPlaneEff = new AliITSPlaneEffSPD();
- else if (ilay<4) fPlaneEff = new AliITSPlaneEffSDD();
- else fPlaneEff = new AliITSPlaneEffSSD();
- break; // only one layer type to skip at once
- }
- }
+ Int_t iplane=AliITSReconstructor::GetRecoParam()->GetIPlanePlaneEff();
+ if(AliITSReconstructor::GetRecoParam()->GetLayersToSkip(iplane))
+ AliWarning(Form("Evaluation of Plane Eff for layer %d will be attempted without removing it from tracker",iplane));
+ if (iplane<2) fPlaneEff = new AliITSPlaneEffSPD();
+ else if (iplane<4) fPlaneEff = new AliITSPlaneEffSDD();
+ else fPlaneEff = new AliITSPlaneEffSSD();
if(AliITSReconstructor::GetRecoParam()->GetReadPlaneEffFromOCDB())
- if(!fPlaneEff->ReadFromCDB())
- {AliWarning("AliITStrackerMI reading of AliITSPlaneEff from OCDB failed") ;}
- if(AliITSReconstructor::GetRecoParam()->GetHistoPlaneEff()) {
- fPlaneEff->SetCreateHistos(kTRUE);
- //fPlaneEff->ReadHistosFromFile();
- }
+ if(!fPlaneEff->ReadFromCDB()) {AliWarning("AliITStrackerMI reading of AliITSPlaneEff from OCDB failed") ;}
+ if(AliITSReconstructor::GetRecoParam()->GetHistoPlaneEff()) fPlaneEff->SetCreateHistos(kTRUE);
}
}
//------------------------------------------------------------------------
cl->GetGlobalXYZ(xyz);
cl->GetGlobalCov(cov);
p.SetXYZ(xyz, cov);
-
+ p.SetCharge(cl->GetQ());
+ p.SetDriftTime(cl->GetDriftTime());
AliGeomManager::ELayerID iLayer = AliGeomManager::kInvalidLayer;
switch (l) {
case 0:
tmpcl.GetGlobalCov(cov);
p.SetXYZ(xyz, cov);
+ p.SetCharge(cl->GetQ());
+ p.SetDriftTime(cl->GetDriftTime());
AliGeomManager::ELayerID iLayer = AliGeomManager::kInvalidLayer;
switch (l) {
(detType==0 && calibSPDdead->IsBad())) // TEMPORARY
{
SetBad();
- printf("lay %d bad %d\n",ilayer,idet);
+ // printf("lay %d bad %d\n",ilayer,idet);
}
// Get segmentation from AliITSDetTypeRec
} else { // no cluster in this layer
if (skip==1) {
modstatus = 3; // skipped
- // Plane Eff determination:
- if (planeeff && AliITSReconstructor::GetRecoParam()->GetLayersToSkip(ilayer)) {
- if (IsOKForPlaneEff(track,ilayer)) // only adequate track for plane eff. evaluation
- UseTrackForPlaneEff(track,ilayer);
+ // Plane Eff determination:
+ if (planeeff && ilayer==AliITSReconstructor::GetRecoParam()->GetIPlanePlaneEff()) {
+ if (IsOKForPlaneEff(track,clusters,ilayer)) // only adequate track for plane eff. evaluation
+ UseTrackForPlaneEff(track,ilayer);
}
} else {
modstatus = 5; // no cls in road
if (fnorm0<0) fnorm0*=-3;
Float_t fnorm1 = normdist[itrack1];
if (fnorm1<0) fnorm1*=-3;
- if (pvertex->GetAnglep()[2]>0.1 || (pvertex->GetRr()<10.5)&& pvertex->GetAnglep()[2]>0.05 || pvertex->GetRr()<3){
+ if ((pvertex->GetAnglep()[2]>0.1) || ( (pvertex->GetRr()<10.5)&& pvertex->GetAnglep()[2]>0.05 ) || (pvertex->GetRr()<3)){
pb0 = TMath::Exp(-TMath::Min(fnorm0,Float_t(16.))/12.);
pb1 = TMath::Exp(-TMath::Min(fnorm1,Float_t(16.))/12.);
}
Double_t point1[3],point2[3];
Double_t phi,cosphi,sinphi,z;
// 0-5 layers, 6 pipe, 7-8 shields
- Double_t rmin[9]={ 3.5, 5.5,13.0,22.0,35.0,41.0, 2.0, 7.5,25.0};
- Double_t rmax[9]={ 5.5, 7.3,17.0,26.0,41.0,47.0, 3.0,10.5,30.0};
+ Double_t rmin[9]={ 3.5, 5.5,13.0,22.0,35.0,41.0, 2.0, 8.0,25.0};
+ Double_t rmax[9]={ 5.5, 8.0,17.0,26.0,41.0,47.0, 3.0,10.5,30.0};
Int_t ifirst=0,ilast=0;
if(material.Contains("Pipe")) {
Float_t dir = (direction.Contains("inward") ? 1. : -1.);
Double_t rToGo=(dir>0 ? AliITSRecoParam::GetrInsidePipe() : AliITSRecoParam::GetrOutsidePipe());
- Double_t xToGo; t->GetLocalXat(rToGo,xToGo);
+ Double_t xToGo;
+ if (!t->GetLocalXat(rToGo,xToGo)) return 0;
Double_t xOverX0,x0,lengthTimesMeanDensity;
Bool_t anglecorr=kTRUE;
Error("CorrectForShieldMaterial"," Wrong shield name\n");
return 0;
}
- Double_t xToGo; t->GetLocalXat(rToGo,xToGo);
+ Double_t xToGo;
+ if (!t->GetLocalXat(rToGo,xToGo)) return 0;
Int_t index=2*fCurrentEsdTrack+shieldindex;
Double_t deltar=(layerindex<2 ? 0.10*r : 0.05*r);
Double_t rToGo=TMath::Sqrt(t->GetX()*t->GetX()+t->GetY()*t->GetY())-deltar*dir;
- Double_t xToGo; t->GetLocalXat(rToGo,xToGo);
+ Double_t xToGo;
+ if (!t->GetLocalXat(rToGo,xToGo)) return 0;
Int_t index=6*fCurrentEsdTrack+layerindex;
return kTRUE;
}
//------------------------------------------------------------------------
-Bool_t AliITStrackerMI::IsOKForPlaneEff(AliITStrackMI* track, Int_t ilayer) const {
+Bool_t AliITStrackerMI::IsOKForPlaneEff(AliITStrackMI* track, const Int_t *clusters, Int_t ilayer) const {
//
// Method to be optimized further:
// Aim: decide whether a track can be used for PlaneEff evaluation
//
// input: AliITStrackMI* track, ilayer= layer number [0,5]
// return: Bool_t -> kTRUE if usable track, kFALSE if not usable.
+//
+ Int_t index[AliITSgeomTGeo::kNLayers];
+ Int_t k;
+ for (k=0; k<AliITSgeomTGeo::GetNLayers(); k++) index[k]=-1;
+ //
+ for (k=0; k<AliITSgeomTGeo::GetNLayers(); k++) {
+ index[k]=clusters[k];
+ }
+
if(!fPlaneEff)
{AliWarning("IsOKForPlaneEff: null pointer to AliITSPlaneEff"); return kFALSE;}
AliITSlayer &layer=fgLayers[ilayer];
Double_t r=layer.GetR();
AliITStrackMI tmp(*track);
+// require a minimal number of cluster in other layers and eventually clusters in closest layers
+ Int_t ncl=0;
+ for(Int_t lay=AliITSgeomTGeo::kNLayers-1;lay>ilayer;lay--) {
+ AliDebug(2,Form("trak=%d lay=%d ; index=%d ESD label= %d",tmp.GetLabel(),lay,
+ tmp.GetClIndex(lay),((AliESDtrack*)tmp.GetESDtrack())->GetLabel())) ;
+ if (tmp.GetClIndex(lay)>0) ncl++;
+ }
+ Bool_t nextout = kFALSE;
+ if(ilayer==AliITSgeomTGeo::kNLayers-1) nextout=kTRUE; // you are already on the outermost layer
+ else nextout = ((tmp.GetClIndex(ilayer+1)>0)? kTRUE : kFALSE );
+ Bool_t nextin = kFALSE;
+ if(ilayer==0) nextin=kTRUE; // you are already on the innermost layer
+ else nextin = ((index[ilayer-1]>=0)? kTRUE : kFALSE );
+ if(ncl<AliITSgeomTGeo::kNLayers-(ilayer+1)-AliITSReconstructor::GetRecoParam()->GetMaxMissingClustersPlaneEff())
+ return kFALSE;
+ if(AliITSReconstructor::GetRecoParam()->GetRequireClusterInOuterLayerPlaneEff() && !nextout) return kFALSE;
+ if(AliITSReconstructor::GetRecoParam()->GetRequireClusterInInnerLayerPlaneEff() && !nextin) return kFALSE;
+ if(tmp.Pt() < AliITSReconstructor::GetRecoParam()->GetMinPtPlaneEff()) return kFALSE;
+ // if(AliITSReconstructor::GetRecoParam()->GetOnlyConstraintPlaneEff() && !tmp.GetConstrain()) return kFALSE;
+
// detector number
Double_t phi,z;
if (!tmp.GetPhiZat(r,phi,z)) return kFALSE;
}
return;
}
-