Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions MiniAODHelper/interface/MiniAODHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,32 @@ class MiniAODHelper{
template <typename T, typename S> std::vector<T> GetDifference( const std::vector<S>&, const std::vector<T>& );
template <typename T, typename S> std::vector<T> GetUnion( const std::vector<S>&, const std::vector<T>& );

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;
Expand Down Expand Up @@ -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,
Expand All @@ -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<double> JER_etaMin;
std::vector<double> JER_etaMax;
std::vector<double> JER_rhoMin;
Expand Down