CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
HcalTriggerPrimitiveDigi Class Reference

#include <HcalTriggerPrimitiveDigi.h>

Public Types

typedef HcalTrigTowerDetId key_type
 For the sorted collection. More...
 

Public Member Functions

 HcalTriggerPrimitiveDigi ()
 
 HcalTriggerPrimitiveDigi (const HcalTrigTowerDetId &id)
 
const HcalTrigTowerDetIdid () const
 
const HcalTriggerPrimitiveSampleoperator[] (int i) const
 
int presamples () const
 
const HcalTriggerPrimitiveSamplesample (int i) const
 
void setPresamples (int ps)
 
void setSample (int i, const HcalTriggerPrimitiveSample &sam)
 
void setSize (int size)
 
void setZSInfo (bool unsuppressed, bool markAndPass)
 
int size () const
 
int SOI_compressedEt () const
 Compressed ET for the "Sample of Interest". More...
 
bool SOI_fineGrain (int i=0) const
 Fine-grain bit for the "Sample of Interest". More...
 
const HcalTriggerPrimitiveSamplet0 () const
 Full "Sample of Interest". More...
 
bool zsMarkAndPass () const
 was ZS MarkAndPass? More...
 
bool zsUnsuppressed () const
 was ZS unsuppressed? More...
 

Static Public Attributes

static const int MAXSAMPLES = 10
 

Private Attributes

HcalTriggerPrimitiveSample data_ [MAXSAMPLES]
 
int hcalPresamples_
 
HcalTrigTowerDetId id_
 
int size_
 

Detailed Description

Author
J. Mans - Minnesota

Definition at line 13 of file HcalTriggerPrimitiveDigi.h.

Member Typedef Documentation

◆ key_type

For the sorted collection.

Definition at line 15 of file HcalTriggerPrimitiveDigi.h.

Constructor & Destructor Documentation

◆ HcalTriggerPrimitiveDigi() [1/2]

HcalTriggerPrimitiveDigi::HcalTriggerPrimitiveDigi ( )

Definition at line 3 of file HcalTriggerPrimitiveDigi.cc.

3 : size_(0), hcalPresamples_(0) {}

◆ HcalTriggerPrimitiveDigi() [2/2]

HcalTriggerPrimitiveDigi::HcalTriggerPrimitiveDigi ( const HcalTrigTowerDetId id)
explicit

Definition at line 4 of file HcalTriggerPrimitiveDigi.cc.

5  : id_(id), size_(0), hcalPresamples_(0) {}

Member Function Documentation

◆ id()

const HcalTrigTowerDetId& HcalTriggerPrimitiveDigi::id ( ) const
inline

Definition at line 20 of file HcalTriggerPrimitiveDigi.h.

20 { return id_; }

References id_.

Referenced by operator<<().

◆ operator[]()

const HcalTriggerPrimitiveSample& HcalTriggerPrimitiveDigi::operator[] ( int  i) const
inline

Definition at line 31 of file HcalTriggerPrimitiveDigi.h.

31 { return data_[i]; }

References data_, and mps_fire::i.

◆ presamples()

int HcalTriggerPrimitiveDigi::presamples ( ) const
inline

Definition at line 22 of file HcalTriggerPrimitiveDigi.h.

22 { return hcalPresamples_ & 0xF; }

References hcalPresamples_.

Referenced by operator<<(), and t0().

◆ sample()

const HcalTriggerPrimitiveSample& HcalTriggerPrimitiveDigi::sample ( int  i) const
inline

Definition at line 32 of file HcalTriggerPrimitiveDigi.h.

32 { return data_[i]; }

References data_, and mps_fire::i.

Referenced by operator<<().

◆ setPresamples()

void HcalTriggerPrimitiveDigi::setPresamples ( int  ps)

Definition at line 15 of file HcalTriggerPrimitiveDigi.cc.

15  {
16  if (ps < 0)
17  hcalPresamples_ &= 0xFFFFFF0;
18  // else if (ps>=size_) hcalPresamples_=size_-1;
19  else
20  hcalPresamples_ |= ps & 0xF;
21 }

References hcalPresamples_.

Referenced by HcalTPGCompressor::compress(), L1RCTTPGProvider::produce(), and MaskedRctInputDigiProducer::produce().

◆ setSample()

void HcalTriggerPrimitiveDigi::setSample ( int  i,
const HcalTriggerPrimitiveSample sam 
)
inline

◆ setSize()

void HcalTriggerPrimitiveDigi::setSize ( int  size)

◆ setZSInfo()

void HcalTriggerPrimitiveDigi::setZSInfo ( bool  unsuppressed,
bool  markAndPass 
)

Definition at line 23 of file HcalTriggerPrimitiveDigi.cc.

23  {
24  if (markAndPass)
25  hcalPresamples_ |= 0x10;
26  if (unsuppressed)
27  hcalPresamples_ |= 0x20;
28 }

