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.3 2000/10/02 21:28:13 fca
18 Removal of useless dependecies via forward declarations
20 Revision 1.2 2000/07/13 16:41:29 fca
21 New START corrected for coding conventions
23 Revision 1.1 2000/03/24 17:46:58 alla
28 #include "AliSTARTvertex.h"
29 #include "AliSTARTdigit.h"
30 #include "AliSTARThit.h"
36 #include "TDirectory.h"
38 ClassImp(AliSTARTvertex)
40 AliSTARTvertex::AliSTARTvertex( Int_t * Zposit)
43 // The creator for the AliSTARTvertex class. This routine fills the
44 // AliSTARTvertex data members from the array vertex.
45 // The order of the elements in the vertex array are
46 // fZposition = vertex[0],
49 Zposit = &fZposition ;
52 void AliSTARTvertex::Reconstruct(Int_t evNumber=1)
54 /***************************************************
55 Resonstruct digits to vertex position
56 ****************************************************/
60 char nameTD[8],nameTR[8];
64 AliSTARTdigit *digits;
65 AliSTARTvertex *vertex;
70 // TParticle *particle;
71 digits = new AliSTARTdigit();
72 vertex = new AliSTARTvertex();
74 // Event ------------------------- LOOP
76 sprintf(nameTD,"TreeD%d",evNumber);
77 printf("%s\n",nameTD);
78 TTree *td = (TTree*)gDirectory->Get(nameTD);
79 bd = td->GetBranch("START");
80 bd->SetAddress(&digits);
82 sprintf(nameTR,"TreeR%d",evNumber);
83 TTree *tr = new TTree(nameTR,"START");
84 bRec = tr->Branch("START","AliSTARTvertex",&vertex,buffersize,split);
85 if(digits->GetTime()!=999999)
87 timediff=digits->GetTime(); //time in number of channels
88 timePs=(timediff-128)*10.; // time in Ps channel_width =10ps
89 Float_t c = 299792458/1.e9; //speed of light cm/ps
90 //Float_t c = 0.3; //speed of light mm/ps
91 Float_t Zposit=timePs*c;// for 0 vertex