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 /////////////////////////////////////////////////////////////////////////
29 ClassImp(AliITSVertexerFixed)
33 //______________________________________________________________________
34 AliITSVertexerFixed::AliITSVertexerFixed():AliITSVertexer()
36 // Default Constructor
37 AliWarning("This contructor sets the vertex in (0,0,0)");
38 for(Int_t k=0; k<3;k++){
44 //______________________________________________________________________
45 AliITSVertexerFixed::AliITSVertexerFixed(TString option):AliITSVertexer()
47 // Standard constructor
48 if(option.Contains("TDI")){
51 fVtxPos[2]=8000.; // TDI at z=80 m
56 else if(option.Contains("TED")){
59 fVtxPos[2]=34000.; // TED at z=+340 m
64 AliError(Form("%s is invalid, sets the vertex in (0,0,0)",option.Data()));
65 for(Int_t k=0; k<3;k++){
73 //______________________________________________________________________
74 AliESDVertex* AliITSVertexerFixed::FindVertexForCurrentEvent(TTree * /*itsClusterTree */){
75 // Defines the AliITSVertex for the current event
77 fCurrentVertex = new AliESDVertex(fVtxPos,fVtxErr,"Fixed Vertex");
78 return fCurrentVertex;
82 //________________________________________________________
83 void AliITSVertexerFixed::PrintStatus() const {
84 // Print current status
85 cout <<"=======================================================\n";
87 cout<<"Fixed positions: ";
88 for(Int_t k=0;k<3;k++)cout<<" "<<fVtxPos[k]<<"+-"<<fVtxErr[k];