CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1AnalysisRecoCluster.cc
Go to the documentation of this file.
4 
6 {
7 }
8 
9 
11 {
12 }
13 
14 void L1Analysis::L1AnalysisRecoCluster::Set(const reco::CaloClusterCollection & caloClusters, unsigned maxCl)
15 {
16  recoCluster_.nClusters=recoCluster_.eta.size();
17  for(reco::CaloClusterCollection::const_iterator it=caloClusters.begin(); it!=caloClusters.end() && recoCluster_.nClusters<maxCl; it++)
18  {
19  recoCluster_.eta.push_back( it->eta() );
20  recoCluster_.phi.push_back( it->phi() );
21  recoCluster_.et.push_back ( it->energy() * sin( it->position().theta() ) );
22  recoCluster_.e.push_back ( it->energy() );
23  recoCluster_.nClusters++;
24  }
25 
26 }
27 
28 void L1Analysis::L1AnalysisRecoCluster::Set(const reco::SuperClusterCollection & superClusters, unsigned maxCl)
29 {
30  recoCluster_.nClusters=recoCluster_.eta.size();
31 
32  for(reco::SuperClusterCollection::const_iterator it=superClusters.begin(); it!=superClusters.end() && recoCluster_.nClusters<maxCl; it++)
33  {
34  recoCluster_.eta.push_back(it->eta());
35  recoCluster_.phi.push_back(it->phi());
36  recoCluster_.et.push_back (it->energy() * sin( it->position().theta() ) );
37  recoCluster_.e.push_back (it->energy());
38  recoCluster_.nClusters++;
39  }
40 
41 }
42 
43 
44 
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