StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StKFEvent.h
1 #ifndef __StKFEvent__
2 #define __StKFEvent__
3 #include "Riostream.h"
4 #include "TObject.h"
5 #include "TClonesArray.h"
6 #include "StMuDstVtxT.h"
7 #include "StKFVertex.h"
8 #include "StVertexT.h"
9 #include "StVertexP.h"
10 
11 class StKFEvent : public TObject {
12 public:
13  StKFEvent() {
14  if (!fgMuDstVtx) fgMuDstVtx = new TClonesArray("StVertexT", 100);
15  fMuDstVtx = fgMuDstVtx; fNMuDstVtx = 0;
16  if (!fgKFVtx) fgKFVtx = new TClonesArray("StVertexT", 100);
17  fKFVtx = fgKFVtx; fNKFVtx = 0;
18  if (!fgDKFPair) fgDKFPair = new TClonesArray("StVertexP", 100);
19  fDKFPair = fgDKFPair; fNDKFPair = 0;
20  if (!fgKFKFPair) fgKFKFPair = new TClonesArray("StVertexP", 100);
21  fKFKFPair = fgKFKFPair; fNKFKFPair = 0;
22  }
23  virtual ~StKFEvent() {Clear();}
24  void SetTemperature(Double_t T) {fTemperature = T;}
25  void AddMuVtx(StMuDstVtxT &muDstVtx) {TClonesArray &MuDstVtxs = *fMuDstVtx; new(MuDstVtxs[fNMuDstVtx++]) StVertexT(muDstVtx);}
26  void AddKFVtx(StKFVertex &kfVtx) {TClonesArray &KFVtxs = *fKFVtx; new(KFVtxs[fNKFVtx++]) StVertexT(kfVtx); }
27  void AddDKFPair(Int_t i, Int_t j, StVertexT &muDstVtx, StVertexT &kfVtx, Double_t chi2 = 0) {
28  TClonesArray &DKFPairs = *fDKFPair; new(DKFPairs[fNDKFPair++]) StVertexP(i,j,muDstVtx,kfVtx,chi2);
29  }
30  void AddKFKFPair(Int_t i, Int_t j, StVertexT &kfVtxI, StVertexT &kfVtxJ, Double_t chi2 = 0) {
31  TClonesArray &KFKFPairs = *fKFKFPair; new(KFKFPairs[fNKFKFPair++]) StVertexP(i,j,kfVtxI,kfVtxJ,chi2);
32  }
33  void Clear(Option_t *option = "") {
34  fTemperature = 0;
35  fNMuDstVtx = 0; fMuDstVtx->Clear(option);
36  fNKFVtx = 0; fKFVtx->Clear(option);
37  fNDKFPair = 0; fDKFPair->Clear(option);
38  fNKFKFPair = 0; fKFKFPair->Clear(option);
39  }
40  void Reset(Option_t */* option = "" */) {SafeDelete(fgMuDstVtx); SafeDelete(fgKFVtx); SafeDelete(fgDKFPair); SafeDelete(fgKFKFPair);}
41  Int_t NoMuDstVtx() {return fNMuDstVtx;}
42  TClonesArray *MuDstVtx() {return fMuDstVtx;}
43  Int_t NoKFVtx() {return fNKFVtx;}
44  TClonesArray *KFVtx() {return fKFVtx;}
45  Int_t NoDKFPair() {return fNDKFPair;}
46  TClonesArray *DKFPair() {return fDKFPair;}
47  Int_t NoKFKFPair() {return fNKFKFPair;}
48  TClonesArray *KFKFPair() {return fKFKFPair;}
49 private:
50  Double_t fTemperature;
51  Int_t fNMuDstVtx;
52  Int_t fNKFVtx;
53  Int_t fNDKFPair;
54  Int_t fNKFKFPair;
55  TClonesArray *fMuDstVtx; //->
56  TClonesArray *fKFVtx; //->
57  TClonesArray *fDKFPair; //->
58  TClonesArray *fKFKFPair; //->
59  static TClonesArray *fgMuDstVtx;
60  static TClonesArray *fgKFVtx;
61  static TClonesArray *fgDKFPair;
62  static TClonesArray *fgKFKFPair;
63 
64  ClassDef(StKFEvent,1)
65 };
66 #endif