1 #ifndef ALI_MUON_ST1_RESPONSE_H
2 #define ALI_MUON_ST1_RESPONSE_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8 // Revision of includes 07/05/2004
10 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
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
28 #include "AliMUONResponseV0.h"
29 #include "AliMUONSt1ElectronicElement.h"
32 class AliMpSectorSegmentation;
37 class AliMUONSt1ResponseParameter;
40 class AliMUONSt1Response : public AliMUONResponseV0
43 AliMUONSt1Response(AliMUONChamber* chamber);
45 virtual ~AliMUONSt1Response();
48 // Configuration methods
50 void SetIniFileName(Int_t plane,const TString& fileName);
52 virtual Float_t IntPH(Float_t eloss);
54 // Noise, zero-suppression, adc saturation
55 virtual Int_t DigitResponse(Int_t digit,AliMUONTransientDigit* where);
56 void PrintStatistics() const;
59 AliMUONSt1Response(const AliMUONSt1Response& rhs);
62 AliMUONSt1Response& operator=(const AliMUONSt1Response & rhs);
66 typedef map<string, AliMUONSt1ResponseParameter*> ParamsMap;
67 typedef map<string, TList*> ListMap;
70 const AliMUONGeometrySegmentation* GetGeometrySegmentation(Int_t cathod);
71 const AliMpSectorSegmentation* GetMpSegmentation(Int_t detElemId, Int_t cathod);
72 const AliMpSector* GetMpSector(Int_t detElemId, Int_t cathod);
73 AliMpZone* FindZone(const AliMpSector* sector,Int_t posId) const; // to be moved in AliMpSector::
75 void ReadIniFile(Int_t plane,const TString& fileName,Bool_t rdParam,Bool_t rdRegion,Bool_t rdRule);
76 void ReadIniFile(Int_t plane);
77 void ReadCouplesOfIntRanges(const string& value,TList* list,AliMUONSt1ElectronicElement::TDescription descr);
78 void ReadCouplesOfFloatRanges(const string& value,TList* list);
79 void SetPairToParam(const string& name,const string& value,AliMUONSt1ResponseParameter* param) const;
80 void SetPairToListElem(const string& name,const string& value,TList* list);
83 static const Int_t fgkNofZones=4; // number of zones
84 static const TString fgkTopDir; // top directory path
85 static const TString fgkDataDir; // data directory path
86 static const TString fgkConfigBaseName; // config file base name
87 static const TString fgkStandardIniFileName;// standard ini file name
90 static const TString fgkBaseName ; // base name
91 static const TString fgkIncludeName ; // include name
92 static const TString fgkParameterName ; // parameter name
93 static const TString fgkRegionName ; // region name
94 static const TString fgkRuleName ; // rule name
95 static const TString fgkNameName ; // name name
96 static const TString fgkPedestalName ; // pedestal name
97 static const TString fgkNoiseName ; // noise name
98 static const TString fgkStateName ; // state name
99 static const TString fgkMName ; // M name
100 static const TString fgkMGName ; // MG name
101 static const TString fgkMGCName ; // MGC name
102 static const TString fgkIJName ; // i,j name
103 static const TString fgkXYName ; // x,y name
104 static const TString fgkZoneName ; // zone name
105 static const TString fgkStickyOnName ; // sticky on name
106 static const TString fgkStickyOffName ; // sticky off
107 static const TString fgkFileName ; // file name
108 static const TString fgkValueName ; // value name
109 static const TString fgkGausName ; // gauss name
110 static const TString fgkNotName ; // not name
111 static const TString fgkNofSigmaName ; // nof sigma name
114 TString fIniFileName[2];// file names for initialisation of each cathode
115 Bool_t fReadFiles; // flag to read initalization files only once
117 AliMUONSt1ResponseParameter* fDefaultParameters[2][fgkNofZones]; // !Response for each zone
118 TList fRulesList[2]; //! list of special rules
120 Int_t fCountNofCalls; // number of calls to DigitResponse()
121 Int_t fCountUnknownZone; // ntimes the DigitResponse was called in an unknown zone
122 Int_t fCountUnknownIndices; // ntimes the DigitResponse was called with unknown indices
124 AliMUONChamber* fChamber; // The MUON chamber
126 ParamsMap fParams; //! internal parameter list
127 ListMap fRegions; //! internal list of regions
128 TList fTrashList; //! internal trash list
130 ClassDef(AliMUONSt1Response,1) // Overall detector response
133 #endif //ALI_MUON_ST1_RESPONSE_H