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