CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HGCalTriggerNtupleHGCConcentratorData Class Reference
Inheritance diagram for HGCalTriggerNtupleHGCConcentratorData:
HGCalTriggerNtupleBase

Public Member Functions

void fill (const edm::Event &e, const edm::EventSetup &es) final
 
 HGCalTriggerNtupleHGCConcentratorData (const edm::ParameterSet &conf)
 
void initialize (TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
 
 ~HGCalTriggerNtupleHGCConcentratorData () override
 
- Public Member Functions inherited from HGCalTriggerNtupleBase
 HGCalTriggerNtupleBase (const edm::ParameterSet &conf)
 
virtual ~HGCalTriggerNtupleBase ()
 

Private Member Functions

void clear () final
 

Private Attributes

edm::EDGetToken concentrator_data_token_
 
std::vector< uint32_t > econ_data_
 
std::vector< uint32_t > econ_id_
 
std::vector< uint32_t > econ_index_
 
std::vector< int > econ_layer_
 
int econ_n_
 
std::vector< int > econ_side_
 
std::vector< int > econ_subdet_
 
std::vector< int > econ_wafertype_
 
std::vector< int > econ_waferu_
 
std::vector< int > econ_waferv_
 
edm::ESHandle< HGCalTriggerGeometryBasegeometry_
 
HGCalTriggerTools triggerTools_
 

Additional Inherited Members

Detailed Description

Definition at line 11 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Constructor & Destructor Documentation

◆ HGCalTriggerNtupleHGCConcentratorData()

HGCalTriggerNtupleHGCConcentratorData::HGCalTriggerNtupleHGCConcentratorData ( const edm::ParameterSet conf)

Definition at line 42 of file HGCalTriggerNtupleHGCConcentratorData.cc.

43  : HGCalTriggerNtupleBase(conf) {}

◆ ~HGCalTriggerNtupleHGCConcentratorData()

HGCalTriggerNtupleHGCConcentratorData::~HGCalTriggerNtupleHGCConcentratorData ( )
inlineoverride

Definition at line 14 of file HGCalTriggerNtupleHGCConcentratorData.cc.

14 {};

Member Function Documentation

◆ clear()

void HGCalTriggerNtupleHGCConcentratorData::clear ( void  )
finalprivatevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 102 of file HGCalTriggerNtupleHGCConcentratorData.cc.

102  {
103  econ_n_ = 0;
104  econ_id_.clear();
105  econ_subdet_.clear();
106  econ_side_.clear();
107  econ_layer_.clear();
108  econ_wafertype_.clear();
109  econ_data_.clear();
110 }

References econ_data_, econ_id_, econ_layer_, econ_n_, econ_side_, econ_subdet_, and econ_wafertype_.

Referenced by fill().

◆ fill()

void HGCalTriggerNtupleHGCConcentratorData::fill ( const edm::Event e,
const edm::EventSetup es 
)
finalvirtual

Implements HGCalTriggerNtupleBase.

Definition at line 71 of file HGCalTriggerNtupleHGCConcentratorData.cc.

71  {
72  // retrieve trigger cells
74  e.getByToken(concentrator_data_token_, concentrator_data_h);
75  const l1t::HGCalConcentratorDataBxCollection& concentrator_data = *concentrator_data_h;
76 
77  // retrieve geometry
79 
81 
82  clear();
83  for (auto econ_itr = concentrator_data.begin(0); econ_itr != concentrator_data.end(0); econ_itr++) {
84  econ_n_++;
85  // hardware data
86  DetId id(econ_itr->detId());
87  econ_id_.emplace_back(econ_itr->detId());
88  econ_side_.emplace_back(triggerTools_.zside(id));
89  econ_layer_.emplace_back(triggerTools_.layerWithOffset(id));
90 
91  HGCalTriggerDetId idv9(id);
92  econ_subdet_.emplace_back(idv9.subdet());
93  econ_waferu_.emplace_back(idv9.waferU());
94  econ_waferv_.emplace_back(idv9.waferV());
95  econ_wafertype_.emplace_back(idv9.type());
96 
97  econ_index_.emplace_back(econ_itr->index());
98  econ_data_.emplace_back(econ_itr->data());
99  }
100 }

References BXVector< T >::begin(), clear(), concentrator_data_token_, MillePedeFileConverter_cfg::e, econ_data_, econ_id_, econ_index_, econ_layer_, econ_n_, econ_side_, econ_subdet_, econ_wafertype_, econ_waferu_, econ_waferv_, BXVector< T >::end(), HGCalTriggerTools::eventSetup(), geometry_, edm::EventSetup::get(), get, triggerObjects_cff::id, HGCalTriggerTools::layerWithOffset(), HGCalTriggerDetId::subdet(), triggerTools_, HGCalTriggerDetId::type(), HGCalTriggerDetId::waferU(), HGCalTriggerDetId::waferV(), and HGCalTriggerTools::zside().

◆ initialize()

void HGCalTriggerNtupleHGCConcentratorData::initialize ( TTree &  tree,
const edm::ParameterSet conf,
edm::ConsumesCollector &&  collector 
)
finalvirtual

Implements HGCalTriggerNtupleBase.

Definition at line 45 of file HGCalTriggerNtupleHGCConcentratorData.cc.

47  {
49  collector.consumes<l1t::HGCalConcentratorDataBxCollection>(conf.getParameter<edm::InputTag>("ConcentratorData"));
50 
51  std::string prefix(conf.getUntrackedParameter<std::string>("Prefix", "econ"));
52 
53  std::string bname;
54  auto withPrefix([&prefix, &bname](char const* vname) -> char const* {
55  bname = prefix + "_" + vname;
56  return bname.c_str();
57  });
58 
59  tree.Branch(withPrefix("n"), &econ_n_, (prefix + "_n/I").c_str());
60  tree.Branch(withPrefix("id"), &econ_id_);
61  tree.Branch(withPrefix("subdet"), &econ_subdet_);
62  tree.Branch(withPrefix("zside"), &econ_side_);
63  tree.Branch(withPrefix("layer"), &econ_layer_);
64  tree.Branch(withPrefix("waferu"), &econ_waferu_);
65  tree.Branch(withPrefix("waferv"), &econ_waferv_);
66  tree.Branch(withPrefix("wafertype"), &econ_wafertype_);
67  tree.Branch(withPrefix("index"), &econ_index_);
68  tree.Branch(withPrefix("data"), &econ_data_);
69 }

References concentrator_data_token_, econ_data_, econ_id_, econ_index_, econ_layer_, econ_n_, econ_side_, econ_subdet_, econ_wafertype_, econ_waferu_, econ_waferv_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hcallasereventfilter2012_cfi::prefix, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ concentrator_data_token_

edm::EDGetToken HGCalTriggerNtupleHGCConcentratorData::concentrator_data_token_
private

Definition at line 23 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill(), and initialize().

◆ econ_data_

std::vector<uint32_t> HGCalTriggerNtupleHGCConcentratorData::econ_data_
private

Definition at line 35 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by clear(), fill(), and initialize().

◆ econ_id_

std::vector<uint32_t> HGCalTriggerNtupleHGCConcentratorData::econ_id_
private

Definition at line 27 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by clear(), fill(), and initialize().

◆ econ_index_

std::vector<uint32_t> HGCalTriggerNtupleHGCConcentratorData::econ_index_
private

Definition at line 34 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill(), and initialize().

◆ econ_layer_

std::vector<int> HGCalTriggerNtupleHGCConcentratorData::econ_layer_
private

Definition at line 30 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by clear(), fill(), and initialize().

◆ econ_n_

int HGCalTriggerNtupleHGCConcentratorData::econ_n_
private

Definition at line 26 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by clear(), fill(), and initialize().

◆ econ_side_

std::vector<int> HGCalTriggerNtupleHGCConcentratorData::econ_side_
private

Definition at line 29 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by clear(), fill(), and initialize().

◆ econ_subdet_

std::vector<int> HGCalTriggerNtupleHGCConcentratorData::econ_subdet_
private

Definition at line 28 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by clear(), fill(), and initialize().

◆ econ_wafertype_

std::vector<int> HGCalTriggerNtupleHGCConcentratorData::econ_wafertype_
private

Definition at line 33 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by clear(), fill(), and initialize().

◆ econ_waferu_

std::vector<int> HGCalTriggerNtupleHGCConcentratorData::econ_waferu_
private

Definition at line 31 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill(), and initialize().

◆ econ_waferv_

std::vector<int> HGCalTriggerNtupleHGCConcentratorData::econ_waferv_
private

Definition at line 32 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill(), and initialize().

◆ geometry_

edm::ESHandle<HGCalTriggerGeometryBase> HGCalTriggerNtupleHGCConcentratorData::geometry_
private

Definition at line 24 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill().

◆ triggerTools_

HGCalTriggerTools HGCalTriggerNtupleHGCConcentratorData::triggerTools_
private

Definition at line 21 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill().

HGCalTriggerNtupleHGCConcentratorData::triggerTools_
HGCalTriggerTools triggerTools_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:21
HGCalTriggerTools::eventSetup
void eventSetup(const edm::EventSetup &)
Definition: HGCalTriggerTools.cc:35
HGCalTriggerNtupleHGCConcentratorData::econ_n_
int econ_n_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:26
HGCalTriggerNtupleHGCConcentratorData::econ_side_
std::vector< int > econ_side_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:29
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
tree
Definition: tree.py:1
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
BXVector
Definition: BXVector.h:15
DetId
Definition: DetId.h:17
HGCalTriggerNtupleHGCConcentratorData::econ_index_
std::vector< uint32_t > econ_index_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:34
HGCalTriggerNtupleHGCConcentratorData::concentrator_data_token_
edm::EDGetToken concentrator_data_token_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:23
HGCalTriggerNtupleBase::HGCalTriggerNtupleBase
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
Definition: HGCalTriggerNtupleBase.h:12
HGCalTriggerNtupleHGCConcentratorData::econ_id_
std::vector< uint32_t > econ_id_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:27
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
HGCalTriggerNtupleHGCConcentratorData::econ_wafertype_
std::vector< int > econ_wafertype_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:33
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
HGCalTriggerTools::layerWithOffset
unsigned layerWithOffset(const DetId &) const
Definition: HGCalTriggerTools.cc:134
HGCalTriggerTools::zside
int zside(const DetId &) const
Definition: HGCalTriggerTools.cc:210
BXVector::begin
const_iterator begin(int bx) const
HGCalTriggerNtupleHGCConcentratorData::clear
void clear() final
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:102
HGCalTriggerDetId
Definition: HGCalTriggerDetId.h:26
BXVector::end
const_iterator end(int bx) const
get
#define get
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalTriggerNtupleHGCConcentratorData::econ_waferv_
std::vector< int > econ_waferv_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:32
HGCalTriggerNtupleHGCConcentratorData::econ_data_
std::vector< uint32_t > econ_data_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:35
HGCalTriggerNtupleHGCConcentratorData::econ_subdet_
std::vector< int > econ_subdet_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:28
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalTriggerNtupleHGCConcentratorData::geometry_
edm::ESHandle< HGCalTriggerGeometryBase > geometry_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:24
HGCalTriggerNtupleHGCConcentratorData::econ_waferu_
std::vector< int > econ_waferu_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:31
edm::InputTag
Definition: InputTag.h:15
HGCalTriggerNtupleHGCConcentratorData::econ_layer_
std::vector< int > econ_layer_
Definition: HGCalTriggerNtupleHGCConcentratorData.cc:30
hcallasereventfilter2012_cfi.prefix
prefix
Definition: hcallasereventfilter2012_cfi.py:10
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37