#include <TxCalculator.h>
|
double | getCTx (const reco::Photon &clus, double i, double threshold, double innerDR=0, double effRatio=2) |
|
double | getJct (const reco::Photon &cluster, double r1=0.4, double r2=0.04, double jWidth=0.015, double threshold=2) |
|
double | getJt (const reco::Photon &cluster, double r1=0.4, double r2=0.04, double jWidth=0.015, double threshold=2) |
|
double | getJurassicArea (double r1, double r2, double width) |
|
double | getMPT (double ptCut=0, double etaCut=1000) |
|
double | getTx (const reco::Photon &clus, double i, double threshold, double innerDR=0, double effRatio=2) |
|
| TxCalculator (const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::InputTag &trackLabel) |
|
|
double | calcDphi (double phi1_, double phi2_) |
|
double | dRDistance (double eta1, double phi1, double eta2, double phi2) |
|
Definition at line 28 of file TxCalculator.h.
double TxCalculator::calcDphi |
( |
double |
phi1_, |
|
|
double |
phi2_ |
|
) |
| |
|
inlineprivate |
Definition at line 55 of file TxCalculator.h.
References PI.
Referenced by dRDistance().
57 double dphi=phi1_-phi2_;
60 while (dphi>2*
PI) dphi-=2*
PI;
61 if (dphi>
PI) dphi=2*
PI-dphi;
63 while (dphi<-2*
PI) dphi+=2*
PI;
64 if (dphi<-
PI) dphi=-2*
PI-dphi;
double TxCalculator::dRDistance |
( |
double |
eta1, |
|
|
double |
phi1, |
|
|
double |
eta2, |
|
|
double |
phi2 |
|
) |
| |
|
inlineprivate |
double TxCalculator::getCTx |
( |
const reco::Photon & |
clus, |
|
|
double |
i, |
|
|
double |
threshold, |
|
|
double |
innerDR = 0 , |
|
|
double |
effRatio = 2 |
|
) |
| |
Definition at line 124 of file TxCalculator.cc.
References reco::LeafCandidate::eta(), reco::LeafCandidate::phi(), RecoTauCleanerPlugins::pt, dt_dqm_sourceclient_common_cff::reco, and x.
127 using namespace reco;
129 double SClusterEta = cluster.eta();
130 double SClusterPhi = cluster.phi();
135 for(reco::TrackCollection::const_iterator
138 double diceNum =
theDice->flat();
139 if ( (effRatio < 1 ) && ( diceNum > effRatio))
143 double pt = recTrack->pt();
144 double eta2 = recTrack->eta();
145 double phi2 = recTrack->phi();
146 double dEta = fabs(eta2-SClusterEta);
150 if(
dRDistance(SClusterEta,SClusterPhi,eta2,phi2) < innerDR)
154 TotalPt = TotalPt +
pt;
158 double CTx = Tx - TotalPt / 40.0 *
x;
edm::Handle< reco::TrackCollection > recCollection
double dRDistance(double eta1, double phi1, double eta2, double phi2)
double getTx(const reco::Photon &clus, double i, double threshold, double innerDR=0, double effRatio=2)
CLHEP::HepRandomEngine * theDice
double TxCalculator::getJct |
( |
const reco::Photon & |
cluster, |
|
|
double |
r1 = 0.4 , |
|
|
double |
r2 = 0.04 , |
|
|
double |
jWidth = 0.015 , |
|
|
double |
threshold = 2 |
|
) |
| |
Definition at line 203 of file TxCalculator.cc.
References gather_cfg::cout, dPhi(), eta(), reco::LeafCandidate::eta(), phi, reco::LeafCandidate::phi(), PI, RecoTauCleanerPlugins::pt, diffTwoXMLs::r1, and dt_dqm_sourceclient_common_cff::reco.
207 using namespace reco;
210 double SClusterEta = cluster.
eta();
211 double SClusterPhi = cluster.
phi();
214 for(reco::TrackCollection::const_iterator
217 double pt = recTrack->pt();
218 double eta = recTrack->eta();
219 double phi = recTrack->phi();
220 double dEta = fabs(eta-SClusterEta);
221 double dPhi = phi-SClusterPhi;
222 if ( dPhi < -
PI ) dPhi = dPhi + 2*
PI ;
223 if ( dPhi > PI ) dPhi = dPhi - 2*
PI ;
224 if ( fabs(dPhi) >PI )
cout <<
" error!!! dphi > 2pi : " << dPhi << endl;
229 if ( fabs(dEta) >
r1 )
continue;
230 if ( fabs(dPhi) <
r1 )
continue;
234 TotalPt = TotalPt +
pt;
237 double areaStrip = 4*PI*
r1 - 4*
r1*
r1;
241 double theCCJ = theCJ - TotalPt * areaJura / areaStrip ;
double getJt(const reco::Photon &cluster, double r1=0.4, double r2=0.04, double jWidth=0.015, double threshold=2)
edm::Handle< reco::TrackCollection > recCollection
double getJurassicArea(double r1, double r2, double width)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
double dPhi(double phi1, double phi2)
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
double TxCalculator::getJt |
( |
const reco::Photon & |
cluster, |
|
|
double |
r1 = 0.4 , |
|
|
double |
r2 = 0.04 , |
|
|
double |
jWidth = 0.015 , |
|
|
double |
threshold = 2 |
|
) |
| |
Definition at line 165 of file TxCalculator.cc.
References gather_cfg::cout, dPhi(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, eta(), reco::LeafCandidate::eta(), phi, reco::LeafCandidate::phi(), PI, RecoTauCleanerPlugins::pt, dt_dqm_sourceclient_common_cff::reco, and mathSSE::sqrt().
169 using namespace reco;
172 double SClusterEta = cluster.
eta();
173 double SClusterPhi = cluster.
phi();
176 for(reco::TrackCollection::const_iterator
179 double pt = recTrack->pt();
180 double eta = recTrack->eta();
181 double phi = recTrack->phi();
182 double dEta = fabs(eta-SClusterEta);
183 double dPhi = phi-SClusterPhi;
184 if ( dPhi < -
PI ) dPhi = dPhi + 2*
PI ;
185 if ( dPhi > PI ) dPhi = dPhi - 2*
PI ;
186 if ( fabs(dPhi) >PI )
cout <<
" error!!! dphi > 2pi : " << dPhi << endl;
187 double dR =
sqrt(dEta*dEta+dPhi*dPhi);
189 if ( dR >
r1 )
continue;
190 if ( dR <
r2 )
continue;
191 if ( fabs(dEta) < jWidth)
continue;
196 TotalPt = TotalPt +
pt;
edm::Handle< reco::TrackCollection > recCollection
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
double dPhi(double phi1, double phi2)
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
double TxCalculator::getJurassicArea |
( |
double |
r1, |
|
|
double |
r2, |
|
|
double |
width |
|
) |
| |
Definition at line 40 of file TxCalculator.cc.
References funct::cos(), and mathSSE::sqrt().
42 float theta1 = asin(
width /
r1);
43 float theta2 = asin(
width /
r2);
45 float area1 = 0.5 *
r1*
r1 * ( 3.141592 - 2 * theta1 ) ;
46 float area2 = 0.5 *
r2*
r2 * ( 3.141592 - 2 * theta2 ) ;
47 float area3 =
width * theA;
48 float finalArea = 2 * ( area1 - area2 - area3);
Cos< T >::type cos(const T &t)
double TxCalculator::getMPT |
( |
double |
ptCut = 0 , |
|
|
double |
etaCut = 1000 |
|
) |
| |
Definition at line 53 of file TxCalculator.cc.
References eta(), RecoTauCleanerPlugins::pt, dt_dqm_sourceclient_common_cff::reco, and mathSSE::sqrt().
58 double sumpx(0), sumpy(0);
60 for(reco::TrackCollection::const_iterator
63 double pt = recTrack->pt();
64 double eta = recTrack->eta();
68 if ( fabs( eta) > etaCut )
71 double pxTemp = recTrack->px();
72 double pyTemp = recTrack->py();
74 sumpx = sumpx + pxTemp;
75 sumpy = sumpy + pyTemp;
79 double theMPT =
sqrt(sumpx*sumpx + sumpy*sumpy) ;
edm::Handle< reco::TrackCollection > recCollection
double TxCalculator::getTx |
( |
const reco::Photon & |
clus, |
|
|
double |
i, |
|
|
double |
threshold, |
|
|
double |
innerDR = 0 , |
|
|
double |
effRatio = 2 |
|
) |
| |
Definition at line 86 of file TxCalculator.cc.
References reco::LeafCandidate::eta(), reco::LeafCandidate::phi(), RecoTauCleanerPlugins::pt, and dt_dqm_sourceclient_common_cff::reco.
94 double SClusterEta = cluster.eta();
95 double SClusterPhi = cluster.phi();
98 for(reco::TrackCollection::const_iterator
101 double diceNum =
theDice->flat();
102 if ( (effRatio < 1 ) && ( diceNum > effRatio))
105 double pt = recTrack->pt();
106 double eta2 = recTrack->eta();
107 double phi2 = recTrack->phi();
109 if(
dRDistance(SClusterEta,SClusterPhi,eta2,phi2) >= 0.1 *
x)
111 if(
dRDistance(SClusterEta,SClusterPhi,eta2,phi2) < innerDR)
114 TotalPt = TotalPt +
pt;
edm::Handle< reco::TrackCollection > recCollection
double dRDistance(double eta1, double phi1, double eta2, double phi2)
CLHEP::HepRandomEngine * theDice
CLHEP::HepRandomEngine* TxCalculator::theDice |
|
private |