]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSt1Response.h
Restoring raw data fit from version of 29-Aug-2004
[u/mrichter/AliRoot.git] / MUON / AliMUONSt1Response.h
index 531d41dbc2c790de583767239bef1390294c0881..72784e3750e19acbb3f38e0a25f38980d8848a57 100644 (file)
@@ -5,6 +5,7 @@
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
+// Revision of includes 07/05/2004
 
 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
 //
 // Individual pedestals or noise levels can be controlled separately. 
 // The current pulse height responses do not contain any physics
 
-#include <string>
 #include <map>
+#include <string>
+#ifndef __HP_aCC
+using std::map;
+using std::string;
+#endif
+
 #include <TString.h>
 #include <TList.h>
+
 #include "AliMUONResponseV0.h"
 #include "AliMUONSt1ElectronicElement.h"
 
-using std::string;
-using std::map;
-
-class MPlane;
-class MPlaneSegmentation;
-class MZone;
-class MSector;
+class AliMpSector;
+class AliMpSectorSegmentation;
+class AliMpZone;
+class AliMpSector;
 class TArrayF;
 class TObjArray;
 class AliMUONSt1ResponseParameter;
+class AliMUONChamber;
 
 class AliMUONSt1Response : public AliMUONResponseV0 
 {
-public:
-    AliMUONSt1Response(Int_t chamber=1);
+  public:
+    AliMUONSt1Response(AliMUONChamber* chamber);
+    AliMUONSt1Response();
     virtual ~AliMUONSt1Response();
     
     //
@@ -49,44 +55,22 @@ public:
     virtual Int_t DigitResponse(Int_t digit,AliMUONTransientDigit* where);
     void PrintStatistics() const;
 
+  protected:
+    AliMUONSt1Response(const AliMUONSt1Response& rhs);
 
-private:
+    // operators
+    AliMUONSt1Response& operator=(const AliMUONSt1Response & rhs);
 
-   //private types
-    typedef map<string,AliMUONSt1ResponseParameter*> TParamsMap;
-    typedef map<string,TList*> TListMap;
-    static const Int_t fgkNofZones=4;
-    static const TString fgkTopDir;
-    static const TString fgkDataDir;
-    static const TString fgkConfigBaseName;
-    static const TString fgkStandardIniFileName;    
+  private:
+    // typedefs
+    typedef map<string, AliMUONSt1ResponseParameter*> ParamsMap;
+    typedef map<string, TList*>  ListMap;
 
-    // static names
-    static const TString fgkBaseName ;
-    static const TString fgkIncludeName ;
-    static const TString fgkParameterName ;
-    static const TString fgkRegionName ;
-    static const TString fgkRuleName ;
-    static const TString fgkNameName ;
-    static const TString fgkPedestalName ;
-    static const TString fgkNoiseName ;
-    static const TString fgkStateName ;
-    static const TString fgkMName ;
-    static const TString fgkMGName ;
-    static const TString fgkMGCName ;
-    static const TString fgkIJName ;
-    static const TString fgkXYName ;
-    static const TString fgkZoneName ;
-    static const TString fgkStickyOnName ;
-    static const TString fgkStickyOffName ;
-    static const TString fgkFileName ;
-    static const TString fgkValueName ;
-    static const TString fgkGausName ;
-    static const TString fgkNotName ;
-    static const TString fgkNofSigmaName ;
-
-    //protected methods
-    MZone* FindZone(MSector* sector,Int_t posId); // to be moved in MSector::
+    // private methods
+    const AliMUONGeometrySegmentation* GetGeometrySegmentation(Int_t cathod);
+    const AliMpSectorSegmentation*     GetMpSegmentation(Int_t detElemId, Int_t cathod);
+    const AliMpSector*                 GetMpSector(Int_t detElemId, Int_t cathod);
+    AliMpZone* FindZone(const AliMpSector* sector,Int_t posId) const; // to be moved in AliMpSector::
     void ReadFiles();
     void ReadIniFile(Int_t plane,const TString& fileName,Bool_t rdParam,Bool_t rdRegion,Bool_t rdRule);
     void ReadIniFile(Int_t plane);
@@ -95,12 +79,41 @@ private:
     void SetPairToParam(const string& name,const string& value,AliMUONSt1ResponseParameter* param) const;
     void SetPairToListElem(const string& name,const string& value,TList* list);
 
+    // private constants
+    static const Int_t fgkNofZones=4;           // number of zones
+    static const TString fgkTopDir;             // top directory path
+    static const TString fgkDataDir;            // data directory path
+    static const TString fgkConfigBaseName;     // config file base name
+    static const TString fgkStandardIniFileName;// standard ini file name    
 
-    //data members
-    MPlane* fPlane[2];       // !The mapping planes
-    MPlaneSegmentation* fPlaneSegmentation[2]; // !The mapping plane segmentation
+    // static names
+    static const TString fgkBaseName ;          // base name
+    static const TString fgkIncludeName ;       // include name
+    static const TString fgkParameterName ;     // parameter name
+    static const TString fgkRegionName ;        // region name
+    static const TString fgkRuleName ;          // rule name
+    static const TString fgkNameName ;          // name name
+    static const TString fgkPedestalName ;      // pedestal name
+    static const TString fgkNoiseName ;         // noise name
+    static const TString fgkStateName ;         // state name
+    static const TString fgkMName ;             // M name
+    static const TString fgkMGName ;            // MG name
+    static const TString fgkMGCName ;           // MGC name
+    static const TString fgkIJName ;            // i,j name
+    static const TString fgkXYName ;            // x,y name
+    static const TString fgkZoneName ;          // zone name
+    static const TString fgkStickyOnName ;      // sticky on name
+    static const TString fgkStickyOffName ;     // sticky off
+    static const TString fgkFileName ;          // file name
+    static const TString fgkValueName ;         // value name
+    static const TString fgkGausName ;          // gauss name
+    static const TString fgkNotName ;           // not name
+    static const TString fgkNofSigmaName ;      // nof sigma name
+
+    // data members
     TString fIniFileName[2];// file names for initialisation of each cathode
-
+    Bool_t  fReadFiles;     // flag to read initalization files only once
+    
     AliMUONSt1ResponseParameter* fDefaultParameters[2][fgkNofZones]; // !Response for each zone
     TList fRulesList[2]; //! list of special rules
 
@@ -108,11 +121,11 @@ private:
     Int_t fCountUnknownZone; // ntimes the DigitResponse was called in an unknown zone
     Int_t fCountUnknownIndices; // ntimes the DigitResponse was called with unknown indices
 
-    Int_t fChamber;                // The chamber number
+    AliMUONChamber* fChamber;   // The MUON chamber
 
-    TParamsMap fParams;  //! internal parameter list
-    TListMap   fRegions; //! internal list of regions
-    TList      fTrashList; //!internal trash list 
+    ParamsMap  fParams;    //! internal parameter list
+    ListMap    fRegions;   //! internal list of regions
+    TList      fTrashList; //! internal trash list 
 
   ClassDef(AliMUONSt1Response,1) // Overall detector response
 };