1 /**************************************************************************
2 * Copyright(c) 1998-2003, 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 **************************************************************************/
15 #include <Riostream.h>
16 #include "AliESDVertex.h"
19 #include "AliITSVertexerFixed.h"
21 /////////////////////////////////////////////////////////////////////////
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 //
27 /////////////////////////////////////////////////////////////////////////
31 ClassImp(AliITSVertexerFixed)
35 //______________________________________________________________________
36 AliITSVertexerFixed::AliITSVertexerFixed():AliITSVertexer()
38 // Default Constructor
39 AliWarning("This contructor sets the vertex in (0,0,0)");
40 for(Int_t k=0; k<3;k++){
46 //______________________________________________________________________
47 AliITSVertexerFixed::AliITSVertexerFixed(TString option):AliITSVertexer()
49 // Standard constructor
50 if(option.Contains("TDI")){
53 fVtxPos[2]=8000.; // TDI at z=80 m
58 else if(option.Contains("TED")){
61 fVtxPos[2]=34000.; // TED at z=+340 m
66 AliError(Form("%s is invalid, sets the vertex in (0,0,0)",option.Data()));
67 for(Int_t k=0; k<3;k++){
75 //______________________________________________________________________
76 AliESDVertex* AliITSVertexerFixed::FindVertexForCurrentEvent(TTree * /*itsClusterTree */){
77 // Defines the AliITSVertex for the current event
79 fCurrentVertex = new AliESDVertex(fVtxPos,fVtxErr,"Fixed Vertex");
80 return fCurrentVertex;
84 //________________________________________________________
85 void AliITSVertexerFixed::PrintStatus() const {
86 // Print current status
87 cout <<"=======================================================\n";
89 cout<<"Fixed positions: ";
90 for(Int_t k=0;k<3;k++)cout<<" "<<fVtxPos[k]<<"+-"<<fVtxErr[k];