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
26 #include "AliMUONResponseV0.h"
27 #include "AliMUONSt1ElectronicElement.h"
30 class AliMpSectorSegmentation;
35 class AliMUONSt1ResponseParameter;
38 class AliMUONSt1Response : public AliMUONResponseV0
41 AliMUONSt1Response(AliMUONChamber* chamber);
43 virtual ~AliMUONSt1Response();
46 // Configuration methods
48 void SetIniFileName(Int_t plane,const TString& fileName);
50 virtual Float_t IntPH(Float_t eloss);
52 // Noise, zero-suppression, adc saturation
53 virtual Int_t DigitResponse(Int_t digit,AliMUONTransientDigit* where);
54 void PrintStatistics() const;
57 AliMUONSt1Response(const AliMUONSt1Response& rhs);
60 AliMUONSt1Response& operator=(const AliMUONSt1Response & rhs);
64 typedef map<string, AliMUONSt1ResponseParameter*> ParamsMap;
65 typedef map<string, TList*> ListMap;
68 const AliMUONGeometrySegmentation* GetGeometrySegmentation(Int_t cathod);
69 const AliMpSectorSegmentation* GetMpSegmentation(Int_t detElemId, Int_t cathod);
70 const AliMpSector* GetMpSector(Int_t detElemId, Int_t cathod);
71 AliMpZone* FindZone(const AliMpSector* sector,Int_t posId) const; // to be moved in AliMpSector::
73 void ReadIniFile(Int_t plane,const TString& fileName,Bool_t rdParam,Bool_t rdRegion,Bool_t rdRule);
74 void ReadIniFile(Int_t plane);
75 void ReadCouplesOfIntRanges(const string& value,TList* list,AliMUONSt1ElectronicElement::TDescription descr);
76 void ReadCouplesOfFloatRanges(const string& value,TList* list);
77 void SetPairToParam(const string& name,const string& value,AliMUONSt1ResponseParameter* param) const;
78 void SetPairToListElem(const string& name,const string& value,TList* list);
81 static const Int_t fgkNofZones=4; // number of zones
82 static const TString fgkTopDir; // top directory path
83 static const TString fgkDataDir; // data directory path
84 static const TString fgkConfigBaseName; // config file base name
85 static const TString fgkStandardIniFileName;// standard ini file name
88 static const TString fgkBaseName ; // base name
89 static const TString fgkIncludeName ; // include name
90 static const TString fgkParameterName ; // parameter name
91 static const TString fgkRegionName ; // region name
92 static const TString fgkRuleName ; // rule name
93 static const TString fgkNameName ; // name name
94 static const TString fgkPedestalName ; // pedestal name
95 static const TString fgkNoiseName ; // noise name
96 static const TString fgkStateName ; // state name
97 static const TString fgkMName ; // M name
98 static const TString fgkMGName ; // MG name
99 static const TString fgkMGCName ; // MGC name
100 static const TString fgkIJName ; // i,j name
101 static const TString fgkXYName ; // x,y name
102 static const TString fgkZoneName ; // zone name
103 static const TString fgkStickyOnName ; // sticky on name
104 static const TString fgkStickyOffName ; // sticky off
105 static const TString fgkFileName ; // file name
106 static const TString fgkValueName ; // value name
107 static const TString fgkGausName ; // gauss name
108 static const TString fgkNotName ; // not name
109 static const TString fgkNofSigmaName ; // nof sigma name
112 TString fIniFileName[2];// file names for initialisation of each cathode
113 Bool_t fReadFiles; // flag to read initalization files only once
115 AliMUONSt1ResponseParameter* fDefaultParameters[2][fgkNofZones]; // !Response for each zone
116 TList fRulesList[2]; //! list of special rules
118 Int_t fCountNofCalls; // number of calls to DigitResponse()
119 Int_t fCountUnknownZone; // ntimes the DigitResponse was called in an unknown zone
120 Int_t fCountUnknownIndices; // ntimes the DigitResponse was called with unknown indices
122 AliMUONChamber* fChamber; // The MUON chamber
124 ParamsMap fParams; //! internal parameter list
125 ListMap fRegions; //! internal list of regions
126 TList fTrashList; //! internal trash list
128 ClassDef(AliMUONSt1Response,1) // Overall detector response
131 #endif //ALI_MUON_ST1_RESPONSE_H