CMS 3D CMS Logo

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

Public Member Functions

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

Private Member Functions

void clear () final
 
void simhits (const edm::Event &e, std::unordered_map< uint32_t, double > &simhits_ee, std::unordered_map< uint32_t, double > &simhits_fh, std::unordered_map< uint32_t, double > &simhits_bh)
 

Private Attributes

edm::EDGetToken bh_token_
 
std::vector< std::vector< uint32_t > > bhdigi_data_
 
std::vector< float > bhdigi_eta_
 
std::vector< int > bhdigi_id_
 
std::vector< int > bhdigi_ieta_
 
std::vector< int > bhdigi_iphi_
 
std::vector< std::vector< int > > bhdigi_isadc_
 
std::vector< int > bhdigi_layer_
 
int bhdigi_n_
 
std::vector< float > bhdigi_phi_
 
std::vector< int > bhdigi_side_
 
std::vector< float > bhdigi_simenergy_
 
std::vector< int > bhdigi_subdet_
 
std::vector< float > bhdigi_z_
 
std::vector< unsigned int > digiBXselect_
 
edm::EDGetToken ee_token_
 
edm::EDGetToken fh_token_
 
std::vector< int > hgcdigi_cell_
 
std::vector< int > hgcdigi_cellu_
 
std::vector< int > hgcdigi_cellv_
 
std::vector< std::vector< uint32_t > > hgcdigi_data_
 
std::vector< float > hgcdigi_eta_
 
std::vector< int > hgcdigi_id_
 
std::vector< std::vector< int > > hgcdigi_isadc_
 
std::vector< int > hgcdigi_layer_
 
int hgcdigi_n_
 
std::vector< float > hgcdigi_phi_
 
std::vector< int > hgcdigi_side_
 
std::vector< float > hgcdigi_simenergy_
 
std::vector< int > hgcdigi_subdet_
 
std::vector< int > hgcdigi_wafer_
 
std::vector< int > hgcdigi_wafertype_
 
std::vector< int > hgcdigi_waferu_
 
std::vector< int > hgcdigi_waferv_
 
std::vector< float > hgcdigi_z_
 
bool is_Simhit_comp_
 
edm::EDGetToken SimHits_inputbh_
 
edm::EDGetToken SimHits_inputee_
 
edm::EDGetToken SimHits_inputfh_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 
HGCalTriggerTools triggerTools_
 

Static Private Attributes

static constexpr unsigned kDigiSize_ = 5
 

Additional Inherited Members

Detailed Description

Definition at line 16 of file HGCalTriggerNtupleHGCDigis.cc.

Constructor & Destructor Documentation

◆ HGCalTriggerNtupleHGCDigis()

HGCalTriggerNtupleHGCDigis::HGCalTriggerNtupleHGCDigis ( const edm::ParameterSet conf)

Definition at line 79 of file HGCalTriggerNtupleHGCDigis.cc.

79  : HGCalTriggerNtupleBase(conf) {
80  is_Simhit_comp_ = conf.getParameter<bool>("isSimhitComp");
81  digiBXselect_ = conf.getParameter<std::vector<unsigned int>>("digiBXselect");
82 
83  if (digiBXselect_.empty()) {
84  throw cms::Exception("BadInitialization") << "digiBXselect vector is empty";
85  }
86  if (*std::max_element(digiBXselect_.begin(), digiBXselect_.end()) >= kDigiSize_) {
87  throw cms::Exception("BadInitialization")
88  << "digiBXselect vector requests a BX outside of maximum size of digis (" << kDigiSize_ << " BX)";
89  }
90  //sort and check for duplicates
91  std::sort(digiBXselect_.begin(), digiBXselect_.end());
92  if (std::unique(digiBXselect_.begin(), digiBXselect_.end()) != digiBXselect_.end()) {
93  throw cms::Exception("BadInitialization") << "digiBXselect vector contains duplicate BX values";
94  }
95 }

References digiBXselect_, Exception, is_Simhit_comp_, kDigiSize_, jetUpdater_cfi::sort, and tier0::unique().

◆ ~HGCalTriggerNtupleHGCDigis()

HGCalTriggerNtupleHGCDigis::~HGCalTriggerNtupleHGCDigis ( )
inlineoverride

Definition at line 19 of file HGCalTriggerNtupleHGCDigis.cc.

19 {};

Member Function Documentation

◆ clear()

void HGCalTriggerNtupleHGCDigis::clear ( void  )
finalprivatevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 376 of file HGCalTriggerNtupleHGCDigis.cc.

376  {
377  hgcdigi_n_ = 0;
378  hgcdigi_id_.clear();
379  hgcdigi_subdet_.clear();
380  hgcdigi_side_.clear();
381  hgcdigi_layer_.clear();
382  hgcdigi_wafer_.clear();
383  hgcdigi_waferu_.clear();
384  hgcdigi_waferv_.clear();
385  hgcdigi_wafertype_.clear();
386  hgcdigi_cell_.clear();
387  hgcdigi_cellu_.clear();
388  hgcdigi_cellv_.clear();
389  hgcdigi_eta_.clear();
390  hgcdigi_phi_.clear();
391  hgcdigi_z_.clear();
392  for (unsigned int i = 0; i < digiBXselect_.size(); i++) {
393  hgcdigi_data_[i].clear();
394  hgcdigi_isadc_[i].clear();
395  }
396  if (is_Simhit_comp_)
397  hgcdigi_simenergy_.clear();
398 
399  bhdigi_n_ = 0;
400  bhdigi_id_.clear();
401  bhdigi_subdet_.clear();
402  bhdigi_side_.clear();
403  bhdigi_layer_.clear();
404  bhdigi_ieta_.clear();
405  bhdigi_iphi_.clear();
406  bhdigi_eta_.clear();
407  bhdigi_phi_.clear();
408  bhdigi_z_.clear();
409  for (unsigned int i = 0; i < digiBXselect_.size(); i++) {
410  bhdigi_data_[i].clear();
411  bhdigi_isadc_[i].clear();
412  }
413  if (is_Simhit_comp_)
414  bhdigi_simenergy_.clear();
415 }

