MTChannel Class Reference

#include <MTChannel.hh>

Inheritance diagram for MTChannel:

Inheritance graph
[legend]
Collaboration diagram for MTChannel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MTChannel ()
 MTChannel (const MTChannel &orig)
 MTChannel (const ChannelHit &hit, UInt_t order)
virtual ~MTChannel ()
Int_t GetAnalogValue (void) const
Int_t GetDigitalValue (void) const
Float_t GetEnergy (void) const
const MTChannelSoftIdGetSoftId () const
UInt_t GetHardId (void) const
Int_t GetX (void) const
Int_t GetY (void) const
Int_t GetZ (void) const
UInt_t GetOrder (void) const
UInt_t GetChb (void) const
UInt_t GetChamberId (void) const
UInt_t GetDifId (void) const
UInt_t GetChipId (void) const
UInt_t GetBoardId (void) const
UInt_t GetRowInChip (void) const
UInt_t GetColInChip (void) const
UInt_t GetRowInChamber () const
UInt_t GetColInChamber () const
ULong64_t GetTimestamp (void) const
UInt_t GetBcIdAbs (void) const
UInt_t SetBcIdAbs (UInt_t bcId)
UInt_t GetBcIdDif (void) const
UInt_t GetBcIdHit (void) const
UInt_t GetBcIdHitFine (void) const
UInt_t GetAbsTime (void) const
bool GetRejected (void) const
void SetRejected (bool aValue)
void SetMemoryOrder (const UInt_t order)
UInt_t GetMemoryOrder (void) const
void SetX (Int_t val)
void SetY (Int_t val)
void SetZ (Int_t val)
void SetEnergy (Float_t val)
Int_t Compare (const TObject *obj) const
Bool_t IsSortable () const

Private Attributes

Int_t fAnalogValue
Int_t fDigitalValue
Float_t fEnergy
MTChannelSoftId fSoftId
UInt_t fHardId
Int_t fX
Int_t fY
Int_t fZ
UInt_t fOrder
ULong64_t timestamp
UInt_t bcIdAbs
UInt_t bcIdDif
UInt_t bcIdHit
UInt_t bcIdHitFine
UInt_t memoryOrder
bool rejected
UInt_t rowInChamber
UInt_t colInChamber

Detailed Description

CLASS CHANNEL Represent ChannelHit and not physical Chip channel

Definition at line 31 of file MTChannel.hh.


Constructor & Destructor Documentation

MTChannel::MTChannel (  ) 

Definition at line 51 of file MTChannel.cpp.

00052 {
00053    // Copy a channel object
00054 
00055   fAnalogValue   =  0;
00056   fDigitalValue  =  0;
00057   fEnergy   =  0.;
00058   fHardId  = 0;
00059   fX       = 0;
00060   fY       = 0;
00061   fZ       = 0;
00062   rowInChamber = 0;
00063   colInChamber = 0;
00064   fOrder   = 0;
00065   timestamp = 0;
00066   bcIdAbs =  0;
00067   bcIdDif = 0; 
00068   bcIdHit = 0; 
00069   bcIdHitFine = 0; 
00070   memoryOrder = 0; 
00071   rejected = false;
00072 }

MTChannel::MTChannel ( const MTChannel orig  ) 

Definition at line 74 of file MTChannel.cpp.

00074                                             : TObject(orig)
00075 {
00076    // Copy a channel object
00077 
00078   fAnalogValue   = orig.fAnalogValue;
00079   fDigitalValue  = orig.fDigitalValue;
00080   fEnergy   = orig.fEnergy;
00081   fSoftId  = orig.fSoftId;
00082   fHardId  = orig.fHardId;
00083   fX       = orig.fX;
00084   fY       = orig.fY;
00085   fZ       = orig.fZ;
00086   rowInChamber = orig.rowInChamber;
00087   colInChamber = orig.colInChamber;
00088   fOrder   = orig.fOrder;
00089   timestamp = orig.timestamp;
00090   bcIdAbs = orig.bcIdAbs;
00091   bcIdDif = orig.bcIdDif;
00092   bcIdHit = orig.bcIdHit;
00093   bcIdHitFine = orig.bcIdHitFine;
00094   memoryOrder = orig.memoryOrder;
00095 ;
00096 
00097   rejected = orig.rejected;
00098 }

MTChannel::MTChannel ( const ChannelHit hit,
UInt_t  order 
)

Definition at line 102 of file MTChannel.cpp.

