/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/EventTag/EventTag-00-01-07/EventTag/EventTagSvc.h

Go to the documentation of this file.
00001 #ifndef EventTagSvc_H
00002 #define EventTagSvc_H
00003 
00004 #include <vector>
00005 #include <string>
00006 #include <map>
00007 #include <set>
00008 
00009 #ifndef BEAN
00010 #include "EventTag/IEventTagSvc.h"
00011 
00012 #include "GaudiKernel/Service.h"
00013 //#include "EventModel/EventList.h"
00014 #else
00015 #include "RootEventData/TMcEvent.h"
00016 #include "RootEventData/TMcParticle.h"
00017 
00018 typedef bool StatusCode;
00019 #endif
00020 
00021 typedef std::vector <int>  keyVector;
00022 typedef std::map<keyVector,int> decayModeTab;
00023 
00025 #ifndef BEAN
00026 class EventTagSvc: virtual public IEventTagSvc,
00027                 virtual public Service{
00028 public:
00029   EventTagSvc(const std::string& name, ISvcLocator* svc);
00030 
00031 #else // BEAN
00032 class EventTagSvc {
00033 public:
00034   static EventTagSvc* instance() {
00035     return (m_evtag) ? m_evtag : (m_evtag=new(std::nothrow)EventTagSvc());
00036   }
00037 
00038 private:
00039   EventTagSvc();
00040   virtual ~EventTagSvc(){};
00041 
00042 public:
00043   void setMcEvent(TMcEvent* mcEvent)    { m_TMcEvent = mcEvent; }
00044 #endif
00045 
00046   StatusCode initialize();
00047 
00048   std::string pdg2name(long int pdg);
00049   long int name2pdg(std::string pname);
00050 
00051 #ifndef BEAN
00052   //  StatusCode execute();
00053   StatusCode finalize();
00054 
00055   int getDecayCode(Event::McParticle* part);
00056   unsigned long long int getChainCode(Event::McParticle* part);
00057   unsigned int getCharmDecayType(Event::McParticle* part); 
00058 
00059   virtual StatusCode queryInterface( const InterfaceID&, void** ppvInterface );
00060 #else
00061   int getDecayCode(TMcParticle* part);
00062   unsigned long long int getChainCode(TMcParticle* part);
00063   unsigned int getCharmDecayType(TMcParticle* part); 
00064 
00065   unsigned int  getEventTag(unsigned int initialEventTag = 0);
00066   
00067 
00068   //declare property functions
00069   
00070   void setVerbose(int n_verbose)        { verbose = n_verbose;}
00071   void setPdtFile(std::string n_pdtFile){ m_pdtFile = n_pdtFile;}
00072   void setDecayTabsFile(std::string n_decayTabsFile) 
00073                                         { m_decayTabsFile = n_decayTabsFile;}
00074   void setUserDecayTabsFile(std::string n_userDecayTabsFile) 
00075                                 { m_userDecayTabsFile = n_userDecayTabsFile;}
00076   void setBuildAntiTabs(bool n_buildAntiTabs) 
00077                                         { m_buildAntiTabs = n_buildAntiTabs;}
00078   void setIgnorePhotons(bool n_ignorePhotons) 
00079                                         { m_ignorePhotons = n_ignorePhotons;}
00080   void setIgnoreFSR(bool n_ignoreFSR)   { m_ignoreFSR = n_ignoreFSR;}
00081   void setDigK0(bool n_digK0)           { m_digK0 = n_digK0;}
00082   void setUserChainTrig(std::vector<string> n_userChainTrig) 
00083                                         { userChainTrig = n_userChainTrig;}
00084   void addUserChainTrig(std::string n_userChainTrig) 
00085                                 { userChainTrig.push_back(n_userChainTrig);}
00086 #endif
00087 
00088 private:
00089   std::string m_decayTabsFile;
00090   std::string m_pdtFile;
00091   std::string m_userDecayTabsFile;
00092   bool m_buildAntiTabs;
00093   bool m_ignorePhotons;
00094   bool m_ignoreFSR;
00095   bool m_digK0;
00096   std::vector<std::string> userChainTrig;
00097 
00098   std::map<int,decayModeTab*>m_decayTabList;
00099   std::map<std::string,long int> name2pdgTab;
00100   std::map<long int,std::string> pdg2nameTab;
00101   std::set<long int> chainTrigParticles;
00102   //  int readPdtFile(string fname,MsgStream* log);
00103   int readPdtFile(std::string fname);
00104   int readDecayTabFile(std::string fname);
00105   int buildAntiPartTabs();
00106 
00107 #ifdef BEAN
00108   static EventTagSvc* m_evtag;
00109   TMcEvent* m_TMcEvent;
00110   int verbose;
00111 #endif
00112 };
00113 
00114 #endif

Generated on Tue Nov 29 22:58:29 2016 for BOSS_7.0.2 by  doxygen 1.4.7