df87c52fcb0d3c82f37e09d0b015d14d442a2642
[u/mrichter/AliRoot.git] / PWG3 / muon / AliMuonsHFHeader.cxx
1 #include <TNamed.h>
2 #include <TMath.h>
3
4 #include "AliVHeader.h"
5 #include "AliVVertex.h"
6 #include "AliMuonsHFHeader.h"
7
8 ClassImp(AliMuonsHFHeader)
9
10 //_____________________________________________________________________________
11 AliMuonsHFHeader::AliMuonsHFHeader() :
12 TNamed(),
13 fTriggerMask(0),
14 fNContributors(0),
15 fMultMuon(0),
16 fMultDimuon(0),
17 fCentrality(0.),
18 fUnrecoVertex(kFALSE)
19 {
20   //
21   // default constructor
22   //
23   for (Int_t i=0; i<3; i++) fPosition[i]=0.;
24 }
25
26 //_____________________________________________________________________________
27 AliMuonsHFHeader::~AliMuonsHFHeader()
28 {
29   //
30   // default destructor
31   //
32 }
33
34 //_____________________________________________________________________________
35 void AliMuonsHFHeader::SetHeader(AliVHeader *header)
36 {
37   fTriggerMask = header->GetTriggerMask();
38   return;
39 }
40
41 //_____________________________________________________________________________
42 void AliMuonsHFHeader::SetVertex(AliVVertex *vertex)
43 {
44   vertex->GetXYZ(fPosition);
45   fNContributors = vertex->GetNContributors();
46   fUnrecoVertex = (TMath::Abs(fPosition[0])<1e-6 && TMath::Abs(fPosition[1])<1e-6 &&
47                    TMath::Abs(fPosition[2])<1e-6);
48   return;
49 }