fHistList->SetOwner();
PostData(1, fHistList); // post data in any case once
+ //
+
+ // delta pT vs. area vs. cent vs. mult
+ const Int_t nSparseBinsDelta = 4;
+ const Int_t nBinsDelta[nSparseBinsDelta] = { 241, 10, 10, 25};
+ const Double_t xminDelta[nSparseBinsDelta] = {-120.5, 0, 0, 0};
+ const Double_t xmaxDelta[nSparseBinsDelta] = { 120.5, 1.0, 100,5000};
+
for(int iJB = 0;iJB<fJBArray->GetEntries();iJB++){
TObjString *ostr = (TObjString*)fJBArray->At(iJB);
TString oldName(ostr->GetString().Data());
continue;
}
newName.ReplaceAll(fReplaceString1.Data(),Form(fReplaceString2.Data(),fSubtraction));
+
TH2F *hTmp = new TH2F(Form("h2PtInPtOut_%d",iJB),Form(";%s p_{T}; %s p_{T}",oldName.Data(),newName.Data()),200,0,200.,400,-200.,200.);
fHistList->Add(hTmp);
+ THnSparseF *hFTmp = new THnSparseF(Form("hnDPtAreaCentMult_%d",iJB),Form("%s delta;#delta p_{T};Area;cent;mult",newName.Data()),nSparseBinsDelta,nBinsDelta,xminDelta,xmaxDelta);
+ fHistList->Add(hFTmp);
}
Bool_t oldStatus = TH1::AddDirectoryStatus();
//
- fh2CentvsRho = new TH2F("fh2CentvsRho","centrality vs background density",100,0.,100.,2000,0.,200.);
- fh2CentvsSigma = new TH2F("fh2CentvsSigma","centrality vs backgroun sigma",100,0.,100.,1000,0.,50.);
+ fh2CentvsRho = new TH2F("fh2CentvsRho","centrality vs background density", 100,0.,100.,600,0.,300.);
+ fh2CentvsSigma = new TH2F("fh2CentvsSigma","centrality vs backgroun sigma",100,0.,100.,500,0.,50.);
fHistList->Add(fh2CentvsRho);
fHistList->Add(fh2CentvsSigma);
- fh2MultvsRho = new TH2F("fh2MultvsRho","mult vs background density",1000,0.,5000.,300,0.,300.);
- fh2MultvsSigma = new TH2F("fh2MultvsSigma","mult vs backgroun sigma",1000,0.,5000.,500,0.,50.);
+ fh2MultvsRho = new TH2F("fh2MultvsRho","mult vs background density", 100,0.,5000.,600,0.,300.);
+ fh2MultvsSigma = new TH2F("fh2MultvsSigma","mult vs background sigma",100,0.,5000.,500,0.,50.);
fHistList->Add(fh2MultvsRho);
fHistList->Add(fh2MultvsSigma);
fHistList->Add(fh2ShiftPhiLeading);
}
-
// =========== Switch on Sumw2 for all histos ===========
for (Int_t i=0; i<fHistList->GetEntries(); ++i) {
TH1 *h1 = dynamic_cast<TH1*>(fHistList->At(i));
continue;
}
TH2F* h2PtInOut = (TH2F*)fHistList->FindObject(Form("h2PtInPtOut_%d",iJB));
+ THnSparseF* hnDPtAreaCentMult = (THnSparseF*)fHistList->FindObject(Form("hnDPtAreaCentMult_%d",iJB));
// loop over all jets
Int_t nOut = 0;
+ Double_t deltaPt[4];
+ deltaPt[2] = cent;
+ deltaPt[3] = mult;
for(int i = 0;i < jarray->GetEntriesFast();i++){
AliAODJet *jet = (AliAODJet*)jarray->At(i);
AliAODJet tmpNewJet(*jet);
Bool_t bAdd = false;
-
+ Float_t ptSub = 0;
+
if(fSubtraction==kArea){
Double_t background = rho * jet->EffectiveAreaCharged();
- Float_t ptSub = jet->Pt() - background;
+ ptSub = jet->Pt() - background;
if(fDebug>2){
Printf("%s:%d Jet %d %3.3f %3.3f",(char*)__FILE__,__LINE__,i,jet->Pt(),ptSub);
}
if(ptSub<0){
// optionally rescale it and keep??
bAdd = false; // RescaleJetMomentum(&tmpNewJet,0.1);
- if(h2PtInOut)h2PtInOut->Fill(jet->Pt(),ptSub);
}
else{
bAdd = RescaleJetMomentum(&tmpNewJet,ptSub);
- if(h2PtInOut)h2PtInOut->Fill(jet->Pt(),ptSub);
}
// add background estimates to the new jet object
// allows to recover old p_T and rho...
}// kAREA
else if(fSubtraction==kRhoRecalc){
Double_t background = rho * jet->EffectiveAreaCharged();
- Float_t ptSub = jet->Pt() - background;
+ ptSub = jet->Pt() - background;
if(fDebug>2){
Printf("%s:%d Jet %d %3.3f %3.3f %3.3f %3.3f",(char*)__FILE__,__LINE__,i,jet->Pt(),ptSub,background,rho);}
if(ptSub<0){
// optionally rescale it and keep??
bAdd = false;// RescaleJetMomentum(&tmpNewJet,0.1);
- if(h2PtInOut)h2PtInOut->Fill(jet->Pt(),ptSub);
}
else{
bAdd = RescaleJetMomentum(&tmpNewJet,ptSub);
- if(h2PtInOut)h2PtInOut->Fill(jet->Pt(),ptSub);
}
// add background estimates to the new jet object
// allows to recover old p_T and rho...
tmpNewJet.SetBgEnergy(background,0);
-
}//kRhoRecalc
else if(fSubtraction==kRhoRC){
Double_t background = rho * jet->EffectiveAreaCharged();
- Float_t ptSub = jet->Pt() - background;
+ ptSub = jet->Pt() - background;
if(fDebug>2){ Printf("%s:%d Jet %d %3.3f %3.3f %3.3f %3.3f",(char*)__FILE__,__LINE__,i,jet->Pt(),ptSub,background,rho);}
if(ptSub<0){
// optionally rescale it and keep??
bAdd = false; // RescaleJetMomentum(&tmpNewJet,0.1);
- if(h2PtInOut)h2PtInOut->Fill(jet->Pt(),ptSub);
}
else{
bAdd = RescaleJetMomentum(&tmpNewJet,ptSub);
- if(h2PtInOut)h2PtInOut->Fill(jet->Pt(),ptSub);
}
// add background estimates to the new jet object
// allows to recover old p_T and rho...
}//kRhoRC
else if(fSubtraction==k4Area&&jet->VectorAreaCharged()){
-
-
backgroundv.SetPxPyPzE(rho*(jet->VectorAreaCharged())->Px(),rho*(jet->VectorAreaCharged())->Py(),rho*(jet->VectorAreaCharged())->Pz(),rho*(jet->VectorAreaCharged())->E());
+ ptSub = jet->Pt()-backgroundv.Pt();
if((backgroundv.E()>jet->E())&&(backgroundv.Pt()>jet->Pt())){
-
- // optionally rescale it and keep??
+ // optionally rescale it and keep??
bAdd = false; // RescaleJetMomentum(&tmpNewJet,0.1);
- if(h2PtInOut)h2PtInOut->Fill(jet->Pt(),jet->Pt()-backgroundv.Pt());
}
else{
bAdd = RescaleJet4vector(&tmpNewJet,backgroundv);
AliAODJet *newJet = new ((*jarrayOut)[nOut++]) AliAODJet(tmpNewJet);
// what about track references, clear for now...
if(fSubtraction==k4Area){
- if(h2PtInOut)h2PtInOut->Fill(jet->Pt(),jet->Pt()-newJet->Pt());
fh2ShiftEta->Fill(jet->Eta(),newJet->Eta());
fh2ShiftPhi->Fill(jet->Phi(),newJet->Phi());
if(i==0){fh2ShiftEtaLeading->Fill(jet->Eta(),newJet->Eta());
if(vp)newJet->AddTrack(vp);
}
}
+ if(h2PtInOut)h2PtInOut->Fill(jet->Pt(),ptSub);
+ if(hnDPtAreaCentMult){
+ deltaPt[0] = ptSub;
+ deltaPt[1] = jet->EffectiveAreaCharged();
+ hnDPtAreaCentMult->Fill(deltaPt);
+ }
}
if(jarrayOut)jarrayOut->Sort();
}
fRef(new TRefArray),
fUseAODTrackInput(kFALSE),
fUseAODMCInput(kFALSE),
- fUseGlobalSelection(kFALSE),
fUseBackgroundCalc(kFALSE),
+ fEventSelection(kFALSE),
fFilterMask(0),
fTrackTypeRec(kTrackUndef),
fTrackTypeGen(kTrackUndef),
fTrackPtCut(0.),
fJetOutputMinPt(0.150),
fJetTriggerPtCut(0),
+ fVtxZCut(8),
+ fVtxR2Cut(1),
fCentCutUp(0),
fCentCutLo(0),
fNonStdBranch(""),
fRef(new TRefArray),
fUseAODTrackInput(kFALSE),
fUseAODMCInput(kFALSE),
- fUseGlobalSelection(kFALSE),
fUseBackgroundCalc(kFALSE),
+ fEventSelection(kFALSE),
fFilterMask(0),
fTrackTypeRec(kTrackUndef),
fTrackTypeGen(kTrackUndef),
fTrackPtCut(0.),
fJetOutputMinPt(0.150),
fJetTriggerPtCut(0),
+ fVtxZCut(8),
+ fVtxR2Cut(1),
fCentCutUp(0),
fCentCutLo(0),
fNonStdBranch(""),
void AliAnalysisTaskJetCluster::UserExec(Option_t */*option*/)
{
- if(fUseGlobalSelection){
- // no selection by the service task, we continue
- if (fDebug > 1)Printf("Not selected %s:%d",(char*)__FILE__,__LINE__);
- PostData(1, fHistList);
- return;
- }
-
-
-
// handle and reset the output jet branch
if(fTCAJetsOut)fTCAJetsOut->Delete();
fh1ZPhySel->Fill(zVtx);
}
-
- if(vtxAOD->GetNContributors()>2&&!vtxTitle.Contains("TPCVertex")){
+ if(fEventSelection){
+ if(vtxAOD->GetNContributors()>2&&!vtxTitle.Contains("TPCVertex")){
Float_t yvtx = vtxAOD->GetY();
Float_t xvtx = vtxAOD->GetX();
Float_t r2 = yvtx*yvtx+xvtx*xvtx;
- if(TMath::Abs(zVtx)<8.&&r2<1.){ // apply vertex cut later on
+ if(TMath::Abs(zVtx)<fVtxZCut&&r2<fVtxR2Cut){ // apply vertex cut later on
if(physicsSelection){
selectEvent = true;
}
}
- }
- if(fCentCutUp>0){
- if(cent<fCentCutLo||cent>fCentCutUp){
- selectEvent = false;
}
+ if(fCentCutUp>0){
+ if(cent<fCentCutLo||cent>fCentCutUp){
+ selectEvent = false;
+ }
+ }
+ }else{
+ selectEvent = true;
}
-
}
+
+
if(!selectEvent){
PostData(1, fHistList);
return;
AliAODTrack *trackAOD = dynamic_cast<AliAODTrack*> (track);
if(!trackAOD)continue;
+ if((fFilterMask>0)&&!(trackAOD->TestFilterBit(fFilterMask))) continue;
+ if(TMath::Abs(trackAOD->Eta())>fTrackEtaWindow) continue;
if(trackAOD->Pt()<fTrackPtCut) continue;
list->Add(trackAOD);
iCount++;
- virtual void SetUseGlobalSelection(Bool_t b){fUseGlobalSelection = b;}
virtual void SetAODTrackInput(Bool_t b){fUseAODTrackInput = b;}
virtual void SetAODMCInput(Bool_t b){fUseAODMCInput = b;}
+ virtual void SetEventSelection(Bool_t b){fEventSelection = b;}
virtual void SetRecEtaWindow(Float_t f){fRecEtaWindow = f;}
virtual void SetTrackEtaWindow(Float_t f){fTrackEtaWindow = f;}
virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;}
virtual void SetCentralityCut(Float_t xLo,Float_t xUp){fCentCutLo = xLo; fCentCutUp = xUp;}
virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
virtual void SetJetTriggerPtCut(Float_t x){fJetTriggerPtCut = x;}
+ virtual void SetVtxCuts(Float_t z,Float_t r = 1){fVtxZCut = z; fVtxR2Cut = r *r;}
virtual void SetBackgroundBranch(const char* c){fBackgroundBranch = c;}
virtual const char* GetBackgroundBranch(){return fBackgroundBranch.Data();}
virtual void SetNSkipLeadingRan(Int_t x){fNSkipLeadingRan = x;}
TRefArray *fRef; // ! trefarray for track references within the jet
Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD
Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD
- Bool_t fUseGlobalSelection; // Limit the eta of the generated jets
Bool_t fUseBackgroundCalc; // switches on background calculations
+ Bool_t fEventSelection; // use the event selection of this task, otherwise analyse all
UInt_t fFilterMask; // filter bit for slecected tracks
Int_t fTrackTypeRec; // type of tracks used for FF
Int_t fTrackTypeGen; // type of tracks used for FF
Int_t fNRandomCones; // number of generated random cones
Float_t fAvgTrials; // Average nimber of trials
Float_t fExternalWeight; // external weight
- Float_t fTrackEtaWindow; // eta window used for corraltion plots between rec and gen
+ Float_t fTrackEtaWindow; // eta window used for corraltion plots between rec and gen
Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen
Float_t fTrackPtCut; // minimum track pt to be accepted
Float_t fJetOutputMinPt; // minimum p_t for jets to be written out
Float_t fJetTriggerPtCut; // minimum jwt pT for AOD to be written
+ Float_t fVtxZCut; // zvtx cut
+ Float_t fVtxR2Cut; // R vtx cut (squared)
Float_t fCentCutUp; // upper limit on centrality
Float_t fCentCutLo; // lower limit on centrality
// output configurartion
TList *fHistList; //!leading tracks to be skipped in the randomized event Output list
- ClassDef(AliAnalysisTaskJetCluster, 16)
+ ClassDef(AliAnalysisTaskJetCluster, 17)
};
#endif