CMS 3D CMS Logo

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