| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

MCTruthManager.h

Go to the documentation of this file.
00001 // $Id: MCTruthManager.h,v 1.5 2008/10/20 08:23:11 robbep Exp $
00002 #ifndef COMPONENTS_MCTRUTHMANAGER_H 
00003 #define COMPONENTS_MCTRUTHMANAGER_H 1
00004 
00005 #include <utility>
00006 // Include files
00007 //#include "Event/HepMCEvent.h"
00008 #include "HepMC/GenEvent.h"
00009 
00010 namespace LHCb {
00011   class MCParticle ;
00012 };
00013 
00020 class MCTruthManager 
00021 {
00022 public: 
00023 
00024   // Offset value for intermediate dummy and split particles
00025   enum MCTruthBarCode {
00026     DummyBarCode =  20000000,
00027     SplitBarCode = 100000000       
00028   };
00029   
00031   enum MCTruthPDGID {
00032     DummyPDGID = -99000000 
00033   };
00034 
00035   virtual ~MCTruthManager( ); 
00036 
00037   static MCTruthManager* GetInstance();
00038 
00039   void NewEvent();
00040   HepMC::GenEvent* GetCurrentEvent() {
00041     return event;
00042   };
00043 
00044   void PrintEvent();
00045  
00046   void AddParticle(HepMC::FourVector& fourMom, 
00047                    HepMC::FourVector& prodPos, HepMC::FourVector& endPos, 
00048                    int pdg, int trID, int parentID, bool directParent,
00049                    int creatorID, LHCb::MCParticle * motherMCP , 
00050                    bool oscillated = false );
00051  
00052   const std::vector<int>& GetPrimaryBarcodes();
00053 
00054   int GetCreatorID(int barcode);
00055 
00056   const std::vector<int>& GetOscillatedBarcodes();
00057 
00059   LHCb::MCParticle * GetMotherMCParticle( const int barcode ) ;
00060 
00061 protected:
00062   MCTruthManager( );
00063 
00064 
00065 private:
00066   HepMC::GenEvent* event;
00067 
00068   // vector containing barcodes of primary particles (not having any mother)
00069   std::vector<int> primarybarcodes;
00070 
00071   // map containing barcode of vertices and process identifier
00072   std::map<int,int> creators;
00073 
00074   // vector containing bar code of oscillated particles
00075   std::vector<int> oscillated;
00076 
00077   // map containing number of 'segmentations' for each particle
00078   // (i.e. number of additional vertices introduced in order to attach secondary particles
00079   // which were created 'in-flight', for instance bremstrahlung gammas, etc)
00080   std::map<int,int> segmentations;
00081 
00083   std::map< int , LHCb::MCParticle * > m_mcparticles ;
00084   
00085   // recursive printing of the tree
00086   void printTree(HepMC::GenParticle*,std::string);
00087 
00088 };
00089 #endif // COMPONENTS_MCTRUTHMANAGER_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:04:15 2011 for GaussTools by doxygen 1.4.7