Fix for FMD DA
[u/mrichter/AliRoot.git] / ITS / ITSbase / AliITSVertexerFixed.cxx
CommitLineData
c8735dd3 1/**************************************************************************
2 * Copyright(c) 1998-2003, 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 **************************************************************************/
15#include <Riostream.h>
16#include "AliESDVertex.h"
17#include "AliLog.h"
18#include <TString.h>
19#include "AliITSVertexerFixed.h"
20
21/////////////////////////////////////////////////////////////////////////
22// //
23// Fixed vertexer - creates a vertex in a defined postion (x,y,z) //
24// the standard contructor takes a sting to specify the case //
25// Useful for reconstruction of injection tests with beam on TDI //
26// //
27/////////////////////////////////////////////////////////////////////////
28
fe7d86eb 29using std::endl;
30using std::cout;
c8735dd3 31ClassImp(AliITSVertexerFixed)
32
b9e83c62 33/* $Id$ */
c8735dd3 34
35//______________________________________________________________________
36AliITSVertexerFixed::AliITSVertexerFixed():AliITSVertexer()
37{
38 // Default Constructor
39 AliWarning("This contructor sets the vertex in (0,0,0)");
40 for(Int_t k=0; k<3;k++){
41 fVtxPos[k]=0.;
42 fVtxErr[k]=0.5;
43 }
44}
45
46//______________________________________________________________________
47AliITSVertexerFixed::AliITSVertexerFixed(TString option):AliITSVertexer()
48{
49 // Standard constructor
50 if(option.Contains("TDI")){
51 fVtxPos[0]=0.;
52 fVtxPos[1]=0.;
53 fVtxPos[2]=8000.; // TDI at z=80 m
54 fVtxErr[0]=1.;
55 fVtxErr[1]=1.;
56 fVtxErr[2]=100.;
57 }
58 else if(option.Contains("TED")){
59 fVtxPos[0]=0.;
60 fVtxPos[1]=0.;
61 fVtxPos[2]=34000.; // TED at z=+340 m
62 fVtxErr[0]=1.;
63 fVtxErr[1]=1.;
64 fVtxErr[2]=100.;
65 }else{
66 AliError(Form("%s is invalid, sets the vertex in (0,0,0)",option.Data()));
67 for(Int_t k=0; k<3;k++){
68 fVtxPos[k]=0.;
69 fVtxErr[k]=0.5;
70 }
71 }
72}
73
74
75//______________________________________________________________________
76AliESDVertex* AliITSVertexerFixed::FindVertexForCurrentEvent(TTree * /*itsClusterTree */){
77 // Defines the AliITSVertex for the current event
78
79 fCurrentVertex = new AliESDVertex(fVtxPos,fVtxErr,"Fixed Vertex");
80 return fCurrentVertex;
81
82}
83
84//________________________________________________________
85void AliITSVertexerFixed::PrintStatus() const {
86 // Print current status
87 cout <<"=======================================================\n";
88
89 cout<<"Fixed positions: ";
90 for(Int_t k=0;k<3;k++)cout<<" "<<fVtxPos[k]<<"+-"<<fVtxErr[k];
91 cout<<endl;
92}
93