PandaRoot
tutorials/anatask/PndSoftTriggerTask.h
Go to the documentation of this file.
1 #ifndef PndSoftTriggerTask_H
2 #define PndSoftTriggerTask_H 1
3 
4 #include "FairTask.h"
5 #include <map>
6 #include <string>
7 
8 class TClonesArray;
9 class TObjectArray;
10 class TH1F;
11 class TH2F;
12 
14 class PndAnalysis;
15 class RhoCandList;
16 class TStopwatch;
17 class RhoTuple;
18 
19 class PndSoftTriggerTask : public FairTask {
20 
21  public:
22  typedef std::map<Int_t, Float_t> mapper;
23 
26 
29 
31  virtual InitStatus Init();
32 
34  virtual void Exec(Option_t *opt);
35 
36  virtual void Finish();
37  // void CreateStructure();
38 
39  protected:
40  int evcount;
42 
43  // counter for accepted events
44  int cntsel;
45 
46  int cntjpsi;
47  int cntd0;
48  int cntdpm;
49  int cntds;
50  int cntphi;
51  int cntlamc;
52 
53  // **** mass selectors for the resonances/composites
54  //
55 
56  private:
57  void FillMassHisto(TH1F *h, RhoCandList &l);
58  int SelectPdgCode(RhoCandList &mct, RhoCandList &l);
59  void PrintList(RhoCandList &l, int max = 10);
60  int RemoveDoubles(RhoCandList &l, double limit = 0.0001);
61  void SelectPid(int type, int pdg, int chrg, RhoCandList &l, RhoCandList &lpid, double cut = 0.2);
62  void ConfigureHistos(TH1F *hall, TH1F *htrue, TH1F *hsel);
63 
65  TH1F *h_mom;
66  TH1F *h_momc;
67  TH1F *h_momn;
68  TH1F *h_mult;
69  TH1F *h_multc;
70  TH1F *h_multn;
71  TH1F *h_multrem;
72 
73  // *** J/psi histos
74  TH1F *h_jpsi; // all J/psi combis
75  TH1F *h_jpsit; // J/psi combis w/ truth match
76  TH1F *h_jpsisel; // selected J/psi combis
77 
78  // *** D0 histos
79  TH1F *h_d0;
80  TH1F *h_d0t;
81  TH1F *h_d0sel;
82 
83  TH1F *h_d0_pocx;
84  TH1F *h_d0_pocy;
85  TH1F *h_d0_pocz;
86 
87  TH1F *h_d0_pocxm;
88  TH1F *h_d0_pocym;
89  TH1F *h_d0_poczm;
90 
91  TH1F *h_d0_l;
92  TH1F *h_d0_lm;
93 
94  // *** D+ histos
95  TH1F *h_dpm;
96  TH1F *h_dpmt;
97  TH1F *h_dpmsel;
98 
99  // *** Ds histos
100  TH1F *h_ds;
101  TH1F *h_dst;
102  TH1F *h_dssel;
103 
104  // *** Phi histos
105  TH1F *h_phi;
106  TH1F *h_phit;
107  TH1F *h_phisel;
108 
109  // *** Lambda_c histos
110  TH1F *h_lamc;
111  TH1F *h_lamct;
112  TH1F *h_lamcsel;
113 
114  RhoTuple *ntp;
115  RhoTuple *ntp2;
116 
117  /* TH1F *hjpsimass;
118  TH1F *hpsimass;*/
119 
120  PndAnalysis *theAnalysis;
121  TStopwatch *timer;
122 
124  virtual void SetParContainers();
125 
126  ClassDef(PndSoftTriggerTask, 1);
127 };
128 
129 #endif
std::map< Int_t, Float_t > mapper
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:25
virtual void Finish()
virtual void Exec(Option_t *opt)
virtual InitStatus Init()