1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
25 #include "THnSparse.h"
42 #include "AliAnalysisManager.h"
44 #include "AliAODHandler.h"
45 #include "AliAODInputHandler.h"
46 #include "AliInputEventHandler.h"
48 #include "AliESDEvent.h"
49 #include "AliESDInputHandler.h"
50 #include "AliMultiplicity.h"
51 #include "AliCentrality.h"
52 #include "AliAnalysisTaskDptDptCorrelations.h"
55 #include "AliPIDResponse.h"
57 #include "AliESDVertex.h"
58 #include "AliESDEvent.h"
59 #include "AliESDInputHandler.h"
60 #include "AliAODEvent.h"
61 #include "AliAODTrack.h"
62 #include "AliAODInputHandler.h"
64 #include "AliESDEvent.h"
65 #include "AliAODEvent.h"
67 #include "AliESDtrackCuts.h"
68 #include "AliAODMCHeader.h"
71 #include "AliGenHijingEventHeader.h"
72 #include "AliGenEventHeader.h"
74 #include "AliAODPid.h"
75 #include "AliPIDResponse.h"
76 #include "AliAODpidUtil.h"
77 #include "AliPIDCombined.h"
80 ClassImp(AliAnalysisTaskDptDptCorrelations)
82 AliAnalysisTaskDptDptCorrelations::AliAnalysisTaskDptDptCorrelations()
83 : AliAnalysisTaskSE(),
85 fESDEvent(0), //! ESD Event
89 _twoPi ( 2.0 * 3.1415927),
96 _rejectPairConversion ( 0),
101 _centralityMethod ( 4),
102 _centralityMin ( 0.),
103 _centralityMax ( 0.),
104 _requestedCharge_1 ( 1),
105 _requestedCharge_2 ( -1),
151 _correctionWeight_1(0),
152 _correctionWeight_2(0),
153 _nBins_M0(500), _min_M0(0), _max_M0(10000), _width_M0(20),
154 _nBins_M1(500), _min_M1(0), _max_M1(10000), _width_M1(20),
155 _nBins_M2(500), _min_M2(0), _max_M2(10000), _width_M2(20),
156 _nBins_M3(500), _min_M3(0), _max_M3(10000), _width_M3(20),
157 _nBins_M4(100), _min_M4(0), _max_M4(1), _width_M4(0.01),
158 _nBins_M5(100), _min_M5(0), _max_M5(1), _width_M5(0.01),
159 _nBins_M6(100), _min_M6(0), _max_M6(1), _width_M6(0.01),
160 _nBins_vertexZ(40), _min_vertexZ(-10), _max_vertexZ(10), _width_vertexZ(0.5),
162 _nBins_pt_1(18), _min_pt_1(0.2), _max_pt_1(2.0), _width_pt_1(0.1),
163 _nBins_phi_1(72), _min_phi_1(0), _max_phi_1(2.*3.1415927),_width_phi_1(2.*3.1415927/72.),
165 //_min_eta_1(-0.9), _max_eta_1(0.9), _width_eta_1(0.1),
167 _min_eta_1(0), _max_eta_1(0), _width_eta_1(0.1),
170 _nBins_etaPhiPt_1(0),
171 _nBins_zEtaPhiPt_1(0),
173 _nBins_pt_2(18), _min_pt_2(0.2), _max_pt_2(2.0), _width_pt_2(0.1),
174 _nBins_phi_2(72), _min_phi_2(0), _max_phi_2(2.*3.1415927),_width_phi_2(2.*3.1415927/72),
176 //_min_eta_2(-0.9), _max_eta_2(0.9), _width_eta_2(0.1),
178 _min_eta_2(0), _max_eta_2(0), _width_eta_2(0.1),
183 _nBins_etaPhiPt_2(0),
184 _nBins_zEtaPhiPt_2(0),
204 __s1pt_1_vsEtaPhi(0),
205 __n1_1_vsZEtaPhiPt(0),
208 __s1pt_2_vsEtaPhi(0),
209 __n1_2_vsZEtaPhiPt(0),
212 __s2ptpt_12_vsEtaPhi(0),
213 __s2PtN_12_vsEtaPhi(0),
214 __s2NPt_12_vsEtaPhi(0),
217 _eventAccounting ( 0),
234 _n1_1_vsEtaVsPhi ( 0),
235 _s1pt_1_vsEtaVsPhi ( 0),
236 _n1_1_vsZVsEtaVsPhiVsPt ( 0),
237 _n1_1_vsM ( 0), // w/ weight
239 _n1Nw_1_vsM ( 0), // w/o weight
245 _n1_2_vsEtaVsPhi ( 0),
246 _s1pt_2_vsEtaVsPhi ( 0),
247 _n1_2_vsZVsEtaVsPhiVsPt ( 0),
255 _n2_12_vsEtaPhi ( 0),
256 _n2_12_vsPtVsPt ( 0),
257 _s2PtPt_12_vsEtaPhi( 0),
258 _s2PtN_12_vsEtaPhi ( 0),
259 _s2NPt_12_vsEtaPhi ( 0),
265 _s2PtPtNw_12_vsM ( 0),
266 _s2PtNNw_12_vsM ( 0),
267 _s2NPtNw_12_vsM ( 0),
290 intBinCorrName("NA"),
340 _title_etaPhi_1("NA"),
342 _title_SumPt_1("NA"),
343 _title_AvgPt_1("NA"),
345 _title_AvgSumPt_1("NA"),
350 _title_etaPhi_2("NA"),
352 _title_SumPt_2("NA"),
353 _title_AvgPt_2("NA"),
355 _title_AvgSumPt_2("NA"),
357 _title_etaPhi_12("NA"),
359 _title_AvgN2_12("NA"),
360 _title_AvgSumPtPt_12("NA"),
361 _title_AvgSumPtN_12("NA"),
362 _title_AvgNSumPt_12("NA"),
372 printf("Default constructor called \n");
374 printf("passed \n ");
378 AliAnalysisTaskDptDptCorrelations::AliAnalysisTaskDptDptCorrelations(const TString & name)
379 : AliAnalysisTaskSE(name),
385 _twoPi ( 2.0 * 3.1415927),
390 _sameFilter ( false),
392 _rejectPairConversion ( 0),
395 _vertexXYMin ( -10.),
397 _centralityMethod ( 4),
398 _centralityMin ( 0.),
399 _centralityMax ( 1.),
400 _requestedCharge_1 ( 1),
401 _requestedCharge_2 ( -1),
409 _trackFilterBit ( 0),
442 _correctionWeight_1(0),
443 _correctionWeight_2(0),
444 _nBins_M0(500), _min_M0(0), _max_M0(10000), _width_M0(20),
445 _nBins_M1(500), _min_M1(0), _max_M1(10000), _width_M1(20),
446 _nBins_M2(500), _min_M2(0), _max_M2(10000), _width_M2(20),
447 _nBins_M3(500), _min_M3(0), _max_M3(10000), _width_M3(20),
448 _nBins_M4(100), _min_M4(0), _max_M4(1), _width_M4(0.01),
449 _nBins_M5(100), _min_M5(0), _max_M5(1), _width_M5(0.01),
450 _nBins_M6(100), _min_M6(0), _max_M6(1), _width_M6(0.01),
451 _nBins_vertexZ(40), _min_vertexZ(-10), _max_vertexZ(10), _width_vertexZ(0.5),
453 _nBins_pt_1(18), _min_pt_1(0.2), _max_pt_1(2.0), _width_pt_1(0.1),
454 _nBins_phi_1(72), _min_phi_1(0), _max_phi_1(2.*3.1415927),_width_phi_1(2.*3.1415927/72.),
456 //_min_eta_1(-0.9), _max_eta_1(0.9), _width_eta_1(0.1),
458 _min_eta_1(0), _max_eta_1(0), _width_eta_1(0.1),
461 _nBins_etaPhiPt_1(0),
462 _nBins_zEtaPhiPt_1(0),
464 _nBins_pt_2(18), _min_pt_2(0.2), _max_pt_2(2.0), _width_pt_2(0.1),
465 _nBins_phi_2(72), _min_phi_2(0), _max_phi_2(2.*3.1415927),_width_phi_2(2.*3.1415927/72),
467 //_min_eta_2(-0.9), _max_eta_2(0.9), _width_eta_2(0.1),
469 _min_eta_2(0), _max_eta_2(0), _width_eta_2(0.1),
473 _nBins_etaPhiPt_2(0),
474 _nBins_zEtaPhiPt_2(0),
494 __s1pt_1_vsEtaPhi(0),
495 __n1_1_vsZEtaPhiPt(0),
498 __s1pt_2_vsEtaPhi(0),
499 __n1_2_vsZEtaPhiPt(0),
502 __s2ptpt_12_vsEtaPhi(0),
503 __s2PtN_12_vsEtaPhi(0),
504 __s2NPt_12_vsEtaPhi(0),
507 _eventAccounting ( 0),
524 _n1_1_vsEtaVsPhi ( 0),
525 _s1pt_1_vsEtaVsPhi ( 0),
526 _n1_1_vsZVsEtaVsPhiVsPt ( 0),
527 _n1_1_vsM ( 0), // w/ weight
529 _n1Nw_1_vsM ( 0), // w/o weight
535 _n1_2_vsEtaVsPhi ( 0),
536 _s1pt_2_vsEtaVsPhi ( 0),
537 _n1_2_vsZVsEtaVsPhiVsPt ( 0),
545 _n2_12_vsEtaPhi ( 0),
546 _n2_12_vsPtVsPt ( 0),
547 _s2PtPt_12_vsEtaPhi( 0),
548 _s2PtN_12_vsEtaPhi ( 0),
549 _s2NPt_12_vsEtaPhi ( 0),
555 _s2PtPtNw_12_vsM ( 0),
556 _s2PtNNw_12_vsM ( 0),
557 _s2NPtNw_12_vsM ( 0),
580 intBinCorrName("NA"),
630 _title_etaPhi_1("NA"),
632 _title_SumPt_1("NA"),
633 _title_AvgPt_1("NA"),
635 _title_AvgSumPt_1("NA"),
640 _title_etaPhi_2("NA"),
642 _title_SumPt_2("NA"),
643 _title_AvgPt_2("NA"),
645 _title_AvgSumPt_2("NA"),
647 _title_etaPhi_12("NA"),
649 _title_AvgN2_12("NA"),
650 _title_AvgSumPtPt_12("NA"),
651 _title_AvgSumPtN_12("NA"),
652 _title_AvgNSumPt_12("NA"),
662 printf("2nd constructor called ");
664 DefineOutput(0, TList::Class());
670 AliAnalysisTaskDptDptCorrelations::~AliAnalysisTaskDptDptCorrelations()
681 delete _correction_1;
684 delete __n1_1_vsEtaPhi;
685 delete __s1pt_1_vsEtaPhi;
686 delete __n1_1_vsZEtaPhiPt;
687 if (_correctionWeight_1) delete _correctionWeight_1;
699 delete _correction_2;
702 delete __n1_2_vsEtaPhi;
703 delete __s1pt_2_vsEtaPhi;
704 delete __n1_2_vsZEtaPhiPt;
705 if (_correctionWeight_2) delete _correctionWeight_2;
710 delete __n2_12_vsPtPt;
711 delete __n2_12_vsEtaPhi;
712 delete __s2ptpt_12_vsEtaPhi;
713 delete __s2PtN_12_vsEtaPhi;
714 delete __s2NPt_12_vsEtaPhi;
719 void AliAnalysisTaskDptDptCorrelations::UserCreateOutputObjects()
721 //cout<< "AliAnalysisTaskDptDptCorrelations::CreateOutputObjects() Starting " << endl;
723 _outputHistoList = new TList();
724 _outputHistoList->SetOwner();
726 //if (_useWeights) DefineInput(2, TList::Class());
728 //Setup the parameters of the histograms
729 _nBins_M0 = 500; _min_M0 = 0.; _max_M0 = 5000.; _width_M0 = (_max_M0-_min_M0)/_nBins_M0;
730 _nBins_M1 = 500; _min_M1 = 0.; _max_M1 = 5000.; _width_M1 = (_max_M1-_min_M1)/_nBins_M1;
731 _nBins_M2 = 500; _min_M2 = 0.; _max_M2 = 5000.; _width_M2 = (_max_M2-_min_M2)/_nBins_M2;
732 _nBins_M3 = 500; _min_M3 = 0.; _max_M3 = 5000.; _width_M3 = (_max_M3-_min_M3)/_nBins_M3;
733 _nBins_M4 = 100; _min_M4 = 0.; _max_M4 = 100.; _width_M4 = (_max_M4-_min_M4)/_nBins_M4;
734 _nBins_M5 = 100; _min_M5 = 0.; _max_M5 = 100.; _width_M5 = (_max_M5-_min_M5)/_nBins_M5;
735 _nBins_M6 = 100; _min_M6 = 0.; _max_M6 = 100.; _width_M6 = (_max_M6-_min_M6)/_nBins_M6;
737 _min_vertexZ = _vertexZMin;
738 _max_vertexZ = _vertexZMax;
739 _width_vertexZ = 0.5;
740 _nBins_vertexZ = int(0.5+ (_max_vertexZ - _min_vertexZ)/_width_vertexZ);
741 _nBins_pt_1 = int(0.5+ (_max_pt_1 -_min_pt_1 )/_width_pt_1);
742 _nBins_eta_1 = int(0.5+ (_max_eta_1-_min_eta_1)/_width_eta_1);
743 _width_phi_1 = (_max_phi_1 - _min_phi_1) /_nBins_phi_1;
744 _nBins_etaPhi_1 = _nBins_phi_1 * _nBins_eta_1;
745 _nBins_etaPhiPt_1 = _nBins_etaPhi_1 * _nBins_pt_1;
746 _nBins_zEtaPhiPt_1 = _nBins_vertexZ * _nBins_etaPhiPt_1;
748 _nBins_pt_2 = int(0.5+ (_max_pt_2 -_min_pt_2 )/_width_pt_2);
749 _nBins_eta_2 = int(0.5+ (_max_eta_2-_min_eta_2)/_width_eta_2);
750 _width_phi_2 = (_max_phi_2 - _min_phi_2) /_nBins_phi_2;
751 _nBins_etaPhi_2 = _nBins_phi_2 * _nBins_eta_2;
752 _nBins_etaPhiPt_2 = _nBins_etaPhi_2 * _nBins_pt_2;
753 _nBins_zEtaPhiPt_2 = _nBins_vertexZ * _nBins_etaPhiPt_2;
754 _nBins_etaPhi_12 = _nBins_etaPhi_1 * _nBins_etaPhi_2;
756 //setup the work arrays
758 _id_1 = new int[arraySize];
759 _charge_1 = new int[arraySize];
760 //_iPhi_1 = new int[arraySize];
761 //_iEta_1 = new int[arraySize];
762 _iEtaPhi_1 = new int[arraySize];
763 _iPt_1 = new int[arraySize];
764 _pt_1 = new float[arraySize];
765 _px_1 = new float[arraySize];
766 _py_1 = new float[arraySize];
767 _pz_1 = new float[arraySize];
768 //_phi_1 = new float[arraySize];
769 //_eta_1 = new float[arraySize];
770 _correction_1 = new float[arraySize];
771 //_dedx_1 = new float[arraySize];
773 __n1_1_vsPt = getDoubleArray(_nBins_pt_1, 0.);
774 __n1_1_vsEtaPhi = getDoubleArray(_nBins_etaPhi_1, 0.);
775 __s1pt_1_vsEtaPhi = getDoubleArray(_nBins_etaPhi_1, 0.);
776 __n1_1_vsZEtaPhiPt = getFloatArray(_nBins_zEtaPhiPt_1, 0.);
778 //cout << "==========================================================================================" << endl;
779 //cout << "=============== Booking for particle 1 done." << endl;
780 //cout << "_requestedCharge_1: " << _requestedCharge_1 << endl;
781 //cout << "_requestedCharge_2: " << _requestedCharge_2 << endl;
783 if (_requestedCharge_2!=_requestedCharge_1)
785 //cout << " creating arrays for particle 2 with size: " << arraySize << endl;
788 _id_2 = new int[arraySize];
789 _charge_2 = new int[arraySize];
790 //_iPhi_2 = new int[arraySize];
791 //_iEta_2 = new int[arraySize];
792 _iEtaPhi_2 = new int[arraySize];
793 _iPt_2 = new int[arraySize];
794 _pt_2 = new float[arraySize];
795 _px_2 = new float[arraySize];
796 _py_2 = new float[arraySize];
797 _pz_2 = new float[arraySize];
798 //_phi_2 = new float[arraySize];
799 //_eta_2 = new float[arraySize];
800 _correction_2 = new float[arraySize];
801 //_dedx_2 = new float[arraySize];
803 __n1_2_vsPt = getDoubleArray(_nBins_pt_2, 0.);
804 __n1_2_vsEtaPhi = getDoubleArray(_nBins_etaPhi_2, 0.);
805 __s1pt_2_vsEtaPhi = getDoubleArray(_nBins_etaPhi_2, 0.);
806 __n1_2_vsZEtaPhiPt = getFloatArray(_nBins_zEtaPhiPt_2, 0.);
810 __n2_12_vsPtPt = getDoubleArray(_nBins_pt_1*_nBins_pt_2,0.);
811 __n2_12_vsEtaPhi = getFloatArray(_nBins_etaPhi_12, 0.);
812 __s2ptpt_12_vsEtaPhi = getFloatArray(_nBins_etaPhi_12, 0.);
813 __s2PtN_12_vsEtaPhi = getFloatArray(_nBins_etaPhi_12, 0.);
814 __s2NPt_12_vsEtaPhi = getFloatArray(_nBins_etaPhi_12, 0.);
816 // Setup all the labels needed.
820 pair_12_Name = "_12";
837 binCorrName = "binCorr";
838 intBinCorrName = "intBinCorr";
843 s1ptNwName = "sumPtNw";
844 s1DptName = "sumDpt";
845 s2PtPtName = "sumPtPt";
846 s2PtPtNwName = "sumPtPtNw";
847 s2DptDptName = "sumDptDpt";
848 s2NPtName = "sumNPt";
849 s2NPtNwName = "sumNPtNw";
850 s2PtNName = "sumPtN";
851 s2NPtNwName = "sumNPtNw";
852 s2PtNNwName = "sumPtNNw";
854 ptptName = "avgPtPt";
855 pt1pt1Name = "avgPtavgPt";
857 DptDptName = "avgDptDpt";
858 RDptDptName = "relDptDpt"; // ratio of avgDptDpt by avgPt*avgPt
863 _title_counts = "yield";
869 _title_m4 = "V0Centrality";
870 _title_m5 = "TrkCentrality";
871 _title_m6 = "SpdCentrality";
873 _title_eta_1 = "#eta_{1}";
874 _title_phi_1 = "#varphi_{1} (radian)";
875 _title_etaPhi_1 = "#eta_{1}#times#varphi_{1}";
876 _title_pt_1 = "p_{t,1} (GeV/c)";
877 _title_n_1 = "n_{1}";
878 _title_SumPt_1 = "#Sigma p_{t,1} (GeV/c)";
879 _title_AvgPt_1 = "#LT p_{t,1} #GT (GeV/c)";
880 _title_AvgN_1 = "#LT n_{1} #GT";
881 _title_AvgSumPt_1 = "#LT #Sigma p_{t,1} #GT (GeV/c)";
883 _title_eta_2 = "#eta_{2}";
884 _title_phi_2 = "#varphi_{2} (radian)";
885 _title_etaPhi_2 = "#eta_{2}#times#varphi_{2}";
886 _title_pt_2 = "p_{t,2} (GeV/c)";
887 _title_n_2 = "n_{2}";
888 _title_SumPt_2 = "#Sigma p_{t,1} (GeV/c)";
889 _title_AvgPt_2 = "#LT p_{t,2} #GT (GeV/c)";
890 _title_AvgN_2 = "#LT n_{2} #GT";
891 _title_AvgSumPt_2 = "#LT #Sigma p_{t,2} #GT (GeV/c)";
893 _title_etaPhi_12 = "#eta_{1}#times#varphi_{1}#times#eta_{2}#times#varphi_{2}";
895 _title_AvgN2_12 = "#LT n_{2} #GT";;
896 _title_AvgSumPtPt_12 = "#LT #Sigma p_{t,1}p_{t,2} #GT";;
897 _title_AvgSumPtN_12 = "#LT #Sigma p_{t,1}N #GT";;
898 _title_AvgNSumPt_12 = "#LT N#Sigma p_{t,2} #GT";;
906 vsEtaPhi = "_vsEtaPhi";
907 vsPtVsPt = "_vsPtVsPt";
912 int iZ, iEtaPhi, iPt;
913 int iZ1,iEtaPhi1,iPt1;
917 _correctionWeight_1 = new float[_nBins_vertexZ*_nBins_etaPhi_1*_nBins_pt_1];
919 b = _nBins_etaPhi_1*_nBins_pt_1;
920 for (iZ=0,iZ1=1; iZ<_nBins_vertexZ; iZ++, iZ1++)
922 for (iEtaPhi=0,iEtaPhi1=1; iEtaPhi<_nBins_etaPhi_1; iEtaPhi++, iEtaPhi1++)
924 for (iPt=0,iPt1=1; iPt<_nBins_pt_1; iPt++, iPt1++)
926 _correctionWeight_1[iZ*b+iEtaPhi*a+iPt] = _weight_1->GetBinContent(iZ1,iEtaPhi1,iPt1);
933 AliError("AliAnalysisTaskDptDptCorrelations:: _weight_1 is a null pointer.");
940 _correctionWeight_2 = new float[_nBins_vertexZ*_nBins_etaPhi_2*_nBins_pt_2];
942 b = _nBins_etaPhi_2*_nBins_pt_2;
943 for (iZ=0,iZ1=1; iZ<_nBins_vertexZ; iZ++, iZ1++)
945 for (iEtaPhi=0,iEtaPhi1=1; iEtaPhi<_nBins_etaPhi_2; iEtaPhi++, iEtaPhi1++)
947 for (iPt=0,iPt1=1; iPt<_nBins_pt_2; iPt++, iPt1++)
949 _correctionWeight_2[iZ*b+iEtaPhi*a+iPt] = _weight_2->GetBinContent(iZ1,iEtaPhi1,iPt1);
956 AliError("AliAnalysisTaskDptDptCorrelations:: _weight_1 is a null pointer.");
963 PostData(0,_outputHistoList);
965 //cout<< "AliAnalysisTaskDptDptCorrelations::CreateOutputObjects() DONE " << endl;
969 void AliAnalysisTaskDptDptCorrelations::createHistograms()
971 AliInfo(" AliAnalysisTaskDptDptCorrelations::createHistoHistograms() Creating Event Histos");
974 name = "eventAccounting";
976 // bin index : what it is...
977 // 0 : number of event submitted
978 // 1 : number accepted by centrality cut
979 // 2 : number accepted by centrality cut and z cut
980 // 3 : total number of particles that satisfied filter 1
981 // 4 : total number of particles that satisfied filter 2
982 _eventAccounting = createHisto1D(name,name,10, -0.5, 9.5, "event Code", _title_counts);
984 name = "m0"; _m0 = createHisto1D(name,name,_nBins_M1, _min_M1, _max_M1, _title_m0, _title_counts);
985 name = "m1"; _m1 = createHisto1D(name,name,_nBins_M1, _min_M1, _max_M1, _title_m1, _title_counts);
986 name = "m2"; _m2 = createHisto1D(name,name,_nBins_M2, _min_M2, _max_M2, _title_m2, _title_counts);
987 name = "m3"; _m3 = createHisto1D(name,name,_nBins_M3, _min_M3, _max_M3, _title_m3, _title_counts);
988 name = "m4"; _m4 = createHisto1D(name,name,_nBins_M4, _min_M4, _max_M4, _title_m4, _title_counts);
989 name = "m5"; _m5 = createHisto1D(name,name,_nBins_M5, _min_M5, _max_M5, _title_m5, _title_counts);
990 name = "m6"; _m6 = createHisto1D(name,name,_nBins_M6, _min_M6, _max_M6, _title_m6, _title_counts);
991 name = "zV"; _vertexZ = createHisto1D(name,name,_nBins_vertexZ, _min_vertexZ, _max_vertexZ, "z-Vertex (cm)", _title_counts);
994 name = "Eta"; _etadis = createHisto1F(name,name, 200, -1.0, 1.0, "#eta","counts");
995 name = "Phi"; _phidis = createHisto1F(name,name, 360, 0.0, 6.4, "#phi","counts");
996 name = "DCAz"; _dcaz = createHisto1F(name,name, 500, -5.0, 5.0, "dcaZ","counts");
997 name = "DCAxy"; _dcaxy = createHisto1F(name,name, 500, -5.0, 5.0, "dcaXY","counts");
999 /*name = "dedxVsP_1"; _dedxVsP_1 = createHisto2D(name,name,1000,-10.,10.,1000,0.,1000.,"p (GeV/c)", "dedx", "counts");
1000 name = "dedxVsP_2"; _dedxVsP_2 = createHisto2D(name,name,1000,-10.,10.,1000,0.,1000.,"p (GeV/c)", "dedx", "counts");
1001 name = "corrDedxVsP_1"; _corrDedxVsP_1 = createHisto2D(name,name,1000,-10.,10.,1000,0.,500,"p (GeV/c)", "dedx", "counts");
1002 name = "corrDedxVsP_2"; _corrDedxVsP_2 = createHisto2D(name,name,1000,-10.,10.,1000,0.,500,"p (GeV/c)", "dedx", "counts");
1004 name = "Nclus1"; _Ncluster1 = createHisto1F(name,name, 200, 0, 200, "Ncluster1","counts");
1005 name = "Nclus2"; _Ncluster2 = createHisto1F(name,name, 200, 0, 200, "Ncluster2","counts");
1009 name = n1Name+part_1_Name+vsPt; _n1_1_vsPt = createHisto1F(name,name, _nBins_pt_1, _min_pt_1, _max_pt_1, _title_pt_1, _title_AvgN_1);
1010 name = n1Name+part_1_Name+vsZ+vsEtaPhi+vsPt; _n1_1_vsZVsEtaVsPhiVsPt = createHisto3F(name,name, _nBins_vertexZ,_min_vertexZ,_max_vertexZ, _nBins_etaPhi_1, 0., double(_nBins_etaPhi_1), _nBins_pt_1, _min_pt_1, _max_pt_1, "zVertex", _title_etaPhi_1, _title_pt_1);
1011 //name = "dedxVsP_1"; _dedxVsP_1 = createHisto2F(name,name,400,-2.,2.,120,0.,120.,"p (GeV/c)", "dedx", "counts");
1012 //name = "corrDedxVsP_1"; _corrDedxVsP_1 = createHisto2F(name,name,400,-2.,2.,120,0.,120.,"p (GeV/c)", "dedx", "counts");
1013 //name = "betaVsP_1"; _betaVsP_1 = createHisto2F(name,name,400,-2.,2.,120,0.5,1.1,"p (GeV/c)", "beta", "counts");
1015 name = n1Name+part_2_Name+vsPt; _n1_2_vsPt = createHisto1F(name,name, _nBins_pt_2, _min_pt_2, _max_pt_2, _title_pt_2, _title_AvgN_2);
1016 name = n1Name+part_2_Name+vsZ+vsEtaPhi+vsPt; _n1_2_vsZVsEtaVsPhiVsPt = createHisto3F(name,name, _nBins_vertexZ,_min_vertexZ,_max_vertexZ, _nBins_etaPhi_2, 0., double(_nBins_etaPhi_2), _nBins_pt_2, _min_pt_2, _max_pt_2, "zVertex", _title_etaPhi_2, _title_pt_2);
1017 //name = "dedxVsP_2"; _dedxVsP_2 = createHisto2F(name,name,400,-2.,2.,120,0.,120.,"p (GeV/c)", "dedx", "counts");
1018 //name = "corrDedxVsP_2"; _corrDedxVsP_2 = createHisto2F(name,name,400,-2.,2.,120,0.,120.,"p (GeV/c)", "dedx", "counts");
1019 //name = "betaVsP_2"; _betaVsP_2 = createHisto2F(name,name,400,-2.,2.,120,0.5,1.1,"p (GeV/c)", "beta", "counts");
1024 name = n1Name+part_1_Name+vsEtaPhi; _n1_1_vsEtaVsPhi = createHisto2F(name,name, _nBins_eta_1, _min_eta_1, _max_eta_1, _nBins_phi_1, _min_phi_1, _max_phi_1, _title_eta_1, _title_phi_1, _title_AvgN_1);
1025 name = s1ptName+part_1_Name+vsEtaPhi; _s1pt_1_vsEtaVsPhi = createHisto2F(name,name, _nBins_eta_1, _min_eta_1, _max_eta_1, _nBins_phi_1, _min_phi_1, _max_phi_1, _title_eta_1, _title_phi_1, _title_AvgSumPt_1);
1026 name = n1Name+part_1_Name+vsM; _n1_1_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN_1);
1027 name = s1ptName+part_1_Name+vsM; _s1pt_1_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPt_1);
1028 name = n1NwName+part_1_Name+vsM; _n1Nw_1_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN_1);
1029 name = s1ptNwName+part_1_Name+vsM; _s1ptNw_1_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPt_1);
1031 name = n1Name+part_2_Name+vsEtaPhi; _n1_2_vsEtaVsPhi = createHisto2F(name,name, _nBins_eta_2, _min_eta_2, _max_eta_2, _nBins_phi_2, _min_phi_2, _max_phi_2, _title_eta_2, _title_phi_2, _title_AvgN_2);
1032 name = s1ptName+part_2_Name+vsEtaPhi; _s1pt_2_vsEtaVsPhi = createHisto2F(name,name, _nBins_eta_2, _min_eta_2, _max_eta_2, _nBins_phi_2, _min_phi_2, _max_phi_2, _title_eta_2, _title_phi_2, _title_AvgSumPt_2);
1033 name = n1Name+part_2_Name + vsM; _n1_2_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN_2);
1034 name = s1ptName+part_2_Name + vsM; _s1pt_2_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPt_2);
1035 name = n1NwName+part_2_Name+vsM; _n1Nw_2_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN_1);
1036 name = s1ptNwName+part_2_Name+vsM; _s1ptNw_2_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPt_1);
1038 name = n2Name+pair_12_Name+vsEtaPhi; _n2_12_vsEtaPhi = createHisto1F(name,name, _nBins_etaPhi_12, 0., double(_nBins_etaPhi_12), _title_etaPhi_12, _title_AvgN2_12);
1039 name = s2PtPtName+pair_12_Name + vsEtaPhi;_s2PtPt_12_vsEtaPhi = createHisto1F(name,name, _nBins_etaPhi_12, 0., double(_nBins_etaPhi_12), _title_etaPhi_12, _title_AvgSumPtPt_12);
1040 name = s2PtNName+pair_12_Name + vsEtaPhi; _s2PtN_12_vsEtaPhi = createHisto1F(name,name, _nBins_etaPhi_12, 0., double(_nBins_etaPhi_12), _title_etaPhi_12, _title_AvgSumPtN_12);
1041 name = s2NPtName+pair_12_Name + vsEtaPhi; _s2NPt_12_vsEtaPhi = createHisto1F(name,name, _nBins_etaPhi_12, 0., double(_nBins_etaPhi_12), _title_etaPhi_12, _title_AvgNSumPt_12);
1042 name = n2Name+pair_12_Name+vsPtVsPt; _n2_12_vsPtVsPt = createHisto2F(name,name, _nBins_pt_1, _min_pt_1, _max_pt_1, _nBins_pt_2, _min_pt_2, _max_pt_2, _title_pt_1, _title_pt_2, _title_AvgN2_12);
1044 name = n2Name+pair_12_Name + vsM; _n2_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN2_12);
1045 name = s2PtPtName+pair_12_Name + vsM; _s2PtPt_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPtPt_12);
1046 name = s2PtNName+pair_12_Name + vsM; _s2PtN_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPtN_12);
1047 name = s2NPtName+pair_12_Name + vsM; _s2NPt_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgNSumPt_12);
1049 name = n2NwName+pair_12_Name + vsM; _n2Nw_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN2_12);
1050 name = s2PtPtNwName+pair_12_Name + vsM; _s2PtPtNw_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPtPt_12);
1051 name = s2PtNNwName+pair_12_Name + vsM; _s2PtNNw_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPtN_12);
1052 name = s2NPtNwName+pair_12_Name + vsM; _s2NPtNw_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgNSumPt_12);
1054 name = "mInv"; _invMass = createHisto1F(name,name, 500, 0., 1.000, "M_{inv}","counts");
1055 name = "mInvElec"; _invMassElec = createHisto1F(name,name, 500, 0., 1.000, "M_{inv}","counts");
1058 AliInfo(" AliAnalysisTaskDptDptCorrelations::createHistoHistograms() All Done");
1060 //-----------------------//
1062 void AliAnalysisTaskDptDptCorrelations::finalizeHistograms()
1065 AliInfo("AliAnalysisTaskDptDptCorrelations::finalizeHistograms() starting");
1066 AliInfo(Form("CorrelationAnalyzers::finalizeHistograms() _eventCount : %d",int(_eventCount)));
1071 fillHistoWithArray(_n1_1_vsPt, __n1_1_vsPt, _nBins_pt_1);
1072 fillHistoWithArray(_n1_1_vsZVsEtaVsPhiVsPt, __n1_1_vsZEtaPhiPt, _nBins_vertexZ, _nBins_etaPhi_1, _nBins_pt_1);
1073 fillHistoWithArray(_n1_2_vsPt, __n1_1_vsPt, _nBins_pt_1);
1074 fillHistoWithArray(_n1_2_vsZVsEtaVsPhiVsPt, __n1_1_vsZEtaPhiPt, _nBins_vertexZ, _nBins_etaPhi_1, _nBins_pt_1);
1078 fillHistoWithArray(_n1_1_vsPt, __n1_1_vsPt, _nBins_pt_1);
1079 fillHistoWithArray(_n1_1_vsZVsEtaVsPhiVsPt, __n1_1_vsZEtaPhiPt, _nBins_vertexZ, _nBins_etaPhi_1, _nBins_pt_1);
1080 fillHistoWithArray(_n1_2_vsPt, __n1_2_vsPt, _nBins_pt_2);
1081 fillHistoWithArray(_n1_2_vsZVsEtaVsPhiVsPt, __n1_2_vsZEtaPhiPt, _nBins_vertexZ, _nBins_etaPhi_2, _nBins_pt_2);
1088 fillHistoWithArray(_n1_1_vsEtaVsPhi, __n1_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
1089 fillHistoWithArray(_s1pt_1_vsEtaVsPhi, __s1pt_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
1090 fillHistoWithArray(_n1_2_vsEtaVsPhi, __n1_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
1091 fillHistoWithArray(_s1pt_2_vsEtaVsPhi, __s1pt_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
1095 fillHistoWithArray(_n1_1_vsEtaVsPhi, __n1_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
1096 fillHistoWithArray(_s1pt_1_vsEtaVsPhi, __s1pt_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
1097 fillHistoWithArray(_n1_2_vsEtaVsPhi, __n1_2_vsEtaPhi, _nBins_eta_2, _nBins_phi_2);
1098 fillHistoWithArray(_s1pt_2_vsEtaVsPhi, __s1pt_2_vsEtaPhi, _nBins_eta_2, _nBins_phi_2);
1100 fillHistoWithArray(_n2_12_vsEtaPhi, __n2_12_vsEtaPhi, _nBins_etaPhi_12);
1101 fillHistoWithArray(_s2PtPt_12_vsEtaPhi, __s2ptpt_12_vsEtaPhi, _nBins_etaPhi_12);
1102 fillHistoWithArray(_s2PtN_12_vsEtaPhi, __s2PtN_12_vsEtaPhi, _nBins_etaPhi_12);
1103 fillHistoWithArray(_s2NPt_12_vsEtaPhi, __s2NPt_12_vsEtaPhi, _nBins_etaPhi_12);
1104 fillHistoWithArray(_n2_12_vsPtVsPt, __n2_12_vsPtPt, _nBins_pt_1, _nBins_pt_2);
1107 AliInfo("AliAnalysisTaskDptDptCorrelations::finalizeHistograms() Done ");
1112 void AliAnalysisTaskDptDptCorrelations::UserExec(Option_t */*option*/)
1116 int iPhi, iEta, iEtaPhi, iPt, charge;
1117 float q, phi, pt, eta, corr, corrPt, px, py, pz;
1119 //float p, dedx, dedx_1, dedx_2;
1121 int id_1, q_1, iEtaPhi_1, iPt_1;
1122 float pt_1, px_1, py_1, pz_1, corr_1;
1123 int id_2, q_2, iEtaPhi_2, iPt_2;
1124 float pt_2, px_2, py_2, pz_2, corr_2;
1126 int iVertex, iVertexP1, iVertexP2;
1128 float massElecSq = 2.5e-7;
1129 const AliAODVertex* vertex;
1133 AliAnalysisManager* manager = AliAnalysisManager::GetAnalysisManager();
1135 //cout<<"ERROR: Analysis manager not found."<<endl;
1138 //coneect to the inputHandler------------
1139 AliAODInputHandler* inputHandler = dynamic_cast<AliAODInputHandler*> (manager->GetInputEventHandler());
1140 if (!inputHandler) {
1141 //cout<<"ERROR: Input handler not found."<<endl;
1145 fAODEvent = dynamic_cast<AliAODEvent*>(InputEvent());
1148 //cout<< "ERROR 01: AOD not found " <<endl;
1151 fPIDResponse =inputHandler->GetPIDResponse();
1153 AliFatal("This Task needs the PID response attached to the inputHandler");
1157 // count all events looked at here
1160 // A. Adare - Fix from above to avoid coverity complaint about null dereference
1161 if (_eventAccounting)
1163 _eventAccounting->Fill(0);// count all calls to this function
1172 //fPIDResponse = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->GetPIDResponse();
1173 //fAODEvent = dynamic_cast<AliAODEvent*> (InputEvent());
1176 _eventAccounting->Fill(1);// count all calls to this function with a valid pointer
1177 //reset single particle counters
1179 __n1_1 = __n1_2 = __s1pt_1 = __s1pt_2 = __n1Nw_1 = __n1Nw_2 = __s1ptNw_1 = __s1ptNw_2 = 0;
1181 float v0Centr = -999.;
1182 float v0ACentr = -999.;
1183 float trkCentr = -999.;
1184 float spdCentr = -999.;
1186 float vertexX = -999;
1187 float vertexY = -999;
1188 float vertexZ = -999;
1189 float vertexXY = -999;
1190 //float dcaX = -999;
1191 //float dcaY = -999;
1194 float centrality = -999;
1195 //Double_t nSigma =-999;
1199 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 5" << endl;
1202 AliCentrality* centralityObject = fAODEvent->GetHeader()->GetCentralityP();
1203 if (centralityObject)
1205 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 6" << endl;
1207 v0Centr = centralityObject->GetCentralityPercentile("V0M");
1208 v0ACentr = centralityObject->GetCentralityPercentile("V0A");
1209 trkCentr = centralityObject->GetCentralityPercentile("TRK");
1210 spdCentr = centralityObject->GetCentralityPercentile("CL1");
1211 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 7" << endl;
1214 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 8" << endl;
1216 // _nTracks = fAODEvent->GetNTracks(); //OLD
1217 _nTracks =fAODEvent->GetNumberOfTracks();//NEW Test
1229 _field = fAODEvent->GetMagneticField();
1231 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - _field:" << _field << endl;
1234 switch (_centralityMethod)
1236 case 0: centrality = _mult0; break;
1237 case 1: centrality = _mult1; break;
1238 case 2: centrality = _mult2; break;
1239 case 3: centrality = _mult3; break;
1240 case 4: centrality = _mult4; break;
1241 case 5: centrality = _mult5; break;
1242 case 6: centrality = _mult6; break;
1243 case 7: centrality = _mult4a; break;
1247 if ( centrality < _centralityMin ||
1248 centrality > _centralityMax ||
1249 fabs(v0Centr-trkCentr)>5.0)
1254 _eventAccounting->Fill(2);// count all events with right centrality
1255 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 12" << endl;
1257 // filter on z and xy vertex
1258 vertex = (AliAODVertex*) fAODEvent->GetPrimaryVertexSPD();
1259 if (!vertex || vertex->GetNContributors()<1)
1263 AliInfo("AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - No valid vertex object or poor vertex");
1267 vertexX = vertex->GetX();
1268 vertexY = vertex->GetY();
1269 vertexZ = vertex->GetZ();
1270 vertexXY = sqrt(vertexX*vertexX+vertexY*vertexY);
1273 vertexZ < _vertexZMin ||
1274 vertexZ > _vertexZMax ||
1275 vertexXY < _vertexXYMin ||
1276 vertexXY > _vertexXYMax)
1279 iVertex = int((vertexZ-_min_vertexZ)/_width_vertexZ);
1280 iVertexP1 = iVertex*_nBins_etaPhiPt_1;
1281 iVertexP2 = iVertex*_nBins_etaPhiPt_2;
1282 if (iVertex<0 || iVertex>=_nBins_vertexZ)
1284 AliError("AliAnalysisTaskDptDptCorrelations::Exec(Option_t *option) iVertex<0 || iVertex>=_nBins_vertexZ ");
1287 _eventAccounting->Fill(3);// count all calls to this function with a valid pointer
1288 //======================
1290 TExMap *trackMap = new TExMap();//Mapping matrix----
1293 for(Int_t i = 0; i < _nTracks; i++)
1295 AliAODTrack* aodTrack = dynamic_cast<AliAODTrack *>(fAODEvent->GetTrack(i));
1297 AliError(Form("ERROR: Could not retrieve AODtrack %d",i));
1300 //Double_t tpcSignalAll = aodTrack->GetTPCsignal();
1301 //_dedxVsP_1->Fill(aodTrack->GetTPCmomentum(),tpcSignalAll);
1302 Int_t gID = aodTrack->GetID();
1303 if (aodTrack->TestFilterBit(1)) trackMap->Add(gID, i);//Global tracks
1307 //--------------------------
1309 AliAODTrack* newAodTrack;
1311 //2nd loop track starts here
1312 for (int iTrack=0; iTrack< _nTracks; iTrack++)
1314 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 16 iTrack:" << iTrack << endl;
1316 AliAODTrack * t = (AliAODTrack *) fAODEvent->GetTrack(iTrack);
1319 AliError(Form("AliAnalysisTaskDptDptCorrelations::Exec(Option_t *option) No track ofr iTrack=%d", iTrack));
1323 bitOK = t->TestFilterBit(_trackFilterBit);
1324 if (!bitOK) continue;
1326 Int_t gID = t->GetID();
1327 newAodTrack = gID >= 0 ?t : fAODEvent->GetTrack(trackMap->GetValue(-1-gID));
1339 //dedx = t->GetTPCsignal();
1340 nClus = t->GetTPCNcls();
1341 Double_t nclus2 = t->GetTPCClusterInfo(2,1);
1346 //Float_t nsigmaTPCPID = -999.;
1347 //Float_t nsigmaTOFPID = -999.;
1349 Double_t nsigmaelectron = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(newAodTrack,(AliPID::EParticleType)AliPID::kElectron));
1350 Double_t nsigmapion = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(newAodTrack,(AliPID::EParticleType)AliPID::kPion));
1351 Double_t nsigmakaon = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(newAodTrack,(AliPID::EParticleType)AliPID::kKaon));
1352 Double_t nsigmaproton = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(newAodTrack,(AliPID::EParticleType)AliPID::kProton));
1354 //Fill QA before the PID
1355 //_dedxVsP_1 -> Fill(newAodTrack->P()*newAodTrack->Charge(),newAodTrack->GetTPCsignal());
1356 //_corrDedxVsP_1 -> Fill(newAodTrack->P()*newAodTrack->Charge(),nsigmaelectron);
1357 //end of QA-before pid
1359 //-----------------------------------------
1360 //nsigma cut to reject electron (NEW)
1361 if(nsigmaelectron < fNSigmaCut
1362 && nsigmapion > fNSigmaCut
1363 && nsigmakaon > fNSigmaCut
1364 && nsigmaproton > fNSigmaCut ) continue;
1365 //------------------------------------------
1367 //Fill QA after the PID
1368 // _dedxVsP_2 -> Fill(newAodTrack->P()*newAodTrack->Charge(),newAodTrack->GetTPCsignal());
1369 //_corrDedxVsP_2 -> Fill(newAodTrack->P()*newAodTrack->Charge(),nsigmaelectron);
1373 if (_requestedCharge_1 == charge &&
1376 eta >= _min_eta_1 &&
1381 iPhi = int( phi/_width_phi_1);
1383 if (iPhi<0 || iPhi>=_nBins_phi_1 )
1385 AliWarning("AliAnalysisTaskDptDptCorrelations::analyze() iPhi<0 || iPhi>=_nBins_phi_1");
1389 iEta = int((eta-_min_eta_1)/_width_eta_1);
1390 if (iEta<0 || iEta>=_nBins_eta_1)
1392 AliWarning(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) Mismatched iEta: %d", iEta));
1395 iPt = int((pt -_min_pt_1 )/_width_pt_1 );
1396 if (iPt<0 || iPt >=_nBins_pt_1)
1398 AliWarning(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) Mismatched iPt: %d",iPt));
1401 iEtaPhi = iEta*_nBins_phi_1+iPhi;
1402 iZEtaPhiPt = iVertexP1 + iEtaPhi*_nBins_pt_1 + iPt;
1404 if (_correctionWeight_1)
1405 corr = _correctionWeight_1[iZEtaPhiPt];
1408 if (iZEtaPhiPt<0 || iZEtaPhiPt>=_nBins_zEtaPhiPt_1)
1410 AliWarning("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) iZEtaPhiPt<0 || iZEtaPhiPt>=_nBins_zEtaPhiPt_1");
1418 __n1_1_vsPt[iPt] += corr; //cout << "step 15" << endl;
1419 __n1_1_vsZEtaPhiPt[iZEtaPhiPt] += corr; //cout << "step 12" << endl;
1426 _charge_1[k1] = charge;
1427 _iEtaPhi_1[k1] = iEtaPhi;
1433 _correction_1[k1] = corr;
1435 __n1_1_vsEtaPhi[iEtaPhi] += corr;
1437 __s1pt_1_vsEtaPhi[iEtaPhi] += corrPt;
1443 AliError(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) k1 >=arraySize; arraySize: %d",arraySize));
1450 _requestedCharge_2 == charge &&
1453 eta >= _min_eta_2 &&
1457 dcaXY = t->DCA(); //new change Prabhat
1458 dcaZ = t->ZAtDCA(); //new change Prabhat
1460 //Check dca cuts for systematics
1461 //Comment this portion when not required
1462 /*if (dcaZ < _dcaZMin ||
1464 dcaXY < _dcaXYMin ||
1465 dcaXY > _dcaXYMax ) continue;
1467 //==== QA ===========================
1469 _dcaxy->Fill(dcaXY);
1472 _Ncluster1->Fill(nClus);
1473 _Ncluster2->Fill(nclus2);
1475 //===================================
1477 iPhi = int( phi/_width_phi_2);
1479 if (iPhi<0 || iPhi>=_nBins_phi_2 )
1481 AliWarning("AliAnalysisTaskDptDptCorrelations::analyze() iPhi<0 || iPhi>=_nBins_phi_1");
1485 iEta = int((eta-_min_eta_2)/_width_eta_2);
1486 if (iEta<0 || iEta>=_nBins_eta_2)
1488 AliWarning(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) Mismatched iEta: %d", iEta));
1491 iPt = int((pt -_min_pt_2 )/_width_pt_2 );
1492 if (iPt<0 || iPt >=_nBins_pt_2)
1494 AliWarning(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) Mismatched iPt: %d",iPt));
1498 iEtaPhi = iEta*_nBins_phi_2+iPhi;
1499 iZEtaPhiPt = iVertexP2 + iEtaPhi*_nBins_pt_2 + iPt;
1500 if (iZEtaPhiPt<0 || iZEtaPhiPt>=_nBins_zEtaPhiPt_2)
1502 AliWarning("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) iZEtaPhiPt<0 || iZEtaPhiPt>=_nBins_zEtaPhiPt_2");
1507 if (_correctionWeight_2)
1508 corr = _correctionWeight_2[iZEtaPhiPt];
1511 //dpt = pt - (charge>0) ? _avgPt_vsEtaPhi_2p[iEtaPhi] : _avgPt_vsEtaPhi_2m[iEtaPhi];
1515 //_dedxVsP_2->Fill(p*q,dedx);
1516 __n1_2_vsPt[iPt] += corr; //cout << "step 15" << endl;
1517 __n1_2_vsZEtaPhiPt[iZEtaPhiPt] += corr; //cout << "step 12" << endl;
1522 _id_2[k2] = iTrack; //cout << "step 1" << endl;
1523 _charge_2[k2] = charge; //cout << "step 2" << endl;
1524 _iEtaPhi_2[k2] = iEtaPhi; //cout << "step 3" << endl;
1525 _iPt_2[k2] = iPt; //cout << "step 4" << endl;
1526 _pt_2[k2] = pt; //cout << "step 5" << endl;
1527 _px_2[k2] = px; //cout << "step 6" << endl;
1528 _py_2[k2] = py; //cout << "step 7" << endl;
1529 _pz_2[k2] = pz; //cout << "step 8" << endl;
1530 _correction_2[k2] = corr; //cout << "step 9" << endl;
1531 __n1_2 += corr; //cout << "step 10" << endl;
1532 __s1pt_2 += corrPt; //cout << "step 13" << endl;
1534 __n1_2_vsEtaPhi[iEtaPhi] += corr; //cout << "step 11" << endl;
1535 __s1pt_2_vsEtaPhi[iEtaPhi] += corrPt; //cout << "step 14" << endl;
1540 AliWarning(Form("-W- k2 >=arraySize; arraySize: %d",arraySize));
1545 //cout << "done with track" << endl;
1551 //cout << "Filling histograms now" << endl;
1559 _vertexZ->Fill(vertexZ);
1563 // nothing to do here.
1569 _n1_1_vsM->Fill(centrality, __n1_1);
1570 _s1pt_1_vsM->Fill(centrality, __s1pt_1);
1571 _n1Nw_1_vsM->Fill(centrality, __n1Nw_1);
1572 _s1ptNw_1_vsM->Fill(centrality, __s1ptNw_1);
1573 _n1_2_vsM->Fill(centrality, __n1_1);
1574 _s1pt_2_vsM->Fill(centrality, __s1pt_1);
1575 _n1Nw_2_vsM->Fill(centrality, __n1Nw_1);
1576 _s1ptNw_2_vsM->Fill(centrality, __s1ptNw_1);
1577 // reset pair counters
1578 __n2_12 = __s2ptpt_12 = __s2NPt_12 = __s2PtN_12 = 0;
1579 __n2Nw_12 = __s2ptptNw_12 = __s2NPtNw_12 = __s2PtNNw_12 = 0;
1582 for (int i1=0; i1<k1; i1++)
1584 ////cout << " i1:" << i1 << endl;
1585 id_1 = _id_1[i1]; ////cout << " id_1:" << id_1 << endl;
1586 q_1 = _charge_1[i1]; ////cout << " q_1:" << q_1 << endl;
1587 iEtaPhi_1 = _iEtaPhi_1[i1]; ////cout << " iEtaPhi_1:" << iEtaPhi_1 << endl;
1588 iPt_1 = _iPt_1[i1]; ////cout << " iPt_1:" << iPt_1 << endl;
1589 corr_1 = _correction_1[i1]; ////cout << " corr_1:" << corr_1 << endl;
1590 pt_1 = _pt_1[i1]; ////cout << " pt_1:" << pt_1 << endl;
1591 //dedx_1 = _dedx_1[i1]; ////cout << " dedx_1:" << dedx_1 << endl;
1593 for (int i2=i1+1; i2<k1; i2++)
1595 ////cout << " i2:" << i2 << endl;
1596 id_2 = _id_1[i2]; ////cout << " id_2:" << id_2 << endl;
1599 q_2 = _charge_1[i2]; ////cout << " q_1:" << q_1 << endl;
1600 iEtaPhi_2 = _iEtaPhi_1[i2]; ////cout << " iEtaPhi_1:" << iEtaPhi_1 << endl;
1601 iPt_2 = _iPt_1[i2]; ////cout << " iPt_1:" << iPt_1 << endl;
1602 corr_2 = _correction_1[i2]; ////cout << " corr_1:" << corr_1 << endl;
1603 pt_2 = _pt_1[i2]; ////cout << " pt_1:" << pt_1 << endl;
1604 //dedx_2 = _dedx_1[i2]; ////cout << " dedx_2:" << dedx_2 << endl;
1605 corr = corr_1*corr_2;
1606 if (q_2>q_1 || (q_1>0 && q_2>0 && pt_2<=pt_1) || (q_1<0 && q_2<0 && pt_2>=pt_1))
1608 ij = iEtaPhi_1*_nBins_etaPhi_1 + iEtaPhi_2; ////cout << " ij:" << ij<< endl;
1610 else // swap particles
1612 ij = iEtaPhi_2*_nBins_etaPhi_1 + iEtaPhi_1; ////cout << " ij:" << ij<< endl;
1616 __n2_12_vsEtaPhi[ij] += corr;
1618 __s2ptpt_12 += corr*ptpt;
1619 __s2PtN_12 += corr*pt_1;
1620 __s2NPt_12 += corr*pt_2;
1621 __s2ptpt_12_vsEtaPhi[ij] += corr*ptpt;
1622 __s2PtN_12_vsEtaPhi[ij] += corr*pt_1;
1623 __s2NPt_12_vsEtaPhi[ij] += corr*pt_2;
1624 __n2_12_vsPtPt[iPt_1*_nBins_pt_2 + iPt_2] += corr;
1627 __s2ptptNw_12 += ptpt;
1628 __s2PtNNw_12 += pt_1;
1629 __s2NPtNw_12 += pt_2;
1637 for (int i1=0; i1<k1; i1++)
1639 ////cout << " i1:" << i1 << endl;
1640 id_1 = _id_1[i1]; ////cout << " id_1:" << id_1 << endl;
1641 q_1 = _charge_1[i1]; ////cout << " q_1:" << q_1 << endl;
1642 iEtaPhi_1 = _iEtaPhi_1[i1]; ////cout << " iEtaPhi_1:" << iEtaPhi_1 << endl;
1643 iPt_1 = _iPt_1[i1]; ////cout << " iPt_1:" << iPt_1 << endl;
1644 corr_1 = _correction_1[i1]; ////cout << " corr_1:" << corr_1 << endl;
1645 pt_1 = _pt_1[i1]; ////cout << " pt_1:" << pt_1 << endl;
1646 //dedx_1 = _dedx_1[i1]; ////cout << " dedx_1:" << dedx_1 << endl;
1648 for (int i2=i1+1; i2<k1; i2++)
1650 ////cout << " i2:" << i2 << endl;
1651 id_2 = _id_1[i2]; ////cout << " id_2:" << id_2 << endl;
1654 q_2 = _charge_1[i2]; ////cout << " q_2:" << q_2 << endl;
1655 iEtaPhi_2 = _iEtaPhi_1[i2]; ////cout << " iEtaPhi_2:" << iEtaPhi_2 << endl;
1656 iPt_2 = _iPt_1[i2]; ////cout << " iPt_2:" << iPt_2 << endl;
1657 corr_2 = _correction_1[i2]; ////cout << " corr_2:" << corr_2 << endl;
1658 pt_2 = _pt_1[i2]; ////cout << " pt_2:" << pt_2 << endl;
1659 //dedx_2 = _dedx_1[i2]; ////cout << " dedx_2:" << dedx_2 << endl;
1660 corr = corr_1*corr_2;
1661 if ( q_2<q_1 || (q_1>0 && q_2>0 && pt_2>=pt_1) || (q_1<0 && q_2<0 && pt_2<=pt_1))
1663 ij = iEtaPhi_1*_nBins_etaPhi_1 + iEtaPhi_2; ////cout << " ij:" << ij<< endl;
1665 else // swap particles
1667 ij = iEtaPhi_2*_nBins_etaPhi_1 + iEtaPhi_1; ////cout << " ij:" << ij<< endl;
1671 __n2_12_vsEtaPhi[ij] += corr;
1673 __s2ptpt_12 += corr*ptpt;
1674 __s2PtN_12 += corr*pt_1;
1675 __s2NPt_12 += corr*pt_2;
1676 __s2ptpt_12_vsEtaPhi[ij] += corr*ptpt;
1677 __s2PtN_12_vsEtaPhi[ij] += corr*pt_1;
1678 __s2NPt_12_vsEtaPhi[ij] += corr*pt_2;
1679 __n2_12_vsPtPt[iPt_1*_nBins_pt_2 + iPt_2] += corr;
1682 __s2ptptNw_12 += ptpt;
1683 __s2PtNNw_12 += pt_1;
1684 __s2NPtNw_12 += pt_2;
1691 else // filter 1 and 2 are different -- must do all particle pairs...
1693 _n1_1_vsM->Fill(centrality, __n1_1);
1694 _s1pt_1_vsM->Fill(centrality, __s1pt_1);
1695 _n1Nw_1_vsM->Fill(centrality, __n1Nw_1);
1696 _s1ptNw_1_vsM->Fill(centrality, __s1ptNw_1);
1697 _n1_2_vsM->Fill(centrality, __n1_2);
1698 _s1pt_2_vsM->Fill(centrality, __s1pt_2);
1699 _n1Nw_2_vsM->Fill(centrality, __n1Nw_2);
1700 _s1ptNw_2_vsM->Fill(centrality, __s1ptNw_2);
1701 // reset pair counters
1702 __n2_12 = __s2ptpt_12 = __s2NPt_12 = __s2PtN_12 = 0;
1703 __n2Nw_12 = __s2ptptNw_12 = __s2NPtNw_12 = __s2PtNNw_12 = 0;
1704 for (int i1=0; i1<k1; i1++)
1706 ////cout << " i1:" << i1 << endl;
1707 id_1 = _id_1[i1]; ////cout << " id_1:" << id_1 << endl;
1708 q_1 = _charge_1[i1]; ////cout << " q_1:" << q_1 << endl;
1709 iEtaPhi_1 = _iEtaPhi_1[i1]; ////cout << " iEtaPhi_1:" << iEtaPhi_1 << endl;
1710 iPt_1 = _iPt_1[i1]; ////cout << " iPt_1:" << iPt_1 << endl;
1711 corr_1 = _correction_1[i1]; ////cout << " corr_1:" << corr_1 << endl;
1712 pt_1 = _pt_1[i1]; ////cout << " pt_1:" << pt_1 << endl;
1713 px_1 = _px_1[i1]; ////cout << " px_1:" << px_1 << endl;
1714 py_1 = _py_1[i1]; ////cout << " py_1:" << py_1 << endl;
1715 pz_1 = _pz_1[i1]; ////cout << " pz_1:" << pz_1 << endl;
1716 //dedx_1 = _dedx_1[i1]; ////cout << " dedx_1:" << dedx_1 << endl;
1719 for (int i2=0; i2<k2; i2++)
1721 ////cout << " i2:" << i2 << endl;
1722 id_2 = _id_2[i2]; ////cout << " id_2:" << id_2 << endl;
1723 if (id_1!=id_2) // exclude auto correlation
1725 q_2 = _charge_2[i2]; ////cout << " q_2:" << q_2 << endl;
1726 iEtaPhi_2 = _iEtaPhi_2[i2]; ////cout << " iEtaPhi_2:" << iEtaPhi_2 << endl;
1727 iPt_2 = _iPt_2[i2]; ////cout << " iPt_2:" << iPt_2 << endl;
1728 corr_2 = _correction_2[i2]; ////cout << " corr_2:" << corr_2 << endl;
1729 pt_2 = _pt_2[i2]; ////cout << " pt_2:" << pt_2 << endl;
1730 px_2 = _px_2[i2]; ////cout << " px_2:" << px_2 << endl;
1731 py_2 = _py_2[i2]; ////cout << " py_2:" << py_2 << endl;
1732 pz_2 = _pz_2[i2]; ////cout << " pz_2:" << pz_2 << endl;
1733 //dedx_2 = _dedx_2[i2]; ////cout << " dedx_2:" << dedx_2 << endl;
1736 if (_rejectPairConversion)
1738 float e1Sq = massElecSq + pt_1*pt_1 + pz_1*pz_1;
1739 float e2Sq = massElecSq + pt_2*pt_2 + pz_2*pz_2;
1740 float mInvSq = 2*(massElecSq + sqrt(e1Sq*e2Sq) - px_1*px_2 - py_1*py_2 - pz_1*pz_2 );
1741 float mInv = sqrt(mInvSq);
1742 _invMass->Fill(mInv);
1745 // if (dedx_1>75. && dedx_2>75.)
1747 _invMassElec->Fill(mInv);
1748 //if (mInv<0.05) continue;
1752 corr = corr_1*corr_2;
1753 ij = iEtaPhi_1*_nBins_etaPhi_1 + iEtaPhi_2; ////cout << " ij:" << ij<< endl;
1755 __n2_12_vsEtaPhi[ij] += corr;
1757 __s2ptpt_12 += corr*ptpt;
1758 __s2PtN_12 += corr*pt_1;
1759 __s2NPt_12 += corr*pt_2;
1760 __s2ptpt_12_vsEtaPhi[ij] += corr*ptpt;
1761 __s2PtN_12_vsEtaPhi[ij] += corr*pt_1;
1762 __s2NPt_12_vsEtaPhi[ij] += corr*pt_2;
1763 __n2_12_vsPtPt[iPt_1*_nBins_pt_2 + iPt_2] += corr;
1765 __s2ptptNw_12 += ptpt;
1766 __s2PtNNw_12 += pt_1;
1767 __s2NPtNw_12 += pt_2;
1774 _n2_12_vsM->Fill(centrality, __n2_12);
1775 _s2PtPt_12_vsM->Fill(centrality, __s2ptpt_12);
1776 _s2PtN_12_vsM->Fill(centrality, __s2NPt_12);
1777 _s2NPt_12_vsM->Fill(centrality, __s2PtN_12);
1779 _n2Nw_12_vsM->Fill(centrality, __n2Nw_12);
1780 _s2PtPtNw_12_vsM->Fill(centrality, __s2ptptNw_12);
1781 _s2PtNNw_12_vsM->Fill(centrality, __s2NPtNw_12);
1782 _s2NPtNw_12_vsM->Fill(centrality, __s2PtNNw_12);
1787 AliInfo("AliAnalysisTaskDptDptCorrelations::UserExec() -----------------Event Done ");
1788 PostData(0,_outputHistoList);
1792 void AliAnalysisTaskDptDptCorrelations::FinishTaskOutput()
1794 AliInfo("AliAnalysisTaskDptDptCorrelations::FinishTaskOutput() Starting.");
1795 Printf("= 0 ====================================================================");
1796 finalizeHistograms();
1797 AliInfo("= 1 ====================================================================");
1798 PostData(0,_outputHistoList);
1799 AliInfo("= 2 ====================================================================");
1800 AliInfo("AliAnalysisTaskDptDptCorrelations::FinishTaskOutput() Done.");
1803 void AliAnalysisTaskDptDptCorrelations::Terminate(Option_t* /*option*/)
1805 AliInfo("AliAnalysisTaskDptDptCorrelations::Terminate() Starting/Done.");
1810 //===================================================================================================
1811 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH1 * h, float * array, int size)
1814 float v1, ev1, v2, ev2, sum, esum;
1815 for (i=0, i1=1; i<size; ++i,++i1)
1817 v1 = array[i]; ev1 = sqrt(v1);
1818 v2 = h->GetBinContent(i1);
1819 ev2 = h->GetBinError(i1);
1821 esum = sqrt(ev1*ev1+ev2*ev2);
1822 h->SetBinContent(i1,sum);
1823 h->SetBinError(i1,esum);
1827 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH2 * h, float * array, int size1, int size2)
1831 float v1, ev1, v2, ev2, sum, esum;
1832 for (i=0, i1=1; i<size1; ++i,++i1)
1834 for (j=0, j1=1; j<size2; ++j,++j1)
1836 v1 = array[i*size2+j]; ev1 = sqrt(v1);
1837 v2 = h->GetBinContent(i1,j1);
1838 ev2 = h->GetBinError(i1,j1);
1840 esum = sqrt(ev1*ev1+ev2*ev2);
1841 h->SetBinContent(i1,j1,sum);
1842 h->SetBinError(i1,j1,esum);
1847 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH3 * h, float * array, int size1, int size2, int size3)
1852 float v1, ev1, v2, ev2, sum, esum;
1853 int size23 = size2*size3;
1854 for (i=0, i1=1; i<size1; ++i,++i1)
1856 for (j=0, j1=1; j<size2; ++j,++j1)
1858 for (k=0, k1=1; k<size3; ++k,++k1)
1860 v1 = array[i*size23+j*size3+k]; ev1 = sqrt(v1);
1861 v2 = h->GetBinContent(i1,j1,k1);
1862 ev2 = h->GetBinError(i1,j1,k1);
1864 esum = sqrt(ev1*ev1+ev2*ev2);
1865 h->SetBinContent(i1,j1,k1,sum);
1866 h->SetBinError(i1,j1,k1,esum);
1872 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH1 * h, double * array, int size)
1875 double v1, ev1, v2, ev2, sum, esum;
1876 for (i=0, i1=1; i<size; ++i,++i1)
1878 v1 = array[i]; ev1 = sqrt(v1);
1879 v2 = h->GetBinContent(i1);
1880 ev2 = h->GetBinError(i1);
1882 esum = sqrt(ev1*ev1+ev2*ev2);
1883 h->SetBinContent(i1,sum);
1884 h->SetBinError(i1,esum);
1888 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH2 * h, double * array, int size1, int size2)
1892 double v1, ev1, v2, ev2, sum, esum;
1893 for (i=0, i1=1; i<size1; ++i,++i1)
1895 for (j=0, j1=1; j<size2; ++j,++j1)
1897 v1 = array[i*size2+j]; ev1 = sqrt(v1);
1898 v2 = h->GetBinContent(i1,j1);
1899 ev2 = h->GetBinError(i1,j1);
1901 esum = sqrt(ev1*ev1+ev2*ev2);
1902 h->SetBinContent(i1,j1,sum);
1903 h->SetBinError(i1,j1,esum);
1908 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH3 * h, double * array, int size1, int size2, int size3)
1913 double v1, ev1, v2, ev2, sum, esum;
1914 int size23 = size2*size3;
1915 for (i=0, i1=1; i<size1; ++i,++i1)
1917 for (j=0, j1=1; j<size2; ++j,++j1)
1919 for (k=0, k1=1; k<size3; ++k,++k1)
1921 v1 = array[i*size23+j*size3+k]; ev1 = sqrt(v1);
1922 v2 = h->GetBinContent(i1,j1,k1);
1923 ev2 = h->GetBinError(i1,j1,k1);
1925 esum = sqrt(ev1*ev1+ev2*ev2);
1926 h->SetBinContent(i1,j1,k1,sum);
1927 h->SetBinError(i1,j1,k1,esum);
1933 //________________________________________________________________________
1934 double * AliAnalysisTaskDptDptCorrelations::getDoubleArray(int size, double v)
1936 /// Allocate an array of type double with n values
1937 /// Initialize the array to the given value
1938 double * array = new double [size];
1939 for (int i=0;i<size;++i) array[i]=v;
1943 //________________________________________________________________________
1944 float * AliAnalysisTaskDptDptCorrelations::getFloatArray(int size, float v)
1946 /// Allocate an array of type float with n values
1947 /// Initialize the array to the given value
1948 float * array = new float [size];
1949 for (int i=0;i<size;++i) array[i]=v;
1954 //________________________________________________________________________
1955 TH1D * AliAnalysisTaskDptDptCorrelations::createHisto1D(const TString & name, const TString & title,
1956 int n, double xMin, double xMax,
1957 const TString & xTitle, const TString & yTitle)
1959 //CreateHisto new 1D historgram
1960 AliInfo(Form("createHisto 1D histo %s nBins: %d xMin: %f xMax: %f",name.Data(),n,xMin,xMax));
1961 TH1D * h = new TH1D(name,title,n,xMin,xMax);
1962 h->GetXaxis()->SetTitle(xTitle);
1963 h->GetYaxis()->SetTitle(yTitle);
1969 //________________________________________________________________________
1970 TH1D * AliAnalysisTaskDptDptCorrelations::createHisto1D(const TString & name, const TString & title,
1971 int n, double * bins,
1972 const TString & xTitle, const TString & yTitle)
1974 AliInfo(Form("createHisto 1D histo %s with %d non uniform nBins",name.Data(),n));
1975 TH1D * h = new TH1D(name,title,n,bins);
1976 h->GetXaxis()->SetTitle(xTitle);
1977 h->GetYaxis()->SetTitle(yTitle);
1983 //________________________________________________________________________
1984 TH2D * AliAnalysisTaskDptDptCorrelations::createHisto2D(const TString & name, const TString & title,
1985 int nx, double xMin, double xMax, int ny, double yMin, double yMax,
1986 const TString & xTitle, const TString & yTitle, const TString & zTitle)
1988 AliInfo(Form("createHisto 2D histo %s nx: %d xMin: %f10.4 xMax: %f10.4 ny: %d yMin: %f10.4 yMax: %f10.4",name.Data(),nx,xMin,xMax,ny,yMin,yMax));
1989 TH2D * h = new TH2D(name,title,nx,xMin,xMax,ny,yMin,yMax);
1990 h->GetXaxis()->SetTitle(xTitle);
1991 h->GetYaxis()->SetTitle(yTitle);
1992 h->GetZaxis()->SetTitle(zTitle);
1997 //________________________________________________________________________
1998 TH2D * AliAnalysisTaskDptDptCorrelations::createHisto2D(const TString & name, const TString & title,
1999 int nx, double* xbins, int ny, double yMin, double yMax,
2000 const TString & xTitle, const TString & yTitle, const TString & zTitle)
2002 AliInfo(Form("createHisto 2D histo %s with %d non uniform nBins",name.Data(),nx));
2004 h = new TH2D(name,title,nx,xbins,ny,yMin,yMax);
2005 h->GetXaxis()->SetTitle(xTitle);
2006 h->GetYaxis()->SetTitle(yTitle);
2007 h->GetZaxis()->SetTitle(zTitle);
2013 //________________________________________________________________________
2014 TH1F * AliAnalysisTaskDptDptCorrelations::createHisto1F(const TString & name, const TString & title,
2015 int n, double xMin, double xMax,
2016 const TString & xTitle, const TString & yTitle)
2018 //CreateHisto new 1D historgram
2019 AliInfo(Form("createHisto 1D histo %s nBins: %d xMin: %f xMax: %f",name.Data(),n,xMin,xMax));
2020 TH1F * h = new TH1F(name,title,n,xMin,xMax);
2021 h->GetXaxis()->SetTitle(xTitle);
2022 h->GetYaxis()->SetTitle(yTitle);
2028 //________________________________________________________________________
2029 TH1F * AliAnalysisTaskDptDptCorrelations::createHisto1F(const TString & name, const TString & title,
2030 int n, double * bins,
2031 const TString & xTitle, const TString & yTitle)
2033 AliInfo(Form("createHisto 1D histo %s with %d non uniform nBins",name.Data(),n));
2034 TH1F * h = new TH1F(name,title,n,bins);
2035 h->GetXaxis()->SetTitle(xTitle);
2036 h->GetYaxis()->SetTitle(yTitle);
2042 //________________________________________________________________________
2043 TH2F * AliAnalysisTaskDptDptCorrelations::createHisto2F(const TString & name, const TString & title,
2044 int nx, double xMin, double xMax, int ny, double yMin, double yMax,
2045 const TString & xTitle, const TString & yTitle, const TString & zTitle)
2047 AliInfo(Form("createHisto 2D histo %s nx: %d xMin: %f10.4 xMax: %f10.4 ny: %d yMin: %f10.4 yMax: %f10.4",name.Data(),nx,xMin,xMax,ny,yMin,yMax));
2048 TH2F * h = new TH2F(name,title,nx,xMin,xMax,ny,yMin,yMax);
2049 h->GetXaxis()->SetTitle(xTitle);
2050 h->GetYaxis()->SetTitle(yTitle);
2051 h->GetZaxis()->SetTitle(zTitle);
2056 //________________________________________________________________________
2057 TH2F * AliAnalysisTaskDptDptCorrelations::createHisto2F(const TString & name, const TString & title,
2058 int nx, double* xbins, int ny, double yMin, double yMax,
2059 const TString & xTitle, const TString & yTitle, const TString & zTitle)
2061 AliInfo(Form("createHisto 2D histo %s with %d non uniform nBins",name.Data(),nx));
2063 h = new TH2F(name,title,nx,xbins,ny,yMin,yMax);
2064 h->GetXaxis()->SetTitle(xTitle);
2065 h->GetYaxis()->SetTitle(yTitle);
2066 h->GetZaxis()->SetTitle(zTitle);
2072 //________________________________________________________________________
2073 TH3F * AliAnalysisTaskDptDptCorrelations::createHisto3F(const TString & name, const TString & title,
2074 int nx, double xMin, double xMax,
2075 int ny, double yMin, double yMax,
2076 int nz, double zMin, double zMax,
2077 const TString & xTitle, const TString & yTitle, const TString & zTitle)
2079 AliInfo(Form("createHisto 2D histo %s nx: %d xMin: %f10.4 xMax: %f10.4 ny: %d yMin: %f10.4 yMax: %f10.4 nz: %d zMin: %f10.4 zMax: %f10.4",name.Data(),nx,xMin,xMax,ny,yMin,yMax,nz,zMin,zMax));
2080 TH3F * h = new TH3F(name,title,nx,xMin,xMax,ny,yMin,yMax,nz,zMin,zMax);
2081 h->GetXaxis()->SetTitle(xTitle);
2082 h->GetYaxis()->SetTitle(yTitle);
2083 h->GetZaxis()->SetTitle(zTitle);
2089 //________________________________________________________________________
2090 TProfile * AliAnalysisTaskDptDptCorrelations::createProfile(const TString & name, const TString & description,
2091 int nx,double xMin,double xMax,
2092 const TString & xTitle, const TString & yTitle)
2094 AliInfo(Form("createHisto 1D profile %s nBins: %d xMin: %f10.4 xMax: %f10.4",name.Data(),nx,xMin,xMax));
2095 TProfile * h = new TProfile(name,description,nx,xMin,xMax);
2096 h->GetXaxis()->SetTitle(xTitle);
2097 h->GetYaxis()->SetTitle(yTitle);
2102 //________________________________________________________________________
2103 TProfile * AliAnalysisTaskDptDptCorrelations::createProfile(const TString & name,const TString & description,
2104 int nx, double* bins,
2105 const TString & xTitle, const TString & yTitle)
2107 AliInfo(Form("createHisto 1D profile %s with %d non uniform bins",name.Data(),nx));
2108 TProfile * h = new TProfile(name,description,nx,bins);
2109 h->GetXaxis()->SetTitle(xTitle);
2110 h->GetYaxis()->SetTitle(yTitle);
2116 void AliAnalysisTaskDptDptCorrelations::addToList(TH1 *h)
2118 if (_outputHistoList)
2120 _outputHistoList->Add(h);
2123 AliInfo("addToList(TH1 *h) _outputHistoList is null!!!!! Should abort ship");