+//__________________________________________________________________
+void AliITSUTrackerGlo::FlagSplitClusters()
+{
+ // set special bit on split clusters using MC info
+ for (int ilr=fITS->GetNLayersActive();ilr--;) {
+ int nsplit=0;
+ AliITSURecoLayer* lr = fITS->GetLayerActive(ilr);
+ for (int isn=lr->GetNSensors();isn--;) {
+ AliITSURecoSens* sens = lr->GetSensor(isn);
+ int nCl = sens->GetNClusters();
+ if (!nCl) continue;
+ int cl0 = sens->GetFirstClusterId();
+ for (int icl=nCl;icl--;) {
+ AliITSUClusterPix *cl = (AliITSUClusterPix*)lr->GetCluster(cl0+icl);
+ for (int icl1=icl;icl1--;) {
+ AliITSUClusterPix *cl1 = (AliITSUClusterPix*)lr->GetCluster(cl0+icl1);
+ if (cl->HasCommonTrack(cl1)) {
+ if (!cl->IsSplit()) nsplit++;
+ if (!cl1->IsSplit()) nsplit++;
+ cl->SetSplit();
+ cl1->SetSplit();
+ }
+ }
+ }
+ }
+ AliInfo(Form("%4d out of %4d clusters are split",nsplit,lr->GetNClusters()));
+ }
+ //
+}
+
+//__________________________________________________________________
+Bool_t AliITSUTrackerGlo::ContainsSplitCluster(const AliITSUSeed* seed, Int_t maxSize)
+{
+ // check if the seed contains split cluster with size < maxSize
+ int lrID,clID;
+ if ( (clID=seed->GetLrCluster(lrID))>=0 ) {
+ AliITSUClusterPix* cl = (AliITSUClusterPix*)fITS->GetLayerActive(lrID)->GetCluster(clID);
+ if (cl->IsSplit() && cl->GetNPix()<maxSize ) return kTRUE;
+ }
+ return seed->GetParent() ? ContainsSplitCluster((AliITSUSeed*)seed->GetParent(),maxSize) : kFALSE;
+ //
+}
+
+//__________________________________________________________________
+void AliITSUTrackerGlo::PrintSeedClusters(const AliITSUSeed* seed, Option_t* option)
+{
+ // print seeds clusters
+ int lrID,clID;
+ if ( (clID=seed->GetLrCluster(lrID))>=0 ) {
+ AliITSUClusterPix* cl = (AliITSUClusterPix*)fITS->GetLayerActive(lrID)->GetCluster(clID);
+ cl->Print(option);
+ }
+ if (seed->GetParent()) PrintSeedClusters((AliITSUSeed*)seed->GetParent(), option);
+ //
+}
+
+#ifdef _FILL_CONTROL_HISTOS_
+//__________________________________________________________________
+void AliITSUTrackerGlo::BookControlHistos()
+{
+ // book special control histos
+ if (!fCHistoArr) { // create control histos
+ const int kNResDef=7;
+ const double kResDef[kNResDef]={0.05,0.05,0.3, 0.05,1,0.5,1.5};
+ fCHistoArr = new TObjArray();
+ fCHistoArr->SetOwner(kTRUE);
+ const double ptMax=10;
+ const double plMax=10;
+ const double chiMax=100;
+ const int nptbins=50;
+ const int nresbins=400;
+ const int nplbins=50;
+ const int nchbins=200;
+ int nblr = fITS->GetNLayersActive();
+ TString ttl;
+ for (int stp=0;stp<kNTrackingPhases;stp++) {
+ for (int ilr=0;ilr<nblr;ilr++) {
+ int hoffs = stp*kHistosPhase + ilr;
+ double mxdf = ilr>=kNResDef ? kResDef[kNResDef-1] : kResDef[ilr];
+ ttl = Form("S%d_residY%d",stp,ilr);
+ TH2F* hdy = new TH2F(ttl.Data(),ttl.Data(),nptbins,0,ptMax,nresbins,-mxdf,mxdf);
+ fCHistoArr->AddAtAndExpand(hdy,hoffs + kHResY);
+ hdy->SetDirectory(0);
+ //
+ ttl = Form("S%d_residYPull%d",stp,ilr);
+ TH2F* hdyp = new TH2F(ttl.Data(),ttl.Data(),nptbins,0,ptMax,nplbins,-plMax,plMax);
+ fCHistoArr->AddAtAndExpand(hdyp,hoffs + kHResYP);
+ hdyp->SetDirectory(0);
+ //
+ ttl = Form("S%d_residZ%d",stp,ilr);
+ TH2F* hdz = new TH2F(ttl.Data(),ttl.Data(),nptbins,0,ptMax,nresbins,-mxdf,mxdf);
+ fCHistoArr->AddAtAndExpand(hdz,hoffs + kHResZ);
+ hdz->SetDirectory(0);
+ //
+ ttl = Form("S%d_residZPull%d",stp,ilr);
+ TH2F* hdzp = new TH2F(ttl.Data(),ttl.Data(),nptbins,0,ptMax,nplbins,-plMax,plMax);
+ hdzp->SetDirectory(0);
+ fCHistoArr->AddAtAndExpand(hdzp,hoffs + kHResZP);
+ //
+ ttl = Form("S%d_chi2Cl%d",stp,ilr);
+ TH2F* hchi = new TH2F(ttl.Data(),ttl.Data(),nptbins,0,ptMax, nchbins,0.,chiMax);
+ hchi->SetDirectory(0);
+ fCHistoArr->AddAtAndExpand(hchi,hoffs + kHChi2Cl);
+ }
+ }
+ }
+ //
+}
+#endif