2 #include <boost/regex.hpp>
16 cluster_jet_matching_cone = 0.4;
17 cluster_track_matching_cone = 0.08;
25 matching_cone = parameters.
getParameter<
double>(
"MatchingCone");
26 leading_trk_pt = parameters.
getParameter<
double>(
"LeadingTrackPt");
27 signal_cone = parameters.
getParameter<
double>(
"SignalCone");
28 cluster_jet_matching_cone = parameters.
getParameter<
double>(
"ClusterSelectionCone");
29 cluster_track_matching_cone = parameters.
getParameter<
double>(
"ClusterTrackMatchingCone");
30 inv_mass_cut = parameters.
getParameter<
double>(
"InvariantMassCutoff");
35 trackAssociatorParameters_.loadParameters( tk_ass_pset );
38 trackAssociator_->useDefaultPropagator();
44 if(trackAssociator_)
delete trackAssociator_;
51 const reco::IsolatedTauTagInfoRef& tauRef,
58 double discriminator = tauRef->discriminator();
59 if (discriminator > 0.0) {
62 for (
size_t ic = 0; ic < clus_handle->size(); ic++) {
63 math::XYZVector cluster3Vec((*clus_handle)[ic].
x(),(*clus_handle)[ic].
y(),(*clus_handle)[ic].
z());
65 float et = (*clus_handle)[ic].energy() *
sin(cluster3Vec.theta());
66 if ( (et < 0.04) || (et > 300.0) )
continue;
67 float delR = getMinimumClusterDR(theEvent, theEventSetup, tauRef, cluster3Vec);
73 if (0)
cout <<
" Total Number of Clusters " << clus_handle->size() <<
" " << nSel << endl;
78 cluster_track_matching_cone,
81 return make_pair(discriminator, resultExtended);
88 const reco::IsolatedTauTagInfoRef& tauRef,
92 trackAssociatorParameters_.useEcal =
true;
93 trackAssociatorParameters_.useHcal =
false;
94 trackAssociatorParameters_.useHO =
false;
95 trackAssociatorParameters_.useMuon =
false;
96 trackAssociatorParameters_.dREcal = 0.03;
99 const Jet &
jet = *(tauRef->jet());
101 float min_dR = 999.9;
102 float deltaR1 = ROOT::Math::VectorUtil::DeltaR(cluster_3vec, jet3Vec);
103 if (deltaR1 > cluster_jet_matching_cone)
return -1.0;
106 it != tracks.
end(); it++)
109 info = trackAssociator_->associate(theEvent, theEventSetup,
110 trackAssociator_->getFreeTrajectoryState(theEventSetup, (*(*it))),
111 trackAssociatorParameters_);
116 float deltaR2 = ROOT::Math::VectorUtil::DeltaR(cluster_3vec, track3Vec);
117 if (deltaR2 < min_dR) min_dR =
deltaR2;
T getParameter(std::string const &) const
Base class for all types of Jets.
Sin< T >::type sin(const T &t)
const_iterator end() const
Termination of iteration.
~InvariantMassAlgorithm()
const_iterator begin() const
Initialize an iterator over the RefVector.
std::pair< double, reco::TauMassTagInfo > tag(edm::Event &theEvent, const edm::EventSetup &theEventSetup, const reco::IsolatedTauTagInfoRef &tauRef, const edm::Handle< reco::BasicClusterCollection > &clus_handle)
float getMinimumClusterDR(edm::Event &theEvent, const edm::EventSetup &theEventSetup, const reco::IsolatedTauTagInfoRef &tauRef, const math::XYZVector &cluster_3vec)
double deltaR2(const Vector1 &v1, const Vector2 &v2)
virtual double px() const
x coordinate of momentum vector
float discriminator() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
virtual double pz() const
z coordinate of momentum vector
void storeClusterTrackCollection(reco::BasicClusterRef clusterRef, float dr)
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
virtual double py() const
y coordinate of momentum vector
void setIsolatedTauTag(const IsolatedTauTagInfoRef)