#ifndef HGEANTRPC_H
#define HGEANTRPC_H
#include "hlinkeddataobject.h"
class HGeantRpc : public HLinkedDataObject
{
private:
Int_t trackNumber;
Float_t trackLength;
Float_t loctrackLength;
Float_t eHit;
Float_t xHit;
Float_t yHit;
Float_t zHit;
Float_t tofHit;
Float_t momHit;
Float_t thetaHit;
Float_t phiHit;
Short_t detectorID;
public:
HGeantRpc(void);
HGeantRpc(HGeantRpc &aRpc);
~HGeantRpc(void);
inline void setTrack(Int_t atrackNumber) {trackNumber = atrackNumber;}
inline void setDetectorID (Short_t adetectorID) {detectorID = adetectorID;}
inline void setAddress (Int_t sec, Int_t col, Int_t cel, Int_t gap);
void setHit(Float_t axHit, Float_t ayHit, Float_t azHit, Float_t atofHit,
Float_t amomHit, Float_t eHit);
void setIncidence(Float_t athetaHit, Float_t aphiHit);
void setTLength(Float_t tracklength, Float_t loctracklength);
inline Int_t getSector(void) const;
inline Int_t getColumn(void) const;
inline Int_t getCell(void) const;
inline Int_t getGap(void) const;
inline Int_t getTrack(void) {return trackNumber;}
inline Int_t getDetectorID(void) {return detectorID;}
void getHit(Float_t& axHit, Float_t& ayHit, Float_t& azHit,
Float_t& atofHit, Float_t& amomHit, Float_t& aeHit);
void getIncidence(Float_t& athetaHit, Float_t& aphiHit);
void getTLength(Float_t& atracklength, Float_t& aloctracklength);
inline Int_t getNLocationIndex(void) {return 4;}
inline Int_t getLocationIndex(Int_t i);
ClassDef(HGeantRpc,4)
};
inline Int_t HGeantRpc::getSector(void) const{
if (detectorID<0) return -1*(detectorID+1);
else return detectorID>>11;
}
inline Int_t HGeantRpc::getColumn(void) const{
if (detectorID<0) return -1;
else return ((detectorID>>8) & 7);
}
inline Int_t HGeantRpc::getCell(void) const{
if (detectorID<0) return -1;
else return ((detectorID>>2) & 63);
}
inline Int_t HGeantRpc::getGap(void) const {
if (detectorID<0) return -1;
else return (detectorID & 3);
}
inline void HGeantRpc::setAddress(Int_t sec, Int_t col, Int_t cel, Int_t gap) {
detectorID = (sec<<11) + (col<<8) + (cel<<2) + gap;
}
inline Int_t HGeantRpc::getLocationIndex(Int_t i) {
switch (i) {
case 0 : return getSector();
case 1 : return getColumn();
case 2 : return getCell();
case 3 : return getGap();
}
return -1;
}
#endif /*! HGEANTRPC_H */
Last change: Sat May 22 12:56:05 2010
Last generated: 2010-05-22 12:56
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.