PandaRoot
PndSimpleCombinerTask.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 // ************************************************************************
14 //
15 // Analysis Task using PndSimpleCombiner
16 //
17 // ************************************************************************
18 //
19 // Parameters:
20 // - anadecay : Decay specification, e.g. "phi -> K+ K-; D_s+ -> phi pi+" (automatic charged conjugation; particle used have to be defined beforehand)
21 // Keyword 'nocc' at end of decay definition suppresses automatic charged conjugation
22 // This string is handed over to PndSimpleCombiner
23 //
24 // - params : configuration parameters, e.g. "fit4c:qamc". The string contains also parameters handled by PndSimpleCombiner; those handled by this task are:
25 // - fit4c : perform 4C fit on last resonance
26 // - fitvtx : perform vertex fit on all resonances when possible (at least two daughters)
27 // - qamc : stored MC information
28 // - qaevtshape : store event shape information
29 //
30 // K.Goetzen 1/2015
31 //
32 // ************************************************************************
33 
34 #ifndef PndSimpleCombinerTask_H
35 #define PndSimpleCombinerTask_H 1
36 
37 #include <vector>
38 #include "FairTask.h"
39 #include "TLorentzVector.h"
40 #include "TString.h"
41 
42 class TClonesArray;
43 class TH1F;
44 class TH2F;
45 class TDatabasePDG;
46 
47 class PndAnalysis;
48 class RhoCandList;
49 class RhoCandidate;
50 class RhoTuple;
52 
53 typedef std::vector<TString> StringList;
54 
55 class PndSimpleCombinerTask : public FairTask {
56 
57  public:
58  // ** Default constructor
59  PndSimpleCombinerTask(TString anadecay, TString anaparms, double p = 0, int run = 0, int mode = 0);
60 
61  // ** Destructor
63 
64  void SetMultFactor(int fac) { fRunMult = fac; } // set run multiplicator
65 
66  // ** Virtual method Init
67  virtual InitStatus Init();
68 
69  // ** Virtual method Exec
70  virtual void Exec(Option_t *opt);
71 
72  virtual void Finish();
73 
74  void SetPidAlgo(TString algo) { fPidAlgo = algo; }
75  void SetVerbose(int v = 1) { fVerbose = v; } // verbosity level, also passed to PndSimpleCombiner
76 
77  protected:
78  private:
79  StringList SplitString(TString s, TString delim); // routine to split a string in pieces
80  int CountChargedDaughters(RhoCandidate *c); // information for vertex fitting
81  void InitParms(); // parse parameter string
82  void InitParticleDB(); // initialize TDatabasePDG with input/pdg_table_evtgen.txt
83  void UpdateParticleDB(); // add new particles found in pgenerators/EvtGen/EvtGen/Private/evt.pdl
84 
85  int fVerbose; // verbosity level
86  int fEvtCount; // event counter
87  int fRun; // run number to be stored in ntuple (for unique event ID)
88  int fMode; // optional arbitrary mode number
89  int fRunMult; // factor for fRun to create unique event ID; default = 10000 (has be larger the num. of events per job!)
90 
91  TLorentzVector fIni; // initial 4-vector; either computed from constructor parameter Mom, or taken from MC list
92  TString fAnaDecay; // decay string
93  TString fAnaParms; // parameter string; has to contain also parameters for PndSimpleCombiner
94  int fNntp; // number of ntuples to be created
95  TString fPidAlgo; // PID algo name
96  bool fQaMC; // flag to store MC list
97  bool fQaEventShape; // flag to store event shape variables
98  int fQaRecoInfo; // flag to store shotr (==1) or full (==2) reco info
99  bool fQaEvShapeNtp; // flag to store event shape variables in an extra ntuple
100  bool fFit4C; // flag to perform 4C fit
101  bool fBest4C; // flag to only store best 4C fitted candidate
102  bool fFitVtx; // flag to perform vtx fit
103  double fFit4CChiCut; // cut on chi2 from 4C fitter
104  double fFitVtxChiCut; // cut on chi2 from vtx fitter
105 
106  // *** object instances needed
107  PndAnalysis *fAnalysis;
108  PndSimpleCombiner *fSimpleCombiner;
109 
110  std::vector<int> vmpdg; // pdg code of the composites
111  std::vector<RhoTuple *> vntp; // ntuples for the composites
112  unsigned int fNodump; // bit marker for ntuples not to be dumped (to save disc space); e.g. 101 -> don't dump ntp0 & ntp2
113  RhoTuple *nmc; // MC ntuple
114  RhoTuple *nevt; // MC ntuple
115 
116  TClonesArray *fOnlineFilterInfo;
117 
118  ClassDef(PndSimpleCombinerTask, 1);
119 };
120 
121 #endif
void SetPidAlgo(TString algo)
virtual InitStatus Init()
PndSimpleCombinerTask(TString anadecay, TString anaparms, double p=0, int run=0, int mode=0)
std::vector< TString > StringList
__m128 v
Definition: P4_F32vec4.h:15
virtual void Exec(Option_t *opt)
std::vector< TString > StringList
virtual void Finish()