LCFIVertex  0.7.2
DSTAIDAPlotProcessor.h
1 #ifndef DSTAIDAPlotProcessor_h
2 #define DSTAIDAPlotProcessor_h
3 
4 #include <vector>
5 #include <algorithm>
6 
7 #include "../vertex_lcfi/util/inc/util.h"
8 
9 //Marlin and LCIO includes
10 #include "marlin/Processor.h"
11 #include "lcio.h"
12 #include "EVENT/ReconstructedParticle.h"
13 
14 
15 //AIDA includes...
16 #include <AIDA/IHistogram1D.h>
17 #include <AIDA/IDataPointSet.h>
18 #include <AIDA/ITuple.h>
19 
20 
21 class DSTAIDAPlotProcessor : public marlin::Processor
22 {
23 public:
24  //The usual Marlin processor methods
25  virtual Processor* newProcessor() { return new DSTAIDAPlotProcessor; }
27  virtual ~DSTAIDAPlotProcessor();
28  virtual void init();
29  virtual void processRunHeader( LCRunHeader* pRun );
30  virtual void processEvent( LCEvent* pEvent );
31  //don't need this
32  //virtual void check( LCEvent* pEvent );
33  virtual void end();
34 protected:
35  std::string _JetCollectionName;
38  int _nRun;
42  std::map<std::string,AIDA::IHistogram1D*> _pLightJetBTag;
45  std::map<std::string,AIDA::IHistogram1D*> _pLightJetCTag;
47  std::map<std::string,AIDA::IHistogram1D*> _pBJetBTag;
49  std::map<std::string,AIDA::IHistogram1D*> _pBJetCTag;
51  std::map<std::string,AIDA::IHistogram1D*> _pCJetBTag;
53  std::map<std::string,AIDA::IHistogram1D*> _pCJetCTag;
55  std::map<std::string,AIDA::IHistogram1D*> _pBJetBCTag;
57  std::map<std::string,AIDA::IHistogram1D*> _pCJetBCTag;
59  std::map<std::string,AIDA::IHistogram1D*> _pLightJetBCTag;
61  std::map<std::string,AIDA::IHistogram1D*> _pBTagBackgroundValues;
63  std::map<std::string,AIDA::IHistogram1D*> _pCTagBackgroundValues;
65  std::map<std::string,AIDA::IHistogram1D*> _pBCTagBackgroundValues;
66 
70  std::map<std::string,AIDA::IHistogram1D*> _pBJetBTagIntegral;
71  std::map<std::string,AIDA::IHistogram1D*> _pCJetBTagIntegral;
72  std::map<std::string,AIDA::IHistogram1D*> _pLightJetBTagIntegral;
73  std::map<std::string,AIDA::IHistogram1D*> _pBJetCTagIntegral;
74  std::map<std::string,AIDA::IHistogram1D*> _pCJetCTagIntegral;
75  std::map<std::string,AIDA::IHistogram1D*> _pLightJetCTagIntegral;
76  std::map<std::string,AIDA::IHistogram1D*> _pBJetBCTagIntegral;
77  std::map<std::string,AIDA::IHistogram1D*> _pCJetBCTagIntegral;
78  std::map<std::string,AIDA::IHistogram1D*> _pLightJetBCTagIntegral;
79 
80 
81  std::vector<std::string> _VertexCatNames;
82  std::vector<std::string> _NumVertexCatDir;
83 
85  std::map<std::string,AIDA::IHistogram1D*> _inputsHistogramsBJets;
87  std::map<std::string,AIDA::IHistogram1D*> _inputsHistogramsCJets;
89  std::map<std::string,AIDA::IHistogram1D*> _inputsHistogramsUDSJets;
90 
91 
92 
94  static const unsigned int N_VERTEX_CATEGORIES=3;
95 
96  int _numberOfPoints;
97 
99  AIDA::ITuple* _pMyTuple;
100 
101  //useful constants
102  static const int C_JET=4;
103  static const int B_JET=5;
105  void _displayCollectionNames( lcio::LCEvent* pEvent );
106  bool _passesEventCuts( lcio::LCEvent* pEvent );
107  bool _passesJetCuts( lcio::ReconstructedParticle* pJet );
108 
109 
110  void FillTagPlots( LCEvent* pEvent, unsigned int jetNumber );
111 
112  void CreateTagPlots();
113 
114 
115  void CreateFlavourTagInputPlots(LCRunHeader* pRun );
116  void CreateFlavourTagTuple();
117  void CalculateIntegralAndBackgroundPlots();
118  void CalculateEfficiencyPurityPlots();
119 
120  void FillInputsPlots( LCEvent* pEvent, unsigned int jetNumber );
121 
122 
123  AIDA::IDataPointSet* CreateEfficiencyPlot(const AIDA::IHistogram1D* pSignal, AIDA::IDataPointSet* pDataPointSet);
124  AIDA::IHistogram1D* CreateIntegralHistogram(const AIDA::IHistogram1D* pNN, AIDA::IHistogram1D* pIntegral);
125  AIDA::IDataPointSet* CreatePurityPlot(const AIDA::IHistogram1D* pSignal, const AIDA::IHistogram1D* pBackground, AIDA::IDataPointSet* pDataPointSet);
126  AIDA::IDataPointSet* CreateLeakageRatePlot(const AIDA::IHistogram1D* pBackground, AIDA::IDataPointSet* pDataPointSet);
127  AIDA::IDataPointSet* CreateXYPlot(const AIDA::IDataPointSet* pDataPointSet0, const AIDA::IDataPointSet* pDataPointSet1, AIDA::IDataPointSet* xyPointSet, const int dim0=0, const int dim1=0 );
128 
129 
130 
131 
132 
133 };
134 
135 #endif //ifndef DSTAIDAPlotProcessor_h
std::map< std::string, AIDA::IHistogram1D * > _pCTagBackgroundValues
Histograms of the neural net C-tag outputs for non C-jets - seperately for different number of vertic...
std::map< std::string, AIDA::IHistogram1D * > _pBTagBackgroundValues
Histograms of the neural net B-tag outputs for non B-jets - seperately for different number of vertic...
void _displayCollectionNames(lcio::LCEvent *pEvent)
bool _passesEventCuts(lcio::LCEvent *pEvent)
std::map< std::string, AIDA::IHistogram1D * > _pBJetBCTag
Histograms of the neural net BC-tag outputs for true B-jets - seperately for different number of vert...
std::map< std::string, AIDA::IHistogram1D * > _pLightJetCTag
Histograms of the neural net C-tag outputs for true light-jets - seperately for different number of v...
AIDA::ITuple * _pMyTuple
Tuple of the input variables - only filled for one input collection - selected with UseFlavourTagColl...
std::map< std::string, AIDA::IHistogram1D * > _pCJetBTag
Histograms of the neural net B-tag outputs for true C-jets - seperately for different number of verti...
std::map< std::string, AIDA::IHistogram1D * > _pBJetBTag
Histograms of the neural net B-tag outputs for true B-jets - seperately for different number of verti...
std::map< std::string, AIDA::IHistogram1D * > _pBJetCTag
Histograms of the neural net C-tag outputs for true B-jets - seperately for different number of verti...
std::map< std::string, AIDA::IHistogram1D * > _pBCTagBackgroundValues
Histograms of the neural net BC-tag outputs for non C-jets - seperately for different number of verti...
bool _passesJetCuts(lcio::ReconstructedParticle *pJet)
std::map< std::string, AIDA::IHistogram1D * > _inputsHistogramsBJets
Histograms of the neural net inputs for true B-jets.
std::map< std::string, AIDA::IHistogram1D * > _pLightJetBCTag
Histograms of the neural net BC-tag outputs for true light-jets - seperately for different number of ...
std::map< std::string, AIDA::IHistogram1D * > _pCJetBCTag
Histograms of the neural net BC-tag outputs for true C-jets - seperately for different number of vert...
std::map< std::string, AIDA::IHistogram1D * > _pLightJetBTag
Histograms of the neural net B-tag outputs for true light-jets - seperately for different number of v...
std::map< std::string, AIDA::IHistogram1D * > _pCJetCTag
Histograms of the neural net C-tag outputs for true C-jets - seperately for different number of verti...
std::map< std::string, AIDA::IHistogram1D * > _inputsHistogramsCJets
Histograms of the neural net inputs for true C-jets.
std::map< std::string, AIDA::IHistogram1D * > _inputsHistogramsUDSJets
Histograms of the neural net inputs for light B-jets.
std::map< std::string, AIDA::IHistogram1D * > _pBJetBTagIntegral
Histograms of the neural net tags - number of events that pass a given cut: jet NN value > given NN v...
static const unsigned int N_VERTEX_CATEGORIES
number of different vertex categories we want to look at: 1 vertex, 2 vertices, >=3 vertices ...