CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 HGCalTriggerNtupleEventSetup &es) final
 
 HGCalTriggerNtupleHGCConcentratorData (const edm::ParameterSet &conf)
 
void initialize (TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
 
 ~HGCalTriggerNtupleHGCConcentratorData () override
 
- Public Member Functions inherited from HGCalTriggerNtupleBase
bool accessEventSetup () const
 
virtual void fill (const edm::Event &, const edm::EventSetup &)
 
 HGCalTriggerNtupleBase (const edm::ParameterSet &conf)
 
const std::string & name () const
 
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_
 
HGCalTriggerTools triggerTools_
 

Additional Inherited Members

- Protected Attributes inherited from HGCalTriggerNtupleBase
bool accessEventSetup_ = true
 
const std::string name_
 

Detailed Description

Definition at line 11 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Constructor & Destructor Documentation

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

Definition at line 41 of file HGCalTriggerNtupleHGCConcentratorData.cc.

References HGCalTriggerNtupleBase::accessEventSetup_.

42  : HGCalTriggerNtupleBase(conf) {
43  accessEventSetup_ = false;
44 }
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
HGCalTriggerNtupleHGCConcentratorData::~HGCalTriggerNtupleHGCConcentratorData ( )
inlineoverride

Definition at line 14 of file HGCalTriggerNtupleHGCConcentratorData.cc.

14 {};

Member Function Documentation

void HGCalTriggerNtupleHGCConcentratorData::clear ( void  )
finalprivatevirtual
void HGCalTriggerNtupleHGCConcentratorData::fill ( const edm::Event e,
const HGCalTriggerNtupleEventSetup es 
)
finalvirtual

Reimplemented from HGCalTriggerNtupleBase.

Definition at line 72 of file HGCalTriggerNtupleHGCConcentratorData.cc.

References BXVector< T >::begin(), clear(), concentrator_data_token_, econ_data_, econ_id_, econ_index_, econ_layer_, econ_n_, econ_side_, econ_subdet_, econ_wafertype_, econ_waferu_, econ_waferv_, BXVector< T >::end(), HGCalTriggerNtupleEventSetup::geometry, edm::Event::getByToken(), gpuClustering::id, HGCalTriggerTools::layerWithOffset(), edm::ESHandle< class >::product(), HGCalTriggerTools::setGeometry(), HGCalTriggerDetId::subdet(), triggerTools_, HGCalTriggerDetId::type(), HGCalTriggerDetId::waferU(), HGCalTriggerDetId::waferV(), and HGCalTriggerTools::zside().

72  {
73  // retrieve trigger cells
75  e.getByToken(concentrator_data_token_, concentrator_data_h);
76  const l1t::HGCalConcentratorDataBxCollection& concentrator_data = *concentrator_data_h;
77 
79 
80  clear();
81  for (auto econ_itr = concentrator_data.begin(0); econ_itr != concentrator_data.end(0); econ_itr++) {
82  econ_n_++;
83  // hardware data
84  DetId id(econ_itr->detId());
85  econ_id_.emplace_back(econ_itr->detId());
86  econ_side_.emplace_back(triggerTools_.zside(id));
87  econ_layer_.emplace_back(triggerTools_.layerWithOffset(id));
88 
89  HGCalTriggerDetId idv9(id);
90  econ_subdet_.emplace_back(idv9.subdet());
91  econ_waferu_.emplace_back(idv9.waferU());
92  econ_waferv_.emplace_back(idv9.waferV());
93  econ_wafertype_.emplace_back(idv9.type());
94 
95  econ_index_.emplace_back(econ_itr->index());
96  econ_data_.emplace_back(econ_itr->data());
97  }
98 }
const_iterator end(int bx) const
uint16_t *__restrict__ id
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
unsigned layerWithOffset(const DetId &) const
edm::ESHandle< HGCalTriggerGeometryBase > geometry
void setGeometry(const HGCalTriggerGeometryBase *const)
int zside(const DetId &) const
Definition: DetId.h:17
T const * product() const
Definition: ESHandle.h:86
const_iterator begin(int bx) const
void HGCalTriggerNtupleHGCConcentratorData::initialize ( TTree &  tree,
const edm::ParameterSet conf,
edm::ConsumesCollector &&  collector 
)
finalvirtual

Implements HGCalTriggerNtupleBase.

Definition at line 46 of file HGCalTriggerNtupleHGCConcentratorData.cc.

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(), PostProcessorHGCAL_cfi::prefix, and AlCaHLTBitMon_QueryRunRegistry::string.

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

Member Data Documentation

edm::EDGetToken HGCalTriggerNtupleHGCConcentratorData::concentrator_data_token_
private

Definition at line 23 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill(), and initialize().

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

Definition at line 34 of file HGCalTriggerNtupleHGCConcentratorData.cc.

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

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

Definition at line 26 of file HGCalTriggerNtupleHGCConcentratorData.cc.

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

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

Definition at line 33 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill(), and initialize().

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

Definition at line 29 of file HGCalTriggerNtupleHGCConcentratorData.cc.

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

int HGCalTriggerNtupleHGCConcentratorData::econ_n_
private

Definition at line 25 of file HGCalTriggerNtupleHGCConcentratorData.cc.

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

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

Definition at line 28 of file HGCalTriggerNtupleHGCConcentratorData.cc.

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

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

Definition at line 27 of file HGCalTriggerNtupleHGCConcentratorData.cc.

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

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

Definition at line 32 of file HGCalTriggerNtupleHGCConcentratorData.cc.

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

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

Definition at line 30 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill(), and initialize().

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

Definition at line 31 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill(), and initialize().

HGCalTriggerTools HGCalTriggerNtupleHGCConcentratorData::triggerTools_
private

Definition at line 21 of file HGCalTriggerNtupleHGCConcentratorData.cc.

Referenced by fill().