Skip to content

Commit

Permalink
remove CaloTau data formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Wozniewski committed Jun 28, 2019
1 parent 92b5294 commit b9e2152
Show file tree
Hide file tree
Showing 27 changed files with 12 additions and 726 deletions.
2 changes: 0 additions & 2 deletions DQM/Physics/src/ExoticaDQM.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
#include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
#include "DataFormats/EgammaCandidates/interface/Photon.h"
#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
#include "DataFormats/TauReco/interface/CaloTau.h"
#include "DataFormats/TauReco/interface/CaloTauFwd.h"
#include "DataFormats/TauReco/interface/PFTau.h"
#include "DataFormats/JetReco/interface/PFJetCollection.h"
#include "DataFormats/JetReco/interface/CaloJetCollection.h"
Expand Down
1 change: 0 additions & 1 deletion DQMOffline/Trigger/interface/HLTTauRefProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
// TAU includes
#include "DataFormats/TauReco/interface/PFTau.h"
#include "DataFormats/TauReco/interface/PFTauDiscriminator.h"
#include "DataFormats/TauReco/interface/CaloTau.h"

// ELECTRON includes
#include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
Expand Down
2 changes: 0 additions & 2 deletions DQMOffline/Trigger/plugins/HLTTauRefProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// TAU includes
#include "DataFormats/TauReco/interface/PFTau.h"
#include "DataFormats/TauReco/interface/PFTauDiscriminator.h"
#include "DataFormats/TauReco/interface/CaloTau.h"
#include "DataFormats/TauReco/interface/CaloTauDiscriminatorByIsolation.h"
// ELECTRON includes
#include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
#include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
Expand Down
42 changes: 2 additions & 40 deletions DataFormats/PatCandidates/interface/Tau.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
pat::Tau implements the analysis-level tau class within the 'pat' namespace.
It inherits from reco::BaseTau, copies all the information from the source
reco::CaloTau or reco::PFTau, and adds some PAT-specific variables.
reco::PFTau, and adds some PAT-specific variables.
Please post comments and questions to the Physics Tools hypernews:
https://hypernews.cern.ch/HyperNews/CMS/get/physTools.html
Expand All @@ -25,7 +25,6 @@
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"

#include "DataFormats/PatCandidates/interface/TauPFSpecific.h"
#include "DataFormats/PatCandidates/interface/TauCaloSpecific.h"
#include "DataFormats/PatCandidates/interface/TauJetCorrFactors.h"
#include "DataFormats/PatCandidates/interface/TauPFEssential.h"

