CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
PFRecoTauAlgorithm Class Reference

#include <PFRecoTauAlgorithm.h>

Inheritance diagram for PFRecoTauAlgorithm:
PFRecoTauAlgorithmBase

Public Member Functions

reco::PFTau buildPFTau (const reco::PFTauTagInfoRef &, const reco::Vertex &) override
 
 PFRecoTauAlgorithm ()
 
 PFRecoTauAlgorithm (const edm::ParameterSet &)
 
 ~PFRecoTauAlgorithm () override
 
- Public Member Functions inherited from PFRecoTauAlgorithmBase
 PFRecoTauAlgorithmBase ()
 
 PFRecoTauAlgorithmBase (const edm::ParameterSet &)
 
void setTransientTrackBuilder (const TransientTrackBuilder *)
 
virtual ~PFRecoTauAlgorithmBase ()
 

Private Member Functions

bool checkPos (const std::vector< math::XYZPoint > &, const math::XYZPoint &) const
 

Private Attributes

bool AddEllipseGammas_
 
double AreaMetric_recoElements_maxabsEta_
 
uint32_t ChargedHadrCand_IsolAnnulus_minNhits_
 
double ChargedHadrCandLeadChargedHadrCand_tksmaxDZ_
 
std::string DataType_
 
std::string ECALIsolConeMetric_
 
double ECALIsolConeSize_max_
 
double ECALIsolConeSize_min_
 
std::string ECALIsolConeSizeFormula_
 
std::string ECALSignalConeMetric_
 
double ECALSignalConeSize_max_
 
double ECALSignalConeSize_min_
 
std::string ECALSignalConeSizeFormula_
 
double EcalStripSumE_deltaEta_
 
double EcalStripSumE_deltaPhiOverQ_maxValue_
 
double EcalStripSumE_deltaPhiOverQ_minValue_
 
double EcalStripSumE_minClusEnergy_
 
double ElecPreIDLeadTkMatch_maxDR_
 
std::string HCALIsolConeMetric_
 
double HCALIsolConeSize_max_
 
double HCALIsolConeSize_min_
 
std::string HCALIsolConeSizeFormula_
 
std::string HCALSignalConeMetric_
 
double HCALSignalConeSize_max_
 
double HCALSignalConeSize_min_
 
std::string HCALSignalConeSizeFormula_
 
double LeadPFCand_minPt_
 
double LeadTrack_minPt_
 
std::string MatchingConeMetric_
 
double MatchingConeSize_max_
 
double MatchingConeSize_min_
 
std::string MatchingConeSizeFormula_
 
double MaxEtInEllipse_
 
double maximumForElectrionPreIDOutput_
 
TFormula myECALIsolConeSizeTFormula
 
TFormula myECALSignalConeSizeTFormula
 
TFormula myHCALIsolConeSizeTFormula
 
TFormula myHCALSignalConeSizeTFormula
 
TFormula myMatchingConeSizeTFormula
 
TFormula myTrackerIsolConeSizeTFormula
 
TFormula myTrackerSignalConeSizeTFormula
 
bool putNeutralHadronsInP4_
 
double Rphi_
 
uint32_t Track_IsolAnnulus_minNhits_
 
std::string TrackerIsolConeMetric_
 
double TrackerIsolConeSize_max_
 
double TrackerIsolConeSize_min_
 
std::string TrackerIsolConeSizeFormula_
 
std::string TrackerSignalConeMetric_
 
double TrackerSignalConeSize_max_
 
double TrackerSignalConeSize_min_
 
std::string TrackerSignalConeSizeFormula_
 
double TrackLeadTrack_maxDZ_
 
bool UseChargedHadrCandLeadChargedHadrCand_tksDZconstraint_
 
bool UseTrackLeadTrackDZconstraint_
 

Additional Inherited Members

- Protected Attributes inherited from PFRecoTauAlgorithmBase
const TransientTrackBuilderTransientTrackBuilder_
 

Detailed Description

Definition at line 21 of file PFRecoTauAlgorithm.h.

Constructor & Destructor Documentation

PFRecoTauAlgorithm::PFRecoTauAlgorithm ( )
PFRecoTauAlgorithm::PFRecoTauAlgorithm ( const edm::ParameterSet iConfig)

Definition at line 17 of file PFRecoTauAlgorithm.cc.

References AddEllipseGammas_, AreaMetric_recoElements_maxabsEta_, ChargedHadrCand_IsolAnnulus_minNhits_, ChargedHadrCandLeadChargedHadrCand_tksmaxDZ_, TauTagTools::computeConeSizeTFormula(), DataType_, ECALIsolConeMetric_, ECALIsolConeSize_max_, ECALIsolConeSize_min_, ECALIsolConeSizeFormula_, ECALSignalConeMetric_, ECALSignalConeSize_max_, ECALSignalConeSize_min_, ECALSignalConeSizeFormula_, EcalStripSumE_deltaEta_, EcalStripSumE_deltaPhiOverQ_maxValue_, EcalStripSumE_deltaPhiOverQ_minValue_, EcalStripSumE_minClusEnergy_, ElecPreIDLeadTkMatch_maxDR_, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), HCALIsolConeMetric_, HCALIsolConeSize_max_, HCALIsolConeSize_min_, HCALIsolConeSizeFormula_, HCALSignalConeMetric_, HCALSignalConeSize_max_, HCALSignalConeSize_min_, HCALSignalConeSizeFormula_, LeadPFCand_minPt_, LeadTrack_minPt_, MatchingConeMetric_, MatchingConeSize_max_, MatchingConeSize_min_, MatchingConeSizeFormula_, MaxEtInEllipse_, maximumForElectrionPreIDOutput_, myECALIsolConeSizeTFormula, myECALSignalConeSizeTFormula, myHCALIsolConeSizeTFormula, myHCALSignalConeSizeTFormula, myMatchingConeSizeTFormula, myTrackerIsolConeSizeTFormula, myTrackerSignalConeSizeTFormula, putNeutralHadronsInP4_, Rphi_, AlCaHLTBitMon_QueryRunRegistry::string, Track_IsolAnnulus_minNhits_, TrackerIsolConeMetric_, TrackerIsolConeSize_max_, TrackerIsolConeSize_min_, TrackerIsolConeSizeFormula_, TrackerSignalConeMetric_, TrackerSignalConeSize_max_, TrackerSignalConeSize_min_, TrackerSignalConeSizeFormula_, TrackLeadTrack_maxDZ_, UseChargedHadrCandLeadChargedHadrCand_tksDZconstraint_, and UseTrackLeadTrackDZconstraint_.

