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

CommonData.h

Go to the documentation of this file.
00001 // ================================================
00002 // CommonData class description
00003 // ================================================
00004 //
00005 // Namespace Atlfast::
00006 //
00007 // class: CommonData
00008 //
00009 // Description: 
00010 //
00011 //  Store things needed by a number of algorithms
00012 
00013 // ................................................................
00014 //
00015 
00016 #ifndef __ATLFAST_CommonData__
00017 #define __ATLFAST_CommonData__
00018 
00019 #include "GaudiKernel/DataObject.h"
00020 #include "AtlfastCode/HepMC_helper.h"
00021 
00022 static const CLID CLID_CommonData = 2309;
00023 namespace Atlfast {
00024 
00025   class CommonData : public DataObject {
00026     enum Luminosity {lowLuminosity=1, highLuminosity=2};
00027   public:
00028     
00030     CommonData() : DataObject(){
00031     }
00032 
00033     CommonData(int lumi, 
00034                bool fieldOn,
00035                double barrelForwardEta,
00036                int randSeed,
00037                std::vector<int> invisibles);
00038 
00039     CommonData(const CommonData& c): 
00040       DataObject(), m_lumi(c.m_lumi), 
00041       m_fieldOn(c.m_fieldOn), m_barrelForwardEta(c.m_barrelForwardEta),
00042       m_invisibles(c.m_invisibles){
00043      
00044       m_visibleToCal   = (c.m_visibleToCal)->create() ;
00045       m_visibleToAtlas = (c.m_visibleToAtlas)->create() ;
00046     }
00047 
00049     virtual StreamBuffer& serialize(StreamBuffer& s);
00050 
00052     virtual StreamBuffer& serialize(StreamBuffer& s) const;
00053 
00054     static const CLID& classID() { return CLID_CommonData;}
00055     virtual const CLID& clID() const { return classID();}
00056     
00057     virtual ~CommonData(){
00058       // the deletes commented out below cause a segmentation
00059       // error at the end of the job
00060       //    delete m_visibleToCal;
00061       //    delete m_visibleToAtlas;
00062     }
00063     
00064     int lumi()                                 const {return m_lumi;}
00065     bool fieldOn()                             const {return m_fieldOn;}
00066     double barrelForwardEta()                  const {return 
00067                                                         m_barrelForwardEta;}
00068     int randSeed()                             const {return m_randSeed;}
00069     HepMC_helper::IMCselector* visibleToCal()  const {return m_visibleToCal;}
00070     HepMC_helper::IMCselector* visibleToAtlas()const {return m_visibleToAtlas;}
00071 
00072   private:
00073 
00074     int m_lumi;
00075     bool        m_fieldOn;
00076     double      m_barrelForwardEta;
00077     int         m_randSeed;
00078     HepMC_helper::IMCselector*  m_visibleToCal;
00079     HepMC_helper::IMCselector*  m_visibleToAtlas;
00080     //copy from the CommonDataMaker for persistency:
00081     std::vector<int> m_invisibles;    // List of ids of invisible ptcles
00082     void setPointers();
00083   };
00084    
00085 }  //end of namespace bracket
00086 
00087 #endif
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 

Generated on Wed Jan 23 12:58:31 2002 for Atlfast by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001