LCFIVertex
0.7.2
|
Trains neural networks to be used for jet flavour tagging. More...
#include <NeuralNetTrainer.h>
Public Member Functions | |
virtual Processor * | newProcessor () |
virtual void | init () |
virtual void | processRunHeader (LCRunHeader *pRun) |
virtual void | processEvent (LCEvent *pEvent) |
virtual void | end () |
Protected Member Functions | |
void | _displayCollectionNames (lcio::LCEvent *pEvent) |
void | _trainNet (nnet::BackPropagationCGAlgorithm &pBackPropCGAlgo, nnet::NeuralNetDataSet &dataSet) |
bool | _passesCuts (lcio::LCEvent *pEvent) |
Protected Attributes | |
std::string | _JetCollectionName |
std::string | _FlavourTagInputsCollectionName |
std::string | _TrueJetFlavourCollectionName |
int | _serialiseAsXML |
nnet::NeuralNet::SerialisationMode | _outputFormat |
std::map< std::string, std::string > | _filename |
std::map< std::string, bool > | _trainThisNet |
std::map< std::string, nnet::NeuralNetDataSet * > | _dataSet |
std::map< std::string, int > | _numSignal |
std::map< std::string, int > | _numBackground |
std::vector< std::string > | _listOfSelectedNetNames |
std::map< std::string, unsigned int > | _IndexOf |
int | _nRun |
int | _nEvent |
int | _nAcceptedEvents |
Static Protected Attributes | |
static const int | C_JET =4 |
static const int | B_JET =5 |
Trains neural networks to be used for jet flavour tagging.
Trains flavour tagging networks using the BackPropagationCGAlgorithm (see the Neural Net Package page) with 500 epochs. The networks are trained on the following data:
If only 1 vertex is found (i.e. only the interaction point)
If 2 or more vertices are found
Where E is the jet energy, everything else is the data calculated by FlavourTagInputsProcessor.
Note that the processor applies it's own hard coded cuts. These are documented under the full description of NeuralNetTrainerProcessor::_passesCuts().
Trained neural networks to the filenames supplied, in the format requested. The LCIO file is not modified at all.
JetCollectionName | Name of the ReconstructedParticle collection that represents jets. |
FlavourTagInputsCollection | Name of the LCFloatVec collection that holds the flavour tag inputs. |
TrueJetFlavourCollection | Name of the LCIntVec Collection that contains the true jet flavours. |
Filename-b_net-1vtx | Output filename for the trained 1 vertex b-tag net. |
Filename-c_net-1vtx | Output filename for the trained 1 vertex c-tag net. |
Filename-bc_net-1vtx | Output filename for the trained 1 vertex c-tag (with only b background) net. |
Filename-b_net-2vtx | Output filename for the trained 2 vertex b-tag net. |
Filename-c_net-2vtx | Output filename for the trained 2 vertex c-tag net. |
Filename-bc_net-2vtx | Output filename for the trained 2 vertex c-tag (with only b background) net. |
Filename-b_net-3plusvtx | Output filename for the trained 3 or more vertices b-tag net. |
Filename-c_net-3plusvtx | Output filename for the trained 3 or more vertices c-tag net. |
Filename-bc_net-3plusvtx | Output filename for the trained 3 or more vertices c-tag (with only b background) net. |
Definition at line 71 of file NeuralNetTrainer.h.
|
protected |
Displays all of the available collections in the file.
Definition at line 533 of file NeuralNetTrainer.cc.
|
protected |
All the code for the cuts should be put in here; returns false if the event fails any of the cuts.
Currently selects jets for which the jet polar angle theta is -0.866<= cos(theta) <=0.866.
Definition at line 377 of file NeuralNetTrainer.cc.
|
protected |
The training code, split off to make the code a bit more manageable
Definition at line 494 of file NeuralNetTrainer.cc.
|
protected |
Map of the data sets for each of the selected nets
Definition at line 97 of file NeuralNetTrainer.h.
|
protected |
A map of the output filenames for the trained net. All of these maps use strings of the form "c_net-2vtx", "bc_net-3vtx" etcetera as the key
Definition at line 94 of file NeuralNetTrainer.h.
|
protected |
Holds the positions of the inputs, so that, for example, you can get the position of D0Significance1 in the inputs LCFloatVec just with _IndexOf["D0Significance1"]
Definition at line 108 of file NeuralNetTrainer.h.
|
protected |
A list of the nets that have been selected for training, in the form of the strings used in the map keys above.
Definition at line 104 of file NeuralNetTrainer.h.
|
protected |
The number of events that have passed the cuts so far.
Definition at line 113 of file NeuralNetTrainer.h.
|
protected |
The event number.
Definition at line 112 of file NeuralNetTrainer.h.
|
protected |
The run number.
Definition at line 111 of file NeuralNetTrainer.h.
|
protected |
Dito for the number of backgrounds.
Definition at line 100 of file NeuralNetTrainer.h.
|
protected |
Map of the number of signal events for each net. Not really used for anything, just printed as info when the net starts training.
Definition at line 98 of file NeuralNetTrainer.h.
|
protected |
Map containing true or false depending on whether this net has been selected for training (if the user supplies an output filename in the steering file).
Definition at line 95 of file NeuralNetTrainer.h.
|
staticprotected |
Ditto.
Definition at line 117 of file NeuralNetTrainer.h.
|
staticprotected |
Just a useful constant for testing true jet flavour.
Definition at line 116 of file NeuralNetTrainer.h.