/Home/aooliver/hepsoft/lcdroot/LCDRootApps/PhUtil/inc/LCDVToplBase.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // $Id: LCDVToplBase.h,v 1.2 2001/10/08 17:52:09 toshi Exp $
00003 // ----------------------------------------------------------------------------
00004 //
00005 #ifndef LCDVTOPLBASE_H
00006 #define LCDVTOPLBASE_H
00007 
00008 #include "TClonesArray.h"
00009 #include "LCDVToplTRK.h"
00010 #include "LCDVToplVRT.h"
00011 
00012 class LCDVToplBase: public TObject {
00013 
00014   friend class LCDVToplGhost;
00015 
00016 public:
00017   //Constructor and Deconstructor
00018   LCDVToplBase();
00019   ~LCDVToplBase();
00020 
00021   //
00022   // ----------------------< Adders >--------------------------------
00023   //
00024   LCDVToplTRK* AddTrack(Int_t tkid, Double_t* tkpar, Double_t* e_tkpar,
00025                         Double_t chrg, Double_t mfld, Int_t mc_ind, 
00026                         const TVector3& ipv);   // Add track
00027   void AddVrtTrack(LCDVToplTRK* trk); // Add a track in the list of assoc. trk.
00028 
00029   //
00030   // ----------------------< Checkers >--------------------------------
00031   //
00032   Bool_t CheckKs0Vertex(LCDVToplVRT* vrt);
00033   Bool_t CheckLambda0Vertex(LCDVToplVRT* vrt);
00034 
00035   //
00036   // ----------------------< Deleters >--------------------------------
00037   //
00038   void DeleteTracks(Int_t iflg=0); // Delete LCDVToplTRK class variables.
00039   void DeleteVertices(Int_t iflg=0); // Delete LCDVToplVRT class variables.
00040 
00041   //
00042   // ----------------------< Getters >--------------------------------
00043   //
00044   TClonesArray* GetTracks()    { return m_vtrack_list; }  // Get Track array.
00045   LCDVToplTRK*  GetTrackAt(Int_t i);  // Get LCDVToplTRK
00046   Int_t         GetTrackIdx(LCDVToplTRK* trk); //Get LCDVToplTRK index.
00047   Int_t         GetTrackEntries(); // Get Number of LCDVToplTRK s.
00048 
00049   TClonesArray* GetVertices()  { return m_vertex_list; }  // Get Vertex array.
00050   LCDVToplVRT*  GetVertexAt(Int_t i); // Get LCDVToplVRT
00051   Int_t         GetVertexIdx(LCDVToplVRT* vrt); //Get Vertex index.
00052   Int_t         GetVertexEntries(); // Get Number of LCDVToplVRT s.
00053   Int_t         GetVertexEntriesExceptV0(); // Get # of LCDVToplVRT s not V0.
00054 
00055   //  TObjArray*    GetVrtTracks() { return m_vrttrack_list; }
00056   Int_t         GetVrtTrackEntries(); // Get # of tracks which associate vert.
00057   LCDVToplTRK*  GetVrtTrackAt(Int_t itrk); // Get a track which assoc. vert.
00058   Double_t      GetVertexCharge(); // Get vertex charge.
00059 
00060   Int_t GetDebugLevel() { return m_dblevel; } // Get debug level.
00061 
00062   // Get the cut valuables for topological vertex finding...
00063   Double_t  GetRipe() { return m_ripe; } //xy error on IP ellipsoid, cm.
00064   Double_t  GetZipe() { return m_ripe; } //z  error on IP ellipsoid, cm.
00065   TVector3* GetPja()  { return &m_pja; } //summed track momenta.
00066 
00067   TVector3 GetInitialVertexT2T(LCDVToplTRK* trk1, 
00068                                LCDVToplTRK* trk2, 
00069                                Double_t l1=0, Double_t l2=0); //Get Initial vertex position from given tracks.
00070 
00071   TVector3  GetBeamIP()    { return  m_ipv; } // Get given beam IP.
00072   TVector3* GetBeamIPPtr() { return &m_ipv; } // Get given beam IP.
00073   void      GetBeamIPErrorMatrix(TMatrixD& a);
00074   void      GetBeamIPErrorMatrixInv(TMatrixD& a);
00075 
00076   Int_t     GetNTrk2Vrt() {return m_ntrk2vrt;}
00077   Int_t*    GetTrk2Vrt() {return m_trk2vrt;}
00078   Int_t     GetNVrt2Trk() {return m_nvrt2trk;}
00079   Int_t*    GetVrt2Trk() {return m_vrt2trk;}
00080   Double_t* GetTrkL() {return m_trkl;}
00081 
00082   //
00083   // ----------------------< Initers >--------------------------------
00084   //
00085   void InitBase(); // Initialize this class.
00086 
00087   //
00088   // ----------------------< Initers >--------------------------------
00089   //
00090   void RemoveVertexAt(Int_t);
00091   void RemoveVertex(LCDVToplVRT* vrt);
00092 
00093   //
00094   // ----------------------< Setters >--------------------------------
00095   //
00096   void SetDebugLevel(Int_t a) { m_dblevel = a; } // Set debug level.
00097 
00098   // Set the cut valuables for topological vertex finding...
00099   void SetRipe(Double_t a) { m_ripe=a; } //xy error on IP ellipsoid, cm.
00100   void SetZipe(Double_t a) { m_zipe=a; } //z  error on IP ellipsoid, cm.
00101   void SetPja(const TVector3& a) { m_pja =a; } //summed track momenta.
00102 
00103   // Set up
00104   void SetUp(const TVector3& ipv, const TVector3& bfldv);
00105   void SetUp(const TVector3& ipv, const TVector3& bfldv, const TVector3& jeta);
00106   void SetIP(const TVector3& ipv) { m_ipv = ipv; } // Set ip position.
00107   void SetBField(const TVector3& bfieldv) { m_bfield = bfieldv; } // Set Magnetic Field.
00108 
00109   void SetBeamIPErrorMatrix(TMatrixD& a);
00110   void SetBeamIPErrorMatrixInv(TMatrixD& a);
00111   //
00112   // ----------------------< Miscellaneous >--------------------------
00113   //
00114   void CalcIPErrorMatrix(); // IP error matrix calcuration.
00115   void CleanBase(Int_t iflg=0); //Clean up vertices, ...    
00116   void CompressVerticesList();
00117 
00118   //------------------------------------------------------------------
00119   // Heavy flavor jet tag relates...
00120   //------------------------------------------------------------------
00121 
00122   //
00123   // ----------------------< Getters >--------------------------------
00124   //
00125   virtual Int_t GetSeedVertex() { return GetSeedVertexByClassicMethod(); } // Get seed vertex.
00126   Int_t GetSeedVertexByClassicMethod(); // Get seed vertex by classical method.
00127 
00128   // Get the Cut values for Seed Vertex Finding.
00129   Double_t GetSeedVrtRMax()        { return m_SeedVrtRMax;        }
00130   Double_t GetSeedVrtK0Mass()      { return m_SeedVrtK0Mass;      }
00131   Double_t GetSeedVrtLambda0Mass() { return m_SeedVrtLambda0Mass; }
00132   Double_t GetSeedVrtSigMin()      { return m_SeedVrtSigMin;      }
00133 
00134  // Get attacked track
00135   Bool_t GetTrackAttachByClassicMethod(LCDVToplTRK *ltrk, 
00136                                        LCDVToplVRT* vrt, 
00137                                        TVector3* xdir);
00138 
00139   // Get the Cut values for Track attaching.
00140   Double_t  GetTrdiMax() { return m_TrdiMax; }
00141   Double_t  GetLodiMin() { return m_LodiMin; }
00142   Double_t  GetLodrMin() { return m_LodrMin; }
00143   Double_t  GetLodrMax() { return m_LodrMax; }
00144   Double_t  GetAntaMax() { return m_AntaMax; }
00145 
00146   // PT correction stuff
00147   Double_t* GetPTIP()    { return m_PTIP;    }
00148   Double_t  GetPTIPXY()  { return m_PTIP[0]; }
00149   Double_t  GetPTIPZ()   { return m_PTIP[1]; }
00150   Double_t  GetNVsigma() { return m_NVsigma; }
00151 
00152   // Vertex mass and momentum...
00153   Double_t       GetRawMass()  { return m_Rmass;    }
00154   Double_t       GetPtMass()   { return m_PtMass;   }
00155   Double_t       GetPtMassErr(){ return m_PtMassEr; }
00156   Double_t       GetMassTag()  { return m_Masstag;  }
00157   Double_t       GetMissPt()   { return m_MissPt;   }
00158   TLorentzVector GetP4Vertex() { return m_p4Vertex; }
00159 
00160   // Get NN...
00161   Bool_t   GetUseNN()              { return m_UseNN;     }
00162   Double_t GetSeedVertexNN()       { return m_SeedVrtNN; }
00163   Double_t GetTrackAttachNN()      { return m_TrackAttNN;}
00164   Double_t GetHFSelectNN()         { return m_SelectNN; }
00165   // Double_t GetHFTagNN(); // NN output for HF jet tag. if < 0.0, no seed vertex...
00166   // Double_t GetHFTagNN(Int_t iseed); // NN output for HF jet tag. if < 0.0, no seed vertex...
00167 
00168   Int_t GetMcJetFlav() { return m_mcjetflav; }
00169 
00170   //
00171   // ----------------------< Setters >--------------------------------
00172   //
00173 
00174   // Set the Cut values for Seed Vertex Finding.
00175   void SetSeedVrtRMax(Double_t a)        { m_SeedVrtRMax=a;        }
00176   void SetSeedVrtK0Mass(Double_t a)      { m_SeedVrtK0Mass=a;      }
00177   void SetSeedVrtLambda0Mass(Double_t a) { m_SeedVrtLambda0Mass=a; }
00178   void SetSeedVrtSigMin(Double_t a)      { m_SeedVrtSigMin=a;      }
00179 
00180   // Set the Cut values for Track attaching.
00181   void SetTrdiMax(Double_t a) { m_TrdiMax=a; }
00182   void SetLodiMin(Double_t a) { m_LodiMin=a; }
00183   void SetLodrMin(Double_t a) { m_LodrMin=a; }
00184   void SetLodrMax(Double_t a) { m_LodrMax=a; }
00185   void SetAntaMax(Double_t a) { m_AntaMax=a; }
00186 
00187   // PT correction stuff
00188   void SetPTIP(Double_t* a)  { m_PTIP[0] = a[0]; m_PTIP[1] = a[1];}
00189   void SetPTIPXY(Double_t a) { m_PTIP[0] = a; }
00190   void SetPTIPZ(Double_t a)  { m_PTIP[1] = a; }
00191   void SetNVsigma(Double_t a){ m_NVsigma = a; }
00192   
00193   // Set NN...
00194   void SetUseNN(Bool_t a)                { m_UseNN=a;     }
00195   void SetSeedVertexNN(Double_t a)       { m_SeedVrtNN=a; }
00196   void SetTrackAttachNN(Double_t a)      { m_TrackAttNN=a;}
00197   void SetHFSelectNN(Double_t a)         { m_SelectNN=a;  }
00198 
00199   void SetMcJetFlav(Int_t a) { m_mcjetflav=a; } // Set MC information.
00200 
00201   void SetPtrVertexTrack();
00202 
00203   //
00204   // ----------------------< Calculators >--------------------------------
00205   //
00206   virtual void CalcPTMass() {}
00207   virtual void CalcPTMass(Int_t iseedvrt) {}
00208   
00209   //Add, remove, and merge vertex...
00210   /*
00211   void AddVertex(LCDVToplVRT* vrt);
00212   void AddVertexIntoTrack(LCDVToplTRK* trk,LCDVToplVRT* vrt);
00213   void AddVrtTrack(LCDVToplTRK* trk);
00214   void MergeVertex(LCDVToplVRT* vrti,LCDVToplVRT* vrtj,Int_t f_fit);
00215   void MergeVertex(Int_t i,Int_t j, Int_t f_fit);
00216   void SortVertexByVsig();
00217   void SortVertexByDecayLength();
00218   void SortVertexByVsigInTrack(LCDVToplTRK* trk);
00219   void SortVertexByVsigInAllTrack();
00220   */
00221 
00222 private:
00223   //
00224   // general ZVTOP input
00225   // 
00226   Double_t m_ripe; // xy error on IP ellipsoid in ZVTOP, cm. =3.0e-4 (default)
00227   Double_t m_zipe; // z error on IP ellipsoid in ZVTOP, cm. =6.0e-4 (default)
00228  
00229   //XYZ location of IP
00230   TVector3 m_ipv;     // IP
00231   Double_t m_iper[6];    // IP error
00232   Double_t m_iper_inv[6];// IP error inv.
00233     
00234   TVector3 m_bfield; //Magnetic Field Vector
00235 
00236   TVector3 m_pja;    //XYZ, jet axis for vertex finding.
00237 
00238   Int_t         m_nvtrack;       // # of tracks.
00239   TClonesArray* m_vtrack_list;   // list of track objects for vertex finding.
00240   Int_t         m_nvertex;       // # of vertices.
00241   TClonesArray* m_vertex_list;   // list of reconstructed vertex objects.
00242   Int_t         m_nvrttrack;     // # of tracks which associate to vertices.
00243   Int_t         m_vrttrack_list[100]; //
00244 
00245   Int_t m_dblevel; //Debug level.
00246 
00247   //
00248   // PT corrected mass....
00249   //
00250   
00251   // Cut values for Seed Vertex Finding.
00252   Double_t m_SeedVrtRMax;   // Rmax cut: Default 2.3
00253   Double_t m_SeedVrtK0Mass; // Mass cut to reject K0S: 0.015 GeV
00254   Double_t m_SeedVrtLambda0Mass; // Mass cut to reject K0S: 0.015 GeV
00255   Double_t m_SeedVrtSigMin; // Sig min cut : 2.0 sigma
00256 
00257   // Cut calues for track attatcement
00258   Double_t m_TrdiMax; // Att. trk. Max DOCA to vertex axis.:  Default 0.1
00259   Double_t m_LodiMin; // Att. trk. POCA min longi dist along VTX axis.: 0.05
00260   Double_t m_LodrMin; // Att. trk. POCA min longi dist/seed vertex dist.: 0.25
00261   Double_t m_LodrMax; // Att. trk. POCA max longi dist/seed vertex dist.: 2.0
00262   Double_t m_AntaMax; // Att. trk. max angle between track and vertex direction
00263   
00264   // PT correction stuff
00265   Double_t m_PTIP[2]; // IP error for PT correction, xy and z.: ~1.5 sigma
00266   Double_t m_NVsigma; // # of sigma for Vertex error for PT correction.: 1.0
00267 
00268   // NN valiables
00269   Bool_t   m_UseNN;      // use NN for HF-jet tag... default kFALSE.
00270   Double_t m_SeedVrtNN;  // NN cut for seed vertex selection... default 0.4
00271   Double_t m_TrackAttNN; // NN cut for track attachment... default 0.6
00272   Double_t m_SelectNN;   // NN cut for heavy flavour tag... default 0.5
00273 
00274   // Output from CalcPTMass
00275   Double_t m_Rmass    ;// Raw Mass
00276   Double_t m_PtMass   ;// Pt corrected Mass
00277   Double_t m_PtMassEr ;// Pt corrected Mass with IP errors
00278   Double_t m_Masstag  ;// Pt corrected IP err with 2*raw mass oritection
00279   Double_t m_MissPt   ;// Missing Pt
00280   TLorentzVector m_p4Vertex; //Four vector of the vertex
00281 
00282   // MC information
00283   Int_t m_mcjetflav; // MC jet flavor
00284 
00285   Int_t     m_ntrk2vrt; // array size of m_trk2vrt
00286   Int_t*    m_trk2vrt;  //[m_ntrk2vrt] Map track->vertex
00287   Int_t     m_nvrt2trk; // array size of m_trk2vrt
00288   Int_t*    m_vrt2trk;  //[m_nvrt2trk] Map track->vertex
00289   Double_t* m_trkl;     //[m_ntrk2vrt] array of L of tracks
00290 
00291 public:
00292   ClassDef(LCDVToplBase,1) // A class for a topological vertexing.
00293 
00294 };
00295 #endif

Generated on Tue Jul 18 18:33:57 2006 for LCDROOT by  doxygen 1.4.6