]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSt1Response.h
Compiler Warning removed
[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 <map>
18 #ifndef __HP_aCC
19   using std::map;
20 #endif
21
22 #include <TString.h>
23 #include <TList.h>
24
25 #include "AliMUONResponseV0.h"
26 #include "AliMUONSt1ElectronicElement.h"
27
28 class AliMpPlane;
29 class AliMpPlaneSegmentation;
30 class AliMpZone;
31 class AliMpSector;
32 class TArrayF;
33 class TObjArray;
34 class AliMUONSt1ResponseParameter;
35
36 class AliMUONSt1Response : public AliMUONResponseV0 
37 {
38 public:
39     AliMUONSt1Response(Int_t chamber=1);
40     AliMUONSt1Response(const AliMUONSt1Response& rhs);
41     virtual ~AliMUONSt1Response();
42     
43     //
44     // Configuration methods
45     //
46     void SetIniFileName(Int_t plane,const TString& fileName);
47
48     virtual Float_t  IntPH(Float_t eloss);
49
50     // Noise, zero-suppression, adc saturation
51     virtual Int_t DigitResponse(Int_t digit,AliMUONTransientDigit* where);
52     void PrintStatistics() const;
53
54
55 private:
56     // typedefs
57     typedef map<string, AliMUONSt1ResponseParameter*> ParamsMap;
58     typedef map<string, TList*>  ListMap;
59
60     // operators
61     AliMUONSt1Response& operator=(const AliMUONSt1Response & rhs);
62
63     // private methods
64     AliMpZone* FindZone(AliMpSector* sector,Int_t posId) const; // to be moved in AliMpSector::
65     void ReadFiles();
66     void ReadIniFile(Int_t plane,const TString& fileName,Bool_t rdParam,Bool_t rdRegion,Bool_t rdRule);
67     void ReadIniFile(Int_t plane);
68     void ReadCouplesOfIntRanges(const string& value,TList* list,AliMUONSt1ElectronicElement::TDescription descr);
69     void ReadCouplesOfFloatRanges(const string& value,TList* list);
70     void SetPairToParam(const string& name,const string& value,AliMUONSt1ResponseParameter* param) const;
71     void SetPairToListElem(const string& name,const string& value,TList* list);
72
73     // private constants
74     static const Int_t fgkNofZones=4;           // number of zones
75     static const TString fgkTopDir;             // top directory path
76     static const TString fgkDataDir;            // data directory path
77     static const TString fgkConfigBaseName;     // config file base name
78     static const TString fgkStandardIniFileName;// standard ini file name    
79
80     // static names
81     static const TString fgkBaseName ;          // base name
82     static const TString fgkIncludeName ;       // include name
83     static const TString fgkParameterName ;     // parameter name
84     static const TString fgkRegionName ;        // region name
85     static const TString fgkRuleName ;          // rule name
86     static const TString fgkNameName ;          // name name
87     static const TString fgkPedestalName ;      // pedestal name
88     static const TString fgkNoiseName ;         // noise name
89     static const TString fgkStateName ;         // state name
90     static const TString fgkMName ;             // M name
91     static const TString fgkMGName ;            // MG name
92     static const TString fgkMGCName ;           // MGC name
93     static const TString fgkIJName ;            // i,j name
94     static const TString fgkXYName ;            // x,y name
95     static const TString fgkZoneName ;          // zone name
96     static const TString fgkStickyOnName ;      // sticky on name
97     static const TString fgkStickyOffName ;     // sticky off
98     static const TString fgkFileName ;          // file name
99     static const TString fgkValueName ;         // value name
100     static const TString fgkGausName ;          // gauss name
101     static const TString fgkNotName ;           // not name
102     static const TString fgkNofSigmaName ;      // nof sigma name
103
104     // data members
105     AliMpPlane* fPlane[2];  // !The mapping planes
106     AliMpPlaneSegmentation* fPlaneSegmentation[2]; // !The mapping plane segmentation
107     TString fIniFileName[2];// file names for initialisation of each cathode
108
109     AliMUONSt1ResponseParameter* fDefaultParameters[2][fgkNofZones]; // !Response for each zone
110     TList fRulesList[2]; //! list of special rules
111
112     Int_t fCountNofCalls;    // number of calls to DigitResponse()
113     Int_t fCountUnknownZone; // ntimes the DigitResponse was called in an unknown zone
114     Int_t fCountUnknownIndices; // ntimes the DigitResponse was called with unknown indices
115
116     Int_t fChamber;                // The chamber number
117
118     ParamsMap  fParams;    //! internal parameter list
119     ListMap    fRegions;   //! internal list of regions
120     TList      fTrashList; //! internal trash list 
121
122   ClassDef(AliMUONSt1Response,1) // Overall detector response
123 };
124
125 #endif //ALI_MUON_ST1_RESPONSE_H