fMultiplicityEstimator(kNtrk10),
fRefMult(9.26),
fZvtxCorrectedNtrkEstimator(kFALSE),
- fIsPPData(kFALSE)
+ fIsPPData(kFALSE),
+ fIsPPbData(kFALSE)
{
//
//Default ctor
fMultiplicityEstimator(kNtrk10),
fRefMult(9.26),
fZvtxCorrectedNtrkEstimator(kFALSE),
- fIsPPData(kFALSE)
+ fIsPPData(kFALSE),
+ fIsPPbData(kFALSE)
{
//
// Constructor. Initialization of Inputs and Outputs
fMultiplicityEstimator(c.fMultiplicityEstimator),
fRefMult(c.fRefMult),
fZvtxCorrectedNtrkEstimator(c.fZvtxCorrectedNtrkEstimator),
- fIsPPData(c.fIsPPData)
+ fIsPPData(c.fIsPPData),
+ fIsPPbData(c.fIsPPbData)
{
//
// Copy Constructor
fListProfiles = new TList();
fListProfiles->SetOwner();
- TString period[4]={"LHC10b","LHC10c","LHC10d","LHC10e"};
- for(Int_t i=0; i<4; i++){
+ TString period[4];
+ Int_t nProfiles=4;
+
+ if (fIsPPbData) { //if pPb, use only two estimator histos
+ period[0] = "LHC13b"; period[1] = "LHC13c";
+ nProfiles = 2;
+ } else { // else assume pp (four histos for LHC10)
+ period[0] = "LHC10b"; period[1] = "LHC10c"; period[2] = "LHC10d"; period[3] = "LHC10e";
+ nProfiles = 4;
+ }
+
+ for(Int_t i=0; i<nProfiles; i++){
if(fMultEstimatorAvg[i]){
TProfile* hprof=new TProfile(*fMultEstimatorAvg[i]);
hprof->SetName(Form("ProfileTrkVsZvtx%s\n",period[i].Data()));
//
Int_t runNo = event->GetRunNumber();
- Int_t period = -1; // 0-LHC10b, 1-LHC10c, 2-LHC10d, 3-LHC10e
- if(runNo>114930 && runNo<117223) period = 0;
- if(runNo>119158 && runNo<120830) period = 1;
- if(runNo>122373 && runNo<126438) period = 2;
- if(runNo>127711 && runNo<130841) period = 3;
- if(period<0 || period>3) return 0;
-
+ Int_t period = -1; // pp: 0-LHC10b, 1-LHC10c, 2-LHC10d, 3-LHC10e
+ //pPb: 0-LHC13b, 1-LHC13c
+
+ if (fIsPPbData) { // setting run numbers for LHC13 if pPb
+ if (runNo>195343 && runNo<195484) period = 0;
+ if (runNo>195528 && runNo<195678) period = 1;
+ } else { //else assume pp
+ if(runNo>114930 && runNo<117223) period = 0;
+ if(runNo>119158 && runNo<120830) period = 1;
+ if(runNo>122373 && runNo<126438) period = 2;
+ if(runNo>127711 && runNo<130841) period = 3;
+ if(period<0 || period>3) return 0;
+ }
+
return fMultEstimatorAvg[period];
}
// CORRECTION FRAMEWORK RELATED FUNCTIONS
void SetCFManager(AliCFManager* io) {fCFManager = io;} // global correction manager
AliCFManager * GetCFManager() {return fCFManager;} // get corr manager
-
+
// Setters (and getters) for the config macro
void SetFillFromGenerated(Bool_t flag) {fFillFromGenerated = flag;}
Bool_t GetFillFromGenerated() const {return fFillFromGenerated;}
void SetMultiplicityEstimator(Int_t value){ fMultiplicityEstimator=value; }
Int_t GetMultiplicityEstimator(){ return fMultiplicityEstimator; }
void SetIsPPData(Bool_t flag){ fIsPPData = flag; }
+ void SetIsPPbData(Bool_t flag){ fIsPPbData = flag; }
void SetUseNchTrackletsWeight(Bool_t useWeight = kTRUE) { fUseNchWeight=useWeight; fUseTrackletsWeight=useWeight; }
Bool_t GetUseNchTrackletsWeight() const {return fUseTrackletsWeight;}
if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3];
fMultEstimatorAvg[3]=new TProfile(*hprof);
}
+
+ void SetMultiplVsZProfileLHC13b(TProfile* hprof){
+ if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
+ fMultEstimatorAvg[0]=new TProfile(*hprof);
+ }
+ void SetMultiplVsZProfileLHC13c(TProfile* hprof){
+ if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
+ fMultEstimatorAvg[1]=new TProfile(*hprof);
+ }
+
+
TProfile* GetEstimatorHistogram(const AliVEvent* event);
void SetReferenceMultiplcity(Double_t rmu){fRefMult=rmu;}
Double_t fRefMult; // refrence multiplcity (period b)
Bool_t fZvtxCorrectedNtrkEstimator; // flag to use the z-vtx corrected (if not use uncorrected) multiplicity estimator
Bool_t fIsPPData; // flag for pp data (not checking centrality)
-
- ClassDef(AliCFTaskVertexingHF,18); // class for HF corrections as a function of many variables
+ Bool_t fIsPPbData; // flag for pPb data (used for multiplicity corrections)
+
+ ClassDef(AliCFTaskVertexingHF,19); // class for HF corrections as a function of many variables
};
#endif
return 0x0;
}
}
-
+
+ if(isPPbData) {
+ task->SetIsPPbData(kTRUE);
+ }
+
if(estimatorFilename.EqualTo("") ) {
printf("Estimator file not provided, multiplicity corrected histograms will not be filled\n");
task->SetUseZvtxCorrectedNtrkEstimator(kFALSE);
} else{
- const Char_t* periodNames[4] = {"LHC10b", "LHC10c", "LHC10d", "LHC10e"};
- TProfile* multEstimatorAvg[4];
+
TFile* fileEstimator=TFile::Open(estimatorFilename.Data());
if(!fileEstimator) {
AliFatal("File with multiplicity estimator not found");
return;
}
- for(Int_t ip=0; ip<4; ip++) {
- multEstimatorAvg[ip] = (TProfile*)(fileEstimator->Get(Form("SPDmult10_%s",periodNames[ip]))->Clone(Form("SPDmult10_%s_clone",periodNames[ip])));
- }
+
task->SetUseZvtxCorrectedNtrkEstimator(kTRUE);
- task->SetMultiplVsZProfileLHC10b(multEstimatorAvg[0]);
- task->SetMultiplVsZProfileLHC10c(multEstimatorAvg[1]);
- task->SetMultiplVsZProfileLHC10d(multEstimatorAvg[2]);
- task->SetMultiplVsZProfileLHC10e(multEstimatorAvg[3]);
task->SetReferenceMultiplcity(refMult);
- }
+ if (isPPbData) { //Use LHC13 periods for mult correction if pPb data
+ const Char_t* periodNames[2] = {"LHC13b", "LHC13c"};
+ TProfile* multEstimatorAvg[2];
+ for(Int_t ip=0; ip<2; ip++) {
+ multEstimatorAvg[ip] = (TProfile*)(fileEstimator->Get(Form("SPDmult10_%s",periodNames[ip]))->Clone(Form("SPDmult10_%s_clone",periodNames[ip])));
+ if (!multEstimatorAvg[ip]) {
+ AliFatal(Form("Multiplicity estimator for %s not found! Please check your estimator file",periodNames[ip]));
+ return;
+ }
+ }
+ task->SetMultiplVsZProfileLHC13b(multEstimatorAvg[0]);
+ task->SetMultiplVsZProfileLHC13c(multEstimatorAvg[1]);
+ }
+ else {
+ const Char_t* periodNames[4] = {"LHC10b", "LHC10c", "LHC10d", "LHC10e"}; //else, assume pp (LHC10)
+ TProfile* multEstimatorAvg[4];
+ for(Int_t ip=0; ip<4; ip++) {
+ multEstimatorAvg[ip] = (TProfile*)(fileEstimator->Get(Form("SPDmult10_%s",periodNames[ip]))->Clone(Form("SPDmult10_%s_clone",periodNames[ip])));
+ if (!multEstimatorAvg[ip]) {
+ AliFatal(Form("Multiplicity estimator for %s not found! Please check your estimator file",periodNames[ip]));
+ return;
+ }
+ }
+ task->SetMultiplVsZProfileLHC10b(multEstimatorAvg[0]);
+ task->SetMultiplVsZProfileLHC10c(multEstimatorAvg[1]);
+ task->SetMultiplVsZProfileLHC10d(multEstimatorAvg[2]);
+ task->SetMultiplVsZProfileLHC10e(multEstimatorAvg[3]);
+ }
+
+ }
+
Printf("***************** CONTAINER SETTINGS *****************");
Printf("decay channel = %d",(Int_t)task->GetDecayChannel());