17  :PFRecoTauAlgorithmBase(iConfig){
18  LeadPFCand_minPt_ = iConfig.getParameter<double>("LeadPFCand_minPt");
19 
21  = iConfig.getParameter<bool>("UseChargedHadrCandLeadChargedHadrCand_tksDZconstraint");
22 
24  = iConfig.getParameter<double>("ChargedHadrCandLeadChargedHadrCand_tksmaxDZ");
25 
26  LeadTrack_minPt_ = iConfig.getParameter<double>("LeadTrack_minPt");
27  UseTrackLeadTrackDZconstraint_ = iConfig.getParameter<bool>("UseTrackLeadTrackDZconstraint");
28  TrackLeadTrack_maxDZ_ = iConfig.getParameter<double>("TrackLeadTrack_maxDZ");
29 
30  MatchingConeMetric_ = iConfig.getParameter<std::string>("MatchingConeMetric");
31  MatchingConeSizeFormula_ = iConfig.getParameter<std::string>("MatchingConeSizeFormula");
32  MatchingConeSize_min_ = iConfig.getParameter<double>("MatchingConeSize_min");
33  MatchingConeSize_max_ = iConfig.getParameter<double>("MatchingConeSize_max");
34  TrackerSignalConeMetric_ = iConfig.getParameter<std::string>("TrackerSignalConeMetric");
35  TrackerSignalConeSizeFormula_ = iConfig.getParameter<std::string>("TrackerSignalConeSizeFormula");
36  TrackerSignalConeSize_min_ = iConfig.getParameter<double>("TrackerSignalConeSize_min");
37  TrackerSignalConeSize_max_ = iConfig.getParameter<double>("TrackerSignalConeSize_max");
38  TrackerIsolConeMetric_ = iConfig.getParameter<std::string>("TrackerIsolConeMetric");
39  TrackerIsolConeSizeFormula_ = iConfig.getParameter<std::string>("TrackerIsolConeSizeFormula");
40  TrackerIsolConeSize_min_ = iConfig.getParameter<double>("TrackerIsolConeSize_min");
41  TrackerIsolConeSize_max_ = iConfig.getParameter<double>("TrackerIsolConeSize_max");
42  ECALSignalConeMetric_ = iConfig.getParameter<std::string>("ECALSignalConeMetric");
43  ECALSignalConeSizeFormula_ = iConfig.getParameter<std::string>("ECALSignalConeSizeFormula");
44  ECALSignalConeSize_min_ = iConfig.getParameter<double>("ECALSignalConeSize_min");
45  ECALSignalConeSize_max_ = iConfig.getParameter<double>("ECALSignalConeSize_max");
46  ECALIsolConeMetric_ = iConfig.getParameter<std::string>("ECALIsolConeMetric");
47  ECALIsolConeSizeFormula_ = iConfig.getParameter<std::string>("ECALIsolConeSizeFormula");
48  ECALIsolConeSize_min_ = iConfig.getParameter<double>("ECALIsolConeSize_min");
49  ECALIsolConeSize_max_ = iConfig.getParameter<double>("ECALIsolConeSize_max");
50  HCALSignalConeMetric_ = iConfig.getParameter<std::string>("HCALSignalConeMetric");
51  HCALSignalConeSizeFormula_ = iConfig.getParameter<std::string>("HCALSignalConeSizeFormula");
52  HCALSignalConeSize_min_ = iConfig.getParameter<double>("HCALSignalConeSize_min");
53  HCALSignalConeSize_max_ = iConfig.getParameter<double>("HCALSignalConeSize_max");
54  HCALIsolConeMetric_ = iConfig.getParameter<std::string>("HCALIsolConeMetric");
55  HCALIsolConeSizeFormula_ = iConfig.getParameter<std::string>("HCALIsolConeSizeFormula");
56  HCALIsolConeSize_min_ = iConfig.getParameter<double>("HCALIsolConeSize_min");
57  HCALIsolConeSize_max_ = iConfig.getParameter<double>("HCALIsolConeSize_max");
58 
59  putNeutralHadronsInP4_ = iConfig.exists("putNeutralHadronsInP4") ?
60  iConfig.getParameter<bool>("putNeutralHadronsInP4") : false;
61 
62  // get paramaeters for ellipse EELL
63  Rphi_ = iConfig.getParameter<double>("Rphi");
64  MaxEtInEllipse_ = iConfig.getParameter<double>("MaxEtInEllipse");
65  AddEllipseGammas_ = iConfig.getParameter<bool>("AddEllipseGammas");
66  // EELL
67 
68  AreaMetric_recoElements_maxabsEta_ = iConfig.getParameter<double>("AreaMetric_recoElements_maxabsEta");
69  ChargedHadrCand_IsolAnnulus_minNhits_ = iConfig.getParameter<uint32_t>("ChargedHadrCand_IsolAnnulus_minNhits");
70  Track_IsolAnnulus_minNhits_ = iConfig.getParameter<uint32_t>("Track_IsolAnnulus_minNhits");
71 
72  ElecPreIDLeadTkMatch_maxDR_ = iConfig.getParameter<double>("ElecPreIDLeadTkMatch_maxDR");
73  EcalStripSumE_minClusEnergy_ = iConfig.getParameter<double>("EcalStripSumE_minClusEnergy");
74  EcalStripSumE_deltaEta_ = iConfig.getParameter<double>("EcalStripSumE_deltaEta");
75  EcalStripSumE_deltaPhiOverQ_minValue_ = iConfig.getParameter<double>("EcalStripSumE_deltaPhiOverQ_minValue");
76  EcalStripSumE_deltaPhiOverQ_maxValue_ = iConfig.getParameter<double>("EcalStripSumE_deltaPhiOverQ_maxValue");
77  maximumForElectrionPreIDOutput_ = iConfig.getParameter<double>("maximumForElectrionPreIDOutput");
78 
79  DataType_ = iConfig.getParameter<std::string>("DataType");
80 
81  //TFormula computation
82  myMatchingConeSizeTFormula = TauTagTools::computeConeSizeTFormula(MatchingConeSizeFormula_,"Matching cone size");
83  //Charged particles cones
84  myTrackerSignalConeSizeTFormula = TauTagTools::computeConeSizeTFormula(TrackerSignalConeSizeFormula_,"Tracker signal cone size");
85  myTrackerIsolConeSizeTFormula = TauTagTools::computeConeSizeTFormula(TrackerIsolConeSizeFormula_,"Tracker isolation cone size");
86  //Gamma candidates cones
87  myECALSignalConeSizeTFormula = TauTagTools::computeConeSizeTFormula(ECALSignalConeSizeFormula_,"ECAL signal cone size");
88  myECALIsolConeSizeTFormula = TauTagTools::computeConeSizeTFormula(ECALIsolConeSizeFormula_,"ECAL isolation cone size");
89  //Neutral hadrons cones
90  myHCALSignalConeSizeTFormula = TauTagTools::computeConeSizeTFormula(HCALSignalConeSizeFormula_,"HCAL signal cone size");
91  myHCALIsolConeSizeTFormula = TauTagTools::computeConeSizeTFormula(HCALIsolConeSizeFormula_,"HCAL isolation cone size");
92 }
std::string ECALIsolConeSizeFormula_
T getParameter(std::string const &) const
std::string TrackerIsolConeSizeFormula_
double maximumForElectrionPreIDOutput_
std::string ECALSignalConeSizeFormula_
uint32_t ChargedHadrCand_IsolAnnulus_minNhits_
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::string HCALSignalConeSizeFormula_
bool UseChargedHadrCandLeadChargedHadrCand_tksDZconstraint_
double EcalStripSumE_deltaPhiOverQ_minValue_
TFormula myHCALSignalConeSizeTFormula
double ChargedHadrCandLeadChargedHadrCand_tksmaxDZ_
TFormula myTrackerSignalConeSizeTFormula
std::string ECALSignalConeMetric_
TFormula myECALSignalConeSizeTFormula
double AreaMetric_recoElements_maxabsEta_
uint32_t Track_IsolAnnulus_minNhits_
TFormula computeConeSizeTFormula(const std::string &ConeSizeFormula, const char *errorMessage)
std::string ECALIsolConeMetric_
std::string TrackerSignalConeMetric_
std::string MatchingConeSizeFormula_
TFormula myMatchingConeSizeTFormula
double EcalStripSumE_deltaPhiOverQ_maxValue_
TFormula myHCALIsolConeSizeTFormula
TFormula myTrackerIsolConeSizeTFormula
std::string HCALIsolConeSizeFormula_
std::string MatchingConeMetric_
std::string TrackerIsolConeMetric_
std::string HCALSignalConeMetric_
std::string TrackerSignalConeSizeFormula_
TFormula myECALIsolConeSizeTFormula
std::string HCALIsolConeMetric_
PFRecoTauAlgorithm::~PFRecoTauAlgorithm ( )
inlineoverride

