]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSegmentationDetectionElement.h
New classes for Segmentation and Mapping
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationDetectionElement.h
1 #ifndef ALIMUONSEGMENTATIONDETECTIONELEMENT_H
2 #define ALIMUONSEGMENTATIONDETECTIONELEMENT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //===========================================================
9 //  Segmentation classes for MUON Detection Elements      
10 //        Gines MARTINEZ, SUBATECH July 04                
11 //  This class interfaces with the mapping and segmentation
12 //  files MUON.
13 //  This files are placed by default in 
14 //  $ALICE_ROOT/MUON/mapping/data/Stationxxx/yyy_plane/
15 //  There are in tracking 23 types of detection elements
16 //  8 SectorSt1, 8 SectorSt2, 2 122000SR1, 2 122000NR1, 4 112200SR2, 4 112200NR2 
17 //  4 122200S, 4 122200N, 8 222000N,8 220000N,  8 330000N, 4 122300N, 8 112230NR3 
18 //  8 112230N, 8 222330N, 8 223300N, 16 333000N, 4  122330N, 8 112233NR3, 8 112233N 
19 //  8 222333N, 8 223330N, 8 333300N 
20 //  Detailed information in Alice Technical Note xxxxxxxx (2004)
21 //===========================================================
22 #include <Riostream.h>
23
24
25 #include <TObject.h>
26 #include <TString.h>
27 #include <TArrayF.h>
28
29 class TClonesArray;
30 class TMap;
31
32 class AliMUONSegmentManuIndex;
33 class AliMUONSegmentPosition;
34 class AliMUONSegmentIndex;
35
36 class AliMUONSegmentationDetectionElement : public TObject {
37  public:
38   AliMUONSegmentationDetectionElement();
39   //AliMUONSegmentationDetectionElement(const char* ElementType="");
40   virtual ~AliMUONSegmentationDetectionElement();
41   
42   AliMUONSegmentIndex     * GetIndex( const char * SegmentManuIndexName);
43   AliMUONSegmentManuIndex * GetManuIndex( const char * SegmentIndexName);
44   AliMUONSegmentPosition  * GetPosition( const char * SegmentIndexName);
45   TObjArray *            ListOfIndexes() {return fListOfIndexes;}
46   TObjArray *            ListOfManuIndexes() {return fListOfIndexes;}
47   TObjArray *            ListOfPositions() {return fListOfIndexes;}
48  
49   AliMUONSegmentManuIndex * FindManuIndex(const char* ManuIndexName="");
50   AliMUONSegmentManuIndex * FindIndex(const char* IndexName="");
51   
52   void     Init(const char * DetectionElementType="slat220000N");
53
54   void     ReadingSegmentationMappingFile(TString infile, Int_t cathode);
55   
56  protected:
57   AliMUONSegmentationDetectionElement(const AliMUONSegmentationDetectionElement& rhs);
58   
59  private:
60   // static data members  
61   static const TString fgkDefaultTop;  // 
62   static const TString fgkStationDir;  // 
63   static const TString fgkBendingDir;    //bending plane directory
64   static const TString fgkNonBendingDir; //non-bending plane directory
65   static const TString fgkFileExt;  // File extention
66   static const TString fgkBendingExt;  // bending file extention
67   static const TString fgkNonBendingExt;  // bending file extention
68
69   // data members
70   TString   fDetectionElementType;               //  Type of detection element St1Sector, slat220000N, etc ....
71   TString   fSegmentationMappingFile_Bending;    //  Segmentation & mapping file for bending plane
72   TString   fSegmentationMappingFile_NonBending; //  Segmentation & mapping file for non bending plane
73   TObjArray * fListOfIndexes;
74   TObjArray * fListOfManuIndexes;
75   TObjArray * fListOfPositions;
76   TMap *    fMapManuIndexIndex;  // Map with key ManuIndex and value = Index
77   TMap *    fMapIndexManuIndex;// Map with key ManuIndexIndex and value = ManuIndex
78   TMap *    fMapIndexPosition;// Map with key Index and value = Position
79   TArrayF * fXlocalSegmentPositions; // Array of posible values of Xlocal
80   TArrayF * fYlocalSegmentPositions;// Array of posible values of Ylocal
81   
82
83   ClassDef(AliMUONSegmentationDetectionElement,1) // Segmentation for MUON detection elements
84     
85     };
86 #endif
87
88
89
90
91
92