1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 //-- --- standard headers-------------
4 //--------Root headers ---------------
7 #include <TStopwatch.h>
10 //----- AliRoot headers ---------------
14 #include "AliKalmanTrack.h"
15 #include "AliITSVertex.h"
16 #include "AliITSVertexer.h"
17 #include "AliITSVertexerTracks.h"
18 //-------------------------------------
20 void AliITSVertexerTracksTest(Int_t evFirst=0,Int_t evLast=0,
21 const Char_t *galiceName="galice.root",
22 const Char_t *trksName="AliITStracksV2.root",
23 const Char_t *vtxName="AliITSVertices.root") {
24 /*******************************************************************
26 * Test macro for vertexing in pp using tracks. *
27 * Input file must contain trees with AliITStrackV2 objects. *
28 * Output file can be the same file with the tracks *
30 * If the file galice.root is available, B is taken from there, *
31 * otherwise is can be set here "by hand". *
33 * Origin: A.Dainese, Padova andrea.dainese@pd.infn.it *
34 *******************************************************************/
36 // Look for field value in galice.root
38 if(!gSystem->AccessPathName(galiceName,kFileExists)) {
39 TFile *galice = new TFile(galiceName);
40 gAlice = (AliRun*)galice->Get("gAlice");
41 AliMagF *fiel = (AliMagF*)gAlice->Field();
42 field=(Double_t)fiel->SolenoidField()/10.;
43 AliKalmanTrack::SetConvConst(100/0.299792458/field);
44 printf(" B = %3.1f read from gAlice and set\n",field);
50 printf(" File galice.root not found: default 0.4 T being used!\n");
53 // Open input and output files
54 TFile *inFile = TFile::Open(trksName);
55 TFile *outFile = TFile::Open(vtxName,"recreate");
58 AliITSVertexerTracks *vertexer =
59 new AliITSVertexerTracks(inFile,outFile,field);
60 vertexer->SetFirstEvent(evFirst);
61 vertexer->SetLastEvent(evLast);
62 vertexer->SetDebug(0);
63 vertexer->SetUseThrustFrame(0);
64 vertexer->PrintStatus();
66 vertexer->FindVertices();