#include<TTree.h>
#include <AliMagF.h>
#include <AliRun.h>
-#include <AliTPCtracker.h>
#include <alles.h>
#endif
// if(gAlice)delete gAlice; COMMENTED BECAUSE OF A BUG (IN COMPILED MODE)
gAlice = (AliRun*)inkin->Get("gAlice");
cout<<"AliRun object found on file "<<gAlice<<endl;
- AliKalmanTrack::SetConvConst(1000/0.299792458/gAlice->Field()->SolenoidField());
+ AliKalmanTrack::SetFieldMap(gAlice->Field());
inkin->Close();
/*
delete gAlice; COMMENTED BECAUSE OF A BUG IN COMPILED MODE
if (!digp) { cerr<<"TPC parameters have not been found !\n"; return 2; }
}
///////////
- AliTPCtracker *tracker =0;
TObjArray tarray(MAX);
AliTPCtrack *iotrack=0;
Int_t nentr= 0;
cout<<"================================================"<<endl;
cout<<"Processing event "<<event<<endl;
cout<<"================================================"<<endl;
- if(kOLD){
- cf->cd();
- tracker = new AliTPCtracker(digp,event);
- tracker->LoadInnerSectors();
- tracker->LoadOuterSectors();
- }
char tname[100];
if (eventn==-1) {
iotrack=new AliTPCtrack;
tbranch->SetAddress(&iotrack);
tracktree->GetEvent(i);
- if(kOLD)tracker->CookLabel(iotrack,0.1);
tarray.AddLast(iotrack);
}
eventptr[event+1] = nentr; //store end of the event
- delete tracker;
delete tracktree;
}
tf->Close();
cerr<<"gAlice have not been found on galice.root !\n";
exit(5);
}
-
+
+ TFile *fdigit = TFile::Open("digits.root");
+ file->cd();
AliTPC *TPC=(AliTPC*)gAlice->GetDetector("TPC");
Int_t ver = TPC->IsVersion();
case 2:
{
sprintf(treeName,"TreeD_75x40_100x60_150x60_%d",event);
- TD=(TTree*)gDirectory->Get(treeName);
+ TD=(TTree*)fdigit->Get(treeName); // To be revised according to
+ // NewIO schema M.Kowalski
TD->GetBranch("Segment")->SetAddress(&digits);
count = new Int_t[np];
Int_t i;
Int_t sec,row;
digp->AdjustSectorRow(digits->GetID(),sec,row);
digits->First();
+ digits->ExpandTrackBuffer();
do { //Many thanks to J.Chudoba who noticed this
Int_t it=digits->CurrentRow(), ip=digits->CurrentColumn();
- Short_t dig = digits->GetDigit(it,ip);
- Int_t idx0=digits->GetTrackID(it,ip,0);
- Int_t idx1=digits->GetTrackID(it,ip,1);
- Int_t idx2=digits->GetTrackID(it,ip,2);
+ // Short_t dig = digits->GetDigit(it,ip);
+ Short_t dig = digits->CurrentDigit();
+
+ Int_t idx0=digits->GetTrackIDFast(it,ip,0)-2;
+ Int_t idx1=digits->GetTrackIDFast(it,ip,1)-2;
+ Int_t idx2=digits->GetTrackIDFast(it,ip,2)-2;
if (idx0>=0 && dig>=zero && idx0<np ) count[idx0]+=1; //background events - higher track ID's
if (idx1>=0 && dig>=zero && idx1<np ) count[idx1]+=1;
if (idx2>=0 && dig>=zero && idx2<np ) count[idx2]+=1;
gt[nt].lab=i;
gt[nt].code=p->GetPdgCode();
gt[nt].px=0.; gt[nt].py=0.; gt[nt].pz=0.;
- gt[nt].x=0.; gt[nt].z=0.; gt[nt].z=0.;
+ gt[nt].x=0.; gt[nt].y=0.; gt[nt].z=0.;
nt++;
if (nt==max) {cerr<<"Too many good tracks !\n"; break;}
cerr<<np-i<<" \r";
for(Int_t iprim = 0; iprim<nparticles; iprim++){ //loop on tracks
part = gAlice->Particle(iprim);
+ Double_t ptot=TMath::Sqrt(part->Px()*part->Px()+part->Py()*part->Py()+part->Pz()*part->Pz());
+ if (ptot<0.01) continue;
char *xxx=strstr(part->GetName(),"XXX");
if(xxx)continue;
if(part->T()>timecut)continue;
- Double_t ptot=TMath::Sqrt(part->Px()*part->Px()+part->Py()*part->Py()+part->Pz()*part->Pz());
+ //Double_t ptot=TMath::Sqrt(part->Px()*part->Px()+part->Py()*part->Py()+part->Pz()*part->Pz());
if(ptot==(TMath::Abs(part->Pz())))continue; // no beam particles
Bool_t prmch = kTRUE; // candidate primary track
return nprch1;
}
-
-
-
-
-