ROOT logo
#ifndef ALIAODCONVERSIONMOTHER_H
#define ALIAODCONVERSIONMOTHER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice     */

////////////////////////////////////////////////
//--------------------------------------------- 
// Class reconstructing the mother particle of conversion gammas
//---------------------------------------------
////////////////////////////////////////////////

//Author Daniel Lohner (Daniel.Lohner@cern.ch)

#include "TLorentzVector.h"
#include "AliAODConversionParticle.h"
#include "AliAODConversionPhoton.h"
#include "AliKFConversionMother.h"
#include "AliKFParticle.h"

class AliAODConversionMother : public AliAODConversionParticle{

	public: 

		//Default Constructor
		AliAODConversionMother();

		// Constructor for ESD to AOD Conversion
		AliAODConversionMother(AliKFConversionMother *kf);

		//Constructor Decay Mother Particle
		AliAODConversionMother(AliAODConversionPhoton *y1,AliAODConversionPhoton *y2);
		// Constructor Mother particle from one photon and one meson
		AliAODConversionMother(AliAODConversionMother *meson, AliAODConversionPhoton *gamma);

		
		//Destructor
		virtual ~AliAODConversionMother();

		// MC

		void SetMCLabel(Int_t i){fMCLabel=i;}
		Int_t GetMCLabel(){return fMCLabel;}
		TParticle *GetMCParticle(AliStack *fMCStack);
		Bool_t IsTrueMeson(AliStack *fMCStack,Int_t pdgcode);

		///Set the Chi2 of reconstructed conversion gamma
		void SetChi2(Float_t chi2) {fChi2 = chi2;}

		//Get the Chi2 of particle
		Float_t Chi2() const {return fChi2;}

		///Set track or MC labels
		void SetLabel1(Int_t label){fLabel[0] = label;}
		void SetLabel2(Int_t label){fLabel[1] = label;}
		void SetLabel3(Int_t label){fLabel[2] = label;}
		void SetLabels(Int_t label1, Int_t label2, Int_t label3 = 0){fLabel[0] = label1; fLabel[1] = label2; fLabel[2] = label3;}

		Int_t GetLabel(Int_t i) const {return fLabel[i];}
		Int_t GetLabel1() const {return fLabel[0];}
		Int_t GetLabel2() const {return fLabel[1];}
		Int_t GetLabel3() const {return fLabel[2];}
			
		Double_t GetProductionRadius() const {return TMath::Sqrt(fProductionVtx[0]*fProductionVtx[0]+fProductionVtx[1]*fProductionVtx[1]);}
		Double_t GetProductionX() const {return fProductionVtx[0];}
		Double_t GetProductionY() const {return fProductionVtx[1];}
		Double_t GetProductionZ() const {return fProductionVtx[2];}

		void SetProductionX(Double_t x) {fProductionVtx[0]=x;}
		void SetProductionY(Double_t y) {fProductionVtx[1]=y;}
		void SetProductionZ(Double_t z) {fProductionVtx[2]=z;}
		void SetProductionPoint(Double_t* point){
			fProductionVtx[0] = point[0];
			fProductionVtx[1] = point[1];
			fProductionVtx[2] = point[2];
		}
			
		Float_t GetDCABetweenPhotons() const {return fdcaBetweenPhotons;}
		Float_t GetDCAZMotherPrimVtx() const {return fdcaZPrimVtx;}
		Float_t GetDCARMotherPrimVtx() const {return fdcaRPrimVtx;}
		UChar_t GetMesonQuality() const {return fQuality;}
			
		Double_t GetOpeningAngle() const { return fOpeningAngle;}

		Double_t GetAlpha() const { return fAlpha;}

		void SetWeight(Double_t weight) {fWeight=weight;}
		Double_t GetWeight() const {return fWeight;}

		Float_t CalculateDistanceBetweenPhotons(AliAODConversionPhoton* y1, AliAODConversionPhoton* y2 , Double_t prodPoint[3]);
		void CalculateDistanceOfClossetApproachToPrimVtx(const AliVVertex* primVertex);
		void DetermineMesonQuality(AliAODConversionPhoton* y1, AliAODConversionPhoton* y2);
		
		void SetTrueMesonValue(Int_t trueMeson) {fTrueMeson = trueMeson;}
		Int_t GetTrueMesonValue()const {return fTrueMeson;}
		
		
	private:
		Int_t fLabel[3]; 						// Labels of the decay photons
		Int_t fMCLabel; 						// MC Label
		Float_t fChi2; 							// Chi sq of reconstructed mother
		Double_t fOpeningAngle;
		Double_t fAlpha;
		Double_t fWeight; 						// Weight for BG Calculation
		Float_t fdcaBetweenPhotons; 			// dca between the two photons
		Double_t fProductionVtx[3]; 			// Production vertex
		Float_t fdcaZPrimVtx; 					// dca Z of meson to primary vertex
		Float_t fdcaRPrimVtx; 					// dca R of meson to primary vertex
		UChar_t fQuality; 						// Quality of the meson:
													// 0: garbage
													// 1: both photons quality 1
													// 2: 1 photon quality 1, 1 photon quality 2
													// 3: 1 photon quality 1, 1 photon quality 3
													// 4: both photons quality 2
													// 5: 1 photon quality 2, 1 photon quality 3
													// 6: both photons quality 3
		