References bhdigi_data_, bhdigi_eta_, bhdigi_id_, bhdigi_ieta_, bhdigi_iphi_, bhdigi_isadc_, bhdigi_layer_, bhdigi_n_, bhdigi_phi_, bhdigi_side_, bhdigi_simenergy_, bhdigi_subdet_, bhdigi_z_, digiBXselect_, hgcdigi_cell_, hgcdigi_cellu_, hgcdigi_cellv_, hgcdigi_data_, hgcdigi_eta_, hgcdigi_id_, hgcdigi_isadc_, hgcdigi_layer_, hgcdigi_n_, hgcdigi_phi_, hgcdigi_side_, hgcdigi_simenergy_, hgcdigi_subdet_, hgcdigi_wafer_, hgcdigi_wafertype_, hgcdigi_waferu_, hgcdigi_waferv_, hgcdigi_z_, mps_fire::i, and is_Simhit_comp_.

Referenced by fill().

◆ fill()

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

Implements HGCalTriggerNtupleBase.

Definition at line 163 of file HGCalTriggerNtupleHGCDigis.cc.

163  {
165 
167  e.getByToken(ee_token_, ee_digis_h);
168  const HGCalDigiCollection& ee_digis = *ee_digis_h;
170  e.getByToken(fh_token_, fh_digis_h);
171  const HGCalDigiCollection& fh_digis = *fh_digis_h;
173  e.getByToken(bh_token_, bh_digis_h);
174  const HGCalDigiCollection& bh_digis = *bh_digis_h;
175 
177 
178  // sim hit association
179  std::unordered_map<uint32_t, double> simhits_ee;
180  std::unordered_map<uint32_t, double> simhits_fh;
181  std::unordered_map<uint32_t, double> simhits_bh;
182  if (is_Simhit_comp_)
183  simhits(e, simhits_ee, simhits_fh, simhits_bh);
184 
185  clear();
186  hgcdigi_n_ = ee_digis.size() + fh_digis.size();
187  hgcdigi_id_.reserve(hgcdigi_n_);
188  hgcdigi_subdet_.reserve(hgcdigi_n_);
189  hgcdigi_side_.reserve(hgcdigi_n_);
190  hgcdigi_layer_.reserve(hgcdigi_n_);
192  hgcdigi_eta_.reserve(hgcdigi_n_);
193  hgcdigi_phi_.reserve(hgcdigi_n_);
194  hgcdigi_z_.reserve(hgcdigi_n_);
195  for (unsigned int i = 0; i < digiBXselect_.size(); i++) {
196  hgcdigi_data_[i].reserve(hgcdigi_n_);
197  hgcdigi_isadc_[i].reserve(hgcdigi_n_);
198  }
200  hgcdigi_waferu_.reserve(hgcdigi_n_);
201  hgcdigi_waferv_.reserve(hgcdigi_n_);
202  hgcdigi_cellu_.reserve(hgcdigi_n_);
203  hgcdigi_cellv_.reserve(hgcdigi_n_);
204  } else {
205  hgcdigi_wafer_.reserve(hgcdigi_n_);
206  hgcdigi_cell_.reserve(hgcdigi_n_);
207  }
208  if (is_Simhit_comp_)
210 
211  bhdigi_n_ = bh_digis.size();
212  bhdigi_id_.reserve(bhdigi_n_);
213  bhdigi_subdet_.reserve(bhdigi_n_);
214  bhdigi_side_.reserve(bhdigi_n_);
215  bhdigi_layer_.reserve(bhdigi_n_);
216  bhdigi_ieta_.reserve(bhdigi_n_);
217  bhdigi_iphi_.reserve(bhdigi_n_);
218  bhdigi_eta_.reserve(bhdigi_n_);
219  bhdigi_phi_.reserve(bhdigi_n_);
220  bhdigi_z_.reserve(bhdigi_n_);
221  for (unsigned int i = 0; i < digiBXselect_.size(); i++) {
222  bhdigi_data_[i].reserve(bhdigi_n_);
223  bhdigi_isadc_[i].reserve(bhdigi_n_);
224  }
225  if (is_Simhit_comp_)
226  bhdigi_simenergy_.reserve(bhdigi_n_);
227 
228  for (const auto& digi : ee_digis) {
229  const DetId id(digi.id());
230  hgcdigi_id_.emplace_back(id.rawId());
231  hgcdigi_subdet_.emplace_back(id.subdetId());
232  hgcdigi_side_.emplace_back(triggerTools_.zside(id));
233  hgcdigi_layer_.emplace_back(triggerTools_.layerWithOffset(id));
234  GlobalPoint cellpos = triggerGeometry_->eeGeometry()->getPosition(id.rawId());
235  hgcdigi_eta_.emplace_back(cellpos.eta());
236  hgcdigi_phi_.emplace_back(cellpos.phi());
237  hgcdigi_z_.emplace_back(cellpos.z());
238  for (unsigned int i = 0; i < digiBXselect_.size(); i++) {
239  hgcdigi_data_[i].emplace_back(digi[digiBXselect_[i]].data());
240  hgcdigi_isadc_[i].emplace_back(!digi[digiBXselect_[i]].mode());
241  }
243  const HGCSiliconDetId idv9(digi.id());
244  hgcdigi_waferu_.emplace_back(idv9.waferU());
245  hgcdigi_waferv_.emplace_back(idv9.waferV());
246  hgcdigi_wafertype_.emplace_back(idv9.type());
247  hgcdigi_cellu_.emplace_back(idv9.cellU());
248  hgcdigi_cellv_.emplace_back(idv9.cellV());
249  } else {
250  const HGCalDetId idv8(digi.id());
251  hgcdigi_wafer_.emplace_back(idv8.wafer());
252  hgcdigi_wafertype_.emplace_back(idv8.waferType());
253  hgcdigi_cell_.emplace_back(idv8.cell());
254  }
255  if (is_Simhit_comp_) {
256  double hit_energy = 0;
257  auto itr = simhits_ee.find(id);
258  if (itr != simhits_ee.end())
259  hit_energy = itr->second;
260  hgcdigi_simenergy_.emplace_back(hit_energy);
261  }
262  }
263 
264  for (const auto& digi : fh_digis) {
265  const DetId id(digi.id());
266  hgcdigi_id_.emplace_back(id.rawId());
267  hgcdigi_subdet_.emplace_back(id.subdetId());
268  hgcdigi_side_.emplace_back(triggerTools_.zside(id));
269  hgcdigi_layer_.emplace_back(triggerTools_.layerWithOffset(id));
270  GlobalPoint cellpos = triggerGeometry_->hsiGeometry()->getPosition(id.rawId());
271  hgcdigi_eta_.emplace_back(cellpos.eta());
272  hgcdigi_phi_.emplace_back(cellpos.phi());
273  hgcdigi_z_.emplace_back(cellpos.z());
274  for (unsigned int i = 0; i < digiBXselect_.size(); i++) {
275  hgcdigi_data_[i].emplace_back(digi[digiBXselect_[i]].data());
276  hgcdigi_isadc_[i].emplace_back(!digi[digiBXselect_[i]].mode());
277  }
279  const HGCSiliconDetId idv9(digi.id());
280  hgcdigi_waferu_.emplace_back(idv9.waferU());
281  hgcdigi_waferv_.emplace_back(idv9.waferV());
282  hgcdigi_wafertype_.emplace_back(idv9.type());
283  hgcdigi_cellu_.emplace_back(idv9.cellU());
284  hgcdigi_cellv_.emplace_back(idv9.cellV());
285  } else {
286  const HGCalDetId idv8(digi.id());
287  hgcdigi_wafer_.emplace_back(idv8.wafer());
288  hgcdigi_wafertype_.emplace_back(idv8.waferType());
289  hgcdigi_cell_.emplace_back(idv8.cell());
290  }
291  if (is_Simhit_comp_) {
292  double hit_energy = 0;
293  auto itr = simhits_fh.find(id);
294  if (itr != simhits_fh.end())
295  hit_energy = itr->second;
296  hgcdigi_simenergy_.emplace_back(hit_energy);
297  }
298  }
299 
300  for (const auto& digi : bh_digis) {
301  const DetId id(digi.id());
302  bhdigi_id_.emplace_back(id.rawId());
303  bhdigi_subdet_.emplace_back(id.subdetId());
304  bhdigi_side_.emplace_back(triggerTools_.zside(id));
305  bhdigi_layer_.emplace_back(triggerTools_.layerWithOffset(id));
307  : triggerGeometry_->bhGeometry()->getPosition(id.rawId()));
308  bhdigi_eta_.emplace_back(cellpos.eta());
309  bhdigi_phi_.emplace_back(cellpos.phi());
310  bhdigi_z_.emplace_back(cellpos.z());
311  for (unsigned int i = 0; i < digiBXselect_.size(); i++) {
312  bhdigi_data_[i].emplace_back(digi[digiBXselect_[i]].data());
313  bhdigi_isadc_[i].emplace_back(!digi[digiBXselect_[i]].mode());
314  }
316  const HGCScintillatorDetId idv9(digi.id());
317  bhdigi_ieta_.emplace_back(idv9.ietaAbs());
318  bhdigi_iphi_.emplace_back(idv9.iphi());
319  } else {
320  const HcalDetId idv8(digi.id());
321  bhdigi_ieta_.emplace_back(idv8.ieta());
322  bhdigi_iphi_.emplace_back(idv8.iphi());
323  }
324  if (is_Simhit_comp_) {
325  double hit_energy = 0;
326  auto itr = simhits_bh.find(id);
327  if (itr != simhits_bh.end())
328  hit_energy = itr->second;
329  bhdigi_simenergy_.emplace_back(hit_energy);
330  }
331  }
332 }

