Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-16 09:02:06

0001 /**
0002  \file
0003  Declaration of class erhic::hadronic::Pythia6EventFactory.
0004  
0005  \author    Thomas Burton 
0006  \date      2012-05-03
0007  \copyright 2012 Brookhaven National Lab
0008  */
0009 
0010 #ifndef INCLUDE_EICSMEAR_HADRONIC_PYTHIA6EVENTFACTORY_H_
0011 #define INCLUDE_EICSMEAR_HADRONIC_PYTHIA6EVENTFACTORY_H_
0012 
0013 #include <memory>
0014 #include <string>
0015 
0016 #include <Rtypes.h>  // For ClassDef macro
0017 
0018 #include <eicsmear/hadronic/EventPythia.h>
0019 #include <eicsmear/erhic/EventFactory.h>
0020 #include <eicsmear/erhic/EventMCFilterABC.h>
0021 
0022 class TBranch;
0023 
0024 namespace erhic {
0025 namespace hadronic {
0026 
0027 /**
0028  A realisation of erhic::VirtualEventFactory generating
0029  objects of type hadronic::EventPythiaPP.
0030  */
0031 class Pythia6EventFactory : public erhic::VirtualEventFactory {
0032  public:
0033   /**
0034    Destructor.
0035    */
0036   virtual ~Pythia6EventFactory();
0037 
0038   /**
0039    Constructor.
0040    */
0041   explicit Pythia6EventFactory(EventMCFilterABC* filter);
0042 
0043   /**
0044    Returns a new event instance.
0045    */
0046   virtual EventPythiaPP* Create();
0047 
0048   /**
0049    Returns the name of the event class created by this factory.
0050    */
0051   virtual std::string EventName() const;
0052 
0053   /**
0054    Create a new branch on a tree.
0055    */
0056   virtual TBranch* Branch(TTree& tree, const std::string& branchName);
0057 
0058   /**
0059    Fill a tree branch with the current event.
0060    */
0061   virtual void Fill(TBranch&);
0062 
0063  protected:
0064   /**
0065    Construct an event from the current state of TPythia6.
0066    */
0067   virtual EventPythiaPP* BuildEvent();
0068 
0069   std::unique_ptr<erhic::EventMCFilterABC> mFilter;
0070   EventPythiaPP* mEvent;
0071 
0072   ClassDef(erhic::hadronic::Pythia6EventFactory, 1)
0073 };
0074 
0075 }  // namespace hadronic
0076 }  // namespace erhic
0077 
0078 #endif  // INCLUDE_EICSMEAR_HADRONIC_PYTHIA6EVENTFACTORY_H_