CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SuperCluster.cc
Go to the documentation of this file.
1 // $Id: SuperCluster.cc,v 1.17 2011/02/17 22:42:03 argiro Exp $
4 using namespace reco;
5 
7  CaloCluster( energy, position ), preshowerEnergy_(0), rawEnergy_(0), phiWidth_(0), etaWidth_(0) {
8 }
9 
10 
11 
13  const CaloClusterPtr & seed,
14  const CaloClusterPtrVector& clusters,
15  double Epreshower, double phiWidth, double etaWidth) :
16  CaloCluster(energy,position), rawEnergy_(0)
17 {
20  seed_ = seed;
21  preshowerEnergy_ = Epreshower;
22 
23  // set references to constituent basic clusters and update list of rechits
24  for(CaloClusterPtrVector::const_iterator bcit = clusters.begin();
25  bcit != clusters.end();
26  ++bcit) {
27  clusters_.push_back( (*bcit) );
28 
29  // updated list of used hits
30  const std::vector< std::pair<DetId, float> > & v1 = (*bcit)->hitsAndFractions();
31  for( std::vector< std::pair<DetId, float> >::const_iterator diIt = v1.begin();
32  diIt != v1.end();
33  ++diIt ) {
34  hitsAndFractions_.push_back( (*diIt) );
35  } // loop over rechits
36  } // loop over basic clusters
37 
39 }
40 
41 
42 
44  const CaloClusterPtr & seed,
45  const CaloClusterPtrVector& clusters,
46  const CaloClusterPtrVector& preshowerClusters,
47  double Epreshower, double phiWidth, double etaWidth) :
48  CaloCluster(energy,position), rawEnergy_(-1.)
49 {
52  seed_ = seed;
53  preshowerEnergy_ = Epreshower;
54 
55  // set references to constituent basic clusters and update list of rechits
56  for(CaloClusterPtrVector::const_iterator bcit = clusters.begin();
57  bcit != clusters.end();
58  ++bcit) {
59  clusters_.push_back( (*bcit) );
60 
61  // updated list of used hits
62  const std::vector< std::pair<DetId, float> > & v1 = (*bcit)->hitsAndFractions();
63  for( std::vector< std::pair<DetId, float> >::const_iterator diIt = v1.begin();
64  diIt != v1.end();
65  ++diIt ) {
66  hitsAndFractions_.push_back( (*diIt) );
67  } // loop over rechits
68  } // loop over basic clusters
69 
70  // set references to preshower clusters
71  for(CaloClusterPtrVector::const_iterator pcit = preshowerClusters.begin();
72  pcit != preshowerClusters.end();
73  ++pcit) {
74  preshowerClusters_.push_back( (*pcit) );
75  }
77 }
78 
79 
80 
82 
83  rawEnergy_ = 0.;
85  bcItr != clustersEnd(); bcItr++){
86  rawEnergy_ += (*bcItr)->energy();
87  }
88 }
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:122
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:53
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:137
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:125
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:213
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
const_iterator begin() const
Definition: PtrVector.h:126
double preshowerEnergy_
used hits by detId - retrieved from BC constituents – now inherited from CaloCluster ...
Definition: SuperCluster.h:130
CaloClusterPtr seed_
reference to BasicCluster seed
Definition: SuperCluster.h:119
double etaWidth() const
Definition: SuperCluster.h:54
const_iterator end() const
Definition: PtrVector.h:131
SuperCluster()
default constructor
Definition: SuperCluster.h:26
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:65
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:62
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:68