From 866c3232dbee4cf53d91acffd042fc6f9c5f8ad9 Mon Sep 17 00:00:00 2001 From: ivana Date: Thu, 25 Jan 2007 16:53:05 +0000 Subject: [PATCH] - All mapping enums within namespace (AliMp). - Cathod types now defined via AliMpCathodType. --- MUON/AliMUONClusterFinderSimpleFit.cxx | 4 +-- MUON/AliMUONClusterReconstructor.cxx | 8 +++-- MUON/AliMUONClusterSplitterMLEM.cxx | 23 ++++++------- MUON/AliMUONDigitizerV3.cxx | 19 ++++++----- MUON/AliMUONDisplay.cxx | 20 ++++++----- MUON/AliMUONResponseTrigger.cxx | 6 ++-- MUON/AliMUONResponseTriggerV1.cxx | 6 ++-- MUON/AliMUONResponseV0.cxx | 6 ++-- MUON/AliMUONSegFactory.cxx | 42 +++++++++++++----------- MUON/AliMUONSegFactory.h | 5 +-- MUON/AliMUONSt12QuadrantSegmentation.cxx | 36 ++++++++++---------- MUON/AliMUONSt12QuadrantSegmentation.h | 8 ++--- MUON/AliMUONSt1GeometryBuilderV2.cxx | 10 +++--- MUON/AliMUONSt345SlatSegmentation.cxx | 6 ++-- MUON/AliMUONSt345SlatSegmentation.h | 4 +-- MUON/AliMUONTriggerChamberEff.cxx | 12 ++++--- MUON/AliMUONTriggerCircuit.cxx | 19 +++++++---- MUON/AliMUONTriggerElectronics.cxx | 4 ++- MUON/AliMUONTriggerSegmentation.cxx | 26 +++++++-------- MUON/AliMUONTriggerSegmentation.h | 4 +-- 20 files changed, 148 insertions(+), 120 deletions(-) diff --git a/MUON/AliMUONClusterFinderSimpleFit.cxx b/MUON/AliMUONClusterFinderSimpleFit.cxx index 45097964225..6ed4dbb0afe 100644 --- a/MUON/AliMUONClusterFinderSimpleFit.cxx +++ b/MUON/AliMUONClusterFinderSimpleFit.cxx @@ -133,13 +133,13 @@ AliMUONClusterFinderSimpleFit::Prepare(const AliMpVSegmentation* segmentations[2 return kFALSE; } - AliMpStationType stationType = AliMpDEManager::GetStationType(detElemId); + AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId); Float_t kx3 = AliMUONConstants::SqrtKx3(); Float_t ky3 = AliMUONConstants::SqrtKy3(); Float_t pitch = AliMUONConstants::Pitch(); - if ( stationType == kStation1 ) + if ( stationType == AliMp::kStation1 ) { kx3 = AliMUONConstants::SqrtKx3St1(); ky3 = AliMUONConstants::SqrtKy3St1(); diff --git a/MUON/AliMUONClusterReconstructor.cxx b/MUON/AliMUONClusterReconstructor.cxx index 68ac3ec8c7e..29e29398c8c 100644 --- a/MUON/AliMUONClusterReconstructor.cxx +++ b/MUON/AliMUONClusterReconstructor.cxx @@ -36,6 +36,7 @@ #include "AliMUONCluster.h" #include "AliMpDEManager.h" #include "AliMpSegmentation.h" +#include "AliMpCathodType.h" #include "AliMUONGeometryTransformer.h" #include "AliLog.h" @@ -80,10 +81,13 @@ AliMUONClusterReconstructor::~AliMUONClusterReconstructor(void) void AliMUONClusterReconstructor::ClusterizeOneDEV2(Int_t detElemId) { +/// Clusterize one detection element, and let fMUONData know about +/// the results. + AliDebug(1,Form("DE %d",detElemId)); const AliMpVSegmentation* seg[2] = - { AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,0), - AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,1) + { AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,AliMp::kCath0), + AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,AliMp::kCath1) }; diff --git a/MUON/AliMUONClusterSplitterMLEM.cxx b/MUON/AliMUONClusterSplitterMLEM.cxx index 19563f56114..601db21f4fb 100644 --- a/MUON/AliMUONClusterSplitterMLEM.cxx +++ b/MUON/AliMUONClusterSplitterMLEM.cxx @@ -24,17 +24,8 @@ /// \author Laurent Aphecetche (for the "new" C++ structure) and /// Alexander Zinchenko, JINR Dubna, for the hardcore of it ;-) -#include -#include -#include -#include -#include -#include -#include - #include "AliMUONClusterSplitterMLEM.h" -#include "AliLog.h" #include "AliMUONCluster.h" #include "AliMUONPad.h" #include "AliMUONPad.h" @@ -43,6 +34,16 @@ #include "AliMpDEManager.h" #include "AliMUONMathieson.h" +#include "AliLog.h" + +#include +#include +#include +#include +#include +#include +#include + ClassImp(AliMUONClusterSplitterMLEM) const Double_t AliMUONClusterSplitterMLEM::fgkCouplMin = 1.e-3; // threshold on coupling @@ -60,13 +61,13 @@ fnCoupled(0) { /// Constructor - AliMpStationType stationType = AliMpDEManager::GetStationType(fDetElemId); + AliMp::StationType stationType = AliMpDEManager::GetStationType(fDetElemId); Float_t kx3 = AliMUONConstants::SqrtKx3(); Float_t ky3 = AliMUONConstants::SqrtKy3(); Float_t pitch = AliMUONConstants::Pitch(); - if ( stationType == kStation1 ) + if ( stationType == AliMp::kStation1 ) { kx3 = AliMUONConstants::SqrtKx3St1(); ky3 = AliMUONConstants::SqrtKy3St1(); diff --git a/MUON/AliMUONDigitizerV3.cxx b/MUON/AliMUONDigitizerV3.cxx index 3f236f0bb62..c54f44bb0f7 100644 --- a/MUON/AliMUONDigitizerV3.cxx +++ b/MUON/AliMUONDigitizerV3.cxx @@ -16,11 +16,6 @@ // $Id$ -#include -#include -#include -#include -#include #include "AliMUONDigitizerV3.h" #include "AliMUON.h" @@ -42,12 +37,18 @@ #include "AliMpSegmentation.h" #include "AliMpVSegmentation.h" #include "AliMpDEManager.h" +#include "AliMpCathodType.h" #include "AliRun.h" #include "AliRunDigitizer.h" #include "AliRunLoader.h" #include "AliLog.h" +#include +#include +#include +#include +#include /// /// \class AliMUONDigitizerV3 /// The digitizer is performing the transformation to go from SDigits (digits @@ -218,8 +219,8 @@ AliMUONDigitizerV3::ApplyResponseToTriggerDigit(AliMUONDigit& digit, AliMpSegmentation* segmentation = AliMpSegmentation::Instance(); const AliMpVSegmentation* segment[2] = { - segmentation->GetMpSegmentation(detElemId,digit.Cathode()), - segmentation->GetMpSegmentation(detElemId,correspondingDigit->Cathode()) + segmentation->GetMpSegmentation(detElemId,AliMp::GetCathodType(digit.Cathode())), + segmentation->GetMpSegmentation(detElemId,AliMp::GetCathodType(correspondingDigit->Cathode())) }; AliMpPad pad[2] = @@ -531,7 +532,7 @@ AliMUONDigitizerV3::GenerateNoisyDigits() { for ( Int_t cathode = 0; cathode < 2; ++cathode ) { - GenerateNoisyDigitsForOneCathode(it.CurrentDE(),cathode); + GenerateNoisyDigitsForOneCathode(it.CurrentDEId(),cathode); } it.Next(); } @@ -551,7 +552,7 @@ AliMUONDigitizerV3::GenerateNoisyDigitsForOneCathode(Int_t detElemId, Int_t cath TClonesArray* digits = fOutputData->Digits(chamberId); const AliMpVSegmentation* seg - = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cathode); + = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,AliMp::GetCathodType(cathode)); Int_t nofPads = seg->NofPads(); Int_t maxIx = seg->MaxPadIndexX(); diff --git a/MUON/AliMUONDisplay.cxx b/MUON/AliMUONDisplay.cxx index b68efd472d1..02d5c56522b 100644 --- a/MUON/AliMUONDisplay.cxx +++ b/MUON/AliMUONDisplay.cxx @@ -89,6 +89,7 @@ #include "AliMpTriggerSegmentation.h" #include "AliMpTrigger.h" #include "AliMpStationType.h" +#include "AliMpCathodType.h" #include "AliMpDEManager.h" #include "AliMC.h" @@ -810,9 +811,9 @@ void AliMUONDisplay::DrawView(Float_t theta, Float_t phi, Float_t psi) AliMpDEIterator it; for ( it.First(fChamber-1); ! it.IsDone(); it.Next() ) { - Int_t detElemId = it.CurrentDE(); + Int_t detElemId = it.CurrentDEId(); AliMpSectorSegmentation * seg = - (AliMpSectorSegmentation *) AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, 0); + (AliMpSectorSegmentation *) AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, AliMp::kCath0); const AliMpSector * sector = seg->GetSector(); // get sector measurements @@ -850,13 +851,13 @@ void AliMUONDisplay::DrawView(Float_t theta, Float_t phi, Float_t psi) AliMpDEIterator it; for ( it.First(fChamber-1); ! it.IsDone(); it.Next() ) { - Int_t detElemId = it.CurrentDE(); - AliMpStationType stationType = AliMpDEManager::GetStationType(detElemId); + Int_t detElemId = it.CurrentDEId(); + AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId); if ( segmentation->HasDE(detElemId) ) { const AliMpVSegmentation* seg - = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, 0); + = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, AliMp::kCath0); if (seg) { Float_t deltax = seg->Dimensions().X(); @@ -875,10 +876,10 @@ void AliMUONDisplay::DrawView(Float_t theta, Float_t phi, Float_t psi) TMarker3DBox* box = new TMarker3DBox(xCenter,yCenter,0,xlocal1,ylocal2,0,0,0); box->SetFillStyle(0); - box->SetLineColor( stationType == kStationTrigger ? 4 : 2); + box->SetLineColor( stationType == AliMp::kStationTrigger ? 4 : 2); box->Draw("s"); - if ( stationType == kStation345 ) + if ( stationType == AliMp::kStation345 ) { // drawing inner circle + disc TPolyLine3D* poly = new TPolyLine3D(); @@ -1061,7 +1062,7 @@ void AliMUONDisplay::LoadDigits(Int_t chamber, Int_t cathode) } Int_t ndigits = muonDigits->GetEntriesFast(); - if (ndigits == 0) return; + if (ndigits == 0) return; if (fPoints == 0) fPoints = new TObjArray(ndigits); Float_t zpos = AliMUONConstants::DefaultChamberZ(chamber-1); @@ -1175,7 +1176,8 @@ void AliMUONDisplay::LoadDigits(Int_t chamber, Int_t cathode) if (color > 282) color = 282; const AliMpVSegmentation* seg = - AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cathode-1); + AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cathode-1)); AliMpPad pad = seg->PadByIndices(AliMpIntPair(ix,iy),kTRUE); diff --git a/MUON/AliMUONResponseTrigger.cxx b/MUON/AliMUONResponseTrigger.cxx index f48217a4753..72af7cb0456 100644 --- a/MUON/AliMUONResponseTrigger.cxx +++ b/MUON/AliMUONResponseTrigger.cxx @@ -32,6 +32,7 @@ #include "AliMUONConstants.h" #include "AliMpPad.h" +#include "AliMpCathodType.h" #include "AliMpPlaneType.h" #include "AliMpSegmentation.h" #include "AliMpVSegmentation.h" @@ -108,10 +109,11 @@ AliMUONResponseTrigger::DisIntegrate(const AliMUONHit& hit, TList& digits) twentyNano=1; } - for ( Int_t cath = 0; cath < 2; ++cath ) + for ( Int_t cath = AliMp::kCath0; cath <= AliMp::kCath1; ++cath ) { const AliMpVSegmentation* seg - = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cath); + = AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cath)); AliMpPad pad = seg->PadByPosition(TVector2(x,y),kFALSE); Int_t ix = pad.GetIndices().GetFirst(); diff --git a/MUON/AliMUONResponseTriggerV1.cxx b/MUON/AliMUONResponseTriggerV1.cxx index b4d9836220b..340bd8289e7 100644 --- a/MUON/AliMUONResponseTriggerV1.cxx +++ b/MUON/AliMUONResponseTriggerV1.cxx @@ -32,6 +32,7 @@ #include "AliMpPad.h" #include "AliMpSegmentation.h" #include "AliMpVSegmentation.h" +#include "AliMpCathodType.h" #include "AliRun.h" @@ -154,10 +155,11 @@ void AliMUONResponseTriggerV1::DisIntegrate(const AliMUONHit& hit, TList& digits twentyNano=1; } - for ( Int_t cath = 0; cath < 2; ++cath ) + for ( Int_t cath = AliMp::kCath0; cath <= AliMp::kCath1; ++cath ) { const AliMpVSegmentation* seg - = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cath); + = AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cath)); AliMpPad pad = seg->PadByPosition(TVector2(x,y),kFALSE); Int_t ix = pad.GetIndices().GetFirst(); diff --git a/MUON/AliMUONResponseV0.cxx b/MUON/AliMUONResponseV0.cxx index 81747d63e50..39ae1300787 100644 --- a/MUON/AliMUONResponseV0.cxx +++ b/MUON/AliMUONResponseV0.cxx @@ -35,6 +35,7 @@ #include "AliMpVPadIterator.h" #include "AliMpSegmentation.h" #include "AliMpVSegmentation.h" +#include "AliMpCathodType.h" #include "AliRun.h" #include "AliLog.h" @@ -200,13 +201,14 @@ AliMUONResponseV0::DisIntegrate(const AliMUONHit& hit, TList& digits) // Get the charge correlation between cathodes. Float_t currentCorrel = TMath::Exp(gRandom->Gaus(0.0,ChargeCorrel()/2.0)); - for ( Int_t cath = 0; cath < 2; ++cath ) + for ( Int_t cath = AliMp::kCath0; cath <= AliMp::kCath1; ++cath ) { Float_t qcath = qtot * ( cath == 0 ? currentCorrel : 1.0/currentCorrel); // Get an iterator to loop over pads, within the given area. const AliMpVSegmentation* seg = - AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cath); + AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cath)); AliMpVPadIterator* it = seg->CreateIterator(area); diff --git a/MUON/AliMUONSegFactory.cxx b/MUON/AliMUONSegFactory.cxx index 633bc22d892..e00661bad71 100644 --- a/MUON/AliMUONSegFactory.cxx +++ b/MUON/AliMUONSegFactory.cxx @@ -38,6 +38,8 @@ #include "AliMpDEManager.h" #include "AliMpDEIterator.h" #include "AliMpSegmentation.h" +#include "AliMpDetElement.h" +#include "AliMpCathodType.h" #include "AliLog.h" @@ -109,7 +111,7 @@ Bool_t AliMUONSegFactory::IsGeometryDefined(Int_t ichamberId) AliMpDEIterator it; it.First(ichamberId); - Int_t firstDE = it.CurrentDE(); + Int_t firstDE = it.CurrentDEId(); if ( ! fkTransformer || ! fkTransformer->GetModuleTransformerByDEId(firstDE, false) ) @@ -136,12 +138,12 @@ AliMUONSegmentation* AliMUONSegFactory::Segmentation() //______________________________________________________________________________ AliMUONVGeometryDESegmentation* -AliMUONSegFactory::CreateDESegmentation(Int_t detElemId, Int_t cath) +AliMUONSegFactory::CreateDESegmentation(Int_t detElemId, AliMp::CathodType cath) { /// Create DE segmentation, operating in local DE reference frame // Check detElemId & cath - if ( ! AliMpDEManager::IsValid(detElemId, cath, true) ) return 0; + if ( ! AliMpDEManager::IsValidDetElemId(detElemId, true) ) return 0; // Check if transformer is defined if ( ! fkTransformer) { @@ -172,8 +174,9 @@ AliMUONSegFactory::CreateDESegmentation(Int_t detElemId, Int_t cath) // Get DE segmentation for this DE type, create it if it does not exist // AliMUONVGeometryDESegmentation* deSegmentation = 0; - TString deName = AliMpDEManager::GetDESegName(detElemId, cath); - TObject* objSegmentation = fDESegmentations.Get(deName); + AliMpDetElement* detElement = AliMpDEManager::GetDetElement(detElemId); + TString deSegName = detElement->GetSegName(cath); + TObject* objSegmentation = fDESegmentations.Get(deSegName); if ( objSegmentation ) deSegmentation = (AliMUONVGeometryDESegmentation*)objSegmentation; @@ -187,13 +190,13 @@ AliMUONSegFactory::CreateDESegmentation(Int_t detElemId, Int_t cath) AliMpVSegmentation* mpSegmentation = const_cast(kmpSegmentation); - AliMpStationType stationType = AliMpDEManager::GetStationType(detElemId); - AliMpPlaneType planeType = AliMpDEManager::GetPlaneType(detElemId, cath); + AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId); + AliMp::PlaneType planeType = AliMpDEManager::GetPlaneType(detElemId, cath); switch (stationType) { - case kStation1: - case kStation2: + case AliMp::kStation1: + case AliMp::kStation2: deSegmentation = new AliMUONSt12QuadrantSegmentation( mpSegmentation, stationType, planeType); //cout << " new AliMUONSt12QuadrantSegmentation " @@ -203,7 +206,7 @@ AliMUONSegFactory::CreateDESegmentation(Int_t detElemId, Int_t cath) break; - case kStation345: + case AliMp::kStation345: deSegmentation = new AliMUONSt345SlatSegmentation( mpSegmentation, detElemId, planeType); //cout << " new AliMUONSt345SlatSegmentationV2 " @@ -212,7 +215,7 @@ AliMUONSegFactory::CreateDESegmentation(Int_t detElemId, Int_t cath) // << deName << endl; break; - case kStationTrigger: + case AliMp::kStationTrigger: deSegmentation = new AliMUONTriggerSegmentation( mpSegmentation, detElemId, planeType); //cout << " new AliMUONTriggerSegmentation " @@ -223,13 +226,13 @@ AliMUONSegFactory::CreateDESegmentation(Int_t detElemId, Int_t cath) } // Map new DE segmentation - fDESegmentations.Add(deName, deSegmentation); + fDESegmentations.Add(deSegName, deSegmentation); Segmentation()->AddDESegmentation(deSegmentation); } // Add DE segmentation to module // - moduleSegmentation->Add(detElemId, deName, deSegmentation); + moduleSegmentation->Add(detElemId, deSegName, deSegmentation); return deSegmentation; } @@ -237,18 +240,17 @@ AliMUONSegFactory::CreateDESegmentation(Int_t detElemId, Int_t cath) //______________________________________________________________________________ void -AliMUONSegFactory::CreateModuleSegmentations(Int_t chamberId, Int_t cath) +AliMUONSegFactory::CreateModuleSegmentations(Int_t chamberId, AliMp::CathodType cath) { /// Create module segmentation(s), operating in the global reference frame /// Detection elements are defined via DE names map. - // Check cathod & module Id - if ( ! AliMpDEManager::IsValidCathod(cath, true) || - ! AliMpDEManager::IsValidChamberId(chamberId, true) ) return; + // Check module Id + if ( ! AliMpDEManager::IsValidChamberId(chamberId, true) ) return; AliMpDEIterator it; for ( it.First(chamberId); ! it.IsDone(); it.Next() ) - CreateDESegmentation(it.CurrentDE(), cath); + CreateDESegmentation(it.CurrentDEId(), cath); } //______________________________________________________________________________ @@ -258,9 +260,9 @@ AliMUONSegFactory::CreateSegmentation() /// Create segmentations on all levels and return their container. for (Int_t chamberId = 0; chamberId @@ -74,11 +75,11 @@ class AliMUONSegFactory : public TObject { private: AliMUONVGeometryDESegmentation* - CreateDESegmentation(Int_t detElemId, Int_t cath); + CreateDESegmentation(Int_t detElemId, AliMp::CathodType cath); // Create DE segmentation, operating in local reference frame void - CreateModuleSegmentations(Int_t chamberId, Int_t cath); + CreateModuleSegmentations(Int_t chamberId, AliMp::CathodType cath); // Create module segmentation(s) for a given chamber, operating // in global reference frame diff --git a/MUON/AliMUONSt12QuadrantSegmentation.cxx b/MUON/AliMUONSt12QuadrantSegmentation.cxx index ab802e3b792..6061bc414ff 100644 --- a/MUON/AliMUONSt12QuadrantSegmentation.cxx +++ b/MUON/AliMUONSt12QuadrantSegmentation.cxx @@ -22,14 +22,8 @@ // the mapping package // Author: Ivana Hrivnacova, IPN Orsay -#include -#include -#include -#include -#include -#include - -#include "AliLog.h" +#include "AliMUONSt12QuadrantSegmentation.h" +#include "AliMUONConstants.h" #include "AliMpPad.h" #include "AliMpArea.h" @@ -40,8 +34,14 @@ #include "AliMpFiles.h" #include "AliMpNeighboursPadIterator.h" -#include "AliMUONSt12QuadrantSegmentation.h" -#include "AliMUONConstants.h" +#include "AliLog.h" + +#include +#include +#include +#include +#include +#include /// \cond CLASSIMP ClassImp(AliMUONSt12QuadrantSegmentation) @@ -50,8 +50,8 @@ ClassImp(AliMUONSt12QuadrantSegmentation) //______________________________________________________________________________ AliMUONSt12QuadrantSegmentation::AliMUONSt12QuadrantSegmentation( AliMpVSegmentation* segmentation, - AliMpStationType stationType, - AliMpPlaneType planeType) + AliMp::StationType stationType, + AliMp::PlaneType planeType) : AliMUONVGeometryDESegmentation(), fStationType(stationType), fPlaneType(planeType), @@ -87,9 +87,9 @@ AliMUONSt12QuadrantSegmentation::AliMUONSt12QuadrantSegmentation( AliFatal("Wrong mapping segmentation type"); // Anod pitch - if ( stationType == kStation1 ) + if ( stationType == AliMp::kStation1 ) fWireD = AliMUONConstants::PitchSt1(); - else if ( stationType == kStation2 ) + else if ( stationType == AliMp::kStation2 ) fWireD = AliMUONConstants::Pitch(); else AliFatal("Wrong station type"); @@ -105,8 +105,8 @@ AliMUONSt12QuadrantSegmentation::AliMUONSt12QuadrantSegmentation( //______________________________________________________________________________ AliMUONSt12QuadrantSegmentation::AliMUONSt12QuadrantSegmentation() : AliMUONVGeometryDESegmentation(), - fStationType(kStation1), - fPlaneType(kBendingPlane), + fStationType(AliMp::kStation1), + fPlaneType(AliMp::kBendingPlane), fSector(0), fSectorSegmentation(0), fSectorIterator(0), @@ -215,8 +215,8 @@ AliMUONGeometryDirection AliMUONSt12QuadrantSegmentation::GetDirection() /// (Direction or coordinate where the resolution is the best) switch ( fSector->GetDirection() ) { - case kX: return kDirX; - case kY: return kDirY; + case AliMp::kX: return kDirX; + case AliMp::kY: return kDirY; default: return kDirUndefined; } } diff --git a/MUON/AliMUONSt12QuadrantSegmentation.h b/MUON/AliMUONSt12QuadrantSegmentation.h index 4526b04c286..475121e7043 100644 --- a/MUON/AliMUONSt12QuadrantSegmentation.h +++ b/MUON/AliMUONSt12QuadrantSegmentation.h @@ -32,8 +32,8 @@ class AliMUONSt12QuadrantSegmentation : public AliMUONVGeometryDESegmentation { public: AliMUONSt12QuadrantSegmentation(AliMpVSegmentation* segmentation, - AliMpStationType stationType, - AliMpPlaneType planeType); + AliMp::StationType stationType, + AliMp::PlaneType planeType); AliMUONSt12QuadrantSegmentation(); virtual ~AliMUONSt12QuadrantSegmentation(); @@ -164,8 +164,8 @@ class AliMUONSt12QuadrantSegmentation : public AliMUONVGeometryDESegmentation // From mapping // - AliMpStationType fStationType; ///< Station type - AliMpPlaneType fPlaneType; ///< Plane type + AliMp::StationType fStationType; ///< Station type + AliMp::PlaneType fPlaneType; ///< Plane type const AliMpSector* fSector; ///< Sector (from mapping) AliMpSectorSegmentation* fSectorSegmentation;///< Sector segmentation (from mapping) AliMpVPadIterator* fSectorIterator; //!< Iterator over pads diff --git a/MUON/AliMUONSt1GeometryBuilderV2.cxx b/MUON/AliMUONSt1GeometryBuilderV2.cxx index 196d70647ad..efc376bf16c 100644 --- a/MUON/AliMUONSt1GeometryBuilderV2.cxx +++ b/MUON/AliMUONSt1GeometryBuilderV2.cxx @@ -499,7 +499,7 @@ void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber) specialMap.Add(47, (Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01, 0.36))); #endif - AliMpSectorReader reader1(kStation1, kBendingPlane); + AliMpSectorReader reader1(AliMp::kStation1, AliMp::kBendingPlane); AliMpSector* sector1 = reader1.BuildSector(); //Bool_t reflectZ = true; @@ -523,7 +523,7 @@ void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber) #endif #ifdef WITH_ROOT - Int_t nb = AliMpConstants::ManuMask(kNonBendingPlane); + Int_t nb = AliMpConstants::ManuMask(AliMp::kNonBendingPlane); specialMap.Delete(); specialMap.Add(76 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.01,0.59),90.)); specialMap.Add(75 | nb,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.96, 0.17))); @@ -536,7 +536,7 @@ void AliMUONSt1GeometryBuilderV2::CreateQuadrant(Int_t chamber) // Was: specialMap.Add(47,(Long_t) new AliMUONSt1SpecialMotif(TVector2(1.61,-1.18))); #endif - AliMpSectorReader reader2(kStation1, kNonBendingPlane); + AliMpSectorReader reader2(AliMp::kStation1, AliMp::kNonBendingPlane); AliMpSector* sector2 = reader2.BuildSector(); //reflectZ = false; @@ -2206,7 +2206,7 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(AliMpSector* sector,SpecialMap spe AliMpMotifPosition* motifPos = sector->GetMotifMap()->FindMotifPosition(motifPosId); Int_t copyNo = motifPosId; - if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset; + if ( sector->GetDirection() == AliMp::kX) copyNo += fgkDaughterCopyNoOffset; // Position posX = where.X() + motifPos->Position().X() + fgkOffsetX; @@ -2248,7 +2248,7 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(AliMpSector* sector,SpecialMap spe // Copy number Int_t copyNo = motifPosId; - if ( sector->GetDirection() == kX) copyNo += fgkDaughterCopyNoOffset; + if ( sector->GetDirection() == AliMp::kX) copyNo += fgkDaughterCopyNoOffset; // place the hole for the motif, wrt the requested rotation angle Int_t rot = ( spMot.GetRotAngle()<0.1 ) ? reflZ:rotMat; diff --git a/MUON/AliMUONSt345SlatSegmentation.cxx b/MUON/AliMUONSt345SlatSegmentation.cxx index 0cec3a04751..34368295c7b 100644 --- a/MUON/AliMUONSt345SlatSegmentation.cxx +++ b/MUON/AliMUONSt345SlatSegmentation.cxx @@ -50,7 +50,7 @@ namespace AliMUONSt345SlatSegmentation::AliMUONSt345SlatSegmentation() : AliMUONVGeometryDESegmentation(), fDetElemId(-1), -fPlaneType(kBendingPlane), +fPlaneType(AliMp::kBendingPlane), fSlat(0), fSlatSegmentation(0), fPadIterator(0), @@ -66,7 +66,7 @@ fYhit(FMAX) //_____________________________________________________________________________ AliMUONSt345SlatSegmentation::AliMUONSt345SlatSegmentation( AliMpVSegmentation* segmentation, - Int_t detElemId, AliMpPlaneType bendingOrNonBending) + Int_t detElemId, AliMp::PlaneType bendingOrNonBending) : AliMUONVGeometryDESegmentation(), fDetElemId(detElemId), fPlaneType(bendingOrNonBending), @@ -86,7 +86,7 @@ fYhit(FMAX) AliFatal("Wrong mapping segmentation type"); AliDebug(1,Form("this=%p detElemId=%3d %s fSlatSegmentation=%p",this,detElemId, - ( (bendingOrNonBending==kBendingPlane)?"Bending":"NonBending" ), + ( (bendingOrNonBending==AliMp::kBendingPlane)?"Bending":"NonBending" ), fSlatSegmentation)); } diff --git a/MUON/AliMUONSt345SlatSegmentation.h b/MUON/AliMUONSt345SlatSegmentation.h index f5b448f36bf..c6449bfe349 100644 --- a/MUON/AliMUONSt345SlatSegmentation.h +++ b/MUON/AliMUONSt345SlatSegmentation.h @@ -33,7 +33,7 @@ class AliMUONSt345SlatSegmentation : public AliMUONVGeometryDESegmentation AliMUONSt345SlatSegmentation(); AliMUONSt345SlatSegmentation(AliMpVSegmentation* segmentation, Int_t detElemId, - AliMpPlaneType bendingOrNonBending); + AliMp::PlaneType bendingOrNonBending); virtual ~AliMUONSt345SlatSegmentation(); void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit, @@ -129,7 +129,7 @@ class AliMUONSt345SlatSegmentation : public AliMUONVGeometryDESegmentation private: Int_t fDetElemId; ///< det element Id - AliMpPlaneType fPlaneType; ///< plane type + AliMp::PlaneType fPlaneType; ///< plane type const AliMpSlat* fSlat; ///< slat AliMpSlatSegmentation* fSlatSegmentation; ///< slat segmentation AliMpVPadIterator* fPadIterator; //!< pad iterator diff --git a/MUON/AliMUONTriggerChamberEff.cxx b/MUON/AliMUONTriggerChamberEff.cxx index d9ae3676807..94d9b698e56 100644 --- a/MUON/AliMUONTriggerChamberEff.cxx +++ b/MUON/AliMUONTriggerChamberEff.cxx @@ -272,11 +272,12 @@ Int_t AliMUONTriggerChamberEff::DetElemIdFromPos(Float_t x, Float_t y, Int_t cha const AliMUONGeometryTransformer *kGeomTransformer = fMUON->GetGeometryTransformer(); AliMUONSegmentation *segmentation = fMUON->GetSegmentation(); for ( it.First(chamber-1); ! it.IsDone(); it.Next() ){ - Int_t detElemId = it.CurrentDE(); + Int_t detElemId = it.CurrentDEId(); if ( segmentation->HasDE(detElemId) ){ const AliMpVSegmentation* seg = - AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cathode); + AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cathode)); if (seg){ Float_t deltax = seg->Dimensions().X(); Float_t deltay = seg->Dimensions().Y(); @@ -326,7 +327,8 @@ void AliMUONTriggerChamberEff::LocalBoardFromPos(Float_t x, Float_t y, Int_t det kGeomTransformer->Global2Local(detElemId, x, y, 0, xl, yl, zl); TVector2 pos(xl,yl); const AliMpVSegmentation* seg = - AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cathode); + AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cathode)); if (seg){ AliMpPad pad = seg->PadByPosition(pos,kFALSE); for (Int_t loc=0; loc=2)printf("cathode = %i\n",cathode); - const AliMpVSegmentation* seg = - AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cathode); + const AliMpVSegmentation* seg = AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cathode)); AliMpPad pad = seg->PadByIndices(AliMpIntPair(ix,iy),kTRUE); for (Int_t loc=0; locGetName(),side,iline,icol); Int_t detElemId = DetElemId(ichamber,side,iline); - seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode); + seg = AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId, AliMp::GetCathodType(icathode)); Int_t iFirstStrip = FirstStrip(localBoard->GetName()); Int_t iLastStrip = iFirstStrip + 16; @@ -157,7 +159,8 @@ void AliMUONTriggerCircuit::LoadYPos(const AliMUONTriggerCrateStore& crates) ichamber = 12; detElemId = DetElemId(ichamber,side,iline); - seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode); + seg = AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId, AliMp::GetCathodType(icathode)); // second plane middle part Int_t iFirstStripMiddle = FirstStrip(localBoard->GetName()); @@ -179,7 +182,8 @@ void AliMUONTriggerCircuit::LoadYPos(const AliMUONTriggerCrateStore& crates) // icolUp = icol; } else { // upper strips in another detElemId detElemId = DetElemId(ichamber,side,iline+1); // get detElemId - seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode); + seg = AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId, AliMp::GetCathodType(icathode)); iFirstStripUp = 0; iLastStripUp = iFirstStripUp + 8; @@ -197,7 +201,8 @@ void AliMUONTriggerCircuit::LoadYPos(const AliMUONTriggerCrateStore& crates) // restore current detElemId & segmentation detElemId = DetElemId(ichamber,side,iline); - seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode); + seg = AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId, AliMp::GetCathodType(icathode)); // second plane lower part if (zeroDown == 0) { // something down @@ -213,7 +218,8 @@ void AliMUONTriggerCircuit::LoadYPos(const AliMUONTriggerCrateStore& crates) // icolDo = icol; } else { // lower strips in another detElemId detElemId = DetElemId(ichamber,side,iline-1); // get detElemId - seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode); + seg = AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId, AliMp::GetCathodType(icathode)); // get iFirstStrip in this module const AliMpTriggerSegmentation* trig = (AliMpTriggerSegmentation*)(seg); @@ -273,7 +279,8 @@ void AliMUONTriggerCircuit::LoadXPos(const AliMUONTriggerCrateStore& crates) DecodeBoardName(localBoard->GetName(),side,iline,icol); Int_t detElemId=DetElemId(ichamber,side,iline); // get detElemId - seg = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId, icathode); + seg = AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId, AliMp::GetCathodType(icathode)); // check if one needs a strip doubling or not if ( (x2u == 1 || x2m == 1 || x2d == 1) && x2m == 1) doubling = kTRUE; diff --git a/MUON/AliMUONTriggerElectronics.cxx b/MUON/AliMUONTriggerElectronics.cxx index 26a18478cd2..81cac019942 100644 --- a/MUON/AliMUONTriggerElectronics.cxx +++ b/MUON/AliMUONTriggerElectronics.cxx @@ -40,6 +40,7 @@ #include "AliMpSegmentation.h" #include "AliMpVSegmentation.h" +#include "AliMpCathodType.h" #include "AliLog.h" #include "AliLoader.h" @@ -151,7 +152,8 @@ void AliMUONTriggerElectronics::FeedM() Int_t cathode = mdig->Cathode(); const AliMpVSegmentation *seg = - AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,cathode); + AliMpSegmentation::Instance() + ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cathode)); Int_t ix = mdig->PadX(), iy = mdig->PadY(); diff --git a/MUON/AliMUONTriggerSegmentation.cxx b/MUON/AliMUONTriggerSegmentation.cxx index 3e910276185..b2ef34a61d2 100644 --- a/MUON/AliMUONTriggerSegmentation.cxx +++ b/MUON/AliMUONTriggerSegmentation.cxx @@ -61,7 +61,7 @@ namespace AliMUONTriggerSegmentation::AliMUONTriggerSegmentation() : AliMUONVGeometryDESegmentation(), fDetElemId(-1), - fPlaneType(kNonBendingPlane), + fPlaneType(AliMp::kBendingPlane), fSlat(0), fSlatSegmentation(0), fCurrentPad(), @@ -77,7 +77,7 @@ AliMUONTriggerSegmentation::AliMUONTriggerSegmentation() //_____________________________________________________________________________ AliMUONTriggerSegmentation::AliMUONTriggerSegmentation( AliMpVSegmentation* segmentation, - Int_t detElemId, AliMpPlaneType bendingOrNonBending) + Int_t detElemId, AliMp::PlaneType bendingOrNonBending) : AliMUONVGeometryDESegmentation(), fDetElemId(detElemId), fPlaneType(bendingOrNonBending), @@ -105,7 +105,7 @@ AliMUONTriggerSegmentation::AliMUONTriggerSegmentation( fLineNumber = TString(id(pos+1),1).Atoi(); AliDebug(1,Form("this=%p detElemId=%3d %s fSlatSegmentation=%p",this,detElemId, - ( (bendingOrNonBending==kBendingPlane)?"Bending":"NonBending" ), + ( (bendingOrNonBending==AliMp::kBendingPlane)?"Bending":"NonBending" ), fSlatSegmentation)); } @@ -313,12 +313,12 @@ AliMUONTriggerSegmentation::GetPadLoc2Glo(Int_t ix, Int_t iy, ixGlo=iyGlo=-1; // starts with invalid values - if ( fPlaneType == kBendingPlane ) + if ( fPlaneType == AliMp::kBendingPlane ) { ixGlo = 10*LineNumber() + ix; iyGlo = iy - fgIntOffset; } - else if ( fPlaneType == kNonBendingPlane ) + else if ( fPlaneType == AliMp::kNonBendingPlane ) { Int_t i = fSlat->GetLayer(0)->FindPCBIndex(ix-fgIntOffset); if (i<0) @@ -346,12 +346,12 @@ AliMUONTriggerSegmentation::GetPadGlo2Loc(Int_t ixGlo, Int_t iyGlo, Int_t column = ModuleColNum(ixGlo); - if ( fPlaneType == kBendingPlane ) + if ( fPlaneType == AliMp::kBendingPlane ) { ix = column + fgIntOffset; iy = iyGlo + fgIntOffset; } - else if ( fPlaneType == kNonBendingPlane ) + else if ( fPlaneType == AliMp::kNonBendingPlane ) { if ( LineNumber()==5 ) --column; AliMpPCB* pcb = fSlat->GetLayer(0)->GetPCB(column); @@ -474,13 +474,13 @@ void AliMUONTriggerSegmentation::IntegrationLimits(Float_t& x1, Double_t ystrip = strip.Position().Y(); AliDebug(1,Form("fXhit,Yhit=%e,%e xstrip,ystrip=%e,%e\n", fXhit,fYhit,xstrip,ystrip)); - x1 = (fPlaneType==kBendingPlane) ? fYhit : fXhit; - x2 = (fPlaneType==kBendingPlane) ? ystrip : xstrip; - x3 = (fPlaneType==kBendingPlane) ? + x1 = (fPlaneType==AliMp::kBendingPlane) ? fYhit : fXhit; + x2 = (fPlaneType==AliMp::kBendingPlane) ? ystrip : xstrip; + x3 = (fPlaneType==AliMp::kBendingPlane) ? fCurrentPad.Position().Y() : fCurrentPad.Position().X(); Double_t xmin = 0.0; Double_t xmax = 0.0; - if (fPlaneType==kBendingPlane) + if (fPlaneType==AliMp::kBendingPlane) { xmin = x3 - fCurrentPad.Dimensions().X(); xmax = x3 + fCurrentPad.Dimensions().X(); @@ -549,7 +549,7 @@ AliMUONTriggerSegmentation::LA2PC(Int_t ixLA, Int_t iyLA, ixPC = ixLA + 1; iyPC = iyLA + 1; - if ( fPlaneType == kBendingPlane ) + if ( fPlaneType == AliMp::kBendingPlane ) { if ( LineNumber()==5 ) { @@ -670,7 +670,7 @@ AliMUONTriggerSegmentation::PC2LA(Int_t ixPC, Int_t iyPC, ixLA = ixPC - 1; iyLA = iyPC - 1; - if ( fPlaneType == kBendingPlane ) + if ( fPlaneType == AliMp::kBendingPlane ) { if ( LineNumber()==5 ) { diff --git a/MUON/AliMUONTriggerSegmentation.h b/MUON/AliMUONTriggerSegmentation.h index ea0eade8b37..ac412363da3 100644 --- a/MUON/AliMUONTriggerSegmentation.h +++ b/MUON/AliMUONTriggerSegmentation.h @@ -33,7 +33,7 @@ class AliMUONTriggerSegmentation : public AliMUONVGeometryDESegmentation AliMUONTriggerSegmentation(); AliMUONTriggerSegmentation(AliMpVSegmentation* segmentation, - Int_t detElemId, AliMpPlaneType bendingOrNonBending); + Int_t detElemId, AliMp::PlaneType bendingOrNonBending); virtual ~AliMUONTriggerSegmentation(); /// Distance between 1 pad and a position @@ -123,7 +123,7 @@ protected: private: Int_t fDetElemId; ///< det elem Id - AliMpPlaneType fPlaneType; ///< plane type + AliMp::PlaneType fPlaneType; ///< plane type const AliMpTrigger* fSlat; ///< slat AliMpTriggerSegmentation* fSlatSegmentation; ///< mapping segmentation // AliMpVPadIterator* fPadIterator; //! -- 2.43.5