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

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

Private Member Functions

virtual void clear () override final
 

Private Attributes

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 9 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Constructor & Destructor Documentation

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

Definition at line 38 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References initialize().

39 {
40 }
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
HGCalTriggerNtupleHGCMulticlusters::~HGCalTriggerNtupleHGCMulticlusters ( )
inline

Definition at line 14 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

14 {};

Member Function Documentation

void HGCalTriggerNtupleHGCMulticlusters::clear ( void  )
finaloverrideprivatevirtual
void HGCalTriggerNtupleHGCMulticlusters::fill ( const edm::Event e,
const edm::EventSetup es 
)
finaloverridevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 59 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

60 {
61 
62  // retrieve clusters 3D
64  e.getByToken(multiclusters_token_, multiclusters_h);
65  const l1t::HGCalMulticlusterBxCollection& multiclusters = *multiclusters_h;
66 
67  // retrieve geometry
69  es.get<IdealGeometryRecord>().get(geometry);
70 
71  clear();
72  for(auto cl3d_itr=multiclusters.begin(0); cl3d_itr!=multiclusters.end(0); cl3d_itr++)
73  {
74  cl3d_n_++;
75  // physical values
76  cl3d_pt_.emplace_back(cl3d_itr->pt());
77  cl3d_energy_.emplace_back(cl3d_itr->energy());
78  cl3d_eta_.emplace_back(cl3d_itr->eta());
79  cl3d_phi_.emplace_back(cl3d_itr->phi());
80  cl3d_nclu_.emplace_back(cl3d_itr->constituents().size());
81  }
82 }
const_iterator end(int bx) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
const T & get() const
Definition: EventSetup.h:56
ESHandle< TrackerGeometry > geometry
const_iterator begin(int bx) const
void HGCalTriggerNtupleHGCMulticlusters::initialize ( TTree &  tree,
const edm::ParameterSet conf,
edm::ConsumesCollector &&  collector 
)
finaloverridevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 44 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

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

Member Data Documentation

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

Definition at line 26 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 27 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

int HGCalTriggerNtupleHGCMulticlusters::cl3d_n_
private

Definition at line 24 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 29 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 28 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 25 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

edm::EDGetToken HGCalTriggerNtupleHGCMulticlusters::multiclusters_token_
private

Definition at line 22 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Referenced by fill(), and initialize().