]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSt1Response.h
Constructor needed by AliMUONv3 added. (G. Martinez)
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1Response.h
1 #ifndef ALI_MUON_ST1_RESPONSE_H
2 #define ALI_MUON_ST1_RESPONSE_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
10 //
11 // Class AliMUONSt1Response
12 // ----------------------------
13 // Response class for station 1 including electronics and detector response. 
14 // Individual pedestals or noise levels can be controlled separately. 
15 // The current pulse height responses do not contain any physics
16
17 #include <string>
18 #include <map>
19 #include <TString.h>
20 #include <TList.h>
21 #include "AliMUONResponseV0.h"
22 #include "AliMUONSt1ElectronicElement.h"
23
24 using std::string;
25 using std::map;
26
27 class MPlane;
28 class MPlaneSegmentation;
29 class MZone;
30 class MSector;
31 class TArrayF;
32 class TObjArray;
33 class AliMUONSt1ResponseParameter;
34
35 class AliMUONSt1Response : public AliMUONResponseV0 
36 {
37 public:
38     AliMUONSt1Response(Int_t chamber=1);
39     virtual ~AliMUONSt1Response();
40     
41     //
42     // Configuration methods
43     //
44     void SetIniFileName(Int_t plane,const TString& fileName);
45
46     virtual Float_t  IntPH(Float_t eloss);
47
48     // Noise, zero-suppression, adc saturation
49     virtual Int_t DigitResponse(Int_t digit,AliMUONTransientDigit* where);
50     void PrintStatistics() const;
51
52
53 private:
54
55    //private types
56     typedef map<string,AliMUONSt1ResponseParameter*> TParamsMap;
57     typedef map<string,TList*> TListMap;
58     static const Int_t fgkNofZones=4;
59     static const TString fgkTopDir;
60     static const TString fgkDataDir;
61     static const TString fgkConfigBaseName;
62     static const TString fgkStandardIniFileName;    
63
64     // static names
65     static const TString fgkBaseName ;
66     static const TString fgkIncludeName ;
67     static const TString fgkParameterName ;
68     static const TString fgkRegionName ;
69     static const TString fgkRuleName ;
70     static const TString fgkNameName ;
71     static const TString fgkPedestalName ;
72     static const TString fgkNoiseName ;
73     static const TString fgkStateName ;
74     static const TString fgkMName ;
75     static const TString fgkMGName ;
76     static const TString fgkMGCName ;
77     static const TString fgkIJName ;
78     static const TString fgkXYName ;
79     static const TString fgkZoneName ;
80     static const TString fgkStickyOnName ;
81     static const TString fgkStickyOffName ;
82     static const TString fgkFileName ;
83     static const TString fgkValueName ;
84     static const TString fgkGausName ;
85     static const TString fgkNotName ;
86     static const TString fgkNofSigmaName ;
87
88     //protected methods
89     MZone* FindZone(MSector* sector,Int_t posId); // to be moved in MSector::
90     void ReadFiles();
91     void ReadIniFile(Int_t plane,const TString& fileName,Bool_t rdParam,Bool_t rdRegion,Bool_t rdRule);
92     void ReadIniFile(Int_t plane);
93     void ReadCouplesOfIntRanges(const string& value,TList* list,AliMUONSt1ElectronicElement::TDescription descr);
94     void ReadCouplesOfFloatRanges(const string& value,TList* list);
95     void SetPairToParam(const string& name,const string& value,AliMUONSt1ResponseParameter* param) const;
96     void SetPairToListElem(const string& name,const string& value,TList* list);
97
98
99     //data members
100     MPlane* fPlane[2];       // !The mapping planes
101     MPlaneSegmentation* fPlaneSegmentation[2]; // !The mapping plane segmentation
102     TString fIniFileName[2];// file names for initialisation of each cathode
103
104     AliMUONSt1ResponseParameter* fDefaultParameters[2][fgkNofZones]; // !Response for each zone
105     TList fRulesList[2]; //! list of special rules
106
107     Int_t fCountNofCalls;    // number of calls to DigitResponse()
108     Int_t fCountUnknownZone; // ntimes the DigitResponse was called in an unknown zone
109     Int_t fCountUnknownIndices; // ntimes the DigitResponse was called with unknown indices
110
111     Int_t fChamber;                // The chamber number
112
113     TParamsMap fParams;  //! internal parameter list
114     TListMap   fRegions; //! internal list of regions
115     TList      fTrashList; //!internal trash list 
116
117   ClassDef(AliMUONSt1Response,1) // Overall detector response
118 };
119
120 #endif //ALI_MUON_ST1_RESPONSE_H