// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
//-------------------------------------------------------------------------
#include <Rtypes.h>
-#include <iostream.h>
//namespace AliITSreco {
const Int_t kMaxClusterPerLayer=3500*10;
const Double_t kSigmaYV=0.005e+0;
const Double_t kSigmaZV=0.010e+0;
-
- const Double_t kConvConst=100/0.299792458/0.2;
//}
//using namespace AliITSreco;
Int_t AliITStestV2() {
Int_t rc=0;
+ if (gAlice) {delete gAlice; gAlice=0;}
+ TFile *in=TFile::Open("galice.root");
+ if (!in->IsOpen()) {
+ cerr<<"Can't open galice.root !\n";
+ return 1;
+ }
+ if (!(gAlice=(AliRun*)in->Get("gAlice"))) {
+ cerr<<"Can't find gAlice !\n";
+ return 2;
+ }
+ AliKalmanTrack::SetConvConst(100/0.299792458/0.2/gAlice->Field()->Factor());
+ delete gAlice; gAlice=0;
+ in->Close();
+
gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSFindClustersV2.C");
if (rc=AliITSFindClustersV2()) return rc;
//____________________________________________________________________________
AliITStrackV2::AliITStrackV2(const AliTPCtrack& t) throw (const Char_t *) {
//------------------------------------------------------------------
- //Convertion TPC track -> ITS track
+ //Conversion TPC track -> ITS track
//------------------------------------------------------------------
SetLabel(t.GetLabel());
SetChi2(0.);
if (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi();
else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
- //Convertion of the track parameters
+ //Conversion of the track parameters
Double_t x,p[5]; t.GetExternalParameters(x,p);
- fX=x; x=kConversionConstant;
+ fX=x; x=GetConvConst();
fP0=p[0];
fP1=p[1];
fP2=p[2];
fP3=p[3];
fP4=p[4]/x;
- //Convertion of the covariance matrix
+ //Conversion of the covariance matrix
Double_t c[15]; t.GetExternalCovariance(c);
fC00=c[0 ];
// This function returns an external representation of the covriance matrix.
// (See comments in AliTPCtrack.h about external track representation)
//-------------------------------------------------------------------------
- Double_t a=kConvConst;
+ Double_t a=GetConvConst();
cc[0 ]=fC00;
cc[1 ]=fC10; cc[2 ]=fC11;
Double_t GetZ() const {return fP1;}
Double_t GetSnp() const {return fP2;}
Double_t GetTgl() const {return fP3;}
- Double_t Get1Pt() const {return fP4*kConvConst;}
+ Double_t Get1Pt() const {return fP4*GetConvConst();}
Double_t GetD() const;
ClassImp(AliKalmanTrack)
+Double_t AliKalmanTrack::fConvConst;
+
class AliKalmanTrack : public TObject {
public:
- AliKalmanTrack() {fLab=-3141593; fChi2=0; fN=0;}
+ AliKalmanTrack() { fLab=-3141593; fChi2=0; fN=0; }
AliKalmanTrack(const AliKalmanTrack &t) {fLab=t.fLab;fChi2=t.fChi2;fN=t.fN;}
virtual ~AliKalmanTrack(){};
void SetLabel(Int_t lab) {fLab=lab;}
Int_t PropagateTo(Double_t xr,Double_t x0,Double_t rho,Double_t pm)=0;
virtual Int_t Update(const AliCluster* c, Double_t chi2, UInt_t i)=0;
+ static void SetConvConst(Double_t cc) {fConvConst=cc;}
+ Double_t GetConvConst() const {return fConvConst;}
+
protected:
void SetChi2(Double_t chi2) {fChi2=chi2;}
void SetNumberOfClusters(Int_t n) {fN=n;}
Double_t fChi2; // total chi2 value for this track
Int_t fN; // number of associated clusters
+ static Double_t fConvConst; //conversion constant cm -> GeV/c
+
ClassDef(AliKalmanTrack,1) // Reconstructed track
};
Int_t good_tracks(GoodTrack *gt, Int_t max);
Int_t AliTPCComparison() {
- Int_t i;
+ cerr<<"Doing comparison...\n";
+ Int_t i;
gBenchmark->Start("AliTPCComparison");
TFile *cf=TFile::Open("AliTPCclusters.root");
}
cerr<<"Number of good tracks : "<<ngood<<endl;
- cerr<<"Doing comparison...\n";
TH1F *hp=new TH1F("hp","PHI resolution",50,-20.,20.); hp->SetFillColor(4);
TH1F *hl=new TH1F("hl","LAMBDA resolution",50,-20,20);hl->SetFillColor(4);
TH1F *hpt=new TH1F("hpt","Relative Pt resolution",30,-10.,10.);
hf->SetFillColor(1); hf->SetFillStyle(3013); hf->SetLineWidth(2);
TH1F *he =new TH1F("he","dE/dX for pions with 0.4<p<0.5 GeV/c",50,0.,100.);
- TH2F *hep=new TH2F("hep","dE/dX vs momentum",50,0.,2.,50,0.,200.);
+ TH2F *hep=new TH2F("hep","dE/dX vs momentum",50,0.,2.,50,0.,250.);
hep->SetMarkerStyle(8);
hep->SetMarkerSize(0.4);
hg->SetXTitle("Pt (GeV/c)");
hg->Draw();
- TLine *line1 = new TLine(0,1.0,7,1.0); line1->SetLineStyle(4);
+ TLine *line1 = new TLine(0.1,1.0,6.1,1.0); line1->SetLineStyle(4);
line1->Draw("same");
- TLine *line2 = new TLine(0,0.9,7,0.9); line2->SetLineStyle(4);
+ TLine *line2 = new TLine(0.1,0.9,6.1,0.9); line2->SetLineStyle(4);
line2->Draw("same");
hf->SetFillColor(1);
Int_t good_tracks(GoodTrack *gt, Int_t max) {
Int_t nt=0;
- TFile *file=TFile::Open("rfio:galice.root");
+ //TFile *file=TFile::Open("rfio:galice.root");
+ TFile *file=TFile::Open("galice.root");
if (!file->IsOpen()) {cerr<<"Can't open galice.root !\n"; exit(4);}
if (!(gAlice=(AliRun*)file->Get("gAlice"))) {
digp->AdjustSectorRow(digits->GetID(),sec,row);
cerr<<sec<<' '<<row<<" \r";
digits->First();
- while (digits->Next()) {
+ 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);
if (idx0>=0 && dig>=zero) count[idx0]+=1;
if (idx1>=0 && dig>=zero) count[idx1]+=1;
if (idx2>=0 && dig>=zero) count[idx2]+=1;
- }
+ } while (digits->Next());
for (Int_t j=0; j<np; j++) {
if (count[j]>1) {
if (sec>=digp->GetNInnerSector())
/*
$Log$
+Revision 1.3 2000/10/05 16:14:01 kowal2
+Forward declarations.
+
Revision 1.2 2000/06/30 12:07:50 kowal2
Updated from the TPC-PreRelease branch
carray.StoreRow(sec,row);
carray.ClearRow(sec,row);
- cerr<<"sector, row, compressed digits, clusters: "
- <<sec<<' '<<row<<' '<<digarr.GetSize()<<' '<<ncl<<" \r";
+ //cerr<<"sector, row, compressed digits, clusters: "
+ //<<sec<<' '<<row<<' '<<digarr.GetSize()<<' '<<ncl<<" \r";
nclusters+=ncl;
gROOT->LoadMacro("$(ALICE_ROOT)/macros/grun.C");
grun();
+ AliKalmanTrack::SetConvConst(100/0.299792458/0.2/gAlice->Field()->Factor());
+
Int_t ver=gAlice->GetDetector("TPC")->IsVersion();
delete gAlice; gAlice=0;
// This function returns an external representation of the covriance matrix.
// (See comments in AliTPCtrack.h about external track representation)
//-------------------------------------------------------------------------
- Double_t a=kConversionConstant;
+ Double_t a=GetConvConst();
Double_t c22=fX*fX*fC33-2*fX*fC32+fC22;
Double_t c42=fX*fC43-fC42;
#include <AliKalmanTrack.h>
#include <TMath.h>
-const Double_t kConversionConstant=100/0.299792458/0.2;
-
class AliTPCClustersArray;
class AliTPCcluster;
Double_t GetY() const {return fP0;}
Double_t GetZ() const {return fP1;}
Double_t GetSnp() const {return fX*fP3 - fP2;}
- Double_t Get1Pt() const {return fP3*kConversionConstant;}
+ Double_t Get1Pt() const {return fP3*GetConvConst();}
Double_t GetTgl() const {return fP4;}
Double_t GetSigmaY2() const {return fC00;}
/*
$Log$
+Revision 1.6 2001/03/13 14:25:47 hristov
+New design of tracking classes (Yu.Belikov)
+
Revision 1.5 2000/12/20 07:51:59 kowal2
Changes suggested by Alessandra and Paolo to avoid overlapped
data fields in encapsulated classes.
iotrack=pt;
tracktree.Fill();
t.UseClusters(&carray,nc);
- cerr<<found++<<'\r';
+ found++;
}
}
}