References bh_token_, bhdigi_data_, bhdigi_eta_, bhdigi_id_, bhdigi_ieta_, bhdigi_iphi_, bhdigi_isadc_, bhdigi_layer_, bhdigi_n_, bhdigi_phi_, bhdigi_side_, bhdigi_simenergy_, bhdigi_subdet_, bhdigi_z_, HGCalTriggerGeometryBase::bhGeometry(), clear(), data, digiBXselect_, MillePedeFileConverter_cfg::e, ee_token_, HGCalTriggerGeometryBase::eeGeometry(), PV3DBase< T, PVType, FrameType >::eta(), HGCalTriggerTools::eventSetup(), fh_token_, edm::EventSetup::get(), get, HcalGeometry::getPosition(), HGCalGeometry::getPosition(), hgcdigi_cell_, hgcdigi_cellu_, hgcdigi_cellv_, hgcdigi_data_, hgcdigi_eta_, hgcdigi_id_, hgcdigi_isadc_, hgcdigi_layer_, hgcdigi_n_, hgcdigi_phi_, hgcdigi_side_, hgcdigi_simenergy_, hgcdigi_subdet_, hgcdigi_wafer_, hgcdigi_wafertype_, hgcdigi_waferu_, hgcdigi_waferv_, hgcdigi_z_, HGCalTriggerGeometryBase::hscGeometry(), HGCalTriggerGeometryBase::hsiGeometry(), mps_fire::i, triggerObjects_cff::id, is_Simhit_comp_, HGCalTriggerGeometryBase::isV9Geometry(), HGCalTriggerTools::layerWithOffset(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, PV3DBase< T, PVType, FrameType >::phi(), simhits(), edm::SortedCollection< T, SORT >::size(), triggerGeometry_, triggerTools_, PV3DBase< T, PVType, FrameType >::z(), and HGCalTriggerTools::zside().

◆ initialize()

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

Implements HGCalTriggerNtupleBase.

Definition at line 97 of file HGCalTriggerNtupleHGCDigis.cc.

99  {
100  ee_token_ = collector.consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("HGCDigisEE"));
101  fh_token_ = collector.consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("HGCDigisFH"));
102  bh_token_ = collector.consumes<HGCalDigiCollection>(conf.getParameter<edm::InputTag>("HGCDigisBH"));
103  if (is_Simhit_comp_) {
107  }
108 
109  hgcdigi_data_.resize(digiBXselect_.size());
110  hgcdigi_isadc_.resize(digiBXselect_.size());
111  bhdigi_data_.resize(digiBXselect_.size());
112  bhdigi_isadc_.resize(digiBXselect_.size());
113 
114  tree.Branch("hgcdigi_n", &hgcdigi_n_, "hgcdigi_n/I");
115  tree.Branch("hgcdigi_id", &hgcdigi_id_);
116  tree.Branch("hgcdigi_subdet", &hgcdigi_subdet_);
117  tree.Branch("hgcdigi_zside", &hgcdigi_side_);
118  tree.Branch("hgcdigi_layer", &hgcdigi_layer_);
119  tree.Branch("hgcdigi_wafertype", &hgcdigi_wafertype_);
120  tree.Branch("hgcdigi_eta", &hgcdigi_eta_);
121  tree.Branch("hgcdigi_phi", &hgcdigi_phi_);
122  tree.Branch("hgcdigi_z", &hgcdigi_z_);
123  std::string bname;
124  auto withBX([&bname](char const* vname, unsigned int bx) -> char const* {
125  bname = std::string(vname) + "_BX" + to_string(bx);
126  return bname.c_str();
127  });
128  for (unsigned int i = 0; i < digiBXselect_.size(); i++) {
129  unsigned int bxi = digiBXselect_[i];
130  tree.Branch(withBX("hgcdigi_data", bxi), &hgcdigi_data_[i]);
131  tree.Branch(withBX("hgcdigi_isadc", bxi), &hgcdigi_isadc_[i]);
132  }
133  // V9 detid scheme
134  tree.Branch("hgcdigi_waferu", &hgcdigi_waferu_);
135  tree.Branch("hgcdigi_waferv", &hgcdigi_waferv_);
136  tree.Branch("hgcdigi_cellu", &hgcdigi_cellu_);
137  tree.Branch("hgcdigi_cellv", &hgcdigi_cellv_);
138  // V8 detid scheme
139  tree.Branch("hgcdigi_wafer", &hgcdigi_wafer_);
140  tree.Branch("hgcdigi_cell", &hgcdigi_cell_);
141  if (is_Simhit_comp_)
142  tree.Branch("hgcdigi_simenergy", &hgcdigi_simenergy_);
143 
144  tree.Branch("bhdigi_n", &bhdigi_n_, "bhdigi_n/I");
145  tree.Branch("bhdigi_id", &bhdigi_id_);
146  tree.Branch("bhdigi_subdet", &bhdigi_subdet_);
147  tree.Branch("bhdigi_zside", &bhdigi_side_);
148  tree.Branch("bhdigi_layer", &bhdigi_layer_);
149  tree.Branch("bhdigi_ieta", &bhdigi_ieta_);
150  tree.Branch("bhdigi_iphi", &bhdigi_iphi_);
151  tree.Branch("bhdigi_eta", &bhdigi_eta_);
152  tree.Branch("bhdigi_phi", &bhdigi_phi_);
153  tree.Branch("bhdigi_z", &bhdigi_z_);
154  for (unsigned int i = 0; i < digiBXselect_.size(); i++) {
155  unsigned int bxi = digiBXselect_[i];
156  tree.Branch(withBX("bhdigi_data", bxi), &bhdigi_data_[i]);
157  tree.Branch(withBX("bhdigi_isadc", bxi), &bhdigi_isadc_[i]);
158  }
159  if (is_Simhit_comp_)
160  tree.Branch("bhdigi_simenergy", &bhdigi_simenergy_);
161 }

