StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StarFilterMaker.h
1 #ifndef __StarFilterMaker_h__
2 #define __StarFilterMaker_h__
3 
4 #include "StMaker.h"
5 #include "TLorentzVector.h"
6 #include "TVector3.h"
7 #include "TClonesArray.h"
8 #include "TDatabasePDG.h"
9 //#include "StarParticleStack.h"
10 
11 #include "StarGenerator/UTIL/StarParticleData.h"
12 #include "StarGenerator/BASE/StarPrimaryMaker.h"
13 
14 class StarGenEvent;
15 class StarPrimaryMaker;
16 
17 class TTree;
18 class TFile;
19 
26 /*
27  To Do's: JFN 4/22/13
28 
29  Should the filter make it's own tree? Probably not, it should probably make a branch of the 'main' tree
30  4/23- make a branch on the PrimaryMakers tree
31  How do things get passed along the chain? StarGenEvents? or a collection of them? What gets handed to the next link?
32  4/23- StMaker has a TDataSet object and functions to access it, but StarPrimaryMaker is also writing things to the tree
33 */
34 
35 /*
36  To Do's: JFN 4/23/13
37 
38  For each pass of BFC is only one event generated? Is it named mPrimaryEvent, or are their multiple events?
39  4/24- Just one, and it is named "PrimaryMaker". It can be retreived from StMaker
40  I think for each event I should use some "Event()" function defined on the event generator class, haven't found it yet...
41  And how will we handle looping over generators?
42  4/24- There is a one primary event per BFC loop and it is StarPrimaryMaker->mPrimaryEvent retreivable via primary->event()
43 */
44 
45 /*
46  To Do's: JFN 4/24/13
47 
48  Have filter return a kStatus, and then decide what to do with the event (reject, flag, etc) in Make()
49  Decide what has to be stored in the TTree: just the event num and status, every track and status, etc...
50 */
51 
52 class StarFilterMaker : public StMaker
53 {
54  public:
55  StarFilterMaker( const Char_t *name="" );
56  ~StarFilterMaker() { /* nothing to see here */ };
57 
58  Int_t Init();
59  Int_t Make();
60  void Clear( const Option_t *opts="" );
61  Int_t Finish();
62 
67  virtual Int_t Filter( StarGenEvent *event=0 ) = 0;
68 
69  void SetEvent( StarGenEvent *event ){ mEvent = event; }
70 
71  Int_t numberOfEvents(){ return NumberofEvents; }
72  Int_t acceptedEvents(){ return AcceptedEvents; }
73  Int_t rejectedEvents(){ return RejectedEvents; }
74  Int_t rejectedSinceLast(){ return RejectedSinceLast; }
75 
76  private:
77 
78  Int_t NumberofEvents;
79  Int_t AcceptedEvents;
80  Int_t RejectedEvents;
81  Int_t RejectedSinceLast;
82 
83  private:
84  protected:
85  ClassDef(StarFilterMaker,1);
86 
87  StarGenEvent *mEvent;
88 
89  //Options:
90  Bool_t bFlag; // If false, failed tracks will be flaged but not rejected. Default:false
91 
92 };
93 #endif
virtual Int_t Filter(StarGenEvent *event=0)=0
Main filter class. Goes anywhere in the chain, filters StarGenEvent objects.
Base class for event records.
Definition: StarGenEvent.h:81
Main steering class for event generation.