CMS 3D CMS Logo

HcalTriggerPrimitiveDigi.h
Go to the documentation of this file.
1 #ifndef HCALTRIGGERPRIMITIVEDIGI_H
2 #define HCALTRIGGERPRIMITIVEDIGI_H 1
3 
4 #include <ostream>
5 #include <vector>
8 
14 public:
16 
17  HcalTriggerPrimitiveDigi(); // for persistence
18  explicit HcalTriggerPrimitiveDigi(const HcalTrigTowerDetId& id);
19 
20  const HcalTrigTowerDetId& id() const { return id_; }
21  int size() const { return (size_ & 0xF); }
22  int presamples() const { return hcalPresamples_ & 0xF; }
23 
25  bool zsMarkAndPass() const { return (hcalPresamples_ & 0x10); }
27  bool zsUnsuppressed() const { return (hcalPresamples_ & 0x20); }
28 
29  void setZSInfo(bool unsuppressed, bool markAndPass);
30 
31  const HcalTriggerPrimitiveSample& operator[](int i) const { return data_[i]; }
32  const HcalTriggerPrimitiveSample& sample(int i) const { return data_[i]; }
33 
35  const HcalTriggerPrimitiveSample& t0() const { return data_[presamples()]; }
37  bool SOI_fineGrain(int i = 0) const { return t0().fineGrain(i); }
39  int SOI_compressedEt() const { return t0().compressedEt(); }
40 
41  void setSize(int size);
42  void setPresamples(int ps);
43  void setSample(int i, const HcalTriggerPrimitiveSample& sam) { data_[i] = sam; }
44 
45  static const int MAXSAMPLES = 10;
46 
47 private:
49  int size_;
52 };
53 
54 std::ostream& operator<<(std::ostream& s, const HcalTriggerPrimitiveDigi& digi);
55 
56 #endif
HcalTriggerPrimitiveDigi::size_
int size_
Definition: HcalTriggerPrimitiveDigi.h:49
mps_fire.i
i
Definition: mps_fire.py:355
HcalTriggerPrimitiveDigi::data_
HcalTriggerPrimitiveSample data_[MAXSAMPLES]
Definition: HcalTriggerPrimitiveDigi.h:51
HcalTriggerPrimitiveDigi::id
const HcalTrigTowerDetId & id() const
Definition: HcalTriggerPrimitiveDigi.h:20
HcalTriggerPrimitiveDigi::presamples
int presamples() const
Definition: HcalTriggerPrimitiveDigi.h:22
HcalTriggerPrimitiveSample
Definition: HcalTriggerPrimitiveSample.h:11
HcalTriggerPrimitiveDigi::zsMarkAndPass
bool zsMarkAndPass() const
was ZS MarkAndPass?
Definition: HcalTriggerPrimitiveDigi.h:25
HcalTriggerPrimitiveDigi::t0
const HcalTriggerPrimitiveSample & t0() const
Full "Sample of Interest".
Definition: HcalTriggerPrimitiveDigi.h:35
HcalTriggerPrimitiveDigi::setSample
void setSample(int i, const HcalTriggerPrimitiveSample &sam)
Definition: HcalTriggerPrimitiveDigi.h:43
HcalTriggerPrimitiveDigi::sample
const HcalTriggerPrimitiveSample & sample(int i) const
Definition: HcalTriggerPrimitiveDigi.h:32
HcalTriggerPrimitiveDigi::SOI_fineGrain
bool SOI_fineGrain(int i=0) const
Fine-grain bit for the "Sample of Interest".
Definition: HcalTriggerPrimitiveDigi.h:37
HcalTriggerPrimitiveSample::compressedEt
int compressedEt() const
get the encoded/compressed Et
Definition: HcalTriggerPrimitiveSample.h:21
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DigiNZS_cff.markAndPass
markAndPass
Definition: DigiNZS_cff.py:6
HcalTrigTowerDetId.h
HcalTriggerPrimitiveDigi
Definition: HcalTriggerPrimitiveDigi.h:13
HcalTriggerPrimitiveDigi::setPresamples
void setPresamples(int ps)
Definition: HcalTriggerPrimitiveDigi.cc:15
HcalTriggerPrimitiveDigi::setZSInfo
void setZSInfo(bool unsuppressed, bool markAndPass)
Definition: HcalTriggerPrimitiveDigi.cc:23
HcalTriggerPrimitiveDigi::MAXSAMPLES
static const int MAXSAMPLES
Definition: HcalTriggerPrimitiveDigi.h:45
HcalTriggerPrimitiveSample.h
HcalTriggerPrimitiveDigi::key_type
HcalTrigTowerDetId key_type
For the sorted collection.
Definition: HcalTriggerPrimitiveDigi.h:15
HcalTriggerPrimitiveDigi::id_
HcalTrigTowerDetId id_
Definition: HcalTriggerPrimitiveDigi.h:48
HcalTriggerPrimitiveDigi::zsUnsuppressed
bool zsUnsuppressed() const
was ZS unsuppressed?
Definition: HcalTriggerPrimitiveDigi.h:27
HcalTriggerPrimitiveDigi::operator[]
const HcalTriggerPrimitiveSample & operator[](int i) const
Definition: HcalTriggerPrimitiveDigi.h:31
operator<<
std::ostream & operator<<(std::ostream &s, const HcalTriggerPrimitiveDigi &digi)
Definition: HcalTriggerPrimitiveDigi.cc:30
HcalTriggerPrimitiveDigi::size
int size() const
Definition: HcalTriggerPrimitiveDigi.h:21
HcalTriggerPrimitiveDigi::SOI_compressedEt
int SOI_compressedEt() const
Compressed ET for the "Sample of Interest".
Definition: HcalTriggerPrimitiveDigi.h:39
HcalTriggerPrimitiveDigi::HcalTriggerPrimitiveDigi
HcalTriggerPrimitiveDigi()
Definition: HcalTriggerPrimitiveDigi.cc:3
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
HcalTriggerPrimitiveDigi::setSize
void setSize(int size)
Definition: HcalTriggerPrimitiveDigi.cc:7
HcalTrigTowerDetId
Definition: HcalTrigTowerDetId.h:14