Expand Down Expand Up @@ -117,39 +116,6 @@ namespace pat {
/// set the matched GenJet
void setGenJet(const reco::GenJetRef& ref);

// ---- CaloTau accessors (getters only) ----
/// Returns true if this pat::Tau was made from a reco::CaloTau
bool isCaloTau() const { return !caloSpecific_.empty(); }
/// return CaloTau info or throw exception 'not CaloTau'
const pat::tau::TauCaloSpecific& caloSpecific() const;
/// Method copied from reco::CaloTau.
/// Throws an exception if this pat::Tau was not made from a reco::CaloTau
reco::CaloTauTagInfoRef caloTauTagInfoRef() const { return caloSpecific().CaloTauTagInfoRef_; }
/// Method copied from reco::CaloTau.
/// Throws an exception if this pat::Tau was not made from a reco::CaloTau
float leadTracksignedSipt() const { return caloSpecific().leadTracksignedSipt_; }
/// Method copied from reco::CaloTau.
/// Throws an exception if this pat::Tau was not made from a reco::CaloTau
float leadTrackHCAL3x3hitsEtSum() const { return caloSpecific().leadTrackHCAL3x3hitsEtSum_; }
/// Method copied from reco::CaloTau.
/// Throws an exception if this pat::Tau was not made from a reco::CaloTau
float leadTrackHCAL3x3hottesthitDEta() const { return caloSpecific().leadTrackHCAL3x3hottesthitDEta_; }
/// Method copied from reco::CaloTau.
/// Throws an exception if this pat::Tau was not made from a reco::CaloTau
float signalTracksInvariantMass() const { return caloSpecific().signalTracksInvariantMass_; }
/// Method copied from reco::CaloTau.
/// Throws an exception if this pat::Tau was not made from a reco::CaloTau
float TracksInvariantMass() const { return caloSpecific().TracksInvariantMass_; }
/// Method copied from reco::CaloTau.
/// Throws an exception if this pat::Tau was not made from a reco::CaloTau
float isolationTracksPtSum() const { return caloSpecific().isolationTracksPtSum_; }
/// Method copied from reco::CaloTau.
/// Throws an exception if this pat::Tau was not made from a reco::CaloTau
float isolationECALhitsEtSum() const { return caloSpecific().isolationECALhitsEtSum_; }
/// Method copied from reco::CaloTau.
/// Throws an exception if this pat::Tau was not made from a reco::CaloTau
float maximumHCALhitEt() const { return caloSpecific().maximumHCALhitEt_; }

// ---- PFTau accessors (getters only) ----
/// Returns true if this pat::Tau was made from a reco::PFTau
bool isPFTau() const { return !pfSpecific_.empty(); }
Expand Down Expand Up @@ -352,7 +318,7 @@ namespace pat {
float emFraction_MVA() const { return pfEssential().emFraction_; }

/// Methods copied from reco::Jet.
/// (accessible from reco::CaloTau/reco::PFTau via reco::CaloTauTagInfo/reco::PFTauTagInfo)
/// (accessible from reco::PFTau via reco::PFTauTagInfo)
reco::Candidate::LorentzVector p4Jet() const;
float etaetaMoment() const;
float phiphiMoment() const;
Expand Down Expand Up @@ -502,10 +468,6 @@ namespace pat {
/// holder for PFTau info, or empty vector if CaloTau
std::vector<pat::tau::TauPFSpecific> pfSpecific_;

// ---- CaloTau specific variables ----
/// holder for CaloTau info, or empty vector if PFTau
std::vector<pat::tau::TauCaloSpecific> caloSpecific_;

// ---- energy scale correction factors ----
// energy scale correction factors; the string carries a potential label if
// more then one set of correction factors is embedded. The label corresponds
Expand Down
44 changes: 0 additions & 44 deletions DataFormats/PatCandidates/interface/TauCaloSpecific.h

This file was deleted.

34 changes: 8 additions & 26 deletions DataFormats/PatCandidates/src/Tau.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ void Tau::initFromBaseTau(const reco::BaseTau& aTau) {
}
pfEssential_.push_back(pat::tau::TauPFEssential(*pfTau));
}
const reco::CaloTau* caloTau = dynamic_cast<const reco::CaloTau*>(&aTau);
if (caloTau != nullptr)
caloSpecific_.push_back(pat::tau::TauCaloSpecific(*caloTau));
}

/// destructor
Expand Down Expand Up @@ -255,20 +252,11 @@ const pat::tau::TauPFEssential& Tau::pfEssential() const {
return pfEssential_[0];
}

const pat::tau::TauCaloSpecific& Tau::caloSpecific() const {
if (!isCaloTau())
throw cms::Exception("Type Error")
<< "Requesting a CaloTau-specific information from a pat::Tau which wasn't made from a CaloTau.\n";
return caloSpecific_[0];
}

reco::Candidate::LorentzVector Tau::p4Jet() const {
if (isCaloTau())
return caloSpecific().p4Jet_;
if (isPFTau())
return reco::Candidate::LorentzVector(pfEssential().p4Jet_);
throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't "
"made from either a CaloTau or a PFTau.\n";
throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't "
"made from a PFTau.\n";
}

float Tau::dxy_Sig() const {
Expand Down Expand Up @@ -298,30 +286,24 @@ float Tau::ip3d_Sig() const {
}

float Tau::etaetaMoment() const {
if (isCaloTau())
return caloSpecific().etaetaMoment_;
if (isPFTau())
return pfSpecific().etaetaMoment_;
throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't "
"made from either a CaloTau or a PFTau.\n";
throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't "
"made from a PFTau.\n";
}

float Tau::phiphiMoment() const {
if (isCaloTau())
return caloSpecific().phiphiMoment_;
if (isPFTau())
return pfSpecific().phiphiMoment_;
throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't "
"made from either a CaloTau or a PFTau.\n";
throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't "
"made from a PFTau.\n";
}

float Tau::etaphiMoment() const {
if (isCaloTau())
return caloSpecific().etaphiMoment_;
if (isPFTau())
return pfSpecific().etaphiMoment_;
throw cms::Exception("Type Error") << "Requesting a CaloTau/PFTau-specific information from a pat::Tau which wasn't "
"made from either a CaloTau or a PFTau.\n";
throw cms::Exception("Type Error") << "Requesting a PFTau-specific information from a pat::Tau which wasn't "
"made from a PFTau.\n";
}

void Tau::setDecayMode(int decayMode) {
Expand Down
18 changes: 0 additions & 18 deletions DataFormats/PatCandidates/src/TauCaloSpecific.cc

This file was deleted.

8 changes: 2 additions & 6 deletions DataFormats/PatCandidates/src/classes_def_objects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
<![CDATA[ cachedIP_ = onfile.cachedIP_[1] + 2*onfile.cachedIP_[2] + 4*onfile.cachedIP_[3] + 8*onfile.cachedIP_[4]; ]]>
</ioread>

<class name="pat::Tau" ClassVersion="18">
<class name="pat::Tau" ClassVersion="19">
<version ClassVersion="19" checksum="4141787547"/>
<version ClassVersion="18" checksum="3279584614"/>
<version ClassVersion="17" checksum="2561486007"/>
<version ClassVersion="16" checksum="2793593983"/>
Expand Down Expand Up @@ -177,11 +178,6 @@
</class>
<class name="std::vector<pat::tau::TauPFSpecific>" />

<class name="pat::tau::TauCaloSpecific" ClassVersion="11">
<version ClassVersion="11" checksum="943826557"/>
<version ClassVersion="10" checksum="2692173055"/>
</class>
<class name="std::vector<pat::tau::TauCaloSpecific>" />
<class name="pat::tau::TauPFEssential" ClassVersion="14">
<version ClassVersion="14" checksum="524735083" />
<version ClassVersion="13" checksum="1052833547" />
Expand Down
77 changes: 0 additions & 77 deletions DataFormats/TauReco/interface/CaloTau.h

This file was deleted.

26 changes: 0 additions & 26 deletions DataFormats/TauReco/interface/CaloTauDiscriminator.h

This file was deleted.

This file was deleted.

Loading

0 comments on commit b9e2152

Please sign in to comment.