5 int ieta,
int iphi,
int nsamples,
int whichSampleTriggered,
int databits) {
7 printf(
"HOTRiggerPrimitiveDigi: nsamples out of range.");
8 if ((whichSampleTriggered < 0) || (whichSampleTriggered > nsamples))
9 printf(
"HOTriggerPrimitiveDigi: specified Triggering Sample out of range");
10 if ((databits >> nsamples) != 0x0000)
11 printf(
"HOTRiggerPrimitiveDigi: Specified extra bits out of nsamples range.");
18 theHO_TP = (
abs(ieta) & 0xf) | ((ieta < 0) ? (0x10) : (0x00)) | ((iphi & 0x7F) << 5) | ((samples & 0xF) << 12) |
19 (((whichSampleTriggered)&0xF) << 16) | ((databits & 0x3FF) << 20);
24 if ((whichbit < 0) || (whichbit >
nsamples())) {
25 printf(
"HOTPDigi: Sample bit requested out of range.");
28 return ((
theHO_TP >> (20 + whichbit)) & 0x0001);
33 s <<
"(HO TP " << HOtpd.
ieta() <<
", " << HOtpd.
iphi() <<
", ";
35 for (
int bit = 0; bit < HOtpd.
nsamples(); bit++) {
static const int HO_TP_SAMPLES_MAX
int iphi() const
get the iphi value
Abs< T >::type abs(const T &t)
bool data(int whichbit=HO_TP_SAMPLES_MAX) const
std::ostream & operator<<(std::ostream &s, const HOTriggerPrimitiveDigi &HOtpd)
int ieta() const
get the signed ieta value
int nsamples() const
get the number of samples used to compute the TP
int whichSampleTriggered() const
get the number of the triggering sample