00102                                                         {
00103   const Channel& ch = hit.getChannel();
00104 
00105   fAnalogValue   = hit.getAnalogValue();
00106   fEnergy   = 0;
00107   fDigitalValue  = hit.getDigitalValue();
00108         const Chip&  chip = ch.getChip() ;
00109         const Board& board = chip.getBoard() ;
00110         const Dif* dif = board.getDif();
00111         unsigned int difId = 0;
00112         if ( dif != NULL) difId = dif->getId();
00113         const Chamber& cham = ch.getChamber();
00114 
00115         fSoftId.SetValue(cham.getId(), difId, board.getId(), board.getRow(), board.getColumn(), board.getNbRows(), board.getNbColumns(), 
00116                   chip.getId(),chip.getRow(), chip.getColumn(),chip.getNbRows(), chip.getNbColumns(),  chip.getSerialNumber(),
00117                   ch.getHardId(),ch.getRow(),ch.getColumn());
00118         fHardId =ch.getHardId() ;
00119 
00120 
00121   fHardId = ch.getHardId();
00122   fX = ch.getX(); fY = ch.getY(); fZ = ch.getZ();
00123   rowInChamber = ch.getRowInChamber(); 
00124   colInChamber = ch.getColInChamber();
00125   fOrder = order;
00126   timestamp = hit.getTimestamp();
00127   bcIdAbs = hit.getBcIdAbs();
00128   bcIdDif = hit.getBcIdDif();
00129   bcIdHit = hit.getBcIdHit();
00130   bcIdHitFine = hit.getBcIdHitFine();
00131   memoryOrder = hit.getMemoryOrder();
00132 
00133 
00134   rejected = 0;
00135 
00136 
00137 }

virtual MTChannel::~MTChannel (  )  [inline, virtual]

Definition at line 62 of file MTChannel.hh.

00062 {Clear();}


Member Function Documentation

Int_t MTChannel::GetAnalogValue ( void   )  const [inline]

Definition at line 64 of file MTChannel.hh.

Referenced by BeamProfile::FillHotChip(), BeamProfile::FillXyDist(), BeamProfile::filterOnCut(), and main().

00064 { return fAnalogValue; }

Int_t MTChannel::GetDigitalValue ( void   )  const [inline]

Definition at line 65 of file MTChannel.hh.

Referenced by AddCaloHit(), BeamProfile::FillHotChip(), BeamProfile::FillXyDist(), and main().

00065 { return fDigitalValue; }

Float_t MTChannel::GetEnergy ( void   )  const [inline]

Definition at line 66 of file MTChannel.hh.

00066 { return fEnergy; }

const MTChannelSoftId& MTChannel::GetSoftId (  )  const [inline]

Definition at line 67 of file MTChannel.hh.

Referenced by AddCaloHit(), MTEvent::AddChannel(), BeamProfile::FillDeltaT(), BeamProfile::FillHitPerChannel(), BeamProfile::FillHitPerChipDist(), BeamProfile::FillHotChip(), and main().

00067 { return fSoftId; }

UInt_t MTChannel::GetHardId ( void   )  const [inline]

Definition at line 68 of file MTChannel.hh.

Referenced by BeamProfile::FillHitPerChannel(), and main().

00068 { return fHardId; }

Int_t MTChannel::GetX ( void   )  const [inline]

Definition at line 69 of file MTChannel.hh.

Referenced by AddCaloHit(), BeamProfile::FillXyDist(), and main().

00069 { return fX; }

Int_t MTChannel::GetY ( void   )  const [inline]

Definition at line 70 of file MTChannel.hh.

Referenced by AddCaloHit(), BeamProfile::FillXyDist(), and main().

00070 { return fY; }

Int_t MTChannel::GetZ ( void   )  const [inline]

Definition at line 71 of file MTChannel.hh.

Referenced by AddCaloHit(), and main().

00071 { return fZ; }

UInt_t MTChannel::GetOrder ( void   )  const [inline]

Definition at line 72 of file MTChannel.hh.

00072 { return fOrder; }

UInt_t MTChannel::GetChb ( void   )  const [inline]

Definition at line 73 of file MTChannel.hh.

00073 { return GetChamberId();}

UInt_t MTChannel::GetChamberId ( void   )  const

Definition at line 140 of file MTChannel.cpp.

Referenced by AddCaloHit(), BeamProfile::FillHitPerChannel(), BeamProfile::FillHitPerChipDist(), BeamProfile::FillHotChip(), BeamProfile::FillXyDist(), BeamProfile::filterOnId(), MTEvent::GetChannelByOrder(), GetChb(), MTEvent::GetNchannel(), and main().

00141 {
00142                 return fSoftId.GetChamberId();
00143 }

UInt_t MTChannel::GetDifId ( void   )  const

Definition at line 150 of file MTChannel.cpp.

Referenced by BeamProfile::filterOnId(), and main().

