- Char_t tname[100];
-
- TObjArray itsTracks(15000);
- {/* Read the ITS tracks */
- sprintf(tname,"TreeT_ITS_%d",GetEventNumber());
- TTree *itsTree=(TTree*)out->Get(tname);
- if (!itsTree) {
- Error("RefitInward","can't get a tree with ITS tracks !\n");
- return 3;
- }
- AliITStrackV2 *itrack=new AliITStrackV2;
- itsTree->SetBranchAddress("tracks",&itrack);
- Int_t nits=(Int_t)itsTree->GetEntries();
-
- Info("RefitInward","Number of ITS tracks: %d\n",nits);
-
- for (Int_t i=0; i<nits; i++) {
- itsTree->GetEvent(i);
- Int_t lab=TMath::Abs(itrack->GetLabel());
- if (lab < nLab) {
- if (lut[lab]>=0) Warning("RefitInward","double track %d\n",lab);
- lut[lab]=i;
- } else {
- Warning("RefitInward","Too big ITS track label: %d\n!",lab);
- continue;
- }
- itsTracks.AddLast(new AliITStrackV2(*itrack));
- }
- delete itsTree;
- delete itrack;
- }
-
- out->cd();
-
- //Create the output tree
- sprintf(tname,"TreeT_ITSinward_%d",GetEventNumber());
- TTree outTree(tname,"Tree with inward refitted ITS tracks");
- AliITStrackV2 *otrack=0;
- outTree.Branch("tracks","AliITStrackV2",&otrack,32000,0);
-
- //Get the input tree
- sprintf(tname,"tracksTPC_%d",GetEventNumber());
- TTree *tpcTree=(TTree*)in->Get(tname);
- if (!tpcTree) {
- Error("RefitInward","can't get a tree with TPC tracks !\n");
- return 3;
- }
- AliTPCtrack *itrack=new AliTPCtrack;
- tpcTree->SetBranchAddress("tracks",&itrack);
- Int_t ntpc=(Int_t)tpcTree->GetEntries();
-
- Info("RefitInward","Number of TPC tracks: %d\n",ntpc);
-
- for (i=0; i<ntpc; i++) {
- tpcTree->GetEvent(i);
- try {
- otrack=new AliITStrackV2(*itrack);
- } catch (const Char_t *msg) {
- Warning("RefitInward",msg);
- delete otrack;
- continue;
- }
- //check if this track was reconstructed in the ITS
- Int_t lab=TMath::Abs(otrack->GetLabel());
- if (lab >= nLab) {
- Warning("RefitInward","Too big TPC track label: %d\n!",lab);
- continue;
- }
- Int_t idx=lut[lab];
- if (idx<0) continue; //no prolongation in the ITS for this track
-
- if (CorrectForDeadZoneMaterial(otrack)!=0) {