CMS 3D CMS Logo

PFRecoTauDecayModeDeterminator.h

Go to the documentation of this file.
00001 #ifndef RecoTauTag_RecoTau_PFRecoTauDecayModeDeterminator
00002 #define RecoTauTag_RecoTau_PFRecoTauDecayModeDeterminator
00003 
00004 /* class PFRecoTauDecayModeDeterminator
00005  *
00006  * Takes PFCandidates from PFTau and reconstructs tau decay mode.
00007  * Notably, merges photons (PFGammas) into pi zeros.
00008  * PFChargedHadrons are assumed to be charged pions.
00009  * Output candidate collections are owned (as shallow clones) by this object.
00010  * 
00011  * author: Evan K. Friis, UC Davis (evan.klose.friis@cern.ch) 
00012  */
00013 
00014 #include "DataFormats/TauReco/interface/PFTauTagInfo.h"
00015 #include "DataFormats/TauReco/interface/PFTauDecayMode.h"
00016 #include "DataFormats/TauReco/interface/PFTauDecayModeAssociation.h"
00017 #include "DataFormats/TauReco/interface/PFTau.h"
00018 #include "DataFormats/Candidate/interface/Candidate.h"
00019 #include "DataFormats/Candidate/interface/ShallowCloneCandidate.h"
00020 #include "RecoTauTag/TauTagTools/interface/TauTagTools.h"
00021 
00022 #include "FWCore/Framework/interface/EventSetup.h"
00023 #include "FWCore/Framework/interface/ESHandle.h"
00024 #include "FWCore/Framework/interface/Event.h"
00025 #include "FWCore/Framework/interface/MakerMacros.h"
00026 #include "FWCore/Framework/interface/Frameworkfwd.h"
00027 #include "FWCore/Framework/interface/EDProducer.h"
00028 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00029 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00030 
00031 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
00032 #include "TrackingTools/Records/interface/TransientTrackRecord.h"
00033 #include "RecoTauTag/TauTagTools/interface/PFCandCommonVertexFitter.h"
00034 #include "RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h"
00035 #include "PhysicsTools/CandUtils/interface/AddFourMomenta.h"
00036 
00037 #include "CLHEP/Random/RandGauss.h"
00038 
00039 #include <memory>
00040 #include <algorithm>
00041 
00042 using namespace reco;
00043 using namespace edm;
00044 using namespace std;
00045 typedef reco::Particle::LorentzVector LorentzVector;
00046 
00047 class PFRecoTauDecayModeDeterminator : public EDProducer {
00048  public:
00049 
00050   typedef list<CompositeCandidate>                    compCandList;
00051   typedef list<CompositeCandidate>::reverse_iterator  compCandRevIter;
00052 
00053   void mergePiZeroes(compCandList&, compCandRevIter);
00054 
00055   explicit PFRecoTauDecayModeDeterminator(const ParameterSet& iConfig);
00056   ~PFRecoTauDecayModeDeterminator();
00057   virtual void produce(Event&,const EventSetup&);
00058 
00059  protected:
00060   const double chargedPionMass;
00061   const double neutralPionMass;
00062 
00063  private:
00064   PFCandCommonVertexFitterBase* vertexFitter_;
00065   InputTag              PFTauProducer_;
00066   AddFourMomenta        addP4;
00067   uint32_t              maxPhotonsToMerge_;             //number of photons allowed in a merged pi0
00068   double                maxPiZeroMass_;             
00069   bool                  mergeLowPtPhotonsFirst_;
00070   bool                  refitTracks_;
00071   bool                  filterTwoProngs_;
00072   bool                  filterPhotons_;  
00073   double                minPtFractionForSecondProng_;   //2 prongs whose second prong falls under 
00074   double                minPtFractionForGammas_;        //outlier unmerged gammas
00075   TauTagTools::sortByDescendingPt<CompositeCandidate>   candDescendingSorter;
00076   TauTagTools::sortByAscendingPt<CompositeCandidate>    candAscendingSorter;
00077 };
00078 
00079 
00080 #endif
00081 

Generated on Tue Jun 9 17:45:01 2009 for CMSSW by  doxygen 1.5.4