/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/TrkReco/TrkReco-00-08-59-patch4-slc6tag/TrkReco/TrkReco.h

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 // $Id: TrkReco.h,v 1.30 2011/10/08 01:56:15 maoh Exp $
00003 //-----------------------------------------------------------------------------
00004 // Filename : TrkReco.h
00005 // Section  : Tracking
00006 // Owner    : Yoshi Iwasaki
00007 // Email    : yoshihito.iwasaki@kek.jp
00008 //-----------------------------------------------------------------------------
00009 // Description : A tracking module.
00010 //               See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
00011 //-----------------------------------------------------------------------------
00012 
00013 #ifndef TrkReco_FLAG_
00014 #define TrkReco_FLAG_
00015 
00016 #ifdef TRKRECO_DEBUG_DETAIL
00017 #ifndef TRKRECO_DEBUG
00018 #define TRKRECO_DEBUG
00019 #endif
00020 #endif
00021 
00022 #include "GaudiKernel/Algorithm.h"
00023 #include "GaudiKernel/NTuple.h"
00024 #include <string>
00025 
00026 #define HEP_SHORT_NAMES
00027 #include "CLHEP/Alist/AList.h"
00028 #include "TrkReco/TTrackManager.h"
00029 #include "RawDataProviderSvc/RawDataProviderSvc.h"
00030 #include "TrkReco/TRungeFitter.h"
00031 class TMDC;
00032 class TMDCWireHit;
00033 class TFinderBase;
00034 class TConformalFinder0;
00035 class TCurlFinder;
00036 class TTrack;
00037 class TTrackMC;
00038 
00039 class MdcCalibFunSvc;
00040 class IBesTimerSvc;
00041 class BesTimer;
00042 
00043 extern float TrkRecoHelixFitterChisqMax;
00044 
00046 class TrkReco : public  Algorithm {    
00047 
00048   public:
00050     //static TrkReco * getTrkReco(void);
00051     TrkReco(const std::string& name, ISvcLocator* pSvcLocator);
00052     StatusCode initialize();
00053     StatusCode execute();
00054     StatusCode finalize();
00055     StatusCode beginRun();
00056     StatusCode endRun(){}; 
00057     
00058   public:// BASF interfaces
00060 //    void init(int * status);
00061 
00063 //    void term(void);
00064 
00066 //    void event(BesEvent *, int *);
00067 //    void event(void);
00068     
00070 //    void begin_run(BesEvent *, int *) {};
00071 //    void end_run(BesEvent *, int *) {};
00072     void disp_stat(const char *);
00073 
00074   public:// TrkReco interfaces
00076 //zsl    std::string name(void) const;
00077 
00079 //liuqg    std::string version(void) const;
00080 
00082     void dump(const std::string & message = std::string(""),
00083               const std::string & prefix = std::string("")) const;
00084 
00086     const TFinderBase * confFinder(void) const;
00087 
00089     const TFinderBase * curlFinder(void) const;
00090 
00092     const TTrackManager & trackManager(void) const;
00093 
00094   public: // to access information
00096     void clear(void);
00097 
00099     void fastClear(void);
00100 
00102     const AList<TTrack> & tracks(void) const;
00103 
00104   private:
00106     void initPara(void);
00107     
00109     bool mcEvent(void) const;
00110 
00112     void mcInformation(void);
00113 
00115     double maxdDistance(TMLink *) const;
00116 
00117     TMDC * cdcInit(void);
00118     
00120     void InitTuple(void);
00121     void FillTuple(void);
00122 
00123   public:// public members for basf interface
00124 
00125     //...RawData/TUPLE...
00126     int b_mcPar;
00127     int b_mcHit;
00128     int b_tuple;
00129     int b_goodTrk;
00130     int b_timeTest;
00131     bool m_dropHot;
00132     bool m_combineTracking;
00133     bool m_keepBadTdc;
00134     bool m_keepUnmatch;
00135     int b_RungeKuttaCorrection;
00136     //...MDC...
00137     float b_cdcVersion;
00138     std::string _cdcVersion;
00139     float b_fudgeFactor;
00140 
00141     //...Bunch Time...
00142     int useESTime;
00143 
00144     //...TrkReco...
00145     int b_debugLevel;
00146     int b_useAllHits;
00147     int b_doT0Reset;
00148     int b_nT0ResetMax;
00149     int b_doMCAnalysis;
00150     float b_helixFitterChisqMax;
00151 
00152     //...Perfect Finder...
00153     int b_doPerfectFinder;
00154     int b_perfectFitting;
00155 
00156     //...Conformal Finder...
00157     int b_conformalFinder;
00158     int b_doConformalFinder;
00159     int b_doConformalFastFinder;
00160     int b_doConformalSlowFinder;
00161     int b_conformalPerfectSegmentFinding;
00162     int b_conformalFittingFlag;
00163     float b_conformalMaxSigma;
00164     int b_conformalMinNLinksForSegment;
00165     int b_conformalMinNCores;
00166     int b_conformalMinNSegments;
00167     float b_salvageLevel;
00168     int b_conformalSalvageLoadWidth;
00169     int b_conformalStereoMode;
00170     int b_conformalStereoLoadWidth;
00171     float b_conformalStereoMaxSigma;
00172     float b_conformalStereoSzSegmentDistance;
00173     float b_conformalStereoSzLinkDistance;
00174 
00175     //...Old Conformal Finder...
00176     int b_doConformalFinderStereo;
00177     int b_doConformalFinderCosmic;
00178     float b_conformalFraction;
00179     float b_conformalStereoZ3;
00180     float b_conformalStereoZ4;
00181     float b_conformalStereoChisq3;
00182     float b_conformalStereoChisq4;
00183     int b_conformalFittingCorrections;
00184     int m_CalibFlag;
00185 
00186     //...Track Manager...
00187     double b_momentumCut;
00188     int b_fittingFlag;
00189     int b_doSalvage;
00190     int b_doMerge;
00191     int b_doT0Determination;
00192     int b_nTracksForT0;
00193     int b_sortMode;
00194     int b_doAssociation;
00195     float b_associateSigma;
00196     int b_test;
00197 
00198     //...Curl Finder...
00199     int b_doCurlFinder;
00200     int    min_segment;
00201     int    min_salvage;
00202     double bad_distance_for_salvage;
00203     double good_distance_for_salvage;
00204     int    min_sequence;
00205     int    min_fullwire;
00206     double range_for_axial_search;
00207     double range_for_stereo_search;
00208     int    superlayer_for_stereo_search;
00209     double range_for_axial_last2d_search;
00210     double range_for_stereo_last2d_search;
00211     double trace2d_distance;
00212     double trace2d_first_distance;
00213     double trace3d_distance;
00214     int    determine_one_track;
00215     double selector_max_impact;
00216     double selector_max_sigma;
00217     double selector_strange_pz;
00218     double selector_replace_dz;
00219     int    stereo_2dfind;
00220     int    merge_exe;
00221     double merge_ratio;
00222     double merge_z_diff;
00223     double mask_distance;
00224     double ratio_used_wire;
00225     double range_for_stereo1;
00226     double range_for_stereo2;
00227     double range_for_stereo3;
00228     double range_for_stereo4;
00229     double range_for_stereo5;
00230     double range_for_stereo6;
00231     double z_cut;
00232     double z_diff_for_last_attend;
00233     int    svd_reconstruction;
00234     double min_svd_electrons;
00235     int    on_correction;
00236     int    output_2dtracks;
00237     int    curl_version;
00238    
00239         //jialk
00240     double minimum_seedLength;
00241         double minimum_2DTrackLength;
00242         double minimum_3DTrackLength;
00243         double minimum_closeHitsLength;
00244         double MIN_RADIUS_OF_STRANGE_TRACK;
00245         double ULTIMATE_MIN_RADIUS_OF_STRANGE_TRACK;
00246 
00247   private:
00248 //    static TrkReco * _TrkReco;
00249     TMDC * _cdc;
00250     TFinderBase * _perfectFinder;
00251     TFinderBase * _confFinder;
00252     TCurlFinder * _curlFinder;
00253     TTrackManager _trackManager;
00254     TRungeFitter _rkfitter;
00255     RawDataProviderSvc * _rawDataProviderSvc;
00256     MdcCalibFunSvc * _mdcCalibFunSvc;
00257     MdcGeomSvc * _mdcGeomSvc;
00258 
00259     unsigned _nEvents;
00260     AList<TTrackMC> _mcTracks;
00261 
00262     //Tuple related
00263     IBesTimerSvc* m_timersvc;
00264     BesTimer* m_timer[2];
00265     double t0_bes;
00266     double t0Sta;    
00267     int havedigi[43][288];
00268     int MC_DIGI_SIZE;
00269     
00270     NTuple::Tuple*  m_tuple;  //rec3D 
00271     NTuple::Item<float>  t_mcphi,t_mctheta,t_mcptot,t_mcpt,t_mcpz,t_mct0,t_nDigi,
00272       t_pt,t_ptot,t_dr,t_dz,t_tanlmd,t_phi,t_radius,t_chi2,t_ndf,t_nHits,t_nCores,t_nSegs,
00273       t_length,t_length2,t_evtNo,
00274       t_dpt,t_dptot,t_dlmd,t_dphi,
00275       t_t0,t0_sta,
00276       t_good_theta,t_gdNLayers,t_mcNLayers,t_bestNLayers,t_bestMcNLayers;
00277 
00278     NTuple::Tuple*  m_tuple2;  //rec2D
00279     NTuple::Item<float>  t2_mctheta,t2_mcpt,t2_nDigi,t2_length,t2_ndf,t2_evtNo,t2_chi2,t2_nHits,t2_nSegs,t2_length2,t2_radius;
00280 
00281     NTuple::Tuple*  m_tuple3; //raw
00282     NTuple::Item<float>  t3_mct0,t3_mcptot,t3_mcpt,t3_mctheta,t3_mcphi, t3_mcpid, t3_evtNo;
00283 
00284     NTuple::Tuple*  m_tuple31; //raw/event
00285     NTuple::Item<float>  t3_nDigi,t3_goodLength, t3_t0Rec, t3_t0, t3_t0Sta, t3_finalLength, t3_length;
00286 
00287     NTuple::Tuple*  m_tuple4; //hits
00288     NTuple::Item<float>  t4_Dist,t4_drift,t4_dDrift,t4_mcDrift,t4_mcLR,t4_pull,t4_lyrId,t4_localId;
00289     NTuple::Item<float>  t4_LR,t4_tdc,t4_z,t4_bz,t4_fz,t4_fy,t4_phi, t4_nHits;
00290 
00291     NTuple::Tuple*  m_tuple5; //charge
00292     NTuple::Item<float>  t5_ptotPos, t5_ptotNeg, t5_drPos, t5_drNeg, t5_dzPos, t5_dzNeg;
00293 
00294     NTuple::Tuple*  m_tuple6; //unreconstructed.
00295     NTuple::Item<float>  u_length2,u_mcptot,u_mcpt,u_mctheta,u_nDigi,u_evtNo,u_mct0,ut_t0,ut0_sta;
00296 
00297     NTuple::Tuple*  m_tuple7; //time test.
00298     NTuple::Item<float>  ti_eventTime, ti_recTrkNum, ti_evtNo, ti_nHits, ti_nDigi;
00299 
00300     NTuple::Tuple* m_tuple9; //segments
00301     NTuple::Item<float>  t9_times, t9_nLinks, t9_nUsed, t9_nSL, t9_mctheta;
00302 
00303     NTuple::Tuple* m_tuple10; //raw hit
00304     NTuple::Item<float>  t10_tdc, t10_adc, t10_drift, t10_dDrift,t10_lyrId,t10_localId;
00305 };
00306 
00307 //-----------------------------------------------------------------------------
00308 
00309 #ifdef TRKRECO_NO_INLINE
00310 #define inline
00311 #else
00312 #undef inline
00313 #define TrkReco_INLINE_DEFINE_HERE
00314 #endif
00315 
00316 #ifdef TrkReco_INLINE_DEFINE_HERE
00317 
00318 inline
00319 const TFinderBase *
00320 TrkReco::confFinder(void) const {
00321     return (TFinderBase *) _confFinder;
00322 }
00323 
00324 inline
00325 const TFinderBase *
00326 TrkReco::curlFinder(void) const {
00327     return (TFinderBase *) _curlFinder;
00328 }
00329 
00330 inline
00331 const AList<TTrack> &
00332 TrkReco::tracks(void) const {
00333     return _trackManager.tracksFinal();
00334 }
00335 
00336 /*
00337 inline
00338 std::string
00339 TrkReco::name(void) const {
00340     return std::string("TrkReco");
00341 }
00342 */
00343 
00344 inline
00345 const TTrackManager &
00346 TrkReco::trackManager(void) const {
00347     return _trackManager;
00348 }
00349 
00350 #endif
00351 
00352 #undef inline
00353 
00354 #endif /* TrkReco_FLAG_ */

Generated on Tue Nov 29 23:14:17 2016 for BOSS_7.0.2 by  doxygen 1.4.7