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

Constructor & Destructor Documentation

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

Definition at line 58 of file HGCalTriggerNtupleHGCMulticlusters.cc.

References initialize().

59 {
60 }
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

Implements HGCalTriggerNtupleBase.

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

149 {
150  cl3d_n_ = 0;
151  cl3d_id_.clear();
152  cl3d_pt_.clear();
153  cl3d_energy_.clear();
154  cl3d_eta_.clear();
155  cl3d_phi_.clear();
156  cl3d_clusters_n_.clear();
157  cl3d_clusters_id_.clear();
158  cl3d_showerlength_.clear();
159  cl3d_coreshowerlength_.clear();
160  cl3d_firstlayer_.clear();
161  cl3d_maxlayer_.clear();
162  cl3d_seetot_.clear();
163  cl3d_seemax_.clear();
164  cl3d_spptot_.clear();
165  cl3d_sppmax_.clear();
166  cl3d_szz_.clear();
167  cl3d_srrtot_.clear();
168  cl3d_srrmax_.clear();
169  cl3d_srrmean_.clear();
170  cl3d_emaxe_.clear();
171  cl3d_bdteg_.clear();
172  cl3d_quality_.clear();
173 }
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 98 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 initialize(), and ~HGCalTriggerNtupleHGCMulticlusters().

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

Implements HGCalTriggerNtupleBase.

Definition at line 64 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_, beamerCreator::create(), fill(), reco::get(), edm::ParameterSet::getParameter(), id_, and multiclusters_token_.

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

65 {
67  id_.reset( HGCalTriggerClusterIdentificationFactory::get()->create("HGCalTriggerClusterIdentificationBDT") );
68  id_->initialize(conf.getParameter<edm::ParameterSet>("EGIdentification"));
69 
70  tree.Branch("cl3d_n", &cl3d_n_, "cl3d_n/I");
71  tree.Branch("cl3d_id", &cl3d_id_);
72  tree.Branch("cl3d_pt", &cl3d_pt_);
73  tree.Branch("cl3d_energy", &cl3d_energy_);
74  tree.Branch("cl3d_eta", &cl3d_eta_);
75  tree.Branch("cl3d_phi", &cl3d_phi_);
76  tree.Branch("cl3d_clusters_n", &cl3d_clusters_n_);
77  tree.Branch("cl3d_clusters_id", &cl3d_clusters_id_);
78  tree.Branch("cl3d_showerlength", &cl3d_showerlength_);
79  tree.Branch("cl3d_coreshowerlength", &cl3d_coreshowerlength_);
80  tree.Branch("cl3d_firstlayer", &cl3d_firstlayer_);
81  tree.Branch("cl3d_maxlayer", &cl3d_maxlayer_);
82  tree.Branch("cl3d_seetot", &cl3d_seetot_);
83  tree.Branch("cl3d_seemax", &cl3d_seemax_);
84  tree.Branch("cl3d_spptot", &cl3d_spptot_);
85  tree.Branch("cl3d_sppmax", &cl3d_sppmax_);
86  tree.Branch("cl3d_szz", &cl3d_szz_);
87  tree.Branch("cl3d_srrtot", &cl3d_srrtot_);
88  tree.Branch("cl3d_srrmax", &cl3d_srrmax_);
89  tree.Branch("cl3d_srrmean", &cl3d_srrmean_);
90  tree.Branch("cl3d_emaxe", &cl3d_emaxe_);
91  tree.Branch("cl3d_bdteg", &cl3d_bdteg_);
92  tree.Branch("cl3d_quality", &cl3d_quality_);
93 
94 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
def create(alignables, pedeDump, additionalData, outputFile, config)
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 48 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 33 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 32 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 36 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 47 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 29 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 30 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 37 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 27 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 38 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

int HGCalTriggerNtupleHGCMulticlusters::cl3d_n_
private

Definition at line 26 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 31 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 28 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 49 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 40 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 39 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 35 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 42 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 41 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 45 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 46 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 44 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 43 of file HGCalTriggerNtupleHGCMulticlusters.cc.

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

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

Definition at line 24 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Referenced by fill(), and initialize().

edm::EDGetToken HGCalTriggerNtupleHGCMulticlusters::multiclusters_token_
private

Definition at line 22 of file HGCalTriggerNtupleHGCMulticlusters.cc.

Referenced by fill(), and initialize().