CMS 3D CMS Logo

PFAnalysisNtuplizer.cc
Go to the documentation of this file.
1 // Based on RecoNtuple/HGCalAnalysis with modifications for PF
2 //
3 // user include files
6 
10 
12 
36 
40 
46 
48 #include "Math/Transform3D.h"
53 
56 #include "TH1F.h"
57 #include "TVector2.h"
58 #include "TTree.h"
59 
60 #include <map>
61 #include <set>
62 #include <string>
63 #include <vector>
64 #include <set>
65 
66 using namespace std;
67 
69 public:
71  size_t idx_block;
72  size_t idx_elem;
73  ElementWithIndex(const reco::PFBlockElement& _orig, size_t _idx_block, size_t _idx_elem)
74  : orig(_orig), idx_block(_idx_block), idx_elem(_idx_elem){};
75 };
76 
77 vector<int> find_element_ref(const vector<ElementWithIndex>& vec, const edm::RefToBase<reco::Track>& r) {
78  vector<int> ret;
79  for (unsigned int i = 0; i < vec.size(); i++) {
80  const auto& elem = vec.at(i);
81  if (elem.orig.type() == reco::PFBlockElement::TRACK) {
82  const auto& ref = elem.orig.trackRef();
83  if (ref.isNonnull() && ref->extra().isNonnull()) {
84  if (ref.key() == r.key()) {
85  ret.push_back(i);
86  }
87  }
88  }
89  }
90  return ret;
91 }
92 
93 double detid_compare(const map<uint64_t, double>& rechits, const map<uint64_t, double>& simhits) {
94  double ret = 0.0;
95 
96  for (const auto& rh : rechits) {
97  for (const auto& sh : simhits) {
98  if (rh.first == sh.first) {
99  //rechit energy times simhit fraction
100  ret += rh.second * sh.second;
101  break;
102  }
103  }
104  }
105  return ret;
106 }
107 
108 class PFAnalysis : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
109 public:
111 
112  PFAnalysis();
113  explicit PFAnalysis(const edm::ParameterSet&);
114  ~PFAnalysis() override;
115 
116  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
117  void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override;
118  void endRun(edm::Run const& iEvent, edm::EventSetup const&) override;
119 
120 private:
121  void beginJob() override;
122  void analyze(const edm::Event&, const edm::EventSetup&) override;
123  void endJob() override;
124 
125  void processTrackingParticles(const edm::View<TrackingParticle>& trackingParticles,
126  edm::Handle<edm::View<TrackingParticle>>& trackingParticlesHandle);
127 
128  pair<vector<ElementWithIndex>, vector<tuple<int, int, float>>> processBlocks(
129  const std::vector<reco::PFBlock>& pfBlocks);
130 
131  void associateClusterToSimCluster(const vector<ElementWithIndex>& all_elements);
132 
133  void clearVariables();
134 
135  GlobalPoint getHitPosition(const DetId& id);
136  // ----------member data ---------------------------
137 
145 
146  TTree* t_;
147 
151 
152  vector<float> trackingparticle_eta_;
153  vector<float> trackingparticle_phi_;
154  vector<float> trackingparticle_pt_;
155  vector<float> trackingparticle_px_;
156  vector<float> trackingparticle_py_;
157  vector<float> trackingparticle_pz_;
159  vector<float> trackingparticle_dvx_;
160  vector<float> trackingparticle_dvy_;
161  vector<float> trackingparticle_dvz_;
162  vector<int> trackingparticle_bx_;
163  vector<int> trackingparticle_ev_;
164  vector<float> trackingparticle_ovx_;
165  vector<float> trackingparticle_ovy_;
166  vector<float> trackingparticle_ovz_;
167  vector<float> trackingparticle_exx_;
168  vector<float> trackingparticle_exy_;
171 
172  vector<float> simcluster_eta_;
173  vector<float> simcluster_phi_;
174  vector<float> simcluster_pt_;
175  vector<float> simcluster_energy_;
176  vector<float> simcluster_px_;
177  vector<float> simcluster_py_;
178  vector<float> simcluster_pz_;
179  vector<int> simcluster_bx_;
180  vector<int> simcluster_ev_;
181  vector<int> simcluster_pid_;
183  vector<int> simcluster_nhits_;
184  vector<std::map<uint64_t, double>> simcluster_detids_;
185 
186  vector<float> simhit_frac_;
187  vector<float> simhit_x_;
188  vector<float> simhit_y_;
189  vector<float> simhit_z_;
190  vector<float> simhit_eta_;
191  vector<float> simhit_phi_;
192  vector<int> simhit_det_;
193  vector<int> simhit_subdet_;
195  vector<uint64_t> simhit_detid_;
196 
197  vector<float> rechit_e_;
198  vector<float> rechit_x_;
199  vector<float> rechit_y_;
200  vector<float> rechit_z_;
201  vector<float> rechit_det_;
202  vector<float> rechit_subdet_;
203  vector<float> rechit_eta_;
204  vector<float> rechit_phi_;
205  vector<int> rechit_idx_element_;
206  vector<uint64_t> rechit_detid_;
207 
208  vector<float> simtrack_x_;
209  vector<float> simtrack_y_;
210  vector<float> simtrack_z_;
212  vector<int> simtrack_pid_;
213 
214  vector<float> gen_eta_;
215  vector<float> gen_phi_;
216  vector<float> gen_pt_;
217  vector<float> gen_px_;
218  vector<float> gen_py_;
219  vector<float> gen_pz_;
220  vector<float> gen_energy_;
221  vector<int> gen_charge_;
222  vector<int> gen_pdgid_;
223  vector<int> gen_status_;
224  vector<vector<int>> gen_daughters_;
225 
226  vector<float> element_pt_;
227  vector<float> element_px_;
228  vector<float> element_py_;
229  vector<float> element_pz_;
230  vector<float> element_deltap_;
231  vector<float> element_sigmadeltap_;
232  vector<float> element_eta_;
233  vector<float> element_phi_;
234  vector<float> element_energy_;
235  vector<float> element_eta_ecal_;
236  vector<float> element_phi_ecal_;
237  vector<float> element_eta_hcal_;
238  vector<float> element_phi_hcal_;
239  vector<int> element_charge_;
240  vector<int> element_type_;
241  vector<int> element_layer_;
242  vector<float> element_depth_;
243  vector<float> element_trajpoint_;
244  vector<float> element_muon_dt_hits_;
245  vector<float> element_muon_csc_hits_;
246 
247  vector<int> element_distance_i_;
248  vector<int> element_distance_j_;
249  vector<float> element_distance_d_;
250 
251  vector<float> pfcandidate_eta_;
252  vector<float> pfcandidate_phi_;
253  vector<float> pfcandidate_pt_;
254  vector<float> pfcandidate_px_;
255  vector<float> pfcandidate_py_;
256  vector<float> pfcandidate_pz_;
257  vector<float> pfcandidate_energy_;
258  vector<int> pfcandidate_pdgid_;
259 
260  vector<pair<int, int>> trackingparticle_to_element;
261  vector<pair<int, int>> simcluster_to_element;
263  vector<pair<int, int>> element_to_candidate;
264 
265  // and also the magnetic field
267 
270 
274 
275  bool saveHits;
276 };
277 
279 
281  tracks_recotosim_ = consumes<reco::RecoToSimCollection>(edm::InputTag("trackingParticleRecoTrackAsssociation"));
282  trackingParticles_ = consumes<edm::View<TrackingParticle>>(edm::InputTag("mix", "MergedTrackTruth"));
283  caloParticles_ = consumes<edm::View<CaloParticle>>(edm::InputTag("mix", "MergedCaloTruth"));
284  genParticles_ = consumes<std::vector<reco::GenParticle>>(edm::InputTag("genParticles"));
285  pfBlocks_ = consumes<std::vector<reco::PFBlock>>(edm::InputTag("particleFlowBlock"));
286  pfCandidates_ = consumes<std::vector<reco::PFCandidate>>(edm::InputTag("particleFlow"));
287  tracks_ = consumes<edm::View<reco::Track>>(edm::InputTag("generalTracks"));
288  saveHits = iConfig.getUntrackedParameter<bool>("saveHits", false);
289 
290  geometryToken_ = esConsumes<CaloGeometry, CaloGeometryRecord>(edm::ESInputTag{});
291  topologyToken_ = esConsumes<HcalTopology, HcalRecNumberingRecord>(edm::ESInputTag{});
292 
293  usesResource(TFileService::kSharedResource);
295  fs->make<TH1F>("total", "total", 100, 0, 5.);
296 
297  t_ = fs->make<TTree>("pftree", "pftree");
298 
299  // event info
300  t_->Branch("event", &ev_event_);
301  t_->Branch("lumi", &ev_lumi_);
302  t_->Branch("run", &ev_run_);
303 
304  t_->Branch("trackingparticle_eta", &trackingparticle_eta_);
305  t_->Branch("trackingparticle_phi", &trackingparticle_phi_);
306  t_->Branch("trackingparticle_pt", &trackingparticle_pt_);
307  t_->Branch("trackingparticle_px", &trackingparticle_px_);
308  t_->Branch("trackingparticle_py", &trackingparticle_py_);
309  t_->Branch("trackingparticle_pz", &trackingparticle_pz_);
310  t_->Branch("trackingparticle_energy", &trackingparticle_energy_);
311  t_->Branch("trackingparticle_dvx", &trackingparticle_dvx_);
312  t_->Branch("trackingparticle_dvy", &trackingparticle_dvy_);
313  t_->Branch("trackingparticle_dvz", &trackingparticle_dvz_);
314  t_->Branch("trackingparticle_bx", &trackingparticle_bx_);
315  t_->Branch("trackingparticle_ev", &trackingparticle_ev_);
316  t_->Branch("trackingparticle_pid", &trackingparticle_pid_);
317 
318  t_->Branch("simcluster_eta", &simcluster_eta_);
319  t_->Branch("simcluster_phi", &simcluster_phi_);
320  t_->Branch("simcluster_pt", &simcluster_pt_);
321  t_->Branch("simcluster_px", &simcluster_px_);
322  t_->Branch("simcluster_py", &simcluster_py_);
323  t_->Branch("simcluster_pz", &simcluster_pz_);
324  t_->Branch("simcluster_energy", &simcluster_energy_);
325  t_->Branch("simcluster_bx", &simcluster_bx_);
326  t_->Branch("simcluster_ev", &simcluster_ev_);
327  t_->Branch("simcluster_pid", &simcluster_pid_);
328  t_->Branch("simcluster_idx_trackingparticle", &simcluster_idx_trackingparticle_);
329  t_->Branch("simcluster_nhits", &simcluster_nhits_);
330 
331  if (saveHits) {
332  t_->Branch("simhit_frac", &simhit_frac_);
333  t_->Branch("simhit_x", &simhit_x_);
334  t_->Branch("simhit_y", &simhit_y_);
335  t_->Branch("simhit_z", &simhit_z_);
336  t_->Branch("simhit_det", &simhit_det_);
337  t_->Branch("simhit_subdet", &simhit_subdet_);
338  t_->Branch("simhit_eta", &simhit_eta_);
339  t_->Branch("simhit_phi", &simhit_phi_);
340  t_->Branch("simhit_idx_simcluster", &simhit_idx_simcluster_);
341  t_->Branch("simhit_detid", &simhit_detid_);
342 
343  t_->Branch("rechit_e", &rechit_e_);
344  t_->Branch("rechit_x", &rechit_x_);
345  t_->Branch("rechit_y", &rechit_y_);
346  t_->Branch("rechit_z", &rechit_z_);
347  t_->Branch("rechit_det", &rechit_det_);
348  t_->Branch("rechit_subdet", &rechit_subdet_);
349  t_->Branch("rechit_eta", &rechit_eta_);
350  t_->Branch("rechit_phi", &rechit_phi_);
351  t_->Branch("rechit_idx_element", &rechit_idx_element_);
352  t_->Branch("rechit_detid", &rechit_detid_);
353  }
354 
355  t_->Branch("simtrack_x", &simtrack_x_);
356  t_->Branch("simtrack_y", &simtrack_y_);
357  t_->Branch("simtrack_z", &simtrack_z_);
358  t_->Branch("simtrack_idx_simcluster_", &simtrack_idx_simcluster_);
359  t_->Branch("simtrack_pid", &simtrack_pid_);
360 
361  t_->Branch("gen_eta", &gen_eta_);
362  t_->Branch("gen_phi", &gen_phi_);
363  t_->Branch("gen_pt", &gen_pt_);
364  t_->Branch("gen_px", &gen_px_);
365  t_->Branch("gen_py", &gen_py_);
366  t_->Branch("gen_pz", &gen_pz_);
367  t_->Branch("gen_energy", &gen_energy_);
368  t_->Branch("gen_charge", &gen_charge_);
369  t_->Branch("gen_pdgid", &gen_pdgid_);
370  t_->Branch("gen_status", &gen_status_);
371  t_->Branch("gen_daughters", &gen_daughters_);
372 
373  //PF Elements
374  t_->Branch("element_pt", &element_pt_);
375  t_->Branch("element_px", &element_px_);
376  t_->Branch("element_py", &element_py_);
377  t_->Branch("element_pz", &element_pz_);
378  t_->Branch("element_deltap", &element_deltap_);
379  t_->Branch("element_sigmadeltap", &element_sigmadeltap_);
380  t_->Branch("element_eta", &element_eta_);
381  t_->Branch("element_phi", &element_phi_);
382  t_->Branch("element_energy", &element_energy_);
383  t_->Branch("element_eta_ecal", &element_eta_ecal_);
384  t_->Branch("element_phi_ecal", &element_phi_ecal_);
385  t_->Branch("element_eta_hcal", &element_eta_hcal_);
386  t_->Branch("element_phi_hcal", &element_phi_hcal_);
387  t_->Branch("element_charge", &element_charge_);
388  t_->Branch("element_type", &element_type_);
389  t_->Branch("element_layer", &element_layer_);
390  t_->Branch("element_depth", &element_depth_);
391  t_->Branch("element_trajpoint", &element_trajpoint_);
392  t_->Branch("element_muon_dt_hits", &element_muon_dt_hits_);
393  t_->Branch("element_muon_csc_hits", &element_muon_csc_hits_);
394 
395  //Distance matrix between PF elements
396  t_->Branch("element_distance_i", &element_distance_i_);
397  t_->Branch("element_distance_j", &element_distance_j_);
398  t_->Branch("element_distance_d", &element_distance_d_);
399 
400  t_->Branch("pfcandidate_eta", &pfcandidate_eta_);
401  t_->Branch("pfcandidate_phi", &pfcandidate_phi_);
402  t_->Branch("pfcandidate_pt", &pfcandidate_pt_);
403  t_->Branch("pfcandidate_px", &pfcandidate_px_);
404  t_->Branch("pfcandidate_py", &pfcandidate_py_);
405  t_->Branch("pfcandidate_pz", &pfcandidate_pz_);
406  t_->Branch("pfcandidate_energy", &pfcandidate_energy_);
407  t_->Branch("pfcandidate_pdgid", &pfcandidate_pdgid_);
408 
409  //Links between reco, gen and PFCandidate objects
410  t_->Branch("trackingparticle_to_element", &trackingparticle_to_element);
411  t_->Branch("simcluster_to_element", &simcluster_to_element);
412  t_->Branch("simcluster_to_element_cmp", &simcluster_to_element_cmp);
413  t_->Branch("element_to_candidate", &element_to_candidate);
414 } // constructor
415 
417 
419  ev_run_ = 0;
420  ev_lumi_ = 0;
421  ev_event_ = 0;
422 
423  trackingparticle_to_element.clear();
424  simcluster_to_element.clear();
425  simcluster_to_element_cmp.clear();
426  element_to_candidate.clear();
427 
428  trackingparticle_eta_.clear();
429  trackingparticle_phi_.clear();
430  trackingparticle_pt_.clear();
431  trackingparticle_px_.clear();
432  trackingparticle_py_.clear();
433  trackingparticle_pz_.clear();
434  trackingparticle_energy_.clear();
435  trackingparticle_dvx_.clear();
436  trackingparticle_dvy_.clear();
437  trackingparticle_dvz_.clear();
438  trackingparticle_bx_.clear();
439  trackingparticle_ev_.clear();
440  trackingparticle_ovx_.clear();
441  trackingparticle_ovy_.clear();
442  trackingparticle_ovz_.clear();
443  trackingparticle_exx_.clear();
444  trackingparticle_exy_.clear();
445  trackingparticle_mother_.clear();
446  trackingparticle_pid_.clear();
447 
448  simcluster_eta_.clear();
449  simcluster_phi_.clear();
450  simcluster_pt_.clear();
451  simcluster_energy_.clear();
452  simcluster_pid_.clear();
453  simcluster_detids_.clear();
454  simcluster_bx_.clear();
455  simcluster_ev_.clear();
456  simcluster_px_.clear();
457  simcluster_py_.clear();
458  simcluster_pz_.clear();
459  simcluster_idx_trackingparticle_.clear();
460  simcluster_nhits_.clear();
461 
462  if (saveHits) {
463  simhit_frac_.clear();
464  simhit_x_.clear();
465  simhit_y_.clear();
466  simhit_z_.clear();
467  simhit_det_.clear();
468  simhit_subdet_.clear();
469  simhit_eta_.clear();
470  simhit_phi_.clear();
471  simhit_idx_simcluster_.clear();
472  simhit_detid_.clear();
473 
474  rechit_e_.clear();
475  rechit_x_.clear();
476  rechit_y_.clear();
477  rechit_z_.clear();
478  rechit_det_.clear();
479  rechit_subdet_.clear();
480  rechit_eta_.clear();
481  rechit_phi_.clear();
482  rechit_idx_element_.clear();
483  rechit_detid_.clear();
484  }
485 
486  simtrack_x_.clear();
487  simtrack_y_.clear();
488  simtrack_z_.clear();
489  simtrack_idx_simcluster_.clear();
490  simtrack_pid_.clear();
491 
492  gen_eta_.clear();
493  gen_phi_.clear();
494  gen_pt_.clear();
495  gen_px_.clear();
496  gen_py_.clear();
497  gen_pz_.clear();
498  gen_energy_.clear();
499  gen_charge_.clear();
500  gen_pdgid_.clear();
501  gen_status_.clear();
502  gen_daughters_.clear();
503 
504  element_pt_.clear();
505  element_px_.clear();
506  element_py_.clear();
507  element_pz_.clear();
508  element_deltap_.clear();
509  element_sigmadeltap_.clear();
510  element_eta_.clear();
511  element_phi_.clear();
512  element_energy_.clear();
513  element_eta_ecal_.clear();
514  element_phi_ecal_.clear();
515  element_eta_hcal_.clear();
516  element_phi_hcal_.clear();
517  element_charge_.clear();
518  element_type_.clear();
519  element_layer_.clear();
520  element_depth_.clear();
521  element_trajpoint_.clear();
522  element_muon_dt_hits_.clear();
523  element_muon_csc_hits_.clear();
524 
525  element_distance_i_.clear();
526  element_distance_j_.clear();
527  element_distance_d_.clear();
528 
529  pfcandidate_eta_.clear();
530  pfcandidate_phi_.clear();
531  pfcandidate_pt_.clear();
532  pfcandidate_px_.clear();
533  pfcandidate_py_.clear();
534  pfcandidate_pz_.clear();
535  pfcandidate_energy_.clear();
536  pfcandidate_pdgid_.clear();
537 
538 } //clearVariables
539 
542 
543  bool present = false;
544  if (((id.det() == DetId::Ecal &&
545  (id.subdetId() == EcalBarrel || id.subdetId() == EcalEndcap || id.subdetId() == EcalPreshower)) ||
546  (id.det() == DetId::Hcal && (id.subdetId() == HcalBarrel || id.subdetId() == HcalEndcap ||
547  id.subdetId() == HcalForward || id.subdetId() == HcalOuter)))) {
548  const CaloSubdetectorGeometry* geom_sd(geom->getSubdetectorGeometry(id.det(), id.subdetId()));
549  present = geom_sd->present(id);
550  if (present) {
551  const auto& cell = geom_sd->getGeometry(id);
552  ret = GlobalPoint(cell->getPosition());
553  }
554  }
555  return ret;
556 }
557 
559  clearVariables();
560 
561  auto& pG = iSetup.getData(geometryToken_);
562  geom = (CaloGeometry*)&pG;
563  auto& pT = iSetup.getData(topologyToken_);
564  hcal_topo = (HcalTopology*)&pT;
565 
566  //Simulated tracks, cleaned up by TrackingTruthAccumulator
567  edm::Handle<edm::View<TrackingParticle>> trackingParticlesHandle;
568  iEvent.getByToken(trackingParticles_, trackingParticlesHandle);
569  const edm::View<TrackingParticle>& trackingParticles = *trackingParticlesHandle;
570 
571  edm::Handle<edm::View<CaloParticle>> caloParticlesHandle;
572  iEvent.getByToken(caloParticles_, caloParticlesHandle);
573  const edm::View<CaloParticle>& caloParticles = *caloParticlesHandle;
574 
575  //Matches reco tracks to sim tracks (TrackingParticle)
576  edm::Handle<reco::RecoToSimCollection> recotosimCollection;
577  iEvent.getByToken(tracks_recotosim_, recotosimCollection);
578  const auto recotosim = *recotosimCollection;
579 
581  iEvent.getByToken(tracks_, trackHandle);
582  const edm::View<reco::Track>& tracks = *trackHandle;
583 
584  edm::Handle<std::vector<reco::GenParticle>> genParticlesHandle;
585  iEvent.getByToken(genParticles_, genParticlesHandle);
586  for (std::vector<reco::GenParticle>::const_iterator it_p = genParticlesHandle->begin();
587  it_p != genParticlesHandle->end();
588  ++it_p) {
589  gen_eta_.push_back(it_p->eta());
590  gen_phi_.push_back(it_p->phi());
591  gen_pt_.push_back(it_p->pt());
592  gen_px_.push_back(it_p->px());
593  gen_py_.push_back(it_p->py());
594  gen_pz_.push_back(it_p->pz());
595  gen_energy_.push_back(it_p->energy());
596  gen_charge_.push_back(it_p->charge());
597  gen_pdgid_.push_back(it_p->pdgId());
598  gen_status_.push_back(it_p->status());
599  std::vector<int> daughters(it_p->daughterRefVector().size(), 0);
600  for (unsigned j = 0; j < it_p->daughterRefVector().size(); ++j) {
601  daughters[j] = static_cast<int>(it_p->daughterRefVector().at(j).key());
602  }
603  gen_daughters_.push_back(daughters);
604  }
605 
606  edm::Handle<std::vector<reco::PFCandidate>> pfCandidatesHandle;
607  iEvent.getByToken(pfCandidates_, pfCandidatesHandle);
608  std::vector<reco::PFCandidate> pfCandidates = *pfCandidatesHandle;
609 
611  iEvent.getByToken(pfBlocks_, pfBlocksHandle);
612  std::vector<reco::PFBlock> pfBlocks = *pfBlocksHandle;
613 
614  //Collect all clusters, tracks and superclusters
615  const auto& all_elements_distances = processBlocks(pfBlocks);
616  const auto& all_elements = all_elements_distances.first;
617  const auto& all_distances = all_elements_distances.second;
618  assert(!all_elements.empty());
619  //assert(all_distances.size() > 0);
620  for (const auto& d : all_distances) {
621  element_distance_i_.push_back(get<0>(d));
622  element_distance_j_.push_back(get<1>(d));
623  element_distance_d_.push_back(get<2>(d));
624  }
625 
626  //We need to use the original reco::Track collection for track association
627  for (unsigned long ntrack = 0; ntrack < tracks.size(); ntrack++) {
628  edm::RefToBase<reco::Track> trackref(trackHandle, ntrack);
629  const auto vec_idx_in_all_elements = find_element_ref(all_elements, trackref);
630 
631  //track was not used by PF, we skip as well
632  if (vec_idx_in_all_elements.empty()) {
633  continue;
634  }
635 
636  if (recotosim.find(trackref) != recotosim.end()) {
637  const auto& tps = recotosim[trackref];
638  for (const auto& tp : tps) {
640  for (auto idx_in_all_elements : vec_idx_in_all_elements) {
641  trackingparticle_to_element.emplace_back(tpr.key(), idx_in_all_elements);
642  }
643  }
644  }
645  }
646 
647  processTrackingParticles(trackingParticles, trackingParticlesHandle);
648 
649  int idx_simcluster = 0;
650  //Fill genparticles from calorimeter hits
651  for (unsigned long ncaloparticle = 0; ncaloparticle < caloParticles.size(); ncaloparticle++) {
652  const auto& cp = caloParticles.at(ncaloparticle);
653  edm::RefToBase<CaloParticle> cpref(caloParticlesHandle, ncaloparticle);
654 
655  int nhits = 0;
656  for (const auto& simcluster : cp.simClusters()) {
657  //create a map of detId->energy of all the rechits in all the clusters of this SimCluster
658  map<uint64_t, double> detid_energy;
659 
660  simcluster_nhits_.push_back(nhits);
661  simcluster_eta_.push_back(simcluster->p4().eta());
662  simcluster_phi_.push_back(simcluster->p4().phi());
663  simcluster_pt_.push_back(simcluster->p4().pt());
664  simcluster_energy_.push_back(simcluster->energy());
665  simcluster_pid_.push_back(simcluster->pdgId());
666  simcluster_bx_.push_back(simcluster->eventId().bunchCrossing());
667  simcluster_ev_.push_back(simcluster->eventId().event());
668 
669  simcluster_px_.push_back(simcluster->p4().x());
670  simcluster_py_.push_back(simcluster->p4().y());
671  simcluster_pz_.push_back(simcluster->p4().z());
672 
673  for (const auto& hf : simcluster->hits_and_fractions()) {
674  DetId id(hf.first);
675 
676  if (id.det() == DetId::Hcal || id.det() == DetId::Ecal) {
677  const auto& pos = getHitPosition(id);
678  nhits += 1;
679 
680  const float x = pos.x();
681  const float y = pos.y();
682  const float z = pos.z();
683  const float eta = pos.eta();
684  const float phi = pos.phi();
685 
686  simhit_frac_.push_back(hf.second);
687  simhit_x_.push_back(x);
688  simhit_y_.push_back(y);
689  simhit_z_.push_back(z);
690  simhit_det_.push_back(id.det());
691  simhit_subdet_.push_back(id.subdetId());
692  simhit_eta_.push_back(eta);
693  simhit_phi_.push_back(phi);
694  simhit_idx_simcluster_.push_back(idx_simcluster);
695  simhit_detid_.push_back(id.rawId());
696  detid_energy[id.rawId()] += hf.second;
697  }
698  }
699 
700  int simcluster_to_trackingparticle = -1;
701  for (const auto& simtrack : simcluster->g4Tracks()) {
702  simtrack_x_.push_back(simtrack.trackerSurfacePosition().x());
703  simtrack_y_.push_back(simtrack.trackerSurfacePosition().y());
704  simtrack_z_.push_back(simtrack.trackerSurfacePosition().z());
705  simtrack_idx_simcluster_.push_back(idx_simcluster);
706  simtrack_pid_.push_back(simtrack.type());
707 
708  for (unsigned int itp = 0; itp < trackingParticles.size(); itp++) {
709  const auto& simtrack2 = trackingParticles.at(itp).g4Tracks().at(0);
710  //compare the two tracks, taking into account that both eventId and trackId need to be compared due to pileup
711  if (simtrack.eventId() == simtrack2.eventId() && simtrack.trackId() == simtrack2.trackId()) {
712  simcluster_to_trackingparticle = itp;
713  //we are satisfied with the first match, in practice there should not be more
714  break;
715  }
716  } //trackingParticles
717  } //simcluster tracks
718 
719  simcluster_detids_.push_back(detid_energy);
720  simcluster_idx_trackingparticle_.push_back(simcluster_to_trackingparticle);
721 
722  idx_simcluster += 1;
723  } //simclusters
724  } //caloParticles
725 
726  associateClusterToSimCluster(all_elements);
727 
728  //fill elements
729  for (unsigned int ielem = 0; ielem < all_elements.size(); ielem++) {
730  const auto& elem = all_elements.at(ielem);
731  const auto& orig = elem.orig;
732  reco::PFBlockElement::Type type = orig.type();
733 
734  float pt = 0.0;
735  float deltap = 0.0;
736  float sigmadeltap = 0.0;
737  float px = 0.0;
738  float py = 0.0;
739  float pz = 0.0;
740  float eta = 0.0;
741  float phi = 0.0;
742  float energy = 0.0;
743  float trajpoint = 0.0;
744  float eta_ecal = 0.0;
745  float phi_ecal = 0.0;
746  float eta_hcal = 0.0;
747  float phi_hcal = 0.0;
748  int charge = 0;
749  int layer = 0;
750  float depth = 0;
751  float muon_dt_hits = 0.0;
752  float muon_csc_hits = 0.0;
753 
755  const auto& matched_pftrack = orig.trackRefPF();
756  if (matched_pftrack.isNonnull()) {
757  const auto& atECAL = matched_pftrack->extrapolatedPoint(reco::PFTrajectoryPoint::ECALShowerMax);
758  const auto& atHCAL = matched_pftrack->extrapolatedPoint(reco::PFTrajectoryPoint::HCALEntrance);
759  if (atHCAL.isValid()) {
760  eta_hcal = atHCAL.positionREP().eta();
761  phi_hcal = atHCAL.positionREP().phi();
762  }
763  if (atECAL.isValid()) {
764  eta_ecal = atECAL.positionREP().eta();
765  phi_ecal = atECAL.positionREP().phi();
766  }
767  }
768  const auto& ref = ((const reco::PFBlockElementTrack*)&orig)->trackRef();
769  pt = ref->pt();
770  px = ref->px();
771  py = ref->py();
772  pz = ref->pz();
773  eta = ref->eta();
774  phi = ref->phi();
775  energy = ref->p();
776  charge = ref->charge();
777 
778  reco::MuonRef muonRef = orig.muonRef();
779  if (muonRef.isNonnull()) {
780  reco::TrackRef standAloneMu = muonRef->standAloneMuon();
781  if (standAloneMu.isNonnull()) {
782  muon_dt_hits = standAloneMu->hitPattern().numberOfValidMuonDTHits();
783  muon_csc_hits = standAloneMu->hitPattern().numberOfValidMuonCSCHits();
784  }
785  }
786 
787  } else if (type == reco::PFBlockElement::BREM) {
788  const auto* orig2 = (const reco::PFBlockElementBrem*)&orig;
789  const auto& ref = orig2->GsftrackRef();
790  if (ref.isNonnull()) {
791  deltap = orig2->DeltaP();
792  sigmadeltap = orig2->SigmaDeltaP();
793  pt = ref->pt();
794  px = ref->px();
795  py = ref->py();
796  pz = ref->pz();
797  eta = ref->eta();
798  phi = ref->phi();
799  energy = ref->p();
800  trajpoint = orig2->indTrajPoint();
801  charge = ref->charge();
802  }
803  } else if (type == reco::PFBlockElement::GSF) {
804  //requires to keep GsfPFRecTracks
805  const auto* orig2 = (const reco::PFBlockElementGsfTrack*)&orig;
806  const auto& vec = orig2->Pin();
807  pt = vec.pt();
808  px = vec.px();
809  py = vec.py();
810  pz = vec.pz();
811  eta = vec.eta();
812  phi = vec.phi();
813  energy = vec.energy();
814  if (!orig2->GsftrackRefPF().isNull()) {
815  charge = orig2->GsftrackRefPF()->charge();
816  }
821  const auto& ref = ((const reco::PFBlockElementCluster*)&orig)->clusterRef();
822  if (ref.isNonnull()) {
823  eta = ref->eta();
824  phi = ref->phi();
825  px = ref->position().x();
826  py = ref->position().y();
827  pz = ref->position().z();
828  energy = ref->energy();
829  layer = ref->layer();
830  depth = ref->depth();
831  }
832  } else if (type == reco::PFBlockElement::SC) {
833  const auto& clref = ((const reco::PFBlockElementSuperCluster*)&orig)->superClusterRef();
834  if (clref.isNonnull()) {
835  eta = clref->eta();
836  phi = clref->phi();
837  px = clref->position().x();
838  py = clref->position().y();
839  pz = clref->position().z();
840  energy = clref->energy();
841  }
842  }
843  vector<int> tps;
844  for (const auto& t : trackingparticle_to_element) {
845  if (t.second == (int)ielem) {
846  tps.push_back(t.first);
847  }
848  }
849  vector<int> scs;
850  for (const auto& t : simcluster_to_element) {
851  if (t.second == (int)ielem) {
852  scs.push_back(t.first);
853  }
854  }
855 
856  element_pt_.push_back(pt);
857  element_px_.push_back(px);
858  element_py_.push_back(py);
859  element_pz_.push_back(pz);
860  element_deltap_.push_back(deltap);
861  element_sigmadeltap_.push_back(sigmadeltap);
862  element_eta_.push_back(eta);
863  element_phi_.push_back(phi);
864  element_energy_.push_back(energy);
865  element_eta_ecal_.push_back(eta_ecal);
866  element_phi_ecal_.push_back(phi_ecal);
867  element_eta_hcal_.push_back(eta_hcal);
868  element_phi_hcal_.push_back(phi_hcal);
869  element_charge_.push_back(charge);
870  element_type_.push_back(type);
871  element_layer_.push_back(layer);
872  element_depth_.push_back(depth);
873  element_trajpoint_.push_back(trajpoint);
874  element_muon_dt_hits_.push_back(muon_dt_hits);
875  element_muon_csc_hits_.push_back(muon_csc_hits);
876  }
877 
878  //associate candidates to elements
879  int icandidate = 0;
880  for (const auto& cand : pfCandidates) {
881  pfcandidate_eta_.push_back(cand.eta());
882  pfcandidate_phi_.push_back(cand.phi());
883  pfcandidate_pt_.push_back(cand.pt());
884  pfcandidate_px_.push_back(cand.px());
885  pfcandidate_py_.push_back(cand.py());
886  pfcandidate_pz_.push_back(cand.pz());
887  pfcandidate_energy_.push_back(cand.energy());
888  pfcandidate_pdgid_.push_back(cand.pdgId());
889 
890  for (const auto& el : cand.elementsInBlocks()) {
891  const auto idx_block = el.first.index();
892  unsigned idx_element_in_block = el.second;
893 
894  int ielem = -1;
895  for (const auto& elem_with_index : all_elements) {
896  ielem += 1;
897  if (elem_with_index.idx_block == idx_block && elem_with_index.idx_elem == idx_element_in_block) {
898  break;
899  }
900  }
901  assert(ielem != -1);
902  element_to_candidate.push_back(make_pair(ielem, icandidate));
903  } //elements
904 
905  icandidate += 1;
906  } //pfCandidates
907 
908  ev_event_ = iEvent.id().event();
909  ev_lumi_ = iEvent.id().luminosityBlock();
910  ev_run_ = iEvent.id().run();
911 
912  t_->Fill();
913 } //analyze
914 
916  edm::Handle<edm::View<TrackingParticle>>& trackingParticlesHandle) {
917  for (unsigned long ntrackingparticle = 0; ntrackingparticle < trackingParticles.size(); ntrackingparticle++) {
918  const auto& tp = trackingParticles.at(ntrackingparticle);
919  edm::RefToBase<TrackingParticle> tpref(trackingParticlesHandle, ntrackingparticle);
920 
921  math::XYZTLorentzVectorD vtx(0, 0, 0, 0);
922 
923  if (!tp.decayVertices().empty()) {
924  vtx = tp.decayVertices().at(0)->position();
925  }
926  auto orig_vtx = tp.vertex();
927 
928  // fill branches
929  trackingparticle_eta_.push_back(tp.p4().eta());
930  trackingparticle_phi_.push_back(tp.p4().phi());
931  trackingparticle_pt_.push_back(tp.p4().pt());
932  trackingparticle_px_.push_back(tp.p4().px());
933  trackingparticle_py_.push_back(tp.p4().py());
934  trackingparticle_pz_.push_back(tp.p4().pz());
935  trackingparticle_energy_.push_back(tp.p4().energy());
936  trackingparticle_dvx_.push_back(vtx.x());
937  trackingparticle_dvy_.push_back(vtx.y());
938  trackingparticle_dvz_.push_back(vtx.z());
939  trackingparticle_bx_.push_back(tp.eventId().bunchCrossing());
940  trackingparticle_ev_.push_back(tp.eventId().event());
941 
942  trackingparticle_ovx_.push_back(orig_vtx.x());
943  trackingparticle_ovy_.push_back(orig_vtx.y());
944  trackingparticle_ovz_.push_back(orig_vtx.z());
945 
946  trackingparticle_pid_.push_back(tp.pdgId());
947  }
948 }
949 
950 //https://stackoverflow.com/questions/27086195/linear-index-upper-triangular-matrix/27088560
951 int get_index_triu_vector(int i, int j, int n) {
952  int k = (n * (n - 1) / 2) - (n - i) * ((n - i) - 1) / 2 + j - i - 1;
953  return k;
954 }
955 
956 pair<int, int> get_triu_vector_index(int k, int n) {
957  int i = n - 2 - floor(sqrt(-8 * k + 4 * n * (n - 1) - 7) / 2.0 - 0.5);
958  int j = k + i + 1 - n * (n - 1) / 2 + (n - i) * ((n - i) - 1) / 2;
959  return make_pair(i, j);
960 }
961 
962 pair<vector<ElementWithIndex>, vector<tuple<int, int, float>>> PFAnalysis::processBlocks(
963  const std::vector<reco::PFBlock>& pfBlocks) {
964  vector<ElementWithIndex> ret;
965  vector<tuple<int, int, float>> distances;
966 
967  //Collect all the elements
968  int iblock = 0;
969  for (const auto& block : pfBlocks) {
970  int ielem = 0;
971  const auto& linkdata = block.linkData();
972 
973  //create a list of global element indices with distances
974  for (const auto& link : linkdata) {
975  const auto vecidx = link.first;
976  const auto dist = link.second.distance;
977  const auto& ij = get_triu_vector_index(vecidx, block.elements().size());
978  auto globalindex_i = ij.first + ret.size();
979  auto globalindex_j = ij.second + ret.size();
980  distances.push_back(make_tuple(globalindex_i, globalindex_j, dist));
981  }
982 
983  for (const auto& elem : block.elements()) {
984  ElementWithIndex elem_index(elem, iblock, ielem);
985  ret.push_back(elem_index);
986  ielem += 1;
987  } //elements
988  iblock += 1;
989  } //blocks
990  return make_pair(ret, distances);
991 
992 } //processBlocks
993 
994 void PFAnalysis::associateClusterToSimCluster(const vector<ElementWithIndex>& all_elements) {
995  vector<map<uint64_t, double>> detids_elements;
996  map<uint64_t, double> rechits_energy_all;
997 
998  int idx_element = 0;
999  for (const auto& elem : all_elements) {
1000  map<uint64_t, double> detids;
1001  const auto& type = elem.orig.type();
1002 
1006  const auto& clref = elem.orig.clusterRef();
1007  assert(clref.isNonnull());
1008  const auto& cluster = *clref;
1009 
1010  //all rechits and the energy fractions in this cluster
1011  const vector<reco::PFRecHitFraction>& rechit_fracs = cluster.recHitFractions();
1012  for (const auto& rh : rechit_fracs) {
1013  const reco::PFRecHit pfrh = *rh.recHitRef();
1014  if (detids.find(pfrh.detId()) != detids.end()) {
1015  continue;
1016  }
1017  detids[pfrh.detId()] += pfrh.energy() * rh.fraction();
1018  const auto id = DetId(pfrh.detId());
1019  float x = 0;
1020  float y = 0;
1021  float z = 0;
1022  float eta = 0;
1023  float phi = 0;
1024 
1025  const auto& pos = getHitPosition(id);
1026  x = pos.x();
1027  y = pos.y();
1028  z = pos.z();
1029  eta = pos.eta();
1030  phi = pos.phi();
1031 
1032  rechit_x_.push_back(x);
1033  rechit_y_.push_back(y);
1034  rechit_z_.push_back(z);
1035  rechit_det_.push_back(id.det());
1036  rechit_subdet_.push_back(id.subdetId());
1037  rechit_eta_.push_back(eta);
1038  rechit_phi_.push_back(phi);
1039  rechit_e_.push_back(pfrh.energy() * rh.fraction());
1040  rechit_idx_element_.push_back(idx_element);
1041  rechit_detid_.push_back(id.rawId());
1042  rechits_energy_all[id.rawId()] += pfrh.energy() * rh.fraction();
1043  } //rechit_fracs
1044  } else if (type == reco::PFBlockElement::SC) {
1045  const auto& clref = ((const reco::PFBlockElementSuperCluster*)&(elem.orig))->superClusterRef();
1046  assert(clref.isNonnull());
1047  const auto& cluster = *clref;
1048 
1049  //all rechits and the energy fractions in this cluster
1050  const auto& rechit_fracs = cluster.hitsAndFractions();
1051  for (const auto& rh : rechit_fracs) {
1052  if (detids.find(rh.first.rawId()) != detids.end()) {
1053  continue;
1054  }
1055  detids[rh.first.rawId()] += cluster.energy() * rh.second;
1056  const auto id = rh.first;
1057  float x = 0;
1058  float y = 0;
1059  float z = 0;
1060  float eta = 0;
1061  float phi = 0;
1062 
1063  const auto& pos = getHitPosition(id);
1064  x = pos.x();
1065  y = pos.y();
1066  z = pos.z();
1067  eta = pos.eta();
1068  phi = pos.phi();
1069 
1070  rechit_x_.push_back(x);
1071  rechit_y_.push_back(y);
1072  rechit_z_.push_back(z);
1073  rechit_det_.push_back(id.det());
1074  rechit_subdet_.push_back(id.subdetId());
1075  rechit_eta_.push_back(eta);
1076  rechit_phi_.push_back(phi);
1077  rechit_e_.push_back(rh.second);
1078  rechit_idx_element_.push_back(idx_element);
1079  rechit_detid_.push_back(id.rawId());
1080  rechits_energy_all[id.rawId()] += cluster.energy() * rh.second;
1081  } //rechit_fracs
1082  }
1083  detids_elements.push_back(detids);
1084  idx_element += 1;
1085  } //all_elements
1086 
1087  //associate elements (reco clusters) to simclusters
1088  int ielement = 0;
1089  for (const auto& detids : detids_elements) {
1090  int isimcluster = 0;
1091  if (!detids.empty()) {
1092  double sum_e_tot = 0.0;
1093  for (const auto& c : detids) {
1094  sum_e_tot += c.second;
1095  }
1096 
1097  for (const auto& simcluster_detids : simcluster_detids_) {
1098  double sum_e_tot_sc = 0.0;
1099  for (const auto& c : simcluster_detids) {
1100  sum_e_tot_sc += c.second;
1101  }
1102 
1103  //get the energy of the simcluster hits that matches detids of the rechits
1104  double cmp = detid_compare(detids, simcluster_detids);
1105  if (cmp > 0) {
1106  simcluster_to_element.push_back(make_pair(isimcluster, ielement));
1107  simcluster_to_element_cmp.push_back((float)cmp);
1108  }
1109  isimcluster += 1;
1110  }
1111  } //element had rechits
1112  ielement += 1;
1113  } //rechit clusters
1114 }
1115 
1119 
1121  es.get<HcalRecNumberingRecord>().get(pHRNDC);
1122  hcons = &(*pHRNDC);
1123 
1124  aField_ = &(*magfield);
1125 }
1126 
1128 
1130 
1132 
1135  desc.setUnknown();
1136  descriptions.addDefault(desc);
1137 }
1138 
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:542
PFAnalysis::element_to_candidate
vector< pair< int, int > > element_to_candidate
Definition: PFAnalysisNtuplizer.cc:263
PFAnalysis::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: PFAnalysisNtuplizer.cc:558
ntrack
#define ntrack
PFAnalysis::pfCandidates_
edm::EDGetTokenT< std::vector< reco::PFCandidate > > pfCandidates_
Definition: PFAnalysisNtuplizer.cc:143
Ecal2004TBTDCRanges_v1_cff.endRun
endRun
Definition: Ecal2004TBTDCRanges_v1_cff.py:4
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
bk::beginJob
void beginJob()
Definition: Breakpoints.cc:14
PFAnalysis::trackingparticle_bx_
vector< int > trackingparticle_bx_
Definition: PFAnalysisNtuplizer.cc:162
reco::PFBlockElement::HO
Definition: PFBlockElement.h:42
zmumugammaAnalyzer_cfi.pfCandidates
pfCandidates
Definition: zmumugammaAnalyzer_cfi.py:11
PFAnalysis::clearVariables
void clearVariables()
Definition: PFAnalysisNtuplizer.cc:418
PFAnalysis::trackingparticle_dvx_
vector< float > trackingparticle_dvx_
Definition: PFAnalysisNtuplizer.cc:159
PFAnalysis::simcluster_phi_
vector< float > simcluster_phi_
Definition: PFAnalysisNtuplizer.cc:173
EDAnalyzer.h
PFAnalysis::element_energy_
vector< float > element_energy_
Definition: PFAnalysisNtuplizer.cc:234
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
PFAnalysis::pfcandidate_py_
vector< float > pfcandidate_py_
Definition: PFAnalysisNtuplizer.cc:255
ElementWithIndex
Definition: PFAnalysisNtuplizer.cc:68
PFAnalysis::getHitPosition
GlobalPoint getHitPosition(const DetId &id)
Definition: PFAnalysisNtuplizer.cc:540
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
PFAnalysis::gen_eta_
vector< float > gen_eta_
Definition: PFAnalysisNtuplizer.cc:214
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
PFAnalysis::trackingparticle_exy_
vector< float > trackingparticle_exy_
Definition: PFAnalysisNtuplizer.cc:168
PFAnalysis::genParticles_
edm::EDGetTokenT< std::vector< reco::GenParticle > > genParticles_
Definition: PFAnalysisNtuplizer.cc:138
PFAnalysis::simtrack_x_
vector< float > simtrack_x_
Definition: PFAnalysisNtuplizer.cc:208
PFAnalysis::trackingParticles_
edm::EDGetTokenT< edm::View< TrackingParticle > > trackingParticles_
Definition: PFAnalysisNtuplizer.cc:139
ESHandle.h
PFAnalysis::element_deltap_
vector< float > element_deltap_
Definition: PFAnalysisNtuplizer.cc:230
PFAnalysis::caloParticles_
edm::EDGetTokenT< edm::View< CaloParticle > > caloParticles_
Definition: PFAnalysisNtuplizer.cc:140
PFAnalysis::gen_pdgid_
vector< int > gen_pdgid_
Definition: PFAnalysisNtuplizer.cc:222
PFBlockElementCluster.h
reco::PFRecHit::energy
float energy() const
rechit energy
Definition: PFRecHit.h:99
PFCandidate.h
PFAnalysis::gen_px_
vector< float > gen_px_
Definition: PFAnalysisNtuplizer.cc:217
PFAnalysis::trackingparticle_py_
vector< float > trackingparticle_py_
Definition: PFAnalysisNtuplizer.cc:156
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
PFAnalysis::simhit_y_
vector< float > simhit_y_
Definition: PFAnalysisNtuplizer.cc:188
edm::Run
Definition: Run.h:45
deltaPhi.h
PFAnalysis::gen_pt_
vector< float > gen_pt_
Definition: PFAnalysisNtuplizer.cc:216
edm::EDGetTokenT
Definition: EDGetToken.h:33
PFAnalysis::element_depth_
vector< float > element_depth_
Definition: PFAnalysisNtuplizer.cc:242
PFAnalysis::trackingparticle_dvz_
vector< float > trackingparticle_dvz_
Definition: PFAnalysisNtuplizer.cc:161
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
PFAnalysis::simcluster_energy_
vector< float > simcluster_energy_
Definition: PFAnalysisNtuplizer.cc:175
PFAnalysis::pfcandidate_pt_
vector< float > pfcandidate_pt_
Definition: PFAnalysisNtuplizer.cc:253
PFAnalysis::ev_run_
edm::RunNumber_t ev_run_
Definition: PFAnalysisNtuplizer.cc:148
reco::PFBlockElementSuperCluster
Cluster Element.
Definition: PFBlockElementSuperCluster.h:15
PFAnalysis::Point
ROOT::Math::Transform3D::Point Point
Definition: PFAnalysisNtuplizer.cc:110
math::XYZTLorentzVectorD
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
pos
Definition: PixelAliasList.h:18
HcalTopology
Definition: HcalTopology.h:26
DetId::Hcal
Definition: DetId.h:28
reco::PFBlockElement::SC
Definition: PFBlockElement.h:41
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
TrackAssociation.h
PFAnalysis::simcluster_detids_
vector< std::map< uint64_t, double > > simcluster_detids_
Definition: PFAnalysisNtuplizer.cc:184
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
find_element_ref
vector< int > find_element_ref(const vector< ElementWithIndex > &vec, const edm::RefToBase< reco::Track > &r)
Definition: PFAnalysisNtuplizer.cc:77
PFAnalysis::element_px_
vector< float > element_px_
Definition: PFAnalysisNtuplizer.cc:227
BaseParticlePropagator.h
cms::cuda::assert
assert(be >=bs)
PFAnalysis::gen_status_
vector< int > gen_status_
Definition: PFAnalysisNtuplizer.cc:223
PFAnalysis::simcluster_pid_
vector< int > simcluster_pid_
Definition: PFAnalysisNtuplizer.cc:181
PFAnalysis::trackingparticle_dvy_
vector< float > trackingparticle_dvy_
Definition: PFAnalysisNtuplizer.cc:160
PFAnalysis::simhit_det_
vector< int > simhit_det_
Definition: PFAnalysisNtuplizer.cc:192
reco::PFBlockElement::HCAL
Definition: PFBlockElement.h:36
PFAnalysis::rechit_x_
vector< float > rechit_x_
Definition: PFAnalysisNtuplizer.cc:198
PFAnalysis::simhit_subdet_
vector< int > simhit_subdet_
Definition: PFAnalysisNtuplizer.cc:193
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
hgcal_conditions::parameters
Definition: HGCConditions.h:86
PFAnalysis::tracks_recotosim_
edm::EDGetTokenT< reco::RecoToSimCollection > tracks_recotosim_
Definition: PFAnalysisNtuplizer.cc:144
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
PFAnalysis::simhit_eta_
vector< float > simhit_eta_
Definition: PFAnalysisNtuplizer.cc:190
HcalBarrel
Definition: HcalAssistant.h:33
PFAnalysis::ev_event_
edm::EventNumber_t ev_event_
Definition: PFAnalysisNtuplizer.cc:150
PFAnalysis::topologyToken_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topologyToken_
Definition: PFAnalysisNtuplizer.cc:269
PFBlockElementBrem.h
edm::Handle
Definition: AssociativeIterator.h:50
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
PFAnalysis::element_distance_i_
vector< int > element_distance_i_
Definition: PFAnalysisNtuplizer.cc:247
MLPFModel.h
PFAnalysis::trackingparticle_exx_
vector< float > trackingparticle_exx_
Definition: PFAnalysisNtuplizer.cc:167
PFAnalysis::element_muon_csc_hits_
vector< float > element_muon_csc_hits_
Definition: PFAnalysisNtuplizer.cc:245
EcalBarrel
Definition: EcalSubdetector.h:10
PFAnalysis::hcons
const HcalDDDRecConstants * hcons
Definition: PFAnalysisNtuplizer.cc:273
HcalGeometry.h
PFAnalysis::simcluster_pz_
vector< float > simcluster_pz_
Definition: PFAnalysisNtuplizer.cc:178
edm::Ref
Definition: AssociativeIterator.h:58
PFAnalysis::trackingparticle_pid_
vector< int > trackingparticle_pid_
Definition: PFAnalysisNtuplizer.cc:170
reco::PFBlockElement::Type
Type
Definition: PFBlockElement.h:30
ElementWithIndex::idx_elem
size_t idx_elem
Definition: PFAnalysisNtuplizer.cc:72
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
PFAnalysis::rechit_idx_element_
vector< int > rechit_idx_element_
Definition: PFAnalysisNtuplizer.cc:205
DetId
Definition: DetId.h:17
PFAnalysis::trackingparticle_px_
vector< float > trackingparticle_px_
Definition: PFAnalysisNtuplizer.cc:155
PFAnalysis::trackingparticle_ev_
vector< int > trackingparticle_ev_
Definition: PFAnalysisNtuplizer.cc:163
MakerMacros.h
Point
math::XYZPoint Point
Definition: TrackerDpgAnalysis.cc:106
CaloGeometry
Definition: CaloGeometry.h:21
PlaneBuilder.h
PFAnalysis::element_charge_
vector< int > element_charge_
Definition: PFAnalysisNtuplizer.cc:239
SimCluster.h
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
Track.h
PFAnalysis::pfcandidate_pz_
vector< float > pfcandidate_pz_
Definition: PFAnalysisNtuplizer.cc:256
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
PFAnalysis::element_type_
vector< int > element_type_
Definition: PFAnalysisNtuplizer.cc:240
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HFRecHit.h
PFAnalysis::ev_lumi_
edm::LuminosityBlockNumber_t ev_lumi_
Definition: PFAnalysisNtuplizer.cc:149
BPhysicsValidation_cfi.daughters
daughters
Definition: BPhysicsValidation_cfi.py:11
PFAnalysis::rechit_z_
vector< float > rechit_z_
Definition: PFAnalysisNtuplizer.cc:200
PFAnalysis::simtrack_z_
vector< float > simtrack_z_
Definition: PFAnalysisNtuplizer.cc:210
PFAnalysis::processTrackingParticles
void processTrackingParticles(const edm::View< TrackingParticle > &trackingParticles, edm::Handle< edm::View< TrackingParticle >> &trackingParticlesHandle)
Definition: PFAnalysisNtuplizer.cc:915
PFAnalysis::simhit_frac_
vector< float > simhit_frac_
Definition: PFAnalysisNtuplizer.cc:186
reco::PFBlockElement::TRACK
Definition: PFBlockElement.h:32
Service.h
PVValHelper::eta
Definition: PVValidationHelpers.h:70
PFAnalysis::trackingparticle_pz_
vector< float > trackingparticle_pz_
Definition: PFAnalysisNtuplizer.cc:157
PVValHelper::pT
Definition: PVValidationHelpers.h:71
PFAnalysis::simtrack_pid_
vector< int > simtrack_pid_
Definition: PFAnalysisNtuplizer.cc:212
get_index_triu_vector
int get_index_triu_vector(int i, int j, int n)
Definition: PFAnalysisNtuplizer.cc:951
ElementWithIndex::idx_block
size_t idx_block
Definition: PFAnalysisNtuplizer.cc:71
PFAnalysis::simtrack_y_
vector< float > simtrack_y_
Definition: PFAnalysisNtuplizer.cc:209
reco::PFTrajectoryPoint::ECALShowerMax
Definition: PFTrajectoryPoint.h:46
caloTruthCellsProducer_cfi.caloParticles
caloParticles
Definition: caloTruthCellsProducer_cfi.py:6
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
PFAnalysis::simcluster_idx_trackingparticle_
vector< int > simcluster_idx_trackingparticle_
Definition: PFAnalysisNtuplizer.cc:182
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
PFAnalysis::element_phi_hcal_
vector< float > element_phi_hcal_
Definition: PFAnalysisNtuplizer.cc:238
IdealMagneticFieldRecord.h
edm::ESHandle< MagneticField >
PFCluster.h
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
CaloClusterFwd.h
HcalOuter
Definition: HcalAssistant.h:35
PFAnalysis::simcluster_ev_
vector< int > simcluster_ev_
Definition: PFAnalysisNtuplizer.cc:180
reco::PFBlockElementBrem
Track Element.
Definition: PFBlockElementBrem.h:17
PFAnalysis::simhit_detid_
vector< uint64_t > simhit_detid_
Definition: PFAnalysisNtuplizer.cc:195
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
PFAnalysis::~PFAnalysis
~PFAnalysis() override
Definition: PFAnalysisNtuplizer.cc:416
HI_PhotonSkim_cff.rechits
rechits
Definition: HI_PhotonSkim_cff.py:76
get_triu_vector_index
pair< int, int > get_triu_vector_index(int k, int n)
Definition: PFAnalysisNtuplizer.cc:956
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
dqmdumpme.k
k
Definition: dqmdumpme.py:60
PFAnalysis::rechit_detid_
vector< uint64_t > rechit_detid_
Definition: PFAnalysisNtuplizer.cc:206
PFAnalysis::beginJob
void beginJob() override
Definition: PFAnalysisNtuplizer.cc:1129
PFAnalysis::trackingparticle_to_element
vector< pair< int, int > > trackingparticle_to_element
Definition: PFAnalysisNtuplizer.cc:260
Point3DBase< float, GlobalTag >
GsfElectron.h
nhits
Definition: HIMultiTrackSelector.h:42
PFAnalysis::trackingparticle_ovx_
vector< float > trackingparticle_ovx_
Definition: PFAnalysisNtuplizer.cc:164
PFAnalysis::endRun
void endRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: PFAnalysisNtuplizer.cc:1127
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
PFAnalysis::gen_phi_
vector< float > gen_phi_
Definition: PFAnalysisNtuplizer.cc:215
PFAnalysis::simcluster_to_element
vector< pair< int, int > > simcluster_to_element
Definition: PFAnalysisNtuplizer.cc:261
PFAnalysis::simcluster_pt_
vector< float > simcluster_pt_
Definition: PFAnalysisNtuplizer.cc:174
CaloGeometryRecord.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
Vertex.h
PFAnalysis::pfcandidate_pdgid_
vector< int > pfcandidate_pdgid_
Definition: PFAnalysisNtuplizer.cc:258
EcalSubdetector.h
EcalEndcap
Definition: EcalSubdetector.h:10
PFAnalysis::pfcandidate_energy_
vector< float > pfcandidate_energy_
Definition: PFAnalysisNtuplizer.cc:257
TFileService.h
PFAnalysis::simcluster_nhits_
vector< int > simcluster_nhits_
Definition: PFAnalysisNtuplizer.cc:183
PFAnalysis::rechit_subdet_
vector< float > rechit_subdet_
Definition: PFAnalysisNtuplizer.cc:202
PFAnalysis::simhit_phi_
vector< float > simhit_phi_
Definition: PFAnalysisNtuplizer.cc:191
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
edm::View
Definition: CaloClusterFwd.h:14
PFAnalysis::simcluster_px_
vector< float > simcluster_px_
Definition: PFAnalysisNtuplizer.cc:176
PFAnalysis::associateClusterToSimCluster
void associateClusterToSimCluster(const vector< ElementWithIndex > &all_elements)
Definition: PFAnalysisNtuplizer.cc:994
CaloSubdetectorGeometry.h
PFAnalysis::element_eta_hcal_
vector< float > element_eta_hcal_
Definition: PFAnalysisNtuplizer.cc:237
HLTBitAnalyser_cfi.simhits
simhits
SIM objects.
Definition: HLTBitAnalyser_cfi.py:21
PFAnalysis::element_muon_dt_hits_
vector< float > element_muon_dt_hits_
Definition: PFAnalysisNtuplizer.cc:244
edm::ParameterSet
Definition: ParameterSet.h:47
reco::PFBlockElement::HFEM
Definition: PFBlockElement.h:39
PFAnalysis::element_phi_
vector< float > element_phi_
Definition: PFAnalysisNtuplizer.cc:233
reco::PFBlockElement::GSF
Definition: PFBlockElement.h:37
Event.h
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
PFAnalysis::rechit_e_
vector< float > rechit_e_
Definition: PFAnalysisNtuplizer.cc:197
CaloSubdetectorGeometry::present
virtual bool present(const DetId &id) const
is this detid present in the geometry?
Definition: CaloSubdetectorGeometry.cc:40
PFAnalysis::element_phi_ecal_
vector< float > element_phi_ecal_
Definition: PFAnalysisNtuplizer.cc:236
PFAnalysis::gen_py_
vector< float > gen_py_
Definition: PFAnalysisNtuplizer.cc:218
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
PFAnalysis::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PFAnalysisNtuplizer.cc:1133
HcalDetId.h
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
PFAnalysis::processBlocks
pair< vector< ElementWithIndex >, vector< tuple< int, int, float > > > processBlocks(const std::vector< reco::PFBlock > &pfBlocks)
Definition: PFAnalysisNtuplizer.cc:962
CaloParticle.h
muonClassificationByHits_cfi.trackingParticles
trackingParticles
Definition: muonClassificationByHits_cfi.py:28
PFAnalysis::simcluster_to_element_cmp
vector< float > simcluster_to_element_cmp
Definition: PFAnalysisNtuplizer.cc:262
PFAnalysis::rechit_eta_
vector< float > rechit_eta_
Definition: PFAnalysisNtuplizer.cc:203
HcalHitRelabeller.h
PFAnalysis::beginRun
void beginRun(edm::Run const &iEvent, edm::EventSetup const &) override
Definition: PFAnalysisNtuplizer.cc:1116
reco::PFBlockElement::ECAL
Definition: PFBlockElement.h:35
reco::PFTrajectoryPoint::HCALEntrance
HCAL front face.
Definition: PFTrajectoryPoint.h:48
cand
Definition: decayParser.h:32
edm::Service< TFileService >
reco::PFBlockElement::BREM
Definition: PFBlockElement.h:38
PFAnalysis::element_trajpoint_
vector< float > element_trajpoint_
Definition: PFAnalysisNtuplizer.cc:243
iEvent
int iEvent
Definition: GenABIO.cc:224
PFBlockElementSuperCluster.h
PFAnalysis::element_distance_j_
vector< int > element_distance_j_
Definition: PFAnalysisNtuplizer.cc:248
GsfTrack.h
PFAnalysis::simhit_idx_simcluster_
vector< int > simhit_idx_simcluster_
Definition: PFAnalysisNtuplizer.cc:194
PFAnalysis::gen_energy_
vector< float > gen_energy_
Definition: PFAnalysisNtuplizer.cc:220
PFAnalysis::simtrack_idx_simcluster_
vector< int > simtrack_idx_simcluster_
Definition: PFAnalysisNtuplizer.cc:211
PFAnalysis::element_distance_d_
vector< float > element_distance_d_
Definition: PFAnalysisNtuplizer.cc:249
analyze
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
MagneticField.h
PFAnalysis::gen_pz_
vector< float > gen_pz_
Definition: PFAnalysisNtuplizer.cc:219
CaloSubdetectorGeometry::getGeometry
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: CaloSubdetectorGeometry.cc:36
edm::EventSetup
Definition: EventSetup.h:58
reco::PFBlockElement::HFHAD
Definition: PFBlockElement.h:40
PFAnalysis::pfcandidate_px_
vector< float > pfcandidate_px_
Definition: PFAnalysisNtuplizer.cc:254
DetId::Ecal
Definition: DetId.h:27
get
#define get
PFAnalysis::element_sigmadeltap_
vector< float > element_sigmadeltap_
Definition: PFAnalysisNtuplizer.cc:231
PFAnalysis::element_eta_
vector< float > element_eta_
Definition: PFAnalysisNtuplizer.cc:232
PFAnalysis::simcluster_py_
vector< float > simcluster_py_
Definition: PFAnalysisNtuplizer.cc:177
edm::ESGetToken< CaloGeometry, CaloGeometryRecord >
detid_compare
double detid_compare(const map< uint64_t, double > &rechits, const map< uint64_t, double > &simhits)
Definition: PFAnalysisNtuplizer.cc:93
PFAnalysis::simcluster_bx_
vector< int > simcluster_bx_
Definition: PFAnalysisNtuplizer.cc:179
reco::PFBlockElement
Abstract base class for a PFBlock element (track, cluster...)
Definition: PFBlockElement.h:26
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
alignCSCRings.r
r
Definition: alignCSCRings.py:93
reco::PFRecHit::detId
unsigned detId() const
rechit detId
Definition: PFRecHit.h:93
PFBlock.h
HcalForward
Definition: HcalAssistant.h:36
MagVolumeOutsideValidity.h
PFAnalysis::element_pz_
vector< float > element_pz_
Definition: PFAnalysisNtuplizer.cc:229
EcalPreshower
Definition: EcalSubdetector.h:10
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
TrackingParticle.h
CaloCellGeometry.h
reco::PFBlockElementGsfTrack
Track Element.
Definition: PFBlockElementGsfTrack.h:18
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
std
Definition: JetResolutionObject.h:76
PFAnalysis::simcluster_eta_
vector< float > simcluster_eta_
Definition: PFAnalysisNtuplizer.cc:172
PFAnalysis::trackingparticle_phi_
vector< float > trackingparticle_phi_
Definition: PFAnalysisNtuplizer.cc:153
PFAnalysis::element_pt_
vector< float > element_pt_
Definition: PFAnalysisNtuplizer.cc:226
PFAnalysis::element_py_
vector< float > element_py_
Definition: PFAnalysisNtuplizer.cc:228
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
PFAnalysis::simhit_z_
vector< float > simhit_z_
Definition: PFAnalysisNtuplizer.cc:189
ElementWithIndex::ElementWithIndex
ElementWithIndex(const reco::PFBlockElement &_orig, size_t _idx_block, size_t _idx_elem)
Definition: PFAnalysisNtuplizer.cc:73
PFAnalysis::PFAnalysis
PFAnalysis()
Definition: PFAnalysisNtuplizer.cc:278
HcalEndcap
Definition: HcalAssistant.h:34
fileCollector.cmp
cmp
Definition: fileCollector.py:125
DetId.h
Frameworkfwd.h
PFAnalysis::trackingparticle_ovz_
vector< float > trackingparticle_ovz_
Definition: PFAnalysisNtuplizer.cc:166
PFAnalysis::gen_charge_
vector< int > gen_charge_
Definition: PFAnalysisNtuplizer.cc:221
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
reco::PFBlockElementCluster
Cluster Element.
Definition: PFBlockElementCluster.h:16
CaloGeometry.h
PFAnalysis::saveHits
bool saveHits
Definition: PFAnalysisNtuplizer.cc:275
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
PFAnalysis::endJob
void endJob() override
Definition: PFAnalysisNtuplizer.cc:1131
reco::PFBlockElementTrack
Track Element.
Definition: PFBlockElementTrack.h:17
PFAnalysis::aField_
MagneticField const * aField_
Definition: PFAnalysisNtuplizer.cc:266
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
edm::RefToBase< reco::Track >
HcalRecHitCollections.h
PFAnalysis::trackingparticle_eta_
vector< float > trackingparticle_eta_
Definition: PFAnalysisNtuplizer.cc:152
PFAnalysis::element_layer_
vector< int > element_layer_
Definition: PFAnalysisNtuplizer.cc:241
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
reco::PFRecHit
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition: PFRecHit.h:31
PFAnalysis::hcal_topo
HcalTopology * hcal_topo
Definition: PFAnalysisNtuplizer.cc:272
edm::Ref::key
key_type key() const
Accessor for product key.
Definition: Ref.h:250
PFAnalysis::geom
CaloGeometry * geom
Definition: PFAnalysisNtuplizer.cc:271
ztail.d
d
Definition: ztail.py:151
PFAnalysis::geometryToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
Definition: PFAnalysisNtuplizer.cc:268
ElementWithIndex::orig
const reco::PFBlockElement & orig
Definition: PFAnalysisNtuplizer.cc:70
reco::PFBlockElement::PS1
Definition: PFBlockElement.h:33
PFAnalysis::pfBlocks_
edm::EDGetTokenT< std::vector< reco::PFBlock > > pfBlocks_
Definition: PFAnalysisNtuplizer.cc:142
PFAnalysis::pfcandidate_phi_
vector< float > pfcandidate_phi_
Definition: PFAnalysisNtuplizer.cc:252
ParameterSet.h
HepMCProduct.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
PFAnalysis::gen_daughters_
vector< vector< int > > gen_daughters_
Definition: PFAnalysisNtuplizer.cc:224
edm::Event
Definition: Event.h:73
PFAnalysis::pfcandidate_eta_
vector< float > pfcandidate_eta_
Definition: PFAnalysisNtuplizer.cc:251
PFAnalysis::trackingparticle_pt_
vector< float > trackingparticle_pt_
Definition: PFAnalysisNtuplizer.cc:154
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
MagneticField
Definition: MagneticField.h:19
PFAnalysis::trackingparticle_energy_
vector< float > trackingparticle_energy_
Definition: PFAnalysisNtuplizer.cc:158
PFAnalysis
Definition: PFAnalysisNtuplizer.cc:108
volumeBasedMagneticField_160812_cfi.magfield
magfield
Definition: volumeBasedMagneticField_160812_cfi.py:11
PFBlockElementGsfTrack.h
PFAnalysis::element_eta_ecal_
vector< float > element_eta_ecal_
Definition: PFAnalysisNtuplizer.cc:235
edm::InputTag
Definition: InputTag.h:15
PFAnalysis::rechit_det_
vector< float > rechit_det_
Definition: PFAnalysisNtuplizer.cc:201
PFBlockElementTrack.h
PFAnalysis::t_
TTree * t_
Definition: PFAnalysisNtuplizer.cc:146
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
reco::PFBlockElement::PS2
Definition: PFBlockElement.h:34
PFAnalysis::trackingparticle_mother_
vector< int > trackingparticle_mother_
Definition: PFAnalysisNtuplizer.cc:169
PFAnalysis::rechit_y_
vector< float > rechit_y_
Definition: PFAnalysisNtuplizer.cc:199
PFAnalysis::tracks_
edm::EDGetTokenT< edm::View< reco::Track > > tracks_
Definition: PFAnalysisNtuplizer.cc:141
PFAnalysis::trackingparticle_ovy_
vector< float > trackingparticle_ovy_
Definition: PFAnalysisNtuplizer.cc:165
PFAnalysis::rechit_phi_
vector< float > rechit_phi_
Definition: PFAnalysisNtuplizer.cc:204
PFAnalysis::simhit_x_
vector< float > simhit_x_
Definition: PFAnalysisNtuplizer.cc:187