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< uint32_t > > cl3d_clusters_id_
 
std::vector< int > cl3d_clusters_n_
 
std::vector< int > cl3d_coreshowerlength_
 
std::vector< float > cl3d_emaxe_
 
std::vector< float > cl3d_energy_
 
std::vector< float > cl3d_eta_
 
std::vector< int > cl3d_firstlayer_
 
std::vector< uint32_t > cl3d_id_
 
std::vector< int > cl3d_maxlayer_
 
int cl3d_n_
 
std::vector< float > cl3d_phi_
 
std::vector< float > cl3d_pt_
 
std::vector< float > cl3d_seemax_
 
std::vector< float > cl3d_seetot_
 
std::vector< int > cl3d_showerlength_
 
std::vector< float > cl3d_sppmax_
 
std::vector< float > cl3d_spptot_
 
std::vector< float > cl3d_srrmax_
 
std::vector< float > cl3d_srrmean_
 
std::vector< float > cl3d_srrtot_
 
std::vector< float > cl3d_szz_
 
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 53 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References initialize().

54 {
55 }
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)
HGCalTriggerNtupleHGCMulticlusters::~HGCalTriggerNtupleHGCMulticlusters ( )
inlineoverride

Definition at line 14 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

14 {};

Member Function Documentation

void HGCalTriggerNtupleHGCMulticlusters::clear ( void  )
finalprivatevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 137 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References cl3d_clusters_id_, cl3d_clusters_n_, cl3d_coreshowerlength_, cl3d_emaxe_, cl3d_energy_, cl3d_eta_, cl3d_firstlayer_, cl3d_id_, cl3d_maxlayer_, cl3d_n_, cl3d_phi_, cl3d_pt_, cl3d_seemax_, cl3d_seetot_, cl3d_showerlength_, cl3d_sppmax_, cl3d_spptot_, cl3d_srrmax_, cl3d_srrmean_, cl3d_srrtot_, and cl3d_szz_.

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

138 {
139  cl3d_n_ = 0;
140  cl3d_id_.clear();
141  cl3d_pt_.clear();
142  cl3d_energy_.clear();
143  cl3d_eta_.clear();
144  cl3d_phi_.clear();
145  cl3d_clusters_n_.clear();
146  cl3d_clusters_id_.clear();
147  cl3d_showerlength_.clear();
148  cl3d_coreshowerlength_.clear();
149  cl3d_firstlayer_.clear();
150  cl3d_maxlayer_.clear();
151  cl3d_seetot_.clear();
152  cl3d_seemax_.clear();
153  cl3d_spptot_.clear();
154  cl3d_sppmax_.clear();
155  cl3d_szz_.clear();
156  cl3d_srrtot_.clear();
157  cl3d_srrmax_.clear();
158  cl3d_srrmean_.clear();
159  cl3d_emaxe_.clear();
160 }
std::vector< std::vector< uint32_t > > cl3d_clusters_id_
void HGCalTriggerNtupleHGCMulticlusters::fill ( const edm::Event e,
const edm::EventSetup es 
)
finalvirtual

Implements HGCalTriggerNtupleBase.

Definition at line 89 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References BXVector< T >::begin(), cl3d_clusters_id_, cl3d_clusters_n_, cl3d_coreshowerlength_, cl3d_emaxe_, cl3d_energy_, cl3d_eta_, cl3d_firstlayer_, cl3d_id_, cl3d_maxlayer_, cl3d_n_, cl3d_phi_, cl3d_pt_, cl3d_seemax_, cl3d_seetot_, cl3d_showerlength_, cl3d_sppmax_, cl3d_spptot_, cl3d_srrmax_, cl3d_srrmean_, cl3d_srrtot_, cl3d_szz_, clear(), BXVector< T >::end(), geometry, edm::EventSetup::get(), edm::Event::getByToken(), multiclusters_token_, and create_public_lumi_plots::transform.

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