References bh_token_, bhdigi_data_, bhdigi_eta_, bhdigi_id_, bhdigi_ieta_, bhdigi_iphi_, bhdigi_isadc_, bhdigi_layer_, bhdigi_n_, bhdigi_phi_, bhdigi_side_, bhdigi_simenergy_, bhdigi_subdet_, bhdigi_z_, l1GtPatternGenerator_cfi::bx, digiBXselect_, ee_token_, fh_token_, edm::ParameterSet::getParameter(), hgcdigi_cell_, hgcdigi_cellu_, hgcdigi_cellv_, hgcdigi_data_, hgcdigi_eta_, hgcdigi_id_, hgcdigi_isadc_, hgcdigi_layer_, hgcdigi_n_, hgcdigi_phi_, hgcdigi_side_, hgcdigi_simenergy_, hgcdigi_subdet_, hgcdigi_wafer_, hgcdigi_wafertype_, hgcdigi_waferu_, hgcdigi_waferv_, hgcdigi_z_, mps_fire::i, is_Simhit_comp_, SimHits_inputbh_, SimHits_inputee_, SimHits_inputfh_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ simhits()

void HGCalTriggerNtupleHGCDigis::simhits ( const edm::Event e,
std::unordered_map< uint32_t, double > &  simhits_ee,
std::unordered_map< uint32_t, double > &  simhits_fh,
std::unordered_map< uint32_t, double > &  simhits_bh 
)
private

