#include "TArrayI.h"
#include "TObjArray.h"
-///
+//-----------------------------------------------------------------------------
/// \class AliMpTrigger
///
/// A trigger 'slat' object.
/// "locations".
///
/// \author Laurent Aphecetche
+//-----------------------------------------------------------------------------
/// \cond CLASSIMP
ClassImp(AliMpTrigger)
fDX(0),
fDY(0)
{
- // default ctor
+ /// default ctor
AliDebugStream(1) << "this = " << this << endl;
fDX(0),
fDY(0)
{
- // normal ctor
+ /// normal ctor
AliDebugStream(1) << "this = " << this << endl;
//_____________________________________________________________________________
AliMpTrigger::~AliMpTrigger()
{
- // dtor
+ /// dtor
AliDebugStream(1) << "this = " << this << endl;
fSlatSegmentations.Delete();
Bool_t
AliMpTrigger::AdoptLayer(AliMpSlat* slat)
{
- // Adopt (i.e. we become owner of that pointer) a slat, as
- // a layer of this trigger slat.
+ /// Adopt (i.e. we become owner of that pointer) a slat, as
+ /// a layer of this trigger slat.
AliDebug(2,Form("%s is adopting %s ",
GetID(),slat->GetID()));
// the slat segmentation will be the owner of the slat, and will delete
// it when it'll be deleted itself
fSlatSegmentations.Add(new AliMpSlatSegmentation(slat,owner));
- fMaxNofPadsY = std::max(slat->GetMaxNofPadsY(),fMaxNofPadsY);
- fDX = std::max(fDX,slat->DX());
- fDY = std::max(fDY,slat->DY());
+ fMaxNofPadsY = TMath::Max(slat->GetMaxNofPadsY(),fMaxNofPadsY);
+ fDX = TMath::Max(fDX,slat->DX());
+ fDY = TMath::Max(fDY,slat->DY());
return kTRUE;
}
-//_____________________________________________________________________________
-TVector2
-AliMpTrigger::Dimensions() const
-{
- // Returns the dimensions (half-sizes) of that slat (cm)
- return TVector2(DX(),DY());
-}
-
//_____________________________________________________________________________
Double_t
AliMpTrigger::DX() const
{
- // Returns the half-size in X (cm)
+ /// Returns the half-size in X (cm)
return fDX;
}
Double_t
AliMpTrigger::DY() const
{
- // Returns the half-size in Y (cm)
+ /// Returns the half-size in Y (cm)
return fDY;
}
void
AliMpTrigger::GetAllLocalBoardNumbers(TArrayI& lbn) const
{
- // Fills lbn with the local board numbers we're dealing with
+ /// Fills lbn with the local board numbers we're dealing with
Int_t n(0);
for ( Int_t i = 0; i < GetSize(); ++i )
{
const char*
AliMpTrigger::GetID() const
{
- // returns the id of this slat
+ /// returns the id of this slat
return fId.Data();
}
const char*
AliMpTrigger::GetName() const
{
- // returns the name (=id+bending/non-bending) of this slat
+ /// returns the name (=id+bending/non-bending) of this slat
TString name(GetID());
if ( fPlaneType == AliMp::kBendingPlane )
{
AliMpSlat*
AliMpTrigger::GetLayer(int layer) const
{
- // Returns a given layer
+ /// Returns a given layer
if ( IsLayerValid(layer) )
{
return (AliMpSlat*)fSlats.At(layer);
AliMpVSegmentation*
AliMpTrigger::GetLayerSegmentation(int layer) const
{
- // Returns a given layer
+ /// Returns a given layer
if ( IsLayerValid(layer) )
{
return (AliMpSlatSegmentation*)fSlatSegmentations.At(layer);
Int_t
AliMpTrigger::GetNofPadsX() const
{
- // Returns the number of pad in x direction
+ /// Returns the number of pad in x direction
if ( !GetSize() ) return -1;
if ( GetLayer(0) )
{
Int_t
AliMpTrigger::GetMaxNofPadsY() const
{
- // Maximum number of pads in y direction
+ /// Maximum number of pads in y direction
return fMaxNofPadsY;
}
Int_t
AliMpTrigger::GetSize() const
{
- // Number of layers
+ /// Number of layers
return fSlats.GetEntriesFast();
}
Bool_t
AliMpTrigger::IsLayerValid(int layer) const
{
- // Whether a given layer index is valid or not
+ /// Whether a given layer index is valid or not
if ( layer >= 0 && layer < GetSize() )
{
return kTRUE;
AliMp::PlaneType
AliMpTrigger::PlaneType() const
{
- // Bending or not
+ /// Bending or not
return fPlaneType;
}
-//_____________________________________________________________________________
-TVector2
-AliMpTrigger::Position() const
-{
- // Slat position (cm)
- return TVector2(DX(),DY());
-}
-
//_____________________________________________________________________________
void
AliMpTrigger::Print(Option_t* opt) const
{
- // Dump on screen
+ /// Dump on screen
cout << "AliMpTrigger::" << GetID();
if ( GetSize() == 0 )
{