From 66f4c572593d33e3fd2f517a7eb0fcb83234162e Mon Sep 17 00:00:00 2001 From: ivana Date: Thu, 19 Oct 2006 09:27:01 +0000 Subject: [PATCH] Using AliMpDEManager for detElemId -> chamberId --- MUON/AliMUONClusterReconstructor.cxx | 5 ++++- MUON/AliMUONDigitMaker.cxx | 4 ++-- MUON/AliMUONDigitizerV3.cxx | 4 +++- MUON/AliMUONSDigitizerV2.cxx | 4 +++- MUON/MUONCDB.C | 3 +-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/MUON/AliMUONClusterReconstructor.cxx b/MUON/AliMUONClusterReconstructor.cxx index 7301c18ae07..ec679daae87 100644 --- a/MUON/AliMUONClusterReconstructor.cxx +++ b/MUON/AliMUONClusterReconstructor.cxx @@ -33,6 +33,9 @@ #include "AliMUONClusterFinderVS.h" #include "AliMUONClusterInput.h" #include "AliMUONRawCluster.h" + +#include "AliMpDEManager.h" + #include "AliLog.h" ClassImp(AliMUONClusterReconstructor) // Class implementation in ROOT context @@ -70,7 +73,7 @@ AliMUONClusterReconstructor::ClusterizeOneDE(Int_t detElemId) if ( fDigitsCath0->GetEntriesFast() || fDigitsCath1->GetEntriesFast() ) { - Int_t iChamber = detElemId/100 - 1; + Int_t iChamber = AliMpDEManager::GetChamberId(detElemId); AliMUONClusterInput::Instance()->SetDigits(iChamber, detElemId, fDigitsCath0,fDigitsCath1); AliDebug(3,Form("ClusterizeOneDE iChamber=%d DE=%d",iChamber,detElemId)); diff --git a/MUON/AliMUONDigitMaker.cxx b/MUON/AliMUONDigitMaker.cxx index 3255dd3c1ec..dbf58e2b050 100644 --- a/MUON/AliMUONDigitMaker.cxx +++ b/MUON/AliMUONDigitMaker.cxx @@ -247,7 +247,7 @@ Int_t AliMUONDigitMaker::ReadTrackerDDL(AliRawReader* rawReader) } // fill digits - iChamber = fDigit->DetElemId()/100 - 1; + iChamber = AliMpDEManager::GetChamberId(fDigit->DetElemId()); if (fDigitFlag) fMUONData->AddDigit(iChamber, *fDigit); @@ -390,7 +390,7 @@ Int_t AliMUONDigitMaker::ReadTriggerDDL(AliRawReader* rawReader) AliMUONDigit* digit = (AliMUONDigit*)digitList.At(iEntry); // filling S container - Int_t iChamber = digit->DetElemId()/100 - 1; + Int_t iChamber = AliMpDEManager::GetChamberId(digit->DetElemId()); fMUONData->AddSDigit(iChamber, *digit); } diff --git a/MUON/AliMUONDigitizerV3.cxx b/MUON/AliMUONDigitizerV3.cxx index 4ae62678c6b..13e2ea81e71 100644 --- a/MUON/AliMUONDigitizerV3.cxx +++ b/MUON/AliMUONDigitizerV3.cxx @@ -34,6 +34,7 @@ #include "AliMpPad.h" #include "AliMpStationType.h" #include "AliMpVSegmentation.h" +#include "AliMpDEManager.h" #include "AliRun.h" #include "AliRunDigitizer.h" #include "AliRunLoader.h" @@ -567,7 +568,8 @@ AliMUONDigitizerV3::GenerateNoisyDigitsForOneCathode(Int_t detElemId, Int_t cath // Called by GenerateNoisyDigits() // - TClonesArray* digits = fOutputData->Digits(detElemId/100-1); + Int_t chamberId = AliMpDEManager::GetChamberId(detElemId); + TClonesArray* digits = fOutputData->Digits(chamberId); const AliMpVSegmentation* seg = Segmentation()->GetMpSegmentation(detElemId,cathode); Int_t nofPads = seg->NofPads(); diff --git a/MUON/AliMUONSDigitizerV2.cxx b/MUON/AliMUONSDigitizerV2.cxx index 942d5e06984..ef0a7e63510 100644 --- a/MUON/AliMUONSDigitizerV2.cxx +++ b/MUON/AliMUONSDigitizerV2.cxx @@ -23,11 +23,13 @@ #include "AliMUONData.h" #include "AliMUONDigit.h" #include "AliMUONHit.h" +#include "AliMpDEManager.h" #include "AliLoader.h" #include "AliRun.h" #include "AliRunLoader.h" #include "TObjArray.h" + /// /// The sdigitizer performs the transformation from hits (energy deposits by /// the transport code) to sdigits (equivalent of charges on pad). @@ -152,7 +154,7 @@ AliMUONSDigitizerV2::Exec(Option_t*) if ( d->Signal() > 0 ) // that check would be better in the disintegrate // method, but to compare with old sdigitizer, it has to be there. { - muonData.AddSDigit(d->DetElemId()/100-1,*d); + muonData.AddSDigit(AliMpDEManager::GetChamberId(d->DetElemId()),*d); } } muonData.Fill("S"); diff --git a/MUON/MUONCDB.C b/MUON/MUONCDB.C index e2a23224018..25d72d843dc 100644 --- a/MUON/MUONCDB.C +++ b/MUON/MUONCDB.C @@ -227,8 +227,7 @@ void plotCDB(const char* calibType) { Int_t detElemId = p->GetFirst(); Int_t manuId = p->GetSecond(); - - Int_t station = detElemId/100 - 1; + Int_t station = AliMpDEmanager::GetChamberId(detElemId); AliMUONVCalibParam* value = dynamic_cast(store->Get(detElemId,manuId)); -- 2.43.0