misalignment from Tomek
[u/mrichter/AliRoot.git] / MUON / AliMUONVTrackReconstructor.h
CommitLineData
8d0843c6 1#ifndef ALIMUONVTRACKRECONSTRUCTOR_H
2#define ALIMUONVTRACKRECONSTRUCTOR_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8/// \ingroup rec
9/// \class AliMUONVTrackReconstructor
10/// \brief Virtual class for the MUON track reconstruction
11///
c4ee792d 12// Author: Philippe Pillot
8d0843c6 13
14#include <TObject.h>
15
019df241 16class AliMUONTrack;
ea94c18b 17class AliMUONTrackParam;
96ebe67e 18class AliMUONVCluster;
8d0843c6 19class AliMUONTriggerTrack;
7771752e 20class AliMUONTrackHitPattern;
1fef78c8 21class AliMUONVClusterServer;
7ec3b9cf 22class AliMUONVClusterStore;
23class AliMUONVTrackStore;
24class AliMUONVTriggerTrackStore;
25class AliMUONVTriggerStore;
26class AliMUONGeometryTransformer;
27class AliMUONDigitMaker;
32ab62c9 28class AliMUONTriggerCircuit;
3304fa09 29class TClonesArray;
a0dc65b4 30class AliMUONRecoParam;
8d0843c6 31
32class AliMUONVTrackReconstructor : public TObject {
33
34 public:
a0dc65b4 35 AliMUONVTrackReconstructor(const AliMUONRecoParam* recoParam, AliMUONVClusterServer* clusterServer); // default Constructor
8d0843c6 36 virtual ~AliMUONVTrackReconstructor(); // Destructor
37
a0dc65b4 38
1fef78c8 39 void EventReconstruct(AliMUONVClusterStore& clusterStore,
7ec3b9cf 40 AliMUONVTrackStore& trackStore);
8d0843c6 41
32ab62c9 42 void EventReconstructTrigger(const AliMUONTriggerCircuit& triggerCircuit,
7ec3b9cf 43 const AliMUONVTriggerStore& triggerStore,
44 AliMUONVTriggerTrackStore& triggerTrackStore);
45
46 void ValidateTracksWithTrigger(AliMUONVTrackStore& trackStore,
47 const AliMUONVTriggerTrackStore& triggerTrackStore,
48 const AliMUONVTriggerStore& triggerStore,
49 const AliMUONTrackHitPattern& trackHitPattern);
a0dc65b4 50
21973f26 51 /// Return reco parameters
5a240757 52 const AliMUONRecoParam* GetRecoParam() const { return fkRecoParam; }
ea94c18b 53
21973f26 54 /// Re-fit the given track
b1fea02e 55 virtual Bool_t RefitTrack(AliMUONTrack &track, Bool_t enableImprovement = kTRUE) = 0;
7deb8eb0 56
ea94c18b 57
8d0843c6 58 protected:
59
8d0843c6 60 TClonesArray *fRecTracksPtr; ///< pointer to array of reconstructed tracks
61 Int_t fNRecTracks; ///< number of reconstructed tracks
62
b1fea02e 63 AliMUONVClusterServer* fClusterServer; ///< reference to our cluster server
ea94c18b 64
5a240757 65 const AliMUONRecoParam* fkRecoParam; ///< reference to reco parameters
a0dc65b4 66
8d0843c6 67 // Functions
68 AliMUONVTrackReconstructor (const AliMUONVTrackReconstructor& rhs); ///< copy constructor
69 AliMUONVTrackReconstructor& operator=(const AliMUONVTrackReconstructor& rhs); ///< assignment operator
70
9bf6860b 71 /// Make track candidates from clusters in stations(1..) 4 and 5
89c8d66d 72 virtual Bool_t MakeTrackCandidates(AliMUONVClusterStore& clusterStore) = 0;
9bf6860b 73 /// Make extra track candidates from clusters in stations(1..) 4 and 5
89c8d66d 74 virtual Bool_t MakeMoreTrackCandidates(AliMUONVClusterStore& clusterStore) = 0;
ea94c18b 75 /// Follow tracks in stations(1..) 3, 2 and 1
89c8d66d 76 virtual Bool_t FollowTracks(AliMUONVClusterStore& clusterStore) = 0;
b709ac13 77 /// Complement the reconstructed tracks
89c8d66d 78 virtual Bool_t ComplementTracks(const AliMUONVClusterStore& clusterStore) = 0;
7332f213 79 void ImproveTracks();
80 /// Improve the given reconstructed track
81 virtual void ImproveTrack(AliMUONTrack &track) = 0;
82 void Finalize();
83 /// Finalize the given track
84 virtual void FinalizeTrack(AliMUONTrack &track) = 0;
ea94c18b 85
9bf6860b 86 TClonesArray* MakeSegmentsBetweenChambers(const AliMUONVClusterStore& clusterStore, Int_t ch1, Int_t ch2);
8d0843c6 87
89c8d66d 88 void RemoveUsedSegments(TClonesArray& segments);
ea94c18b 89 void RemoveIdenticalTracks();
90 void RemoveDoubleTracks();
c59f70b9 91 void RemoveConnectedTracks(Bool_t inSt345 = kFALSE);
ea94c18b 92
1fef78c8 93 void AskForNewClustersInStation(const AliMUONTrackParam &trackParam,
94 AliMUONVClusterStore& clusterStore, Int_t station);
9bf6860b 95 void AskForNewClustersInChamber(const AliMUONTrackParam &trackParam,
96 AliMUONVClusterStore& clusterStore, Int_t chamber);
1fef78c8 97
96ebe67e 98 Double_t TryOneCluster(const AliMUONTrackParam &trackParam, AliMUONVCluster* cluster,
99 AliMUONTrackParam &trackParamAtCluster, Bool_t updatePropagator = kFALSE);
5a240757 100 Bool_t TryOneClusterFast(const AliMUONTrackParam &trackParam, const AliMUONVCluster* cluster);
96ebe67e 101 Double_t TryTwoClustersFast(const AliMUONTrackParam &trackParamAtCluster1, AliMUONVCluster* cluster2,
102 AliMUONTrackParam &trackParamAtCluster2);
019df241 103
9bf6860b 104 Bool_t FollowLinearTrackInChamber(AliMUONTrack &trackCandidate, const AliMUONVClusterStore& clusterStore, Int_t nextChamber);
105 Bool_t FollowLinearTrackInStation(AliMUONTrack &trackCandidate, const AliMUONVClusterStore& clusterStore, Int_t nextStation);
abc2458f 106
107 void CorrectThetaRange(Float_t&);
8d0843c6 108
109 private:
110
8d0843c6 111 // Functions
ea94c18b 112 void ResetTracks();
ea94c18b 113
8d0843c6 114
8d0843c6 115 ClassDef(AliMUONVTrackReconstructor, 0) // MUON track reconstructor in ALICE
208f139e 116};
8d0843c6 117
118#endif