- // Array of pointer of the AliMUONHitMapA1:
- // two HitMaps per chamber, or one HitMap per cahtode plane
- fHitMap = new AliMUONHitMapA1* [2*AliMUONConstants::NCh()];
-
- // Loop over chambers for the definition AliMUONHitMap
- for (Int_t i = 0; i < AliMUONConstants::NCh(); i++)
- {
- AliDebug(4,Form( "Creating hit map for chamber %d, cathode 1.", i+1));
- AliMUONChamber* chamber = &(fMUON->Chamber(i));
- AliSegmentation* c1Segmentation = chamber->SegmentationModel(1); // Cathode plane 1
- fHitMap[i] = new AliMUONHitMapA1(c1Segmentation, fTDList);
- AliDebug(4,Form( "Creating hit map for chamber %d, cathode 2.", i+1));
- AliSegmentation* c2Segmentation = chamber->SegmentationModel(2); // Cathode plane 2
- fHitMap[i+AliMUONConstants::NCh()] = new AliMUONHitMapA1(c2Segmentation, fTDList);
- };
-};
+ // Array of pointer of the AliMUONHitMapA1:
+ // two HitMaps per chamber, or one HitMap per cahtode plane
+ fHitMap = new AliMUONHitMapA1* [2*AliMUONConstants::NDetElem()];
+ for (Int_t i=0; i<2*AliMUONConstants::NDetElem(); i++) fHitMap[i] = 0x0;
+
+ Int_t k = 0;
+ Int_t idDE;
+
+ for (Int_t i = 0; i < AliMUONConstants::NCh(); i++) {
+
+
+ AliDebug(4,Form( "Creating hit map for chamber %d, cathode 1.", i+1));
+ AliMUONSegmentation* segmentation = fMUON->GetSegmentation();
+ AliMUONGeometrySegmentation* c1Segmentation
+ = segmentation->GetModuleSegmentation(i, 0); // Cathode plane 1
+ AliDebug(4,Form( "Creating hit map for chamber %d, cathode 2.", i+1));
+ AliMUONGeometrySegmentation* c2Segmentation
+ = segmentation->GetModuleSegmentation(i, 1); // Cathode plane 2
+
+ const AliMUONGeometryTransformer* kGeometryTransformer
+ = fMUON->GetGeometryTransformer();
+
+ AliMUONGeometryStore* detElements
+ = kGeometryTransformer->GetModuleTransformer(i)->GetDetElementStore();
+