00151 {
00152                 return fSoftId.GetDifId();
00153 }

UInt_t MTChannel::GetChipId ( void   )  const

Definition at line 155 of file MTChannel.cpp.

Referenced by BeamProfile::FillHitPerChannel(), BeamProfile::FillHitPerChipDist(), BeamProfile::filterOnId(), and main().

00156 {
00157                 return fSoftId.GetChipId();
00158 }

UInt_t MTChannel::GetBoardId ( void   )  const

Definition at line 145 of file MTChannel.cpp.

Referenced by BeamProfile::FillHitPerChannel(), BeamProfile::FillHitPerChipDist(), BeamProfile::filterOnId(), and main().

00146 {
00147                 return fSoftId.GetBoardId();
00148 }

UInt_t MTChannel::GetRowInChip ( void   )  const

Definition at line 160 of file MTChannel.cpp.

00161 {
00162                 return fSoftId.GetRowInChip();
00163 }

UInt_t MTChannel::GetColInChip ( void   )  const

Definition at line 165 of file MTChannel.cpp.

00166 {
00167                 return fSoftId.GetColInChip();
00168 }

UInt_t MTChannel::GetRowInChamber (  )  const [inline]

Definition at line 80 of file MTChannel.hh.

Referenced by AddCaloHit().

00080 { return rowInChamber;}

UInt_t MTChannel::GetColInChamber (  )  const [inline]

Definition at line 81 of file MTChannel.hh.

Referenced by AddCaloHit().

00081 { return colInChamber;}

ULong64_t MTChannel::GetTimestamp ( void   )  const [inline]

Definition at line 84 of file MTChannel.hh.

00084 { return(timestamp); };

UInt_t MTChannel::GetBcIdAbs ( void   )  const [inline]

Definition at line 85 of file MTChannel.hh.

Referenced by GetAbsTime(), and main().

00085 { return(bcIdAbs); };

UInt_t MTChannel::SetBcIdAbs ( UInt_t  bcId  )  [inline]

Definition at line 86 of file MTChannel.hh.

00086 { bcIdAbs=bcId ; };

UInt_t MTChannel::GetBcIdDif ( void   )  const [inline]

Definition at line 88 of file MTChannel.hh.

Referenced by AddCaloHit(), BeamProfile::FillDeltaT(), BeamProfile::filterOnCut(), GetAbsTime(), and main().

00088 { return(bcIdDif); };

UInt_t MTChannel::GetBcIdHit ( void   )  const [inline]

Definition at line 89 of file MTChannel.hh.

Referenced by AddCaloHit(), MTEvent::AddChannel(), BeamProfile::FillDeltaT(), BeamProfile::filterOnCut(), GetAbsTime(), and main().

00089 { return(bcIdHit); };

UInt_t MTChannel::GetBcIdHitFine ( void   )  const [inline]

Definition at line 90 of file MTChannel.hh.

00090 { return(bcIdHitFine); };

UInt_t MTChannel::GetAbsTime ( void   )  const

Definition at line 170 of file MTChannel.cpp.

Referenced by MTEvent::AddChannel(), Compare(), and main().

00171 {
00172   Int_t deltaT = this->GetBcIdDif() - this->GetBcIdHit();
00173   UInt_t time = 0;
00174   if ( deltaT > 0 )
00175   {
00176     // temps absolu = BCID_Abs + ( BCID_Dif - BCID_Hit )
00177     time = this->GetBcIdAbs()  + deltaT;
00178   }
00179   else
00180   {
00181     // temps absolu = BCID_Abs + ( BCID_Dif + 2e24-1 - BCID_Hit )
00182     time = this->GetBcIdAbs() + ( this->GetBcIdDif() + 16777215 - this->GetBcIdHit() );
00183     //cout << "abs[" << this->GetBcIdAbs() << "] bcid_dif[" << this->GetBcIdDif() << "] bcIdHit[" << this->GetBcIdHit() << "] time[" << time << "]" << endl;
00184   }
00185 
00186   return time;
00187 
00188 }

bool MTChannel::GetRejected ( void   )  const [inline]

Definition at line 93 of file MTChannel.hh.

00093 { return rejected;};

void MTChannel::SetRejected ( bool  aValue  )  [inline]

Definition at line 94 of file MTChannel.hh.

00094 { rejected = aValue; };

void MTChannel::SetMemoryOrder ( const UInt_t  order  )  [inline]

Definition at line 96 of file MTChannel.hh.

00096 { memoryOrder = order; };

UInt_t MTChannel::GetMemoryOrder ( void   )  const [inline]

Definition at line 97 of file MTChannel.hh.

00097 { return memoryOrder ;}  ;

