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