Definition at line 334 of file HGCalTriggerNtupleHGCDigis.cc.

337  {
339  e.getByToken(SimHits_inputee_, ee_simhits_h);
340  const edm::PCaloHitContainer& ee_simhits = *ee_simhits_h;
342  e.getByToken(SimHits_inputfh_, fh_simhits_h);
343  const edm::PCaloHitContainer& fh_simhits = *fh_simhits_h;
345  e.getByToken(SimHits_inputbh_, bh_simhits_h);
346  const edm::PCaloHitContainer& bh_simhits = *bh_simhits_h;
347 
348  //EE
349  for (const auto& simhit : ee_simhits) {
351  if (id.rawId() == 0)
352  continue;
353  auto itr_insert = simhits_ee.emplace(id, 0.);
354  itr_insert.first->second += simhit.energy();
355  }
356  // FH
357  for (const auto& simhit : fh_simhits) {
359  if (id.rawId() == 0)
360  continue;
361  auto itr_insert = simhits_fh.emplace(id, 0.);
362  itr_insert.first->second += simhit.energy();
363  }
364  // BH
365  for (const auto& simhit : bh_simhits) {
366  DetId id =
369  if (id.rawId() == 0)
370  continue;
371  auto itr_insert = simhits_bh.emplace(id, 0.);
372  itr_insert.first->second += simhit.energy();
373  }
374 }

References HGCalTriggerGeometryBase::bhTopology(), MillePedeFileConverter_cfg::e, HGCalTriggerGeometryBase::eeTopology(), HGCalTriggerGeometryBase::fhTopology(), HGCalTriggerGeometryBase::hscTopology(), HGCalTriggerGeometryBase::isV9Geometry(), SimHits_inputbh_, SimHits_inputee_, SimHits_inputfh_, HGCalTriggerTools::simToReco(), triggerGeometry_, and triggerTools_.

Referenced by fill().

Member Data Documentation

◆ bh_token_

edm::EDGetToken HGCalTriggerNtupleHGCDigis::bh_token_
private

Definition at line 30 of file HGCalTriggerNtupleHGCDigis.cc.

Referenced by fill(), and initialize().

◆ bhdigi_data_

std::vector<std::vector<uint32_t> > HGCalTriggerNtupleHGCDigis::bhdigi_data_
private

Definition at line 70 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_eta_

std::vector<float> HGCalTriggerNtupleHGCDigis::bhdigi_eta_
private

Definition at line 67 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_id_

std::vector<int> HGCalTriggerNtupleHGCDigis::bhdigi_id_
private

Definition at line 61 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_ieta_

std::vector<int> HGCalTriggerNtupleHGCDigis::bhdigi_ieta_
private

Definition at line 65 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_iphi_

std::vector<int> HGCalTriggerNtupleHGCDigis::bhdigi_iphi_
private

Definition at line 66 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_isadc_

std::vector<std::vector<int> > HGCalTriggerNtupleHGCDigis::bhdigi_isadc_
private

Definition at line 71 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_layer_

std::vector<int> HGCalTriggerNtupleHGCDigis::bhdigi_layer_
private

Definition at line 64 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_n_

int HGCalTriggerNtupleHGCDigis::bhdigi_n_
private

Definition at line 60 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_phi_

std::vector<float> HGCalTriggerNtupleHGCDigis::bhdigi_phi_
private

