CMS 3D CMS Logo

SuperCluster.cc
Go to the documentation of this file.
3 #include <algorithm>
4 using namespace reco;
5 
8  preshowerEnergy_(0),
9  rawEnergy_(0),
10  phiWidth_(0),
11  etaWidth_(0),
12  preshowerEnergy1_(0),
13  preshowerEnergy2_(0) {}
14 
16  const math::XYZPoint& position,
17  const CaloClusterPtr& seed,
19  double Epreshower,
20  double phiWidth,
21  double etaWidth,
22  double Epreshower1,
23  double Epreshower2)
24  : CaloCluster(energy, position), rawEnergy_(0) {
25  phiWidth_ = phiWidth;
26  etaWidth_ = etaWidth;
27  seed_ = seed;
28  preshowerEnergy_ = Epreshower;
29  preshowerEnergy1_ = Epreshower1;
30  preshowerEnergy2_ = Epreshower2;
31 
32  // set references to constituent basic clusters and update list of rechits
33  for (CaloClusterPtrVector::const_iterator bcit = clusters.begin(); bcit != clusters.end(); ++bcit) {
34  clusters_.push_back((*bcit));
35 
36  // updated list of used hits
37  const std::vector<std::pair<DetId, float> >& v1 = (*bcit)->hitsAndFractions();
38  for (std::vector<std::pair<DetId, float> >::const_iterator diIt = v1.begin(); diIt != v1.end(); ++diIt) {
39  hitsAndFractions_.push_back((*diIt));
40  } // loop over rechits
41  } // loop over basic clusters
42 
43  computeRawEnergy();
44 }
45 
47  const math::XYZPoint& position,
48  const CaloClusterPtr& seed,
50  const CaloClusterPtrVector& preshowerClusters,
51  double Epreshower,
52  double phiWidth,
53  double etaWidth,
54  double Epreshower1,
55  double Epreshower2)
56  : CaloCluster(energy, position), rawEnergy_(-1.) {
57  phiWidth_ = phiWidth;
58  etaWidth_ = etaWidth;
59  seed_ = seed;
60  preshowerEnergy_ = Epreshower;
61  preshowerEnergy1_ = Epreshower1;
62  preshowerEnergy2_ = Epreshower2;
63 
64  // set references to constituent basic clusters and update list of rechits
65  for (CaloClusterPtrVector::const_iterator bcit = clusters.begin(); bcit != clusters.end(); ++bcit) {
66  clusters_.push_back((*bcit));
67 
68  // updated list of used hits
69  const std::vector<std::pair<DetId, float> >& v1 = (*bcit)->hitsAndFractions();
70  for (std::vector<std::pair<DetId, float> >::const_iterator diIt = v1.begin(); diIt != v1.end(); ++diIt) {
71  hitsAndFractions_.push_back((*diIt));
72  } // loop over rechits
73  } // loop over basic clusters
74 
75  // set references to preshower clusters
76  for (CaloClusterPtrVector::const_iterator pcit = preshowerClusters.begin(); pcit != preshowerClusters.end(); ++pcit) {
77  preshowerClusters_.push_back((*pcit));
78  }
79  computeRawEnergy();
80 }
81 
83  rawEnergy_ = 0.;
84  for (CaloClusterPtrVector::const_iterator bcItr = clustersBegin(); bcItr != clustersEnd(); bcItr++) {
85  rawEnergy_ += (*bcItr)->energy();
86  }
87 }
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:88
const_iterator end() const
Definition: PtrVector.h:146
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:91
const_iterator begin() const
Definition: PtrVector.h:144
SuperCluster()
default constructor
Definition: SuperCluster.h:25
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
fixed size matrix
static int position[264][3]
Definition: ReadPGInfo.cc:289