1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 Revision 1.4 2000/12/22 16:17:15 hristov
18 Updated START code from Alla
20 Revision 1.3 2000/10/02 21:28:13 fca
21 Removal of useless dependecies via forward declarations
23 Revision 1.2 2000/07/13 16:41:29 fca
24 New START corrected for coding conventions
26 Revision 1.1 2000/03/24 17:46:58 alla
31 #include "AliSTARTvertex.h"
32 #include "AliSTARTdigit.h"
33 #include "AliSTARThit.h"
39 #include "TDirectory.h"
41 ClassImp(AliSTARTvertex)
43 AliSTARTvertex::AliSTARTvertex( Int_t * Zposit)
46 // The creator for the AliSTARTvertex class. This routine fills the
47 // AliSTARTvertex data members from the array vertex.
48 // The order of the elements in the vertex array are
49 // fZposition = vertex[0],
52 Zposit = &fZposition ;
55 void AliSTARTvertex::Reconstruct(Int_t evNumber=1)
57 /***************************************************
58 Resonstruct digits to vertex position
59 ****************************************************/
63 char nameTD[8],nameTR[8];
67 AliSTARTdigit *digits;
68 AliSTARTvertex *vertex;
72 // TParticle *particle;
73 digits = new AliSTARTdigit();
74 vertex = new AliSTARTvertex();
76 // Event ------------------------- LOOP
78 sprintf(nameTD,"TreeD%d",evNumber);
79 printf("%s\n",nameTD);
80 TTree *td = (TTree*)gDirectory->Get(nameTD);
81 bd = td->GetBranch("START");
82 bd->SetAddress(&digits);
84 sprintf(nameTR,"TreeR%d",evNumber);
85 TTree *tr = new TTree(nameTR,"START");
86 bRec = tr->Branch("START","AliSTARTvertex",&vertex,buffersize);
87 if(digits->GetTime()!=999999)
89 timediff=digits->GetTime(); //time in number of channels
90 timePs=(timediff-128)*10.; // time in Ps channel_width =10ps
91 Float_t c = 299792458/1.e9; //speed of light cm/ps
92 //Float_t c = 0.3; //speed of light mm/ps
93 Float_t Zposit=timePs*c;// for 0 vertex