stablejet is hosted by Hepforge, IPPP Durham
StableJet
QCDSmearSequence.h
1 #ifndef FastJetStability_QCDSmearSequence_h
2 #define FastJetStability_QCDSmearSequence_h
3 
4 #include <vector>
5 #include <cassert>
6 
7 #include "npstat/nm/Triple.hh"
8 
9 #include "AbsSmearingAgent.h"
10 #include "QCDSmearSequenceCallback.h"
11 #include "StandardModel.h"
12 
13 namespace stab {
14 
16  {
17  public:
18  explicit QCDSmearSequence(const AlphaStrong& alphaS);
19 
20  // This object will not assume the ownership of the callbacks.
21  QCDSmearSequence(const AlphaStrong& alphaS,
22  const std::vector<QCDSmearSequenceCallback*> cb);
23 
24  // initialize
25  inline virtual void initialize(const Event &event, const StabilityEventInfo &info) { m_event = event; }
26 
27  virtual void smear(Event& event);
28 
29  // The following function returns the number of callback
30  // invocations which returned "true"
31  inline unsigned nCallBacks() const { return m_callBackCount; }
32 
33  // Add a callback. This object will not assume the callback ownership.
34  inline void addCallback(QCDSmearSequenceCallback* ptr)
35  {assert(ptr); callbacks_.push_back(ptr);}
36 
37 
38  private:
39  typedef npstat::Triple<double,unsigned,unsigned> ProbTriple;
40 
41  QCDSmearSequence();
42 
43  AlphaStrong alphaS_;
44  std::vector<QCDSmearSequenceCallback*> callbacks_;
45 
46  mutable std::vector<ProbTriple> probs_;
47  mutable std::vector<double> ptValues_;
48  mutable std::vector<int> used_;
49 
50  // number of callbac invocations returning true from previous smear
51  unsigned m_callBackCount;
52 
53  Event m_event;
54 
55  };
56 
57 
58 } // end stab namespace
59 
60 #endif
virtual void smear(Event &event)
smear the event, return the smeared event via the function argument.
virtual void initialize(const Event &event, const StabilityEventInfo &info)
initialize the smearing agent with the initial event