]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt1Response.h
Updated with refactoring of geometry & segmentation classes;
[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$ */
30178c30 8// Revision of includes 07/05/2004
ba030c0e 9
692de412 10/// \ingroup sim
11/// \class AliMUONSt1Response
12/// \brief Detailed response class for station 1
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/// Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
ba030c0e 19
79637e23 20#include <map>
1df92d74 21#include <string>
79637e23 22#ifndef __HP_aCC
1df92d74 23using std::map;
24using std::string;
79637e23 25#endif
26
ba030c0e 27#include <TString.h>
28#include <TList.h>
79637e23 29
ba030c0e 30#include "AliMUONResponseV0.h"
31#include "AliMUONSt1ElectronicElement.h"
32
7b629e21 33class AliMpSector;
34class AliMpSectorSegmentation;
5f91c9e8 35class AliMpZone;
36class AliMpSector;
ba030c0e 37class TArrayF;
38class TObjArray;
39class AliMUONSt1ResponseParameter;
b7ef3c96 40//class AliMUONChamber;
ba030c0e 41
42class AliMUONSt1Response : public AliMUONResponseV0
43{
30178c30 44 public:
b7ef3c96 45 AliMUONSt1Response(Int_t chamberId);
7b629e21 46 AliMUONSt1Response();
ba030c0e 47 virtual ~AliMUONSt1Response();
48
49 //
50 // Configuration methods
51 //
52 void SetIniFileName(Int_t plane,const TString& fileName);
53
54 virtual Float_t IntPH(Float_t eloss);
55
56 // Noise, zero-suppression, adc saturation
57 virtual Int_t DigitResponse(Int_t digit,AliMUONTransientDigit* where);
58 void PrintStatistics() const;
59
30178c30 60 protected:
61 AliMUONSt1Response(const AliMUONSt1Response& rhs);
62
63 // operators
64 AliMUONSt1Response& operator=(const AliMUONSt1Response & rhs);
ba030c0e 65
30178c30 66 private:
79637e23 67 // typedefs
68 typedef map<string, AliMUONSt1ResponseParameter*> ParamsMap;
69 typedef map<string, TList*> ListMap;
70
3c25381f 71 // private methods
7b629e21 72 const AliMUONGeometrySegmentation* GetGeometrySegmentation(Int_t cathod);
73 const AliMpSectorSegmentation* GetMpSegmentation(Int_t detElemId, Int_t cathod);
74 const AliMpSector* GetMpSector(Int_t detElemId, Int_t cathod);
75 AliMpZone* FindZone(const AliMpSector* sector,Int_t posId) const; // to be moved in AliMpSector::
ba030c0e 76 void ReadFiles();
77 void ReadIniFile(Int_t plane,const TString& fileName,Bool_t rdParam,Bool_t rdRegion,Bool_t rdRule);
78 void ReadIniFile(Int_t plane);
79 void ReadCouplesOfIntRanges(const string& value,TList* list,AliMUONSt1ElectronicElement::TDescription descr);
80 void ReadCouplesOfFloatRanges(const string& value,TList* list);
81 void SetPairToParam(const string& name,const string& value,AliMUONSt1ResponseParameter* param) const;
82 void SetPairToListElem(const string& name,const string& value,TList* list);
83
3c25381f 84 // private constants
85 static const Int_t fgkNofZones=4; // number of zones
86 static const TString fgkTopDir; // top directory path
87 static const TString fgkDataDir; // data directory path
88 static const TString fgkConfigBaseName; // config file base name
89 static const TString fgkStandardIniFileName;// standard ini file name
ba030c0e 90
3c25381f 91 // static names
92 static const TString fgkBaseName ; // base name
93 static const TString fgkIncludeName ; // include name
94 static const TString fgkParameterName ; // parameter name
95 static const TString fgkRegionName ; // region name
96 static const TString fgkRuleName ; // rule name
97 static const TString fgkNameName ; // name name
98 static const TString fgkPedestalName ; // pedestal name
99 static const TString fgkNoiseName ; // noise name
100 static const TString fgkStateName ; // state name
101 static const TString fgkMName ; // M name
102 static const TString fgkMGName ; // MG name
103 static const TString fgkMGCName ; // MGC name
104 static const TString fgkIJName ; // i,j name
105 static const TString fgkXYName ; // x,y name
106 static const TString fgkZoneName ; // zone name
107 static const TString fgkStickyOnName ; // sticky on name
108 static const TString fgkStickyOffName ; // sticky off
109 static const TString fgkFileName ; // file name
110 static const TString fgkValueName ; // value name
111 static const TString fgkGausName ; // gauss name
112 static const TString fgkNotName ; // not name
113 static const TString fgkNofSigmaName ; // nof sigma name
114
115 // data members
ba030c0e 116 TString fIniFileName[2];// file names for initialisation of each cathode
7b629e21 117 Bool_t fReadFiles; // flag to read initalization files only once
118
ba030c0e 119 AliMUONSt1ResponseParameter* fDefaultParameters[2][fgkNofZones]; // !Response for each zone
120 TList fRulesList[2]; //! list of special rules
121
122 Int_t fCountNofCalls; // number of calls to DigitResponse()
123 Int_t fCountUnknownZone; // ntimes the DigitResponse was called in an unknown zone
124 Int_t fCountUnknownIndices; // ntimes the DigitResponse was called with unknown indices
125
b7ef3c96 126 Int_t fChamberId; // The MUON chamber Id
ba030c0e 127
79637e23 128 ParamsMap fParams; //! internal parameter list
129 ListMap fRegions; //! internal list of regions
130 TList fTrashList; //! internal trash list
ba030c0e 131
132 ClassDef(AliMUONSt1Response,1) // Overall detector response
133};
134
135#endif //ALI_MUON_ST1_RESPONSE_H