ATLAS Offline Software
EnhancedPrimaryVertexMonitoring/RealTrackTree.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef RealTrackTree_h
6 #define RealTrackTree_h
7 
8 // Remark A. Wildauer: when recreating the base class with root MakeClass all you need to do is to add
9 // using namespace std;
10 // to the header.
11 
12 #include "InDetTrackTree.h"
13 #include <TString.h>
14 
15 class TH1F;
16 class TH2F;
17 
19 {
20  public:
21  TString triggerName;
22  Bool_t m_mcAvailable;//whether to plot the MC-related histograms
23  Long64_t m_maxEvents; //maximum number of events
24 
25  protected:
27 
28  public:
29 
30  RealTrackTree(TTree *tree, TTree* trigTree);
31  void Loop();
32 
33  TH1F* define1DHistogram(TString name, unsigned int bins, Double_t lbin, Double_t ubin, TString xaxistitle, TString yaxistitle);
34 
35  TH2F* define2DHistogram(TString name, unsigned int xbins, Double_t lxbin, Double_t uxbin, unsigned int ybins, Double_t lybin, Double_t uybin, TString xaxistitle, TString yaxistitle);
36 
37  // variable bin size
38  TH2F* define2DHistogram(TString name, unsigned int xbins, double* xrange, unsigned int ybins, Double_t lybin, Double_t uybin, TString xaxistitle, TString yaxistitle);
39 
40  Double_t error_func(float x, Double_t *par);
41 
42  std::vector<float> stableGaussianFit(TH1 * histo);
43 
44  Float_t GetSplitMatchDistance(Int_t splitVxIndex, Int_t recoVxIndex, Int_t cfgMetric);
45  enum VtxType {
46  VtxSimulated, // MC vertex
47  VtxReconstructedNoBC, // non-BC reco vertex
48  VtxReconstructedBC, // BC reco vertex
49  VtxReconstructedSplit // Split vertex
50  };
52  VtxDistM_deltaZ, // Delta Z
53  VtxDistM_deltaZsig, // Delta Z / sigma(Delta Z)
54  VtxDistM_3Dsig // Quadratic sum of Delta x_i/Sigma(Delta x_i) (i=x,y,z)
55  };
56  Bool_t isGoodVertex(Int_t idx, VtxType vtxType);
57  Float_t GetVtxDistance(Int_t VxIndex1, VtxType VxType1, Int_t VxIndex2, VtxType VxType2, VtxDistanceMetric cfgMetric);
58 
59  Bool_t isGoodRun(UInt_t run, UInt_t lb);
60 
61  private:
62  TString m_outfileName;
63 
64  public:
65  //MC based simulated-reconstructed vertex matching categories
66  enum VtxMatch {
67  VtxM_Match, //1-1 association
68  VtxM_Split, //1-2
69  VtxM_Merge, //2-1
70  VtxM_Ineff, //1-0
71  VtxM_Fake, //0-1
72  VtxM_Match_2, //2-2 association
73  VtxM_Others, //other combinations
74  VtxM_NMatch //Number of possibilities
75  };
76 };
77 
78 #endif
xrange
void xrange(TH1 *h, bool symmetric)
Definition: computils.cxx:515
RealTrackTree::VtxSimulated
@ VtxSimulated
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:46
RealTrackTree::GetVtxDistance
Float_t GetVtxDistance(Int_t VxIndex1, VtxType VxType1, Int_t VxIndex2, VtxType VxType2, VtxDistanceMetric cfgMetric)
python.App.bins
bins
Definition: App.py:410
RealTrackTree::trigMetaDataTree
TTree * trigMetaDataTree
Store D3PD trigger tree.
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:26
tree
TChain * tree
Definition: tile_monitor.h:30
PixelAthClusterMonAlgCfg.ybins
ybins
Definition: PixelAthClusterMonAlgCfg.py:163
RealTrackTree::VtxReconstructedNoBC
@ VtxReconstructedNoBC
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:47
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
x
#define x
RealTrackTree::VtxM_Match_2
@ VtxM_Match_2
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:72
RealTrackTree::VtxM_NMatch
@ VtxM_NMatch
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:74
RealTrackTree::VtxReconstructedBC
@ VtxReconstructedBC
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:48
RealTrackTree::define2DHistogram
TH2F * define2DHistogram(TString name, unsigned int xbins, Double_t lxbin, Double_t uxbin, unsigned int ybins, Double_t lybin, Double_t uybin, TString xaxistitle, TString yaxistitle)
python.BunchSpacingUtils.lb
lb
Definition: BunchSpacingUtils.py:88
RealTrackTree::triggerName
TString triggerName
Trigger name used for filtering events.
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:21
RealTrackTree::VtxDistM_3Dsig
@ VtxDistM_3Dsig
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:54
RealTrackTree::GetSplitMatchDistance
Float_t GetSplitMatchDistance(Int_t splitVxIndex, Int_t recoVxIndex, Int_t cfgMetric)
RealTrackTree::RealTrackTree
RealTrackTree(TTree *tree, TTree *trigTree)
RealTrackTree::stableGaussianFit
std::vector< float > stableGaussianFit(TH1 *histo)
RealTrackTree::VtxM_Merge
@ VtxM_Merge
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:69
RealTrackTree::m_mcAvailable
Bool_t m_mcAvailable
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:22
RealTrackTree::error_func
Double_t error_func(float x, Double_t *par)
RealTrackTree::Loop
void Loop()
run
Definition: run.py:1
RealTrackTree::VtxType
VtxType
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:45
RealTrackTree::VtxM_Match
@ VtxM_Match
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:67
RealTrackTree::VtxDistanceMetric
VtxDistanceMetric
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:51
InDetTrackTree
Definition: EnhancedPrimaryVertexMonitoring/InDetTrackTree.h:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
RealTrackTree::m_outfileName
TString m_outfileName
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:62
LArCellBinning.xbins
int xbins
Definition: LArCellBinning.py:163
RealTrackTree::VtxM_Fake
@ VtxM_Fake
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:71
RealTrackTree::VtxDistM_deltaZsig
@ VtxDistM_deltaZsig
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:53
InDetTrackTree.h
RealTrackTree::VtxM_Others
@ VtxM_Others
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:73
RealTrackTree::VtxMatch
VtxMatch
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:66
RealTrackTree::isGoodRun
Bool_t isGoodRun(UInt_t run, UInt_t lb)
apply GRL
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
RealTrackTree::m_maxEvents
Long64_t m_maxEvents
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:23
RealTrackTree::VtxM_Ineff
@ VtxM_Ineff
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:70
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
RealTrackTree::define2DHistogram
TH2F * define2DHistogram(TString name, unsigned int xbins, double *xrange, unsigned int ybins, Double_t lybin, Double_t uybin, TString xaxistitle, TString yaxistitle)
RealTrackTree::isGoodVertex
Bool_t isGoodVertex(Int_t idx, VtxType vtxType)
RealTrackTree::VtxDistM_deltaZ
@ VtxDistM_deltaZ
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:52
RealTrackTree::define1DHistogram
TH1F * define1DHistogram(TString name, unsigned int bins, Double_t lbin, Double_t ubin, TString xaxistitle, TString yaxistitle)
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
RealTrackTree::VtxReconstructedSplit
@ VtxReconstructedSplit
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:49
RealTrackTree::VtxM_Split
@ VtxM_Split
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:68
RealTrackTree
Definition: EnhancedPrimaryVertexMonitoring/RealTrackTree.h:19