19 HBRecHitEnergyThreshold = 0.;
20 HERecHitEnergyThreshold = 0.;
21 SumEnergyThreshold = 0.;
34 float MinTimeHits[73];
36 float MaxTimeHits[73];
37 for(
unsigned int i = 0 ;
i < 73 ;
i++ )
48 switch (
id.subdet() )
51 if(
hit->energy() < HBRecHitEnergyThreshold )
continue;
54 if(
hit->energy() < HERecHitEnergyThreshold )
continue;
64 SumE[iPhi]+=
hit->energy();
68 MinTimeHits[iPhi] = time < MinTimeHits[iPhi] ? time : MinTimeHits[iPhi];
69 MaxTimeHits[iPhi] = time > MaxTimeHits[iPhi] ? time : MaxTimeHits[iPhi];
73 for(
int iPhi = 1 ; iPhi < 73 ; iPhi++ )
75 if( SumE[iPhi] >= SumEnergyThreshold && NumHits[iPhi] > NHitsThreshold )
78 PhiWedge wedge(SumE[iPhi], iPhi, NumHits[iPhi], MinTimeHits[iPhi], MaxTimeHits[iPhi]);
81 std::vector<const HBHERecHit*> Hits;
86 if(
id.iphi() != iPhi )
continue;
88 switch (
id.subdet() )
91 if(
hit->energy() < HBRecHitEnergyThreshold )
continue;
94 if(
hit->energy() < HERecHitEnergyThreshold )
continue;
99 Hits.push_back(&(*
hit));
103 float MinusToPlus = 0.;
104 float PlusToMinus = 0.;
105 for(
unsigned int i = 0 ;
i < Hits.size() ;
i++ )
108 int ieta_i = id_i.
ieta();
109 for(
unsigned int j = (
i+1) ;
j < Hits.size() ;
j++ )
112 int ieta_j = id_j.
ieta();
113 if( ieta_i > ieta_j ) PlusToMinus +=
TMath::Abs(ieta_i - ieta_j ) ;
114 else MinusToPlus +=
TMath::Abs(ieta_i - ieta_j);
117 float PlusZOriginConfidence = (PlusToMinus + MinusToPlus )? PlusToMinus / ( PlusToMinus + MinusToPlus ) : -1. ;
122 return TheHcalHaloData;
std::vector< HBHERecHit >::const_iterator const_iterator
int ieta() const
get the cell ieta
void SetPlusZOriginConfidence(float x)
reco::HcalHaloData Calculate(const CaloGeometry &TheCaloGeometry, edm::Handle< HBHERecHitCollection > &TheHBHERecHits)
bool CompareTime(const EcalRecHit *x, const EcalRecHit *y)
const std::vector< PhiWedge > & GetPhiWedges() const