13 double ConeSize=ConeSizeTFormula.Eval(x,y);
14 if (ConeSize<ConeSizeMin)ConeSize=ConeSizeMin;
15 if (ConeSize>ConeSizeMax)ConeSize=ConeSizeMax;
20 double ConeSize=ConeSizeTFormula.Eval(energy, transverseEnergy, jetOpeningAngle);
21 if (ConeSize<ConeSizeMin)ConeSize=ConeSizeMin;
22 if (ConeSize>ConeSizeMax)ConeSize=ConeSizeMax;
57 if ( oldSubStr == newSubStr )
return;
62 if ( oldSubStr.empty() )
return;
72 while ( (positionNextMatch = s.find(oldSubStr, positionPreviousMatch)) != string::npos ) {
73 s.replace(positionNextMatch, lengthOldSubStr, newSubStr);
74 positionPreviousMatch = positionNextMatch + lengthNewSubStr;
81 if ((**iTrack).pt()>ptTrackMin)theFilteredTracks.
push_back(*iTrack);
84 if (coneMetric==
"DR"){
86 }
else if(coneMetric==
"angle"){
88 }
else if(coneMetric==
"area"){
92 double coneAngle=fixedAreaCone(coneAxis.theta(),coneAxis.phi(),0,coneSize,errorFlag);
96 return theFilteredTracksInCone;
101 if ((**iTrack).pt()>ptTrackMin && fabs((**iTrack).dz(myPV.
position())-refpoint_Z)<=tracktorefpoint_maxDZ)theFilteredTracks.
push_back(*iTrack);
104 if (coneMetric==
"DR"){
106 }
else if(coneMetric==
"angle"){
108 }
else if(coneMetric==
"area"){
112 double coneAngle=fixedAreaCone(coneAxis.theta(),coneAxis.phi(),0,coneSize,errorFlag);
116 return theFilteredTracksInCone;
124 if (outercone_metric==
"DR"){
125 if (innercone_metric==
"DR"){
127 }
else if(innercone_metric==
"angle"){
129 }
else if(innercone_metric==
"area"){
133 double innercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),0,innercone_size,errorFlag);
137 }
else if(outercone_metric==
"angle"){
138 if (innercone_metric==
"DR"){
140 }
else if(innercone_metric==
"angle"){
142 }
else if(innercone_metric==
"area"){
146 double innercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),0,innercone_size,errorFlag);
147 if (errorFlag!=0)
return theFilteredTracksInAnnulus;
150 }
else if(outercone_metric==
"area"){
154 if (innercone_metric==
"DR"){
156 }
else if(innercone_metric==
"angle"){
157 double outercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),innercone_size,outercone_size,errorFlag);
158 if (errorFlag!=0)
return theFilteredTracksInAnnulus;
160 }
else if(innercone_metric==
"area"){
161 double innercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),0,innercone_size,errorFlag);
162 if (errorFlag!=0)
return theFilteredTracksInAnnulus;
163 double outercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),innercone_angle,outercone_size,errorFlag);
164 if (errorFlag!=0)
return theFilteredTracksInAnnulus;
168 return theFilteredTracksInAnnulus;
173 if ((**iTrack).pt()>minPt && fabs((**iTrack).dz(myPV.
position())-refpoint_Z)<=tracktorefpoint_maxDZ)theFilteredTracks.
push_back(*iTrack);
176 if (outercone_metric==
"DR"){
177 if (innercone_metric==
"DR"){
179 }
else if(innercone_metric==
"angle"){
181 }
else if(innercone_metric==
"area"){
185 double innercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),0,innercone_size,errorFlag);
189 }
else if(outercone_metric==
"angle"){
190 if (innercone_metric==
"DR"){
192 }
else if(innercone_metric==
"angle"){
194 }
else if(innercone_metric==
"area"){
198 double innercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),0,innercone_size,errorFlag);
199 if (errorFlag!=0)
return theFilteredTracksInAnnulus;
202 }
else if(outercone_metric==
"area"){
206 if (innercone_metric==
"DR"){
208 }
else if(innercone_metric==
"angle"){
209 double outercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),innercone_size,outercone_size,errorFlag);
210 if (errorFlag!=0)
return theFilteredTracksInAnnulus;
212 }
else if(innercone_metric==
"area"){
213 double innercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),0,innercone_size,errorFlag);
214 if (errorFlag!=0)
return theFilteredTracksInAnnulus;
215 double outercone_angle=theFixedAreaSignalCone(myVector.theta(),myVector.phi(),innercone_angle,outercone_size,errorFlag);
216 if (errorFlag!=0)
return theFilteredTracksInAnnulus;
220 return theFilteredTracksInAnnulus;
229 if ((
int)matchingConeTracks.
size()==0)
return TrackRef();
231 double leadingTrackPt=0.;
233 if ((*track)->pt()>ptTrackMin && (*track)->pt()>leadingTrackPt){
234 leadingTrack=(*track);
235 leadingTrackPt=leadingTrack->pt();
242 if ((
unsigned int)
IsolTracks_.
size()>isolationAnnulus_Tracksmaxn)
return 0.;
246 string matchingConeMetric,
double matchingConeSize,
double ptLeadingTrackMin,
double ptOtherTracksMin,
247 string signalConeMetric,
double signalConeSize,
string isolationConeMetric,
double isolationConeSize,
248 unsigned int isolationAnnulus_Tracksmaxn)
const{
249 const TrackRef leadingTrack=
leadTk(jetAxis,matchingConeMetric,matchingConeSize,ptLeadingTrackMin);
250 if(!leadingTrack)
return 0.;
252 TrackRefVector isolationAnnulusTracks=
tracksInAnnulus(coneAxis,signalConeMetric,signalConeSize,isolationConeMetric,isolationConeSize,ptOtherTracksMin);
253 if ((
unsigned int)isolationAnnulusTracks.
size()>isolationAnnulus_Tracksmaxn)
return 0.;
257 string signalConeMetric,
double signalConeSize,
string isolationConeMetric,
double isolationConeSize,
258 unsigned int isolationAnnulus_Tracksmaxn)
const{
259 return discriminatorByIsolTracksN(
BaseTau_.
momentum(),matchingConeMetric,matchingConeSize,ptLeadingTrackMin,ptOtherTracksMin,signalConeMetric,signalConeSize,isolationConeMetric,isolationConeSize,isolationAnnulus_Tracksmaxn);
double computeConeSize(const TFormula &ConeSizeTFormula, double ConeSizeMin, double ConeSizeMax)
virtual double energy() const GCC11_FINAL
energy
virtual double et() const GCC11_FINAL
transverse energy
double AreaMetric_recoElements_maxabsEta_
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector >, Angle< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerDRouterAnglemetrics_
virtual const reco::TrackRefVector & isolationTracks() const
const reco::TrackRef leadTk(std::string matchingConeMetric, double matchingConeSize, double ptTrackMin) const
double discriminatorByIsolTracksN(unsigned int isolationAnnulus_Tracksmaxn) const
const_iterator end() const
Termination of iteration.
DeltaR< math::XYZVector > metricDR_
edm::RefVector< TrackCollection > TrackRefVector
vector of reference to Track in the same collection
const Point & position() const
position
const_iterator begin() const
Initialize an iterator over the RefVector.
const reco::TrackRefVector tracksInCone(const math::XYZVector &coneAxis, const std::string coneMetric, const double coneSize, const double ptTrackMin) const
reco::TrackRefVector IsolTracks_
ElementsInCone< math::XYZVector, DeltaR< math::XYZVector >, reco::TrackCollection > TracksinCone_DRmetric_
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector >, Angle< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerAngleouterAnglemetrics_
void setAcceptanceLimit(double etaMaxTrackingAcceptance)
reco::TrackRefVector Tracks_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
virtual Vector momentum() const GCC11_FINAL
spatial momentum vector
Angle< math::XYZVector > metricAngle_
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector >, DeltaR< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerDRouterDRmetrics_
void replaceSubStr(std::string &s, const std::string &oldSubStr, const std::string &newSubStr)
const reco::TrackRefVector tracksInAnnulus(const math::XYZVector &coneAxis, const std::string innerconeMetric, const double innerconeSize, const std::string outerconeMetric, const double outerconeSize, const double ptTrackMin) const
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector >, DeltaR< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerAngleouterDRmetrics_
ElementsInCone< math::XYZVector, Angle< math::XYZVector >, reco::TrackCollection > TracksinCone_Anglemetric_