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< float > cl3d_bdteg_
 
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< int > cl3d_quality_
 
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_
 
std::unique_ptr< HGCalTriggerClusterIdentificationBaseid_
 
edm::EDGetToken multiclusters_token_
 

Additional Inherited Members

Detailed Description

Definition at line 7 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Constructor & Destructor Documentation

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

Definition at line 49 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

Definition at line 10 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

10 {};

Member Function Documentation

void HGCalTriggerNtupleHGCMulticlusters::clear ( void  )
finalprivatevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 131 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References cl3d_bdteg_, 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_quality_, cl3d_seemax_, cl3d_seetot_, cl3d_showerlength_, cl3d_sppmax_, cl3d_spptot_, cl3d_srrmax_, cl3d_srrmean_, cl3d_srrtot_, and cl3d_szz_.

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

131  {
132  cl3d_n_ = 0;
133  cl3d_id_.clear();
134  cl3d_pt_.clear();
135  cl3d_energy_.clear();
136  cl3d_eta_.clear();
137  cl3d_phi_.clear();
138  cl3d_clusters_n_.clear();
139  cl3d_clusters_id_.clear();
140  cl3d_showerlength_.clear();
141  cl3d_coreshowerlength_.clear();
142  cl3d_firstlayer_.clear();
143  cl3d_maxlayer_.clear();
144  cl3d_seetot_.clear();
145  cl3d_seemax_.clear();
146  cl3d_spptot_.clear();
147  cl3d_sppmax_.clear();
148  cl3d_szz_.clear();
149  cl3d_srrtot_.clear();
150  cl3d_srrmax_.clear();
151  cl3d_srrmean_.clear();
152  cl3d_emaxe_.clear();
153  cl3d_bdteg_.clear();
154  cl3d_quality_.clear();
155 }
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 86 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References BXVector< T >::begin(), cl3d_bdteg_, 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_quality_, 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(), id_, multiclusters_token_, and create_public_lumi_plots::transform.

Referenced by ~HGCalTriggerNtupleHGCMulticlusters().

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

Implements HGCalTriggerNtupleBase.

Definition at line 52 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References cl3d_bdteg_, 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_quality_, cl3d_seemax_, cl3d_seetot_, cl3d_showerlength_, cl3d_sppmax_, cl3d_spptot_, cl3d_srrmax_, cl3d_srrmean_, cl3d_srrtot_, cl3d_szz_, reco::get(), edm::ParameterSet::getParameter(), id_, and multiclusters_token_.

Referenced by ~HGCalTriggerNtupleHGCMulticlusters().

54  {
56  collector.consumes<l1t::HGCalMulticlusterBxCollection>(conf.getParameter<edm::InputTag>("Multiclusters"));
57  id_ = std::unique_ptr<HGCalTriggerClusterIdentificationBase>{
58  HGCalTriggerClusterIdentificationFactory::get()->create("HGCalTriggerClusterIdentificationBDT")};
59  id_->initialize(conf.getParameter<edm::ParameterSet>("EGIdentification"));
60 
61  tree.Branch("cl3d_n", &cl3d_n_, "cl3d_n/I");
62  tree.Branch("cl3d_id", &cl3d_id_);
63  tree.Branch("cl3d_pt", &cl3d_pt_);
64  tree.Branch("cl3d_energy", &cl3d_energy_);
65  tree.Branch("cl3d_eta", &cl3d_eta_);
66  tree.Branch("cl3d_phi", &cl3d_phi_);
67  tree.Branch("cl3d_clusters_n", &cl3d_clusters_n_);
68  tree.Branch("cl3d_clusters_id", &cl3d_clusters_id_);
69  tree.Branch("cl3d_showerlength", &cl3d_showerlength_);
70  tree.Branch("cl3d_coreshowerlength", &cl3d_coreshowerlength_);
71  tree.Branch("cl3d_firstlayer", &cl3d_firstlayer_);
72  tree.Branch("cl3d_maxlayer", &cl3d_maxlayer_);
73  tree.Branch("cl3d_seetot", &cl3d_seetot_);
74  tree.Branch("cl3d_seemax", &cl3d_seemax_);
75  tree.Branch("cl3d_spptot", &cl3d_spptot_);
76  tree.Branch("cl3d_sppmax", &cl3d_sppmax_);
77  tree.Branch("cl3d_szz", &cl3d_szz_);
78  tree.Branch("cl3d_srrtot", &cl3d_srrtot_);
79  tree.Branch("cl3d_srrmax", &cl3d_srrmax_);
80  tree.Branch("cl3d_srrmean", &cl3d_srrmean_);
81  tree.Branch("cl3d_emaxe", &cl3d_emaxe_);
82  tree.Branch("cl3d_bdteg", &cl3d_bdteg_);
83  tree.Branch("cl3d_quality", &cl3d_quality_);
84 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< std::vector< uint32_t > > cl3d_clusters_id_
std::unique_ptr< HGCalTriggerClusterIdentificationBase > id_
Definition: tree.py:1
T get(const Candidate &c)
Definition: component.h:55

Member Data Documentation

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

Definition at line 43 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 28 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 27 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 31 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 42 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 24 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 25 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 32 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 22 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 33 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

int HGCalTriggerNtupleHGCMulticlusters::cl3d_n_
private

Definition at line 21 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 26 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 23 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 44 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 35 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 34 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 30 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 37 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 36 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 40 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 41 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 39 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 38 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

std::unique_ptr<HGCalTriggerClusterIdentificationBase> HGCalTriggerNtupleHGCMulticlusters::id_
private

Definition at line 19 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Referenced by fill(), and initialize().

edm::EDGetToken HGCalTriggerNtupleHGCMulticlusters::multiclusters_token_
private

Definition at line 17 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Referenced by fill(), and initialize().