6 #include <TClonesArray.h> 10 #include <THnSparse.h> 13 #include <TLorentzVector.h> 19 #include <AliAnalysisDataSlot.h> 20 #include <AliAnalysisDataContainer.h> 22 #include "TMatrixDSym.h" 23 #include "TMatrixDSymEigen.h" 26 #include "AliVCluster.h" 27 #include "AliVTrack.h" 32 #include "AliMCEvent.h" 33 #include "AliGenPythiaEventHeader.h" 34 #include "AliAODMCHeader.h" 35 #include "AliAODHandler.h" 36 #include "AliAODEvent.h" 37 #include "AliMCEvent.h" 38 #include "AliAnalysisManager.h" 43 #include "AliAODInputHandler.h" 44 #include "AliPIDResponse.h" 45 #include "AliCFContainer.h" 46 #include "AliCFManager.h" 47 #include "AliMultiEventInputHandler.h" 48 #include "AliKFParticle.h" 49 #include "AliKFVertex.h" 50 #include "AliMultSelection.h" 51 #include "AliAnalysisUtils.h" 53 #include "AliAODEvent.h" 76 fMinFractionShared(0),
79 fJetSelection(kInclusive),
85 fangWindowRecoil(0.6),
92 fOneConstSelectOn(kFALSE),
99 fAssITSrefitCut(kTRUE),
122 fnULSmLSpairsPerElectron(0),
126 fnElecOverPartPerJet(0),
129 fnIncSubPhotElecPerJet(0),
131 fnTrueHFElecPerJet(0),
132 fnTruePElecPerJet(0),
138 fTreeObservableTagging(0)
141 for(
Int_t i=0;i<21;i++){
144 for(
Int_t i=0;i<15;i++){
145 fnTPCTrueParticles[i] = NULL;
147 SetMakeGeneralHistograms(kTRUE);
148 DefineOutput(1, TList::Class());
149 DefineOutput(2, TTree::Class());
168 fMinFractionShared(0),
169 fJetShapeType(
kData),
170 fJetShapeSub(kNoSub),
171 fJetSelection(kInclusive),
172 fPtThreshold(-9999.),
177 fangWindowRecoil(0.6),
181 fCentSelectOn(kTRUE),
184 fOneConstSelectOn(kFALSE),
191 fAssITSrefitCut(kTRUE),
214 fnULSmLSpairsPerElectron(0),
218 fnElecOverPartPerJet(0),
221 fnIncSubPhotElecPerJet(0),
223 fnTrueHFElecPerJet(0),
224 fnTruePElecPerJet(0),
230 fTreeObservableTagging(0)
234 for(
Int_t i=0;i<21;i++){
237 for(
Int_t i=0;i<15;i++){
242 DefineOutput(1, TList::Class());
243 DefineOutput(2, TTree::Class());
260 Bool_t oldStatus = TH1::AddDirectoryStatus();
261 TH1::AddDirectory(kFALSE);
263 fh2ResponseUW=
new TH2F(
"fh2ResponseUW",
"fh2ResponseUW", 100, 0, 200, 100, 0, 200);
265 fh2ResponseW=
new TH2F(
"fh2ResponseW",
"fh2ResponseW", 100, 0, 200, 100, 0, 200);
267 fPhiJetCorr6=
new TH2F(
"fPhiJetCorr6",
"fPhiJetCorr6", 50, 0, 2*TMath::Pi(), 50, 0, 2*TMath::Pi());
269 fEtaJetCorr6=
new TH2F(
"fEtaJetCorr6",
"fEtaJetCorr6", 50, -1.5, 1.5, 50, -1.5, 1.5);
272 fPhiJetCorr7=
new TH2F(
"fPhiJetCorr7",
"fPhiJetCorr7", 50, 0, 2*TMath::Pi(), 50, 0, 2*TMath::Pi());
274 fEtaJetCorr7=
new TH2F(
"fEtaJetCorr7",
"fEtaJetCorr7", 50, -1.5, 1.5, 50, -1.5, 1.5);
277 fPtJetCorr=
new TH2F(
"fPtJetCorr",
"fPtJetCorr", 100, 0, 200, 100, 0, 200);
279 fPtJet=
new TH1F(
"fPtJet",
"fPtJet", 100, 0, 200);
282 fhpTjetpT=
new TH2F(
"fhpTjetpT",
"fhpTjetpT", 200, 0, 200, 200, 0, 200);
284 fhPt=
new TH1F(
"fhPt",
"fhPt", 200, 0, 200);
286 fhPhi=
new TH1F(
"fhPhi",
"fhPhi", 100, -TMath::Pi(), TMath::Pi());
289 fNbOfConstvspT=
new TH2F(
"fNbOfConstvspT",
"fNbOfConstvspT", 100, 0, 100, 200, 0, 200);
292 fnTPCnTOFnocut=
new TH2F(
"fnTPCnTOFnocut",
"fnTPCnTOFnocut", 200, -10, 10, 200, -10, 10);
295 fnTPCnocut=
new TH2F(
"fnTPCnocut",
"fnTPCnocut", 50, 0, 5, 200, -10, 10);
298 fnTOFnocut=
new TH2F(
"fnTOFnocut",
"fnTOFnocut", 50, 0, 5, 200, -10, 10);
301 fnTPCcut=
new TH2F(
"fnTPCcut",
"fnTPCcut", 50, 0, 5, 200, -10, 10);
307 fInvmassLS =
new TH2F(
"fInvmassLS",
"fInvmassLS", 50, 0, 5, 250, 0, 0.5);
310 fInvmassULS=
new TH2F(
"fInvmassULS",
"fInvmassULS", 50, 0, 5, 250, 0, 0.5);
313 fnPartPerJet=
new TH1F(
"fnPartPerJet",
"fnPartPerJet", 500,0,500);
319 fnInclElecPerJet=
new TH1F(
"fnInclElecPerJet",
"fnInclElecPerJet", 100,0,100);
322 fnPhotElecPerJet=
new TH1F(
"fnPhotElecPerJet",
"fnPhotElecPerJet", 100,0,100);
328 fnTrueElecPerJet=
new TH1F(
"fnTrueElecPerJet",
"fnTrueElecPerJet", 100,0,100);
337 fPi0Pt =
new TH2F(
"fPi0Pt",
"fPi0Pt",4,0,4,100,0,50);
340 fEtaPt =
new TH2F(
"fEtaPt",
"fEtaPt",4,0,4,100,0,50);
343 Double_t ptRange[16] = {0.5,0.7,0.9,1.1,1.3,1.5,1.9,2.1,2.3,2.5,2.9,3.1,3.3,3.5,3.9,5};
345 fUlsLsElecPt=
new TH1F(
"fUlsLsElecPt",
"fUlsLsElecPt", 15,ptRange);
347 fTotElecPt=
new TH1F(
"fTotElecPt",
"fTotElecPt", 15,ptRange);
350 fPtP=
new TH2F(
"fPtP",
"fPtP", 15,ptRange,15,ptRange);
353 for(
Int_t i=0; i<15; i++) {
354 fnTPCTrueParticles[i] =
new TH2F(Form(
"fnTPCTrueParticles%d",i),Form(
"fnTPCTrueParticles%d",i), 7,0,7,200,-10,10);
365 THnSparse *hn =
dynamic_cast<THnSparse*
>(
fOutput->At(i));
370 TH1::AddDirectory(oldStatus);
377 fShapesVarNames[0] =
"partonCode";
378 fShapesVarNames[1] =
"ptJet";
379 fShapesVarNames[2] =
"ptDJet";
380 fShapesVarNames[3] =
"mJet";
382 fShapesVarNames[4] =
"angularity";
383 fShapesVarNames[5] =
"circularity";
384 fShapesVarNames[6] =
"lesub";
385 fShapesVarNames[7] =
"coronna";
387 fShapesVarNames[8] =
"ptJetMatch";
388 fShapesVarNames[9] =
"ptDJetMatch";
389 fShapesVarNames[10] =
"mJetMatch";
391 fShapesVarNames[11] =
"angularityMatch";
392 fShapesVarNames[12] =
"circularityMatch";
393 fShapesVarNames[13] =
"lesubMatch";
394 fShapesVarNames[14] =
"coronnaMatch";
395 fShapesVarNames[15]=
"weightPythia";
397 fShapesVarNames[16]=
"rhoVal";
398 fShapesVarNames[17]=
"rhoMassVal";
399 fShapesVarNames[18]=
"ptUnsub";
400 fShapesVarNames[19]=
"pElec";
401 fShapesVarNames[20]=
"ptElec";
411 delete [] fShapesVarNames;
421 printf(
"ERROR: fAOD not available\n");
425 fVevent =
dynamic_cast<AliVEvent*
>(InputEvent());
427 printf(
"ERROR: fVEvent not available\n");
435 fMCarray =
dynamic_cast<TClonesArray*
>(
fAOD->FindListObject(AliAODMCParticle::StdBranchName()));
436 fMCheader =
dynamic_cast<AliAODMCHeader*
>(
fAOD->GetList()->FindObject(AliAODMCHeader::StdBranchName()));
443 AliGenEventHeader* gh=(AliGenEventHeader*)lh->At(0);
444 NpureMC = gh->NProduced();
449 Bool_t isPileupfromSPDmulbins = kFALSE, isPileupFromMV = kFALSE;
450 isPileupfromSPDmulbins =
fAOD->IsPileupFromSPDInMultBins();
451 if (isPileupfromSPDmulbins)
return kFALSE;
453 AliAnalysisUtils utils;
454 utils.SetMinPlpContribMV(5);
455 utils.SetMaxPlpChi2MV(5.);
456 utils.SetMinWDistMV(15);
457 utils.SetCheckPlpFromDifferentBCMV(kFALSE);
458 isPileupFromMV = utils.IsPileUpMV(
fAOD);
459 if (isPileupFromMV)
return kFALSE;
463 Bool_t isPrimary = kFALSE, isFromLMdecay = kTRUE, isFromHFdecay=kTRUE;
467 for (
Int_t iParticle = 0; iParticle < nParticles; iParticle++) {
468 AliAODMCParticle* particle = (AliAODMCParticle*)
fMCarray->At(iParticle);
469 int fPDG = particle->GetPdgCode();
470 double pTMC = particle->Pt();
473 if(iParticle>=NpureMC)iEnhance = kTRUE;
476 if (TMath::Abs(etaMC)>1.2)
continue;
483 if(fPDG==111)
fPi0Pt->Fill(iEnhance,pTMC);
484 if(fPDG==221)
fEtaPt->Fill(iEnhance,pTMC);
486 if (!isFromHFdecay && !isFromLMdecay){
487 if(fPDG==111)
fPi0Pt->Fill(iEnhance+2,pTMC);
488 if(fPDG==221)
fEtaPt->Fill(iEnhance+2,pTMC);
508 AliAODTrack *triggerHadron = 0x0;
515 if (triggerHadronLabel==-99999) {
530 TClonesArray *TrackArray = NULL;
531 TClonesArray *TrackArrayMC = NULL;
533 else TrackArray = PartCont->GetArray();
535 else triggerHadron =
static_cast<AliAODTrack*
>(TrackArray->At(triggerHadronLabel));
539 if (!triggerHadron) {
550 fhPt->Fill(triggerHadron->Pt());
556 nVertices =
fAOD->GetNumberOfVertices();
557 Double_t listofmotherkink[nVertices];
558 Int_t nMotherKink = 0;
559 for(
Int_t ivertex=0; ivertex < nVertices; ivertex++) {
560 AliAODVertex *vertex =
fAOD->GetVertex(ivertex);
561 if(!vertex)
continue;
562 if(vertex->GetType()==AliAODVertex::kKink) {
563 AliAODTrack *mother = (AliAODTrack *) vertex->GetParent();
564 if(!mother)
continue;
565 Int_t idmother = mother->GetID();
566 listofmotherkink[nMotherKink] = idmother;
575 Float_t rhoVal=0, rhoMassVal = 0.;
578 jetCont->ResetCurrentID();
583 Printf(
"%s: Could not retrieve rho %s (some histograms will be filled with zero)!", GetName(), jetCont->
GetRhoName().Data());
584 }
else rhoVal = rhoParam->GetVal();
588 Printf(
"%s: Could not retrieve rho_m %s (some histograms will be filled with zero)!", GetName(), jetCont->
GetRhoMassName().Data());
589 }
else rhoMassVal = rhomParam->GetVal();
598 Int_t ifound=0, jfound=0;
599 Int_t ilab=-1, jlab=-1;
629 jetUS = jetContUS->
GetJet(i);
632 if(ifound==1) ilab = i;
635 if(ilab==-1)
continue;
636 jetUS=jetContUS->
GetJet(ilab);
642 Printf(
"jet2 does not exist, returning");
650 Printf(
"jet3 does not exist, returning");
679 jetUS = jetContUS->
GetJet(i);
682 if(ifound==1) ilab = i;
685 if(ilab==-1)
continue;
686 jetUS=jetContUS->
GetJet(ilab);
690 Printf(
"jet2 does not exist, returning");
696 jet3 = jetContPart->
GetJet(j);
700 if(jfound==1) jlab = j;
703 if(jlab==-1)
continue;
704 jet3=jetContPart->
GetJet(jlab);
706 Printf(
"jet3 does not exist, returning");
712 Printf(
"jet3 does not exist, returning");
731 Float_t dRp1 = TMath::Sqrt(jp1 * jp1 + detap1 * detap1);
741 dRp1 = TMath::Sqrt(jp1 * jp1 + detap1 * detap1);
784 Float_t ptMatch=0., ptDMatch=0., massMatch=0., angulMatch=0.,circMatch=0., lesubMatch=0., coronnaMatch=0;
846 Int_t nInclusiveElectrons = 0, nPhotonicElectrons = 0, nTrueElectronsMC, nTrueHFElecMC;
850 GetNumberOfElectrons(jet1, 0,nMotherKink,listofmotherkink,nInclusiveElectrons,nPhotonicElectrons,pElec,ptElec,hasElectrons);
889 AliVParticle *vp1 = 0x0;
890 Int_t nIE=0, nPairs=0, nPE=0, sub = -1;
893 Bool_t hasElecCand = kFALSE;
901 printf(
"ERROR: pid response not available\n");
908 Printf(
"AliVParticle associated to constituent not found");
912 AliVTrack *vtrack =
dynamic_cast<AliVTrack*
>(vp1);
914 printf(
"ERROR: Could not receive track%d\n", i);
918 AliAODTrack *track =
dynamic_cast<AliAODTrack*
>(vtrack);
921 Bool_t passTrackCut = kFALSE;
923 if (!passTrackCut)
continue;
927 Double_t p=-9., pt=-9., fTPCnSigma=-99., fTOFnSigma=-99.;
931 fTPCnSigma =
fpidResponse->NumberOfSigmasTPC(track, AliPID::kElectron);
932 fTOFnSigma =
fpidResponse->NumberOfSigmasTOF(track, AliPID::kElectron);
939 if(TMath::Abs(fTPCnSigma)<3.5){
965 hasElec = hasElecCand;
971 AliVParticle *vp1 = 0x0;
972 Int_t nIE=0, nHFE=0, nPE=0, PartId=0, nPairs=0, iDecay = 0;
973 Double_t p=-9., pt=-9., fTPCnSigma=-99., fTOFnSigma=-99., MCweight = 1.;
974 Double_t ptRange[16] = {0.5,0.7,0.9,1.1,1.3,1.5,1.9,2.1,2.3,2.5,2.9,3.1,3.3,3.5,3.9,5};
976 Bool_t isFromHFdecay=kFALSE;
977 Bool_t isFromLMdecay=kFALSE;
985 Printf(
"AliVParticle associated to constituent not found");
989 AliVTrack *vtrack =
dynamic_cast<AliVTrack*
>(vp1);
991 printf(
"ERROR: Could not receive track%d\n", i);
995 AliAODTrack *track =
dynamic_cast<AliAODTrack*
>(vtrack);
998 Bool_t passTrackCut = kFALSE;
1000 if (!passTrackCut)
continue;
1005 fTPCnSigma =
fpidResponse->NumberOfSigmasTPC(track, AliPID::kElectron);
1006 fTOFnSigma =
fpidResponse->NumberOfSigmasTOF(track, AliPID::kElectron);
1008 isFromHFdecay=kFALSE;
1009 isFromLMdecay=kFALSE;
1016 Int_t label = track->GetLabel();
1024 if (TMath::Abs(partPDG)==11) PartId = 1;
1025 if (TMath::Abs(partPDG)==13) PartId = 2;
1026 if (TMath::Abs(partPDG)==321) PartId = 3;
1027 if (TMath::Abs(partPDG)==2212) PartId = 4;
1028 if (TMath::Abs(partPDG)==211) PartId = 5;
1030 for(
Int_t k=0;k<15;k++){
1036 if ((fTPCnSigma>
fSigmaTPCcut) && (fTPCnSigma<3) && (TMath::Abs(fTOFnSigma)<
fSigmaTOFcut) && (TMath::Abs(partPDG)==11)){
1040 if (iDecay==1 || iDecay==2 || iDecay==3 || iDecay==4){
1048 if (TMath::Abs(partPDG)==11){
1052 if (isFromHFdecay) nHFE++;
1055 if (isFromLMdecay) nPE++;
1076 ntracks =
fVevent->GetNumberOfTracks();
1078 Int_t nULSpairs = 0;
1082 for(
Int_t jTracks = 0; jTracks < ntracks; jTracks++){
1084 AliVParticle* Vassotrack =
fVevent->GetTrack(jTracks);
1087 printf(
"ERROR: Could not receive associated track %d\n", jTracks);
1090 AliAODTrack *trackAsso =
dynamic_cast<AliAODTrack*
>(Vassotrack);
1091 if(!trackAsso)
continue;
1093 if((track->GetID())==(trackAsso->GetID()))
continue;
1096 Bool_t passAssoTrackCut = kFALSE;
1098 if (!passAssoTrackCut)
continue;
1101 Double_t p=-9.,pt=-9.,eta =-9.,phi=-9.;
1108 charge = track->Charge();
1112 Double_t pAsso=-9.,ptAsso=-9.,etaAsso =-9.,fITSnSigmaAsso=-9.,fTPCnSigmaAsso=-9.,phiAsso=-9.;
1113 Int_t chargeAsso = 0;
1115 ptAsso = trackAsso->Pt();
1116 pAsso = trackAsso->P();
1117 phiAsso = trackAsso->Phi();
1118 etaAsso = trackAsso->Eta();
1119 chargeAsso = trackAsso->Charge();
1123 fITSnSigmaAsso =
fpidResponse->NumberOfSigmasITS(trackAsso, AliPID::kElectron);
1124 fTPCnSigmaAsso =
fpidResponse->NumberOfSigmasTPC(trackAsso, AliPID::kElectron);
1126 if(TMath::Abs(fTPCnSigmaAsso)>3)
continue;
1129 Bool_t fFlagLS=kFALSE, fFlagULS=kFALSE;
1130 Double_t openingAngle = -999.,
mass=999., width = -999;
1133 if(charge>0) fPDGe1 = -11;
1134 if(chargeAsso>0) fPDGe2 = -11;
1136 if(charge == chargeAsso) fFlagLS = kTRUE;
1137 if(charge != chargeAsso) fFlagULS = kTRUE;
1139 AliKFParticle::SetField(
fVevent->GetMagneticField());
1140 AliKFParticle ge1(*track, fPDGe1);
1141 AliKFParticle ge2(*trackAsso, fPDGe2);
1142 AliKFParticle recg(ge1, ge2);
1144 if(recg.GetNDF()<1)
continue;
1145 Double_t chi2recg = recg.GetChi2()/recg.GetNDF();
1146 if(TMath::Sqrt(TMath::Abs(chi2recg))>3.)
continue;
1148 openingAngle = ge1.GetAngle(ge2);
1151 Int_t MassCorrect=-9;
1152 MassCorrect = recg.GetMass(
mass,width);
1169 sub = nULSpairs-nLSpairs;
1180 Bool_t isHFdecay = kFALSE;
1183 Int_t idMother = particle->GetMother();
1185 AliAODMCParticle* mother = (AliAODMCParticle*)
fMCarray->At(idMother);
1186 Int_t motherPDG = TMath::Abs(mother->GetPdgCode());
1189 if((motherPDG % 1000) / 100 == 4) isHFdecay = kTRUE;
1190 if(motherPDG / 1000 == 4) isHFdecay = kTRUE;
1193 if((motherPDG % 1000) / 100 == 5) isHFdecay = kTRUE;
1194 if(motherPDG / 1000 == 5) isHFdecay = kTRUE;
1197 if(motherPDG==4 || motherPDG==5 || motherPDG == 211 || motherPDG ==13 || motherPDG ==2112 || motherPDG ==130 || motherPDG ==3122 ||
1198 motherPDG ==310 || motherPDG ==3222 || motherPDG ==2212 || motherPDG ==3112 || motherPDG ==321 ||
1199 motherPDG ==11 || motherPDG ==3212 || motherPDG ==311 || motherPDG ==20213 || motherPDG ==3312 ||
1200 motherPDG ==3334 || motherPDG ==3324 || motherPDG ==3322 || motherPDG ==1000010020 || motherPDG ==15
1201 || motherPDG ==10323 || motherPDG ==2114 || motherPDG ==1000010030 || motherPDG ==2214 || motherPDG ==2224
1202 || motherPDG ==1114 || motherPDG == 2214 || motherPDG == 3114 || motherPDG ==3224 || motherPDG ==3124
1203 || motherPDG ==3314 || motherPDG ==10323 || motherPDG == 3214) isHFdecay = kTRUE;
1213 Bool_t isLMdecay = kFALSE;
1216 Int_t idMother = particle->GetMother();
1218 AliAODMCParticle* mother = (AliAODMCParticle*)
fMCarray->At(idMother);
1219 Int_t motherPDG = TMath::Abs(mother->GetPdgCode());
1221 if(motherPDG == 111 || motherPDG == 221 || motherPDG==223 || motherPDG==333 || motherPDG==331 ||
1222 motherPDG==113 || motherPDG==213 || motherPDG==313 || motherPDG==323) isLMdecay = kTRUE;
1231 Bool_t isprimary = kFALSE;
1233 Int_t idMother = particle->GetMother();
1234 if (idMother==-1) isprimary = kTRUE;
1243 double weight = 1.0;
1244 double parPi0[5] = {0.530499,0.732775,0.000997414,3.46894,4.84342};
1246 weight = parPi0[0] / TMath::Power((exp(parPi0[1]*mcPi0pT - parPi0[2]*mcPi0pT*mcPi0pT) + (mcPi0pT/parPi0[3])), parPi0[4]);
1254 double weight = 1.0;
1255 double parEta[5] = {0.78512,-0.606822,0.0326254,3.13959,4.83715};
1257 weight = parEta[0] / TMath::Power((exp(parEta[1]*mcEtapT - parEta[2]*mcEtapT*mcEtapT) + (mcEtapT/parEta[3])), parEta[4]);
1267 Int_t partPDG = particle->GetPdgCode();
1269 if (TMath::Abs(partPDG)==11){
1270 Int_t idMother = particle->GetMother();
1273 AliAODMCParticle* mother = (AliAODMCParticle*)
fMCarray->At(idMother);
1274 Int_t motherPDG = mother->GetPdgCode();
1281 if (motherPDG==111 && (isMotherPrimary || (!isMotherFromHF && !isMotherFromLM))){
1286 if (motherPDG==221 && (isMotherPrimary || (!isMotherFromHF && !isMotherFromLM))){
1292 Int_t idSecondMother = mother->GetMother();
1294 if (idSecondMother>0){
1295 AliAODMCParticle* secondMother = (AliAODMCParticle*)
fMCarray->At(idSecondMother);
1296 Int_t secondMotherPDG = secondMother->GetPdgCode();
1297 Double_t secondMotherPt = secondMother->Pt();
1303 if (motherPDG==22 && secondMotherPDG==111 && (isSecondMotherPrimary || (!isSecondMotherFromHF && !isSecondMotherFromLM))){
1308 if (motherPDG==22 && secondMotherPDG==221 && (isSecondMotherPrimary || (!isSecondMotherFromHF && !isSecondMotherFromLM))){
1313 if (motherPDG==111 && secondMotherPDG==221 && (isSecondMotherPrimary || (!isSecondMotherFromHF && !isSecondMotherFromLM))){
1318 Int_t idThirdMother = secondMother->GetMother();
1319 if (idThirdMother>0){
1320 AliAODMCParticle* thirdMother = (AliAODMCParticle*)
fMCarray->At(idThirdMother);
1321 Int_t thirdMotherPDG = thirdMother->GetPdgCode();
1322 Double_t thirdMotherPt = thirdMother->Pt();
1328 if (motherPDG==22 && secondMotherPDG==111 && thirdMotherPDG==221 && (isThirdMotherPrimary || (!isThirdMotherFromHF && !isThirdMotherFromLM))){
1347 AliVParticle *vp1 = 0x0;
1352 Printf(
"AliVParticle associated to constituent not found");
1357 Double_t dr2 = (vp1->Eta()-jet->
Eta())*(vp1->Eta()-jet->
Eta()) + dphi*dphi;
1359 num=num+vp1->Pt()*dr;
1393 TClonesArray *TracksArray = NULL;
1394 TClonesArray *TracksArrayMC = NULL;
1397 else TracksArray = PartCont->GetArray();
1400 if(!PartContMC || !TracksArrayMC)
return -2;
1403 if(!PartCont || !TracksArray)
return -2;
1407 AliAODTrack *Track = 0x0;
1411 else NTracks = TracksArray->GetEntriesFast();
1413 for(
Int_t i=0; i < NTracks; i++){
1416 if (!Track)
continue;
1417 if(TMath::Abs(Track->Eta())>0.9)
continue;
1419 Double_t dr2 = (Track->Eta()-jet->
Eta())*(Track->Eta()-jet->
Eta()) + dphi*dphi;
1421 if((dr>=0.8) && (dr<1)) sumpt=sumpt+Track->Pt();
1425 if((Track = static_cast<AliAODTrack*>(PartCont->
GetAcceptTrack(i)))){
1426 if (!Track)
continue;
1427 if(TMath::Abs(Track->Eta())>0.9)
continue;
1428 if (Track->Pt()<0.15)
continue;
1430 Double_t dr2 = (Track->Eta()-jet->
Eta())*(Track->Eta()-jet->
Eta()) + dphi*dphi;
1432 if((dr>=0.8) && (dr<1)) sumpt=sumpt+Track->Pt();
1445 return Coronna(jet, jetContNb);
1461 AliVParticle *vp1 = 0x0;
1466 Printf(
"AliVParticle associated to constituent not found");
1470 num=num+vp1->Pt()*vp1->Pt();
1473 return TMath::Sqrt(num)/den;
1483 return PTD(jet, jetContNb);
1504 TVector3 ppJ1(pxjet, pyjet, pzjet);
1505 TVector3 ppJ3(- pxjet* pzjet, - pyjet * pzjet, pxjet * pxjet + pyjet * pyjet);
1507 TVector3 ppJ2(-pyjet, pxjet, 0);
1509 AliVParticle *vp1 = 0x0;
1514 Printf(
"AliVParticle associated to constituent not found");
1518 TVector3 pp(vp1->Px(), vp1->Py(), vp1->Pz());
1521 TVector3 pLong = pp.Dot(ppJ1) / ppJ1.Mag2() * ppJ1;
1522 TVector3 pPerp = pp - pLong;
1525 Float_t ppjX = pPerp.Dot(ppJ2);
1526 Float_t ppjY = pPerp.Dot(ppJ3);
1527 Float_t ppjT = TMath::Sqrt(ppjX * ppjX + ppjY * ppjY);
1528 if(ppjT<=0)
return 0;
1530 mxx += (ppjX * ppjX / ppjT);
1531 myy += (ppjY * ppjY / ppjT);
1532 mxy += (ppjX * ppjY / ppjT);
1537 if(sump2==0)
return 0;
1539 Double_t ele[4] = {mxx / sump2, mxy / sump2, mxy / sump2, myy / sump2};
1540 TMatrixDSym m0(2,ele);
1543 TMatrixDSymEigen m(m0);
1545 TMatrixD evecm = m.GetEigenVectors();
1546 eval = m.GetEigenValues();
1550 if (eval[0] < eval[1]) jev = 1;
1553 evec0 = TMatrixDColumn(evecm, jev);
1556 TVector2 evec(compx, compy);
1558 if(jev==1) circ=2*eval[0];
1559 if(jev==0) circ=2*eval[1];
1590 AliVParticle *vp1 = 0x0;
1591 AliVParticle *vp2 = 0x0;
1592 std::vector<int> ordindex;
1597 if(ordindex.size()<2)
return -1;
1601 Printf(
"AliVParticle associated to Leading constituent not found");
1607 Printf(
"AliVParticle associated to Subleading constituent not found");
1627 return LeSub(jet, jetContNb);
1656 AliVParticle *vp1 = 0x0;
1661 Printf(
"AliVParticle associated to constituent not found");
1669 mxx += ppt*ppt*deta*deta;
1670 myy += ppt*ppt*dphi*dphi;
1671 mxy -= ppt*ppt*deta*TMath::Abs(dphi);
1677 if(sump2==0)
return 0;
1679 Double_t ele[4] = {mxx , mxy , mxy , myy };
1680 TMatrixDSym m0(2,ele);
1683 TMatrixDSymEigen m(m0);
1685 TMatrixD evecm = m.GetEigenVectors();
1686 eval = m.GetEigenValues();
1690 if (eval[0] < eval[1]) jev = 1;
1693 evec0 = TMatrixDColumn(evecm, jev);
1696 TVector2 evec(compx, compy);
1698 if(jev==1) sig=TMath::Sqrt(TMath::Abs(eval[0])/sump2);
1699 if(jev==0) sig=TMath::Sqrt(TMath::Abs(eval[1])/sump2);
1713 return Sigma2(jet, jetContNb);
1733 TClonesArray *TracksArray = NULL;
1734 TClonesArray *TracksArrayMC = NULL;
1737 else TracksArray = PartCont->GetArray();
1740 if(!PartContMC || !TracksArrayMC)
return -99999;
1743 if(!PartCont || !TracksArray)
return -99999;
1747 AliAODTrack *Track = 0x0;
1752 Int_t triggers[100];
1753 for (
Int_t iTrigger=0; iTrigger<100; iTrigger++) triggers[iTrigger] = 0;
1757 else NTracks = TracksArray->GetEntriesFast();
1759 for(
Int_t i=0; i < NTracks; i++){
1762 if (!Track)
continue;
1763 if(TMath::Abs(Track->Eta())>0.9)
continue;
1764 if (Track->Pt()<0.15)
continue;
1765 if ((Track->Pt() >= minpT) && (Track->Pt()< maxpT)) {
1772 if((Track = static_cast<AliAODTrack*>(PartCont->
GetAcceptTrack(i)))){
1773 if (!Track)
continue;
1774 if(TMath::Abs(Track->Eta())>0.9)
continue;
1775 if (Track->Pt()<0.15)
continue;
1776 if ((Track->Pt() >= minpT) && (Track->Pt()< maxpT)) {
1785 if (iTT == 0)
return -99999;
1786 Int_t nbRn = 0, index = 0 ;
1787 TRandom3* random =
new TRandom3(0);
1788 nbRn = random->Integer(iTT);
1789 index = triggers[nbRn];
1798 if (vphi < -1*TMath::Pi()) vphi += (2*TMath::Pi());
1799 else if (vphi > TMath::Pi()) vphi -= (2*TMath::Pi());
1800 if (mphi < -1*TMath::Pi()) mphi += (2*TMath::Pi());
1801 else if (mphi > TMath::Pi()) mphi -= (2*TMath::Pi());
1802 double dphi = mphi-vphi;
1803 if (dphi < -1*TMath::Pi()) dphi += (2*TMath::Pi());
1804 else if (dphi > TMath::Pi()) dphi -= (2*TMath::Pi());
1825 if(!ietrack->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA))
return kFALSE;
1826 if(TMath::Abs(ietrack->Eta())>0.8)
return kFALSE;
1827 if(ietrack->GetTPCNcls() <
fTPCnCut)
return kFALSE;
1828 if (ietrack->GetITSNcls() <
fITSncut)
return kFALSE;
1829 if(!ietrack->IsOn(AliAODTrack::kITSrefit))
return kFALSE;
1830 if(!ietrack->IsOn(AliAODTrack::kTPCrefit))
return kFALSE;
1831 if(!(ietrack->HasPointOnITSLayer(0) && ietrack->HasPointOnITSLayer(1)))
return kFALSE;
1832 if ((ietrack->Pt()<0.5) || (ietrack->Pt()>4))
return kFALSE;
1834 Bool_t kinkmotherpass = kTRUE;
1835 for(
Int_t kinkmother = 0; kinkmother < nMother; kinkmother++) {
1836 if(ietrack->GetID() == listMother[kinkmother]) {
1837 kinkmotherpass = kFALSE;
1841 if(!kinkmotherpass)
return kFALSE;
1843 Double_t d0z0[2]={-999,-999}, cov[3];
1845 if(ietrack->PropagateToDCA(pVietx,
fVevent->GetMagneticField(), 20., d0z0, cov))
1846 if(TMath::Abs(d0z0[0]) >
fDcaXYcut || TMath::Abs(d0z0[1]) >
fDcaZcut)
return kFALSE;
1856 if(!aetrack->TestFilterMask(AliAODTrack::kTrkTPCOnly))
return kFALSE;
1857 if(aetrack->Pt() <
fAssPtCut)
return kFALSE;
1858 if(TMath::Abs(aetrack->Eta())>0.9)
return kFALSE;
1859 if(aetrack->GetTPCNcls() <
fAssTPCnCut)
return kFALSE;
1860 if (
fAssITSrefitCut && !(aetrack->GetStatus()&AliAODTrack::kITSrefit))
return kFALSE;
1861 if(!(aetrack->GetStatus()&AliAODTrack::kTPCrefit))
return kFALSE;
Float_t Angularity(AliEmcalJet *jet, Int_t jetContNb)
TClonesArray * fMCarray
MC particle.
Double_t GetFirstOrderSubtractedAngularity() const
Float_t GetJetLeSub(AliEmcalJet *jet, Int_t jetContNb)
Bool_t IsFromHFdecay(AliAODMCParticle *particle)
const TString & GetRhoName() const
Double_t GetSecondOrderSubtractedSigma2() const
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
Bool_t FillHistograms()
Function filling histograms.
Float_t GetPartonEta6() const
AliEmcalJet * ClosestJet() const
AliJetContainer * GetJetContainer(Int_t i=0) const
Float_t GetPartonEta7() const
Double_t GetSecondOrderSubtractedConstituent() const
Float_t GetPythiaEventWeight() const
Container with name, TClonesArray and cuts for particles.
Double_t GetPi0weight(Double_t mcPi0pT) const
Float_t GetPartonPhi7() const
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
Int_t GetNumberOfPairs(AliAODTrack *track, const AliVVertex *pVtx, Int_t nMother, Double_t listMother[])
Bool_t PhotElecTrackCuts(const AliVVertex *pVtx, AliAODTrack *aetrack, Int_t nMother, Double_t listMother[])
Float_t Circularity(AliEmcalJet *jet, Int_t jetContNb)
Double_t GetSecondOrderSubtractedpTD() const
Bool_t RetrieveEventObjects()
Double_t GetFirstOrderSubtractedLeSub() const
AliAnalysisTaskEmcalHfeTagging()
void UserCreateOutputObjects()
Float_t GetJetCircularity(AliEmcalJet *jet, Int_t jetContNb)
Int_t GetPartonFlag7() const
Container for particles within the EMCAL framework.
Float_t Sigma2(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetPartonPhi6() const
Int_t TrackAt(Int_t idx) const
Double_t GetFirstOrderSubtractedpTD() const
UShort_t GetNumberOfTracks() const
TString kData
Declare data MC or deltaAOD.
Float_t PTD(AliEmcalJet *jet, Int_t jetContNb)
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
const TString & GetRhoMassName() const
Double_t GetSecondOrderSubtractedLeSub() const
Int_t GetPartonFlag6() const
Double_t GetEtaweight(Double_t mcEtapT) const
AliParticleContainer * GetParticleContainer() const
Double_t GetFirstOrderSubtractedConstituent() const
JetSelectionType fJetSelection
Bool_t IsPrimary(AliAODMCParticle *particle)
TH2F * fnULSmLSpairsPerElectron
Float_t GetJetMass(AliEmcalJet *jet, Int_t jetContNb)
Double_t GetSecondOrderSubtractedAngularity() const
Bool_t InclElecTrackCuts(const AliVVertex *pVtx, AliAODTrack *ietrack, Int_t nMother, Double_t listMother[])
Double_t RelativePhi(Double_t mphi, Double_t vphi)
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
Double_t fCent
!event centrality
AliVEvent * fVevent
AOD object.
Double_t GetSecondOrderSubtracted() const
AliEmcalJet * GetNextAcceptJet()
void Terminate(Option_t *option)
void GetNumberOfElectrons(AliEmcalJet *jet, Int_t jetContNb, Int_t nMother, Double_t listMother[], Int_t &nIncElec, Int_t &nPhotElec, Double_t &pElec, Double_t &ptElec, Bool_t &hasElec)
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Float_t LeSub(AliEmcalJet *jet, Int_t jetContNb)
virtual ~AliAnalysisTaskEmcalHfeTagging()
Double_t GetRhoVal(Int_t i=0) const
void GetWeightAndDecay(AliAODMCParticle *particle, Int_t &decay, Double_t &weight)
Double_t GetFirstOrderSubtractedCircularity() const
Float_t fMinFractionShared
AliAODMCParticle * fMCparticle
stack
AliEmcalList * fOutput
!output list
TH1F * fnIncSubPhotElecPerJet
Float_t GetJetCoronna(AliEmcalJet *jet, Int_t jetContNb)
Double_t GetSecondOrderSubtractedCircularity() const
AliTrackContainer * GetTrackContainer(Int_t i=0) const
Store some informaion about a Pythia eventThis class is used to store some information about a Pythia...
void SetMakeGeneralHistograms(Bool_t g)
Float_t GetJetAngularity(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetSigma2(AliEmcalJet *jet, Int_t jetContNb)
virtual AliVTrack * GetAcceptTrack(Int_t i=-1) const
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
void GetNumberOfTrueElectrons(AliEmcalJet *jet, Int_t jetContNb, Int_t nMother, Double_t listMother[], Int_t &nTrueElec, Int_t &nTrueHFElec)
const AliEmcalPythiaInfo * GetPythiaInfo() const
AliAODMCHeader * fMCheader
MC array.
Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2=0x0) const
Declaration of class AliEmcalPythiaInfo.
JetShapeType fJetShapeType
void UserCreateOutputObjects()
Main initialization function on the worker.
Double_t GetFirstOrderSubtractedSigma2() const
Bool_t IsFromLMdecay(AliAODMCParticle *particle)
AliEmcalJetShapeProperties * GetShapeProperties() const
Int_t SelectTrigger(Float_t minpT, Float_t maxpT)
TH1F * fnElecOverPartPerJet
AliPIDResponse * fpidResponse
VEvent.
Float_t GetJetpTD(AliEmcalJet *jet, Int_t jetContNb)
const AliVVertex * spdVtx
Float_t Coronna(AliEmcalJet *jet, Int_t jetContNb)
Float_t GetPartonPt7() const
TTree * fTreeObservableTagging
Double_t GetFirstOrderSubtracted() const
Container for jet within the EMCAL jet framework.
std::vector< int > GetPtSortedTrackConstituentIndexes(TClonesArray *tracks) const
Float_t GetPartonPt6() const
TH2F * fnTPCTrueParticles[15]
Float_t GetJetNumberOfConstituents(AliEmcalJet *jet, Int_t jetContNb)
TH1F * fnTrueHFElecPerJet
AliEmcalJet * GetJet(Int_t i) const