CMS 3D CMS Logo

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

Public Member Functions

virtual void fill (const edm::Event &e, const edm::EventSetup &es) override final
 
 HGCalTriggerNtupleHGCClusters (const edm::ParameterSet &conf)
 
virtual void initialize (TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) override final
 
 ~HGCalTriggerNtupleHGCClusters ()
 
- 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 > cl_energy_
 
std::vector< float > cl_eta_
 
std::vector< int > cl_layer_
 
int cl_n_
 
std::vector< int > cl_ncells_
 
std::vector< float > cl_phi_
 
std::vector< float > cl_pt_
 
edm::EDGetToken clusters_token_
 

Additional Inherited Members

Detailed Description

Definition at line 9 of file HGCalTriggerNtupleHGCClusters.cc.

Constructor & Destructor Documentation

HGCalTriggerNtupleHGCClusters::HGCalTriggerNtupleHGCClusters ( const edm::ParameterSet conf)

Definition at line 40 of file HGCalTriggerNtupleHGCClusters.cc.

References initialize().

41 {
42 }
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
HGCalTriggerNtupleHGCClusters::~HGCalTriggerNtupleHGCClusters ( )
inline

Definition at line 14 of file HGCalTriggerNtupleHGCClusters.cc.

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

14 {};

Member Function Documentation

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

Implements HGCalTriggerNtupleBase.

Definition at line 61 of file HGCalTriggerNtupleHGCClusters.cc.

References BXVector< T >::begin(), cl_energy_, cl_eta_, cl_layer_, cl_n_, cl_ncells_, cl_phi_, cl_pt_, clear(), fastPrimaryVertexProducer_cfi::clusters, clusters_token_, BXVector< T >::end(), geometry, edm::EventSetup::get(), and edm::Event::getByToken().

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

62 {
63 
64  // retrieve clusters
66  e.getByToken(clusters_token_, clusters_h);
67  const l1t::HGCalClusterBxCollection& clusters = *clusters_h;
68 
69  // retrieve geometry
71  es.get<IdealGeometryRecord>().get(geometry);
72 
73  clear();
74  for(auto cl_itr=clusters.begin(0); cl_itr!=clusters.end(0); cl_itr++)
75  {
76  cl_n_++;
77  // physical values
78  cl_pt_.emplace_back(cl_itr->pt());
79  cl_energy_.emplace_back(cl_itr->energy());
80  cl_eta_.emplace_back(cl_itr->eta());
81  cl_phi_.emplace_back(cl_itr->phi());
82  cl_layer_.emplace_back(cl_itr->layer());
83  cl_ncells_.emplace_back(cl_itr->constituents().size());
84  }
85 }
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 HGCalTriggerNtupleHGCClusters::initialize ( TTree &  tree,
const edm::ParameterSet conf,
edm::ConsumesCollector &&  collector 
)
finaloverridevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 46 of file HGCalTriggerNtupleHGCClusters.cc.

References cl_energy_, cl_eta_, cl_layer_, cl_n_, cl_ncells_, cl_phi_, cl_pt_, clusters_token_, fill(), and edm::ParameterSet::getParameter().

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

47 {
49 
50  tree.Branch("cl_n", &cl_n_, "cl_n/I");
51  tree.Branch("cl_pt", &cl_pt_);
52  tree.Branch("cl_energy", &cl_energy_);
53  tree.Branch("cl_eta", &cl_eta_);
54  tree.Branch("cl_phi", &cl_phi_);
55  tree.Branch("cl_layer", &cl_layer_);
56  tree.Branch("cl_ncells", &cl_ncells_);
57 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: tree.py:1

Member Data Documentation

std::vector<float> HGCalTriggerNtupleHGCClusters::cl_energy_
private

Definition at line 26 of file HGCalTriggerNtupleHGCClusters.cc.

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

std::vector<float> HGCalTriggerNtupleHGCClusters::cl_eta_
private

Definition at line 27 of file HGCalTriggerNtupleHGCClusters.cc.

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

std::vector<int> HGCalTriggerNtupleHGCClusters::cl_layer_
private

Definition at line 29 of file HGCalTriggerNtupleHGCClusters.cc.

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

int HGCalTriggerNtupleHGCClusters::cl_n_
private

Definition at line 24 of file HGCalTriggerNtupleHGCClusters.cc.

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

std::vector<int> HGCalTriggerNtupleHGCClusters::cl_ncells_
private

Definition at line 30 of file HGCalTriggerNtupleHGCClusters.cc.

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

std::vector<float> HGCalTriggerNtupleHGCClusters::cl_phi_
private

Definition at line 28 of file HGCalTriggerNtupleHGCClusters.cc.

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

std::vector<float> HGCalTriggerNtupleHGCClusters::cl_pt_
private

Definition at line 25 of file HGCalTriggerNtupleHGCClusters.cc.

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

edm::EDGetToken HGCalTriggerNtupleHGCClusters::clusters_token_
private

Definition at line 22 of file HGCalTriggerNtupleHGCClusters.cc.

Referenced by fill(), and initialize().