void MTChannel::SetX ( Int_t  val  )  [inline]

Definition at line 100 of file MTChannel.hh.

Referenced by main().

00100 {  fX = val; }

void MTChannel::SetY ( Int_t  val  )  [inline]

Definition at line 101 of file MTChannel.hh.

Referenced by main().

00101 {  fY = val; }

void MTChannel::SetZ ( Int_t  val  )  [inline]

Definition at line 102 of file MTChannel.hh.

Referenced by main().

00102 {  fZ = val; }

void MTChannel::SetEnergy ( Float_t  val  )  [inline]

Definition at line 103 of file MTChannel.hh.

Referenced by main().

00103 { fEnergy = val; }

Int_t MTChannel::Compare ( const TObject obj  )  const

Definition at line 31 of file MTChannel.cpp.

00032 {
00033 /*
00034  if (bcIdHit == ((MTChannel *)obj)->GetBcIdHit()) return 0;
00035  else if (bcIdHit < ((MTChannel *)obj)->GetBcIdHit()) return -1;
00036  else return 1;
00037 */
00038 
00039  UInt_t absTime =  this->GetAbsTime();
00040  if ( absTime == ((MTChannel *)obj)->GetAbsTime()) return 0;
00041  else if (absTime < ((MTChannel *)obj)->GetAbsTime()) return -1;
00042  else return 1;
00043 }

Bool_t MTChannel::IsSortable (  )  const [inline]

Definition at line 105 of file MTChannel.hh.

00105 { return kTRUE; }


Member Data Documentation

Int_t MTChannel::fAnalogValue [private]

Definition at line 34 of file MTChannel.hh.

Referenced by GetAnalogValue(), and MTChannel().

Int_t MTChannel::fDigitalValue [private]

Definition at line 35 of file MTChannel.hh.

Referenced by GetDigitalValue(), and MTChannel().

Float_t MTChannel::fEnergy [private]

Definition at line 36 of file MTChannel.hh.

Referenced by GetEnergy(), MTChannel(), and SetEnergy().

MTChannelSoftId MTChannel::fSoftId [private]

Definition at line 37 of file MTChannel.hh.

Referenced by GetBoardId(), GetChamberId(), GetChipId(), GetColInChip(), GetDifId(), GetRowInChip(), GetSoftId(), and MTChannel().

UInt_t MTChannel::fHardId [private]

Definition at line 38 of file MTChannel.hh.

Referenced by GetHardId(), and MTChannel().

Int_t MTChannel::fX [private]

Definition at line 39 of file MTChannel.hh.

Referenced by GetX(), MTChannel(), and SetX().

Int_t MTChannel::fY [private]

Definition at line 40 of file MTChannel.hh.

Referenced by GetY(), MTChannel(), and SetY().

Int_t MTChannel::fZ [private]

Definition at line 41 of file MTChannel.hh.

Referenced by GetZ(), MTChannel(), and SetZ().

UInt_t MTChannel::fOrder [private]

Definition at line 42 of file MTChannel.hh.

Referenced by GetOrder(), and MTChannel().

ULong64_t MTChannel::timestamp [private]

Definition at line 44 of file MTChannel.hh.

Referenced by GetTimestamp(), and MTChannel().

UInt_t MTChannel::bcIdAbs [private]

Definition at line 45 of file MTChannel.hh.

Referenced by GetBcIdAbs(), MTChannel(), and SetBcIdAbs().

UInt_t MTChannel::bcIdDif [private]

Definition at line 46 of file MTChannel.hh.

Referenced by GetBcIdDif(), and MTChannel().

UInt_t MTChannel::bcIdHit [private]

Definition at line 47 of file MTChannel.hh.

Referenced by GetBcIdHit(), and MTChannel().

UInt_t MTChannel::bcIdHitFine [private]

Definition at line 48 of file MTChannel.hh.

Referenced by GetBcIdHitFine(), and MTChannel().

UInt_t MTChannel::memoryOrder [private]

Definition at line 49 of file MTChannel.hh.

Referenced by GetMemoryOrder(), MTChannel(), and SetMemoryOrder().

bool MTChannel::rejected [private]

Definition at line 50 of file MTChannel.hh.

Referenced by GetRejected(), MTChannel(), and SetRejected().

UInt_t MTChannel::rowInChamber [private]

Definition at line 52 of file MTChannel.hh.

Referenced by GetRowInChamber(), and MTChannel().

UInt_t MTChannel::colInChamber [private]

Definition at line 53 of file MTChannel.hh.

Referenced by GetColInChamber(), and MTChannel().


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 13:18:50 2013 for MicromegasFramework by  doxygen 1.4.7