From 22cd444840ed6a9743b7d3e80f607745de6d8dd7 Mon Sep 17 00:00:00 2001 From: Satoshi Hasegawa Date: Fri, 10 Feb 2017 10:14:01 -0600 Subject: [PATCH] Restructure of definition in MiniAOLDHelper class : Move functions and a structure to public. THe functions are also set to static. structure _topquarkdecayobjects function FillTopQuarkDecayInfomration GetObjectJustBeforeDecay --- MiniAODHelper/interface/MiniAODHelper.h | 52 ++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/MiniAODHelper/interface/MiniAODHelper.h b/MiniAODHelper/interface/MiniAODHelper.h index 02e07c4..e9ab9fb 100644 --- a/MiniAODHelper/interface/MiniAODHelper.h +++ b/MiniAODHelper/interface/MiniAODHelper.h @@ -244,6 +244,32 @@ class MiniAODHelper{ template std::vector GetDifference( const std::vector&, const std::vector& ); template std::vector GetUnion( const std::vector&, const std::vector& ); + struct _topquarkdecayobjects { + const reco::Candidate * top ; + const reco::Candidate * bottom ; + const reco::Candidate * W ; + const reco::Candidate * WChild_up; + const reco::Candidate * WChild_down; + bool isWChild_tau ; + const reco::Candidate * Tau_Neu ; + std::vector< const reco::Candidate *> TauChildren ; + + bool isLeptonicDecay(){ + return + abs( WChild_down->pdgId() ) == 11 + || + abs( WChild_down->pdgId() ) == 13 + || + isWChild_tau ; + } + + }; // end structure . + + static void FillTopQuarkDecayInfomration ( const reco::Candidate * c , + struct _topquarkdecayobjects * topdecayobjects) ; + + static const reco::Candidate * GetObjectJustBeforeDecay( const reco::Candidate * particle ); + protected: bool isSetUp; @@ -280,30 +306,8 @@ class MiniAODHelper{ inline void CheckSetUp() const { if(!isSetUp){ ThrowFatalError("MiniAODHelper not yet set up."); } }; inline void CheckVertexSetUp() const { if(!vertexIsSet){ ThrowFatalError("Vertex is not set."); } }; - private : - struct _topquarkdecayobjects { - const reco::Candidate * top ; - const reco::Candidate * bottom ; - const reco::Candidate * W ; - const reco::Candidate * WChild_up; - const reco::Candidate * WChild_down; - bool isWChild_tau ; - const reco::Candidate * Tau_Neu ; - std::vector< const reco::Candidate *> TauChildren ; - - bool isLeptonicDecay(){ - return - abs( WChild_down->pdgId() ) == 11 - || - abs( WChild_down->pdgId() ) == 13 - || - isWChild_tau ; - } - - }; // end structure . - void ApplyJetEnergyCorrection(pat::Jet& jet, double& totalCorrFactor, const edm::Event& event, @@ -325,13 +329,9 @@ class MiniAODHelper{ double GetJECUncertainty(const pat::Jet& jet, const edm::EventSetup& iSetup, const sysType::sysType iSysType); - void FillTopQuarkDecayInfomration ( const reco::Candidate * c , - struct _topquarkdecayobjects * topdecayobjects) ; bool checkIfRegisterd( const reco::Candidate * candidate , std::vector< const reco::Candidate * > list ); - const reco::Candidate * GetObjectJustBeforeDecay( const reco::Candidate * particle ); - std::vector JER_etaMin; std::vector JER_etaMax; std::vector JER_rhoMin;