#include <iostream>
#include <math.h>
#include "tree.h"
Go to the source code of this file.
Defines | |
| #define | OFFS1 2 |
| #define | SONEND 3 |
| #define | REALSON 4 |
| #define | REFSON 5 |
Functions | |
| EUppLow | operator++ (enum EUppLow &rs, int) |
| ERegion | operator++ (enum ERegion &rs, int) |
| Etype | operator++ (enum Etype &rs, int) |
| Edir | operator++ (enum Edir &rs, int) |
Variables | |
| treeregion * | rcTreeRegion [2][3][4][4] |
| Det * | rcDETRegion [2][3][4] |
| Options | opt |
--------------------------------------------------------------------------*\
PROGRAM: QTR (Qweak Track Reconstruction) AUTHOR: Burnham Stokes bestokes@jlab.org ORIGINAL HRC AUTHOR Wolfgang Wander wwc@hermes.desy.de
MODULE: tree.cc
PURPOSE: This module contains the code for creating the treesearch database. The code first attempts to pull the database from disk. But, if the required database is not found, the code will generate it from scratch and save a copy of it on disk.
CONTENTS: (brief description for now)
(01) consistent() - this function valids a possible treeline hit pattern by seeing if the pattern is consistent with a straight line trajectory through a detector with a slope less than or equal to the HRCSET MaxSlope parameter.
(02) existent() - this function checks if a possible treeline hit pattern is already included in the tree search database. If so, it returns a pointer to the pattern within the database. Otherwise, it returns 0.
(03) nodeexists() - this function checks if a possible treeline hit pattern is already known to a father. If so, it returns a pointer to the pattern within the tree database. Otherwise, it returns 0.
(04) treedup() - this function duplicates a treeline hit pattern. It returns a pointer to the copy of the treeline hit pattern.
(05) marklin() - this function generates the treesearch database. For a given father, it generates the 2^(treelayers) possible son hit patterns. Each son pattern is checked to see if it is consistent with a trajectory through the chamber. If it is consistent, it is inserted into the treesearch database and then, by a recursive call to marklin(), its sons are generated.
(06) treeout() - a debugging function which displays the hit patterns for an entry in the treesearch database.
(07) _inittree() - this function initializes the treesearch database and then calls marklin() to generate the database.
(08) _writetree() - a recursive function for pulling in the concise treesearch search database.
(09) writetree() - this function calls _writetree() to write the long version of the treesearch database to a disk file. Later, readtree() will read back this file to form the concise treesearch database (so-called short tree) used by the treesearch algorithm.
(10) freetree() - this function clears the treesearch database and frees up the memory that was used.
(11) _readtree() - a recursive function (called by readtree()) to read the concise treesearch database (so-called short tree) from disk.
(12) readtree() - this function calls _readtree() to read the concise treesearch database from disk.
(13) inittree() - this function creates the treesearch database for one treeline. It first attempts to read the database from a diskfile. If this fails, it calls _inittree() to generate the treesearch database.
(14) rcInitTree() - the main function of this module. This function calls inittree() to generate the tree database for each of the treelines.
\*---------------------------------------------------------------------------
Definition in file tree.cc.
1.4.6