]> git.uio.no Git - u/mrichter/AliRoot.git/blame - START/AliSTARTReconstructor.cxx
OIbsolete includes removed (T.Kuhr)
[u/mrichter/AliRoot.git] / START / AliSTARTReconstructor.cxx
CommitLineData
6740ab97 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
4c475d27 15
88cb7938 16/* $Id$ */
ef0750c2 17
88cb7938 18#include <Riostream.h>
94de3818 19
88cb7938 20#include <TDirectory.h>
ef51244a 21
affef71b 22#include <AliRunLoader.h>
6fc133d2 23#include "AliSTARTLoader.h"
6740ab97 24#include "AliSTARTdigit.h"
121a60bd 25#include "AliSTARTReconstructor.h"
affef71b 26#include <AliESD.h>
f3ed336b 27
121a60bd 28ClassImp(AliSTARTReconstructor)
6740ab97 29
121a60bd 30void AliSTARTReconstructor::Reconstruct(AliRunLoader* /*rl*/) const
31{
32// nothing to be done
33
34}
35
36void AliSTARTReconstructor::FillESD(AliRunLoader* rl, AliESD *pESD) const
6740ab97 37{
f3ed336b 38 /***************************************************
39 Resonstruct digits to vertex position
40 ****************************************************/
41
6740ab97 42 Int_t timediff;
43 Float_t timePs;
affef71b 44
6fc133d2 45 if (!rl) {
46 Error("Reconstruct", "No run loader");
47 return;
48 }
affef71b 49
6fc133d2 50 if (rl->GetDebug()>1) Info("Reconstruct","START!!!");
51
52 AliSTARTLoader* pStartLoader = (AliSTARTLoader*) rl->GetLoader("STARTLoader");
53
54 pStartLoader->LoadDigits();
55 AliSTARTdigit* pDigits=pStartLoader->Digits();
56 if (!pDigits) {
57 Error("Reconstruct", "no digits found");
58 return;
59 }
60
61 if (rl->GetDebug()>1) pDigits->Dump();
62
63 if(pDigits->GetTimeDiff()<TMath::Abs(1000)) {
64 timediff=pDigits->GetTimeDiff(); //time in number of channels
65 timePs=(512-timediff)*2.5; // time in Ps channel_width =10ps
66 // Float_t c = 299792458/1.e9; //speed of light cm/ps
67 Float_t c = 0.3; //speed of light mm/ps
68 Float_t Zposit=timePs*c;// for 0 vertex
69
70 if (rl->GetDebug()>1) {
71 cout << "timediff " << timediff
72 <<" timePs " << timePs
73 <<" Zposit "<<Zposit<<endl;
74 }
75
6fc133d2 76 pESD->SetT0zVertex(Zposit);
77
78 if (rl->GetDebug()>1) {
79 cout<<" vertex in ESD "<< pESD->GetT0zVertex()<<endl;
80 }
81
82 } // vertex in 3 sigma
83 pStartLoader->UnloadDigits();
affef71b 84 }
6740ab97 85
86
87
88
7115262b 89
90