fhPtTrkTruePrimGen(0x0),
fhPtTrkSecOrFakeRec(0x0),
fHRhoUeMedianVsConeGen(0x0),
+fhEntriesToMedian(0x0),
+fhEntriesToMedianGen(0x0),
+fhCellAreaToMedian(0x0),
+fhCellAreaToMedianGen(0x0),
fIsChargedMC(0),
fIsFullMC(0),
faGenIndex(0),
fFillRespMx(0),
fRandom(0x0),
fnTrials(1000),
+fJetFreeAreaFrac(0.5),
fnPhi(9),
fnEta(2),
fEtaSize(0.7),
fhPtTrkTruePrimGen(0x0),
fhPtTrkSecOrFakeRec(0x0),
fHRhoUeMedianVsConeGen(0x0),
+fhEntriesToMedian(0x0),
+fhEntriesToMedianGen(0x0),
+fhCellAreaToMedian(0x0),
+fhCellAreaToMedianGen(0x0),
fIsChargedMC(0),
fIsFullMC(0),
faGenIndex(0),
fFillRespMx(0),
fRandom(0x0),
fnTrials(1000),
+fJetFreeAreaFrac(0.5),
fnPhi(9),
fnEta(2),
fEtaSize(0.7),
fhPtTrkTruePrimGen(a.fhPtTrkTruePrimGen),
fhPtTrkSecOrFakeRec(a.fhPtTrkSecOrFakeRec),
fHRhoUeMedianVsConeGen(a.fHRhoUeMedianVsConeGen),
+fhEntriesToMedian(a.fhEntriesToMedian),
+fhEntriesToMedianGen(a.fhEntriesToMedianGen),
+fhCellAreaToMedian(a.fhCellAreaToMedian),
+fhCellAreaToMedianGen(a.fhCellAreaToMedianGen),
fIsChargedMC(a.fIsChargedMC),
fIsFullMC(a.fIsFullMC),
faGenIndex(a.faGenIndex),
fFillRespMx(a.fFillRespMx),
fRandom(a.fRandom),
fnTrials(a.fnTrials),
+fJetFreeAreaFrac(a.fJetFreeAreaFrac),
fnPhi(a.fnPhi),
fnEta(a.fnEta),
fEtaSize(a.fEtaSize),
fhDphiTriggerJetAccept = new TH1D("fhDphiTriggerJetAccept","Deltaphi trig-jet after cut",50, -TMath::Pi(),TMath::Pi());
fhCentrality = new TH1D("fhCentrality","Centrality",20,0,100);
fhCentralityAccept = new TH1D("fhCentralityAccept","Centrality after cut",20,0,100);
+ fhEntriesToMedian = new TH1D("fhEntriesToMedian","fhEntriesToMedian",30,0,30);
+ fhCellAreaToMedian = new TH1D("fhCellAreaToMedian", "fhCellAreaToMedian", 75,0,1.5),
fOutputList->Add(fhJetPhi);
fOutputList->Add(fhTriggerPhi);
fOutputList->Add(fhDphiTriggerJetAccept);
fOutputList->Add(fhCentrality);
fOutputList->Add(fhCentralityAccept);
-
+ fOutputList->Add(fhEntriesToMedian);
+ fOutputList->Add(fhCellAreaToMedian);
// raw spectra of INCLUSIVE jets
//Centrality, pTjet, A
/*const Int_t dimRaw = 3;
fHRhoUeMedianVsConeGen = (THnSparseF*) fHRhoUeMedianVsCone->Clone("hRhoUeMedianVsConeGen");
fHRhoUeMedianVsConeGen->SetTitle(Form("%s Gen MC", fHRhoUeMedianVsCone->GetTitle()));
fOutputList->Add(fHRhoUeMedianVsConeGen);
+
+ fhEntriesToMedianGen = (TH1D*) fhEntriesToMedian->Clone("fhEntriesToMedianGen");
+ fhEntriesToMedianGen->SetTitle(Form("%s Gen MC", fhEntriesToMedian->GetTitle()));
+ fOutputList->Add(fhEntriesToMedianGen);
+
+ fhCellAreaToMedianGen = (TH1D*) fhCellAreaToMedian->Clone("fhCellAreaToMedianGen");
+ fhCellAreaToMedianGen->SetTitle(Form("%s Gen MC", fhCellAreaToMedian->GetTitle()));
+ fOutputList->Add(fhCellAreaToMedianGen);
}
//-------------------------------------
// pythia histograms
EstimateBgCone(fListJets, &particleList, rhoCone);
//Estimate rho from cell median minus jets
- EstimateBgRhoMedian(fListJetsBg, &particleList, rhoFromCellMedian);
+ EstimateBgRhoMedian(fListJetsBg, &particleList, rhoFromCellMedian,0); //real data
//fListJetsBg->Clear(); //this list is further not needed
//============== analyze generator level MC ================
EstimateBgCone(fListJetsGen, &particleListGen, rhoConeGen);
//Estimate rho from cell median minus jets
- EstimateBgRhoMedian(fListJetsBgGen, &particleListGen, rhoFromCellMedianGen);
+ EstimateBgRhoMedian(fListJetsBgGen, &particleListGen, rhoFromCellMedianGen,1);//mc data
//fListJetsBgGen->Clear();
//============ Generator trigger+jet ==================
for(Int_t it = 0; it < aodevt->GetNumberOfTracks(); it++){
AliAODTrack *tr = aodevt->GetTrack(it);
- //if((fFilterMask > 0) && !(tr->TestFilterBit(fFilterMask))) continue;
- if((fFilterMask > 0) && !(tr->IsHybridGlobalConstrainedGlobal())) continue;
+ if((fFilterMask > 0) && !(tr->TestFilterBit(fFilterMask))) continue;
+ //if((fFilterMask > 0) && !(tr->IsHybridGlobalConstrainedGlobal())) continue;
if(TMath::Abs((Float_t) tr->Eta()) > fTrackEtaCut) continue;
if(tr->Pt() < fTrackLowPtCut) continue;
list->Add(tr);
return;
}
//________________________________________________________________
-void AliAnalysisTaskJetCorePP::EstimateBgRhoMedian(TList *listJet, TList* listPart, Double_t &rhoMedian){
+void AliAnalysisTaskJetCorePP::EstimateBgRhoMedian(TList *listJet, TList* listPart, Double_t &rhoMedian, Int_t mode){
//Estimate background rho by means of integrating track pT outside identified jet cones
rhoMedian = 0;
static Double_t rhoInCells[20];
Double_t relativeArea;
Int_t nCells=0;
-
+ Double_t bufferArea=0.0, bufferPt=0.0; //sum cells where A< fJetFreeAreaFrac
for(Int_t ip=0; ip<fnPhi; ip++){
for(Int_t ie=0; ie<fnEta; ie++){
relativeArea = nOutCone[ip][ie]/fnTrials;
-
- if(relativeArea < 0.5) continue;
- rhoInCells[nCells] = sumPtOutOfCone[ip][ie]/(relativeArea*fCellArea);
- nCells++;
+ //cout<<"RA= "<< relativeArea<<" BA="<<bufferArea<<" BPT="<< bufferPt <<endl;
+
+ bufferArea += relativeArea;
+ bufferPt += sumPtOutOfCone[ip][ie];
+ if(bufferArea > fJetFreeAreaFrac){
+ rhoInCells[nCells] = bufferPt/(bufferArea*fCellArea);
+
+ if(mode==1) fhCellAreaToMedianGen->Fill(bufferArea*fCellArea);
+ else fhCellAreaToMedian->Fill(bufferArea*fCellArea);
+
+ bufferArea = 0.0;
+ bufferPt = 0.0;
+ nCells++;
+ }
}
}
- if(nCells>0)
- rhoMedian = TMath::Median(nCells, rhoInCells);
+
+ if(nCells>0){
+ rhoMedian = TMath::Median(nCells, rhoInCells);
+ if(mode==1){ //mc data
+ fhEntriesToMedianGen->Fill(nCells);
+ }else{ //real data
+ fhEntriesToMedian->Fill(nCells);
+ }
+ }
}
virtual void SetJetR(Float_t jR) { fJetParamR = jR; }
virtual void SetBgJetR(Float_t bgjR) { fBgJetParamR = bgjR; }
virtual void SetBgMaxJetPt(Float_t mpt){ fBgMaxJetPt = mpt;}
+ virtual void SetRndTrials(Int_t nt){ fnTrials = nt;}
+ virtual void SetFreeAreaFrac(Float_t frac){ fJetFreeAreaFrac = frac;}
virtual void SetBgConeR(Float_t cr){ fBgConeR = cr; }
virtual void SetOfflineTrgMask(AliVEvent::EOfflineTriggerTypes mask) { fOfflineTrgMask = mask; }
virtual void SetMinContribVtx(Int_t n) { fMinContribVtx = n; }
Bool_t SelectMCGenTracks(AliVParticle *trk, TList *trkList, Double_t &ptLeading, Int_t &index, Int_t counter);
void FillEffHistos(TList *recList, TList *genList);
- void EstimateBgRhoMedian(TList *listJet, TList* listPart, Double_t &rhoMedian);//median method to estimate bg
+ void EstimateBgRhoMedian(TList *listJet, TList* listPart, Double_t &rhoMedian, Int_t mode);//median method to estimate bg
void EstimateBgCone(TList *listJet, TList* listPart, Double_t &rhoPerpCone);//perp cone method to estimate bg
void ReadTClonesArray(TString bname, TList *list); //init jets lists
//private member objects
TH2D *fhPtTrkTruePrimGen; // pt spectrum of true generated primary track
TH2D *fhPtTrkSecOrFakeRec; // pt spectrum of reconstructed fake or secondary tracks
THnSparse *fHRhoUeMedianVsConeGen; //EBE UE from Median vs Perp Cone generator level
-
+
+ TH1D *fhEntriesToMedian; //how many entries were used to calculate
+ TH1D *fhEntriesToMedianGen; //how many entries were used to calculate in MC
+ TH1D *fhCellAreaToMedian; //how many entries were used to calculate
+ TH1D *fhCellAreaToMedianGen; //how many entries were used to calculate in MC
+
+
Bool_t fIsChargedMC; //flag analysis on MC data with true and on the real data false
Bool_t fIsFullMC; //flag analysis on MC data with true and on the real data false
TArrayI faGenIndex; // labels of particles on MC generator level
TRandom3* fRandom; // TRandom3
- const Int_t fnTrials; //number of random trials to measure cell area
+ Int_t fnTrials; //number of random trials to measure cell area
+ Float_t fJetFreeAreaFrac; //fraction of area in cell free of jets
const Int_t fnPhi; //number of cells in phi
const Int_t fnEta; //number of cells in eta
const Double_t fEtaSize; //cell size in eta
const Double_t fCellArea; //cell area
Double_t fSafetyMargin; //enlarge a bit the jet size to avoid contamination of UE
- ClassDef(AliAnalysisTaskJetCorePP, 9); //has to end with number larger than 0
+ ClassDef(AliAnalysisTaskJetCorePP, 10); //has to end with number larger than 0
};
#endif