CMS 3D CMS Logo

SuperCluster.cc
Go to the documentation of this file.
3 #include <algorithm>
4 using namespace reco;
5 
6 SuperCluster::SuperCluster( double energy, const math::XYZPoint& position ) :
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 {
18  phiWidth_ = phiWidth;
19  etaWidth_ = etaWidth;
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 
40  computeRawEnergy();
41 }
42 
43 
44 
45 SuperCluster::SuperCluster( double energy, const math::XYZPoint& position,
46  const CaloClusterPtr & seed,
47  const CaloClusterPtrVector& clusters,
48  const CaloClusterPtrVector& preshowerClusters,
49  double Epreshower, double phiWidth, double etaWidth, double Epreshower1, double Epreshower2) :
50  CaloCluster(energy,position), rawEnergy_(-1.)
51 {
52  phiWidth_ = phiWidth;
53  etaWidth_ = etaWidth;
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  }
80  computeRawEnergy();
81 }
82 
84 
85  rawEnergy_ = 0.;
86  for(CaloClusterPtrVector::const_iterator bcItr = clustersBegin();
87  bcItr != clustersEnd(); bcItr++){
88  rawEnergy_ += (*bcItr)->energy();
89  }
90 }
const_iterator begin() const
Definition: PtrVector.h:129
const_iterator end() const
Definition: PtrVector.h:134
SuperCluster()
default constructor
Definition: SuperCluster.h:24
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
fixed size matrix
static int position[264][3]
Definition: ReadPGInfo.cc:509