CMS 3D CMS Logo

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

#include <CastorTriggerPrimitiveDigi.h>

Public Types

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

Public Member Functions

 CastorTriggerPrimitiveDigi ()
 
 CastorTriggerPrimitiveDigi (const HcalCastorDetId &id)
 
const HcalCastorDetIdid () const
 
bool isSOI (int i) 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 () const
 Fine-grain bit for the "Sample of Interest". More...
 
int SOI_tpchannel () const
 
int SOI_tpdata () const
 
const HcalTriggerPrimitiveSamplet0 () const
 Full "Sample of Interest". More...
 
int tpchannel (int i) const
 
int tpdata (int i) const
 
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_
 
HcalCastorDetId id_
 
int size_
 

Detailed Description

Author
A. Campbell - DESY

Definition at line 13 of file CastorTriggerPrimitiveDigi.h.

Member Typedef Documentation

◆ key_type

For the sorted collection.

Definition at line 15 of file CastorTriggerPrimitiveDigi.h.

Constructor & Destructor Documentation

◆ CastorTriggerPrimitiveDigi() [1/2]

CastorTriggerPrimitiveDigi::CastorTriggerPrimitiveDigi ( )

Definition at line 3 of file CastorTriggerPrimitiveDigi.cc.

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

◆ CastorTriggerPrimitiveDigi() [2/2]

CastorTriggerPrimitiveDigi::CastorTriggerPrimitiveDigi ( const HcalCastorDetId id)
explicit

Definition at line 4 of file CastorTriggerPrimitiveDigi.cc.

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

Member Function Documentation

◆ id()

const HcalCastorDetId& CastorTriggerPrimitiveDigi::id ( ) const
inline

Definition at line 20 of file CastorTriggerPrimitiveDigi.h.

20 { return id_; }

References id_.

Referenced by operator<<().

◆ isSOI()

bool CastorTriggerPrimitiveDigi::isSOI ( int  i) const
inline

Definition at line 43 of file CastorTriggerPrimitiveDigi.h.

43 { return ((data_[i].raw() & 0x0200) == 0x0200); }

References data_, and mps_fire::i.

Referenced by operator<<().

◆ operator[]()

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

Definition at line 31 of file CastorTriggerPrimitiveDigi.h.

31 { return data_[i]; }

References data_, and mps_fire::i.

◆ presamples()

int CastorTriggerPrimitiveDigi::presamples ( ) const
inline

Definition at line 22 of file CastorTriggerPrimitiveDigi.h.

22 { return hcalPresamples_ & 0xF; }

References hcalPresamples_.

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

◆ sample()

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

Definition at line 32 of file CastorTriggerPrimitiveDigi.h.

32 { return data_[i]; }

References data_, and mps_fire::i.

Referenced by operator<<().

◆ setPresamples()

void CastorTriggerPrimitiveDigi::setPresamples ( int  ps)

Definition at line 15 of file CastorTriggerPrimitiveDigi.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_.

◆ setSample()

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

Definition at line 49 of file CastorTriggerPrimitiveDigi.h.

49 { data_[i] = sam; }

References data_, and mps_fire::i.

◆ setSize()

void CastorTriggerPrimitiveDigi::setSize ( int  size)

Definition at line 7 of file CastorTriggerPrimitiveDigi.cc.

7  {
8  if (size < 0)
9  size_ = 0;
10  else if (size > MAXSAMPLES)
11  size_ = MAXSAMPLES;
12  else
13  size_ = size;
14 }

References MAXSAMPLES, size(), and size_.

◆ setZSInfo()

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

Definition at line 23 of file CastorTriggerPrimitiveDigi.cc.

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

References hcalPresamples_, and DigiNZS_cff::markAndPass.

◆ size()

int CastorTriggerPrimitiveDigi::size ( void  ) const
inline

Definition at line 21 of file CastorTriggerPrimitiveDigi.h.

21 { return (size_ & 0xF); }

References size_.

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

◆ SOI_compressedEt()

int CastorTriggerPrimitiveDigi::SOI_compressedEt ( ) const
inline

Compressed ET for the "Sample of Interest".

Definition at line 39 of file CastorTriggerPrimitiveDigi.h.

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

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

◆ SOI_fineGrain()

bool CastorTriggerPrimitiveDigi::SOI_fineGrain ( ) const
inline

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

Definition at line 37 of file CastorTriggerPrimitiveDigi.h.

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

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

◆ SOI_tpchannel()

int CastorTriggerPrimitiveDigi::SOI_tpchannel ( ) const
inline

Definition at line 44 of file CastorTriggerPrimitiveDigi.h.

44 { return ((data_[presamples()].raw() & 0xf800) >> 11); }

References data_, and presamples().

Referenced by operator<<().

◆ SOI_tpdata()

int CastorTriggerPrimitiveDigi::SOI_tpdata ( ) const
inline

Definition at line 45 of file CastorTriggerPrimitiveDigi.h.

45 { return (data_[presamples()].raw() & 0x01ff); }

References data_, and presamples().

Referenced by operator<<().

◆ t0()

const HcalTriggerPrimitiveSample& CastorTriggerPrimitiveDigi::t0 ( ) const
inline

Full "Sample of Interest".

Definition at line 35 of file CastorTriggerPrimitiveDigi.h.

35 { return data_[presamples()]; }

References data_, and presamples().

Referenced by SOI_compressedEt(), and SOI_fineGrain().

◆ tpchannel()

int CastorTriggerPrimitiveDigi::tpchannel ( int  i) const
inline

Definition at line 41 of file CastorTriggerPrimitiveDigi.h.

41 { return ((data_[i].raw() & 0xf800) >> 11); }

References data_, and mps_fire::i.

Referenced by operator<<().

◆ tpdata()

int CastorTriggerPrimitiveDigi::tpdata ( int  i) const
inline

Definition at line 42 of file CastorTriggerPrimitiveDigi.h.

42 { return (data_[i].raw() & 0x01ff); }

References data_, and mps_fire::i.

Referenced by operator<<().

◆ zsMarkAndPass()

bool CastorTriggerPrimitiveDigi::zsMarkAndPass ( ) const
inline

was ZS MarkAndPass?

Definition at line 25 of file CastorTriggerPrimitiveDigi.h.

25 { return (hcalPresamples_ & 0x10); }

References hcalPresamples_.

Referenced by operator<<().

◆ zsUnsuppressed()

bool CastorTriggerPrimitiveDigi::zsUnsuppressed ( ) const
inline

was ZS unsuppressed?

Definition at line 27 of file CastorTriggerPrimitiveDigi.h.

27 { return (hcalPresamples_ & 0x20); }

References hcalPresamples_.

Referenced by operator<<().

Member Data Documentation

◆ data_

HcalTriggerPrimitiveSample CastorTriggerPrimitiveDigi::data_[MAXSAMPLES]
private

◆ hcalPresamples_

int CastorTriggerPrimitiveDigi::hcalPresamples_
private

◆ id_

HcalCastorDetId CastorTriggerPrimitiveDigi::id_
private

Definition at line 54 of file CastorTriggerPrimitiveDigi.h.

Referenced by id().

◆ MAXSAMPLES

const int CastorTriggerPrimitiveDigi::MAXSAMPLES = 10
static

Definition at line 51 of file CastorTriggerPrimitiveDigi.h.

Referenced by setSize().

◆ size_

int CastorTriggerPrimitiveDigi::size_
private

Definition at line 55 of file CastorTriggerPrimitiveDigi.h.

Referenced by setSize(), and size().

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