Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GFcontrol.cpp

Go to the documentation of this file.
00001 
00002 #include "TkrRecon/GFcontrol.h"
00003 
00004 int               GFcontrol::gammaTries          = 1;
00005 //int       GFcontrol::particleTries       = 5;
00006 int       GFcontrol::particleTries       = 15;
00007 int       GFcontrol::maxCandidates       = 2;
00008 
00009 double    GFcontrol::FEneParticle        = 1.;
00010 double    GFcontrol::FEne                = 0.66;
00011 double    GFcontrol::sigmaCut            = 8.;
00012 
00013 int               GFcontrol::error                   = 0;
00014 int               GFcontrol::maxConsecutiveGaps  = 2;   // max consecutive Gaps - Stop
00015 int               GFcontrol::minSegmentHits      = 3;   // min number of hits for segment
00016 double    GFcontrol::minEnergy           = 0.03;        // min tracking energy GeV
00017 double    GFcontrol::XEne                    = 0.50;    // initial sharing of the energy
00018 
00019 double    GFcontrol::iniErrorSlope       = 0.34; // 20 deg
00020 double    GFcontrol::iniErrorPosition    = 0.010; // 0.1 mm
00021 
00022 double    GFcontrol::maxChiSqSegment     = 200.;         // max chi2 of the initial segment
00023 int       GFcontrol::maxGapsSegment      = 1;     // gaps allowed in the initial segment
00024 double    GFcontrol::maxSigmasSharedHits = 1./4.;          // allowed share it it whitin nsigmas
00025 double    GFcontrol::maxChiSq            = 1e6;
00026 double    GFcontrol::minQ                    = -1e2;
00027 
00028 double    GFcontrol::sigmaVeto           = 8.;
00029 double    GFcontrol::maxSigmaCut         = 8.;
00030 
00031 bool      GFcontrol::addTracksChi2       = true;
00032 bool      GFcontrol::sigmaCluster        = true; // false for gammas
00033 
00034 //-------- GFtutor --------------------------------------
00035 
00036 SiClusters* GFtutor::_DATA = 0;// Sets by TrackerRecon - made accesible to all GF-objects
00037 
00038 bool GFtutor::CUT_veto = false;
00039 bool GFtutor::CONTROL_connectGFpair = false;
00040 
00041 ITkrGeometrySvc* GFtutor::pTrackerGeo = 0;
00042 
00043 int     GFtutor::m_numPlanes = 0;
00044 double  GFtutor::m_trayWidth = 0;
00045 double  GFtutor::m_trayGap   = 0;
00046 
00047 double  GFtutor::m_siStripPitch = 0;
00048 double  GFtutor::m_siThickness  = 0;
00049 double  GFtutor::m_siResolution = 0;
00050 
00051 //----------------- Static function ----------------------
00052 //########################################################
00053 void GFtutor::load(SiClusters* scl, ITkrGeometrySvc* pTrkGeo)                    
00054 //########################################################
00055 {
00056 
00057         GFtutor::pTrackerGeo = pTrkGeo;
00058         
00059         GFtutor::_DATA = scl;
00060 
00061         GFtutor::CUT_veto = true;
00062         GFtutor::CONTROL_connectGFpair = true;
00063         
00064         GFtutor::m_numPlanes = pTrackerGeo->numPlanes();
00065         
00066         GFtutor::m_trayWidth = pTrackerGeo->trayWidth();
00067         GFtutor::m_trayGap   = pTrackerGeo->trayHeight();
00068 
00069         GFtutor::m_siStripPitch = pTrackerGeo->siStripPitch();
00070         GFtutor::m_siThickness  = pTrackerGeo->siThickness();
00071         GFtutor::m_siResolution = pTrackerGeo->siResolution();
00072 
00073 }
00074 //------------- protected --------------------------------
00075 //########################################################
00076 double GFtutor::convRadLen(int iplane)                   
00077 //########################################################
00078 {
00079         // plane and layers differ in the order
00080         // int jplane = pTrackerGeo->numPlanes()-iplane-1;
00081         return pTrackerGeo->pbRadLen(pTrackerGeo->ilayer(iplane));
00082 }
00083 //########################################################
00084 int GFtutor::okClusterSize(SiCluster::view axis, int indexhit, 
00085                                                    double slope)                         
00086 //########################################################
00087 {
00088     int icluster = 0;
00089     
00090     int size = (int) GFtutor::_DATA->size(axis,indexhit);
00091     
00092     double distance = GFtutor::siThickness()*fabs(slope)/
00093                 GFtutor::siStripPitch();
00094     distance = distance - 1.;
00095     int idistance = (int) distance;
00096     if (idistance < 1) idistance = 1;
00097     
00098     if (size < idistance) icluster = 0;
00099     else if (size == idistance) icluster = 1;
00100     else if (size > idistance) icluster = 2;
00101     
00102     if (icluster == 0 && size >=2 && idistance >=2) icluster = 1;
00103     
00104     return icluster;
00105 }
00106 
00107 //#########################################################################
00108 bool GFtutor::neighbourTowers(int itower, int jtower)
00109 //#########################################################################
00110 {
00111     bool ok = false;
00112     
00113     int kxtower = (int) itower/10;
00114     int kytower = itower - 10*itower;
00115     
00116     int kx0tower = (int) jtower/10;
00117     int ky0tower = jtower - 10*kx0tower;
00118     
00119     if (kxtower >= kx0tower-1 && kxtower <= kx0tower+1) ok = true;      
00120     if (kytower >= ky0tower-1 && kytower <= ky0tower+1) ok = true; 
00121     
00122     // problem detected on the ID hit - not used for the momemt - 05/16/99 JAH
00123     if (itower < 10 || jtower < 10) ok =true;
00124     
00125     return ok;
00126 }

Generated at Wed Nov 21 12:21:20 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000