]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSVertexerFixed.cxx
New class for dE/dx analysis (comparison with Bethe-Bloch, check of response function...
[u/mrichter/AliRoot.git] / ITS / 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
29ClassImp(AliITSVertexerFixed)
30
b9e83c62 31/* $Id$ */
c8735dd3 32
33//______________________________________________________________________
34AliITSVertexerFixed::AliITSVertexerFixed():AliITSVertexer()
35{
36 // Default Constructor
37 AliWarning("This contructor sets the vertex in (0,0,0)");
38 for(Int_t k=0; k<3;k++){
39 fVtxPos[k]=0.;
40 fVtxErr[k]=0.5;
41 }
42}
43
44//______________________________________________________________________
45AliITSVertexerFixed::AliITSVertexerFixed(TString option):AliITSVertexer()
46{
47 // Standard constructor
48 if(option.Contains("TDI")){
49 fVtxPos[0]=0.;
50 fVtxPos[1]=0.;
51 fVtxPos[2]=8000.; // TDI at z=80 m
52 fVtxErr[0]=1.;
53 fVtxErr[1]=1.;
54 fVtxErr[2]=100.;
55 }
56 else if(option.Contains("TED")){
57 fVtxPos[0]=0.;
58 fVtxPos[1]=0.;
59 fVtxPos[2]=34000.; // TED at z=+340 m
60 fVtxErr[0]=1.;
61 fVtxErr[1]=1.;
62 fVtxErr[2]=100.;
63 }else{
64 AliError(Form("%s is invalid, sets the vertex in (0,0,0)",option.Data()));
65 for(Int_t k=0; k<3;k++){
66 fVtxPos[k]=0.;
67 fVtxErr[k]=0.5;
68 }
69 }
70}
71
72
73//______________________________________________________________________
74AliESDVertex* AliITSVertexerFixed::FindVertexForCurrentEvent(TTree * /*itsClusterTree */){
75 // Defines the AliITSVertex for the current event
76
77 fCurrentVertex = new AliESDVertex(fVtxPos,fVtxErr,"Fixed Vertex");
78 return fCurrentVertex;
79
80}
81
82//________________________________________________________
83void AliITSVertexerFixed::PrintStatus() const {
84 // Print current status
85 cout <<"=======================================================\n";
86
87 cout<<"Fixed positions: ";
88 for(Int_t k=0;k<3;k++)cout<<" "<<fVtxPos[k]<<"+-"<<fVtxErr[k];
89 cout<<endl;
90}
91