H1JetProfile2D
class description - source file - inheritance tree
public:
H1JetProfile2D(Bool_t flagRelPt = kFALSE, Float_t distEta = 1.0, Float_t distPhi = 1.0)
H1JetProfile2D(const H1JetProfile2D&)
virtual ~H1JetProfile2D()
static TClass* Class()
virtual Bool_t FillProfile(const H1PartJet* jet, const TCollection* parts, Double_t yVar, Double_t weight = 1.)
Double_t GetNumJetsInHistograms() const
virtual TClass* IsA() const
virtual Bool_t NormaliseHistograms(Double_t = 0.)
virtual void Print(Option_t* opt = "0") const
void SetDistances(Float_t distEta, Float_t distPhi)
void SetFlagRelPt(Bool_t flag)
void SetHistsEtaPhi(TH2* histEta, TH2* histPhi)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
TH2* fHistEta ! internal pointer to the eta histogram
TH2* fHistPhi ! internal pointer to the phi histogram
Float_t fDistEta use eta_jet-distEta < eta_part < eta_jet+distEta] for phi-profile
Float_t fDistPhi use phi_jet-distPhi < phi_part < phi_jet+distPhi] for eta-profile
TH1* fHistNumJets in FillProfile this is filled with yVar (with weight): normalisation!
Bool_t fFlagRelPt flag to fill particle pt relative to jet-pt or absolute
Bool_t fFlagAbsPhi internal: fill abs(Delta(phi)) in phi-profile, set if
Class H1JetProfile2D
Author : Ger Flucke
Created : 2003/09/23
Last update: $Date: 2004/11/24 08:45:06 $
by: $Author: flucke $
Fill Jet eta/phi profile histograms with an additional quantity on the y-axis.
The idea is to make jet profiles where the bin content is determined by e.g.
a fit in the y-variable. The fit has to be dne by the user.
TH2 *histeta = new TH2F("etaprofile","etaprofile",20,-5,5, nBinsy, startY, endY);
TH2 *histphi = new TH2F("phiprofile","phiprofile",20,-TMath::Pi(),TMath::Pi(),
nBinsy, startY, endY);
H1PartInclJetArrayPtr jets;
H1PartCandArrayPtr parts;
H1PartDstarArrayPtr dstars;
H1JetProfile2D profiler;
profiler.SetEtaHistogram(histeta);
profiler.SetPhiHistogram(histphi);
H1Tree::Instance()->SelectHat("NumDstar > 0 && NumInclKtJets > 0");
while(H1Tree::Instance()->Next()){
for(Int_t i = 0; i < dstars.GetEntries(); ++i){
Double_t dm = dstars[i]->GetDm();
TObjArray *list = parts.GetArray(); // works even with any list of H1Part!
profiler.FillProfile(jets[0], list, dm);
}
}
profiler.NormaliseHistograms();
TCanvas *profile_eta = new TCanvas;
histeta->Draw();
TCanvas *profile_phi = new TCanvas;
histphi->Draw();
(Better project the hists along y-axis for each delta eta/phi bin, do a D*-fit
and store the results in a new 1-D profile hist...)
H1JetProfile2D(Bool_t relPt, Float_t distEta, Float_t distPhi)
: fHistEta(NULL), fHistPhi(NULL), fHistNumJets(NULL), fFlagRelPt(relPt)
both distances set via SetDistances(...), set fFlagRelPt (cf. FillProfile(...))
~H1JetProfile2D()
void SetDistances(Float_t distEta, Float_t distPhi)
distances below 0. are interpreted as default, i.e. 1.
void SetHistsEtaPhi(TH2* histEta, TH2* histPhi)
setting hists and creating fHistNumJets with y-bins
the name of the latter is taken as the name of the given hists where the first occurence
of 'Eta', 'eta', 'Phi' or 'phi' will be replaced by 'Norm'
setting flag fFlagAbsPhi according to histPhi
Bool_t FillProfile(const H1PartJet *jet, const TCollection *parts,
Double_t yVar, Double_t weight)
Extracts eta and phi of the jet, then loops over all particles i in the array
and for
- delta phi(i,jet) < fDistPhi calls
fHistEta->Fill(delta eta(i,jet), yVar, pt*weight)
- delta eta(i,jet) < fDistEta calls
fHistPhi->Fill(delta phi(i,jet), yVar, pt*weight)
where pt = (p_t,i/p_t,jet) if fFlagRelPt = kTRUE (default)
p_t,i otherwise.
False if something went wrong.
Double_t GetNumJetsInHistograms() const
Bool_t NormaliseHistograms(Double_t n)
Scales the histograms by 1/n where n should the number of jets that entered
the histograms, best defined by the same fit that is applied to all bins of the
profile hists.
If n is not given or 0, just devide through the (weighted) number of calls to
FillProfile()
Calling this routine more than once has no effect.
True if called the first time and all OK, false otherwise.
void Print(Option_t *opt) const
Inline Functions
void SetFlagRelPt(Bool_t flag)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
H1JetProfile2D H1JetProfile2D(const H1JetProfile2D&)
Last update: Wed Jan 11 14:06:57 2006
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.