Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaAvgVertex.h
Go to the documentation of this file.
1#ifndef Podd_THaAvgVertex_h_
2#define Podd_THaAvgVertex_h_
3
5//
6// THaAvgVertex
7//
9
10#include "THaPhysicsModule.h"
11#include "THaVertexModule.h"
12#include "TString.h"
13
15
16public:
17 THaAvgVertex( const char* name, const char* description,
18 const char* spectro1="", const char* spectro2="" );
19 virtual ~THaAvgVertex();
20
21 virtual void Clear( Option_t* opt="" );
22
23 Double_t GetX() const { return fVertex.X(); }
24 Double_t GetY() const { return fVertex.Y(); }
25 Double_t GetZ() const { return fVertex.Z(); }
26
27 virtual EStatus Init( const TDatime& run_time );
28 virtual Int_t Process( const THaEvData& );
29 void SetSpectrometers( const char* name1, const char* name2 );
30
31protected:
32
33 TString fName1; // Name of spectrometer #1
34 TString fName2; // Name of spectrometer #2
35 THaVertexModule* fSpectro1; // Pointer to spectrometer #1 object
36 THaVertexModule* fSpectro2; // Pointer to spectrometer #2 object
37
38 virtual Int_t DefineVariables( EMode mode = kDefine );
39
40 ClassDef(THaAvgVertex,0) //Two-arm vertex module
41};
42
43//_________ inlines __________________________________________________________
44inline
45void THaAvgVertex::SetSpectrometers( const char* name1,
46 const char* name2 )
47{
48 fName1 = name1;
49 fName2 = name2;
50}
51
52#endif
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
virtual Int_t DefineVariables(EMode mode=kDefine)
Double_t GetZ() const
Double_t GetX() const
THaVertexModule * fSpectro2
TString fName1
void SetSpectrometers(const char *name1, const char *name2)
Double_t GetY() const
virtual ~THaAvgVertex()
THaVertexModule * fSpectro1
virtual void Clear(Option_t *opt="")
TString fName2
virtual Int_t Process(const THaEvData &)
THaAvgVertex(const char *name, const char *description, const char *spectro1="", const char *spectro2="")
Double_t Z() const
Double_t Y() const
Double_t X() const