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 **************************************************************************/
32 #include "AliAnalysisManager.h"
34 #include "AliAODHandler.h"
35 #include "AliAODInputHandler.h"
36 //#include "AliAODMCParticle.h"
37 #include "AliInputEventHandler.h"
39 #include "AliESDEvent.h"
40 #include "AliESDInputHandler.h"
41 #include "AliMultiplicity.h"
42 #include "AliCentrality.h"
43 #include "AliAnalysisTaskDptDptCorrelations.h"
45 ClassImp(AliAnalysisTaskDptDptCorrelations)
47 AliAnalysisTaskDptDptCorrelations::AliAnalysisTaskDptDptCorrelations()
48 : AliAnalysisTaskSE(),
50 fESDEvent(0), //! ESD Event
53 _twoPi ( 2.0 * 3.1415927),
60 _rejectPairConversion ( 0),
65 _centralityMethod ( 4),
68 _requestedCharge_1 ( 1),
69 _requestedCharge_2 ( -1),
77 _trackFilterBit ( 128),
108 _correctionWeight_1(0),
109 _correctionWeight_2(0),
110 _nBins_M0(500), _min_M0(0), _max_M0(10000), _width_M0(20),
111 _nBins_M1(500), _min_M1(0), _max_M1(10000), _width_M1(20),
112 _nBins_M2(500), _min_M2(0), _max_M2(10000), _width_M2(20),
113 _nBins_M3(500), _min_M3(0), _max_M3(10000), _width_M3(20),
114 _nBins_M4(100), _min_M4(0), _max_M4(1), _width_M4(0.01),
115 _nBins_M5(100), _min_M5(0), _max_M5(1), _width_M5(0.01),
116 _nBins_M6(100), _min_M6(0), _max_M6(1), _width_M6(0.01),
117 _nBins_vertexZ(40), _min_vertexZ(-10), _max_vertexZ(10), _width_vertexZ(0.5),
119 _nBins_pt_1(18), _min_pt_1(0.2), _max_pt_1(2.0), _width_pt_1(0.1),
120 _nBins_phi_1(72), _min_phi_1(0), _max_phi_1(2.*3.1415927),_width_phi_1(2.*3.1415927/72.),
121 _nBins_eta_1(20), _min_eta_1(-1), _max_eta_1(1), _width_eta_1(0.1),
124 _nBins_etaPhiPt_1(0),
125 _nBins_zEtaPhiPt_1(0),
127 _nBins_pt_2(18), _min_pt_2(0.2), _max_pt_2(2.0), _width_pt_2(0.1),
128 _nBins_phi_2(72), _min_phi_2(0), _max_phi_2(2.*3.1415927),_width_phi_2(2.*3.1415927/72),
129 _nBins_eta_2(20), _min_eta_2(-1), _max_eta_2(1), _width_eta_2(0.1),
132 _nBins_etaPhiPt_2(0),
133 _nBins_zEtaPhiPt_2(0),
153 __s1pt_1_vsEtaPhi(0),
154 __n1_1_vsZEtaPhiPt(0),
157 __s1pt_2_vsEtaPhi(0),
158 __n1_2_vsZEtaPhiPt(0),
161 __s2ptpt_12_vsEtaPhi(0),
162 __s2PtN_12_vsEtaPhi(0),
163 __s2NPt_12_vsEtaPhi(0),
166 _eventAccounting ( 0),
176 _n1_1_vsEtaVsPhi ( 0),
177 _s1pt_1_vsEtaVsPhi ( 0),
178 _n1_1_vsZVsEtaVsPhiVsPt ( 0),
179 _n1_1_vsM ( 0), // w/ weight
181 _n1Nw_1_vsM ( 0), // w/o weight
187 _n1_2_vsEtaVsPhi ( 0),
188 _s1pt_2_vsEtaVsPhi ( 0),
189 _n1_2_vsZVsEtaVsPhiVsPt ( 0),
197 _n2_12_vsEtaPhi ( 0),
198 _n2_12_vsPtVsPt ( 0),
199 _s2PtPt_12_vsEtaPhi( 0),
200 _s2PtN_12_vsEtaPhi ( 0),
201 _s2NPt_12_vsEtaPhi ( 0),
207 _s2PtPtNw_12_vsM ( 0),
208 _s2PtNNw_12_vsM ( 0),
209 _s2NPtNw_12_vsM ( 0),
232 intBinCorrName("NA"),
282 _title_etaPhi_1("NA"),
284 _title_SumPt_1("NA"),
285 _title_AvgPt_1("NA"),
287 _title_AvgSumPt_1("NA"),
292 _title_etaPhi_2("NA"),
294 _title_SumPt_2("NA"),
295 _title_AvgPt_2("NA"),
297 _title_AvgSumPt_2("NA"),
299 _title_etaPhi_12("NA"),
301 _title_AvgN2_12("NA"),
302 _title_AvgSumPtPt_12("NA"),
303 _title_AvgSumPtN_12("NA"),
304 _title_AvgNSumPt_12("NA"),
314 printf("Default constructor called \n");
316 printf("passed \n ");
320 AliAnalysisTaskDptDptCorrelations::AliAnalysisTaskDptDptCorrelations(const TString & name)
321 : AliAnalysisTaskSE(name),
326 _twoPi ( 2.0 * 3.1415927),
331 _sameFilter ( false),
333 _rejectPairConversion ( 0),
336 _vertexXYMin ( -10.),
338 _centralityMethod ( 4),
339 _centralityMin ( 0.),
340 _centralityMax ( 1.),
341 _requestedCharge_1 ( 1),
342 _requestedCharge_2 ( -1),
350 _trackFilterBit ( 128),
381 _correctionWeight_1(0),
382 _correctionWeight_2(0),
383 _nBins_M0(500), _min_M0(0), _max_M0(10000), _width_M0(20),
384 _nBins_M1(500), _min_M1(0), _max_M1(10000), _width_M1(20),
385 _nBins_M2(500), _min_M2(0), _max_M2(10000), _width_M2(20),
386 _nBins_M3(500), _min_M3(0), _max_M3(10000), _width_M3(20),
387 _nBins_M4(100), _min_M4(0), _max_M4(1), _width_M4(0.01),
388 _nBins_M5(100), _min_M5(0), _max_M5(1), _width_M5(0.01),
389 _nBins_M6(100), _min_M6(0), _max_M6(1), _width_M6(0.01),
390 _nBins_vertexZ(40), _min_vertexZ(-10), _max_vertexZ(10), _width_vertexZ(0.5),
392 _nBins_pt_1(18), _min_pt_1(0.2), _max_pt_1(2.0), _width_pt_1(0.1),
393 _nBins_phi_1(72), _min_phi_1(0), _max_phi_1(2.*3.1415927),_width_phi_1(2.*3.1415927/72.),
394 _nBins_eta_1(20), _min_eta_1(-1), _max_eta_1(1), _width_eta_1(0.1),
397 _nBins_etaPhiPt_1(0),
398 _nBins_zEtaPhiPt_1(0),
400 _nBins_pt_2(18), _min_pt_2(0.2), _max_pt_2(2.0), _width_pt_2(0.1),
401 _nBins_phi_2(72), _min_phi_2(0), _max_phi_2(2.*3.1415927),_width_phi_2(2.*3.1415927/72),
402 _nBins_eta_2(20), _min_eta_2(-1), _max_eta_2(1), _width_eta_2(0.1),
405 _nBins_etaPhiPt_2(0),
406 _nBins_zEtaPhiPt_2(0),
426 __s1pt_1_vsEtaPhi(0),
427 __n1_1_vsZEtaPhiPt(0),
430 __s1pt_2_vsEtaPhi(0),
431 __n1_2_vsZEtaPhiPt(0),
434 __s2ptpt_12_vsEtaPhi(0),
435 __s2PtN_12_vsEtaPhi(0),
436 __s2NPt_12_vsEtaPhi(0),
439 _eventAccounting ( 0),
449 _n1_1_vsEtaVsPhi ( 0),
450 _s1pt_1_vsEtaVsPhi ( 0),
451 _n1_1_vsZVsEtaVsPhiVsPt ( 0),
452 _n1_1_vsM ( 0), // w/ weight
454 _n1Nw_1_vsM ( 0), // w/o weight
460 _n1_2_vsEtaVsPhi ( 0),
461 _s1pt_2_vsEtaVsPhi ( 0),
462 _n1_2_vsZVsEtaVsPhiVsPt ( 0),
470 _n2_12_vsEtaPhi ( 0),
471 _n2_12_vsPtVsPt ( 0),
472 _s2PtPt_12_vsEtaPhi( 0),
473 _s2PtN_12_vsEtaPhi ( 0),
474 _s2NPt_12_vsEtaPhi ( 0),
480 _s2PtPtNw_12_vsM ( 0),
481 _s2PtNNw_12_vsM ( 0),
482 _s2NPtNw_12_vsM ( 0),
505 intBinCorrName("NA"),
555 _title_etaPhi_1("NA"),
557 _title_SumPt_1("NA"),
558 _title_AvgPt_1("NA"),
560 _title_AvgSumPt_1("NA"),
565 _title_etaPhi_2("NA"),
567 _title_SumPt_2("NA"),
568 _title_AvgPt_2("NA"),
570 _title_AvgSumPt_2("NA"),
572 _title_etaPhi_12("NA"),
574 _title_AvgN2_12("NA"),
575 _title_AvgSumPtPt_12("NA"),
576 _title_AvgSumPtN_12("NA"),
577 _title_AvgNSumPt_12("NA"),
587 printf("2nd constructor called ");
589 DefineOutput(0, TList::Class());
595 AliAnalysisTaskDptDptCorrelations::~AliAnalysisTaskDptDptCorrelations()
606 delete _correction_1;
609 delete __n1_1_vsEtaPhi;
610 delete __s1pt_1_vsEtaPhi;
611 delete __n1_1_vsZEtaPhiPt;
612 if (_correctionWeight_1) delete _correctionWeight_1;
624 delete _correction_2;
627 delete __n1_2_vsEtaPhi;
628 delete __s1pt_2_vsEtaPhi;
629 delete __n1_2_vsZEtaPhiPt;
630 if (_correctionWeight_2) delete _correctionWeight_2;
635 delete __n2_12_vsPtPt;
636 delete __n2_12_vsEtaPhi;
637 delete __s2ptpt_12_vsEtaPhi;
638 delete __s2PtN_12_vsEtaPhi;
639 delete __s2NPt_12_vsEtaPhi;
644 void AliAnalysisTaskDptDptCorrelations::UserCreateOutputObjects()
646 cout<< "AliAnalysisTaskDptDptCorrelations::CreateOutputObjects() Starting " << endl;
648 _outputHistoList = new TList();
649 _outputHistoList->SetOwner();
651 //if (_useWeights) DefineInput(2, TList::Class());
653 //Setup the parameters of the histograms
654 _nBins_M0 = 500; _min_M0 = 0.; _max_M0 = 5000.; _width_M0 = (_max_M0-_min_M0)/_nBins_M0;
655 _nBins_M1 = 500; _min_M1 = 0.; _max_M1 = 5000.; _width_M1 = (_max_M1-_min_M1)/_nBins_M1;
656 _nBins_M2 = 500; _min_M2 = 0.; _max_M2 = 5000.; _width_M2 = (_max_M2-_min_M2)/_nBins_M2;
657 _nBins_M3 = 500; _min_M3 = 0.; _max_M3 = 5000.; _width_M3 = (_max_M3-_min_M3)/_nBins_M3;
658 _nBins_M4 = 100; _min_M4 = 0.; _max_M4 = 100.; _width_M4 = (_max_M4-_min_M4)/_nBins_M4;
659 _nBins_M5 = 100; _min_M5 = 0.; _max_M5 = 100.; _width_M5 = (_max_M5-_min_M5)/_nBins_M5;
660 _nBins_M6 = 100; _min_M6 = 0.; _max_M6 = 100.; _width_M6 = (_max_M6-_min_M6)/_nBins_M6;
662 _min_vertexZ = _vertexZMin;
663 _max_vertexZ = _vertexZMax;
664 _width_vertexZ = 0.5;
665 _nBins_vertexZ = int(0.5+ (_max_vertexZ - _min_vertexZ)/_width_vertexZ);
666 _nBins_pt_1 = int(0.5+ (_max_pt_1 -_min_pt_1 )/_width_pt_1);
667 _nBins_eta_1 = int(0.5+ (_max_eta_1-_min_eta_1)/_width_eta_1);
668 _width_phi_1 = (_max_phi_1 - _min_phi_1) /_nBins_phi_1;
669 _nBins_etaPhi_1 = _nBins_phi_1 * _nBins_eta_1;
670 _nBins_etaPhiPt_1 = _nBins_etaPhi_1 * _nBins_pt_1;
671 _nBins_zEtaPhiPt_1 = _nBins_vertexZ * _nBins_etaPhiPt_1;
673 _nBins_pt_2 = int(0.5+ (_max_pt_2 -_min_pt_2 )/_width_pt_2);
674 _nBins_eta_2 = int(0.5+ (_max_eta_2-_min_eta_2)/_width_eta_2);
675 _width_phi_2 = (_max_phi_2 - _min_phi_2) /_nBins_phi_2;
676 _nBins_etaPhi_2 = _nBins_phi_2 * _nBins_eta_2;
677 _nBins_etaPhiPt_2 = _nBins_etaPhi_2 * _nBins_pt_2;
678 _nBins_zEtaPhiPt_2 = _nBins_vertexZ * _nBins_etaPhiPt_2;
679 _nBins_etaPhi_12 = _nBins_etaPhi_1 * _nBins_etaPhi_2;
681 //setup the work arrays
683 _id_1 = new int[arraySize];
684 _charge_1 = new int[arraySize];
685 //_iPhi_1 = new int[arraySize];
686 //_iEta_1 = new int[arraySize];
687 _iEtaPhi_1 = new int[arraySize];
688 _iPt_1 = new int[arraySize];
689 _pt_1 = new float[arraySize];
690 _px_1 = new float[arraySize];
691 _py_1 = new float[arraySize];
692 _pz_1 = new float[arraySize];
693 //_phi_1 = new float[arraySize];
694 //_eta_1 = new float[arraySize];
695 _correction_1 = new float[arraySize];
696 _dedx_1 = new float[arraySize];
698 __n1_1_vsPt = getDoubleArray(_nBins_pt_1, 0.);
699 __n1_1_vsEtaPhi = getDoubleArray(_nBins_etaPhi_1, 0.);
700 __s1pt_1_vsEtaPhi = getDoubleArray(_nBins_etaPhi_1, 0.);
701 __n1_1_vsZEtaPhiPt = getFloatArray(_nBins_zEtaPhiPt_1, 0.);
703 cout << "==========================================================================================" << endl;
704 cout << "=============== Booking for particle 1 done." << endl;
705 cout << "_requestedCharge_1: " << _requestedCharge_1 << endl;
706 cout << "_requestedCharge_2: " << _requestedCharge_2 << endl;
708 if (_requestedCharge_2!=_requestedCharge_1)
710 cout << " creating arrays for particle 2 with size: " << arraySize << endl;
713 _id_2 = new int[arraySize];
714 _charge_2 = new int[arraySize];
715 //_iPhi_2 = new int[arraySize];
716 //_iEta_2 = new int[arraySize];
717 _iEtaPhi_2 = new int[arraySize];
718 _iPt_2 = new int[arraySize];
719 _pt_2 = new float[arraySize];
720 _px_2 = new float[arraySize];
721 _py_2 = new float[arraySize];
722 _pz_2 = new float[arraySize];
723 //_phi_2 = new float[arraySize];
724 //_eta_2 = new float[arraySize];
725 _correction_2 = new float[arraySize];
726 _dedx_2 = new float[arraySize];
728 __n1_2_vsPt = getDoubleArray(_nBins_pt_2, 0.);
729 __n1_2_vsEtaPhi = getDoubleArray(_nBins_etaPhi_2, 0.);
730 __s1pt_2_vsEtaPhi = getDoubleArray(_nBins_etaPhi_2, 0.);
731 __n1_2_vsZEtaPhiPt = getFloatArray(_nBins_zEtaPhiPt_2, 0.);
735 __n2_12_vsPtPt = getDoubleArray(_nBins_pt_1*_nBins_pt_2,0.);
736 __n2_12_vsEtaPhi = getFloatArray(_nBins_etaPhi_12, 0.);
737 __s2ptpt_12_vsEtaPhi = getFloatArray(_nBins_etaPhi_12, 0.);
738 __s2PtN_12_vsEtaPhi = getFloatArray(_nBins_etaPhi_12, 0.);
739 __s2NPt_12_vsEtaPhi = getFloatArray(_nBins_etaPhi_12, 0.);
741 // Setup all the labels needed.
745 pair_12_Name = "_12";
762 binCorrName = "binCorr";
763 intBinCorrName = "intBinCorr";
768 s1ptNwName = "sumPtNw";
769 s1DptName = "sumDpt";
770 s2PtPtName = "sumPtPt";
771 s2PtPtNwName = "sumPtPtNw";
772 s2DptDptName = "sumDptDpt";
773 s2NPtName = "sumNPt";
774 s2NPtNwName = "sumNPtNw";
775 s2PtNName = "sumPtN";
776 s2NPtNwName = "sumNPtNw";
777 s2PtNNwName = "sumPtNNw";
779 ptptName = "avgPtPt";
780 pt1pt1Name = "avgPtavgPt";
782 DptDptName = "avgDptDpt";
783 RDptDptName = "relDptDpt"; // ratio of avgDptDpt by avgPt*avgPt
788 _title_counts = "yield";
794 _title_m4 = "V0Centrality";
795 _title_m5 = "TrkCentrality";
796 _title_m6 = "SpdCentrality";
798 _title_eta_1 = "#eta_{1}";
799 _title_phi_1 = "#varphi_{1} (radian)";
800 _title_etaPhi_1 = "#eta_{1}#times#varphi_{1}";
801 _title_pt_1 = "p_{t,1} (GeV/c)";
802 _title_n_1 = "n_{1}";
803 _title_SumPt_1 = "#Sigma p_{t,1} (GeV/c)";
804 _title_AvgPt_1 = "#LT p_{t,1} #GT (GeV/c)";
805 _title_AvgN_1 = "#LT n_{1} #GT";
806 _title_AvgSumPt_1 = "#LT #Sigma p_{t,1} #GT (GeV/c)";
808 _title_eta_2 = "#eta_{2}";
809 _title_phi_2 = "#varphi_{2} (radian)";
810 _title_etaPhi_2 = "#eta_{2}#times#varphi_{2}";
811 _title_pt_2 = "p_{t,2} (GeV/c)";
812 _title_n_2 = "n_{2}";
813 _title_SumPt_2 = "#Sigma p_{t,1} (GeV/c)";
814 _title_AvgPt_2 = "#LT p_{t,2} #GT (GeV/c)";
815 _title_AvgN_2 = "#LT n_{2} #GT";
816 _title_AvgSumPt_2 = "#LT #Sigma p_{t,2} #GT (GeV/c)";
818 _title_etaPhi_12 = "#eta_{1}#times#varphi_{1}#times#eta_{2}#times#varphi_{2}";
820 _title_AvgN2_12 = "#LT n_{2} #GT";;
821 _title_AvgSumPtPt_12 = "#LT #Sigma p_{t,1}p_{t,2} #GT";;
822 _title_AvgSumPtN_12 = "#LT #Sigma p_{t,1}N #GT";;
823 _title_AvgNSumPt_12 = "#LT N#Sigma p_{t,2} #GT";;
831 vsEtaPhi = "_vsEtaPhi";
832 vsPtVsPt = "_vsPtVsPt";
837 int iZ, iEtaPhi, iPt;
838 int iZ1,iEtaPhi1,iPt1;
842 _correctionWeight_1 = new float[_nBins_vertexZ*_nBins_etaPhi_1*_nBins_pt_1];
844 b = _nBins_etaPhi_1*_nBins_pt_1;
845 for (iZ=0,iZ1=1; iZ<_nBins_vertexZ; iZ++, iZ1++)
847 for (iEtaPhi=0,iEtaPhi1=1; iEtaPhi<_nBins_etaPhi_1; iEtaPhi++, iEtaPhi1++)
849 for (iPt=0,iPt1=1; iPt<_nBins_pt_1; iPt++, iPt1++)
851 _correctionWeight_1[iZ*b+iEtaPhi*a+iPt] = _weight_1->GetBinContent(iZ1,iEtaPhi1,iPt1);
858 AliError("AliAnalysisTaskDptDptCorrelations:: _weight_1 is a null pointer.");
865 _correctionWeight_2 = new float[_nBins_vertexZ*_nBins_etaPhi_2*_nBins_pt_2];
867 b = _nBins_etaPhi_2*_nBins_pt_2;
868 for (iZ=0,iZ1=1; iZ<_nBins_vertexZ; iZ++, iZ1++)
870 for (iEtaPhi=0,iEtaPhi1=1; iEtaPhi<_nBins_etaPhi_2; iEtaPhi++, iEtaPhi1++)
872 for (iPt=0,iPt1=1; iPt<_nBins_pt_2; iPt++, iPt1++)
874 _correctionWeight_2[iZ*b+iEtaPhi*a+iPt] = _weight_2->GetBinContent(iZ1,iEtaPhi1,iPt1);
881 AliError("AliAnalysisTaskDptDptCorrelations:: _weight_1 is a null pointer.");
888 PostData(0,_outputHistoList);
890 cout<< "AliAnalysisTaskDptDptCorrelations::CreateOutputObjects() DONE " << endl;
894 void AliAnalysisTaskDptDptCorrelations::createHistograms()
896 AliInfo(" AliAnalysisTaskDptDptCorrelations::createHistoHistograms() Creating Event Histos");
899 name = "eventAccounting";
901 // bin index : what it is...
902 // 0 : number of event submitted
903 // 1 : number accepted by centrality cut
904 // 2 : number accepted by centrality cut and z cut
905 // 3 : total number of particles that satisfied filter 1
906 // 4 : total number of particles that satisfied filter 2
907 _eventAccounting = createHisto(name,name,10, -0.5, 9.5, "event Code", _title_counts);
909 name = "m0"; _m0 = createHisto(name,name,_nBins_M1, _min_M1, _max_M1, _title_m0, _title_counts);
910 name = "m1"; _m1 = createHisto(name,name,_nBins_M1, _min_M1, _max_M1, _title_m1, _title_counts);
911 name = "m2"; _m2 = createHisto(name,name,_nBins_M2, _min_M2, _max_M2, _title_m2, _title_counts);
912 name = "m3"; _m3 = createHisto(name,name,_nBins_M3, _min_M3, _max_M3, _title_m3, _title_counts);
913 name = "m4"; _m4 = createHisto(name,name,_nBins_M4, _min_M4, _max_M4, _title_m4, _title_counts);
914 name = "m5"; _m5 = createHisto(name,name,_nBins_M5, _min_M5, _max_M5, _title_m5, _title_counts);
915 name = "m6"; _m6 = createHisto(name,name,_nBins_M6, _min_M6, _max_M6, _title_m6, _title_counts);
916 name = "zV"; _vertexZ = createHisto(name,name,_nBins_vertexZ, _min_vertexZ, _max_vertexZ, "z-Vertex (cm)", _title_counts);
918 AliInfo(" AliAnalysisTaskDptDptCorrelations::createHistoHistograms() Creating Part 1 Histos");
920 name = n1Name+part_1_Name+vsPt; _n1_1_vsPt = createHisto(name,name, _nBins_pt_1, _min_pt_1, _max_pt_1, _title_pt_1, _title_AvgN_1);
921 name = n1Name+part_1_Name+vsEtaPhi; _n1_1_vsEtaVsPhi = createHisto(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);
922 name = s1ptName+part_1_Name+vsEtaPhi; _s1pt_1_vsEtaVsPhi = createHisto(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);
923 name = n1Name+part_1_Name+vsZ+vsEtaPhi+vsPt; _n1_1_vsZVsEtaVsPhiVsPt = createHisto(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);
924 name = n1Name+part_1_Name+vsM; _n1_1_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN_1);
925 name = s1ptName+part_1_Name+vsM; _s1pt_1_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPt_1);
926 name = n1NwName+part_1_Name+vsM; _n1Nw_1_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN_1);
927 name = s1ptNwName+part_1_Name+vsM; _s1ptNw_1_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPt_1);
928 name = "dedxVsP_1"; _dedxVsP_1 = createHisto(name,name,400,-2.,2.,120,0.,120.,"p (GeV/c)", "dedx", "counts");
929 name = "corrDedxVsP_1"; _corrDedxVsP_1 = createHisto(name,name,400,-2.,2.,120,0.,120.,"p (GeV/c)", "dedx", "counts");
930 name = "betaVsP_1"; _betaVsP_1 = createHisto(name,name,400,-2.,2.,120,0.5,1.1,"p (GeV/c)", "beta", "counts");
932 AliInfo(" AliAnalysisTaskDptDptCorrelations::createHistoHistograms() Creating Part 2 Histos");
934 name = n1Name+part_2_Name+vsPt; _n1_2_vsPt = createHisto(name,name, _nBins_pt_2, _min_pt_2, _max_pt_2, _title_pt_2, _title_AvgN_2);
935 name = n1Name+part_2_Name+vsEtaPhi; _n1_2_vsEtaVsPhi = createHisto(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);
936 name = s1ptName+part_2_Name+vsEtaPhi; _s1pt_2_vsEtaVsPhi = createHisto(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);
937 name = n1Name+part_2_Name+vsZ+vsEtaPhi+vsPt; _n1_2_vsZVsEtaVsPhiVsPt = createHisto(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);
938 name = n1Name+part_2_Name + vsM; _n1_2_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN_2);
939 name = s1ptName+part_2_Name + vsM; _s1pt_2_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPt_2);
940 name = n1NwName+part_2_Name+vsM; _n1Nw_2_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN_1);
941 name = s1ptNwName+part_2_Name+vsM; _s1ptNw_2_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPt_1);
942 name = "dedxVsP_2"; _dedxVsP_2 = createHisto(name,name,400,-2.,2.,120,0.,120.,"p (GeV/c)", "dedx", "counts");
943 name = "corrDedxVsP_2"; _corrDedxVsP_2 = createHisto(name,name,400,-2.,2.,120,0.,120.,"p (GeV/c)", "dedx", "counts");
944 name = "betaVsP_2"; _betaVsP_2 = createHisto(name,name,400,-2.,2.,120,0.5,1.1,"p (GeV/c)", "beta", "counts");
948 AliInfo(" AliAnalysisTaskDptDptCorrelations::createHistoHistograms() Creating Pair Histos");
950 name = n2Name+pair_12_Name+vsEtaPhi; _n2_12_vsEtaPhi = createHisto(name,name, _nBins_etaPhi_12, 0., double(_nBins_etaPhi_12), _title_etaPhi_12, _title_AvgN2_12);
951 name = n2Name+pair_12_Name+vsPtVsPt; _n2_12_vsPtVsPt = createHisto(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);
952 name = s2PtPtName+pair_12_Name + vsEtaPhi; _s2PtPt_12_vsEtaPhi = createHisto(name,name, _nBins_etaPhi_12, 0., double(_nBins_etaPhi_12), _title_etaPhi_12, _title_AvgSumPtPt_12);
953 name = s2PtNName+pair_12_Name + vsEtaPhi; _s2PtN_12_vsEtaPhi = createHisto(name,name, _nBins_etaPhi_12, 0., double(_nBins_etaPhi_12), _title_etaPhi_12, _title_AvgSumPtN_12);
954 name = s2NPtName+pair_12_Name + vsEtaPhi; _s2NPt_12_vsEtaPhi = createHisto(name,name, _nBins_etaPhi_12, 0., double(_nBins_etaPhi_12), _title_etaPhi_12, _title_AvgNSumPt_12);
956 name = n2Name+pair_12_Name + vsM; _n2_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN2_12);
957 name = s2PtPtName+pair_12_Name + vsM; _s2PtPt_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPtPt_12);
958 name = s2PtNName+pair_12_Name + vsM; _s2PtN_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPtN_12);
959 name = s2NPtName+pair_12_Name + vsM; _s2NPt_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgNSumPt_12);
961 name = n2NwName+pair_12_Name + vsM; _n2Nw_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgN2_12);
962 name = s2PtPtNwName+pair_12_Name + vsM; _s2PtPtNw_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPtPt_12);
963 name = s2PtNNwName+pair_12_Name + vsM; _s2PtNNw_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgSumPtN_12);
964 name = s2NPtNwName+pair_12_Name + vsM; _s2NPtNw_12_vsM = createProfile(name,name, _nBins_M4, _min_M4, _max_M4, _title_m4, _title_AvgNSumPt_12);
966 name = "mInv"; _invMass = createHisto(name,name, 500, 0., 1.000, "M_{inv}","counts");
967 name = "mInvElec"; _invMassElec = createHisto(name,name, 500, 0., 1.000, "M_{inv}","counts");
970 AliInfo(" AliAnalysisTaskDptDptCorrelations::createHistoHistograms() All Done");
972 //-----------------------//
974 void AliAnalysisTaskDptDptCorrelations::finalizeHistograms()
977 AliInfo("AliAnalysisTaskDptDptCorrelations::finalizeHistograms() starting");
978 AliInfo(Form("CorrelationAnalyzers::finalizeHistograms() _eventCount : %d",int(_eventCount)));
981 fillHistoWithArray(_n1_1_vsPt, __n1_1_vsPt, _nBins_pt_1);
982 fillHistoWithArray(_n1_1_vsEtaVsPhi, __n1_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
983 fillHistoWithArray(_s1pt_1_vsEtaVsPhi, __s1pt_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
984 fillHistoWithArray(_n1_1_vsZVsEtaVsPhiVsPt, __n1_1_vsZEtaPhiPt, _nBins_vertexZ, _nBins_etaPhi_1, _nBins_pt_1);
986 fillHistoWithArray(_n1_2_vsPt, __n1_1_vsPt, _nBins_pt_1);
987 fillHistoWithArray(_n1_2_vsEtaVsPhi, __n1_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
988 fillHistoWithArray(_s1pt_2_vsEtaVsPhi, __s1pt_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
989 fillHistoWithArray(_n1_2_vsZVsEtaVsPhiVsPt, __n1_1_vsZEtaPhiPt, _nBins_vertexZ, _nBins_etaPhi_1, _nBins_pt_1);
993 fillHistoWithArray(_n1_1_vsPt, __n1_1_vsPt, _nBins_pt_1);
994 fillHistoWithArray(_n1_1_vsEtaVsPhi, __n1_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
995 fillHistoWithArray(_s1pt_1_vsEtaVsPhi, __s1pt_1_vsEtaPhi, _nBins_eta_1, _nBins_phi_1);
996 fillHistoWithArray(_n1_1_vsZVsEtaVsPhiVsPt, __n1_1_vsZEtaPhiPt, _nBins_vertexZ, _nBins_etaPhi_1, _nBins_pt_1);
998 fillHistoWithArray(_n1_2_vsPt, __n1_2_vsPt, _nBins_pt_2);
999 fillHistoWithArray(_n1_2_vsEtaVsPhi, __n1_2_vsEtaPhi, _nBins_eta_2, _nBins_phi_2);
1000 fillHistoWithArray(_s1pt_2_vsEtaVsPhi, __s1pt_2_vsEtaPhi, _nBins_eta_2, _nBins_phi_2);
1001 fillHistoWithArray(_n1_2_vsZVsEtaVsPhiVsPt, __n1_2_vsZEtaPhiPt, _nBins_vertexZ, _nBins_etaPhi_2, _nBins_pt_2);
1005 fillHistoWithArray(_n2_12_vsEtaPhi, __n2_12_vsEtaPhi, _nBins_etaPhi_12);
1006 fillHistoWithArray(_s2PtPt_12_vsEtaPhi, __s2ptpt_12_vsEtaPhi, _nBins_etaPhi_12);
1007 fillHistoWithArray(_s2PtN_12_vsEtaPhi, __s2PtN_12_vsEtaPhi, _nBins_etaPhi_12);
1008 fillHistoWithArray(_s2NPt_12_vsEtaPhi, __s2NPt_12_vsEtaPhi, _nBins_etaPhi_12);
1009 fillHistoWithArray(_n2_12_vsPtVsPt, __n2_12_vsPtPt, _nBins_pt_1, _nBins_pt_2);
1012 AliInfo("AliAnalysisTaskDptDptCorrelations::finalizeHistograms() Done ");
1017 void AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option)
1021 int iPhi, iEta, iEtaPhi, iPt, charge;
1022 float q, p, phi, pt, eta, corr, dedx, px, py, pz;
1024 int id_1, q_1, iEtaPhi_1, iPt_1;
1025 float pt_1, px_1, py_1, pz_1, corr_1, dedx_1;
1026 int id_2, q_2, iEtaPhi_2, iPt_2;
1027 float pt_2, px_2, py_2, pz_2, corr_2, dedx_2;
1029 int iVertex, iVertexP1, iVertexP2;
1031 float massElecSq = 2.5e-7;
1034 const AliAODVertex* vertex;
1038 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - Starting." << endl;
1040 // count all events looked at here
1042 if (!_eventAccounting)
1043 cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - !_eventAccounting" << endl;
1044 _eventAccounting->Fill(0);// count all calls to this function
1046 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 1" << endl;
1048 //Get pointer to current event
1049 fESDEvent = dynamic_cast<AliESDEvent*> (InputEvent());
1050 fAODEvent = dynamic_cast<AliAODEvent*> (InputEvent());
1052 ////cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 2" << endl;
1054 if(!fAODEvent && !fESDEvent)
1056 AliError("AliAnalysisTaskDptDptCorrelations::Exec(Option_t *option) !fAODEvent && !fESDEvent ");;
1060 _eventAccounting->Fill(1);// count all calls to this function with a valid pointer
1062 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 3" << endl;
1064 //reset single particle counters
1066 __n1_1 = __n1_2 = __s1pt_1 = __s1pt_2 = __n1Nw_1 = __n1Nw_2 = __s1ptNw_1 = __s1ptNw_2 = 0;
1068 float v0Centr = -999.;
1069 float trkCentr = -999.;
1070 float spdCentr = -999.;
1072 float vertexX = -999;
1073 float vertexY = -999;
1074 float vertexZ = -999;
1075 float vertexXY = -999;
1076 //float dcaX = -999;
1077 //float dcaY = -999;
1080 float centrality = -999;
1082 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 4" << endl;
1086 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 5" << endl;
1089 AliCentrality* centralityObject = fAODEvent->GetHeader()->GetCentralityP();
1090 if (centralityObject)
1092 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 6" << endl;
1094 v0Centr = centralityObject->GetCentralityPercentile("V0M");
1095 trkCentr = centralityObject->GetCentralityPercentile("TRK");
1096 spdCentr = centralityObject->GetCentralityPercentile("CL1");
1097 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 7" << endl;
1100 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 8" << endl;
1102 _nTracks = fAODEvent->GetNTracks();
1110 _field = fAODEvent->GetMagneticField();
1112 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - _field:" << _field << endl;
1115 switch (_centralityMethod)
1117 case 0: centrality = _mult0; break;
1118 case 1: centrality = _mult1; break;
1119 case 2: centrality = _mult2; break;
1120 case 3: centrality = _mult3; break;
1121 case 4: centrality = _mult4; break;
1122 case 5: centrality = _mult5; break;
1123 case 6: centrality = _mult6; break;
1126 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 10" << endl;
1128 //filter on centrality
1129 if ( centrality < _centralityMin ||
1130 centrality > _centralityMax)
1132 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 11" << endl;
1134 // we dont analyze this event here...
1137 _eventAccounting->Fill(2);// count all events with right centrality
1138 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 12" << endl;
1140 // filter on z and xy vertex
1141 vertex = (AliAODVertex*) fAODEvent->GetPrimaryVertexSPD();
1142 if (!vertex || vertex->GetNContributors()<1)
1146 cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - No valid vertex object or poor vertex" << endl;
1150 vertexX = vertex->GetX();
1151 vertexY = vertex->GetY();
1152 vertexZ = vertex->GetZ();
1153 vertexXY = sqrt(vertexX*vertexX+vertexY*vertexY);
1155 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 13" << endl;
1157 //cout << "vertexZ : " << vertexZ << endl;
1158 //cout << "vertexXY: " << vertexXY << endl;
1159 //cout << "_vertexZMin: " << _vertexZMin << endl;
1160 //cout << "_vertexZMax: " << _vertexZMax << endl;
1161 //cout << "_vertexXYMin: " << _vertexXYMin << endl;
1162 //cout << "_vertexXYMax: " << _vertexXYMax << endl;
1165 vertexZ < _vertexZMin ||
1166 vertexZ > _vertexZMax ||
1167 vertexXY < _vertexXYMin ||
1168 vertexXY > _vertexXYMax)
1172 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 14" << endl;
1174 iVertex = int((vertexZ-_min_vertexZ)/_width_vertexZ);
1175 iVertexP1 = iVertex*_nBins_etaPhiPt_1;
1176 iVertexP2 = iVertex*_nBins_etaPhiPt_2;
1177 if (iVertex<0 || iVertex>=_nBins_vertexZ)
1179 AliError("AliAnalysisTaskDptDptCorrelations::Exec(Option_t *option) iVertex<0 || iVertex>=_nBins_vertexZ ");
1182 _eventAccounting->Fill(3);// count all calls to this function with a valid pointer
1183 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 15" << endl;
1186 // loop over all particles for singles
1187 //debug() << "_nTracks:"<< _nTracks << endl;
1188 for (int iTrack=0; iTrack< _nTracks; iTrack++)
1190 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - 16 iTrack:" << iTrack << endl;
1192 AliAODTrack * t = (AliAODTrack *) fAODEvent->GetTrack(iTrack);
1195 AliError(Form("AliAnalysisTaskDptDptCorrelations::Exec(Option_t *option) No track ofr iTrack=%d", iTrack));
1208 dedx = t->GetTPCsignal();
1209 nClus = t->GetTPCNcls();
1210 bitOK = t->TestFilterBit(_trackFilterBit);
1212 //cout << "_trackFilterBit:" << _trackFilterBit << " Track returns:" << bitOK << endl;
1213 //cout << " q:" << q << " _requestedCharge_1:" << _requestedCharge_1 << endl;
1214 //cout << " pt:" << pt << " _min_pt_1:" << _min_pt_1 << " _max_pt_1:" << _max_pt_1<< endl;
1215 //cout << " phi:" << phi << endl;
1216 //cout << " eta:" << eta << " _min_eta_1:" << _min_eta_1 << " _max_eta_1:" << _max_eta_1<< endl;
1217 //cout << " dedx:" << dedx << " _dedxMin:" << _dedxMin << " _dedxMax:" << _dedxMax << endl;
1218 //cout << "nclus:" << nClus<< " _nClusterMin:" << _nClusterMin << endl;
1220 _requestedCharge_1 == charge &&
1223 eta >= _min_eta_1 &&
1227 nClus >= _nClusterMin)
1229 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - check vertex for 1:" << endl;
1230 // Get the dca information
1231 if (t->PropagateToDCA(vertex, _field, 100., b, bCov) )
1241 //cout << "1 dcaZ:" << dcaZ << " _dcaZMin:" << _dcaZMin << " _dcaZMax:" << _dcaZMax << endl;
1242 //cout << "1 dcaXY:" << dcaXY << " _dcaXYMin:" << _dcaXYMin << " _dcaXYMax:" << _dcaXYMax << endl;
1244 // skip track if DCA too large
1245 if (dcaZ >= _dcaZMin &&
1247 dcaXY >= _dcaXYMin &&
1249 continue; //track does not have a valid DCA
1250 //cout << "keep track:" << endl;
1252 iPhi = int( phi/_width_phi_1);
1253 ////cout << " AliAnalysisTaskDptDptCorrelations::analyze(Event * event) -1- iTrack:" << iTrack<< endl<< "pt:" << pt << " phi:" << phi << " eta:" << eta << endl;
1254 if (iPhi<0 || iPhi>=_nBins_phi_1 )
1256 AliWarning("AliAnalysisTaskDptDptCorrelations::analyze() iPhi<0 || iPhi>=_nBins_phi_1");
1260 iEta = int((eta-_min_eta_1)/_width_eta_1);
1261 if (iEta<0 || iEta>=_nBins_eta_1)
1263 AliWarning(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) Mismatched iEta: %d", iEta));
1266 iPt = int((pt -_min_pt_1 )/_width_pt_1 );
1267 if (iPt<0 || iPt >=_nBins_pt_1)
1269 AliWarning(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) Mismatched iPt: %d",iPt));
1272 iEtaPhi = iEta*_nBins_phi_1+iPhi;
1273 iZEtaPhiPt = iVertexP1 + iEtaPhi*_nBins_pt_1 + iPt;
1275 if (_correctionWeight_1)
1276 corr = _correctionWeight_1[iZEtaPhiPt];
1279 if (iZEtaPhiPt<0 || iZEtaPhiPt>=_nBins_zEtaPhiPt_1)
1281 AliWarning("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) iZEtaPhiPt<0 || iZEtaPhiPt>=_nBins_zEtaPhiPt_1");
1284 //cout << "all good; process track:" << endl;
1287 _charge_1[k1] = charge;
1288 _iEtaPhi_1[k1] = iEtaPhi;
1294 _correction_1[k1] = corr;
1296 __n1_1_vsEtaPhi[iEtaPhi] += corr;
1297 __n1_1_vsZEtaPhiPt[iZEtaPhiPt] += corr;
1298 __s1pt_1 += corr*pt;
1299 __s1pt_1_vsEtaPhi[iEtaPhi] += corr*pt;
1300 __n1_1_vsPt[iPt] += corr;
1304 //_betaVsP_1->Fill(p*q,_trackFilter_1->getBeta() );
1305 _dedxVsP_1->Fill(p*q,dedx);
1306 //_corrDedxVsP_1->Fill(p*q,_trackFilter_1->getCorrectedDedx() );
1312 AliError(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) k1 >=arraySize; arraySize: %d",arraySize));
1319 _requestedCharge_2 == charge &&
1322 eta >= _min_eta_2 &&
1326 nClus >= _nClusterMin)
1328 // Get the dca information
1329 //cout << "AliAnalysisTaskDptDptCorrelations::UserExec(Option_t *option) - check vertex for 2:" << endl;
1330 if (t->PropagateToDCA(vertex, _field, 100., b, bCov) )
1340 //cout << "2 dcaZ:" << dcaZ << " _dcaZMin:" << _dcaZMin << " _dcaZMax:" << _dcaZMax << endl;
1341 //cout << "2 dcaXY:" << dcaXY << " _dcaXYMin:" << _dcaXYMin << " _dcaXYMax:" << _dcaXYMax << endl;
1342 // skip track if DCA too large
1343 if (dcaZ >= _dcaZMin &&
1345 dcaXY >= _dcaXYMin &&
1347 continue; //track does not have a valid DCA
1349 iPhi = int( phi/_width_phi_2);
1350 //cout << " AliAnalysisTaskDptDptCorrelations::analyze(Event * event) -1- iTrack:" << iTrack << endl
1351 //<< "pt:" << pt << " phi:" << phi << " eta:" << eta << endl;
1352 if (iPhi<0 || iPhi>=_nBins_phi_2 )
1354 AliWarning("AliAnalysisTaskDptDptCorrelations::analyze() iPhi<0 || iPhi>=_nBins_phi_1");
1358 iEta = int((eta-_min_eta_2)/_width_eta_2);
1359 if (iEta<0 || iEta>=_nBins_eta_2)
1361 AliWarning(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) Mismatched iEta: %d", iEta));
1364 iPt = int((pt -_min_pt_2 )/_width_pt_2 );
1365 if (iPt<0 || iPt >=_nBins_pt_2)
1367 AliWarning(Form("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) Mismatched iPt: %d",iPt));
1371 iEtaPhi = iEta*_nBins_phi_2+iPhi;
1372 iZEtaPhiPt = iVertexP2 + iEtaPhi*_nBins_pt_2 + iPt;
1373 if (iZEtaPhiPt<0 || iZEtaPhiPt>=_nBins_zEtaPhiPt_2)
1375 AliWarning("AliAnalysisTaskDptDptCorrelations::analyze(AliceEvent * event) iZEtaPhiPt<0 || iZEtaPhiPt>=_nBins_zEtaPhiPt_2");
1379 //cout << " iEtaPhi:" << iEtaPhi << " _nBins_etaPhi_1: "<< _nBins_etaPhi_1<< " _nBins_etaPhi_2: "<< _nBins_etaPhi_2<< endl;
1380 //if (_useEbyECorrections) corr = (charge>0) ? _correction_2p[iEtaPhi] : _correction_2m[iEtaPhi]; else
1381 //cout << "_correctionWeight_2:" << _correctionWeight_2 << endl;
1382 if (_correctionWeight_2)
1383 corr = _correctionWeight_2[iZEtaPhiPt];
1386 //dpt = pt - (charge>0) ? _avgPt_vsEtaPhi_2p[iEtaPhi] : _avgPt_vsEtaPhi_2m[iEtaPhi];
1388 //cout << " k2:" << k2 << endl;
1389 //cout << "iZEtaPhiPt: " << iZEtaPhiPt << endl;
1390 //cout << "iEtaPhi:" << iEtaPhi << endl;
1392 //cout << "step 1" << endl;
1393 _charge_2[k2] = charge;
1394 //cout << "step 2" << endl;
1395 _iEtaPhi_2[k2] = iEtaPhi;
1396 //cout << "step 3" << endl;
1398 //cout << "step 4" << endl;
1400 //cout << "step 5" << endl;
1402 //cout << "step 6" << endl;
1404 //cout << "step 7" << endl;
1406 //cout << "step 8" << endl;
1407 _correction_2[k2] = corr;
1408 //cout << "step 9" << endl;
1410 //cout << "step 10" << endl;
1411 __n1_2_vsEtaPhi[iEtaPhi] += corr;
1412 //cout << "step 11" << endl;
1413 __n1_2_vsZEtaPhiPt[iZEtaPhiPt] += corr;
1414 //cout << "step 12" << endl;
1415 __s1pt_2 += corr*pt;
1416 //cout << "step 13" << endl;
1417 __s1pt_2_vsEtaPhi[iEtaPhi] += corr*pt;
1418 //cout << "step 14" << endl;
1419 __n1_2_vsPt[iPt] += corr;
1420 //cout << "step 15" << endl;
1425 //cout << " data stored:" << endl;
1427 //_betaVsP_2->Fill(p*q,_trackFilter_2->getBeta() );
1429 //cout << "_dedxVsP_2 does not exist...." << endl;
1432 //cout << " fill histo _dedxVsP_2" << endl;
1434 _dedxVsP_2->Fill(p*q,dedx);
1435 //_corrDedxVsP_2->Fill(p*q,_trackFilter_2->getCorrectedDedx() );
1437 //cout << " k2 incremented:" << endl;
1440 AliWarning(Form("-W- k2 >=arraySize; arraySize: %d",arraySize));
1445 //cout << "done with track" << endl;
1453 //AliCentrality* centrality = esdEvent->GetCentrality();
1454 //Float_t centV0 = centrality->GetCentralityPercentile("V0M");
1455 //Float_t centTrk = centrality->GetCentralityPercentile("TRK");
1456 //Float_t centSPD = centrality->GetCentralityPercentile("CL1");
1459 //cout << "Filling histograms now" << endl;
1467 _vertexZ->Fill(vertexZ);
1468 _n1_1_vsM->Fill(_mult4, __n1_1);
1469 _s1pt_1_vsM->Fill(_mult4, __s1pt_1);
1470 _n1Nw_1_vsM->Fill(_mult4, __n1Nw_1);
1471 _s1ptNw_1_vsM->Fill(_mult4, __s1ptNw_1);
1474 _n1_2_vsM->Fill(_mult4, __n1_1);
1475 _s1pt_2_vsM->Fill(_mult4, __s1pt_1);
1476 _n1Nw_2_vsM->Fill(_mult4, __n1Nw_1);
1477 _s1ptNw_2_vsM->Fill(_mult4,__s1ptNw_1);
1481 _n1_2_vsM->Fill(_mult4, __n1_2);
1482 _s1pt_2_vsM->Fill(_mult4, __s1pt_2);
1483 _n1Nw_2_vsM->Fill(_mult4, __n1Nw_2);
1484 _s1ptNw_2_vsM->Fill(_mult4, __s1ptNw_2);
1487 //if singels only selected, do not fill pair histograms.
1488 if (_singlesOnly) return;
1490 // reset pair counters
1491 __n2_12 = __s2ptpt_12 = __s2NPt_12 = __s2PtN_12 = 0;
1492 __n2Nw_12 = __s2ptptNw_12 = __s2NPtNw_12 = __s2PtNNw_12 = 0;
1494 //info() <<" singles done" << endl;
1495 if (_sameFilter) // filter 1 and 2 are the same -- only do pairs i<j
1499 for (int i1=0; i1<k1; i1++)
1501 ////cout << " i1:" << i1 << endl;
1502 id_1 = _id_1[i1]; ////cout << " id_1:" << id_1 << endl;
1503 q_1 = _charge_1[i1]; ////cout << " q_1:" << q_1 << endl;
1504 iEtaPhi_1 = _iEtaPhi_1[i1]; ////cout << " iEtaPhi_1:" << iEtaPhi_1 << endl;
1505 iPt_1 = _iPt_1[i1]; ////cout << " iPt_1:" << iPt_1 << endl;
1506 corr_1 = _correction_1[i1]; ////cout << " corr_1:" << corr_1 << endl;
1507 pt_1 = _pt_1[i1]; ////cout << " pt_1:" << pt_1 << endl;
1508 dedx_1 = _dedx_1[i1]; ////cout << " dedx_1:" << dedx_1 << endl;
1510 for (int i2=i1+1; i2<k1; i2++)
1512 ////cout << " i2:" << i2 << endl;
1513 id_2 = _id_1[i2]; ////cout << " id_2:" << id_2 << endl;
1516 q_2 = _charge_1[i2]; ////cout << " q_1:" << q_1 << endl;
1517 iEtaPhi_2 = _iEtaPhi_1[i2]; ////cout << " iEtaPhi_1:" << iEtaPhi_1 << endl;
1518 iPt_2 = _iPt_1[i2]; ////cout << " iPt_1:" << iPt_1 << endl;
1519 corr_2 = _correction_1[i2]; ////cout << " corr_1:" << corr_1 << endl;
1520 pt_2 = _pt_1[i2]; ////cout << " pt_1:" << pt_1 << endl;
1521 dedx_2 = _dedx_1[i2]; ////cout << " dedx_2:" << dedx_2 << endl;
1522 corr = corr_1*corr_2;
1523 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))
1525 ij = iEtaPhi_1*_nBins_etaPhi_1 + iEtaPhi_2; ////cout << " ij:" << ij<< endl;
1527 else // swap particles
1529 ij = iEtaPhi_2*_nBins_etaPhi_1 + iEtaPhi_1; ////cout << " ij:" << ij<< endl;
1533 __n2_12_vsEtaPhi[ij] += corr;
1535 __s2ptpt_12 += corr*ptpt;
1536 __s2PtN_12 += corr*pt_1;
1537 __s2NPt_12 += corr*pt_2;
1538 __s2ptpt_12_vsEtaPhi[ij] += corr*ptpt;
1539 __s2PtN_12_vsEtaPhi[ij] += corr*pt_1;
1540 __s2NPt_12_vsEtaPhi[ij] += corr*pt_2;
1541 __n2_12_vsPtPt[iPt_1*_nBins_pt_2 + iPt_2] += corr;
1544 __s2ptptNw_12 += ptpt;
1545 __s2PtNNw_12 += pt_1;
1546 __s2NPtNw_12 += pt_2;
1554 for (int i1=0; i1<k1; i1++)
1556 ////cout << " i1:" << i1 << endl;
1557 id_1 = _id_1[i1]; ////cout << " id_1:" << id_1 << endl;
1558 q_1 = _charge_1[i1]; ////cout << " q_1:" << q_1 << endl;
1559 iEtaPhi_1 = _iEtaPhi_1[i1]; ////cout << " iEtaPhi_1:" << iEtaPhi_1 << endl;
1560 iPt_1 = _iPt_1[i1]; ////cout << " iPt_1:" << iPt_1 << endl;
1561 corr_1 = _correction_1[i1]; ////cout << " corr_1:" << corr_1 << endl;
1562 pt_1 = _pt_1[i1]; ////cout << " pt_1:" << pt_1 << endl;
1563 dedx_1 = _dedx_1[i1]; ////cout << " dedx_1:" << dedx_1 << endl;
1565 for (int i2=i1+1; i2<k1; i2++)
1567 ////cout << " i2:" << i2 << endl;
1568 id_2 = _id_1[i2]; ////cout << " id_2:" << id_2 << endl;
1571 q_2 = _charge_1[i2]; ////cout << " q_2:" << q_2 << endl;
1572 iEtaPhi_2 = _iEtaPhi_1[i2]; ////cout << " iEtaPhi_2:" << iEtaPhi_2 << endl;
1573 iPt_2 = _iPt_1[i2]; ////cout << " iPt_2:" << iPt_2 << endl;
1574 corr_2 = _correction_1[i2]; ////cout << " corr_2:" << corr_2 << endl;
1575 pt_2 = _pt_1[i2]; ////cout << " pt_2:" << pt_2 << endl;
1576 dedx_2 = _dedx_1[i2]; ////cout << " dedx_2:" << dedx_2 << endl;
1577 corr = corr_1*corr_2;
1578 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))
1580 ij = iEtaPhi_1*_nBins_etaPhi_1 + iEtaPhi_2; ////cout << " ij:" << ij<< endl;
1582 else // swap particles
1584 ij = iEtaPhi_2*_nBins_etaPhi_1 + iEtaPhi_1; ////cout << " ij:" << ij<< endl;
1588 __n2_12_vsEtaPhi[ij] += corr;
1590 __s2ptpt_12 += corr*ptpt;
1591 __s2PtN_12 += corr*pt_1;
1592 __s2NPt_12 += corr*pt_2;
1593 __s2ptpt_12_vsEtaPhi[ij] += corr*ptpt;
1594 __s2PtN_12_vsEtaPhi[ij] += corr*pt_1;
1595 __s2NPt_12_vsEtaPhi[ij] += corr*pt_2;
1596 __n2_12_vsPtPt[iPt_1*_nBins_pt_2 + iPt_2] += corr;
1599 __s2ptptNw_12 += ptpt;
1600 __s2PtNNw_12 += pt_1;
1601 __s2NPtNw_12 += pt_2;
1610 else // filter 1 and 2 are different -- must do all particle pairs...
1612 for (int i1=0; i1<k1; i1++)
1614 ////cout << " i1:" << i1 << endl;
1615 id_1 = _id_1[i1]; ////cout << " id_1:" << id_1 << endl;
1616 q_1 = _charge_1[i1]; ////cout << " q_1:" << q_1 << endl;
1617 iEtaPhi_1 = _iEtaPhi_1[i1]; ////cout << " iEtaPhi_1:" << iEtaPhi_1 << endl;
1618 iPt_1 = _iPt_1[i1]; ////cout << " iPt_1:" << iPt_1 << endl;
1619 corr_1 = _correction_1[i1]; ////cout << " corr_1:" << corr_1 << endl;
1620 pt_1 = _pt_1[i1]; ////cout << " pt_1:" << pt_1 << endl;
1621 px_1 = _px_1[i1]; ////cout << " px_1:" << px_1 << endl;
1622 py_1 = _py_1[i1]; ////cout << " py_1:" << py_1 << endl;
1623 pz_1 = _pz_1[i1]; ////cout << " pz_1:" << pz_1 << endl;
1624 dedx_1 = _dedx_1[i1]; ////cout << " dedx_1:" << dedx_1 << endl;
1627 for (int i2=0; i2<k2; i2++)
1629 ////cout << " i2:" << i2 << endl;
1630 id_2 = _id_2[i2]; ////cout << " id_2:" << id_2 << endl;
1631 if (id_1!=id_2) // exclude auto correlation
1633 q_2 = _charge_2[i2]; ////cout << " q_2:" << q_2 << endl;
1634 iEtaPhi_2 = _iEtaPhi_2[i2]; ////cout << " iEtaPhi_2:" << iEtaPhi_2 << endl;
1635 iPt_2 = _iPt_2[i2]; ////cout << " iPt_2:" << iPt_2 << endl;
1636 corr_2 = _correction_2[i2]; ////cout << " corr_2:" << corr_2 << endl;
1637 pt_2 = _pt_2[i2]; ////cout << " pt_2:" << pt_2 << endl;
1638 px_2 = _px_2[i2]; ////cout << " px_2:" << px_2 << endl;
1639 py_2 = _py_2[i2]; ////cout << " py_2:" << py_2 << endl;
1640 pz_2 = _pz_2[i2]; ////cout << " pz_2:" << pz_2 << endl;
1641 dedx_2 = _dedx_2[i2]; ////cout << " dedx_2:" << dedx_2 << endl;
1642 if (_rejectPairConversion)
1644 float e1Sq = massElecSq + pt_1*pt_1 + pz_1*pz_1;
1645 float e2Sq = massElecSq + pt_2*pt_2 + pz_2*pz_2;
1646 float mInvSq = 2*(massElecSq + sqrt(e1Sq*e2Sq) - px_1*px_2 - py_1*py_2 - pz_1*pz_2 );
1647 float mInv = sqrt(mInvSq);
1648 _invMass->Fill(mInv);
1651 if (dedx_1>75. && dedx_2>75.)
1653 _invMassElec->Fill(mInv);
1654 if (mInv<0.05) continue;
1658 corr = corr_1*corr_2;
1659 ij = iEtaPhi_1*_nBins_etaPhi_1 + iEtaPhi_2; ////cout << " ij:" << ij<< endl;
1661 __n2_12_vsEtaPhi[ij] += corr;
1663 __s2ptpt_12 += corr*ptpt;
1664 __s2PtN_12 += corr*pt_1;
1665 __s2NPt_12 += corr*pt_2;
1666 __s2ptpt_12_vsEtaPhi[ij] += corr*ptpt;
1667 __s2PtN_12_vsEtaPhi[ij] += corr*pt_1;
1668 __s2NPt_12_vsEtaPhi[ij] += corr*pt_2;
1669 __n2_12_vsPtPt[iPt_1*_nBins_pt_2 + iPt_2] += corr;
1671 __s2ptptNw_12 += ptpt;
1672 __s2PtNNw_12 += pt_1;
1673 __s2NPtNw_12 += pt_2;
1679 ////cout << "_mult4:"<< _mult4 << " __s2ptpt_12:" << __s2ptpt_12 << " __s2PtN_12:" << __s2PtN_12 << endl;
1680 _n2_12_vsM->Fill(_mult4, __n2_12);
1681 _s2PtPt_12_vsM->Fill(_mult4, __s2ptpt_12);
1682 _s2PtN_12_vsM->Fill(_mult4, __s2NPt_12);
1683 _s2NPt_12_vsM->Fill(_mult4, __s2PtN_12);
1685 _n2Nw_12_vsM->Fill(_mult4, __n2Nw_12);
1686 _s2PtPtNw_12_vsM->Fill(_mult4, __s2ptptNw_12);
1687 _s2PtNNw_12_vsM->Fill(_mult4, __s2NPtNw_12);
1688 _s2NPtNw_12_vsM->Fill(_mult4, __s2PtNNw_12);
1690 ////cout << "Event Done " << endl;
1691 PostData(0,_outputHistoList);
1695 void AliAnalysisTaskDptDptCorrelations::FinishTaskOutput()
1697 finalizeHistograms();
1698 PostData(0,_outputHistoList);
1701 void AliAnalysisTaskDptDptCorrelations::Terminate(Option_t* )
1708 //===================================================================================================
1709 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH1 * h, float * array, int size)
1712 float v1, ev1, v2, ev2, sum, esum;
1713 for (i=0, i1=1; i<size; ++i,++i1)
1715 v1 = array[i]; ev1 = sqrt(v1);
1716 v2 = h->GetBinContent(i1);
1717 ev2 = h->GetBinError(i1);
1719 esum = sqrt(ev1*ev1+ev2*ev2);
1720 h->SetBinContent(i1,sum);
1721 h->SetBinError(i1,esum);
1725 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH2 * h, float * array, int size1, int size2)
1729 float v1, ev1, v2, ev2, sum, esum;
1730 for (i=0, i1=1; i<size1; ++i,++i1)
1732 for (j=0, j1=1; j<size2; ++j,++j1)
1734 v1 = array[i*size2+j]; ev1 = sqrt(v1);
1735 v2 = h->GetBinContent(i1,j1);
1736 ev2 = h->GetBinError(i1,j1);
1738 esum = sqrt(ev1*ev1+ev2*ev2);
1739 h->SetBinContent(i1,j1,sum);
1740 h->SetBinError(i1,j1,esum);
1745 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH3 * h, float * array, int size1, int size2, int size3)
1750 float v1, ev1, v2, ev2, sum, esum;
1751 int size23 = size2*size3;
1752 for (i=0, i1=1; i<size1; ++i,++i1)
1754 for (j=0, j1=1; j<size2; ++j,++j1)
1756 for (k=0, k1=1; k<size3; ++k,++k1)
1758 v1 = array[i*size23+j*size3+k]; ev1 = sqrt(v1);
1759 v2 = h->GetBinContent(i1,j1,k1);
1760 ev2 = h->GetBinError(i1,j1,k1);
1762 esum = sqrt(ev1*ev1+ev2*ev2);
1763 h->SetBinContent(i1,j1,k1,sum);
1764 h->SetBinError(i1,j1,k1,esum);
1770 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH1 * h, double * array, int size)
1773 double v1, ev1, v2, ev2, sum, esum;
1774 for (i=0, i1=1; i<size; ++i,++i1)
1776 v1 = array[i]; ev1 = sqrt(v1);
1777 v2 = h->GetBinContent(i1);
1778 ev2 = h->GetBinError(i1);
1780 esum = sqrt(ev1*ev1+ev2*ev2);
1781 h->SetBinContent(i1,sum);
1782 h->SetBinError(i1,esum);
1786 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH2 * h, double * array, int size1, int size2)
1790 double v1, ev1, v2, ev2, sum, esum;
1791 for (i=0, i1=1; i<size1; ++i,++i1)
1793 for (j=0, j1=1; j<size2; ++j,++j1)
1795 v1 = array[i*size2+j]; ev1 = sqrt(v1);
1796 v2 = h->GetBinContent(i1,j1);
1797 ev2 = h->GetBinError(i1,j1);
1799 esum = sqrt(ev1*ev1+ev2*ev2);
1800 h->SetBinContent(i1,j1,sum);
1801 h->SetBinError(i1,j1,esum);
1806 void AliAnalysisTaskDptDptCorrelations::fillHistoWithArray(TH3 * h, double * array, int size1, int size2, int size3)
1811 double v1, ev1, v2, ev2, sum, esum;
1812 int size23 = size2*size3;
1813 for (i=0, i1=1; i<size1; ++i,++i1)
1815 for (j=0, j1=1; j<size2; ++j,++j1)
1817 for (k=0, k1=1; k<size3; ++k,++k1)
1819 v1 = array[i*size23+j*size3+k]; ev1 = sqrt(v1);
1820 v2 = h->GetBinContent(i1,j1,k1);
1821 ev2 = h->GetBinError(i1,j1,k1);
1823 esum = sqrt(ev1*ev1+ev2*ev2);
1824 h->SetBinContent(i1,j1,k1,sum);
1825 h->SetBinError(i1,j1,k1,esum);
1831 //________________________________________________________________________
1832 double * AliAnalysisTaskDptDptCorrelations::getDoubleArray(int size, double v)
1834 /// Allocate an array of type double with n values
1835 /// Initialize the array to the given value
1836 double * array = new double [size];
1837 for (int i=0;i<size;++i) array[i]=v;
1841 //________________________________________________________________________
1842 float * AliAnalysisTaskDptDptCorrelations::getFloatArray(int size, float v)
1844 /// Allocate an array of type float with n values
1845 /// Initialize the array to the given value
1846 float * array = new float [size];
1847 for (int i=0;i<size;++i) array[i]=v;
1852 //________________________________________________________________________
1853 TH1D * AliAnalysisTaskDptDptCorrelations::createHisto(const TString & name, const TString & title,
1854 int n, double xMin, double xMax,
1855 const TString & xTitle, const TString & yTitle)
1857 //CreateHisto new 1D historgram
1858 AliInfo(Form("createHisto 1D histo %s nBins: %d xMin: %f xMax: %f",name.Data(),n,xMin,xMax));
1859 TH1D * h = new TH1D(name,title,n,xMin,xMax);
1860 h->GetXaxis()->SetTitle(xTitle);
1861 h->GetYaxis()->SetTitle(yTitle);
1867 //________________________________________________________________________
1868 TH1D * AliAnalysisTaskDptDptCorrelations::createHisto(const TString & name, const TString & title,
1869 int n, double * bins,
1870 const TString & xTitle, const TString & yTitle)
1872 AliInfo(Form("createHisto 1D histo %s with %d non uniform nBins",name.Data(),n));
1873 TH1D * h = new TH1D(name,title,n,bins);
1874 h->GetXaxis()->SetTitle(xTitle);
1875 h->GetYaxis()->SetTitle(yTitle);
1881 //________________________________________________________________________
1882 TH2D * AliAnalysisTaskDptDptCorrelations::createHisto(const TString & name, const TString & title,
1883 int nx, double xMin, double xMax, int ny, double yMin, double yMax,
1884 const TString & xTitle, const TString & yTitle, const TString & zTitle)
1886 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));
1887 TH2D * h = new TH2D(name,title,nx,xMin,xMax,ny,yMin,yMax);
1888 h->GetXaxis()->SetTitle(xTitle);
1889 h->GetYaxis()->SetTitle(yTitle);
1890 h->GetZaxis()->SetTitle(zTitle);
1895 //________________________________________________________________________
1896 TH2D * AliAnalysisTaskDptDptCorrelations::createHisto(const TString & name, const TString & title,
1897 int nx, double* xbins, int ny, double yMin, double yMax,
1898 const TString & xTitle, const TString & yTitle, const TString & zTitle)
1900 AliInfo(Form("createHisto 2D histo %s with %d non uniform nBins",name.Data(),nx));
1902 h = new TH2D(name,title,nx,xbins,ny,yMin,yMax);
1903 h->GetXaxis()->SetTitle(xTitle);
1904 h->GetYaxis()->SetTitle(yTitle);
1905 h->GetZaxis()->SetTitle(zTitle);
1911 //________________________________________________________________________
1912 TH3F * AliAnalysisTaskDptDptCorrelations::createHisto(const TString & name, const TString & title,
1913 int nx, double xMin, double xMax,
1914 int ny, double yMin, double yMax,
1915 int nz, double zMin, double zMax,
1916 const TString & xTitle, const TString & yTitle, const TString & zTitle)
1918 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));
1919 TH3F * h = new TH3F(name,title,nx,xMin,xMax,ny,yMin,yMax,nz,zMin,zMax);
1920 h->GetXaxis()->SetTitle(xTitle);
1921 h->GetYaxis()->SetTitle(yTitle);
1922 h->GetZaxis()->SetTitle(zTitle);
1928 //________________________________________________________________________
1929 TProfile * AliAnalysisTaskDptDptCorrelations::createProfile(const TString & name, const TString & description,
1930 int nx,double xMin,double xMax,
1931 const TString & xTitle, const TString & yTitle)
1933 AliInfo(Form("createHisto 1D profile %s nBins: %d xMin: %f10.4 xMax: %f10.4",name.Data(),nx,xMin,xMax));
1934 TProfile * h = new TProfile(name,description,nx,xMin,xMax);
1935 h->GetXaxis()->SetTitle(xTitle);
1936 h->GetYaxis()->SetTitle(yTitle);
1941 //________________________________________________________________________
1942 TProfile * AliAnalysisTaskDptDptCorrelations::createProfile(const TString & name,const TString & description,
1943 int nx, double* bins,
1944 const TString & xTitle, const TString & yTitle)
1946 AliInfo(Form("createHisto 1D profile %s with %d non uniform bins",name.Data(),nx));
1947 TProfile * h = new TProfile(name,description,nx,bins);
1948 h->GetXaxis()->SetTitle(xTitle);
1949 h->GetYaxis()->SetTitle(yTitle);
1955 void AliAnalysisTaskDptDptCorrelations::addToList(TH1 *h)
1957 if (_outputHistoList)
1959 _outputHistoList->Add(h);
1962 cout << "addToList(TH1 *h) _outputHistoList is null!!!!! Shoudl abort ship" << endl;