#include "AliMUONTriggerSegmentationV2.h"
-#include "AliLog.h"
-
#include "AliMpPCB.h"
#include "AliMpTrigger.h"
#include "AliMpTriggerSegmentation.h"
#include "AliMpSlat.h"
-#include "AliMUONSegmentationManager.h"
+#include "AliLog.h"
#include "Riostream.h"
#include "TClass.h"
}
//_____________________________________________________________________________
-AliMUONTriggerSegmentationV2::AliMUONTriggerSegmentationV2(Int_t detElemId,
- AliMpPlaneType bendingOrNonBending)
+AliMUONTriggerSegmentationV2::AliMUONTriggerSegmentationV2(
+ AliMpVSegmentation* segmentation,
+ Int_t detElemId, AliMpPlaneType bendingOrNonBending)
: AliMUONVGeometryDESegmentation(),
fDetElemId(detElemId),
fPlaneType(bendingOrNonBending),
//
// Normal ctor.
//
- ReadMappingData();
+
+ fSlatSegmentation = dynamic_cast<AliMpTriggerSegmentation*>(segmentation);
+ if (fSlatSegmentation)
+ fSlat = fSlatSegmentation->Slat();
+ else
+ AliFatal("Wrong mapping segmentation type");
+
+ TString id(fSlat->GetID());
+ Ssiz_t pos = id.Last('L');
+ if ( pos <= 0 )
+ {
+ AliFatal(Form("Cannot infer line number for slat %s",id.Data()));
+ }
+ fLineNumber = TString(id(pos+1),1).Atoi();
AliDebug(1,Form("this=%p detElemId=%3d %s fSlatSegmentation=%p",this,detElemId,
( (bendingOrNonBending==kBendingPlane)?"Bending":"NonBending" ),
//_____________________________________________________________________________
void
AliMUONTriggerSegmentationV2::IGlo2ILoc(Int_t ixGlo, Int_t iyGlo,
- Int_t& ixLA, Int_t& iyLA)
+ Int_t& ixLA, Int_t& iyLA) const
{
Int_t ixPC, iyPC;
GetPadGlo2Loc(ixGlo,iyGlo,ixPC,iyPC);
//_____________________________________________________________________________
void
AliMUONTriggerSegmentationV2::ILoc2IGlo(Int_t ixLA, Int_t iyLA,
- Int_t& ixGlo, Int_t& iyGlo)
+ Int_t& ixGlo, Int_t& iyGlo) const
{
Int_t ixPC, iyPC;
LA2PC(ixLA,iyLA,ixPC,iyPC);
GetPadLoc2Glo(ixPC,iyPC,ixGlo,iyGlo);
}
-//_____________________________________________________________________________
-void
-AliMUONTriggerSegmentationV2::Init(int)
-{
- AliWarning("Not Implemented because not needed ;-)");
-}
-
//_____________________________________________________________________________
Int_t
AliMUONTriggerSegmentationV2::ISector()
//_____________________________________________________________________________
void
AliMUONTriggerSegmentationV2::LA2PC(Int_t ixLA, Int_t iyLA,
- Int_t& ixPC, Int_t& iyPC)
+ Int_t& ixPC, Int_t& iyPC) const
{
//
// From LA to PC conventions for integers indices.
//_____________________________________________________________________________
void
AliMUONTriggerSegmentationV2::PC2LA(Int_t ixPC, Int_t iyPC,
- Int_t& ixLA, Int_t& iyLA)
+ Int_t& ixLA, Int_t& iyLA) const
{
//
// From PC to LA conventions for integers indices.
}
}
-//_____________________________________________________________________________
-void
-AliMUONTriggerSegmentationV2::ReadMappingData()
-{
- fSlatSegmentation = dynamic_cast<AliMpTriggerSegmentation*>
- (AliMUONSegmentationManager::Segmentation(fDetElemId,fPlaneType));
-
- if (!fSlatSegmentation)
- {
- AliFatal("Wrong segmentation type encountered");
- }
- fSlat = fSlatSegmentation->Slat();
- TString id(fSlat->GetID());
- Ssiz_t pos = id.Last('L');
- if ( pos <= 0 )
- {
- AliFatal(Form("Cannot infer line number for slat %s",id.Data()));
- }
- fLineNumber = TString(id(pos+1),1).Atoi();
-}
-
//_____________________________________________________________________________
Int_t
AliMUONTriggerSegmentationV2::Sector(Int_t ix, Int_t iy)
AliFatal("Not Implemented");
}
-//_____________________________________________________________________________
-void
-AliMUONTriggerSegmentationV2::Streamer(TBuffer &R__b)
-{
- if (R__b.IsReading())
- {
- AliMUONTriggerSegmentationV2::Class()->ReadBuffer(R__b, this);
- ReadMappingData();
- }
- else
- {
- AliMUONTriggerSegmentationV2::Class()->WriteBuffer(R__b, this);
- }
-}
-
-
-