]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONClusterInput.h
data/transform_slat.dat Updated for changes in geometr. Geometry framework classes...
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterInput.h
1 #ifndef ALIMUONCLUSTERINPUT_H
2 #define ALIMUONCLUSTERINPUT_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 // Revision of includes 07/05/2004
8
9 #include <TObject.h>
10 #include <TClonesArray.h> // needed for inline function Digit
11
12 class TMinuit;
13
14 class AliMUONDigit;
15 class AliMUONRawCluster;
16 class AliSegmentation;
17 class AliMUONResponse;
18
19 class AliMUONClusterInput : public TObject 
20 {
21  public:
22     virtual ~AliMUONClusterInput();
23     static AliMUONClusterInput* Instance();
24 //  Configuration
25     void SetDigits(Int_t chamber, TClonesArray* dig1, TClonesArray* dig2);
26     void SetDigits(Int_t chamber, TClonesArray* dig);
27     void SetCluster(AliMUONRawCluster* cluster);
28 // Access functions
29     Int_t Chamber() const {return fChamber;}
30     AliMUONDigit* Digit(Int_t cath, Int_t i) const {return (AliMUONDigit*) (fDigits[cath]->UncheckedAt(i));}
31     TClonesArray* Digits(Int_t cath) const {return fDigits[cath];}
32     Int_t NDigits(Int_t cath) const {return fNDigits[cath];}
33     AliSegmentation* Segmentation(Int_t cath) const {return fSegmentation[cath];}
34     AliMUONResponse* Response() const {return fResponse;}    
35 // Fitting    
36     TMinuit*      Fitter() const {return fgMinuit;}
37 // Current cluster information    
38     Float_t       TotalCharge(Int_t cath) const {return fChargeTot[cath];}
39     Float_t       Charge(Int_t dig, Int_t cath) const {return fCharge[dig][cath];}
40     Int_t         Ix(Int_t dig, Int_t cath) const {return fix[dig][cath];}
41     Int_t         Iy(Int_t dig, Int_t cath) const {return fiy[dig][cath];}
42     Int_t         Nmul(Int_t cath) const {return fNmul[cath];}
43 //  Helpers for Fit     
44     Float_t DiscrChargeS1(Int_t i,Double_t *par);
45     Float_t DiscrChargeCombiS1(Int_t i,Double_t *par, Int_t cath);
46     Float_t DiscrChargeS2(Int_t i,Double_t *par);
47     Float_t DiscrChargeCombiS2(Int_t i,Double_t *par, Int_t cath);
48 // 
49  protected:
50     AliMUONClusterInput();
51     AliMUONClusterInput(const AliMUONClusterInput& clusterInput);
52     AliMUONClusterInput & operator = (const AliMUONClusterInput& rhs);
53  private:
54     static AliMUONClusterInput* fgClusterInput; // ! singleton instance
55     // Digits
56     TClonesArray*        fDigits[2];       // ! Array of pointers to digits
57     Int_t                fNDigits[2];      // ! Number of digits
58     AliSegmentation*     fSegmentation[2]; // ! Segmentation per cathode
59     AliMUONResponse*     fResponse;        // ! Response
60     Int_t                fNseg;            // ! number of cathode planes
61     Int_t                fChamber;         // ! Current chamber number
62     
63     // Current cluster
64     AliMUONRawCluster*   fCluster;         // ! current cluster
65     Int_t                fNmul[2];         // ! current cluster multiplicity
66     // Digits contribuing to current cluster
67     Int_t                fix[500][2];      // ! List of x-positions for current cluster
68     Int_t                fiy[500][2];      // ! List of y-positions for current cluster
69     Float_t              fCharge[500][2];  // ! List of charges for current cluster
70     Int_t                fChargeTot[2];    // ! Total charge
71     Float_t              fQtot[2];         // ! Total charge
72     Float_t              fZ;               // ! Current z-position
73     // Fitter
74     static TMinuit*      fgMinuit;          // ! Fitter
75     ClassDef(AliMUONClusterInput, 0)        // Global data service for hit reconstruction
76 };
77 #endif
78