References hcalPresamples_, and DigiNZS_cff::markAndPass.

◆ size()

int HcalTriggerPrimitiveDigi::size ( void  ) const
inline

Definition at line 21 of file HcalTriggerPrimitiveDigi.h.

21 { return (size_ & 0xF); }

References size_.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), operator<<(), and setSize().

◆ SOI_compressedEt()

int HcalTriggerPrimitiveDigi::SOI_compressedEt ( ) const
inline

Compressed ET for the "Sample of Interest".

Definition at line 39 of file HcalTriggerPrimitiveDigi.h.

39 { return t0().compressedEt(); }

References HcalTriggerPrimitiveSample::compressedEt(), and t0().

◆ SOI_fineGrain()

bool HcalTriggerPrimitiveDigi::SOI_fineGrain ( int  i = 0) const
inline

Fine-grain bit for the "Sample of Interest".

Definition at line 37 of file HcalTriggerPrimitiveDigi.h.

37 { return t0().fineGrain(i); }

References HcalTriggerPrimitiveSample::fineGrain(), mps_fire::i, and t0().

◆ t0()

const HcalTriggerPrimitiveSample& HcalTriggerPrimitiveDigi::t0 ( ) const
inline

Full "Sample of Interest".

Definition at line 35 of file HcalTriggerPrimitiveDigi.h.

35 { return data_[presamples()]; }

References data_, and presamples().

Referenced by SOI_compressedEt(), and SOI_fineGrain().

◆ zsMarkAndPass()

bool HcalTriggerPrimitiveDigi::zsMarkAndPass ( ) const
inline

was ZS MarkAndPass?

Definition at line 25 of file HcalTriggerPrimitiveDigi.h.

25 { return (hcalPresamples_ & 0x10); }

References hcalPresamples_.

Referenced by operator<<().

◆ zsUnsuppressed()

bool HcalTriggerPrimitiveDigi::zsUnsuppressed ( ) const
inline

was ZS unsuppressed?

Definition at line 27 of file HcalTriggerPrimitiveDigi.h.

27 { return (hcalPresamples_ & 0x20); }

References hcalPresamples_.

Referenced by operator<<().

Member Data Documentation

◆ data_

HcalTriggerPrimitiveSample HcalTriggerPrimitiveDigi::data_[MAXSAMPLES]
private

Definition at line 51 of file HcalTriggerPrimitiveDigi.h.

Referenced by operator[](), sample(), setSample(), and t0().

◆ hcalPresamples_

int HcalTriggerPrimitiveDigi::hcalPresamples_
private

◆ id_

HcalTrigTowerDetId HcalTriggerPrimitiveDigi::id_
private

Definition at line 48 of file HcalTriggerPrimitiveDigi.h.

Referenced by id().

◆ MAXSAMPLES

const int HcalTriggerPrimitiveDigi::MAXSAMPLES = 10
static

Definition at line 45 of file HcalTriggerPrimitiveDigi.h.

Referenced by setSize().

◆ size_

int HcalTriggerPrimitiveDigi::size_
private

Definition at line 49 of file HcalTriggerPrimitiveDigi.h.

Referenced by setSize(), and size().

HcalTriggerPrimitiveDigi::size_
int size_
Definition: HcalTriggerPrimitiveDigi.h:49
mps_fire.i
i
Definition: mps_fire.py:428
HcalTriggerPrimitiveDigi::data_
HcalTriggerPrimitiveSample data_[MAXSAMPLES]
Definition: HcalTriggerPrimitiveDigi.h:51
HcalTriggerPrimitiveDigi::presamples
int presamples() const
Definition: HcalTriggerPrimitiveDigi.h:22
HcalTriggerPrimitiveDigi::t0
const HcalTriggerPrimitiveSample & t0() const
Full "Sample of Interest".
Definition: HcalTriggerPrimitiveDigi.h:35
HcalTriggerPrimitiveSample::compressedEt
int compressedEt() const
get the encoded/compressed Et
Definition: HcalTriggerPrimitiveSample.h:21
DigiNZS_cff.markAndPass
markAndPass
Definition: DigiNZS_cff.py:6
HcalTriggerPrimitiveDigi::MAXSAMPLES
static const int MAXSAMPLES
Definition: HcalTriggerPrimitiveDigi.h:45
HcalTriggerPrimitiveDigi::id_
HcalTrigTowerDetId id_
Definition: HcalTriggerPrimitiveDigi.h:48
HcalTriggerPrimitiveDigi::size
int size() const
Definition: HcalTriggerPrimitiveDigi.h:21
HcalTriggerPrimitiveDigi::hcalPresamples_
int hcalPresamples_
Definition: HcalTriggerPrimitiveDigi.h:50
HcalTriggerPrimitiveSample::fineGrain
bool fineGrain(int i=0) const
get fine-grain bit (traditional)
Definition: HcalTriggerPrimitiveSample.h:23