]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt1Response.h
Improved response simulation for station 1.
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1Response.h
CommitLineData
ba030c0e 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
24using std::string;
25using std::map;
26
27class MPlane;
28class MPlaneSegmentation;
29class MZone;
30class MSector;
31class TArrayF;
32class TObjArray;
33class AliMUONSt1ResponseParameter;
34
35class AliMUONSt1Response : public AliMUONResponseV0
36{
37public:
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 protected:
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 fgkConfigBaseName;
60 static const TString fgkStandardIniFileName;
61
62 // static names
63 static const TString fgkBaseName ;
64 static const TString fgkIncludeName ;
65 static const TString fgkParameterName ;
66 static const TString fgkRegionName ;
67 static const TString fgkRuleName ;
68 static const TString fgkNameName ;
69 static const TString fgkPedestalName ;
70 static const TString fgkNoiseName ;
71 static const TString fgkStateName ;
72 static const TString fgkMName ;
73 static const TString fgkMGName ;
74 static const TString fgkMGCName ;
75 static const TString fgkIJName ;
76 static const TString fgkXYName ;
77 static const TString fgkZoneName ;
78 static const TString fgkStickyOnName ;
79 static const TString fgkStickyOffName ;
80 static const TString fgkFileName ;
81 static const TString fgkValueName ;
82 static const TString fgkGausName ;
83 static const TString fgkNotName ;
84 static const TString fgkNofSigmaName ;
85
86 //protected methods
87 MZone* FindZone(MSector* sector,Int_t posId); // to be moved in MSector::
88 void ReadFiles();
89 void ReadIniFile(Int_t plane,const TString& fileName,Bool_t rdParam,Bool_t rdRegion,Bool_t rdRule);
90 void ReadIniFile(Int_t plane);
91 void ReadCouplesOfIntRanges(const string& value,TList* list,AliMUONSt1ElectronicElement::TDescription descr);
92 void ReadCouplesOfFloatRanges(const string& value,TList* list);
93 void SetPairToParam(const string& name,const string& value,AliMUONSt1ResponseParameter* param) const;
94 void SetPairToListElem(const string& name,const string& value,TList* list);
95
96
97 //data members
98 MPlane* fPlane[2]; // !The mapping planes
99 MPlaneSegmentation* fPlaneSegmentation[2]; // !The mapping plane segmentation
100 TString fIniFileName[2];// file names for initialisation of each cathode
101
102 AliMUONSt1ResponseParameter* fDefaultParameters[2][fgkNofZones]; // !Response for each zone
103 TList fRulesList[2]; //! list of special rules
104
105 Int_t fCountNofCalls; // number of calls to DigitResponse()
106 Int_t fCountUnknownZone; // ntimes the DigitResponse was called in an unknown zone
107 Int_t fCountUnknownIndices; // ntimes the DigitResponse was called with unknown indices
108
109 Int_t fChamber; // The chamber number
110
111 TParamsMap fParams; //! internal parameter list
112 TListMap fRegions; //! internal list of regions
113 TList fTrashList; //!internal trash list
114
115 ClassDef(AliMUONSt1Response,1) // Overall detector response
116};
117
118#endif //ALI_MUON_ST1_RESPONSE_H