Definition at line 25 of file PFRecoTauAlgorithm.h.

References buildPFTau(), and checkPos().

25 {}

Member Function Documentation

PFTau PFRecoTauAlgorithm::buildPFTau ( const reco::PFTauTagInfoRef myPFTauTagInfoRef,
const reco::Vertex myPV 
)
overridevirtual

Implements PFRecoTauAlgorithmBase.

Definition at line 95 of file PFRecoTauAlgorithm.cc.

References funct::abs(), AddEllipseGammas_, groupFilesInBlocks::block, TransientTrackBuilder::build(), ChargedHadrCand_IsolAnnulus_minNhits_, ChargedHadrCandLeadChargedHadrCand_tksmaxDZ_, checkPos(), TauElementsOperators::computeConeSize(), TauTagTools::computeDeltaR(), DataType_, spr::deltaEta, allConversions_cfi::DeltaPhi, hiPixelPairStep_cff::deltaPhi, HiRegitMuonDetachedTripletStep_cff::DeltaR, boostedElectronIsolation_cff::deltaR, reco::PFBlockElement::ECAL, reco::PFCandidate::ecalEnergy(), ECALIsolConeMetric_, ECALIsolConeSize_max_, ECALIsolConeSize_min_, ECALSignalConeMetric_, ECALSignalConeSize_max_, ECALSignalConeSize_min_, EcalStripSumE_deltaEta_, EcalStripSumE_deltaPhiOverQ_maxValue_, EcalStripSumE_deltaPhiOverQ_minValue_, EcalStripSumE_minClusEnergy_, allElectronIsolations_cfi::elements, reco::PFBlock::elements(), reco::PFCandidate::elementsInBlocks(), stringResolutionProvider_cfi::et, Exception, TauTagTools::filteredPFChargedHadrCandsByNumTrkHits(), TauTagTools::filteredTracksByNumTrkHits(), objects.autophobj::float, edm::Ptr< T >::get(), reco::PFBlockElement::HCAL, reco::PFCandidate::hcalEnergy(), HCALIsolConeMetric_, HCALIsolConeSize_max_, HCALIsolConeSize_min_, HCALSignalConeMetric_, HCALSignalConeSize_max_, HCALSignalConeSize_min_, mps_fire::i, createfilelist::int, edm::Ptr< T >::isNonnull(), edm::Ref< C, T, F >::isNonnull(), PFTauElementsOperators::leadChargedHadrCand(), LeadPFCand_minPt_, TauElementsOperators::leadTk(), LeadTrack_minPt_, MatchingConeMetric_, MatchingConeSize_max_, MatchingConeSize_min_, MaxEtInEllipse_, maximumForElectrionPreIDOutput_, reco::Candidate::momentum(), reco::PFCandidate::mva_e_pi(), myECALIsolConeSizeTFormula, myECALSignalConeSizeTFormula, myHCALIsolConeSizeTFormula, myHCALSignalConeSizeTFormula, myMatchingConeSizeTFormula, myTrackerIsolConeSizeTFormula, myTrackerSignalConeSizeTFormula, reco::PFCandidate::particleId(), PFTauElementsOperators::PFCandsInCone(), PFTauElementsOperators::PFChargedHadrCandsInAnnulus(), PFTauElementsOperators::PFChargedHadrCandsInCone(), PFTauElementsOperators::PFGammaCandsInAnnulus(), PFTauElementsOperators::PFGammaCandsInCone(), PFTauElementsOperators::PFGammaCandsInOutEllipse(), PFTauElementsOperators::PFNeutrHadrCandsInAnnulus(), PFTauElementsOperators::PFNeutrHadrCandsInCone(), PFTauAlgo_ChargedHadrCand_minPt_, PFTauAlgo_GammaCand_minPt_, PFTauAlgo_NeutrHadrCand_minPt_, PFTauAlgo_PFCand_minPt_, PFTauAlgo_Track_minPt_, reco::Vertex::position(), reco::PFCandidate::positionAtECALEntrance(), EnergyCorrector::pt, reco::Candidate::pt(), putNeutralHadronsInP4_, reco::LeafCandidate::px(), reco::LeafCandidate::py(), reco::LeafCandidate::pz(), Rphi_, reco::PFTau::setpfTauTagInfoRef(), IPTools::signedTransverseImpactParameter(), funct::sin(), edm::OwnVector< T, P >::size(), Track_IsolAnnulus_minNhits_, TrackerIsolConeMetric_, TrackerIsolConeSize_max_, TrackerIsolConeSize_min_, TrackerSignalConeMetric_, TrackerSignalConeSize_max_, TrackerSignalConeSize_min_, TrackLeadTrack_maxDZ_, reco::PFCandidate::trackRef(), TauElementsOperators::tracksInAnnulus(), TauElementsOperators::tracksInCone(), PFRecoTauAlgorithmBase::TransientTrackBuilder_, UseChargedHadrCandLeadChargedHadrCand_tksDZconstraint_, UseTrackLeadTrackDZconstraint_, reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().

Referenced by ~PFRecoTauAlgorithm().