Definition at line 68 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_side_

std::vector<int> HGCalTriggerNtupleHGCDigis::bhdigi_side_
private

Definition at line 63 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_simenergy_

std::vector<float> HGCalTriggerNtupleHGCDigis::bhdigi_simenergy_
private

Definition at line 72 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_subdet_

std::vector<int> HGCalTriggerNtupleHGCDigis::bhdigi_subdet_
private

Definition at line 62 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ bhdigi_z_

std::vector<float> HGCalTriggerNtupleHGCDigis::bhdigi_z_
private

Definition at line 69 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ digiBXselect_

std::vector<unsigned int> HGCalTriggerNtupleHGCDigis::digiBXselect_
private

Definition at line 34 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ ee_token_

edm::EDGetToken HGCalTriggerNtupleHGCDigis::ee_token_
private

Definition at line 30 of file HGCalTriggerNtupleHGCDigis.cc.

Referenced by fill(), and initialize().

◆ fh_token_

edm::EDGetToken HGCalTriggerNtupleHGCDigis::fh_token_
private

Definition at line 30 of file HGCalTriggerNtupleHGCDigis.cc.

Referenced by fill(), and initialize().

◆ hgcdigi_cell_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_cell_
private

Definition at line 53 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_cellu_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_cellu_
private

Definition at line 57 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_cellv_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_cellv_
private

Definition at line 58 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_data_

std::vector<std::vector<uint32_t> > HGCalTriggerNtupleHGCDigis::hgcdigi_data_
private

Definition at line 48 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_eta_

std::vector<float> HGCalTriggerNtupleHGCDigis::hgcdigi_eta_
private

Definition at line 45 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_id_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_id_
private

Definition at line 40 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_isadc_

std::vector<std::vector<int> > HGCalTriggerNtupleHGCDigis::hgcdigi_isadc_
private

Definition at line 49 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_layer_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_layer_
private

Definition at line 43 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_n_

int HGCalTriggerNtupleHGCDigis::hgcdigi_n_
private

Definition at line 39 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_phi_

std::vector<float> HGCalTriggerNtupleHGCDigis::hgcdigi_phi_
private

Definition at line 46 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_side_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_side_
private

Definition at line 42 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_simenergy_

std::vector<float> HGCalTriggerNtupleHGCDigis::hgcdigi_simenergy_
private

Definition at line 50 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_subdet_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_subdet_
private

Definition at line 41 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_wafer_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_wafer_
private

Definition at line 52 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_wafertype_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_wafertype_
private

Definition at line 44 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_waferu_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_waferu_
private

Definition at line 55 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_waferv_

std::vector<int> HGCalTriggerNtupleHGCDigis::hgcdigi_waferv_
private

Definition at line 56 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ hgcdigi_z_

std::vector<float> HGCalTriggerNtupleHGCDigis::hgcdigi_z_
private

Definition at line 47 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ is_Simhit_comp_

bool HGCalTriggerNtupleHGCDigis::is_Simhit_comp_
private

Definition at line 31 of file HGCalTriggerNtupleHGCDigis.cc.

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

◆ kDigiSize_

constexpr unsigned HGCalTriggerNtupleHGCDigis::kDigiSize_ = 5
staticconstexprprivate

Definition at line 35 of file HGCalTriggerNtupleHGCDigis.cc.

Referenced by HGCalTriggerNtupleHGCDigis().

◆ SimHits_inputbh_

edm::EDGetToken HGCalTriggerNtupleHGCDigis::SimHits_inputbh_
private

Definition at line 32 of file HGCalTriggerNtupleHGCDigis.cc.

Referenced by initialize(), and simhits().

◆ SimHits_inputee_

edm::EDGetToken HGCalTriggerNtupleHGCDigis::SimHits_inputee_
private

Definition at line 32 of file HGCalTriggerNtupleHGCDigis.cc.

Referenced by initialize(), and simhits().

◆ SimHits_inputfh_

edm::EDGetToken HGCalTriggerNtupleHGCDigis::SimHits_inputfh_
private

Definition at line 32 of file HGCalTriggerNtupleHGCDigis.cc.

Referenced by initialize(), and simhits().

◆ triggerGeometry_

edm::ESHandle<HGCalTriggerGeometryBase> HGCalTriggerNtupleHGCDigis::triggerGeometry_
private

Definition at line 74 of file HGCalTriggerNtupleHGCDigis.cc.

Referenced by fill(), and simhits().

◆ triggerTools_

HGCalTriggerTools HGCalTriggerNtupleHGCDigis::triggerTools_
private

Definition at line 37 of file HGCalTriggerNtupleHGCDigis.cc.

Referenced by fill(), and simhits().

