FairRoot/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 
26 #include "FairTask.h"
27 #include <vector>
28 #include "TLorentzVector.h"
29 #include "TString.h"
30 
31 class TClonesArray;
32 class TH1F;
33 class TH2F;
34 class TDatabasePDG;
35 
36 class PndAnalysis;
37 class RhoCandList;
38 class RhoCandidate;
39 class RhoTuple;
40 class PndSimpleCombiner;
41 
42 
43 class PndSimpleCombinerTask : public FairTask
44 {
45 
46  public:
47 
48  // ** Default constructor
49  PndSimpleCombinerTask(TString anadecay, TString anaparms, double p=0, int run=0, int mode=0);
50 
51  // ** Destructor
53 
54  void SetMultFactor(int fac) {fRunMult=fac;} // set run multiplicator
55 
56  // ** Virtual method Init
57  virtual InitStatus Init();
58 
59  // ** Virtual method Exec
60  virtual void Exec(Option_t* opt);
61 
62  virtual void Finish();
63 
64  void SetPidAlgo(TString algo) { fPidAlgo = algo;}
65  void SetVerbose(int v=1) {fVerbose = v;} // verbosity level, also passed to PndSimpleCombiner
66 
67  protected:
68 
69 
70  private:
71  int SplitString(TString s, TString delim, std::vector<TString> &toks);// routine to split a string in pieces
73  void InitParms();
74 
75  int fVerbose; // verbosity level
76  int fEvtCount; // event counter
77  int fRun; // run number to be stored in ntuple (for unique event ID)
78  int fMode; // optional arbitrary mode number
79  int fRunMult; // factor for fRun to create unique event ID; default = 10000 (has be larger the num. of events per job!)
80 
81  TLorentzVector fIni; // initial 4-vector; either computed from constructor parameter Mom, or taken from MC list
82  TString fAnaDecay; // decay string
83  TString fAnaParms; // parameter string; has to contain also parameters for PndSimpleCombiner
84  int fNntp; // number of ntuples to be created
85  TString fPidAlgo; // PID algo name
86  bool fQaMC; // flag to store MC list
87  bool fQaEventShape; // flag to store event shape variables
88  int fQaRecoInfo; // flag to store shotr (==1) or full (==2) reco info
89  bool fQaEvShapeNtp; // flag to store event shape variables in an extra ntuple
90  bool fFit4C; // flag to perform 4C fit
91  bool fBest4C; // flag to only store best 4C fitted candidate
92  bool fFitVtx; // flag to perform vtx fit
93  double fFit4CChiCut; // cut on chi2 from 4C fitter
94  double fFitVtxChiCut; // cut on chi2 from vtx fitter
95 
96  // *** object instances needed
99 
100  std::vector<int> vmpdg; // pdg code of the composites
101  std::vector<RhoTuple*> vntp; // ntuples for the composites
102  unsigned int fNodump; // bit marker for ntuples not to be dumped (to save disc space); e.g. 101 -> don't dump ntp0 & ntp2
103  RhoTuple *nmc; // MC ntuple
104  RhoTuple *nevt; // MC ntuple
105 
106  TClonesArray *fOnlineFilterInfo;
107 
109 
110 };
111 
112 #endif
Double_t p
Definition: anasim.C:58
Int_t run
Definition: autocutx.C:47
int SplitString(TString s, TString delim, std::vector< TString > &toks)
TLorentzVector s
Definition: Pnd2DStar.C:50
void SetPidAlgo(TString algo)
PndSimpleCombinerTask(TString anadecay, TString anaparms, double p=0, int run=0, int mode=0)
__m128 v
Definition: P4_F32vec4.h:4
int CountChargedDaughters(RhoCandidate *c)
Int_t mode
Definition: autocutx.C:47
PndSimpleCombiner * fSimpleCombiner
virtual void Exec(Option_t *opt)
ClassDef(PndSimpleCombinerTask, 1)
std::vector< RhoTuple * > vntp