96 {
97  JetBaseRef myPFJet=(*myPFTauTagInfoRef).pfjetRef(); // catch a ref to the initial PFJet
98  PFTau myPFTau(std::numeric_limits<int>::quiet_NaN(),myPFJet->p4()); // create the PFTau
99 
100  myPFTau.setpfTauTagInfoRef(myPFTauTagInfoRef);
101 
102  std::vector<CandidatePtr> myPFCands=(*myPFTauTagInfoRef).PFCands();
103 
104  PFTauElementsOperators myPFTauElementsOperators(myPFTau);
105  double myMatchingConeSize=myPFTauElementsOperators.computeConeSize(myMatchingConeSizeTFormula,MatchingConeSize_min_,MatchingConeSize_max_);
106 
107  CandidatePtr myleadPFChargedCand=myPFTauElementsOperators.leadChargedHadrCand(MatchingConeMetric_,myMatchingConeSize,PFTauAlgo_PFCand_minPt_);
108 
109  // These two quantities always taken from the signal cone
110  CandidatePtr myleadPFNeutralCand;
111  CandidatePtr myleadPFCand;
112 
113  bool myleadPFCand_rectkavailable = false;
114  double myleadPFCand_rectkDZ = 0.;
115 
116  // Determine the SIPT of the lead track
117  if(myleadPFChargedCand.isNonnull()) {
118  myPFTau.setleadChargedHadrCand(myleadPFChargedCand);
119  const reco::PFCandidate* pflch = dynamic_cast<const reco::PFCandidate*>(myleadPFChargedCand.get());
120  if (pflch == nullptr)
121  throw cms::Exception("Type Mismatch") << "The PFTau was not made from PFCandidates, and this outdated algorithm was not updated to cope with PFTaus made from other Candidates.\n";
122  TrackRef myleadPFCand_rectk=pflch->trackRef();
123  if(myleadPFCand_rectk.isNonnull()) {
124  myleadPFCand_rectkavailable=true;
125  myleadPFCand_rectkDZ=(*myleadPFCand_rectk).dz(myPV.position());
126  if(TransientTrackBuilder_!=nullptr) {
127  const TransientTrack myleadPFCand_rectransienttk=TransientTrackBuilder_->build(&(*myleadPFCand_rectk));
128  GlobalVector myPFJetdir((*myPFJet).px(),(*myPFJet).py(),(*myPFJet).pz());
129  if(IPTools::signedTransverseImpactParameter(myleadPFCand_rectransienttk,myPFJetdir,myPV).first)
130  myPFTau.setleadPFChargedHadrCandsignedSipt(
131  IPTools::signedTransverseImpactParameter(myleadPFCand_rectransienttk,myPFJetdir,myPV).second.significance());
132  }
133  }
134  }
135 
136  //Building PF Components
137  if (myleadPFChargedCand.isNonnull())
138  {
139  math::XYZVector tauAxis = myleadPFChargedCand->momentum();
140  // Compute energy of the PFTau considering only inner constituents
141  // (inner == pfcandidates inside a cone which is equal to the maximum value of the signal cone)
142  // The axis is built about the lead charged hadron
143  std::vector<CandidatePtr> myTmpPFCandsInSignalCone =
144  myPFTauElementsOperators.PFCandsInCone(tauAxis,TrackerSignalConeMetric_,TrackerSignalConeSize_max_,0.5);
145  math::XYZTLorentzVector tmpLorentzVect(0.,0.,0.,0.);
146 
147  double jetOpeningAngle = 0.0;
148  for (std::vector<CandidatePtr>::const_iterator iCand = myTmpPFCandsInSignalCone.begin();
149  iCand != myTmpPFCandsInSignalCone.end(); iCand++)
150  {
151  //find the maximum opening angle of the jet (now a parameter in available TFormulas)
152  double deltaRToSeed = TauTagTools::computeDeltaR(tauAxis, (**iCand).momentum());
153  if (deltaRToSeed > jetOpeningAngle)
154  jetOpeningAngle = deltaRToSeed;
155 
156  tmpLorentzVect+=(**iCand).p4();
157  }
158 
159  //Setting the myPFTau four momentum as the one made from the signal cone constituents.
160  double energy = tmpLorentzVect.energy();
161  double transverseEnergy = tmpLorentzVect.pt();
162  myPFTau.setP4(tmpLorentzVect);
163 
164  // Compute the cone sizes
165  double myTrackerSignalConeSize = myPFTauElementsOperators.computeConeSize(
166  myTrackerSignalConeSizeTFormula, TrackerSignalConeSize_min_, TrackerSignalConeSize_max_, transverseEnergy, energy, jetOpeningAngle);
167  double myTrackerIsolConeSize = myPFTauElementsOperators.computeConeSize(
168  myTrackerIsolConeSizeTFormula, TrackerIsolConeSize_min_, TrackerIsolConeSize_max_, transverseEnergy, energy, jetOpeningAngle);
169  double myECALSignalConeSize = myPFTauElementsOperators.computeConeSize(
170  myECALSignalConeSizeTFormula, ECALSignalConeSize_min_, ECALSignalConeSize_max_, transverseEnergy, energy, jetOpeningAngle);
171  double myECALIsolConeSize = myPFTauElementsOperators.computeConeSize(
172  myECALIsolConeSizeTFormula, ECALIsolConeSize_min_, ECALIsolConeSize_max_, transverseEnergy, energy, jetOpeningAngle);
173  double myHCALSignalConeSize = myPFTauElementsOperators.computeConeSize(
174  myHCALSignalConeSizeTFormula, HCALSignalConeSize_min_, HCALSignalConeSize_max_, transverseEnergy, energy, jetOpeningAngle);
175  double myHCALIsolConeSize = myPFTauElementsOperators.computeConeSize(
176  myHCALIsolConeSizeTFormula, HCALIsolConeSize_min_, HCALIsolConeSize_max_, transverseEnergy, energy, jetOpeningAngle);
177 
178  // Signal cone collections
179  std::vector<CandidatePtr> mySignalPFChargedHadrCands, mySignalPFNeutrHadrCands, mySignalPFGammaCands, mySignalPFCands;
180 
181  if (UseChargedHadrCandLeadChargedHadrCand_tksDZconstraint_ && myleadPFCand_rectkavailable) {
182  mySignalPFChargedHadrCands=myPFTauElementsOperators.PFChargedHadrCandsInCone(tauAxis,
184  ChargedHadrCandLeadChargedHadrCand_tksmaxDZ_, myleadPFCand_rectkDZ, myPV);
185  }
186  else {
187  mySignalPFChargedHadrCands=myPFTauElementsOperators.PFChargedHadrCandsInCone(tauAxis,
189  }
190 
191  // Set the Charged hadronics that live in the signal cones
192  myPFTau.setsignalChargedHadrCands(mySignalPFChargedHadrCands);
193 
194  // Set the neurtral hadrons that live in the signal cone
195  mySignalPFNeutrHadrCands=myPFTauElementsOperators.PFNeutrHadrCandsInCone(tauAxis,
197 
198  myPFTau.setsignalNeutrHadrCands(mySignalPFNeutrHadrCands);
199 
200  // Compute the gammas that live in the signal cone
201  mySignalPFGammaCands=myPFTauElementsOperators.PFGammaCandsInCone(tauAxis,
203 
204  myPFTau.setsignalGammaCands(mySignalPFGammaCands);
205 
206  // Add charged objects to signal cone, and calculate charge
207  if(!mySignalPFChargedHadrCands.empty()) {
208  int mySignalPFChargedHadrCands_qsum=0;
209  for(size_t i = 0; i < mySignalPFChargedHadrCands.size(); i++) {
210  mySignalPFChargedHadrCands_qsum += mySignalPFChargedHadrCands[i]->charge();
211  mySignalPFCands.push_back(mySignalPFChargedHadrCands[i]);
212  }
213  myPFTau.setCharge(mySignalPFChargedHadrCands_qsum);
214  }
215 
216  //Add neutral objects to signal cone
217  for(size_t i = 0; i < mySignalPFNeutrHadrCands.size(); i++) {
218  mySignalPFCands.push_back(mySignalPFNeutrHadrCands[i]);
219  }
220 
221  // For the signal gammas, keep track of the highest pt object
222  double maxSignalGammaPt = 0.;
223  for(size_t i = 0; i < mySignalPFGammaCands.size(); i++) {
224  if(mySignalPFGammaCands[i]->pt() > maxSignalGammaPt) {
225  myleadPFNeutralCand = mySignalPFGammaCands[i];
226  maxSignalGammaPt = mySignalPFGammaCands[i]->pt();
227  }
228  mySignalPFCands.push_back(mySignalPFGammaCands[i]);
229  }
230  myPFTau.setsignalCands(mySignalPFCands);
231  // Set leading gamma
232  myPFTau.setleadNeutralCand(myleadPFNeutralCand);
233 
234  // Logic to determine lead PFCand. If the lead charged object
235  // is above the threshold, take that. If the lead charged object is less
236  // than the threshold (but exists), AND there exists a gamma above the threshold
237  // take the gamma as the leadPFCand. Otherwise it is null.
238 
239  if(myleadPFChargedCand->pt() > LeadPFCand_minPt_) {
240  myPFTau.setleadCand(myleadPFChargedCand);
241  } else if (maxSignalGammaPt > LeadPFCand_minPt_) {
242  myPFTau.setleadCand(myleadPFNeutralCand);
243  }
244 
245  // Declare isolation collections
246  std::vector<CandidatePtr> myUnfilteredIsolPFChargedHadrCands, myIsolPFNeutrHadrCands, myIsolPFGammaCands, myIsolPFCands;
247 
248  // Build unfiltered isolation collection
249  if(UseChargedHadrCandLeadChargedHadrCand_tksDZconstraint_ && myleadPFCand_rectkavailable) {
250  myUnfilteredIsolPFChargedHadrCands=myPFTauElementsOperators.PFChargedHadrCandsInAnnulus(
251  tauAxis,TrackerSignalConeMetric_,myTrackerSignalConeSize,TrackerIsolConeMetric_,myTrackerIsolConeSize,
253  } else {
254  myUnfilteredIsolPFChargedHadrCands=myPFTauElementsOperators.PFChargedHadrCandsInAnnulus(
255  tauAxis,TrackerSignalConeMetric_,myTrackerSignalConeSize,TrackerIsolConeMetric_,myTrackerIsolConeSize,
257  }
258 
259  // Filter isolation annulus charge dhadrons with additional nHits quality cut
260  // (note that other cuts [pt, chi2, are already cut on])
261  std::vector<CandidatePtr> myIsolPFChargedHadrCands;
262  myIsolPFChargedHadrCands = TauTagTools::filteredPFChargedHadrCandsByNumTrkHits(
263  myUnfilteredIsolPFChargedHadrCands, ChargedHadrCand_IsolAnnulus_minNhits_);
264 
265  myPFTau.setisolationChargedHadrCands(myIsolPFChargedHadrCands);
266 
267  // Fill neutral hadrons
268  myIsolPFNeutrHadrCands = myPFTauElementsOperators.PFNeutrHadrCandsInAnnulus(
269  tauAxis, HCALSignalConeMetric_, myHCALSignalConeSize, HCALIsolConeMetric_,
270  myHCALIsolConeSize, PFTauAlgo_NeutrHadrCand_minPt_);
271  myPFTau.setisolationNeutrHadrCands(myIsolPFNeutrHadrCands);
272 
273  // Fill gamma candidates
274  myIsolPFGammaCands = myPFTauElementsOperators.PFGammaCandsInAnnulus(
275  tauAxis, ECALSignalConeMetric_, myECALSignalConeSize, ECALIsolConeMetric_,
276  myECALIsolConeSize, PFTauAlgo_GammaCand_minPt_);
277  myPFTau.setisolationGammaCands(myIsolPFGammaCands);
278 
279  //Incorporate converted gammas from isolation ellipse into signal ... ELLL
280  //Get pair with in/out elements using the isoPFGammaCandidates set by default
281  if(AddEllipseGammas_) {
282  double rPhi;
283  if(Rphi_ >= 1.)
284  rPhi = Rphi_*myECALSignalConeSize;
285  else
286  rPhi = Rphi_;
287 
288  std::pair<std::vector<CandidatePtr>,std::vector<CandidatePtr>> elementsInOutEllipse =
289  myPFTauElementsOperators.PFGammaCandsInOutEllipse(myIsolPFGammaCands, *myleadPFCand, rPhi, myECALSignalConeSize, MaxEtInEllipse_);
290 
291  std::vector<CandidatePtr> elementsInEllipse = elementsInOutEllipse.first;
292  std::vector<CandidatePtr> elementsOutEllipse = elementsInOutEllipse.second;
293  //add the inside elements to signal PFCandidates and reset signal PFCands
294  for(std::vector<CandidatePtr>::const_iterator inEllipseIt = elementsInEllipse.begin(); inEllipseIt != elementsInEllipse.end(); inEllipseIt++){
295  mySignalPFCands.push_back(*inEllipseIt);
296  mySignalPFGammaCands.push_back(*inEllipseIt);
297  }
298  myPFTau.setsignalCands(mySignalPFCands);
299  //redefine isoPFGammaCandidates to be the outside elements
300  myIsolPFGammaCands=elementsOutEllipse;
301  myPFTau.setisolationGammaCands(myIsolPFGammaCands);
302  }
303 
304 
305  // Fill isolation collections, and calculate pt sum in isolation cone
306  float myIsolPFChargedHadrCands_Ptsum = 0.;
307  float myIsolPFGammaCands_Etsum = 0.;
308  for(size_t i = 0; i < myIsolPFChargedHadrCands.size(); i++) {
309  myIsolPFChargedHadrCands_Ptsum += myIsolPFChargedHadrCands[i]->pt();
310  myIsolPFCands.push_back(myIsolPFChargedHadrCands[i]);
311  }
312  myPFTau.setisolationPFChargedHadrCandsPtSum(myIsolPFChargedHadrCands_Ptsum);
313 
314  // Put neutral hadrons into collection
315  for(size_t i = 0; i < myIsolPFNeutrHadrCands.size(); i++) {
316  myIsolPFCands.push_back(myIsolPFNeutrHadrCands[i]);
317  }
318 
319  for(size_t i = 0; i < myIsolPFGammaCands.size(); i++) {
320  myIsolPFGammaCands_Etsum += myIsolPFGammaCands[i]->et();
321  myIsolPFCands.push_back(myIsolPFGammaCands[i]);
322  }
323  myPFTau.setisolationPFGammaCandsEtSum(myIsolPFGammaCands_Etsum);
324  myPFTau.setisolationCands(myIsolPFCands);
325 
326  //Making the alternateLorentzVector, i.e. direction with only signal components
327  math::XYZTLorentzVector alternatLorentzVect(0.,0.,0.,0.);
328  for (std::vector<CandidatePtr>::const_iterator iGammaCand = mySignalPFGammaCands.begin();
329  iGammaCand != mySignalPFGammaCands.end(); iGammaCand++) {
330  alternatLorentzVect+=(**iGammaCand).p4();
331  }
332 
333  for (std::vector<CandidatePtr>::const_iterator iChargedHadrCand = mySignalPFChargedHadrCands.begin();
334  iChargedHadrCand != mySignalPFChargedHadrCands.end(); iChargedHadrCand++) {
335  alternatLorentzVect+=(**iChargedHadrCand).p4();
336  }
337  // Alternate lorentz std::vector is always charged + gammas
338  myPFTau.setalternatLorentzVect(alternatLorentzVect);
339 
340  // Optionally add the neutral hadrons to the p4
342  for (std::vector<CandidatePtr>::const_iterator iNeutralHadrCand = mySignalPFNeutrHadrCands.begin();
343  iNeutralHadrCand != mySignalPFNeutrHadrCands.end(); iNeutralHadrCand++) {
344  alternatLorentzVect+=(**iNeutralHadrCand).p4();
345  }
346  }
347  myPFTau.setP4(alternatLorentzVect);
348 
349  // Set tau vertex as PV vertex
350  myPFTau.setVertex(math::XYZPoint(myPV.x(), myPV.y(), myPV.z()));
351  }
352 
353  // set the leading, signal cone and isolation annulus Tracks (the initial list of Tracks was catched through a JetTracksAssociation
354  // object, not through the charged hadr. PFCandidates inside the PFJet ;
355  // the motivation for considering these objects is the need for checking that a selection by the
356  // charged hadr. PFCandidates is equivalent to a selection by the rec. Tracks.)
357  TrackRef myleadTk=myPFTauElementsOperators.leadTk(MatchingConeMetric_,myMatchingConeSize,LeadTrack_minPt_);
358  myPFTau.setleadTrack(myleadTk);
359  if(myleadTk.isNonnull()){
360  double myleadTkDZ = (*myleadTk).dz(myPV.position());
361  double myTrackerSignalConeSize=myPFTauElementsOperators.computeConeSize(myTrackerSignalConeSizeTFormula,TrackerSignalConeSize_min_,TrackerSignalConeSize_max_);
362  double myTrackerIsolConeSize=myPFTauElementsOperators.computeConeSize(myTrackerIsolConeSizeTFormula,TrackerIsolConeSize_min_,TrackerIsolConeSize_max_);
364  myPFTau.setsignalTracks(myPFTauElementsOperators.tracksInCone((*myleadTk).momentum(),TrackerSignalConeMetric_,myTrackerSignalConeSize,PFTauAlgo_Track_minPt_,TrackLeadTrack_maxDZ_,myleadTkDZ, myPV));
365 
366  TrackRefVector myUnfilteredTracks = myPFTauElementsOperators.tracksInAnnulus((*myleadTk).momentum(),TrackerSignalConeMetric_,myTrackerSignalConeSize,TrackerIsolConeMetric_,myTrackerIsolConeSize,PFTauAlgo_Track_minPt_,TrackLeadTrack_maxDZ_,myleadTkDZ, myPV);
368  myPFTau.setisolationTracks(myFilteredTracks);
369 
370  }else{
371  myPFTau.setsignalTracks(myPFTauElementsOperators.tracksInCone((*myleadTk).momentum(),TrackerSignalConeMetric_,myTrackerSignalConeSize,PFTauAlgo_Track_minPt_));
372 
373  TrackRefVector myUnfilteredTracks = myPFTauElementsOperators.tracksInAnnulus((*myleadTk).momentum(),TrackerSignalConeMetric_,myTrackerSignalConeSize,TrackerIsolConeMetric_,myTrackerIsolConeSize,PFTauAlgo_Track_minPt_);
375  myPFTau.setisolationTracks(myFilteredTracks);
376  }
377  }
378 
379 
380  /* For elecron rejection */
381  double myECALenergy = 0.;
382  double myHCALenergy = 0.;
383  double myHCALenergy3x3 = 0.;
384  double myMaximumHCALPFClusterE = 0.;
385  double myMaximumHCALPFClusterEt = 0.;
386  double myStripClusterE = 0.;
387  double myEmfrac = -1.;
388  double myElectronPreIDOutput = -1111.;
389  bool myElecPreid = false;
390  reco::TrackRef myElecTrk;
391 
392  typedef std::pair<reco::PFBlockRef, unsigned> ElementInBlock;
393  typedef std::vector< ElementInBlock > ElementsInBlocks;
394 
395  //Use the electron rejection only in case there is a charged leading pion
396  if(myleadPFChargedCand.isNonnull()){
397  const reco::PFCandidate* pflch = dynamic_cast<const reco::PFCandidate*>(myleadPFChargedCand.get());
398  if (pflch == nullptr)
399  throw cms::Exception("Type Mismatch") << "The PFTau was not made from PFCandidates, and this outdated algorithm was not updated to cope with PFTaus made from other Candidates.\n";
400  myElectronPreIDOutput = pflch->mva_e_pi();
401 
402  math::XYZPointF myElecTrkEcalPos = pflch->positionAtECALEntrance();
403  myElecTrk = pflch->trackRef();//Electron candidate
404 
405  if(myElecTrk.isNonnull()) {
406  //FROM AOD
407  if(DataType_ == "AOD"){
408  // Corrected Cluster energies
409  for(int i=0;i<(int)myPFCands.size();i++){
410  const reco::PFCandidate* myPFCand = dynamic_cast<const reco::PFCandidate*>(myPFCands[i].get());
411  if (myPFCand == nullptr)
412  throw cms::Exception("Type Mismatch") << "The PFTau was not made from PFCandidates, and this outdated algorithm was not updated to cope with PFTaus made from other Candidates.\n";
413  myHCALenergy += myPFCand->hcalEnergy();
414  myECALenergy += myPFCand->ecalEnergy();
415 
416  math::XYZPointF candPos;
417  if (myPFCand->particleId()==1 || myPFCand->particleId()==2)//if charged hadron or electron
418  candPos = myPFCand->positionAtECALEntrance();
419  else
420  candPos = math::XYZPointF(myPFCand->px(),myPFCand->py(),myPFCand->pz());
421 
422  double deltaR = ROOT::Math::VectorUtil::DeltaR(myElecTrkEcalPos,candPos);
423  double deltaPhi = ROOT::Math::VectorUtil::DeltaPhi(myElecTrkEcalPos,candPos);
424  double deltaEta = std::abs(myElecTrkEcalPos.eta()-candPos.eta());
425  double deltaPhiOverQ = deltaPhi/(double)myElecTrk->charge();
426 
427  if (myPFCand->ecalEnergy() >= EcalStripSumE_minClusEnergy_ && deltaEta < EcalStripSumE_deltaEta_ &&
429  myStripClusterE += myPFCand->ecalEnergy();
430  }
431  if (deltaR<0.184) {
432  myHCALenergy3x3 += myPFCand->hcalEnergy();
433  }
434  if (myPFCand->hcalEnergy()>myMaximumHCALPFClusterE) {
435  myMaximumHCALPFClusterE = myPFCand->hcalEnergy();
436  }
437  if ((myPFCand->hcalEnergy()*fabs(sin(candPos.Theta())))>myMaximumHCALPFClusterEt) {
438  myMaximumHCALPFClusterEt = (myPFCand->hcalEnergy()*fabs(sin(candPos.Theta())));
439  }
440  }
441 
442  } else if(DataType_ == "RECO"){ //From RECO
443  // Against double counting of clusters
444  std::vector<math::XYZPoint> hcalPosV; hcalPosV.clear();
445  std::vector<math::XYZPoint> ecalPosV; ecalPosV.clear();
446  for(int i=0;i<(int)myPFCands.size();i++){
447  const reco::PFCandidate* myPFCand = dynamic_cast<const reco::PFCandidate*>(myPFCands[i].get());
448  if (myPFCand == nullptr)
449  throw cms::Exception("Type Mismatch") << "The PFTau was not made from PFCandidates, and this outdated algorithm was not updated to cope with PFTaus made from other Candidates.\n";
450  const ElementsInBlocks& elts = myPFCand->elementsInBlocks();
451  for(ElementsInBlocks::const_iterator it=elts.begin(); it!=elts.end(); ++it) {
452  const reco::PFBlock& block = *(it->first);
453  unsigned indexOfElementInBlock = it->second;
455  assert(indexOfElementInBlock<elements.size());
456 
457  const reco::PFBlockElement& element = elements[indexOfElementInBlock];
458 
459  if(element.type()==reco::PFBlockElement::HCAL) {
460  math::XYZPoint clusPos = element.clusterRef()->position();
461  double en = (double)element.clusterRef()->energy();
462  double et = (double)element.clusterRef()->energy()*fabs(sin(clusPos.Theta()));
463  if (en>myMaximumHCALPFClusterE) {
464  myMaximumHCALPFClusterE = en;
465  }
466  if (et>myMaximumHCALPFClusterEt) {
467  myMaximumHCALPFClusterEt = et;
468  }
469  if (!checkPos(hcalPosV,clusPos)) {
470  hcalPosV.push_back(clusPos);
471  myHCALenergy += en;
472  double deltaR = ROOT::Math::VectorUtil::DeltaR(myElecTrkEcalPos,clusPos);
473  if (deltaR<0.184) {
474  myHCALenergy3x3 += en;
475  }
476  }
477  } else if(element.type()==reco::PFBlockElement::ECAL) {
478  double en = (double)element.clusterRef()->energy();
479  math::XYZPoint clusPos = element.clusterRef()->position();
480  if (!checkPos(ecalPosV,clusPos)) {
481  ecalPosV.push_back(clusPos);
482  myECALenergy += en;
483  double deltaPhi = ROOT::Math::VectorUtil::DeltaPhi(myElecTrkEcalPos,clusPos);
484  double deltaEta = std::abs(myElecTrkEcalPos.eta()-clusPos.eta());
485  double deltaPhiOverQ = deltaPhi/(double)myElecTrk->charge();
486  if (en >= EcalStripSumE_minClusEnergy_ && deltaEta<EcalStripSumE_deltaEta_ && deltaPhiOverQ > EcalStripSumE_deltaPhiOverQ_minValue_ && deltaPhiOverQ < EcalStripSumE_deltaPhiOverQ_maxValue_) {
487  myStripClusterE += en;
488  }
489  }
490  }
491  } //end elements in blocks
492  } //end loop over PFcands
493  } //end RECO case
494  } // end check for null electrk
495  } // end check for null pfChargedHadrCand
496 
497  if ((myHCALenergy+myECALenergy)>0.)
498  myEmfrac = myECALenergy/(myHCALenergy+myECALenergy);
499  myPFTau.setemFraction((float)myEmfrac);
500 
501  // scale the appropriate quantities by the momentum of the electron if it exists
502  if (myElecTrk.isNonnull())
503  {
504  float myElectronMomentum = (float)myElecTrk->p();
505  if (myElectronMomentum > 0.)
506  {
507  myHCALenergy /= myElectronMomentum;
508  myMaximumHCALPFClusterE /= myElectronMomentum;
509  myHCALenergy3x3 /= myElectronMomentum;
510  myStripClusterE /= myElectronMomentum;
511  }
512  }
513  myPFTau.sethcalTotOverPLead((float)myHCALenergy);
514  myPFTau.sethcalMaxOverPLead((float)myMaximumHCALPFClusterE);
515  myPFTau.sethcal3x3OverPLead((float)myHCALenergy3x3);
516  myPFTau.setecalStripSumEOverPLead((float)myStripClusterE);
517  myPFTau.setmaximumHCALPFClusterEt(myMaximumHCALPFClusterEt);
518  myPFTau.setelectronPreIDOutput(myElectronPreIDOutput);
519  if (myElecTrk.isNonnull())
520  myPFTau.setelectronPreIDTrack(myElecTrk);
521  if (myElectronPreIDOutput > maximumForElectrionPreIDOutput_)
522  myElecPreid = true;
523  myPFTau.setelectronPreIDDecision(myElecPreid);
524 
525  // These need to be filled!
526  //myPFTau.setbremsRecoveryEOverPLead(my...);
527 
528  /* End elecron rejection */
529 
530  return myPFTau;
531 }
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:222
Abstract base class for a PFBlock element (track, cluster...)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
#define PFTauAlgo_ChargedHadrCand_minPt_
double maximumForElectrionPreIDOutput_
const TransientTrackBuilder * TransientTrackBuilder_
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:159
double y() const
y coordinate
Definition: Vertex.h:113
uint32_t ChargedHadrCand_IsolAnnulus_minNhits_
double px() const final
x coordinate of momentum vector
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:50
size_type size() const
Definition: OwnVector.h:264
#define PFTauAlgo_Track_minPt_
reco::TransientTrack build(const reco::Track *p) const
bool UseChargedHadrCandLeadChargedHadrCand_tksDZconstraint_
const edm::OwnVector< reco::PFBlockElement > & elements() const
Definition: PFBlock.h:107
double EcalStripSumE_deltaPhiOverQ_minValue_
TFormula myHCALSignalConeSizeTFormula
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
const Point & position() const
position
Definition: Vertex.h:109
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFCandidate.h:368
static const double deltaEta
Definition: CaloConstants.h:8
double ChargedHadrCandLeadChargedHadrCand_tksmaxDZ_
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:442
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
#define PFTauAlgo_NeutrHadrCand_minPt_
TFormula myTrackerSignalConeSizeTFormula
std::string ECALSignalConeMetric_
double pz() const final
z coordinate of momentum vector
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double z() const
z coordinate
Definition: Vertex.h:115
TFormula myECALSignalConeSizeTFormula
uint32_t Track_IsolAnnulus_minNhits_
std::string ECALIsolConeMetric_
double computeDeltaR(const math::XYZVector &vec1, const math::XYZVector &vec2)
Definition: TauTagTools.cc:8
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
std::string TrackerSignalConeMetric_
float mva_e_pi() const
mva for electron-pion discrimination
Definition: PFCandidate.h:314
double x() const
x coordinate
Definition: Vertex.h:111
std::vector< ElementInBlock > ElementsInBlocks
TFormula myMatchingConeSizeTFormula
double EcalStripSumE_deltaPhiOverQ_maxValue_
TFormula myHCALIsolConeSizeTFormula
virtual double pt() const =0
transverse momentum
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
bool checkPos(const std::vector< math::XYZPoint > &, const math::XYZPoint &) const
TFormula myTrackerIsolConeSizeTFormula
double py() const final
y coordinate of momentum vector
std::pair< reco::PFBlockRef, unsigned > ElementInBlock
et
define resolution functions of each parameter
std::vector< reco::CandidatePtr > filteredPFChargedHadrCandsByNumTrkHits(const std::vector< reco::CandidatePtr > &theInitialPFCands, int ChargedHadrCand_tkminTrackerHitsn)
Definition: TauTagTools.cc:104
virtual Vector momentum() const =0
spatial momentum vector
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
reco::TrackRefVector filteredTracksByNumTrkHits(const reco::TrackRefVector &theInitialTracks, int tkminTrackerHitsn)
Definition: TauTagTools.cc:68
#define PFTauAlgo_GammaCand_minPt_
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:232
std::string MatchingConeMetric_
virtual ParticleType particleId() const
Definition: PFCandidate.h:374
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:691
std::string TrackerIsolConeMetric_
std::string HCALSignalConeMetric_
TFormula myECALIsolConeSizeTFormula
#define PFTauAlgo_PFCand_minPt_
void setpfTauTagInfoRef(const PFTauTagInfoRef)
Definition: PFTau.cc:65
Block of elements.
Definition: PFBlock.h:30
std::string HCALIsolConeMetric_
bool PFRecoTauAlgorithm::checkPos ( const std::vector< math::XYZPoint > &  CalPos,
const math::XYZPoint CandPos 
) const
private

Definition at line 534 of file PFRecoTauAlgorithm.cc.

References RemoveAddSevLevel::flag, and mps_fire::i.

Referenced by buildPFTau(), and ~PFRecoTauAlgorithm().

534  {
535  bool flag = false;
536  for (unsigned int i=0;i<CalPos.size();i++) {
537  if (CalPos[i] == CandPos) {
538  flag = true;
539  break;
540  }
541  }
542  return flag;
543  //return false;

Member Data Documentation

bool PFRecoTauAlgorithm::AddEllipseGammas_
private

Definition at line 71 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::AreaMetric_recoElements_maxabsEta_
private

Definition at line 67 of file PFRecoTauAlgorithm.h.

Referenced by PFRecoTauAlgorithm().

uint32_t PFRecoTauAlgorithm::ChargedHadrCand_IsolAnnulus_minNhits_
private

Definition at line 74 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::ChargedHadrCandLeadChargedHadrCand_tksmaxDZ_
private

Definition at line 35 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::DataType_
private

Definition at line 80 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::ECALIsolConeMetric_
private

Definition at line 55 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::ECALIsolConeSize_max_
private

Definition at line 58 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::ECALIsolConeSize_min_
private

Definition at line 57 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::ECALIsolConeSizeFormula_
private

Definition at line 56 of file PFRecoTauAlgorithm.h.

Referenced by PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::ECALSignalConeMetric_
private

Definition at line 51 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::ECALSignalConeSize_max_
private

Definition at line 54 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::ECALSignalConeSize_min_
private

Definition at line 53 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::ECALSignalConeSizeFormula_
private

Definition at line 52 of file PFRecoTauAlgorithm.h.

Referenced by PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::EcalStripSumE_deltaEta_
private

Definition at line 84 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::EcalStripSumE_deltaPhiOverQ_maxValue_
private

Definition at line 86 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::EcalStripSumE_deltaPhiOverQ_minValue_
private

Definition at line 85 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::EcalStripSumE_minClusEnergy_
private

Definition at line 83 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::ElecPreIDLeadTkMatch_maxDR_
private

Definition at line 82 of file PFRecoTauAlgorithm.h.

Referenced by PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::HCALIsolConeMetric_
private

Definition at line 63 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::HCALIsolConeSize_max_
private

Definition at line 66 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::HCALIsolConeSize_min_
private

Definition at line 65 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::HCALIsolConeSizeFormula_
private

Definition at line 64 of file PFRecoTauAlgorithm.h.

Referenced by PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::HCALSignalConeMetric_
private

Definition at line 59 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::HCALSignalConeSize_max_
private

Definition at line 62 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::HCALSignalConeSize_min_
private

Definition at line 61 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::HCALSignalConeSizeFormula_
private

Definition at line 60 of file PFRecoTauAlgorithm.h.

Referenced by PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::LeadPFCand_minPt_
private

Definition at line 32 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::LeadTrack_minPt_
private

Definition at line 33 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::MatchingConeMetric_
private

Definition at line 39 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::MatchingConeSize_max_
private

Definition at line 42 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::MatchingConeSize_min_
private

Definition at line 41 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::MatchingConeSizeFormula_
private

Definition at line 40 of file PFRecoTauAlgorithm.h.

Referenced by PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::MaxEtInEllipse_
private

Definition at line 70 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::maximumForElectrionPreIDOutput_
private

Definition at line 87 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

TFormula PFRecoTauAlgorithm::myECALIsolConeSizeTFormula
private

Definition at line 89 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

TFormula PFRecoTauAlgorithm::myECALSignalConeSizeTFormula
private

Definition at line 89 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

TFormula PFRecoTauAlgorithm::myHCALIsolConeSizeTFormula
private

Definition at line 89 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

TFormula PFRecoTauAlgorithm::myHCALSignalConeSizeTFormula
private

Definition at line 89 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

TFormula PFRecoTauAlgorithm::myMatchingConeSizeTFormula
private

Definition at line 89 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

TFormula PFRecoTauAlgorithm::myTrackerIsolConeSizeTFormula
private

Definition at line 89 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

TFormula PFRecoTauAlgorithm::myTrackerSignalConeSizeTFormula
private

Definition at line 89 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

bool PFRecoTauAlgorithm::putNeutralHadronsInP4_
private

Definition at line 78 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::Rphi_
private

Definition at line 69 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

uint32_t PFRecoTauAlgorithm::Track_IsolAnnulus_minNhits_
private

Definition at line 75 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::TrackerIsolConeMetric_
private

Definition at line 47 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::TrackerIsolConeSize_max_
private

Definition at line 50 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::TrackerIsolConeSize_min_
private

Definition at line 49 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::TrackerIsolConeSizeFormula_
private

Definition at line 48 of file PFRecoTauAlgorithm.h.

Referenced by PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::TrackerSignalConeMetric_
private

Definition at line 43 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::TrackerSignalConeSize_max_
private

Definition at line 46 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::TrackerSignalConeSize_min_
private

Definition at line 45 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

std::string PFRecoTauAlgorithm::TrackerSignalConeSizeFormula_
private

Definition at line 44 of file PFRecoTauAlgorithm.h.

Referenced by PFRecoTauAlgorithm().

double PFRecoTauAlgorithm::TrackLeadTrack_maxDZ_
private

Definition at line 38 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

bool PFRecoTauAlgorithm::UseChargedHadrCandLeadChargedHadrCand_tksDZconstraint_
private

Definition at line 34 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().

bool PFRecoTauAlgorithm::UseTrackLeadTrackDZconstraint_
private

Definition at line 37 of file PFRecoTauAlgorithm.h.

Referenced by buildPFTau(), and PFRecoTauAlgorithm().