		Int_t fTrueMeson;						// is true meson
													// 0 : no
													// 1 : pi0
													// 2 : eta
													// 3 : eta'
													// 4 : omega
		
    ClassDef(AliAODConversionMother,5)
};

#endif
 AliAODConversionMother.h:1
 AliAODConversionMother.h:2
 AliAODConversionMother.h:3
 AliAODConversionMother.h:4
 AliAODConversionMother.h:5
 AliAODConversionMother.h:6
 AliAODConversionMother.h:7
 AliAODConversionMother.h:8
 AliAODConversionMother.h:9
 AliAODConversionMother.h:10
 AliAODConversionMother.h:11
 AliAODConversionMother.h:12
 AliAODConversionMother.h:13
 AliAODConversionMother.h:14
 AliAODConversionMother.h:15
 AliAODConversionMother.h:16
 AliAODConversionMother.h:17
 AliAODConversionMother.h:18
 AliAODConversionMother.h:19
 AliAODConversionMother.h:20
 AliAODConversionMother.h:21
 AliAODConversionMother.h:22
 AliAODConversionMother.h:23
 AliAODConversionMother.h:24
 AliAODConversionMother.h:25
 AliAODConversionMother.h:26
 AliAODConversionMother.h:27
 AliAODConversionMother.h:28
 AliAODConversionMother.h:29
 AliAODConversionMother.h:30
 AliAODConversionMother.h:31
 AliAODConversionMother.h:32
 AliAODConversionMother.h:33
 AliAODConversionMother.h:34
 AliAODConversionMother.h:35
 AliAODConversionMother.h:36
 AliAODConversionMother.h:37
 AliAODConversionMother.h:38
 AliAODConversionMother.h:39
 AliAODConversionMother.h:40
 AliAODConversionMother.h:41
 AliAODConversionMother.h:42
 AliAODConversionMother.h:43
 AliAODConversionMother.h:44
 AliAODConversionMother.h:45
 AliAODConversionMother.h:46
 AliAODConversionMother.h:47
 AliAODConversionMother.h:48
 AliAODConversionMother.h:49
 AliAODConversionMother.h:50
 AliAODConversionMother.h:51
 AliAODConversionMother.h:52
 AliAODConversionMother.h:53
 AliAODConversionMother.h:54
 AliAODConversionMother.h:55
 AliAODConversionMother.h:56
 AliAODConversionMother.h:57
 AliAODConversionMother.h:58
 AliAODConversionMother.h:59
 AliAODConversionMother.h:60
 AliAODConversionMother.h:61
 AliAODConversionMother.h:62
 AliAODConversionMother.h:63
 AliAODConversionMother.h:64
 AliAODConversionMother.h:65
 AliAODConversionMother.h:66
 AliAODConversionMother.h:67
 AliAODConversionMother.h:68
 AliAODConversionMother.h:69
 AliAODConversionMother.h:70
 AliAODConversionMother.h:71
 AliAODConversionMother.h:72
 AliAODConversionMother.h:73
 AliAODConversionMother.h:74
 AliAODConversionMother.h:75
 AliAODConversionMother.h:76
 AliAODConversionMother.h:77
 AliAODConversionMother.h:78
 AliAODConversionMother.h:79
 AliAODConversionMother.h:80
 AliAODConversionMother.h:81
 AliAODConversionMother.h:82
 AliAODConversionMother.h:83
 AliAODConversionMother.h:84
 AliAODConversionMother.h:85
 AliAODConversionMother.h:86
 AliAODConversionMother.h:87
 AliAODConversionMother.h:88
 AliAODConversionMother.h:89
 AliAODConversionMother.h:90
 AliAODConversionMother.h:91
 AliAODConversionMother.h:92
 AliAODConversionMother.h:93
 AliAODConversionMother.h:94
 AliAODConversionMother.h:95
 AliAODConversionMother.h:96
 AliAODConversionMother.h:97
 AliAODConversionMother.h:98
 AliAODConversionMother.h:99
 AliAODConversionMother.h:100
 AliAODConversionMother.h:101
 AliAODConversionMother.h:102
 AliAODConversionMother.h:103
 AliAODConversionMother.h:104
 AliAODConversionMother.h:105
 AliAODConversionMother.h:106
 AliAODConversionMother.h:107
 AliAODConversionMother.h:108
 AliAODConversionMother.h:109
 AliAODConversionMother.h:110
 AliAODConversionMother.h:111
 AliAODConversionMother.h:112
 AliAODConversionMother.h:113
 AliAODConversionMother.h:114
 AliAODConversionMother.h:115
 AliAODConversionMother.h:116
 AliAODConversionMother.h:117
 AliAODConversionMother.h:118
 AliAODConversionMother.h:119
 AliAODConversionMother.h:120
 AliAODConversionMother.h:121
 AliAODConversionMother.h:122
 AliAODConversionMother.h:123
 AliAODConversionMother.h:124
 AliAODConversionMother.h:125
 AliAODConversionMother.h:126
 AliAODConversionMother.h:127