]> git.uio.no Git - u/mrichter/AliRoot.git/blame - START/AliSTARTReconstructor.cxx
reconstruction from RAWData added
[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
a8859328 22#include "AliRunLoader.h"
23#include "AliRun.h"
6fc133d2 24#include "AliSTARTLoader.h"
6740ab97 25#include "AliSTARTdigit.h"
121a60bd 26#include "AliSTARTReconstructor.h"
affef71b 27#include <AliESD.h>
f3ed336b 28
121a60bd 29ClassImp(AliSTARTReconstructor)
6740ab97 30
d4637c2e 31void AliSTARTReconstructor::Reconstruct(AliRunLoader* /*runLoader*/) const
121a60bd 32{
33// nothing to be done
121a60bd 34}
35
36void AliSTARTReconstructor::FillESD(AliRunLoader* rl, AliESD *pESD) const
6740ab97 37{
f3ed336b 38 /***************************************************
39 Resonstruct digits to vertex position
40 ****************************************************/
d4637c2e 41
a8859328 42 Float_t c = 0.3; //speed of light mm/ps
43 Int_t channelWigth=25; //ps
6fc133d2 44 if (!rl) {
45 Error("Reconstruct", "No run loader");
46 return;
47 }
affef71b 48
6fc133d2 49 if (rl->GetDebug()>1) Info("Reconstruct","START!!!");
50
51 AliSTARTLoader* pStartLoader = (AliSTARTLoader*) rl->GetLoader("STARTLoader");
52
53 pStartLoader->LoadDigits();
54 AliSTARTdigit* pDigits=pStartLoader->Digits();
55 if (!pDigits) {
56 Error("Reconstruct", "no digits found");
57 return;
58 }
59
60 if (rl->GetDebug()>1) pDigits->Dump();
a8859328 61 if(pDigits) {
62 Int_t besttimeright = pDigits->GetBestTimeRight();
63 Int_t besttimeleft = pDigits->GetBestTimeLeft();
64 Float_t besttimerightPs = Float_t (besttimeright*channelWigth);
65 Float_t besttimeleftPs = Float_t (besttimeleft*channelWigth);
66 Float_t Zposit=(c*(besttimerightPs-besttimeleftPs)-(3500.-697))/2;
67
6fc133d2 68
6fc133d2 69 pESD->SetT0zVertex(Zposit);
70
71 if (rl->GetDebug()>1) {
72 cout<<" vertex in ESD "<< pESD->GetT0zVertex()<<endl;
73 }
74
75 } // vertex in 3 sigma
76 pStartLoader->UnloadDigits();
affef71b 77 }
6740ab97 78
79
80
81
7115262b 82
83