PandaRoot
PndParticleQATask.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 PndParticleQATask_H
14 #define PndParticleQATask_H 1
15 
16 #include "FairTask.h"
17 #include <map>
18 #include <string>
19 #include "TLorentzVector.h"
20 #include "TString.h"
21 
22 class TClonesArray;
23 class TObjectArray;
24 class TH1F;
25 class TH2F;
26 
28 class PndAnalysis;
29 class RhoCandList;
30 class RhoTuple;
32 
33 typedef std::vector<TString> StringList;
34 
35 class PndParticleQATask : public FairTask {
36 
37  public:
38  // ** Default constructor
39  PndParticleQATask(bool fastsim = false, bool dumpchrg = true, bool dumpneut = true, bool dumpmc = true, int mode = 0);
40 
41  // ** Destructor
43 
44  // ** Virtual method Init
45  virtual InitStatus Init();
46 
47  // ** Virtual method Exec
48  virtual void Exec(Option_t *opt);
49 
50  virtual void Finish();
51 
52  void SetFastSim(bool fsim = true) { fFastSim = fsim; }
53  void SetPidArrayNames(TString names) { fPidArrayNames = names; }
54 
55  protected:
56  private:
57  // *** event counter
58  int fEvtCount;
59  TString fPidArrayNames;
60 
61  // *** a method
62  int SelectTruePid(PndAnalysis *ana, RhoCandList &l);
63  int SplitString(TString s, TString delim, StringList &toks); // routine to split a string in pieces
64 
65  // *** declare NTuple
66  RhoTuple *nmc; // mc truth
67  RhoTuple *ntp; // tuple to store vars from charged
68  RhoTuple *ntpn; // tuple to store vars from neutrals
69 
70  // *** the PndAnalysis object
71  PndAnalysis *fAnalysis;
72 
73  bool fFastSim;
74  bool fDumpChrg;
75  bool fDumpNeut;
76  bool fDumpMc;
77  int fMode;
78 
79  StringList fPidList;
80 
81  // *** Get parameter containers
82  virtual void SetParContainers();
83 
84  ClassDef(PndParticleQATask, 1);
85 };
86 
87 #endif
virtual void Exec(Option_t *opt)
virtual InitStatus Init()
void SetFastSim(bool fsim=true)
std::vector< TString > StringList
virtual void Finish()
PndParticleQATask(bool fastsim=false, bool dumpchrg=true, bool dumpneut=true, bool dumpmc=true, int mode=0)
void SetPidArrayNames(TString names)