,fJetPtSlices(copy.fJetPtSlices)
,fNJets(copy.fNJets)
,fNJetsBgr(copy.fNJetsBgr)
- ,fNHistoBinsSinglePt(fNHistoBinsSinglePt)
- ,fHistoBinsSinglePt(fHistoBinsSinglePt)
+ ,fNHistoBinsSinglePt(copy.fNHistoBinsSinglePt)
+ ,fHistoBinsSinglePt(copy.fHistoBinsSinglePt)
,fNHistoBinsPt(copy.fNHistoBinsPt)
,fNHistoBinsZ(copy.fNHistoBinsZ)
,fNHistoBinsXi(copy.fNHistoBinsXi)
,fNCorrectionLevelsSinglePt(copy.fNCorrectionLevelsSinglePt)
,fCorrSinglePt(copy.fCorrSinglePt)
,fh1FFXiShift(copy.fh1FFXiShift)
- ,fh1EffSinglePt(fh1EffSinglePt)
+ ,fh1EffSinglePt(copy.fh1EffSinglePt)
,fh1EffPt(copy.fh1EffPt)
,fh1EffZ(copy.fh1EffZ)
,fh1EffXi(copy.fh1EffXi)
,fCorrLabel(copy.fCorrLabel)
{
// copy constructor
+ for(Int_t i=0; i<copy.fArraySize; i++){
+ fh1CorrFFTrackPt[i] = copy.fh1CorrFFTrackPt[i];
+ fh1CorrFFZ[i] = copy.fh1CorrFFZ[i];
+ fh1CorrFFXi[i] = copy.fh1CorrFFXi[i];
+ }
}
-
//_______________________________________________________________________________________________________________________________________________________________
AliFragmentationFunctionCorrections::AliFragFuncCorrHistos& AliFragmentationFunctionCorrections::AliFragFuncCorrHistos::operator=(const AliFragmentationFunctionCorrections::AliFragFuncCorrHistos& o)
{
if(this!=&o){
TObject::operator=(o);
fArraySize = o.fArraySize;
- fh1CorrFFTrackPt = o.fh1CorrFFTrackPt;
- fh1CorrFFZ = o.fh1CorrFFZ;
- fh1CorrFFXi = o.fh1CorrFFXi;
fCorrLabel = o.fCorrLabel;
+
+ for(Int_t i=0; i<o.fArraySize; i++){
+ fh1CorrFFTrackPt[i] = o.fh1CorrFFTrackPt[i];
+ fh1CorrFFZ[i] = o.fh1CorrFFZ[i];
+ fh1CorrFFXi[i] = o.fh1CorrFFXi[i];
+ }
}
return *this;
for(Int_t i=0; i<fNJetPtSlices; i++){
TH1F* hist = 0;
- if(type == kFlagPt) hist = fCorrFF[fNCorrectionLevels-2]->GetTrackPt(i); // level -2: before unfolding, level -1: unfolded
- if(type == kFlagZ) hist = fCorrFF[fNCorrectionLevels-2]->GetZ(i); // level -2: before unfolding, level -1: unfolded
- if(type == kFlagXi) hist = fCorrFF[fNCorrectionLevels-2]->GetXi(i); // level -2: before unfolding, level -1: unfolded
+ if(type == kFlagPt) hist = fCorrFF[fNCorrectionLevels-2]->GetTrackPt(i); // level -2: before unfolding, level -1: unfolded
+ else if(type == kFlagZ) hist = fCorrFF[fNCorrectionLevels-2]->GetZ(i); // level -2: before unfolding, level -1: unfolded
+ else if(type == kFlagXi) hist = fCorrFF[fNCorrectionLevels-2]->GetXi(i); // level -2: before unfolding, level -1: unfolded
+ else{
+ Printf("%s%d unknown type",(char*)__FILE__,__LINE__);
+ return;
+ }
THnSparse* hnResponse = 0;
if(type == kFlagPt) hnResponse = fhnResponsePt[i];
- if(type == kFlagZ) hnResponse = fhnResponseZ[i];
- if(type == kFlagXi) hnResponse = fhnResponseXi[i];
+ else if(type == kFlagZ) hnResponse = fhnResponseZ[i];
+ else if(type == kFlagXi) hnResponse = fhnResponseXi[i];
+ else{
+ Printf("%s%d unknown type",(char*)__FILE__,__LINE__);
+ return;
+ }
+
TH1F* hPrior = 0;
if(type == kFlagPt && fh1FFTrackPtPrior[i] && ((TString(fh1FFTrackPtPrior[i]->GetName())).Length() > 0) ) hPrior = fh1FFTrackPtPrior[i];
- if(type == kFlagZ && fh1FFZPrior[i] && ((TString(fh1FFZPrior[i]->GetName())).Length() > 0) ) hPrior = fh1FFZPrior[i];
- if(type == kFlagXi && fh1FFXiPrior[i] && ((TString(fh1FFXiPrior[i]->GetName())).Length() > 0) ) hPrior = fh1FFXiPrior[i];
+ else if(type == kFlagZ && fh1FFZPrior[i] && ((TString(fh1FFZPrior[i]->GetName())).Length() > 0) ) hPrior = fh1FFZPrior[i];
+ else if(type == kFlagXi && fh1FFXiPrior[i] && ((TString(fh1FFXiPrior[i]->GetName())).Length() > 0) ) hPrior = fh1FFXiPrior[i];
+ else{
+ Printf("%s%d unknown type",(char*)__FILE__,__LINE__);
+ return;
+ }
+
TString histNameTHn = hist->GetName();
histNameTHn.ReplaceAll("TH1","THn");
TH1F* hist = 0;
if(type == kFlagPt) hist = fCorrFF[fNCorrectionLevels-1]->GetTrackPt(jetPtSlice);
- if(type == kFlagZ) hist = fCorrFF[fNCorrectionLevels-1]->GetZ(jetPtSlice);
- if(type == kFlagXi) hist = fCorrFF[fNCorrectionLevels-1]->GetXi(jetPtSlice);
- if(type == kFlagSinglePt) hist = fCorrSinglePt[fNCorrectionLevelsSinglePt-1]->GetTrackPt(0);
-
+ else if(type == kFlagZ) hist = fCorrFF[fNCorrectionLevels-1]->GetZ(jetPtSlice);
+ else if(type == kFlagXi) hist = fCorrFF[fNCorrectionLevels-1]->GetXi(jetPtSlice);
+ else if(type == kFlagSinglePt) hist = fCorrSinglePt[fNCorrectionLevelsSinglePt-1]->GetTrackPt(0);
+ else{
+ Printf("%s%d unknown type",(char*)__FILE__,__LINE__);
+ return;
+ }
Double_t binWidthNoRebin = hist->GetBinWidth(1);
***************************************************************************************************/
-
-
-
AliAnalysisTaskFragmentationFunction *AddTaskFragmentationFunction(UInt_t iFlag=1, UInt_t filterMask=32, Int_t eventClass=0){
AliAnalysisTaskFragmentationFunction *ff=0;
// _______________________________________________________________________________________
+AliAnalysisTaskFragmentationFunction *AddTaskFragmentationFunctionAllCent(
+ const char* recJetsBranch,
+ const char* recJetsBackBranch,
+ const char* genJetsBranch,
+ const char* jetType,
+ const char* trackType,
+ UInt_t filterMask,
+ Float_t radius,
+ int kBackgroundMode,
+ float PtTrackMin,
+ TString BrOpt="",
+ TString BrOpt2="",
+ Float_t radiusBckg=0.4)
+{
+
+ // adds task with given configuration for all centralities
+
+ AliAnalysisTaskFragmentationFunction *ff=0;
+
+ for(Int_t eventClass=1; eventClass<=4; eventClass++){
+
+ ff = AddTaskFragmentationFunction(recJetsBranch,
+ recJetsBackBranch,
+ genJetsBranch,
+ jetType,
+ trackType,
+ filterMask,
+ radius,
+ kBackgroundMode,
+ PtTrackMin,
+ eventClass,
+ BrOpt,
+ BrOpt2,
+ radiusBckg);
+ }
+
+ return ff;
+}
+
+// _______________________________________________________________________________________
+
AliAnalysisTaskFragmentationFunction *AddTaskFragmentationFunction(
const char* recJetsBranch,
const char* recJetsBackBranch,