CMS 3D CMS Logo

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

Public Member Functions

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

Private Member Functions

void clear () final
 

Private Attributes

std::vector< std::vector< unsigned > > cl3d_clusters_
 
std::vector< float > cl3d_energy_
 
std::vector< float > cl3d_eta_
 
int cl3d_n_
 
std::vector< int > cl3d_nclu_
 
std::vector< float > cl3d_phi_
 
std::vector< float > cl3d_pt_
 
edm::EDGetToken multiclusters_token_
 

Additional Inherited Members

Detailed Description

Definition at line 10 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Constructor & Destructor Documentation

HGCalTriggerNtupleHGCMulticlusters::HGCalTriggerNtupleHGCMulticlusters ( const edm::ParameterSet conf)

Definition at line 40 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References initialize().

41 {
42 }
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
HGCalTriggerNtupleHGCMulticlusters::~HGCalTriggerNtupleHGCMulticlusters ( )
inlineoverride

Definition at line 15 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References clear(), MillePedeFileConverter_cfg::e, fill(), and initialize().

15 {};

Member Function Documentation

void HGCalTriggerNtupleHGCMulticlusters::clear ( void  )
finalprivatevirtual
void HGCalTriggerNtupleHGCMulticlusters::fill ( const edm::Event e,
const edm::EventSetup es 
)
finalvirtual

Implements HGCalTriggerNtupleBase.

Definition at line 62 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References BXVector< T >::begin(), GetRecoTauVFromDQM_MC_cff::cl, cl3d_clusters_, cl3d_energy_, cl3d_eta_, cl3d_n_, cl3d_nclu_, cl3d_phi_, cl3d_pt_, clear(), BXVector< T >::end(), geometry, edm::EventSetup::get(), edm::Event::getByToken(), multiclusters_token_, and create_public_lumi_plots::transform.

Referenced by initialize(), and ~HGCalTriggerNtupleHGCMulticlusters().

63 {
64 
65  // retrieve clusters 3D
67  e.getByToken(multiclusters_token_, multiclusters_h);
68  const l1t::HGCalMulticlusterBxCollection& multiclusters = *multiclusters_h;
69 
70  // retrieve geometry
72  es.get<CaloGeometryRecord>().get(geometry);
73 
74  clear();
75  for(auto cl3d_itr=multiclusters.begin(0); cl3d_itr!=multiclusters.end(0); cl3d_itr++)
76  {
77  cl3d_n_++;
78  // physical values
79  cl3d_pt_.emplace_back(cl3d_itr->pt());
80  cl3d_energy_.emplace_back(cl3d_itr->energy());
81  cl3d_eta_.emplace_back(cl3d_itr->eta());
82  cl3d_phi_.emplace_back(cl3d_itr->phi());
83  cl3d_nclu_.emplace_back(cl3d_itr->constituents().size());
84  // Retrieve indices of trigger cells inside cluster
85  cl3d_clusters_.emplace_back(cl3d_itr->constituents().size());
86  std::transform(cl3d_itr->constituents_begin(), cl3d_itr->constituents_end(),
87  cl3d_clusters_.back().begin(), [](const edm::Ptr<l1t::HGCalCluster>& cl){return cl.key();}
88  );
89  }
90 }
const_iterator end(int bx) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
const T & get() const
Definition: EventSetup.h:58
ESHandle< TrackerGeometry > geometry
std::vector< std::vector< unsigned > > cl3d_clusters_
const_iterator begin(int bx) const
void HGCalTriggerNtupleHGCMulticlusters::initialize ( TTree &  tree,
const edm::ParameterSet conf,
edm::ConsumesCollector &&  collector 
)
finalvirtual

Implements HGCalTriggerNtupleBase.

Definition at line 46 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References cl3d_clusters_, cl3d_energy_, cl3d_eta_, cl3d_n_, cl3d_nclu_, cl3d_phi_, cl3d_pt_, fill(), edm::ParameterSet::getParameter(), and multiclusters_token_.

Referenced by HGCalTriggerNtupleHGCMulticlusters(), and ~HGCalTriggerNtupleHGCMulticlusters().

47 {
49 
50  tree.Branch("cl3d_n", &cl3d_n_, "cl3d_n/I");
51  tree.Branch("cl3d_pt", &cl3d_pt_);
52  tree.Branch("cl3d_energy", &cl3d_energy_);
53  tree.Branch("cl3d_eta", &cl3d_eta_);
54  tree.Branch("cl3d_phi", &cl3d_phi_);
55  tree.Branch("cl3d_nclu", &cl3d_nclu_);
56  tree.Branch("cl3d_clusters", &cl3d_clusters_);
57 
58 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< std::vector< unsigned > > cl3d_clusters_
Definition: tree.py:1

Member Data Documentation

std::vector<std::vector<unsigned> > HGCalTriggerNtupleHGCMulticlusters::cl3d_clusters_
private

Definition at line 31 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

std::vector<float> HGCalTriggerNtupleHGCMulticlusters::cl3d_energy_
private

Definition at line 27 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

std::vector<float> HGCalTriggerNtupleHGCMulticlusters::cl3d_eta_
private

Definition at line 28 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

int HGCalTriggerNtupleHGCMulticlusters::cl3d_n_
private

Definition at line 25 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

std::vector<int> HGCalTriggerNtupleHGCMulticlusters::cl3d_nclu_
private

Definition at line 30 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

std::vector<float> HGCalTriggerNtupleHGCMulticlusters::cl3d_phi_
private

Definition at line 29 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

std::vector<float> HGCalTriggerNtupleHGCMulticlusters::cl3d_pt_
private

Definition at line 26 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

edm::EDGetToken HGCalTriggerNtupleHGCMulticlusters::multiclusters_token_
private

Definition at line 23 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Referenced by fill(), and initialize().