1 #include <AliITSVertex.h>
2 #include <AliITSVertexer.h>
3 #include <AliRunLoader.h>
4 #include <AliITSLoader.h>
6 ClassImp(AliITSVertexer)
8 //////////////////////////////////////////////////////////////////////
9 // Base class for primary vertex reconstruction //
10 // AliITSVertex is a class for full 3D primary vertex finding //
11 // derived classes: AliITSVertexerIons AliITSvertexerPPZ //
12 // AliITSVertexerTracks //
13 //////////////////////////////////////////////////////////////////////
15 //______________________________________________________________________
16 AliITSVertexer::AliITSVertexer() {
17 // Default Constructor
25 AliITSVertexer::AliITSVertexer(TString filename) {
26 // Standard constructor
27 AliRunLoader *rl = AliRunLoader::GetRunLoader();
29 Fatal("AliITSVertexer","Run Loader not found");
32 Fatal("AliITSVertexer","The AliRun object is not available - nothing done");
39 AliITSLoader* itsLoader = (AliITSLoader*) rl->GetLoader("ITSLoader");
40 if(filename.Data()!="default")itsLoader->SetVerticesFileName(filename);
41 itsLoader->LoadVertices("recreate");
42 itsLoader->LoadRecPoints();
45 lst = static_cast<Int_t>(rl->TreeE()->GetEntries());
50 //______________________________________________________________________
51 AliITSVertexer::AliITSVertexer(const AliITSVertexer &vtxr) : TObject(vtxr) {
53 // Copies are not allowed. The method is protected to avoid misuse.
54 Error("AliITSVertexer","Copy constructor not allowed\n");
57 //______________________________________________________________________
58 AliITSVertexer& AliITSVertexer::operator=(const AliITSVertexer& /* vtxr */){
59 // Assignment operator
60 // Assignment is not allowed. The method is protected to avoid misuse.
61 Error("= operator","Assignment operator not allowed\n");
65 //______________________________________________________________________
66 AliITSVertexer::~AliITSVertexer() {
68 // The objects pointed by the following pointers are not owned
69 // by this class and are not deleted
74 //______________________________________________________________________
75 void AliITSVertexer::WriteCurrentVertex(){
76 // Write the current AliVertex object to file fOutFile
77 AliRunLoader *rl = AliRunLoader::GetRunLoader();
78 AliITSLoader* itsLoader = (AliITSLoader*) rl->GetLoader("ITSLoader");
79 fCurrentVertex->SetName("Vertex");
80 // const char * name = fCurrentVertex->GetName();
81 // itsLoader->SetVerticesContName(name);
82 Int_t rc = itsLoader->PostVertex(fCurrentVertex);
83 rc = itsLoader->WriteVertices();