CMS 3D CMS Logo

RecoTauTauTagInfoWorkaroundModifier.cc
Go to the documentation of this file.
1 /*
2  * ===========================================================================
3  *
4  * Filename: RecoTauTagInfoWorkaroundModifer
5  *
6  * Description: Add the PFTauTagInfoRef back to PFTaus so things don't
7  * break.
8  *
9  * Author: Evan K. Friis (UC Davis)
10  *
11  * ===========================================================================
12  */
13 
16 
17 namespace reco { namespace tau {
18 
20  public:
23  void operator()(PFTau&) const override;
24  // Called by base class
25  void beginEvent() override;
26  private:
30 };
31 
34  pfTauTagInfoSrc_ = pset.getParameter<edm::InputTag>("pfTauTagInfoSrc");
36 }
37 
38 // Load our tau tag infos from the event
40 
42 }
43 
45  // Find the PFTauTagInfo that comes from the same PFJet
46  JetBaseRef tauJetRef = tau.jetRef();
47  for(size_t iInfo = 0; iInfo < infos_->size(); ++iInfo) {
48  // Get jet ref from tau tag info
49  PFTauTagInfoRef infoRef = PFTauTagInfoRef(infos_, iInfo);
50  JetBaseRef infoJetRef = infoRef->pfjetRef();
51  // Check if they come from the same jet
52  if (infoJetRef == tauJetRef) {
53  // This tau "comes" from this PFJetRef
54  tau.setpfTauTagInfoRef(infoRef);
55  break;
56  }
57  }
58 }
59 }} // end namespace reco::tau
63  "RecoTauTagInfoWorkaroundModifer");
std::vector< PFTauTagInfo > PFTauTagInfoCollection
collection of PFTauTagInfo objects
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< PFTauTagInfoCollection > pfTauTagInfo_token
const JetBaseRef & jetRef() const
Definition: PFTau.cc:58
RecoTauTagInfoWorkaroundModifer(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
fixed size matrix
#define DEFINE_EDM_PLUGIN(factory, type, name)
def move(src, dest)
Definition: eostools.py:511
edm::Ref< PFTauTagInfoCollection > PFTauTagInfoRef
presistent reference to a PFTauTagInfo
void setpfTauTagInfoRef(const PFTauTagInfoRef)
Definition: PFTau.cc:65