CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/Fireworks/ParticleFlow/interface/FWPFUtils.h

Go to the documentation of this file.
00001 #ifndef _FWPFUTILS_H_
00002 #define _FWPFUTILS_h_
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:     ParticleFlow
00007 // Class  :     FWPFUtils
00008 // 
00009 // Implementation:
00010 //     <Notes on implementation>
00011 //
00012 // Original Author:  Simon Harris
00013 //
00014 
00015 // System include files
00016 #include "TEveTrack.h"
00017 
00018 // User include files
00019 #include "Fireworks/Core/interface/FWMagField.h"
00020 #include "Fireworks/Tracks/interface/TrackUtils.h"
00021 #include "DataFormats/TrackReco/interface/Track.h"
00022 
00023 //-----------------------------------------------------------------------------
00024 // FWPFUtils
00025 //-----------------------------------------------------------------------------
00026 class FWPFUtils
00027 {
00028    public:
00029    // ---------------- Constructor(s)/Destructor ----------------------
00030       FWPFUtils();
00031       virtual ~FWPFUtils(){}
00032 
00033    // --------------------- Member Functions --------------------------
00034       TEveTrack               *getTrack( const reco::Track &iData );
00035       TEveVector              lineCircleIntersect( const TEveVector &v1, const TEveVector &v2, float r );
00036       TEveVector              lineLineIntersect( const TEveVector &v1, const TEveVector &v2,
00037                                                  const TEveVector &v3, const TEveVector &v4 );
00038       TEveVector              cross( const TEveVector &v1, const TEveVector &v2 );
00039       float                   linearInterpolation( const TEveVector &p1, const TEveVector &p2, float r );
00040       float                   dot( const TEveVector &v1, const TEveVector &v2 );
00041       float                   sgn( float val );
00042       bool                    checkIntersect( const TEveVector &vec, float r );
00043       void                    initPropagator();
00044 
00045    // --------------------- Accessor Methods --------------------------
00046       float                   getCaloR1() { return m_caloR1;   }
00047       float                   getCaloR2() { return m_caloR2;   }
00048       float                   getCaloR3() { return m_caloR3;   }
00049       float                   getCaloZ1() { return m_caloZ1;   }
00050       float                   getCaloZ2() { return m_caloZ2;   }
00051       FWMagField              *getField() { return m_magField; }
00052 
00053    private:
00054       FWPFUtils( const FWPFUtils& );
00055       const FWPFUtils& operator=( const FWPFUtils& );
00056 
00057    // ----------------------- Data Members ----------------------------
00058       TEveTrackPropagator     *m_trackerTrackPropagator;
00059       TEveTrackPropagator     *m_trackPropagator;
00060       FWMagField              *m_magField;
00061 
00062       float                   m_caloR1;
00063       float                   m_caloR2;
00064       float                   m_caloR3;
00065       float                   m_caloZ1;
00066       float                   m_caloZ2;
00067 };
00068 #endif
00069 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_