90 {
91 
92  // retrieve clusters 3D
94  e.getByToken(multiclusters_token_, multiclusters_h);
95  const l1t::HGCalMulticlusterBxCollection& multiclusters = *multiclusters_h;
96 
97  // retrieve geometry
99  es.get<CaloGeometryRecord>().get(geometry);
100 
101  clear();
102  for(auto cl3d_itr=multiclusters.begin(0); cl3d_itr!=multiclusters.end(0); cl3d_itr++)
103  {
104  cl3d_n_++;
105  cl3d_id_.emplace_back(cl3d_itr->detId());
106  // physical values
107  cl3d_pt_.emplace_back(cl3d_itr->pt());
108  cl3d_energy_.emplace_back(cl3d_itr->energy());
109  cl3d_eta_.emplace_back(cl3d_itr->eta());
110  cl3d_phi_.emplace_back(cl3d_itr->phi());
111  cl3d_clusters_n_.emplace_back(cl3d_itr->constituents().size());
112  cl3d_showerlength_.emplace_back(cl3d_itr->showerLength());
113  cl3d_coreshowerlength_.emplace_back(cl3d_itr->coreShowerLength());
114  cl3d_firstlayer_.emplace_back(cl3d_itr->firstLayer());
115  cl3d_maxlayer_.emplace_back(cl3d_itr->maxLayer());
116  cl3d_seetot_.emplace_back(cl3d_itr->sigmaEtaEtaTot());
117  cl3d_seemax_.emplace_back(cl3d_itr->sigmaEtaEtaMax());
118  cl3d_spptot_.emplace_back(cl3d_itr->sigmaPhiPhiTot());
119  cl3d_sppmax_.emplace_back(cl3d_itr->sigmaPhiPhiMax());
120  cl3d_szz_.emplace_back(cl3d_itr->sigmaZZ());
121  cl3d_srrtot_.emplace_back(cl3d_itr->sigmaRRTot());
122  cl3d_srrmax_.emplace_back(cl3d_itr->sigmaRRMax());
123  cl3d_srrmean_.emplace_back(cl3d_itr->sigmaRRMean());
124  cl3d_emaxe_.emplace_back(cl3d_itr->eMax()/cl3d_itr->energy());
125 
126  // Retrieve indices of trigger cells inside cluster
127  cl3d_clusters_id_.emplace_back(cl3d_itr->constituents().size());
128  std::transform(cl3d_itr->constituents_begin(), cl3d_itr->constituents_end(),
129  cl3d_clusters_id_.back().begin(), [](const std::pair<uint32_t,edm::Ptr<l1t::HGCalCluster>>& id_cl){return id_cl.second->detId();}
130  );
131  }
132 }
const_iterator end(int bx) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
std::vector< std::vector< uint32_t > > cl3d_clusters_id_
const T & get() const
Definition: EventSetup.h:59
ESHandle< TrackerGeometry > geometry
const_iterator begin(int bx) const
void HGCalTriggerNtupleHGCMulticlusters::initialize ( TTree &  tree,
const edm::ParameterSet conf,
edm::ConsumesCollector &&  collector 
)
finalvirtual

Implements HGCalTriggerNtupleBase.

Definition at line 59 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References cl3d_clusters_id_, cl3d_clusters_n_, cl3d_coreshowerlength_, cl3d_emaxe_, cl3d_energy_, cl3d_eta_, cl3d_firstlayer_, cl3d_id_, cl3d_maxlayer_, cl3d_n_, cl3d_phi_, cl3d_pt_, cl3d_seemax_, cl3d_seetot_, cl3d_showerlength_, cl3d_sppmax_, cl3d_spptot_, cl3d_srrmax_, cl3d_srrmean_, cl3d_srrtot_, cl3d_szz_, fill(), edm::ParameterSet::getParameter(), and multiclusters_token_.

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

60 {
62 
63  tree.Branch("cl3d_n", &cl3d_n_, "cl3d_n/I");
64  tree.Branch("cl3d_id", &cl3d_id_);
65  tree.Branch("cl3d_pt", &cl3d_pt_);
66  tree.Branch("cl3d_energy", &cl3d_energy_);
67  tree.Branch("cl3d_eta", &cl3d_eta_);
68  tree.Branch("cl3d_phi", &cl3d_phi_);
69  tree.Branch("cl3d_clusters_n", &cl3d_clusters_n_);
70  tree.Branch("cl3d_clusters_id", &cl3d_clusters_id_);
71  tree.Branch("cl3d_showerlength", &cl3d_showerlength_);
72  tree.Branch("cl3d_coreshowerlength", &cl3d_coreshowerlength_);
73  tree.Branch("cl3d_firstlayer", &cl3d_firstlayer_);
74  tree.Branch("cl3d_maxlayer", &cl3d_maxlayer_);
75  tree.Branch("cl3d_seetot", &cl3d_seetot_);
76  tree.Branch("cl3d_seemax", &cl3d_seemax_);
77  tree.Branch("cl3d_spptot", &cl3d_spptot_);
78  tree.Branch("cl3d_sppmax", &cl3d_sppmax_);
79  tree.Branch("cl3d_szz", &cl3d_szz_);
80  tree.Branch("cl3d_srrtot", &cl3d_srrtot_);
81  tree.Branch("cl3d_srrmax", &cl3d_srrmax_);
82  tree.Branch("cl3d_srrmean", &cl3d_srrmean_);
83  tree.Branch("cl3d_emaxe", &cl3d_emaxe_);
84 
85 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< std::vector< uint32_t > > cl3d_clusters_id_
Definition: tree.py:1

Member Data Documentation

std::vector<std::vector<uint32_t> > HGCalTriggerNtupleHGCMulticlusters::cl3d_clusters_id_
private

Definition at line 30 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 29 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 33 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 44 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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().

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

Definition at line 34 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

std::vector<uint32_t> HGCalTriggerNtupleHGCMulticlusters::cl3d_id_
private

Definition at line 24 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 35 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

int HGCalTriggerNtupleHGCMulticlusters::cl3d_n_
private

Definition at line 23 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().

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

Definition at line 37 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 36 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 32 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 39 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 38 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 42 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 43 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 41 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 40 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

edm::EDGetToken HGCalTriggerNtupleHGCMulticlusters::multiclusters_token_
private

Definition at line 21 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Referenced by fill(), and initialize().