]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/muondep/AliCheckMuonDetEltResponse.h
- Replace the TClonesArray of AliMUONTrackParam by a TObjArray in
[u/mrichter/AliRoot.git] / PWG3 / muondep / AliCheckMuonDetEltResponse.h
1 #ifndef ALICHECKMUONDETELTRESPONSE_H 
2 #define ALICHECKMUONDETELTRESPONSE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /// \ingroup base
7 /// \class AliCheckMuonDetEltResponse
8 /// \brief tracking chamber efficiency from data
9 //Author: Nicolas LE BRIS - SUBATECH Nantes
10
11 #include <TObject.h>
12
13 class AliESDEvent;
14 class AliMUONTrackParam;
15 class AliMUONTrack;
16 class AliMUONVCluster;
17 class AliMUONGeometryTransformer;
18 class TList;
19 class TObjArray;
20
21 class AliCheckMuonDetEltResponse : public TObject
22 {
23 public:
24   AliCheckMuonDetEltResponse();
25   AliCheckMuonDetEltResponse(const AliCheckMuonDetEltResponse& rhs);
26   AliCheckMuonDetEltResponse& operator=(const AliCheckMuonDetEltResponse& rhs);
27 //Constructor:
28   AliCheckMuonDetEltResponse(const AliMUONGeometryTransformer* transformer,
29                              AliESDEvent* esd,
30                              TList* detEltTDHistList,
31                              TList* detEltTTHistList,
32                              TList* chamberTDHistList,
33                              TList* chamberTTHistList);
34
35 //Destructor:
36   virtual ~AliCheckMuonDetEltResponse();
37
38
39   void CheckDetEltResponse ();
40   void TrackLoop ();
41   void TrackParamLoop ();
42
43   Int_t GetNbrUsableTracks() const {return fNbrUsableTracks;};
44   void SetNbrUsableTracks(Int_t nUsable){fNbrUsableTracks = nUsable;};
45  
46 private:
47   
48   void FillTDHistos (Int_t chamber, Int_t detElt,
49                      Double_t posXL, Double_t posYL);
50
51   void FillTTHistos (Int_t chamber, Int_t detElt,
52                      Double_t posXL, Double_t posYL);
53
54   void FindAndFillMissedDetElt (AliMUONTrackParam* extrapTrackParam,
55                                 Int_t firstMissCh, Int_t lastChamber);
56
57   void CoordinatesOfMissingCluster(Double_t x1, Double_t y1, Double_t z1,
58                                    Double_t x2, Double_t y2, Double_t z2,
59                                    Double_t& x, Double_t& y) const;
60
61   Bool_t CoordinatesInDetEltSt12(Int_t DeId, Double_t x, Double_t y);
62   Bool_t CoordinatesInDetEltSt345(Int_t DeId, Double_t x, Double_t y);
63
64   Int_t FromDetElt2iDet (Int_t chamber, Int_t detElt) const;
65   Int_t FromDetElt2LocalId (Int_t chamber, Int_t detElt) const;
66
67
68   const AliMUONGeometryTransformer* fkTransformer; //!<Geometry transformer
69
70   AliESDEvent* fESD;             //<!Current event
71
72   Int_t fNbrClustersCh[10];      //!<Number of clusters in the chamber [fChamberNbr].
73   Int_t fTracksTotalNbr;         //!<Total number of tracks in the event.
74   Int_t fTrackFilter[10];        //!<To select track for the efficiency calculation.
75   Int_t fNbrUsableTracks;        //!<Number of usable tracks (matches trigger and contains traker data, plus a trigger condition for cosmic)
76
77   TObjArray        * fTrackParams;  //!<Array of track param
78   AliMUONTrackParam* fTrackParam;   //!<Current track param
79   AliMUONVCluster  * fCluster;      //!<Current cluster
80
81   TList* fDetEltTDHistList; //!<List of histograms of the tracks detected in the detection elements 
82   TList* fDetEltTTHistList; //!<List of histograms of the tracks which have passed through the detection elements
83   TList* fChamberTDHistList; //!<List of histograms of the tracks detected in the chambers 
84   TList* fChamberTTHistList; //!<List of histograms of the tracks which have passed through the chambers
85
86   static const Int_t fgkNCh;                     ///< The total number of chamber in the tracking system.
87   static const Int_t fgkNSt;                     ///< The total number of station in the tracking system.
88   static const Int_t fgkNDE;                     ///< Number of detection element in the tracking system.
89   static const Int_t fgkNbrOfDetectionElt[10];   ///< The total number of detection element in each chamber.
90   static const Int_t fgkFirstDetectionElt[10];   ///< The Id of the first detection element of each chamber.
91   static const Int_t fgkOffset;                  ///< fFirstDetectionElt[iChamber] = fOffset * (iChamber+1).
92
93   ClassDef(AliCheckMuonDetEltResponse, 0);
94 };
95 #endif