CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
void Set(const reco::CaloClusterCollection &caloClusterCollection, unsigned maxCl)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects