]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONClusterInput.h
Added a commented out version with new digitizers.
[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 /// \ingroup rec
10 /// \class AliMUONClusterInput
11 /// \brief Global data service for hit reconstruction
12
13 #include <TObject.h>
14 #include <TClonesArray.h> // needed for inline function Digit
15 #include "AliMUONGeometrySegmentation.h"
16
17 class TMinuit;
18
19 class AliMUONDigit;
20 class AliMUONRawCluster;
21 class AliMUONMathieson;
22
23 class AliMUONClusterInput : public TObject 
24 {
25  public:
26     virtual ~AliMUONClusterInput();
27     static AliMUONClusterInput* Instance();
28 //  Configuration
29     void SetDigits(Int_t chamber, Int_t idDE, TClonesArray* dig1, TClonesArray* dig2);
30     void SetDigits(Int_t chamber, Int_t idDE, TClonesArray* dig);
31     void SetCluster(AliMUONRawCluster* cluster);
32 // Access functions
33     Int_t Chamber() const {return fChamber;}
34     AliMUONDigit* Digit(Int_t cath, Int_t i) const {return (AliMUONDigit*) (fDigits[cath]->UncheckedAt(i));}
35     TClonesArray* Digits(Int_t cath) const {return fDigits[cath];}
36     Int_t NDigits(Int_t cath) const {return fNDigits[cath];}
37     AliMUONGeometrySegmentation* Segmentation2(Int_t cath) const {return fSegmentation2[cath];}
38
39     AliMUONMathieson* Mathieson() const {return fgMathieson;}    
40     Float_t ChargeCorrel() const {return fChargeCorrel;}    
41     Int_t DetElemId() const {return fDetElemId;}
42
43 // Fitting    
44     TMinuit*      Fitter() const {return fgMinuit;}
45 // Current cluster information    
46     Float_t       TotalCharge(Int_t cath) const {return fChargeTot[cath];}
47     Float_t       Charge(Int_t dig, Int_t cath) const {return fCharge[dig][cath];}
48     Int_t         Ix(Int_t dig, Int_t cath) const {return fix[dig][cath];}
49     Int_t         Iy(Int_t dig, Int_t cath) const {return fiy[dig][cath];}
50     Int_t         Nmul(Int_t cath) const {return fNmul[cath];}
51 //  Helpers for Fit     
52     Float_t DiscrChargeS1(Int_t i,Double_t *par);
53     Float_t DiscrChargeCombiS1(Int_t i,Double_t *par, Int_t cath);
54     Float_t DiscrChargeS2(Int_t i,Double_t *par);
55     Float_t DiscrChargeCombiS2(Int_t i,Double_t *par, Int_t cath);
56 // 
57  protected:
58     AliMUONClusterInput();
59     AliMUONClusterInput(const AliMUONClusterInput& clusterInput);
60     AliMUONClusterInput & operator = (const AliMUONClusterInput& rhs);
61  private:
62     static AliMUONClusterInput* fgClusterInput; // ! singleton instance
63     static AliMUONMathieson*    fgMathieson;     // ! Mathieson
64
65     // Digits
66     TClonesArray*        fDigits[2];       // ! Array of pointers to digits
67     Int_t                fNDigits[2];      // ! Number of digits
68     AliMUONGeometrySegmentation*     fSegmentation2[2]; // ! Geometry Segmentation per cathode
69
70     Int_t                fNseg;            // ! number of cathode planes
71     Int_t                fChamber;         // ! Current chamber number
72     
73     // Current cluster
74     AliMUONRawCluster*   fCluster;         // ! current cluster
75     Int_t                fNmul[2];         // ! current cluster multiplicity
76     // Digits contribuing to current cluster
77     Int_t                fix[500][2];      // ! List of x-positions for current cluster
78     Int_t                fiy[500][2];      // ! List of y-positions for current cluster
79     Float_t              fCharge[500][2];  // ! List of charges for current cluster
80     Int_t                fChargeTot[2];    // ! Total charge
81     Float_t              fQtot[2];         // ! Total charge
82     Float_t              fZ;               // ! Current z-position
83     Float_t              fChargeCorrel;    // ! charge correlation 
84     Int_t                fDetElemId;       // ! detection elt id    
85
86     // Fitter
87     static TMinuit*      fgMinuit;          // ! Fitter
88     ClassDef(AliMUONClusterInput, 0)        // Global data service for hit reconstruction
89 };
90 #endif
91