CMS 3D CMS Logo

L1AnalysisRecoCluster.cc
Go to the documentation of this file.
4 
6 
8 
9 void L1Analysis::L1AnalysisRecoCluster::Set(const reco::CaloClusterCollection& caloClusters, unsigned maxCl) {
10  recoCluster_.nClusters = recoCluster_.eta.size();
11  for (reco::CaloClusterCollection::const_iterator it = caloClusters.begin();
12  it != caloClusters.end() && recoCluster_.nClusters < maxCl;
13  it++) {
14  recoCluster_.eta.push_back(it->eta());
15  recoCluster_.phi.push_back(it->phi());
16  recoCluster_.et.push_back(it->energy() * sin(it->position().theta()));
17  recoCluster_.e.push_back(it->energy());
18  recoCluster_.nClusters++;
19  }
20 }
21 
23  recoCluster_.nClusters = recoCluster_.eta.size();
24 
25  for (reco::SuperClusterCollection::const_iterator it = superClusters.begin();
26  it != superClusters.end() && recoCluster_.nClusters < maxCl;
27  it++) {
28  recoCluster_.eta.push_back(it->eta());
29  recoCluster_.phi.push_back(it->phi());
30  recoCluster_.et.push_back(it->energy() * sin(it->position().theta()));
31  recoCluster_.e.push_back(it->energy());
32  recoCluster_.nClusters++;
33  }
34 }
Handle.h
L1Analysis::L1AnalysisRecoCluster::L1AnalysisRecoCluster
L1AnalysisRecoCluster()
Definition: L1AnalysisRecoCluster.cc:5
HLT_FULL_cff.superClusters
superClusters
Definition: HLT_FULL_cff.py:15175
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
reco::SuperClusterCollection
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
Definition: SuperClusterFwd.h:9
reco::CaloClusterCollection
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
Definition: CaloClusterFwd.h:19
L1Analysis::L1AnalysisRecoCluster::~L1AnalysisRecoCluster
~L1AnalysisRecoCluster()
Definition: L1AnalysisRecoCluster.cc:7
SuperCluster.h
L1Analysis::L1AnalysisRecoCluster::Set
void Set(const reco::CaloClusterCollection &caloClusterCollection, unsigned maxCl)
Definition: L1AnalysisRecoCluster.cc:9
L1AnalysisRecoCluster.h