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 //**************************************************************************
21 /// @file AliDxHFECorrelationMC.cxx
22 /// @author Sedat Altinpinar, Hege Erdal, Matthias Richter
24 /// @brief Worker class for DxHFE correlation
27 #include "AliDxHFECorrelationMC.h"
28 #include "AliVParticle.h"
30 //#include "AliAnalysisCuts.h" // required dependency libANALYSISalice.so
31 //#include "AliFlowTrackSimple.h" // required dependency libPWGflowBase.so
32 //#include "AliFlowCandidateTrack.h" // required dependency libPWGflowTasks.so
33 //#include "AliCFContainer.h" // required dependency libCORRFW.so
34 //#include "AliAODRecoDecayHF2Prong.h" // libPWGHFvertexingHF
35 #include "TObjArray.h"
36 #include "AliDxHFECorrelation.h"
40 #include "TDatabasePDG.h"
41 #include "TLorentzVector.h"
42 #include "AliReducedParticle.h"
43 #include "AliDxHFEParticleSelection.h"
50 ClassImp(AliDxHFECorrelationMC)
52 AliDxHFECorrelationMC::AliDxHFECorrelationMC(const char* name)
53 : AliDxHFECorrelation(name?name:"AliDxHFECorrelationMC")
56 // default constructor
63 AliDxHFECorrelationMC::~AliDxHFECorrelationMC()
71 THnSparse* AliDxHFECorrelationMC::DefineTHnSparse()
74 // Defines the THnSparse.
76 // here is the only place to change the dimension
77 static const int sizeEventdphi = 10;
78 InitTHnSparseArray(sizeEventdphi);
79 const double pi=TMath::Pi();
80 Double_t minPhi=GetMinPhi();
81 Double_t maxPhi=GetMaxPhi();
83 // TODO: Everything here needed for eventmixing?
84 // 0 1 2 3 4 5 6 7 8 9
85 // D0invmass PtD0 PhiD0 PtbinD0 Pte dphi dEta OrigD0 origEl process
86 int binsEventdphi[sizeEventdphi] = { 200, 1000, 100, 21, 1000, 100, 100, 10, 14, 100 };
87 double minEventdphi [sizeEventdphi] = { 1.5648, 0, 0, 0, 0 , minPhi, -0.9, -1.5, -1.5, -0.5 };
88 double maxEventdphi [sizeEventdphi] = { 2.1648, 100, 2*pi, 20, 100, maxPhi, 0.9, 8.5, 12.5, 99.5 };
89 const char* nameEventdphi[sizeEventdphi] = {
103 name.Form("%s info", GetName());
106 return CreateControlTHnSparse(name,sizeEventdphi,binsEventdphi,minEventdphi,maxEventdphi,nameEventdphi);
112 int AliDxHFECorrelationMC::FillParticleProperties(AliVParticle* tr, AliVParticle *as, Double_t* data, int dimension) const
114 // fill the data array from the particle data
115 if (!data) return -EINVAL;
116 AliReducedParticle *ptrigger=(AliReducedParticle*)tr;
117 AliReducedParticle *assoc=(AliReducedParticle*)as;
118 if (!ptrigger || !assoc) return -ENODATA;
120 if (dimension!=GetDimTHnSparse()) {
121 // TODO: think about filling only the available data and throwing a warning
124 data[i++]=ptrigger->GetInvMass();
125 data[i++]=ptrigger->Pt();
126 data[i++]=ptrigger->Phi();
127 data[i++]=ptrigger->GetPtBin();
128 data[i++]=assoc->Pt();
129 data[i++]=AliDxHFECorrelation::GetDeltaPhi();
130 data[i++]=AliDxHFECorrelation::GetDeltaEta();
131 data[i++]=ptrigger->GetOriginMother();
132 data[i++]=assoc->GetOriginMother();
133 data[i++]=fMCEventType;
138 int AliDxHFECorrelationMC::Fill(const TObjArray* triggerCandidates, TObjArray* associatedTracks, const AliVEvent* pEvent)
140 // TODO: Implement more on MC?? (Needed?)
141 return AliDxHFECorrelation::Fill(triggerCandidates,associatedTracks,pEvent);