]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSt1Response.h
New parametrization of the geometry and new geometry interface (Working week effort)
[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 // Revision of includes 07/05/2004
9
10 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
11 //
12 // Class AliMUONSt1Response
13 // ----------------------------
14 // Response class for station 1 including electronics and detector response. 
15 // Individual pedestals or noise levels can be controlled separately. 
16 // The current pulse height responses do not contain any physics
17
18 #include <map>
19 #ifndef __HP_aCC
20   using std::map;
21 #endif
22
23 #include <TString.h>
24 #include <TList.h>
25
26 #include "AliMUONResponseV0.h"
27 #include "AliMUONSt1ElectronicElement.h"
28
29 class AliMpPlane;
30 class AliMpPlaneSegmentation;
31 class AliMpZone;
32 class AliMpSector;
33 class TArrayF;
34 class TObjArray;
35 class AliMUONSt1ResponseParameter;
36
37 class AliMUONSt1Response : public AliMUONResponseV0 
38 {
39   public:
40     AliMUONSt1Response(Int_t chamber=1);
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   protected:
55     AliMUONSt1Response(const AliMUONSt1Response& rhs);
56
57     // operators
58     AliMUONSt1Response& operator=(const AliMUONSt1Response & rhs);
59
60   private:
61     // typedefs
62     typedef map<string, AliMUONSt1ResponseParameter*> ParamsMap;
63     typedef map<string, TList*>  ListMap;
64
65     // private methods
66     AliMpZone* FindZone(AliMpSector* sector,Int_t posId) const; // to be moved in AliMpSector::
67     void ReadFiles();
68     void ReadIniFile(Int_t plane,const TString& fileName,Bool_t rdParam,Bool_t rdRegion,Bool_t rdRule);
69     void ReadIniFile(Int_t plane);
70     void ReadCouplesOfIntRanges(const string& value,TList* list,AliMUONSt1ElectronicElement::TDescription descr);
71     void ReadCouplesOfFloatRanges(const string& value,TList* list);
72     void SetPairToParam(const string& name,const string& value,AliMUONSt1ResponseParameter* param) const;
73     void SetPairToListElem(const string& name,const string& value,TList* list);
74
75     // private constants
76     static const Int_t fgkNofZones=4;           // number of zones
77     static const TString fgkTopDir;             // top directory path
78     static const TString fgkDataDir;            // data directory path
79     static const TString fgkConfigBaseName;     // config file base name
80     static const TString fgkStandardIniFileName;// standard ini file name    
81
82     // static names
83     static const TString fgkBaseName ;          // base name
84     static const TString fgkIncludeName ;       // include name
85     static const TString fgkParameterName ;     // parameter name
86     static const TString fgkRegionName ;        // region name
87     static const TString fgkRuleName ;          // rule name
88     static const TString fgkNameName ;          // name name
89     static const TString fgkPedestalName ;      // pedestal name
90     static const TString fgkNoiseName ;         // noise name
91     static const TString fgkStateName ;         // state name
92     static const TString fgkMName ;             // M name
93     static const TString fgkMGName ;            // MG name
94     static const TString fgkMGCName ;           // MGC name
95     static const TString fgkIJName ;            // i,j name
96     static const TString fgkXYName ;            // x,y name
97     static const TString fgkZoneName ;          // zone name
98     static const TString fgkStickyOnName ;      // sticky on name
99     static const TString fgkStickyOffName ;     // sticky off
100     static const TString fgkFileName ;          // file name
101     static const TString fgkValueName ;         // value name
102     static const TString fgkGausName ;          // gauss name
103     static const TString fgkNotName ;           // not name
104     static const TString fgkNofSigmaName ;      // nof sigma name
105
106     // data members
107     AliMpPlane* fPlane[2];  // !The mapping planes
108     AliMpPlaneSegmentation* fPlaneSegmentation[2]; // !The mapping plane segmentation
109     TString fIniFileName[2];// file names for initialisation of each cathode
110
111     AliMUONSt1ResponseParameter* fDefaultParameters[2][fgkNofZones]; // !Response for each zone
112     TList fRulesList[2]; //! list of special rules
113
114     Int_t fCountNofCalls;    // number of calls to DigitResponse()
115     Int_t fCountUnknownZone; // ntimes the DigitResponse was called in an unknown zone
116     Int_t fCountUnknownIndices; // ntimes the DigitResponse was called with unknown indices
117
118     Int_t fChamber;                // The chamber number
119
120     ParamsMap  fParams;    //! internal parameter list
121     ListMap    fRegions;   //! internal list of regions
122     TList      fTrashList; //! internal trash list 
123
124   ClassDef(AliMUONSt1Response,1) // Overall detector response
125 };
126
127 #endif //ALI_MUON_ST1_RESPONSE_H