//-------------------------------------------------------------------------
// Implementation of the cascade vertexer class
-//
+// Reads V0s and tracks, writes out cascade vertices
+// Fills the ESD with the cascades
// Origin: Christian Kuhn, IReS, Strasbourg, christian.kuhn@ires.in2p3.fr
//-------------------------------------------------------------------------
#include <TObjArray.h>
#include "AliESD.h"
#include "AliESDv0.h"
-#include "AliESDcascade.h"
#include "AliCascadeVertex.h"
#include "AliCascadeVertexer.h"
#include "AliITStrackV2.h"
TObjArray trks(ntr);
for (i=0; i<ntr; i++) {
AliESDtrack *esdtr=event->GetTrack(i);
+ Int_t status=esdtr->GetStatus();
+
+ if ((status&AliESDtrack::kITSrefit)==0)
+ if ((status&AliESDtrack::kITSout)!=0 || (status&AliESDtrack::kITSin)==0)
+ continue;
+
AliITStrackV2 *iotrack=new AliITStrackV2(*esdtr);
- iotrack->PropagateTo(3.,0.0023,65.19); iotrack->PropagateTo(2.5,0.,0.);
+ if ((status&AliESDtrack::kITSrefit)==0) //correction for the beam pipe
+ iotrack->PropagateTo(3.,0.0023,65.19); //material
+ iotrack->PropagateTo(2.5,0.,0.);
trks.AddLast(iotrack);
}
//------------------------------------------------------------------
// Cascade Vertexer Class
-//
+// Reads V0s and tracks, writes out cascade vertices
// Origin: Christian Kuhn, IReS, Strasbourg, christian.kuhn@ires.in2p3.fr
//------------------------------------------------------------------
return 1;
}
rl->LoadgAlice();
- if (rl->GetAliRun())
+ if (rl->GetAliRun())
AliKalmanTrack::
SetConvConst(1000/0.299792458/rl->GetAliRun()->Field()->SolenoidField());
else {
cerr<<"AliITSComparisonV2.C :Can't get AliRun !\n";
return 1;
}
- rl->UnloadgAlice();
+ //rl->UnloadgAlice();
AliITSLoader* itsl = (AliITSLoader*)rl->GetLoader("ITSLoader");
if (itsl == 0x0) {
- cerr<<"AliITSComparisonV2.C : Can not find TPCLoader\n";
+ cerr<<"AliITSComparisonV2.C : Can not find ITSLoader\n";
delete rl;
return 3;
}
const char* evfoldname = AliConfig::fgkDefaultEventFolderName
);//declaration only
- Int_t nentr=0; TObjArray tarray(2000);
- {/* Load tracks */
- itsl->LoadTracks();
- TTree *tracktree=itsl->TreeT();
- if (!tracktree) {cerr<<"Can't get a tree with ITS tracks !\n"; return 4;}
- TBranch *tbranch=tracktree->GetBranch("tracks");
- nentr=(Int_t)tracktree->GetEntries();
-
- for (Int_t i=0; i<nentr; i++) {
- AliITStrackV2 *iotrack=new AliITStrackV2;
- tbranch->SetAddress(&iotrack);
- tracktree->GetEvent(i);
- tarray.AddLast(iotrack);
- }
- itsl->UnloadTracks();
- }
-
/* Generate a list of "good" tracks */
GoodTrackITS gt[MAX];
Int_t ngood=0;
out.close();
}
+ Int_t nentr=0; TObjArray tarray(2000);
+ {/* Load tracks */
+ itsl->LoadTracks();
+ TTree *tracktree=itsl->TreeT();
+ if (!tracktree) {cerr<<"Can't get a tree with ITS tracks !\n"; return 4;}
+ TBranch *tbranch=tracktree->GetBranch("tracks");
+ nentr=(Int_t)tracktree->GetEntries();
+
+ for (Int_t i=0; i<nentr; i++) {
+ AliITStrackV2 *iotrack=new AliITStrackV2;
+ tbranch->SetAddress(&iotrack);
+ tracktree->GetEvent(i);
+ tarray.AddLast(iotrack);
+ }
+ itsl->UnloadTracks();
+ }
+
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.);
Int_t good_tracks_its(GoodTrackITS *gt, const Int_t max, const char* evfoldname) {
AliRunLoader* rl = AliRunLoader::GetRunLoader(evfoldname);
if (rl == 0x0) {
- ::Fatal("AliTPCComparison.C::good_tracks_its",
+ ::Fatal("AliITSComparisonV2.C::good_tracks_its",
"Can not find Run Loader in Folder Named %s",
evfoldname);
}
AliITSLoader* itsl = (AliITSLoader*)rl->GetLoader("ITSLoader");
if (itsl == 0x0) {
- cerr<<"AliITSComparisonV2.C : Can not find TPCLoader\n";
+ cerr<<"AliITSComparisonV2.C : Can not find ITSLoader\n";
delete rl;
return 3;
}
//-------------------------------------------------------------------------
// Implementation of the ITS tracker class
-//
+// It reads AliITSclusterV2 clusters and creates AliITStrackV2 tracks
+// and fills with them the ESD
// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
// dEdx analysis by: Boris Batyunya, JINR, Boris.Batiounia@cern.ch
//-------------------------------------------------------------------------
ClassImp(AliITStrackerV2)
-AliITStrackerV2::AliITSlayer AliITStrackerV2::fLayers[kMaxLayer]; // ITS layers
+AliITStrackerV2::AliITSlayer AliITStrackerV2::fgLayers[kMaxLayer]; // ITS layers
AliITStrackerV2::AliITStrackerV2(const AliITSgeom *geom) : AliTracker() {
//--------------------------------------------------------------------
r += TMath::Sqrt(x*x + y*y);
r*=0.25;
- new (fLayers+i-1) AliITSlayer(r,poff,zoff,nlad,ndet);
+ new (fgLayers+i-1) AliITSlayer(r,poff,zoff,nlad,ndet);
for (Int_t j=1; j<nlad+1; j++) {
for (Int_t k=1; k<ndet+1; k++) { //Fill this layer with detectors
Double_t cp=TMath::Cos(phi), sp=TMath::Sin(phi);
Double_t r=x*cp+y*sp;
- AliITSdetector &det=fLayers[i-1].GetDetector((j-1)*ndet + k-1);
+ AliITSdetector &det=fgLayers[i-1].GetDetector((j-1)*ndet + k-1);
new(&det) AliITSdetector(r,phi);
}
}
Int_t j=0;
for (Int_t i=0; i<kMaxLayer; i++) {
- Int_t ndet=fLayers[i].GetNdetectors();
- Int_t jmax = j + fLayers[i].GetNladders()*ndet;
+ Int_t ndet=fgLayers[i].GetNdetectors();
+ Int_t jmax = j + fgLayers[i].GetNladders()*ndet;
for (; j<jmax; j++) {
if (!cTree->GetEvent(j)) continue;
Int_t ncl=clusters->GetEntriesFast();
while (ncl--) {
AliITSclusterV2 *c=(AliITSclusterV2*)clusters->UncheckedAt(ncl);
- fLayers[i].InsertCluster(new AliITSclusterV2(*c));
+ fgLayers[i].InsertCluster(new AliITSclusterV2(*c));
}
clusters->Delete();
}
- fLayers[i].ResetRoad(); //road defined by the cluster density
+ fgLayers[i].ResetRoad(); //road defined by the cluster density
}
return 0;
//--------------------------------------------------------------------
//This function unloads ITS clusters
//--------------------------------------------------------------------
- for (Int_t i=0; i<kMaxLayer; i++) fLayers[i].ResetClusters();
+ for (Int_t i=0; i<kMaxLayer; i++) fgLayers[i].ResetClusters();
}
static Int_t CorrectForDeadZoneMaterial(AliITStrackV2 *t) {
fTrackToFollow.SetLabel(t->GetLabel());
fTrackToFollow.CookdEdx();
CookLabel(&fTrackToFollow,0.); //For comparison only
+
+ fTrackToFollow.PropagateTo(3.,0.0028,65.19); //The beam pipe
+ fTrackToFollow.PropagateToVertex();
+
fTrackToFollow.UpdateESDtrack(AliESDtrack::kITSrefit);
UseClusters(&fTrackToFollow);
ntrk++;
//--------------------------------------------------------------------
Int_t l=(index & 0xf0000000) >> 28;
Int_t c=(index & 0x0fffffff) >> 00;
- return fLayers[l].GetCluster(c);
+ return fgLayers[l].GetCluster(c);
}
while (fI>fLastLayerToTrackTo) {
Int_t i=fI-1;
- AliITSlayer &layer=fLayers[i];
+ AliITSlayer &layer=fgLayers[i];
AliITStrackV2 &track=fTracks[i];
Double_t r=layer.GetR();
if (i==3 || i==1) {
- Double_t rs=0.5*(fLayers[i+1].GetR() + r);
+ Double_t rs=0.5*(fgLayers[i+1].GetR() + r);
Double_t d=0.0034, x0=38.6;
if (i==1) {rs=9.; d=0.0097; x0=42;}
if (!fTrackToFollow.PropagateTo(rs,d,x0)) {
//
// dEdx analysis by: Boris Batyunya, JINR, Boris.Batiounia@cern.ch
//--------------------------------------------------------------------
- AliITSlayer &layer=fLayers[fI];
+ AliITSlayer &layer=fgLayers[fI];
ResetTrackToFollow(fTracks[fI]);
Double_t dz=7*TMath::Sqrt(fTrackToFollow.GetSigmaZ2() + kSigmaZ2[fI]);
Double_t d=0.0028*3*3; //beam pipe
Double_t x0=0;
- Double_t xn=fLayers[fI].GetR();
+ Double_t xn=fgLayers[fI].GetR();
for (Int_t i=0; i<fI; i++) {
- Double_t xi=fLayers[i].GetR();
- d+=fLayers[i].GetThickness(y,z,x0)*xi*xi;
+ Double_t xi=fgLayers[i].GetR();
+ d+=fgLayers[i].GetThickness(y,z,x0)*xi*xi;
}
if (fI>1) {
}
if (fI>3) {
- Double_t xi=0.5*(fLayers[3].GetR()+fLayers[4].GetR());
+ Double_t xi=0.5*(fgLayers[3].GetR()+fgLayers[4].GetR());
d+=0.0034*xi*xi;
}
}
for (Int_t i=from; i != to; i += step) {
- AliITSlayer &layer=fLayers[i];
+ AliITSlayer &layer=fgLayers[i];
Double_t r=layer.GetR();
{
Double_t hI=i-0.5*step;
if (TMath::Abs(hI-1.5)<0.01 || TMath::Abs(hI-3.5)<0.01) {
- Double_t rs=0.5*(fLayers[i-step].GetR() + r);
+ Double_t rs=0.5*(fgLayers[i-step].GetR() + r);
Double_t d=0.0034, x0=38.6;
if (TMath::Abs(hI-1.5)<0.01) {rs=9.; d=0.0097; x0=42;}
if (!t->PropagateTo(rs,-step*d,x0)) {
-#ifndef ALIITSTRACKER_H
-#define ALIITSTRACKER_H
+#ifndef ALIITSTRACKERV2_H
+#define ALIITSTRACKERV2_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
//-------------------------------------------------------------------------
// ITS tracker
-//
-// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+// reads AliITSclusterV2 clusters and creates AliITStrackV2 tracks
+// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
//-------------------------------------------------------------------------
#include "AliTracker.h"
#include "AliITSrecoV2.h"
new(&fTrackToFollow) AliITStrackV2(t);
}
Int_t fI; // index of the current layer
- static AliITSlayer fLayers[kMaxLayer]; // ITS layers
+ static AliITSlayer fgLayers[kMaxLayer];// ITS layers
AliITStrackV2 fTracks[kMaxLayer]; // track estimations at the ITS layers
AliITStrackV2 fBestTrack; // "best" track
AliITStrackV2 fTrackToFollow; // followed track
//-------------------------------------------------------------------------
// Implementation of the V0 vertexer class
-//
+// reads tracks writes out V0 vertices
+// fills the ESD with the V0s
// Origin: Iouri Belikov, IReS, Strasbourg, Jouri.Belikov@cern.ch
//-------------------------------------------------------------------------
#include <TObjArray.h>
AliITStrackV2 *iotrack=new AliITStrackV2(*esd);
iotrack->SetLabel(i); // now it is the index in array of ESD tracks
- iotrack->PropagateTo(3.,0.0023,65.19);
+ if ((status&AliESDtrack::kITSrefit)==0) //correction for the beam pipe
+ iotrack->PropagateTo(3.,0.0023,65.19); //material
iotrack->PropagateTo(2.5,0.,0.);
if (iotrack->Get1Pt() > 0.) {nneg++; negtrks.AddLast(iotrack);}
return 0;
}
-Double_t AliV0vertexer::PropagateToDCA(AliITStrackV2 *n, AliITStrackV2 *p) {
+Double_t
+AliV0vertexer::PropagateToDCA(AliITStrackV2 *n, AliITStrackV2 *p) const {
//--------------------------------------------------------------------
// This function returns the DCA between two tracks
// The tracks will be moved to the point of DCA !
//------------------------------------------------------------------
// V0 Vertexer Class
-//
+// reads tracks writes out V0 vertices
// Origin: Iouri Belikov, IReS, Strasbourg, Jouri.Belikov@cern.ch
//------------------------------------------------------------------
Int_t Tracks2V0vertices(AliESD *event);
Int_t Tracks2V0vertices(TTree *in, TTree *out);
- Double_t PropagateToDCA(AliITStrackV2 *nt, AliITStrackV2 *pt);
+ Double_t PropagateToDCA(AliITStrackV2 *nt, AliITStrackV2 *pt) const;
void GetCuts(Double_t cuts[7]) const;
- void GetVertex(Double_t *vtx) { vtx[0]=fX; vtx[1]=fY; vtx[2]=fZ; }
+ void GetVertex(Double_t *vtx) const { vtx[0]=fX; vtx[1]=fY; vtx[2]=fZ; }
private: