Skip to content

Commit

Permalink
Merge pull request cms-sw#86 from amarini/topic_fix
Browse files Browse the repository at this point in the history
fix errors
  • Loading branch information
amarini committed Nov 14, 2016
2 parents 8f5d81c + 8dee3a2 commit 1d1215d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
27 changes: 14 additions & 13 deletions interface/Tau.hpp
Expand Up @@ -30,19 +30,20 @@ class Tau: virtual public Object,


public:
void SetTrackPt(const float& x){trackpt_=x;}
void SetTrackPtCut(const float& x){trackptcut_=x;}
void SetEtaCut(const float& x){etacut_=x;}
void SetProngsCut(const int& x){selectprongs_=x;}
void SetDecayMode(const int& x){selectdecay_=x;} // 0=NEW, 1=OLD

void SetMuRej(bool x ) { doMuRej_ = x;}
void SetEleRej(bool x ) { doEleRej_ = x;}
void SetNProng(int n) {nprong=n;}
void SetNPiZero(int n){npizero=n;}

int GetNProng() const { return nprong;}
int GetNPiZero() const { return npizero;}
void inline SetOldId(const bool &x){oldId=x;}
void inline SetTrackPt(const float& x){trackpt_=x;}
void inline SetTrackPtCut(const float& x){trackptcut_=x;}
void inline SetEtaCut(const float& x){etacut_=x;}
void inline SetProngsCut(const int& x){selectprongs_=x;}
void inline SetDecayMode(const int& x){selectdecay_=x;} // 0=NEW, 1=OLD

void inline SetMuRej(bool x ) { doMuRej_ = x;}
void inline SetEleRej(bool x ) { doEleRej_ = x;}
void inline SetNProng(int n) {nprong=n;}
void inline SetNPiZero(int n){npizero=n;}

int inline GetNProng() const { return nprong;}
int inline GetNPiZero() const { return npizero;}

Tau() ;
bool id;
Expand Down
2 changes: 1 addition & 1 deletion src/Loader.cpp
Expand Up @@ -286,7 +286,7 @@ void LoadNero::FillTaus(){
t-> charge = bt -> Q -> at(iL);
t-> type = 15;
t-> id = (bt -> selBits -> at(iL) ) & BareTaus::Selection::TauDecayModeFindingNewDMs;
t-> oldId = (bt -> selBits -> at(iL) ) & BareTaus::Selection::TauDecayModeFinding;
t-> SetOldId( (bt -> selBits -> at(iL) ) & BareTaus::Selection::TauDecayModeFinding ) ;
t-> iso2 = bt -> isoDeltaBetaCorr -> at(iL);
//t-> iso2 = bt -> isoMva -> at(iL);
//t-> id_ele = (bt -> selBits -> at(iL) ) & BareTaus::Selection::AgainstEleMedium ;
Expand Down
12 changes: 8 additions & 4 deletions src/Tau.cpp
Expand Up @@ -28,10 +28,10 @@ int Tau::IsTau() const {
if ( trackptcut_ >0 and trackptcut_ > trackpt_) return 0;
if ( not id_iso ) return 0; // this include additional cuts on top of the iso cut
//if (GetNProng() != 1 ) return 0;
if ( selectprogs_ >=0 )
if ( selectprongs_ >=0 )
{
if (selectprongs_<10 and selectprongs_ != GenNProng()) return 0;
if (selectprongs_== 13 and (GetNProng() !=1 and GetNProng() !=3) return 0;
if (selectprongs_<10 and selectprongs_ != GetNProng()) return 0;
if (selectprongs_== 13 and GetNProng() !=1 and GetNProng() !=3) return 0;
}

return 1;
Expand All @@ -47,7 +47,11 @@ int Tau::IsTauInvIso() const {
if (iso2 > 20.0 ) return 0;
if ( Pt() < ptcut_ ) return 0;
if ( trackptcut_ >0 and trackptcut_ > trackpt_) return 0;
if (GetNProng() != 1 ) return 0;
if ( selectprongs_ >=0 )
{
if (selectprongs_<10 and selectprongs_ != GetNProng()) return 0;
if (selectprongs_== 13 and GetNProng() !=1 and GetNProng() !=3) return 0;
}
return 1;
}

Expand Down

0 comments on commit 1d1215d

Please sign in to comment.