From 75b9419c85671b6a5b2cf1abc4943e11339d67d9 Mon Sep 17 00:00:00 2001 From: cussonno Date: Fri, 25 Feb 2005 05:32:20 +0000 Subject: [PATCH] Added customised streamer to AliMUONSt12QuadrantSegmentation (Ivana) --- MUON/AliMUONGeometryModule.cxx | 4 +++- MUON/AliMUONGeometrySegmentation.cxx | 25 ++++++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/MUON/AliMUONGeometryModule.cxx b/MUON/AliMUONGeometryModule.cxx index b5c815b0fef..f367f2ee2b9 100644 --- a/MUON/AliMUONGeometryModule.cxx +++ b/MUON/AliMUONGeometryModule.cxx @@ -320,7 +320,9 @@ AliMUONGeometryModule::GetDetElement(Int_t detElemId) const = (AliMUONGeometryDetElement*) fDetElements->Get(detElemId); if (!detElement) { - AliError(Form("Detection element %d not found", detElemId)); + AliErrorStream() + << "Detection element " << detElemId + << " not found in module " << fModuleId << endl; return 0; } diff --git a/MUON/AliMUONGeometrySegmentation.cxx b/MUON/AliMUONGeometrySegmentation.cxx index 3642930ba44..55149e6fc11 100644 --- a/MUON/AliMUONGeometrySegmentation.cxx +++ b/MUON/AliMUONGeometrySegmentation.cxx @@ -22,6 +22,10 @@ // // Author:Ivana Hrivnacova, IPN Orsay +/* $Id$ */ + +#include + #include "AliLog.h" #include "AliMUONGeometrySegmentation.h" @@ -33,7 +37,6 @@ ClassImp(AliMUONGeometrySegmentation) - //______________________________________________________________________________ AliMUONGeometrySegmentation::AliMUONGeometrySegmentation( AliMUONGeometryModule* geometry) @@ -241,7 +244,7 @@ Bool_t AliMUONGeometrySegmentation::GetPadC(Int_t detElemId, //______________________________________________________________________________ -void AliMUONGeometrySegmentation::Init(Int_t /*chamber*/) +void AliMUONGeometrySegmentation::Init(Int_t chamber) { // Initialize segmentation. // Check that all detection elements have segmanetation set @@ -256,9 +259,14 @@ void AliMUONGeometrySegmentation::Init(Int_t /*chamber*/) Int_t detElemId = detElements->GetEntry(i)->GetUniqueID(); // Check segmentation - if (! fDESegmentations->Get(detElemId) ) + if (! fDESegmentations->Get(detElemId) ) { AliError(Form("Detection element %d has not a segmentation set.", - detElements->GetEntry(i)->GetUniqueID())); + detElements->GetEntry(i)->GetUniqueID())); + } + else { + // Initialize DE Segmentation + ((AliSegmentation*)fDESegmentations->Get(detElemId))->Init(chamber); + } } } @@ -549,7 +557,6 @@ Int_t AliMUONGeometrySegmentation::SigGenCond(Int_t detElemId, return fCurrentSegmentation->SigGenCond(xl, yl, zl); } - //______________________________________________________________________________ void AliMUONGeometrySegmentation::SigGenInit(Int_t detElemId, Float_t xg, Float_t yg, Float_t zg) @@ -564,6 +571,14 @@ void AliMUONGeometrySegmentation::SigGenInit(Int_t detElemId, Float_t xl, yl, zl; fCurrentDetElement->Global2Local(xg, yg, zg, xl, yl, zl); + if (!fCurrentSegmentation->HasPad(xl, yl, zl)) { + AliWarningStream() + << "No pad at " << detElemId + << " global position: " << xg << " " << yg << " " << zg + << " local position: " << xl << " " << yl << " " << zl << endl; + return ; + } + fCurrentSegmentation->SigGenInit(xl, yl, zl); } -- 2.43.0