eic-smear
1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
|
Go to the documentation of this file.
10 #ifndef INCLUDE_EICSMEAR_SMEAR_EVENTFACTORY_H_
11 #define INCLUDE_EICSMEAR_SMEAR_EVENTFACTORY_H_
44 return T::Class()->GetName();
50 virtual TBranch*
Branch(TTree&
tree,
const std::string& name) {
52 TBranch* branch =
tree.Branch(name.c_str(),
EventName().c_str(),
54 branch->ResetAddress();
64 virtual void Fill(TBranch& branch) {
66 branch.ResetAddress();
67 branch.SetAddress(&event);
68 branch.GetTree()->Fill();
77 #endif // INCLUDE_EICSMEAR_SMEAR_EVENTFACTORY_H_
virtual void Fill(TBranch &branch)
Create() the new event and fill the requested tree branch with it.
virtual ~EventFactory()
Destructor.
virtual TBranch * Branch(TTree &tree, const std::string &name)
Create and configure the output branch for smeared events in the tree.
Event factory for events of a particular type.
Abstract base class for event builders.
virtual std::string EventName() const
Returns the name of the branch object type (Smear::Event).
virtual T * Create()=0
Returns a new event instance.