-
// ******************************************
// This task computes several jet observables like
// the fraction of energy in inner and outer coronnas,
const Int_t dimSpec = 5;
const Int_t nBinsSpec[dimSpec] = {100,6, 140, 50, fNRPBins};
const Double_t lowBinSpec[dimSpec] = {0,0,-80, 0, 0};
- const Double_t hiBinSpec[dimSpec] = {100,1, 200, 50, fNRPBins};
+ const Double_t hiBinSpec[dimSpec] = {100,1, 200, 50, static_cast<Double_t>(fNRPBins)};
fHJetSpec = new THnSparseF("fHJetSpec","Recoil jet spectrum",dimSpec,nBinsSpec,lowBinSpec,hiBinSpec);
//change binning in jet area
// -- event selection --
fHistEvtSelection->Fill(1); // number of events before event selection
- // physics selection
+
+ Bool_t selected=kTRUE;
+ selected = AliAnalysisHelperJetTasks::Selected();
+ if(!selected){
+ // no selection by the service task, we continue
+ PostData(1,fOutputList);
+ return;}
+
+
+
+ // physics selection: this is now redundant, all should appear as accepted after service task selection
AliInputEventHandler* inputHandler = (AliInputEventHandler*)
((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
std::cout<<inputHandler->IsEventSelected()<<" "<<fOfflineTrgMask<<std::endl;
return;
}
+
+
// vertex selection
if(!aod){
if(fDebug) Printf("%s:%d No AOD",(char*)__FILE__,__LINE__);
if(fIsPbPb){
if(fESD) {cent = fESD->GetCentrality();
if(cent) centValue = cent->GetCentralityPercentile("V0M");}
- else centValue=aod->GetHeader()->GetCentrality();
+ else centValue=((AliVAODHeader*)aod->GetHeader())->GetCentrality();
if(fDebug) printf("centrality: %f\n", centValue);
if (centValue < fCentMin || centValue > fCentMax){
if(fFlagRandom==0){
if(externalBackground)rho = externalBackground->GetBackground(0);}
- if(fFlagRandom==1){
+ if(fFlagRandom==2){
if(externalBackground)rho = externalBackground->GetBackground(2);}
-
+ if(fFlagRandom==3){
+ if(externalBackground)rho = externalBackground->GetBackground(3);}
// fetch jets
TClonesArray *aodJets[2];
aodJets[0]=0;
Double_t phibig=0.;
Double_t etasmall=0;
Double_t ptsmall=0;
- Double_t areasmall=0;
+ // Double_t areasmall=0;
Double_t phismall=0.;
Int_t iCount=0;
Int_t trigJet=-1;
Int_t trigBBTrack=-1;
- Int_t trigInTrack=-1;
- fRPAngle = aod->GetHeader()->GetEventplane();
+ // Int_t trigInTrack=-1;
+ fRPAngle = ((AliVAODHeader*)aod->GetHeader())->GetEventplane();
if(fHardest==0 || fHardest==1){
AliVParticle *partback = (AliVParticle*)ParticleList.At(nT);
if(phitt<0)phitt+=TMath::Pi()*2.;
Int_t phiBintt = GetPhiBin(phitt-fRPAngle);
- Double_t fillspec[] = {centValue,jetbig->EffectiveAreaCharged(),ptcorr,partback->Pt(),phiBintt};
+ Double_t fillspec[] = {centValue,jetbig->EffectiveAreaCharged(),ptcorr,partback->Pt(), static_cast<Double_t>(phiBintt)};
fHJetSpec->Fill(fillspec);
if(iCount==0){
trigJet=i;
trigBBTrack=nT;
- trigInTrack=ippt;
+ // trigInTrack=ippt;
iCount=iCount+1;}
etasmall = jetsmall->Eta();
phismall = jetsmall->Phi();
ptsmall = jetsmall->Pt();
- areasmall = jetsmall->EffectiveAreaCharged();
+ // areasmall = jetsmall->EffectiveAreaCharged();
Double_t tmpDeltaR=(phismall-phibig)*(phismall-phibig)+(etasmall-etabig)*(etasmall-etabig);
tmpDeltaR=TMath::Sqrt(tmpDeltaR);
//Fraction in the jet core
for(int it = 0;it < aod->GetNumberOfTracks();++it){
- AliAODTrack *tr = aod->GetTrack(it);
+ AliAODTrack *tr = dynamic_cast<AliAODTrack*>(aod->GetTrack(it));
+ if(!tr) AliFatal("Not a standard AOD");
Bool_t bGood = false;
if(fFilterType == 0)bGood = true;
else if(fFilterType == 1)bGood = tr->IsHybridTPCConstrainedGlobal();
if(!aod)return 0;
Int_t index=-1;
Int_t triggers[100];
- for(Int_t cr=0;cr<100;cr++){triggers[cr]=-1;}
+ Int_t triggers2[100];
+ for(Int_t cr=0;cr<100;cr++){triggers[cr]=-1;
+ triggers2[cr]=-1;}
Int_t im=0;
+ Int_t im2=0;
for(int it = 0;it < aod->GetNumberOfTracks();++it){
- AliAODTrack *tr = aod->GetTrack(it);
+ AliAODTrack *tr = dynamic_cast<AliAODTrack*>(aod->GetTrack(it));
+ if(!tr) AliFatal("Not a standard AOD");
Bool_t bGood = false;
if(fFilterType == 0)bGood = true;
else if(fFilterType == 1)bGood = tr->IsHybridTPCConstrainedGlobal();
if(tr->Pt()>=minT && tr->Pt()<maxT){
triggers[im]=iCount-1;
- im=im+1;}
+ im=im+1;
+ if(tr->Pt()>=20.){triggers2[im2]=iCount-1;
+ im2=im2+1;}
- }
+ }}
+
number=im;
Int_t rd=0;
- if(im==0) rd=0;
- if(im>0) rd=fRandom->Integer(im);
- index=triggers[rd];
+ if(im2==0) rd=0;
+ if(im2>0) rd=fRandom->Integer(im2);
+ index=triggers2[rd];
+ AliVParticle *tr1 = (AliVParticle*)list->At(index);
+
+
+
+ for(Int_t kk=0;kk<im;kk++){
+ //if(kk==rd) continue;
+ if(index==triggers[kk]) continue;
+ Int_t lab=triggers[kk];
+ AliVParticle *tr2 = (AliVParticle*)list->At(lab);
+
+ Double_t detat=tr1->Eta()-tr2->Eta();
+ Double_t dphit=RelativePhi(tr1->Phi(),tr2->Phi());
+ Double_t deltaRt=TMath::Sqrt(detat*detat+dphit*dphit);
+
+ if(deltaRt>0.4) number=number-1;}
Int_t index=-1;
Double_t ptmax=-10;
Double_t dphi=0;
- Double_t dif=0;
+ // Double_t dif=0;
Int_t iCount=0;
for(int it = 0;it < aod->GetNumberOfTracks();++it){
- AliAODTrack *tr = aod->GetTrack(it);
+ AliAODTrack *tr = dynamic_cast<AliAODTrack*>(aod->GetTrack(it));
+ if(!tr) AliFatal("Not a standard AOD");
if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue;
if(TMath::Abs(tr->Eta())>0.9)continue;
if(tr->Pt()<0.15)continue;
if(TMath::Abs(dphi)<TMath::Pi()-0.6) continue;
if(tr->Pt()>ptmax){ ptmax=tr->Pt();
index=iCount-1;
- dif=dphi; }}
+ // dif=dphi;
+ }}
return index;
else aod = fAODOut;
for(int it = 0;it < aod->GetNumberOfTracks();++it){
- AliAODTrack *tr = aod->GetTrack(it);
+ AliAODTrack *tr = dynamic_cast<AliAODTrack*>(aod->GetTrack(it));
+ if(!tr) AliFatal("Not a standard AOD");
if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue;
if(TMath::Abs(tr->Eta())>0.9)continue;
if(tr->Pt()<0.15)continue;