37 float MinTimeHits[361];
39 float MaxTimeHits[361];
42 for(
int i = 0 ;
i < 361 ;
i++ )
46 MinTimeHits[
i] = 9999.;
47 MaxTimeHits[
i] = -9999.;
65 cell = TheSubGeometry->getGeometry(
id);
71 int iPhi = EcalID.iphi();
76 SumE[iPhi] +=
hit->energy();
80 MinTimeHits[iPhi] = time < MinTimeHits[iPhi] ? time : MinTimeHits[iPhi];
81 MaxTimeHits[iPhi] = time > MaxTimeHits[iPhi] ? time : MaxTimeHits[iPhi];
87 for(
int iPhi = 1 ; iPhi < 361; iPhi++ )
92 PhiWedge wedge(SumE[iPhi], iPhi, NumHits[iPhi], MinTimeHits[iPhi], MaxTimeHits[iPhi]);
97 std::vector<const EcalRecHit*> Hits;
105 int Hit_iPhi = EcalID.iphi();
107 if( Hit_iPhi != iPhi )
continue;
108 Hits.push_back( &(*
hit) );
112 float MinusToPlus = 0.;
113 float PlusToMinus = 0.;
114 for(
unsigned int i = 0 ;
i < Hits.size() ;
i++ )
118 int ieta_i = EcalID_i.
ieta();
119 for(
unsigned int j = (
i+1) ;
j < Hits.size() ;
j++ )
123 int ieta_j = EcalID_j.
ieta();
124 if( ieta_i > ieta_j ) PlusToMinus += TMath::Abs(ieta_j - ieta_i );
125 else MinusToPlus += TMath::Abs(ieta_j -ieta_i) ;
129 float PlusZOriginConfidence = (PlusToMinus+MinusToPlus) ? PlusToMinus / (PlusToMinus+MinusToPlus) : -1.;
130 wedge.SetPlusZOriginConfidence(PlusZOriginConfidence);
135 std::vector<float> vShowerShapes_Roundness;
136 std::vector<float> vShowerShapes_Angle ;
137 for(reco::SuperClusterCollection::const_iterator cluster = TheSuperClusters->begin() ; cluster != TheSuperClusters->end() ; cluster++ )
139 if(
abs(cluster->eta()) <= 1.48 )
141 vector<float> shapes = EcalClusterTools::roundnessBarrelSuperClusters( *cluster, (*TheEBRecHits.
product()));
142 float roundness = shapes[0];
143 float angle = shapes[1];
149 bool BelongsToPhoton =
false;
152 for(reco::PhotonCollection::const_iterator iPhoton = ThePhotons->begin() ; iPhoton != ThePhotons->end() ; iPhoton++ )
155 if ( TheClusterRef == iPhoton->superCluster() )
157 BelongsToPhoton =
true;
164 if( BelongsToPhoton )
169 vShowerShapes_Roundness.push_back(shapes[0]);
170 vShowerShapes_Angle.push_back(shapes[1]);
174 vShowerShapes_Roundness.push_back(-1.);
175 vShowerShapes_Angle.push_back(-1.);
180 TheRoundnessFiller.
insert( TheSuperClusters, vShowerShapes_Roundness.begin(), vShowerShapes_Roundness.end() );
181 TheRoundnessFiller.fill();
184 TheAngleFiller.
insert( TheSuperClusters, vShowerShapes_Angle.begin() , vShowerShapes_Angle.end() );
185 TheAngleFiller.fill();
187 return TheEcalHaloData;
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
edm::ValueMap< float > & GetShowerShapesRoundness()
const std::vector< PhiWedge > & GetPhiWedges() const
edm::RefVector< reco::SuperClusterCollection > & GetSuperClusters()
edm::ValueMap< float > & GetShowerShapesAngle()
void insert(const H &h, I begin, I end)
std::vector< EcalRecHit >::const_iterator const_iterator
uint32_t rawId() const
get the raw id
Abs< T >::type abs(const T &t)
int ieta() const
get the crystal ieta
float EBRecHitEnergyThreshold
T const * product() const
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
bool CompareTime(const EcalRecHit *x, const EcalRecHit *y)
T angle(T x1, T y1, T z1, T x2, T y2, T z2)