Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / MUON / AliMUONRecoCheck.h
CommitLineData
b8dc484b 1#ifndef ALIMUONRECOCHECK_H
2#define ALIMUONRECOCHECK_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
692de412 7/* $Id$ */
8
6b092dfc 9/// \ingroup evaluation
692de412 10/// \class AliMUONRecoCheck
11/// \brief Utility class to check reconstruction
12
b8dc484b 13#include <TObject.h>
b8dc484b 14
15class TClonesArray;
61fed964 16class TFile;
17class TTree;
18class AliESDEvent;
96ebe67e 19class AliMCEventHandler;
48217459 20class AliMUONVTrackStore;
9f164762 21class AliMUONVTriggerTrackStore;
f202486b 22class AliMUONTrack;
e0146591 23class AliMUONTrackParam;
9f164762 24class AliMUONTriggerTrack;
25class AliMUONGeometryTransformer;
26class AliMUONTriggerCircuit;
27class AliMUONLocalTrigger;
b7474abb 28class AliMUONCalibrationData;
29class AliMUONTriggerElectronics;
b8dc484b 30
31class AliMUONRecoCheck : public TObject
32{
33public:
1f2d22de 34 AliMUONRecoCheck(const Char_t *chLoader, const Char_t *pathSim = "./");
7c29acf1 35 AliMUONRecoCheck(AliESDEvent *esdEvent, AliMCEventHandler *mcEventHandler);
48217459 36 virtual ~AliMUONRecoCheck();
37
9bdda5f6 38 /// Return the list of reconstructed tracks
a99c3449 39 AliMUONVTrackStore* ReconstructedTracks(Int_t event, Bool_t refit = kTRUE);
9f164762 40
41 /// Return the list of reconstructed trigger tracks
42 AliMUONVTriggerTrackStore* TriggeredTracks(Int_t event);
43
cd859b17 44 Bool_t TriggerToTrack(const AliMUONLocalTrigger& locTrg, AliMUONTriggerTrack& triggerTrack);
9f164762 45
9bdda5f6 46 /// Return reference muon tracks
48217459 47 AliMUONVTrackStore* TrackRefs(Int_t event);
b8dc484b 48
9f164762 49 /// Return triggerable reference tracks
50 AliMUONVTriggerTrackStore* TriggerableTracks(Int_t event);
51
9bdda5f6 52 /// Return reconstructible reference tracks
e0146591 53 AliMUONVTrackStore* ReconstructibleTracks(Int_t event, UInt_t requestedStationMask = 0x1F,
54 Bool_t request2ChInSameSt45 = kTRUE,
55 Bool_t hitInFrontOfPad = kFALSE);
9f164762 56
57
a99c3449 58 /// Return the run number of the current ESD event
59 Int_t GetRunNumber();
60
9bdda5f6 61 /// Return the total number of events.
62 Int_t NumberOfEvents() const;
63
61fed964 64 /// Return the reconstructed data of current event
9ee1d6ff 65 const AliESDEvent* GetESDEvent() const { return fESDEvent; }
9bdda5f6 66
61fed964 67 /// Return the interface to the Monte Carlo data of current event
9ee1d6ff 68 const AliMCEventHandler* GetMCEventHandler() const { return fMCEventHandler; }
9bdda5f6 69
e0146591 70 /// Return the track from the store matched with the given track (or 0x0) and the fraction of matched clusters
f202486b 71 static AliMUONTrack* FindCompatibleTrack(AliMUONTrack &track, AliMUONVTrackStore &trackStore,
e0146591 72 Int_t &nMatchClusters, Bool_t useLabel = kFALSE,
73 Double_t sigmaCut = 10.);
f202486b 74
9f164762 75 /// Return the trigger track from the store matched with the given track (or 0x0)
76 static AliMUONTriggerTrack* FindCompatibleTrack(AliMUONTriggerTrack &track,
57e2ad1a 77 const AliMUONVTriggerTrackStore &triggerTrackStore,
9f164762 78 Double_t sigmaCut = 10.);
79
b8dc484b 80private:
71a2d3aa 81 /// Not implemented
82 AliMUONRecoCheck(const AliMUONRecoCheck& rhs);
83 /// Not implemented
84 AliMUONRecoCheck& operator = (const AliMUONRecoCheck& rhs);
068e4c36 85
96ebe67e 86 void ResetStores();
87
a99c3449 88 void MakeReconstructedTracks(Bool_t refit);
9f164762 89
90 void MakeTriggeredTracks();
61fed964 91
96ebe67e 92 void MakeTrackRefs();
48217459 93
96ebe67e 94 void CleanMuonTrackRef(const AliMUONVTrackStore *tmpTrackRefStore);
48217459 95
e0146591 96 void MakeReconstructibleTracks(UInt_t requestedStationMask, Bool_t request2ChInSameSt45 = kTRUE,
97 Bool_t hitInFrontOfPad = kFALSE);
9f164762 98
99 void MakeTriggerableTracks();
100
101 Bool_t InitCircuit();
b7474abb 102 Bool_t InitTriggerResponse();
103 Bool_t InitCalibrationData();
104 Bool_t InitGeometryTransformer();
96ebe67e 105
e0146591 106 Bool_t IsHitInFrontOfPad(AliMUONTrackParam *param) const;
107
48217459 108private:
96ebe67e 109 AliMCEventHandler* fMCEventHandler; ///< to access MC truth information
61fed964 110 AliESDEvent* fESDEvent; ///< ESD event to access MUON data
111 TTree* fESDTree; ///< ESD tree to access MUON data
112 TFile* fESDFile; ///< ESD file to access MUON data
48217459 113
96ebe67e 114 Int_t fCurrentEvent; ///< current event number
115
116 AliMUONVTrackStore* fTrackRefStore; ///< current simulated tracks (owner)
117 AliMUONVTrackStore* fRecoTrackRefStore; ///< current reconstructible tracks (owner)
9f164762 118 AliMUONVTriggerTrackStore* fRecoTriggerRefStore; ///< current triggerable tracks (owner)
96ebe67e 119 AliMUONVTrackStore* fRecoTrackStore; ///< current reconstructed tracks (owner)
9f164762 120 AliMUONVTriggerTrackStore* fRecoTriggerTrackStore; ///< current reconstructed trigger tracks (owner)
121
122 AliMUONGeometryTransformer* fGeometryTransformer; ///< geometry transformer
123 AliMUONTriggerCircuit* fTriggerCircuit; ///< trigger circuit
b7474abb 124 AliMUONCalibrationData* fCalibrationData; //!< Used to load Local, Regional and Global masks
125 AliMUONTriggerElectronics* fTriggerElectronics; ///< object to re-compute the trigger info
96ebe67e 126
7c29acf1 127 Bool_t fESDEventOwner; ///< using constructor from the analysis task
128
54d7ba50 129 ClassDef(AliMUONRecoCheck, 0) //Utility class to check reconstruction
b8dc484b 130};
131
132#endif
133