15 |
|
// Authors: P.Harris, C.Loizides |
16 |
|
//-------------------------------------------------------------------------------------------------- |
17 |
|
|
18 |
< |
#ifndef MITPHYSICS_UTIL_MUONTOOLS_H |
19 |
< |
#define MITPHYSICS_UTIL_MUONTOOLS_H |
18 |
> |
#ifndef MITPHYSICS_UTILS_MUONTOOLS_H |
19 |
> |
#define MITPHYSICS_UTILS_MUONTOOLS_H |
20 |
|
|
21 |
|
#include "MitAna/DataTree/interface/Muon.h" |
22 |
< |
#include "MitAna/DataTree/interface/Collections.h" |
22 |
> |
#include "MitAna/DataTree/interface/VertexCol.h" |
23 |
> |
#include "MitAna/DataTree/interface/BeamSpotCol.h" |
24 |
|
#include "MitCommon/MathTools/interface/MathUtils.h" |
25 |
|
#include "TH2D.h" |
26 |
|
|
29 |
|
public: |
30 |
|
MuonTools(const char *mutemp="$CMSSW_BASE/src/MitPhysics/data/MuonCaloTemplate.root", |
31 |
|
const char *pitemp="$CMSSW_BASE/src/MitPhysics/data/PionCaloTemplate.root"); |
32 |
< |
~MuonTools(); |
32 |
> |
virtual ~MuonTools(); |
33 |
|
|
34 |
|
enum ESelType { |
35 |
|
kAllArbitrated, //All arbitration (DT/CSC/RPC Hits) put on at least one |
45 |
|
// ===> 1.2 Segment compatability + 0.8 calo compatability > 1.2 |
46 |
|
}; |
47 |
|
|
48 |
< |
Bool_t Init(const char *mutemp, const char *pitemp); |
49 |
< |
Bool_t IsGood(const mithep::Muon *iMuon, ESelType iSel) const; |
50 |
< |
Double_t GetCaloCompatability(const mithep::Muon *iMuon, |
51 |
< |
Bool_t iEMSpecial, Bool_t iCorrectedHCAL) const; |
52 |
< |
Double_t GetSegmentCompatability(const mithep::Muon *iMuon) const; |
48 |
> |
Bool_t Init(const char *mutemp, const char *pitemp); |
49 |
> |
Bool_t IsGood(const mithep::Muon *iMuon, ESelType iSel) const; |
50 |
> |
Double_t GetCaloCompatability(const mithep::Muon *iMuon, |
51 |
> |
Bool_t iEMSpecial, Bool_t iCorrectedHCAL) const; |
52 |
> |
Double_t GetSegmentCompatability(const mithep::Muon *iMuon) const; |
53 |
> |
static Bool_t PassD0Cut(const Muon *mu, const VertexCol *vertices, Double_t fD0Cut, |
54 |
> |
Bool_t fReverseD0Cut); |
55 |
> |
static Bool_t PassD0Cut(const Muon *mu, const BeamSpotCol *beamspots, Double_t fD0Cut, |
56 |
> |
Bool_t fReverseD0Cut); |
57 |
> |
static Bool_t PassSoftMuonCut(const Muon *mu, const VertexCol *vertices); |
58 |
|
|
59 |
|
protected: |
60 |
|
void DeleteHistos(); |
83 |
|
TH2D *fpion_had_etaEpl; //!Plus Endcap Hadronic Calo Deposit Template for Pions |
84 |
|
|
85 |
|
TH2D *LoadHisto(const char *fname, TFile *file) const; |
86 |
+ |
|
87 |
+ |
ClassDef(MuonTools, 0) // Muon tools |
88 |
|
}; |
89 |
|
} |
90 |
|
|
114 |
|
|
115 |
|
if (iHist ->GetXaxis()->FindBin(lVal0) == 0 || |
116 |
|
iHist ->GetXaxis()->FindBin(lVal0) > iHist->GetNbinsX() || |
117 |
< |
iHist ->GetYaxis()->FindBin(lVal0) == 0 || |
118 |
< |
iHist ->GetYaxis()->FindBin(lVal0) > iHist->GetNbinsY()) { |
117 |
> |
iHist ->GetYaxis()->FindBin(lVal1) == 0 || |
118 |
> |
iHist ->GetYaxis()->FindBin(lVal1) > iHist->GetNbinsY()) { |
119 |
|
return kTRUE; |
120 |
|
} |
121 |
|
return kFALSE; |