10 std::vector<std::pair<math::XYZPoint,float> >
12 std::vector<std::pair<math::XYZPoint,float> > theFilteredEcalRecHits;
13 for (std::vector<std::pair<math::XYZPoint,float> >::const_iterator iEcalRecHit=myEcalRecHits.begin();iEcalRecHit!=myEcalRecHits.end();++iEcalRecHit) {
14 if ((*iEcalRecHit).second*fabs(
sin((*iEcalRecHit).first.theta()))>EcalRecHit_minEt)theFilteredEcalRecHits.push_back(*iEcalRecHit);
16 std::vector<std::pair<math::XYZPoint,float> > theFilteredEcalRecHitsInCone;
17 if (coneMetric==
"DR"){
19 }
else if(coneMetric==
"angle"){
21 }
else if(coneMetric==
"area"){
25 double coneAngle=fixedAreaCone(coneAxis.theta(),coneAxis.phi(),0,
coneSize,errorFlag);
26 if (errorFlag!=0)
return std::vector<std::pair<math::XYZPoint,float> >();
28 }
else return std::vector<std::pair<math::XYZPoint,float> >();
29 return theFilteredEcalRecHitsInCone;
32 std::vector<std::pair<math::XYZPoint,float> >
34 std::vector<std::pair<math::XYZPoint,float> > theFilteredEcalRecHits;
35 for (std::vector<std::pair<math::XYZPoint,float> >::const_iterator iEcalRecHit=myEcalRecHits.begin();iEcalRecHit!=myEcalRecHits.end();++iEcalRecHit) {
36 if ((*iEcalRecHit).second*fabs(
sin((*iEcalRecHit).first.theta()))>EcalRecHit_minEt)theFilteredEcalRecHits.push_back(*iEcalRecHit);
38 std::vector<std::pair<math::XYZPoint,float> > theFilteredEcalRecHitsInAnnulus;
39 if (outerconeMetric==
"DR"){
40 if (innerconeMetric==
"DR"){
42 }
else if(innerconeMetric==
"angle"){
44 }
else if(innerconeMetric==
"area"){
48 double innercone_angle=theFixedAreaSignalCone(coneAxis.theta(),coneAxis.phi(),0,innerconeSize,errorFlag);
49 if (errorFlag!=0)
return std::vector<std::pair<math::XYZPoint,float> >();
51 }
else return std::vector<std::pair<math::XYZPoint,float> >();
52 }
else if(outerconeMetric==
"angle"){
53 if (innerconeMetric==
"DR"){
55 }
else if(innerconeMetric==
"angle"){
57 }
else if(innerconeMetric==
"area"){
61 double innercone_angle=theFixedAreaSignalCone(coneAxis.theta(),coneAxis.phi(),0,innerconeSize,errorFlag);
62 if (errorFlag!=0)
return theFilteredEcalRecHitsInAnnulus;
64 }
else return std::vector<std::pair<math::XYZPoint,float> >();
65 }
else if(outerconeMetric==
"area"){
69 if (innerconeMetric==
"DR"){
71 }
else if(innerconeMetric==
"angle"){
72 double outercone_angle=theFixedAreaSignalCone(coneAxis.theta(),coneAxis.phi(),innerconeSize,outerconeSize,errorFlag);
73 if (errorFlag!=0)
return theFilteredEcalRecHitsInAnnulus;
75 }
else if(innerconeMetric==
"area"){
76 double innercone_angle=theFixedAreaSignalCone(coneAxis.theta(),coneAxis.phi(),0,innerconeSize,errorFlag);
77 if (errorFlag!=0)
return theFilteredEcalRecHitsInAnnulus;
78 double outercone_angle=theFixedAreaSignalCone(coneAxis.theta(),coneAxis.phi(),innercone_angle,outerconeSize,errorFlag);
79 if (errorFlag!=0)
return theFilteredEcalRecHitsInAnnulus;
81 }
else return std::vector<std::pair<math::XYZPoint,float> >();
83 return theFilteredEcalRecHitsInAnnulus;
86 std::vector<std::pair<math::XYZPoint,float> >
93 std::vector<std::pair<math::XYZPoint,float> >
95 const std::string outerconeMetric,
const double outerconeSize,
const double EcalRecHit_minEt)
const double AreaMetric_recoElements_maxabsEta_
Sin< T >::type sin(const T &t)
Angle< math::XYZVector, math::XYZPoint > metricAngle_
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector, math::XYZPoint >, Angle< math::XYZVector, math::XYZPoint >, std::pair< math::XYZPoint, float > > EcalRecHitsinAnnulus_innerDRouterAnglemetrics_
std::vector< std::pair< math::XYZPoint, float > > EcalRecHitsInCone(const math::XYZVector &coneAxis, const std::string coneMetric, const double coneSize, const double EcalRecHit_minEt, const std::vector< std::pair< math::XYZPoint, float > > &myEcalRecHits) const
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector, math::XYZPoint >, DeltaR< math::XYZVector, math::XYZPoint >, std::pair< math::XYZPoint, float > > EcalRecHitsinAnnulus_innerDRouterDRmetrics_
ElementsInCone< math::XYZVector, Angle< math::XYZVector, math::XYZPoint >, std::pair< math::XYZPoint, float > > EcalRecHitsinCone_Anglemetric_
DeltaR< math::XYZVector, math::XYZPoint > metricDR_
void setAcceptanceLimit(double etaMaxTrackingAcceptance)
reco::TrackRefVector Tracks_
CaloTauElementsOperators(reco::CaloTau &)
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector, math::XYZPoint >, DeltaR< math::XYZVector, math::XYZPoint >, std::pair< math::XYZPoint, float > > EcalRecHitsinAnnulus_innerAngleouterDRmetrics_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const CaloTauTagInfoRef & caloTauTagInfoRef() const
std::vector< std::pair< math::XYZPoint, float > > EcalRecHitsInAnnulus(const math::XYZVector &coneAxis, const std::string innerconeMetric, const double innerconeSize, const std::string outerconeMetric, const double outerconeSize, const double EcalRecHit_minEt, const std::vector< std::pair< math::XYZPoint, float > > &myEcalRecHits) const
ElementsInCone< math::XYZVector, DeltaR< math::XYZVector, math::XYZPoint >, std::pair< math::XYZPoint, float > > EcalRecHitsinCone_DRmetric_
std::vector< std::pair< math::XYZPoint, float > > EcalRecHits_
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector, math::XYZPoint >, Angle< math::XYZVector, math::XYZPoint >, std::pair< math::XYZPoint, float > > EcalRecHitsinAnnulus_innerAngleouterAnglemetrics_