]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTracker.cxx
Changing Digit by VDigit (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUONTracker.cxx
CommitLineData
196471e9 1/**************************************************************************
2 * Copyright(c) 1998-1999, 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
27bf410b 16/// \class AliMUONTracker
17/// Interface class for use of global tracking framework;
18/// reconstruct tracks from recpoints
19///
20/// \author Christian Finck, SUBATECH Nantes
196471e9 21
22#include "AliMUONTracker.h"
23#include "AliMUONTrackReconstructorK.h"
24#include "AliMUONTrackReconstructor.h"
6b092dfc 25#include "AliMUONRecData.h"
196471e9 26#include "AliLog.h"
27
28//_____________________________________________________________________________
29AliMUONTracker::AliMUONTracker()
30 : AliTracker(),
31 fTriggerCircuit(0x0),
32 fMUONData(0x0),
33 fTrackReco(0x0)
34{
35 /// constructor
36
37}
38//_____________________________________________________________________________
39AliMUONTracker::~AliMUONTracker()
40{
41 /// dtr
42 delete fTrackReco;
43}
44
45//_____________________________________________________________________________
46void AliMUONTracker::SetOption(Option_t* option)
47{
48 /// set reconstructor class
49
50 if (!fMUONData)
51 AliError("MUONData not defined");
52
53 if (!fTriggerCircuit)
54 AliError("TriggerCircuit not defined");
55
56 if (strstr(option,"Original"))
57 fTrackReco = new AliMUONTrackReconstructor(fMUONData);
58 else if (strstr(option,"Combi"))
59 fTrackReco = new AliMUONTrackReconstructorK(fMUONData,"Combi");
60 else
61 fTrackReco = new AliMUONTrackReconstructorK(fMUONData,"Kalman");
62
63 fTrackReco->SetTriggerCircuit(fTriggerCircuit);
64
65}
66
67//_____________________________________________________________________________
68Int_t AliMUONTracker::Clusters2Tracks(AliESD* /*esd*/)
69{
70
71 /// clusters2Tracks method
72 /// in general tracking framework
73
74 // open TClonesArray for reading
75 fMUONData->SetTreeAddress("TC,RC");
76
77 // open for writing
78 // trigger branch
79 fMUONData->MakeBranch("RL"); //trigger track
80 fMUONData->SetTreeAddress("RL");
81 fTrackReco->EventReconstructTrigger();
82 fMUONData->Fill("RL");
83
84 // tracking branch
85 fMUONData->MakeBranch("RT"); //track
86 fMUONData->SetTreeAddress("RT");
87 fTrackReco->EventReconstruct();
88 fMUONData->Fill("RT");
89
90 fMUONData->ResetRecTracks();
91 fMUONData->ResetRecTriggerTracks();
92
93
94 return kTRUE;
95}