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.
3 #include <algorithm>
4 using namespace reco;
5 
7  CaloCluster( energy, position ), preshowerEnergy_(0), rawEnergy_(0), phiWidth_(0), etaWidth_(0), preshowerEnergy1_(0), preshowerEnergy2_(0) {
8 }
9 
10 
11 
13  const CaloClusterPtr & seed,
15  double Epreshower, double phiWidth, double etaWidth, double Epreshower1, double Epreshower2) :
16  CaloCluster(energy,position), rawEnergy_(0)
17 {
20  seed_ = seed;
21  preshowerEnergy_ = Epreshower;
22  preshowerEnergy1_ = Epreshower1;
23  preshowerEnergy2_ = Epreshower2;
24 
25  // set references to constituent basic clusters and update list of rechits
26  for(CaloClusterPtrVector::const_iterator bcit = clusters.begin();
27  bcit != clusters.end();
28  ++bcit) {
29  clusters_.push_back( (*bcit) );
30 
31  // updated list of used hits
32  const std::vector< std::pair<DetId, float> > & v1 = (*bcit)->hitsAndFractions();
33  for( std::vector< std::pair<DetId, float> >::const_iterator diIt = v1.begin();
34  diIt != v1.end();
35  ++diIt ) {
36  hitsAndFractions_.push_back( (*diIt) );
37  } // loop over rechits
38  } // loop over basic clusters
39 
41 }
42 
43 
44 
46  const CaloClusterPtr & seed,
48  const CaloClusterPtrVector& preshowerClusters,
49  double Epreshower, double phiWidth, double etaWidth, double Epreshower1, double Epreshower2) :
50  CaloCluster(energy,position), rawEnergy_(-1.)
51 {
54  seed_ = seed;
55  preshowerEnergy_ = Epreshower;
56  preshowerEnergy1_ = Epreshower1;
57  preshowerEnergy2_ = Epreshower2;
58 
59  // set references to constituent basic clusters and update list of rechits
60  for(CaloClusterPtrVector::const_iterator bcit = clusters.begin();
61  bcit != clusters.end();
62  ++bcit) {
63  clusters_.push_back( (*bcit) );
64 
65  // updated list of used hits
66  const std::vector< std::pair<DetId, float> > & v1 = (*bcit)->hitsAndFractions();
67  for( std::vector< std::pair<DetId, float> >::const_iterator diIt = v1.begin();
68  diIt != v1.end();
69  ++diIt ) {
70  hitsAndFractions_.push_back( (*diIt) );
71  } // loop over rechits
72  } // loop over basic clusters
73 
74  // set references to preshower clusters
75  for(CaloClusterPtrVector::const_iterator pcit = preshowerClusters.begin();
76  pcit != preshowerClusters.end();
77  ++pcit) {
78  preshowerClusters_.push_back( (*pcit) );
79  }
81 }
82 
84 
85  rawEnergy_ = 0.;
87  bcItr != clustersEnd(); bcItr++){
88  rawEnergy_ += (*bcItr)->energy();
89  }
90 }
CaloClusterPtrVector clusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:147
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:55
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:141
CaloClusterPtrVector preshowerClusters_
references to BasicCluster constitunets
Definition: SuperCluster.h:150
std::vector< std::pair< DetId, float > > hitsAndFractions_
Definition: CaloCluster.h:218
const_iterator begin() const
Definition: PtrVector.h:130
double preshowerEnergy_
used hits by detId - retrieved from BC constituents – now inherited from CaloCluster ...
Definition: SuperCluster.h:155
CaloClusterPtr seed_
reference to BasicCluster seed
Definition: SuperCluster.h:144
double etaWidth() const
Definition: SuperCluster.h:56
const_iterator end() const
Definition: PtrVector.h:135
SuperCluster()
default constructor
Definition: SuperCluster.h:24
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
static int position[264][3]
Definition: ReadPGInfo.cc:509
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:75
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:78