2 //**************************************************************************
3 //* This file is property of and copyright by the ALICE Project *
4 //* ALICE Experiment at CERN, All rights reserved. *
6 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
7 //* Sedat Altinpinar <Sedat.Altinpinar@cern.ch> *
8 //* Hege Erdal <hege.erdal@gmail.com> *
10 //* Permission to use, copy, modify and distribute this software and its *
11 //* documentation strictly for non-commercial purposes is hereby granted *
12 //* without fee, provided that the above copyright notice appears in all *
13 //* copies and that both the copyright notice and this permission notice *
14 //* appear in the supporting documentation. The authors make no claims *
15 //* about the suitability of this software for any purpose. It is *
16 //* provided "as is" without express or implied warranty. *
17 //**************************************************************************
19 /// @file AliDxHFECorrelationMC.cxx
20 /// @author Sedat Altinpinar, Hege Erdal, Matthias Richter
22 /// @brief Worker class for DxHFE correlation
25 #include "AliDxHFECorrelationMC.h"
26 #include "AliVParticle.h"
28 //#include "AliAnalysisCuts.h" // required dependency libANALYSISalice.so
29 //#include "AliFlowTrackSimple.h" // required dependency libPWGflowBase.so
30 //#include "AliFlowCandidateTrack.h" // required dependency libPWGflowTasks.so
31 //#include "AliCFContainer.h" // required dependency libCORRFW.so
32 //#include "AliAODRecoDecayHF2Prong.h" // libPWGHFvertexingHF
33 #include "TObjArray.h"
34 #include "AliDxHFECorrelation.h"
38 #include "TDatabasePDG.h"
39 #include "TLorentzVector.h"
40 #include "AliReducedParticle.h"
41 #include "AliDxHFEParticleSelection.h"
48 ClassImp(AliDxHFECorrelationMC)
50 AliDxHFECorrelationMC::AliDxHFECorrelationMC(const char* name)
51 : AliDxHFECorrelation(name?name:"AliDxHFECorrelationMC")
54 // default constructor
61 AliDxHFECorrelationMC::~AliDxHFECorrelationMC()
69 THnSparse* AliDxHFECorrelationMC::DefineTHnSparse()
72 // Defines the THnSparse.
74 // here is the only place to change the dimension
75 static const int sizeEventdphi = 10;
76 InitTHnSparseArray(sizeEventdphi);
77 const double pi=TMath::Pi();
78 Double_t minPhi=GetMinPhi();
79 Double_t maxPhi=GetMaxPhi();
81 // TODO: Everything here needed for eventmixing?
82 // 0 1 2 3 4 5 6 7 8 9
83 // D0invmass PtD0 PhiD0 PtbinD0 Pte dphi dEta OrigD0 origEl process
84 int binsEventdphi[sizeEventdphi] = { 200, 1000, 100, 21, 1000, 100, 100, 10, 14, 100 };
85 double minEventdphi [sizeEventdphi] = { 1.5648, 0, 0, 0, 0 , minPhi, -0.9, -1.5, -1.5, -0.5 };
86 double maxEventdphi [sizeEventdphi] = { 2.1648, 100, 2*pi, 20, 100, maxPhi, 0.9, 8.5, 12.5, 99.5 };
87 const char* nameEventdphi[sizeEventdphi] = {
101 name.Form("%s info", GetName());
104 return CreateControlTHnSparse(name,sizeEventdphi,binsEventdphi,minEventdphi,maxEventdphi,nameEventdphi);
110 int AliDxHFECorrelationMC::FillParticleProperties(AliVParticle* tr, AliVParticle *as, Double_t* data, int dimension) const
112 // fill the data array from the particle data
113 if (!data) return -EINVAL;
114 AliReducedParticle *ptrigger=(AliReducedParticle*)tr;
115 AliReducedParticle *assoc=(AliReducedParticle*)as;
116 if (!ptrigger || !assoc) return -ENODATA;
118 if (dimension!=GetDimTHnSparse()) {
119 // TODO: think about filling only the available data and throwing a warning
122 data[i++]=ptrigger->GetInvMass();
123 data[i++]=ptrigger->Pt();
124 data[i++]=ptrigger->Phi();
125 data[i++]=ptrigger->GetPtBin();
126 data[i++]=assoc->Pt();
127 data[i++]=AliDxHFECorrelation::GetDeltaPhi();
128 data[i++]=AliDxHFECorrelation::GetDeltaEta();
129 data[i++]=ptrigger->GetOriginMother();
130 data[i++]=assoc->GetOriginMother();
131 data[i++]=fMCEventType;
136 int AliDxHFECorrelationMC::Fill(const TObjArray* triggerCandidates, TObjArray* associatedTracks, const AliVEvent* pEvent)
138 // TODO: Implement more on MC?? (Needed?)
139 return AliDxHFECorrelation::Fill(triggerCandidates,associatedTracks,pEvent);