HGCalTriggerNtupleHGCDigis::hgcdigi_subdet_
std::vector< int > hgcdigi_subdet_
Definition: HGCalTriggerNtupleHGCDigis.cc:41
HGCalTriggerGeometryBase::eeTopology
const HGCalTopology & eeTopology() const
Definition: HGCalTriggerGeometryBase.h:65
HGCalTriggerNtupleHGCDigis::triggerTools_
HGCalTriggerTools triggerTools_
Definition: HGCalTriggerNtupleHGCDigis.cc:37
HGCalTriggerTools::eventSetup
void eventSetup(const edm::EventSetup &)
Definition: HGCalTriggerTools.cc:35
HGCalTriggerNtupleHGCDigis::hgcdigi_side_
std::vector< int > hgcdigi_side_
Definition: HGCalTriggerNtupleHGCDigis.cc:42
mps_fire.i
i
Definition: mps_fire.py:428
HGCalTriggerGeometryBase::hsiGeometry
const HGCalGeometry * hsiGeometry() const
Definition: HGCalTriggerGeometryBase.h:57
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
HGCalTriggerNtupleHGCDigis::clear
void clear() final
Definition: HGCalTriggerNtupleHGCDigis.cc:376
tree
Definition: tree.py:1
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
HGCalTriggerNtupleHGCDigis::bhdigi_id_
std::vector< int > bhdigi_id_
Definition: HGCalTriggerNtupleHGCDigis.cc:61
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
HGCalTriggerNtupleHGCDigis::simhits
void simhits(const edm::Event &e, std::unordered_map< uint32_t, double > &simhits_ee, std::unordered_map< uint32_t, double > &simhits_fh, std::unordered_map< uint32_t, double > &simhits_bh)
Definition: HGCalTriggerNtupleHGCDigis.cc:334
HGCalTriggerNtupleHGCDigis::hgcdigi_cellu_
std::vector< int > hgcdigi_cellu_
Definition: HGCalTriggerNtupleHGCDigis.cc:57
edm::SortedCollection
Definition: SortedCollection.h:49
edm::SortedCollection::size
size_type size() const
Definition: SortedCollection.h:215
HGCalTriggerNtupleHGCDigis::ee_token_
edm::EDGetToken ee_token_
Definition: HGCalTriggerNtupleHGCDigis.cc:30
HGCalTriggerNtupleHGCDigis::digiBXselect_
std::vector< unsigned int > digiBXselect_
Definition: HGCalTriggerNtupleHGCDigis.cc:34
HGCalTriggerNtupleHGCDigis::bhdigi_layer_
std::vector< int > bhdigi_layer_
Definition: HGCalTriggerNtupleHGCDigis.cc:64
edm::Handle
Definition: AssociativeIterator.h:50
HGCalTriggerNtupleHGCDigis::bhdigi_z_
std::vector< float > bhdigi_z_
Definition: HGCalTriggerNtupleHGCDigis.cc:69
HGCSiliconDetId
Definition: HGCSiliconDetId.h:22
HGCalTriggerNtupleHGCDigis::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalTriggerNtupleHGCDigis.cc:74
HGCalTriggerNtupleHGCDigis::hgcdigi_id_
std::vector< int > hgcdigi_id_
Definition: HGCalTriggerNtupleHGCDigis.cc:40
HGCalTriggerNtupleHGCDigis::bhdigi_iphi_
std::vector< int > bhdigi_iphi_
Definition: HGCalTriggerNtupleHGCDigis.cc:66
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DetId
Definition: DetId.h:17
HGCalTriggerNtupleHGCDigis::SimHits_inputbh_
edm::EDGetToken SimHits_inputbh_
Definition: HGCalTriggerNtupleHGCDigis.cc:32
HGCalTriggerNtupleHGCDigis::is_Simhit_comp_
bool is_Simhit_comp_
Definition: HGCalTriggerNtupleHGCDigis.cc:31
HGCalTriggerNtupleBase::HGCalTriggerNtupleBase
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
Definition: HGCalTriggerNtupleBase.h:12
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
HGCalTriggerNtupleHGCDigis::bhdigi_phi_
std::vector< float > bhdigi_phi_
Definition: HGCalTriggerNtupleHGCDigis.cc:68
HGCalTriggerNtupleHGCDigis::hgcdigi_phi_
std::vector< float > hgcdigi_phi_
Definition: HGCalTriggerNtupleHGCDigis.cc:46
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
HGCalTriggerNtupleHGCDigis::hgcdigi_waferv_
std::vector< int > hgcdigi_waferv_
Definition: HGCalTriggerNtupleHGCDigis.cc:56
HGCalTriggerNtupleHGCDigis::hgcdigi_z_
std::vector< float > hgcdigi_z_
Definition: HGCalTriggerNtupleHGCDigis.cc:47
HGCalTriggerTools::layerWithOffset
unsigned layerWithOffset(const DetId &) const
Definition: HGCalTriggerTools.cc:134
HGCalTriggerNtupleHGCDigis::hgcdigi_simenergy_
std::vector< float > hgcdigi_simenergy_
Definition: HGCalTriggerNtupleHGCDigis.cc:50
HGCalTriggerTools::zside
int zside(const DetId &) const
Definition: HGCalTriggerTools.cc:210
Point3DBase< float, GlobalTag >
HGCalTriggerNtupleHGCDigis::bhdigi_subdet_
std::vector< int > bhdigi_subdet_
Definition: HGCalTriggerNtupleHGCDigis.cc:62
HGCalTriggerNtupleHGCDigis::hgcdigi_wafer_
std::vector< int > hgcdigi_wafer_
Definition: HGCalTriggerNtupleHGCDigis.cc:52
HGCalTriggerNtupleHGCDigis::hgcdigi_wafertype_
std::vector< int > hgcdigi_wafertype_
Definition: HGCalTriggerNtupleHGCDigis.cc:44
HcalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HcalGeometry.cc:179
HGCalTriggerNtupleHGCDigis::hgcdigi_eta_
std::vector< float > hgcdigi_eta_
Definition: HGCalTriggerNtupleHGCDigis.cc:45
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
HcalDetId
Definition: HcalDetId.h:12
HGCalTriggerNtupleHGCDigis::bhdigi_data_
std::vector< std::vector< uint32_t > > bhdigi_data_
Definition: HGCalTriggerNtupleHGCDigis.cc:70
HGCalTriggerNtupleHGCDigis::SimHits_inputfh_
edm::EDGetToken SimHits_inputfh_
Definition: HGCalTriggerNtupleHGCDigis.cc:32
HGCalTriggerNtupleHGCDigis::hgcdigi_cell_
std::vector< int > hgcdigi_cell_
Definition: HGCalTriggerNtupleHGCDigis.cc:53
HGCalTriggerNtupleHGCDigis::hgcdigi_waferu_
std::vector< int > hgcdigi_waferu_
Definition: HGCalTriggerNtupleHGCDigis.cc:55
HGCalTriggerGeometryBase::bhTopology
const HcalTopology & bhTopology() const
Definition: HGCalTriggerGeometryBase.h:67
HGCalTriggerNtupleHGCDigis::hgcdigi_isadc_
std::vector< std::vector< int > > hgcdigi_isadc_
Definition: HGCalTriggerNtupleHGCDigis.cc:49
HGCalTriggerGeometryBase::isV9Geometry
bool isV9Geometry() const
Definition: HGCalTriggerGeometryBase.h:30
HGCalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HGCalGeometry.cc:198
HGCalTriggerTools::simToReco
DetId simToReco(const DetId &, const HGCalTopology &) const
Definition: HGCalTriggerTools.cc:346
get
#define get
HGCalTriggerNtupleHGCDigis::bhdigi_eta_
std::vector< float > bhdigi_eta_
Definition: HGCalTriggerNtupleHGCDigis.cc:67
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalTriggerNtupleHGCDigis::hgcdigi_n_
int hgcdigi_n_
Definition: HGCalTriggerNtupleHGCDigis.cc:39
HGCalTriggerNtupleHGCDigis::bhdigi_isadc_
std::vector< std::vector< int > > bhdigi_isadc_
Definition: HGCalTriggerNtupleHGCDigis.cc:71
HGCalTriggerNtupleHGCDigis::bh_token_
edm::EDGetToken bh_token_
Definition: HGCalTriggerNtupleHGCDigis.cc:30
HGCalDetId
Definition: HGCalDetId.h:8
HGCalTriggerGeometryBase::eeGeometry
const HGCalGeometry * eeGeometry() const
Definition: HGCalTriggerGeometryBase.h:41
HGCalTriggerNtupleHGCDigis::bhdigi_side_
std::vector< int > bhdigi_side_
Definition: HGCalTriggerNtupleHGCDigis.cc:63
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
HGCalTriggerNtupleHGCDigis::hgcdigi_cellv_
std::vector< int > hgcdigi_cellv_
Definition: HGCalTriggerNtupleHGCDigis.cc:58
HGCScintillatorDetId
Definition: HGCScintillatorDetId.h:23
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
Exception
Definition: hltDiff.cc:245
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HGCalTriggerNtupleHGCDigis::bhdigi_ieta_
std::vector< int > bhdigi_ieta_
Definition: HGCalTriggerNtupleHGCDigis.cc:65
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
HGCalTriggerNtupleHGCDigis::bhdigi_n_
int bhdigi_n_
Definition: HGCalTriggerNtupleHGCDigis.cc:60
HGCalTriggerGeometryBase::hscGeometry
const HGCalGeometry * hscGeometry() const
Definition: HGCalTriggerGeometryBase.h:58
HGCalTriggerNtupleHGCDigis::hgcdigi_data_
std::vector< std::vector< uint32_t > > hgcdigi_data_
Definition: HGCalTriggerNtupleHGCDigis.cc:48
HGCalTriggerNtupleHGCDigis::hgcdigi_layer_
std::vector< int > hgcdigi_layer_
Definition: HGCalTriggerNtupleHGCDigis.cc:43
edm::InputTag
Definition: InputTag.h:15
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
HGCalTriggerGeometryBase::bhGeometry
const HcalGeometry * bhGeometry() const
Definition: HGCalTriggerGeometryBase.h:51
HGCalTriggerNtupleHGCDigis::kDigiSize_
static constexpr unsigned kDigiSize_
Definition: HGCalTriggerNtupleHGCDigis.cc:35
HGCalTriggerNtupleHGCDigis::SimHits_inputee_
edm::EDGetToken SimHits_inputee_
Definition: HGCalTriggerNtupleHGCDigis.cc:32
HGCalTriggerGeometryBase::fhTopology
const HGCalTopology & fhTopology() const
Definition: HGCalTriggerGeometryBase.h:66
HGCalTriggerNtupleHGCDigis::bhdigi_simenergy_
std::vector< float > bhdigi_simenergy_
Definition: HGCalTriggerNtupleHGCDigis.cc:72
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HGCalTriggerNtupleHGCDigis::fh_token_
edm::EDGetToken fh_token_
Definition: HGCalTriggerNtupleHGCDigis.cc:30
HGCalTriggerGeometryBase::hscTopology
const HGCalTopology & hscTopology() const
Definition: HGCalTriggerGeometryBase.h:69