- Cathod types now defined via AliMpCathodType.
//_____________________________________________________________________________
Int_t
-AliMpConstants::ManuMask(AliMpPlaneType planeType)
+AliMpConstants::ManuMask(AliMp::PlaneType planeType)
{
//
// The manuIDs get an offset if they are in the non-bending plane
//
- return ( planeType == kNonBendingPlane ) ? fgkNonBendingManuMask : 0;
+ return ( planeType == AliMp::kNonBendingPlane ) ? fgkNonBendingManuMask : 0;
}
static Int_t StartPadIndex();
static Int_t NofChambers();
static Int_t NofGeomModules();
- static Int_t ManuMask(AliMpPlaneType planeType);
+ static Int_t ManuMask(AliMp::PlaneType planeType);
private:
// unused derived functions
}
//______________________________________________________________________________
-TString AliMpFiles::PlaneDataDir(AliMpStationType station,
- AliMpPlaneType plane)
+TString AliMpFiles::PlaneDataDir(AliMp::StationType station,
+ AliMp::PlaneType plane)
{
/// Returns path to data files with sector description
/// for a specified plane.
switch (station) {
- case kStation1:
- case kStation2:
+ case AliMp::kStation1:
+ case AliMp::kStation2:
switch (plane) {
- case kBendingPlane:
+ case AliMp::kBendingPlane:
return GetTop() + fgkDataDir + StationDataDir(station) + fgkBendingDir;
;;
- case kNonBendingPlane:
+ case AliMp::kNonBendingPlane:
return GetTop() + fgkDataDir + StationDataDir(station) + fgkNonBendingDir;
;;
}
break;
- case kStation345:
- case kStationTrigger:
+ case AliMp::kStation345:
+ case AliMp::kStationTrigger:
return GetTop() + fgkDataDir + StationDataDir(station) + "/";
break;
default:
- AliFatalClass("Incomplete switch on AliMpPlaneType");
+ AliFatalClass("Incomplete switch on AliMp::PlaneType");
break;
}
return TString();
}
//______________________________________________________________________________
-TString AliMpFiles::StationDataDir(AliMpStationType station)
+TString AliMpFiles::StationDataDir(AliMp::StationType station)
{
/// Returns the station directory name for the specified station number.
TString stationDataDir(fgkStationDir);
switch (station) {
- case kStation1:
+ case AliMp::kStation1:
stationDataDir += "1/";
break;
;;
- case kStation2:
+ case AliMp::kStation2:
stationDataDir += "2/";
break;
;;
- case kStation345:
+ case AliMp::kStation345:
stationDataDir += "345/";
break;
;;
- case kStationTrigger:
+ case AliMp::kStationTrigger:
stationDataDir += "Trigger/";
break;
;;
}
//______________________________________________________________________________
-TString AliMpFiles::DENamesFilePath(AliMpStationType station)
+TString AliMpFiles::DENamesFilePath(AliMp::StationType station)
{
/// Return path to data file with DE names for given station.
{
/// Return path to data file with local trigger board mapping.
- return GetTop() + fgkDataDir + StationDataDir(kStationTrigger)
+ return GetTop() + fgkDataDir + StationDataDir(AliMp::kStationTrigger)
+ fgkTriggerLocalBoards + fgkDataExt;;
}
//_____________________________________________________________________________
-TString AliMpFiles::SlatFilePath(AliMpStationType stationType,
+TString AliMpFiles::SlatFilePath(AliMp::StationType stationType,
const char* slatType,
- AliMpPlaneType plane)
+ AliMp::PlaneType plane)
{
/// \todo add ..
return TString(PlaneDataDir(stationType,plane) + slatType + "." +
- ( plane == kNonBendingPlane ? "NonBending":"Bending" ) + ".slat");
+ ( plane == AliMp::kNonBendingPlane ? "NonBending":"Bending" ) + ".slat");
}
//_____________________________________________________________________________
-TString AliMpFiles::SlatPCBFilePath(AliMpStationType stationType,
+TString AliMpFiles::SlatPCBFilePath(AliMp::StationType stationType,
const char* pcbType)
{
/// Get the full path for a given PCB (only relevant to stations 3,
/// 4, 5 and trigger). The bending parameter below is of no use in this case, but
/// we use it to re-use the PlaneDataDir() method untouched.
- return TString(PlaneDataDir(stationType,kNonBendingPlane) + pcbType +
+ return TString(PlaneDataDir(stationType,AliMp::kNonBendingPlane) + pcbType +
".pcb");
}
//______________________________________________________________________________
-TString AliMpFiles::SectorFilePath(AliMpStationType station,
- AliMpPlaneType plane)
+TString AliMpFiles::SectorFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane)
{
/// Return path to data file with sector description.
}
//______________________________________________________________________________
-TString AliMpFiles::SectorSpecialFilePath(AliMpStationType station,
- AliMpPlaneType plane)
+TString AliMpFiles::SectorSpecialFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane)
{
/// Return path to data file with sector special description (irregular motifs).
}
//______________________________________________________________________________
-TString AliMpFiles::SectorSpecialFilePath2(AliMpStationType station,
- AliMpPlaneType plane)
+TString AliMpFiles::SectorSpecialFilePath2(AliMp::StationType station,
+ AliMp::PlaneType plane)
{
/// Returns path to data file with sector special description (irregular motifs).
}
//______________________________________________________________________________
-TString AliMpFiles::MotifFilePath(AliMpStationType station,
- AliMpPlaneType plane,
+TString AliMpFiles::MotifFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane,
const TString& motifTypeID)
{
/// Returns path to data file for a given motif type.
}
//______________________________________________________________________________
-TString AliMpFiles::PadPosFilePath(AliMpStationType station,
- AliMpPlaneType plane,
+TString AliMpFiles::PadPosFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane,
const TString& motifTypeID)
{
/// Returns path to data file with pad positions for a given motif type.
}
//______________________________________________________________________________
-TString AliMpFiles::MotifSpecialFilePath(AliMpStationType station,
- AliMpPlaneType plane,
+TString AliMpFiles::MotifSpecialFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane,
const TString& motifID)
{
/// Returns path to data file with pad dimensions for a given motif ID.
}
//______________________________________________________________________________
-TString AliMpFiles::BergToGCFilePath(AliMpStationType station)
+TString AliMpFiles::BergToGCFilePath(AliMp::StationType station)
{
/// Returns the path of the file which describes the correspondance between
/// the berg number and the gassiplex channel.
}
//______________________________________________________________________________
-TString AliMpFiles::ManuToSerialPath(const TString& deName, AliMpStationType station)
+TString AliMpFiles::ManuToSerialPath(const TString& deName, AliMp::StationType station)
{
/// Returns the path of the file for the manu id to their serial number
// de names
//
- static TString DENamesFilePath(AliMpStationType stationType);
+ static TString DENamesFilePath(AliMp::StationType stationType);
// trigger
//
// slats
//
- static TString SlatFilePath(AliMpStationType stationType,
- const char* slatType, AliMpPlaneType plane);
- static TString SlatPCBFilePath(AliMpStationType stationType,
+ static TString SlatFilePath(AliMp::StationType stationType,
+ const char* slatType, AliMp::PlaneType plane);
+ static TString SlatPCBFilePath(AliMp::StationType stationType,
const char* pcbType);
// sectors
//
- static TString SectorFilePath(AliMpStationType station,
- AliMpPlaneType plane);
- static TString SectorSpecialFilePath(AliMpStationType station,
- AliMpPlaneType plane);
- static TString SectorSpecialFilePath2(AliMpStationType station,
- AliMpPlaneType plane);
+ static TString SectorFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane);
+ static TString SectorSpecialFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane);
+ static TString SectorSpecialFilePath2(AliMp::StationType station,
+ AliMp::PlaneType plane);
// motifs
//
- static TString MotifFilePath(AliMpStationType station,
- AliMpPlaneType plane,
+ static TString MotifFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane,
const TString& motifTypeID);
static TString MotifFileName(const TString& motifTypeID);
- static TString MotifSpecialFilePath(AliMpStationType station,
- AliMpPlaneType plane, const TString& motifID);
+ static TString MotifSpecialFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane, const TString& motifID);
static TString MotifSpecialFileName(const TString& motifID);
- static TString PadPosFilePath(AliMpStationType station,
- AliMpPlaneType plane, const TString& motifTypeID);
+ static TString PadPosFilePath(AliMp::StationType station,
+ AliMp::PlaneType plane, const TString& motifTypeID);
static TString PadPosFileName(const TString& motifTypeID);
- static TString BergToGCFilePath(AliMpStationType station);
+ static TString BergToGCFilePath(AliMp::StationType station);
- static TString ManuToSerialPath(const TString& deName, AliMpStationType station);
+ static TString ManuToSerialPath(const TString& deName, AliMp::StationType station);
// set methods
AliMpFiles& operator=(const AliMpFiles& right);
// methods
static TString GetTop();
- static TString PlaneDataDir(AliMpStationType station, AliMpPlaneType plane);
- static TString StationDataDir(AliMpStationType station);
+ static TString PlaneDataDir(AliMp::StationType station, AliMp::PlaneType plane);
+ static TString StationDataDir(AliMp::StationType station);
// static data members
static const TString fgkDataDir; ///< data directory
#include "AliMpDEManager.h"
#include "AliMpSegmentation.h"
#include "AliMpStationType.h"
+#include "AliMpCathodType.h"
#include "AliMpVSegmentation.h"
#include "TArrayI.h"
#include "TList.h"
while ( !it.IsDone() )
{
- Int_t detElemId = it.CurrentDE();
- AliMpStationType stationType = AliMpDEManager::GetStationType(detElemId);
- if ( stationType != kStationTrigger )
+ Int_t detElemId = it.CurrentDEId();
+ AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId);
+ if ( stationType != AliMp::kStationTrigger )
{
- for ( Int_t cath = 0; cath <=1 ; ++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));
TArrayI manus;
{
/// Returns the number of manus contained in the given detection element.
Int_t n(0);
- for ( Int_t i = 0; i < 2; ++i )
+ for ( Int_t i = AliMp::kCath0; i <= AliMp::kCath1; ++i )
{
const AliMpVSegmentation* seg
- = AliMpSegmentation::Instance()->GetMpSegmentation(detElemId,i);
+ = AliMpSegmentation::Instance()
+ ->GetMpSegmentation(detElemId,AliMp::GetCathodType(i));
+
TArrayI manus;
seg->GetAllElectronicCardIDs(manus);
n += manus.GetSize();
#include "AliMpMotifType.h"
#include "AliMpConnection.h"
#include "AliMpIntPair.h"
-#include "AliMpDirection.h"
#include "AliLog.h"
/// \endcond
//_____________________________________________________________________________
-AliMpMotifReader::AliMpMotifReader(AliMpStationType station,
- AliMpPlaneType plane)
+AliMpMotifReader::AliMpMotifReader(AliMp::StationType station,
+ AliMp::PlaneType plane)
: TObject(),
fStationType(station),
fPlaneType(plane)
//_____________________________________________________________________________
AliMpMotifReader::AliMpMotifReader()
: TObject(),
- fStationType(kStation1),
- fPlaneType(kBendingPlane)
+ fStationType(AliMp::kStation1),
+ fPlaneType(AliMp::kBendingPlane)
{
/// Default constructor
}
ifstream bergToGCFile(bergToGCFileName);
const Int_t knbergpins =
- (fStationType == kStation1 || fStationType == kStation2 ) ? 80 : 100;
+ (fStationType == AliMp::kStation1 || fStationType == AliMp::kStation2 ) ? 80 : 100;
// Station1 & 2 Bergstak connectors have 80 pins, while for stations
// 3, 4 and 5 they have 100 pins.
Int_t gassiChannel[100];
#endif
public:
- AliMpMotifReader(AliMpStationType station, AliMpPlaneType plane);
+ AliMpMotifReader(AliMp::StationType station, AliMp::PlaneType plane);
AliMpMotifReader();
virtual ~AliMpMotifReader();
AliMpMotifReader& operator = (const AliMpMotifReader& right);
// data members
- AliMpStationType fStationType; ///< station type
- AliMpPlaneType fPlaneType; ///< plane type
+ AliMp::StationType fStationType; ///< station type
+ AliMp::PlaneType fPlaneType; ///< plane type
ClassDef(AliMpMotifReader,1) // Data reader
};
/// \endcond
//_____________________________________________________________________________
-AliMpPadRow::AliMpPadRow(AliMpXDirection direction)
+AliMpPadRow::AliMpPadRow(AliMp::XDirection direction)
: TObject(),
fDirection(direction),
fID(0),
//_____________________________________________________________________________
AliMpPadRow::AliMpPadRow()
: TObject(),
- fDirection(kLeft),
+ fDirection(AliMp::kLeft),
fID(0),
fOffsetX(0),
fSegments()
if (GetNofPadRowSegments() == 0)
return fOffsetX;
else
- if (fDirection == kLeft)
+ if (fDirection == AliMp::kLeft)
return GetPadRowSegment(GetNofPadRowSegments()-1)->LeftBorderX();
else
return GetPadRowSegment(GetNofPadRowSegments()-1)->RightBorderX();
AliMpVPadRowSegment* padRowSegment = 0;
- if (fDirection == kLeft) {
+ if (fDirection == AliMp::kLeft) {
padRowSegment
= new AliMpPadRowLSegment(this, motif, motifPositionId, nofPads);
}
#endif
public:
- AliMpPadRow(AliMpXDirection direction);
+ AliMpPadRow(AliMp::XDirection direction);
AliMpPadRow();
virtual ~AliMpPadRow();
Double_t CurrentBorderX() const;
// data members
- AliMpXDirection fDirection; ///< the pad row x direction
+ AliMp::XDirection fDirection; ///< the pad row x direction
Int_t fID; ///< the pad row ID
Double_t fOffsetX; ///< the x position of the border
PadRowSegmentVector fSegments; ///< the pad row segments
#include "AliMpMotifMap.h"
#include "AliMpConstants.h"
+#include "AliLog.h"
+
#include <TMath.h>
#include <Riostream.h>
}
//_____________________________________________________________________________
-void AliMpRow::SetGlobalIndices(AliMpDirection constPadSizeDirection,
+void AliMpRow::SetGlobalIndices(AliMp::Direction constPadSizeDirection,
AliMpRow* rowBefore)
{
/// Set the global indices limits to its row segments, motif positions
// Find the y index value of the low edge
if (rowBefore) {
- if (constPadSizeDirection == kY) {
+ if (constPadSizeDirection == AliMp::kY) {
iy = rowBefore->GetHighIndicesLimit().GetSecond()+1;
}
else {
void SetRowSegmentOffsets(const TVector2& offset);
Double_t SetOffsetY(Double_t offsetY);
void SetMotifPositions();
- void SetGlobalIndices(AliMpDirection constPadSizeDirection,
+ void SetGlobalIndices(AliMp::Direction constPadSizeDirection,
AliMpRow* rowBefore);
// geometry
#include "AliMpIntPair.h"
#include "AliMpConstants.h"
+#include "AliLog.h"
+
#include <Riostream.h>
/// \cond CLASSIMP
//_____________________________________________________________________________
AliMpSector::AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
- AliMpDirection direction, const TVector2& offset)
+ AliMp::Direction direction, const TVector2& offset)
: TNamed("Sector", ""),
fID(id),
fOffset(offset),
fZones(),
fRows(),
fMotifMap(0),
- fDirection(kX),
+ fDirection(AliMp::kX),
fMinPadDimensions(TVector2(0., 0.)),
fMaxPadIndices(AliMpIntPair::Invalid()),
fNofPads(0)
for (Int_t i=1; i<GetNofZones()+1; i++) {
TVector2 padDimensions = GetZone(i)->GetPadDimensions();
- if ( fDirection == kX &&
+ if ( fDirection == AliMp::kX &&
padDimensions.Y() > 0. && padDimensions.Y() < fMinPadDimensions.Y() ||
- fDirection == kY &&
+ fDirection == AliMp::kY &&
padDimensions.X() > 0. && padDimensions.X() < fMinPadDimensions.X())
fMinPadDimensions = padDimensions;
}
//_____________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
AliMpSector::GetPlaneType() const
{
/// Return the plane type
- return GetDirection()==kY ? kBendingPlane : kNonBendingPlane;
+ return GetDirection()==AliMp::kY ? AliMp::kBendingPlane : AliMp::kNonBendingPlane;
}
//_____________________________________________________________________________
public:
AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
- AliMpDirection direction, const TVector2& offset);
+ AliMp::Direction direction, const TVector2& offset);
AliMpSector();
virtual ~AliMpSector();
Int_t GetNofRows() const;
AliMpRow* GetRow(Int_t i) const;
- AliMpDirection GetDirection() const;
- AliMpPlaneType GetPlaneType() const;
+ AliMp::Direction GetDirection() const;
+ AliMp::PlaneType GetPlaneType() const;
TVector2 GetMinPadDimensions() const;
AliMpIntPair GetMaxPadIndices() const;
TVector2 fOffset; ///< sector position
ZoneVector fZones; ///< zones
RowVector fRows; ///< rows
- AliMpMotifMap* fMotifMap; ///< motif map
- AliMpDirection fDirection;///< the direction of constant pad size
- TVector2 fMinPadDimensions; ///< minimal pad dimensions
- AliMpIntPair fMaxPadIndices; ///< maximum pad indices
- Int_t fNofPads; ///< total number of pads
+ AliMpMotifMap* fMotifMap; ///< motif map
+ AliMp::Direction fDirection;///< the direction of constant pad size
+ TVector2 fMinPadDimensions; ///< minimal pad dimensions
+ AliMpIntPair fMaxPadIndices; ///< maximum pad indices
+ Int_t fNofPads; ///< total number of pads
ClassDef(AliMpSector,1) // Sector
// inline functions
-inline AliMpDirection AliMpSector::GetDirection() const
+inline AliMp::Direction AliMpSector::GetDirection() const
{ return fDirection; }
inline TVector2 AliMpSector::GetMinPadDimensions() const
const TString AliMpSectorReader::fgkPadRowSegmentKeyword = "PAD_ROW_SEGMENT";
//_____________________________________________________________________________
-AliMpSectorReader::AliMpSectorReader(AliMpStationType station,
- AliMpPlaneType plane)
+AliMpSectorReader::AliMpSectorReader(AliMp::StationType station,
+ AliMp::PlaneType plane)
: TObject(),
fStationType(station),
fPlaneType(plane),
//_____________________________________________________________________________
AliMpSectorReader::AliMpSectorReader()
: TObject(),
- fStationType(kStation1),
- fPlaneType(kBendingPlane),
+ fStationType(AliMp::kStation1),
+ fPlaneType(AliMp::kBendingPlane),
fSector(0),
fMotifReader(0)
{
in >> offsetX;
in >> offsetY;
- AliMpDirection direction;
- direction = (directionStr == "Y") ? kY : kX;
+ AliMp::Direction direction;
+ direction = (directionStr == "Y") ? AliMp::kY : AliMp::kX;
AliDebugStream(2) << nofZones << " " << nofRows << endl;
}
//_____________________________________________________________________________
-void AliMpSectorReader::ReadSectorSpecialData(ifstream& in, AliMpXDirection direction)
+void AliMpSectorReader::ReadSectorSpecialData(ifstream& in, AliMp::XDirection direction)
{
/// Read sector input data
/// with a special (irregular) motifs.
}
//_____________________________________________________________________________
-void AliMpSectorReader::ReadRowSpecialData(ifstream& in, AliMpXDirection direction)
+void AliMpSectorReader::ReadRowSpecialData(ifstream& in, AliMp::XDirection direction)
{
/// Read row input data
/// with a special (irregular) motifs.
AliMpRow* row = fSector->GetRow(id);
AliMpVRowSegmentSpecial* segment = 0;
- if (direction == kLeft) {
+ if (direction == AliMp::kLeft) {
AliMpVRowSegment* firstNormalSeg = row->GetRowSegment(0);
Double_t offsetX = firstNormalSeg->LeftBorderX();
//_____________________________________________________________________________
void AliMpSectorReader::ReadRowSegmentSpecialData(ifstream& in,
AliMpVRowSegmentSpecial* segment,
- AliMpXDirection direction)
+ AliMp::XDirection direction)
{
/// Read row segment input data
/// with a special (irregular) motifs.
return 0;
}
- ReadSectorSpecialData(in2, kLeft);
+ ReadSectorSpecialData(in2, AliMp::kLeft);
}
// Open input file for special outer zone
return 0;
}
- ReadSectorSpecialData(in3, kRight);
+ ReadSectorSpecialData(in3, AliMp::kRight);
}
fSector->Initialize();
class AliMpSectorReader : public TObject
{
public:
- AliMpSectorReader(AliMpStationType station, AliMpPlaneType plane);
+ AliMpSectorReader(AliMp::StationType station, AliMp::PlaneType plane);
AliMpSectorReader();
virtual ~AliMpSectorReader();
void ReadRowSegmentsData(ifstream& in,
AliMpZone* zone, AliMpSubZone* subZone);
AliMpVMotif* ReadMotifData(ifstream& in, AliMpZone* zone);
- void ReadSectorSpecialData(ifstream& in, AliMpXDirection direction);
+ void ReadSectorSpecialData(ifstream& in, AliMp::XDirection direction);
void ReadMotifsSpecialData(ifstream& in);
- void ReadRowSpecialData(ifstream& in, AliMpXDirection direction);
+ void ReadRowSpecialData(ifstream& in, AliMp::XDirection direction);
void ReadRowSegmentSpecialData(ifstream& in,
AliMpVRowSegmentSpecial* segment,
- AliMpXDirection direction);
+ AliMp::XDirection direction);
// static data members
static const TString fgkSectorKeyword; ///< sector keyword
static const TString fgkPadRowSegmentKeyword; ///< pad row segment keyword
// data members
- AliMpStationType fStationType; ///< station type
- AliMpPlaneType fPlaneType; ///< plane type
- AliMpSector* fSector; ///< sector
- AliMpMotifReader* fMotifReader; ///< motif reader
+ AliMp::StationType fStationType; ///< station type
+ AliMp::PlaneType fPlaneType; ///< plane type
+ AliMpSector* fSector; ///< sector
+ AliMpMotifReader* fMotifReader; ///< motif reader
ClassDef(AliMpSectorReader,1) // Data reader
};
/// return 0 if not found
switch (fkSector->GetDirection()) {
- case kX : {
+ case AliMp::kX : {
// Case where all the pads have the same size along X direction
for (Int_t irow=0; irow<fkSector->GetNofRows(); ++irow) {
}
break;
////////////////////////////////////////////////////////////////////////////////
- case kY : {
+ case AliMp::kY : {
// Case where all the pads have the same size along Y direction
// look for the row which contains the indices
AliMpRow* row=0;
switch (fkSector->GetDirection()) {
- case kX: return new AliMpSectorAreaVPadIterator(this, area);
+ case AliMp::kX: return new AliMpSectorAreaVPadIterator(this, area);
;;
- case kY: return new AliMpSectorAreaHPadIterator(this, area);
+ case AliMp::kY: return new AliMpSectorAreaHPadIterator(this, area);
;;
}
}
//______________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
AliMpSectorSegmentation::PlaneType() const
{
return GetSector()->GetPlaneType();
switch (fkSector->GetDirection()) {
- case kX: return PadByYDirection(startPosition, distance);
+ case AliMp::kX: return PadByYDirection(startPosition, distance);
;;
- case kY: return PadByXDirection(startPosition, distance);
+ case AliMp::kY: return PadByXDirection(startPosition, distance);
;;
}
virtual void GetAllElectronicCardIDs(TArrayI& ecn) const;
- AliMpPlaneType PlaneType() const;
+ AliMp::PlaneType PlaneType() const;
TVector2 Dimensions() const;
#include "AliMpSegmentation.h"
+#include "AliMpDetElement.h"
#include "AliMpDEManager.h"
#include "AliMpDEIterator.h"
#include "AliMpExMap.h"
#include "AliMpTrigger.h"
#include "AliMpTriggerReader.h"
#include "AliMpTriggerSegmentation.h"
+#include "AliMpCathodType.h"
#include "AliLog.h"
fElCardsMap.SetOwner(true);
// Create mapping segmentations for all detection elements
- for ( Int_t cath = 0; cath < 2; cath ++ )
- {
+ for ( Int_t cath = AliMp::kCath0; cath <= AliMp::kCath1; cath ++ ) {
AliMpDEIterator it;
- for ( it.First(); ! it.IsDone(); it.Next() )
- {
- CreateMpSegmentation(it.CurrentDE(), cath);
+ for ( it.First(); ! it.IsDone(); it.Next() ) {
+ CreateMpSegmentation(it.CurrentDEId(), AliMp::GetCathodType(cath));
}
}
// Fill el cards map for all detection elements
// of tracking chambers
AliMpDEIterator it;
- for ( it.First(); ! it.IsDone(); it.Next() )
- {
- if ( AliMpDEManager::GetStationType(it.CurrentDE()) != kStationTrigger )
- {
- FillElCardsMap(it.CurrentDE());
+ for ( it.First(); ! it.IsDone(); it.Next() ) {
+ if ( AliMpDEManager::GetStationType(it.CurrentDEId()) != AliMp::kStationTrigger ) {
+ FillElCardsMap(it.CurrentDEId());
}
}
}
{
/// Constructor for IO
+ AliDebug(1,"");
+
fgInstance = this;
}
//______________________________________________________________________________
AliMpVSegmentation*
-AliMpSegmentation::CreateMpSegmentation(Int_t detElemId, Int_t cath)
+AliMpSegmentation::CreateMpSegmentation(Int_t detElemId, AliMp::CathodType cath)
{
/// Create mapping segmentation for given detElemId and cath
/// or return it if it was already built
// Check detElemId & cath
- if ( ! AliMpDEManager::IsValid(detElemId, cath, true) ) return 0;
+ if ( ! AliMpDEManager::IsValidDetElemId(detElemId, true) ) return 0;
// If segmentation is already built, just return it
//
- TString deName = AliMpDEManager::GetDESegName(detElemId, cath);
- TObject* object = fMpSegmentations.Get(deName);
+ AliMpDetElement* detElement = AliMpDEManager::GetDetElement(detElemId);
+ TString deSegName = detElement->GetSegName(cath);
+ TObject* object = fMpSegmentations.Get(deSegName);
if ( object ) return (AliMpVSegmentation*)object;
AliDebugStream(3)
// Read mapping data and create segmentation
//
- AliMpStationType stationType = AliMpDEManager::GetStationType(detElemId);
- AliMpPlaneType planeType = AliMpDEManager::GetPlaneType(detElemId, cath);
- TString deTypeName = AliMpDEManager::GetDETypeName(detElemId, cath);
+ AliMp::StationType stationType = detElement->GetStationType();
+ AliMp::PlaneType planeType = detElement->GetPlaneType(cath);
+ TString deTypeName = detElement->GetSegType();
AliMpVSegmentation* mpSegmentation = 0;
- if ( stationType == kStation1 || stationType == kStation2 ) {
+ if ( stationType == AliMp::kStation1 || stationType == AliMp::kStation2 ) {
AliMpSectorReader reader(stationType, planeType);
AliMpSector* sector = reader.BuildSector();
mpSegmentation = new AliMpSectorSegmentation(sector, true);
}
- else if ( stationType == kStation345 ) {
+ else if ( stationType == AliMp::kStation345 ) {
AliMpSt345Reader reader(fSlatMotifMap);
AliMpSlat* slat = reader.ReadSlat(deTypeName, planeType);
mpSegmentation = new AliMpSlatSegmentation(slat, true);
}
- else if ( stationType == kStationTrigger ) {
+ else if ( stationType == AliMp::kStationTrigger ) {
AliMpTriggerReader reader(fSlatMotifMap);
AliMpTrigger* trigger = reader.ReadSlat(deTypeName, planeType);
mpSegmentation = new AliMpTriggerSegmentation(trigger, true);
else
AliErrorStream() << "Unknown station type" << endl;
- fMpSegmentations.Add(deName, mpSegmentation);
+ fMpSegmentations.Add(deSegName, mpSegmentation);
- StdoutToAliDebug(3,fSlatMotifMap.Print(););
+ StdoutToAliDebug(3, fSlatMotifMap.Print(););
return mpSegmentation;
}
// Do it in 2 steps to be able to set the AliMpExMap size once for all,
// to avoid annoying warning message in case of dynamical resizing.
// (not critical).
- for ( Int_t cathode = 0; cathode < 2; ++cathode )
+ for ( Int_t cathode = AliMp::kCath0; cathode <= AliMp::kCath1; ++cathode )
{
- seg[cathode] = GetMpSegmentation(detElemId,cathode);
+ seg[cathode] = GetMpSegmentation(detElemId,AliMp::GetCathodType(cathode));
seg[cathode]->GetAllElectronicCardIDs(ecn[cathode]);
}
mde->SetSize(ecn[0].GetSize()+ecn[1].GetSize());
- for ( Int_t cathode = 0; cathode < 2; ++ cathode )
+ for ( Int_t cathode = AliMp::kCath0; cathode <= AliMp::kCath1; ++ cathode )
{
for ( Int_t i = 0; i < ecn[cathode].GetSize(); ++i )
{
//______________________________________________________________________________
const AliMpVSegmentation*
AliMpSegmentation::GetMpSegmentation(
- Int_t detElemId, Int_t cath, Bool_t warn) const
+ Int_t detElemId, AliMp::CathodType cath, Bool_t warn) const
{
/// Return mapping segmentation for given detElemId and cath
// Check detElemId & cath
- if ( ! AliMpDEManager::IsValid(detElemId, cath, false) ) {
+ if ( ! AliMpDEManager::IsValidDetElemId(detElemId, false) ) {
if ( warn ) {
AliWarningStream()
- << "Invalid detElemId/cathod ("
- << detElemId << ", " << cath << ")" << endl;
+ << "Invalid detElemId " << detElemId << endl;
}
return 0;
}
- TString deName = AliMpDEManager::GetDESegName(detElemId, cath);
- TObject* object = fMpSegmentations.Get(deName);
+ // If segmentation is already built, just return it
+ //
+ AliMpDetElement* detElement = AliMpDEManager::GetDetElement(detElemId);
+ TString deSegName = detElement->GetSegName(cath);
+ TObject* object = fMpSegmentations.Get(deSegName);
if ( ! object ) {
// Should never happen
AliErrorStream()
# include "AliMpExMap.h"
#endif
+#ifndef ALI_MP_CATHOD_TYPE_H
+# include "AliMpCathodType.h"
+#endif
+
#ifndef ALIMPSLATMOTIFMAP_H
# include "AliMpSlatMotifMap.h"
#endif
// methods
const AliMpVSegmentation* GetMpSegmentation(
- Int_t detElemId, Int_t cath,
+ Int_t detElemId, AliMp::CathodType cath,
Bool_t warn = true) const;
const AliMpVSegmentation* GetMpSegmentationByElectronics(
AliMpSegmentation& operator=(const AliMpSegmentation& rhs);
AliMpVSegmentation* CreateMpSegmentation(
- Int_t detElemId, Int_t cath);
+ Int_t detElemId, AliMp::CathodType cath);
AliMpExMap* FillElCardsMap(Int_t detElemId);
AliMpSlat::AliMpSlat()
: TObject(),
fId(""),
- fPlaneType(kNonBendingPlane),
+ fPlaneType(AliMp::kNonBendingPlane),
fDX(0),
fDY(0),
fNofPadsX(0),
}
//_____________________________________________________________________________
-AliMpSlat::AliMpSlat(const char* id, AliMpPlaneType bendingOrNonBending)
+AliMpSlat::AliMpSlat(const char* id, AliMp::PlaneType bendingOrNonBending)
: TObject(),
fId(id),
fPlaneType(bendingOrNonBending),
// the plane type as a suffix.
//
TString name(GetID());
- if ( fPlaneType == kBendingPlane )
+ if ( fPlaneType == AliMp::kBendingPlane )
{
name += ".Bending";
}
- else if ( fPlaneType == kNonBendingPlane )
+ else if ( fPlaneType == AliMp::kNonBendingPlane )
{
name += ".NonBending";
}
#endif
AliMpSlat();
- AliMpSlat(const char* id, AliMpPlaneType bendingOrNonBending);
+ AliMpSlat(const char* id, AliMp::PlaneType bendingOrNonBending);
virtual ~AliMpSlat();
TVector2 Dimensions() const;
*/
void ForcePosition(const TVector2& pos);
- AliMpPlaneType PlaneType() const { return fPlaneType; }
+ AliMp::PlaneType PlaneType() const { return fPlaneType; }
Int_t NofPads() const { return fNofPads; }
AliMpSlat& operator=(const AliMpSlat& rhs);
TString fId; ///< The name of this slat, e.g. 112233N
- AliMpPlaneType fPlaneType; ///< Whether it's bending or non-bending plane
+ AliMp::PlaneType fPlaneType; ///< Whether it's bending or non-bending plane
Double_t fDX; ///< Half-size in X (cm)
Double_t fDY; ///< Half-size in Y (cm)
Int_t fNofPadsX; ///< Actual number of pads in x direction
}
//_____________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
AliMpSlatSegmentation::PlaneType() const
{
return Slat()->PlaneType();
void GetAllElectronicCardIDs(TArrayI& ecn) const;
- AliMpPlaneType PlaneType() const;
+ AliMp::PlaneType PlaneType() const;
TVector2 Dimensions() const;
/// Create a new AliMpPCB object, by reading it from file.
/// The returned object must be deleted by the client
- std::ifstream in(AliMpFiles::SlatPCBFilePath(kStation345,pcbType).Data());
+ std::ifstream in(AliMpFiles::SlatPCBFilePath(AliMp::kStation345,pcbType).Data());
if (!in.good())
{
AliErrorClass(Form("Cannot open file for PCB %s",pcbType));
return 0;
}
- AliMpMotifReader reader(kStation345,kNonBendingPlane);
+ AliMpMotifReader reader(AliMp::kStation345,AliMp::kNonBendingPlane);
// note that the nonbending
// parameter is of no use for station345, as far as reading motif is
// concerned, as all motifs are supposed to be in the same directory
//_____________________________________________________________________________
AliMpSlat*
-AliMpSt345Reader::ReadSlat(const char* slatType, AliMpPlaneType planeType)
+AliMpSt345Reader::ReadSlat(const char* slatType, AliMp::PlaneType planeType)
{
///
/// Create a new AliMpSlat object, by reading it from file.
/// The returned object must be deleted by the client.
- std::ifstream in(AliMpFiles::SlatFilePath(kStation345,slatType,
+ std::ifstream in(AliMpFiles::SlatFilePath(AliMp::kStation345,slatType,
planeType).Data());
if (!in.good())
{
AliErrorClass(Form("Cannot read slat from %s",
- AliMpFiles::SlatFilePath(kStation345,slatType,planeType).Data()));
+ AliMpFiles::SlatFilePath(AliMp::kStation345,slatType,planeType).Data()));
return 0;
}
AliMpSt345Reader(AliMpSlatMotifMap&);
virtual ~AliMpSt345Reader();
- AliMpSlat* ReadSlat(const char* slatType, AliMpPlaneType planeType);
+ AliMpSlat* ReadSlat(const char* slatType, AliMp::PlaneType planeType);
AliMpPCB* ReadPCB(const char* pcbType);
AliMpTrigger::AliMpTrigger()
: TObject(),
fId(""),
- fPlaneType(kNonBendingPlane),
+ fPlaneType(AliMp::kNonBendingPlane),
fSlats(0),
fSlatSegmentations(0),
fMaxNofPadsY(0),
}
//_____________________________________________________________________________
-AliMpTrigger::AliMpTrigger(const char* slatType, AliMpPlaneType bendingOrNot)
+AliMpTrigger::AliMpTrigger(const char* slatType, AliMp::PlaneType bendingOrNot)
: TObject(),
fId(slatType),
fPlaneType(bendingOrNot),
{
// returns the name (=id+bending/non-bending) of this slat
TString name(GetID());
- if ( fPlaneType == kBendingPlane )
+ if ( fPlaneType == AliMp::kBendingPlane )
{
name += ".Bending";
}
- else if ( fPlaneType == kNonBendingPlane )
+ else if ( fPlaneType == AliMp::kNonBendingPlane )
{
name += ".NonBending";
}
}
//_____________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
AliMpTrigger::PlaneType() const
{
// Bending or not
{
public:
AliMpTrigger();
- AliMpTrigger(const char* slatType, AliMpPlaneType bendingOrNonBending);
+ AliMpTrigger(const char* slatType, AliMp::PlaneType bendingOrNonBending);
virtual ~AliMpTrigger();
Bool_t AdoptLayer(AliMpSlat* slat);
void Print(Option_t* option="") const;
- AliMpPlaneType PlaneType() const;
+ AliMp::PlaneType PlaneType() const;
TVector2 Dimensions() const;
Bool_t IsLayerValid(int layer) const;
TString fId; ///< name of that slat
- AliMpPlaneType fPlaneType; ///< bending or non-bending
+ AliMp::PlaneType fPlaneType; ///< bending or non-bending
TObjArray fSlats; ///< virtual slat composing this trigger slat
TObjArray fSlatSegmentations; ///< segmentations for virtual slats
Int_t fMaxNofPadsY; ///< max number of pads in y direction
//_____________________________________________________________________________
AliMpSlat*
AliMpTriggerReader::BuildSlat(const char* slatName,
- AliMpPlaneType planeType,
+ AliMp::PlaneType planeType,
const TList& lines,
Double_t scale)
{
//_____________________________________________________________________________
void
AliMpTriggerReader::ReadLines(const char* slatType,
- AliMpPlaneType planeType,
+ AliMp::PlaneType planeType,
TList& lines,
Double_t& scale,
Bool_t& flipX, Bool_t& flipY,
" destLine %d\n",slatType,scale,flipX,flipY,
srcLine,destLine));
- TString filename(AliMpFiles::SlatFilePath(kStationTrigger,slatType,
+ TString filename(AliMpFiles::SlatFilePath(AliMp::kStationTrigger,slatType,
planeType).Data());
std::ifstream in(filename.Data());
if (!in.good())
pcbName = pcbName(0,pos);
}
- std::ifstream in(AliMpFiles::SlatPCBFilePath(kStationTrigger,pcbName).Data());
+ std::ifstream in(AliMpFiles::SlatPCBFilePath(AliMp::kStationTrigger,pcbName).Data());
if (!in.good())
{
AliErrorClass(Form("Cannot open file for PCB %s",pcbName.Data()));
return 0;
}
- AliMpMotifReader reader(kStationTrigger,kNonBendingPlane);
+ AliMpMotifReader reader(AliMp::kStationTrigger,AliMp::kNonBendingPlane);
// note that the nonbending
// parameter is of no use for trigger, as far as reading motif is
// concerned, as all motifs are supposed to be in the same directory
//_____________________________________________________________________________
AliMpTrigger*
-AliMpTriggerReader::ReadSlat(const char* slatType, AliMpPlaneType planeType)
+AliMpTriggerReader::ReadSlat(const char* slatType, AliMp::PlaneType planeType)
{
///
/// Create a new AliMpTrigger object, by reading it from file.
# include "AliMpPlaneType.h"
#endif
-#ifndef ALI_MP_STATION_TYPE_H
-# include "AliMpStationType.h"
-#endif
-
class AliMpSlatMotifMap;
class AliMpSlat;
class AliMpTrigger;
AliMpTriggerReader(AliMpSlatMotifMap& motifMap);
virtual ~AliMpTriggerReader();
- AliMpTrigger* ReadSlat(const char* slatType, AliMpPlaneType planeType);
+ AliMpTrigger* ReadSlat(const char* slatType, AliMp::PlaneType planeType);
AliMpPCB* ReadPCB(const char* pcbType);
private:
AliMpSlat* BuildSlat(const char* slatName,
- AliMpPlaneType planeType,
+ AliMp::PlaneType planeType,
const TList& descriptionLines,
Double_t scale=1.0);
AliMpPCB* PCB(const char* pcbType);
void ReadLines(const char* slatType,
- AliMpPlaneType planeType,
+ AliMp::PlaneType planeType,
TList& lines,
Double_t& scale, Bool_t& flipX, Bool_t& flipY,
Int_t& srcLine, Int_t& destLine);
}
//_____________________________________________________________________________
-AliMpPlaneType
+AliMp::PlaneType
AliMpTriggerSegmentation::PlaneType() const
{
return Slat()->PlaneType();
virtual void GetAllElectronicCardIDs(TArrayI& ecn) const;
- AliMpPlaneType PlaneType() const;
+ AliMp::PlaneType PlaneType() const;
TVector2 Dimensions() const;
virtual void GetAllElectronicCardIDs(TArrayI& ecn) const = 0;
- virtual AliMpPlaneType PlaneType() const = 0;
+ virtual AliMp::PlaneType PlaneType() const = 0;
/// Gives the half-sizes (in cm) of the underlying detection element.
virtual TVector2 Dimensions() const = 0;
//
// Test macro for testing which pad is seen as "existing" by AliMpSector.
-void testAllIndices(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane)
+void testAllIndices(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane)
{
AliMpSectorReader r(station, plane);
Int_t nx2 = 950/2;
Int_t ny2 = 950/2;
- if (station == kStation2) {
+ if (station == AliMp::kStation2) {
nx2 = 1200/2;
ny2 = 1200/2;
}
}
}
-void testAnyPadIterators(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testAnyPadIterators(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false,
Int_t i=50, Int_t j=50)
{
void testDE()
{
- AliMpSegFactory factory;
-
AliMpDEIterator it;
for ( it.First(); ! it.IsDone(); it.Next() ) {
- cout << "In detection element: " << it.CurrentDE() << endl;
+ cout << "In detection element: " << it.CurrentDEId() << endl;
// Create/get segmentation via factory
AliMpVSegmentation* segmentation
- = factory.CreateMpSegmentation(it.CurrentDE(), 0);
+ = AliMpSegmentation::Instance()
+ ->GetMpSegmentation(it.CurrentDEId(), kCath0);
// Print number of pads
cout << " number of pads: " << segmentation->NofPads() << endl;
cout << " found pad: " << pad << endl << endl;
}
-
- // Delete all created segmentations
- factory.DeleteSegmentations();
}
//
// Test macro for testing which pad is seen as "existing" by AliMpSector.
-void testExistingPads(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testExistingPads(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpSector *sector = 0;
#include <iomanip>
-void testExistingPads2(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane)
+void testExistingPads2(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane)
{
AliMpSectorReader r(station, plane);
AliMpSector* sector = r.BuildSector();
// First loop over indices
cout << "Iterating via indices ..." << endl;
Int_t counter1 = 0;
- if ( sector->GetDirection() == kX )
+ if ( sector->GetDirection() == AliMp::kX )
for (Int_t i=1; i<segmentation.MaxPadIndexX()+1; i++) {
for (Int_t j=1; j<segmentation.MaxPadIndexY()+1; j++) {
AliMpIntPair indices(i,j);
}
}
- if ( sector->GetDirection() == kY )
+ if ( sector->GetDirection() == AliMp::kY )
for (Int_t j=1; j<segmentation.MaxPadIndexY()+1; j++) {
for (Int_t i=1; i<segmentation.MaxPadIndexX()+1; i++) {
AliMpIntPair indices(i,j);
//
// Test macro for drawing sector data.
-void testGraphics(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testGraphics(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpSector *sector = 0;
// Warning : this function leaks memory. But should be fine as only used
// interactively to check a few motifs at once...
//
- AliMpMotifReader reader(kStation345,kBendingPlane);
+ AliMpMotifReader reader(AliMp::kStation345,AliMp::kBendingPlane);
AliMpMotifType* type = reader.BuildMotifType(motifType);
if (!type)
{
//220000N
//122000NR1
//112200NR2
-void testGraphicsSlat(AliMpPlaneType planeType = kBendingPlane,
+void testGraphicsSlat(AliMpPlaneType planeType = AliMp::kBendingPlane,
Option_t* option = "PMCI",
Bool_t saveJPG = false)
{
//
// Test macro for indices limits.
-void testIndicesLimits(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testIndicesLimits(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpSector *sector = 0;
#if !defined(__CINT__) || defined(__MAKECINT__)
-#include "AliMpStationType.h"
#include "AliMpSegmentation.h"
#include "AliMpVSegmentation.h"
#include "AliMpDEManager.h"
//
// Test macro for reading motif type data and iterate over them.
-void testMotifTypeIterators(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testMotifTypeIterators(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
TString names;
TString names2;
Int_t nv =0;
- if ( station == kStation1 )
- if ( plane == kBendingPlane )
+ if ( station == AliMp::kStation1 )
+ if ( plane == AliMp::kBendingPlane )
names ="ABCDEFGHI";
else
names = "ABCDEFGHIJKLMN";
- else if ( station == kStation2 )
- if ( plane == kBendingPlane ) {
+ else if ( station == AliMp::kStation2 )
+ if ( plane == AliMp::kBendingPlane ) {
names ="ABCDEFGHIJKLMNOPQRSTUVWXY";
names2 ="abcdefghimnptuvvvvv";
nv = 5;
//
// Test macro for reading sector, and iterate over it
-void testNeighboursPadIterator(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testNeighboursPadIterator(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false,
Int_t i=50, Int_t j=50)
{
// Test macro for testing retrieving of pad dimensions from
// the map in AliMpSectorSegmentation.
-void testPadDimensions(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testPadDimensions(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpSector *sector = 0;
// all pads up, down, right, left from this pad
// (up to the plane border).
-void testPadsUpEtc(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testPadsUpEtc(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpSector *sector = 0;
// Test macro for making an output file, where all mapping elements
// indices & positions are written.
-void testPrintLimits(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
- Bool_t rootInput = false,
- ostream& out=cout)
+void testPrintLimits(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
+ Bool_t rootInput = false,
+ ostream& out=cout)
{
AliMpSector *sector = 0;
if (!rootInput) {
//
// Test macro for reading motif type data.
-void testReadMotifType(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testReadMotifType(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpMotifReader r(station, plane);
TString names;
TString names2;
Int_t nv =0;
- if ( station == kStation1 )
- if ( plane == kBendingPlane )
+ if ( station == AliMp::kStation1 )
+ if ( plane == AliMp::kBendingPlane )
names ="ABCDEFGHI";
else
names = "ABCDEFGHIJKLMN";
- else if ( station == kStation2 )
- if ( plane == kBendingPlane ) {
+ else if ( station == AliMp::kStation2 )
+ if ( plane == AliMp::kBendingPlane ) {
names ="ABCDEFGHIJKLMNOPQRSTUVWXY";
names2 ="abcdefghimnptuv";
nv = 5;
void testReadMotifTypeSlat()
{
- AliMpMotifReader r(kStation345,kNonBendingPlane);
+ AliMpMotifReader r(AliMp::kStation345,AliMp::kNonBendingPlane);
// note that second parameter is not used for station345.
Int_t n = 0;
#include <iomanip>
-void testReadSector(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testReadSector(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpSector *sector = 0;
cout << endl;
// Find row test
- if (plane == kBendingPlane)
+ if (plane == AliMp::kBendingPlane)
cout << "0th row low border " << sector->FindRow(TVector2(0., 0.))->GetID() << endl;
- if (plane == kNonBendingPlane)
+ if (plane == AliMp::kNonBendingPlane)
cout << "0th row low border " << sector->FindRow(TVector2(0., 0.215))->GetID() << endl;
cout << "in 0th row " << sector->FindRow(TVector2(0., 2.5))->GetID() << endl;
cout << "0th row up border " << sector->FindRow(TVector2(0., 6.72))->GetID() << endl;
cout << "in 4th row " << sector->FindRow(TVector2(0., 30.))->GetID() << endl;
- if (plane == kBendingPlane)
+ if (plane == AliMp::kBendingPlane)
cout << "12th row up border " << sector->FindRow(TVector2(0., 89.46))->GetID() << endl;
- if (plane == kNonBendingPlane)
+ if (plane == AliMp::kNonBendingPlane)
cout << "12th row up border " << sector->FindRow(TVector2(0., 84.84))->GetID() << endl;
cout << endl;
}
// Find special motif test
- if (plane == kNonBendingPlane) {
+ if (plane == AliMp::kNonBendingPlane) {
Int_t ids[6] = { 20, 46, 47, 74, 75, 76 };
for (Int_t i=0; i<6 ; i++) {
TString slat( ((TObjString*)slatsToTest[i])->String());
cout << "Trying to read " << slat << endl;
- AliMpSlat* b = AliMpSt345Reader::ReadSlat(slat.Data(),kBendingPlane);
- AliMpSlat* nb = AliMpSt345Reader::ReadSlat(slat.Data(),kNonBendingPlane);
+ AliMpSlat* b = AliMpSt345Reader::ReadSlat(slat.Data(),AliMp::kBendingPlane);
+ AliMpSlat* nb = AliMpSt345Reader::ReadSlat(slat.Data(),AliMp::kNonBendingPlane);
if ( !b ) cout << " Missing BENDING !" << endl;
if ( !nb ) cout << " Missing NONBENDING !" << endl;
if ( b && nb )
//timer.Print();
}
-void testSectorAreaIterator(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testSectorAreaIterator(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpSector *sector = 0;
// Test macro for which verify that all FindPosition, FindIndices
// and FindLocation methods are consistents between them.
-void testSectorFind(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testSectorFind(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpSector *sector = 0;
//
// Test macro for reading sector, and iterate over it
-void testSectorPadIterators(AliMpStationType station = kStation1,
- AliMpPlaneType plane = kBendingPlane,
+void testSectorPadIterators(AliMp::StationType station = AliMp::kStation1,
+ AliMp::PlaneType plane = AliMp::kBendingPlane,
Bool_t rootInput = false)
{
AliMpSector *sector = 0;
slattypes.insert(it->second);
std::cout << it->first << " : " << it->second << " ";
AliMpSlat* b = static_cast<AliMpSlat*>
- (AliMpSegmentationManager::Segmentation(it->first,kBendingPlane));
+ (AliMpSegmentationManager::Segmentation(it->first,AliMp::kBendingPlane));
AliMpSlat* nb = static_cast<AliMpSlat*>
- (AliMpSegmentationManager::Segmentation(it->first,kNonBendingPlane));
+ (AliMpSegmentationManager::Segmentation(it->first,AliMp::kNonBendingPlane));
std::cout << " B : " << b << " NB : " << nb;
Double_t bx = 0.0;
Double_t nbx = 0.0;
AliMUONChamber& chamber = muon->Chamber(ichamber);
int icathode = 1;
- if ( bendingornot == kNonBendingPlane ) icathode = 2;
+ if ( bendingornot == AliMp::kNonBendingPlane ) icathode = 2;
AliMUONGeometrySegmentation* gs = chamber.SegmentationModel2(icathode);
if (!gs) return error(Form("Cannot get cathode %d",icathode));
AliMUONVGeometryDESegmentation* o;
AliMUONVGeometryDESegmentation* n;
- AliMpPlaneType pt[] = { kNonBendingPlane, kBendingPlane };
+ AliMpPlaneType pt[] = { AliMp::kNonBendingPlane, AliMp::kBendingPlane };
for ( int ipt = 0; ipt < 2; ++ipt )
{
- std::cout << ( (pt[ipt] == kNonBendingPlane )?"NonBending"
+ std::cout << ( (pt[ipt] == AliMp::kNonBendingPlane )?"NonBending"
: "Bending" )
<< std::endl;
Int_t p_nnpads = 0;
{
TString slatName( ((TObjString*)slatsToTest[i])->String());
- AliMpSlat* bending = reader.ReadSlat(slatName.Data(),kBendingPlane);
- AliMpSlat* nonbending = reader.ReadSlat(slatName.Data(),kNonBendingPlane);
+ AliMpSlat* bending = reader.ReadSlat(slatName.Data(),AliMp::kBendingPlane);
+ AliMpSlat* nonbending = reader.ReadSlat(slatName.Data(),AliMp::kNonBendingPlane);
timerCount.Start(false);
Int_t NumberOfBendingPads = Count(*bending);
void testUpdateGlobalIndices()
{
- AliMpSectorReader reader(kStation1, kNonBendingPlane);
+ AliMpSectorReader reader(AliMp::kStation1, AliMp::kNonBendingPlane);
//reader.SetVerboseLevel(1);
// Read data