1 #ifndef ALITRACKLETDNDETATASK_H
2 #define ALITRACKLETDNDETATASK_H
3 #include <AliAnalysisTaskSE.h>
6 #include <TGeoGlobalMagField.h>
9 #include <AliVVertex.h>
10 #include <AliVertex.h>
11 #include <AliVMultiplicity.h>
12 #include <AliMultiplicity.h>
13 #include <AliAnalysisManager.h>
14 #include <AliVEventHandler.h>
15 #include <AliESDInputHandlerRP.h>
16 #include <AliMultSelection.h>
17 #include <AliITSMultRecBg.h>
18 #include <AliCDBManager.h>
19 #include <AliCDBEntry.h>
20 #include <AliCDBPath.h>
22 #include <AliGeomManager.h>
23 #include <TGeoManager.h>
27 class AliMultiplicity;
28 class AliAnalysisDataContainer;
29 class AliITSMultRecBg;
30 class AliMultSelection;
31 class TGeoGlobalMagField;
103 virtual const char*
Name()
const = 0;
121 const TAxis& etaAxis,
122 const TAxis& ipzAxis,
123 const TAxis& deltaAxis,
124 const TAxis& dThetaAxis,
125 const TAxis& dPhiAxis) = 0;
164 Color_t
color=kBlack,
202 virtual const char*
Name()
const {
return fName.Data(); }
214 const TAxis& etaAxis,
215 const TAxis& ipzAxis,
216 const TAxis& deltaAxis,
217 const TAxis& dThetaAxis,
218 const TAxis& dPhiAxis);
291 virtual const char*
Name()
const;
304 const TAxis& etaAxis,
305 const TAxis& ipzAxis,
306 const TAxis& deltaAxis,
307 const TAxis& dThetaAxis,
308 const TAxis& dPhiAxis);
356 return (
fMin <= value && value <
fMax);
530 const char* resFile=0);
539 if (m.Contains(
"nor")) flags |=
kNormal;
541 if (m.Contains(
"rot")) flags |=
kRotation;
776 if (&o ==
this)
return *
this;
813 return "alien://Folder=/alice/data/2010/OCDB";
860 virtual const AliVVertex*
FindIP(AliVEvent* event,
878 const AliMultiplicity* mult)
const
894 AliITSMultRecBg* reco,
897 AliMultiplicity* mult);
924 AliITSMultRecBg* reco,
925 AliMultiplicity* mult,
926 Int_t trackletNumber,
949 const AliVVertex* ip);
977 const AliVVertex*& ip,
978 AliMultiplicity*& mult,
990 const AliVVertex* ip,
991 AliMultiplicity* mult,
1004 return new CentBin(c1, c2, recFlags);
1063 const TAxis& etaAxis,
1064 const TAxis& ipzAxis,
1065 const TAxis& deltaAxis,
1066 const TAxis& dThetaAxis,
1067 const TAxis& dPhiAxis)
1072 fEtaVsIPz =
Make2D(*c,
"etaVsIPz",
1073 Form(
"#eta vs IP_{#it{z}} %s",Name()),
1074 fColor,fStyle, etaAxis, ipzAxis);
1075 fEtaVsDelta =
Make2D(*c,
"etaVsDelta",
"",fColor,fStyle,etaAxis,deltaAxis);
1076 fDPhiVsdTheta =
Make2D(*c,
"dphiVsdtheta",
"",fColor,fStyle,
1077 dPhiAxis,dThetaAxis);
1078 fDPhiVsdThetaX =
Make2D(*c,
"dphiVsdthetaX",
"",fColor,fStyle,
1079 dPhiAxis,dThetaAxis);
1080 fDPhiVsdThetaX->SetXTitle(
"#Delta#phi-#delta#phi");
1081 fDPhiVsdThetaX->SetYTitle(
"#Delta#theta/sin^{2}(#theta)");
1082 fDelta =
Make1D(*c,
"delta", Form(
"#Delta %s", Name()),
1083 fColor, fStyle,deltaAxis);
1102 Container* result = CreateContainer(*parent);
1109 result->Add(etaVsIPz);
1113 delta->Scale(1./nEvents);
1114 Double_t maxDelta = fDelta->GetXaxis()->GetXmax();
1124 etaVsDelta ->Scale(1./nEvents);
1125 dPhiVsdThetaX->Scale(1./nEvents);
1126 dPhiVsdTheta ->Scale(1./nEvents);
1128 TH1* deltaIntg = etaVsDelta->ProjectionX(
"deltaTailInt");
1129 deltaIntg->SetDirectory(0);
1131 deltaIntg->SetYTitle(Form(
"#int_{%3.1f}^{%4.1f}d#Delta",
1132 tailDelta, maxDelta));
1133 for (
Int_t i = 1; i <= deltaIntg->GetNbinsX(); i++) {
1134 TH1* tmp = etaVsDelta->ProjectionY(
"tmp",i,i);
1135 intg =
Integrate(tmp, tailDelta, maxDelta, eintg);
1136 deltaIntg->SetBinContent(i, intg);
1137 deltaIntg->SetBinError (i, eintg);
1140 result->Add(deltaIntg);
1154 if (delta > fEtaVsDelta->GetYaxis()->GetXmax())
return;
1155 fEtaVsDelta ->Fill(eta, delta, weight);
1156 fDPhiVsdThetaX ->Fill(dphis, dthetax, weight);
1157 fDPhiVsdTheta ->Fill(dphi, dtheta, weight);
1158 fDelta ->Fill(delta, weight);
1159 if (ipZ > -999.) fEtaVsIPz->Fill(eta, ipZ, weight);
1195 return Form(
"%s%03dd%02d_%03dd%02d",
"cent",
1201 const TAxis& etaAxis,
1202 const TAxis& ipzAxis,
1203 const TAxis& deltaAxis,
1204 const TAxis& dThetaAxis,
1205 const TAxis& dPhiAxis)
1209 TIter next(fHistoSets);
1211 while ((set = static_cast<HistoSet*>(next())))
1219 TIter next(fHistoSets);
1221 while ((set = static_cast<HistoSet*>(next())))
1232 if (!set || !dataCon)
return 0;
1235 if (!bgCon)
return 0;
1237 Bool_t isComb = set->
fName.Contains(
"combinatorics", TString::kIgnoreCase);
1241 Double_t dataIntg =
GetD(dataCon,
"deltaTailIntg", -1);
1242 Double_t dataIntE =
GetD(dataCon,
"deltaTailIntE", -1);
1245 if (dataIntg <= 0 || bgIntg <= 0)
return bgCon;
1247 AliInfoF(
"int(measured) Delta tail: %f +/- %f", dataIntg, dataIntE);
1248 AliInfoF(
"int(%s) Delta tail: %f +/- %f", bgCon->GetName(),
1252 Double_t scale =
RatioE(dataIntg, dataIntE, bgIntg, bgIntE, scaleE);
1254 TH1* bgDelta =
GetH1(bgCon,
"delta");
1255 if (!bgDelta)
return bgCon;
1257 TH1* dataDelta =
GetH1(dataCon,
"delta");
1259 AliWarningF(
"No delta distribution in %s", dataCon->GetName());
1262 TH1* deltaScaled =
CopyH1(bgCon,
"delta",
"deltaScaled");
1263 bgCon->Add(deltaScaled);
1264 deltaScaled->SetLineStyle(7);
1265 deltaScaled->SetTitle(Form(
"%s#times%6.3f", bgDelta->GetTitle(), scale));
1266 if (dataDelta) deltaScaled->SetMarkerStyle(dataDelta->GetMarkerStyle());
1267 else deltaScaled->SetMarkerStyle(20);
1270 AliInfoF(
"Scaling %s Delta dist by %f +/- %f",
1271 bgCon->GetName(), scale, scaleE);
1272 Scale(deltaScaled, scale, scaleE);
1274 TH2* backgroundEst =
CopyH2(bgCon,
"etaVsIPz",
"backgroundEst");
1275 backgroundEst->SetTitle(
"Background");
1276 if (!isComb)
Scale(backgroundEst, scale, scaleE);
1278 bgCon->Add(backgroundEst);
1280 TH2* signalEst =
CopyH2(dataCon,
"etaVsIPz",
"signalEst");
1281 signalEst->SetMarkerStyle(backgroundEst->GetMarkerStyle());
1282 signalEst->SetMarkerColor(backgroundEst->GetMarkerColor());
1283 signalEst->SetMarkerSize (backgroundEst->GetMarkerSize());
1284 signalEst->SetLineStyle (backgroundEst->GetLineStyle());
1285 signalEst->SetLineColor (backgroundEst->GetLineColor());
1286 signalEst->SetLineWidth (backgroundEst->GetLineWidth());
1287 signalEst->SetFillStyle (backgroundEst->GetFillStyle());
1288 signalEst->SetFillColor (backgroundEst->GetFillColor());
1289 signalEst->SetTitle(
"Signal");
1290 signalEst->Add(backgroundEst,-1);
1291 bgCon->Add(signalEst);
1293 TH2* measured =
GetH2(dataCon,
"etaVsIPz");
1294 TH2* beta =
static_cast<TH2*
>(backgroundEst->Clone(
"beta"));
1295 beta->SetTitle(
"#beta");
1296 beta->SetDirectory(0);
1297 beta->Divide(measured);
1300 TH2* bg1MBeta =
static_cast<TH2*
>(beta->Clone(
"oneMinusBeta"));
1301 bg1MBeta->SetTitle(
"1-#beta");
1302 bg1MBeta->SetDirectory(0);
1304 bgCon->Add(bg1MBeta);
1305 for (
Int_t ix = 1; ix <= bg1MBeta->GetNbinsX(); ix++) {
1306 for (
Int_t iy = 1; iy <= bg1MBeta->GetNbinsY(); iy++) {
1307 bg1MBeta->SetBinContent(ix,iy,1);
1308 bg1MBeta->SetBinError (ix,iy,0);
1311 bg1MBeta->Add(beta,-1);
1324 Container* result = CreateContainer(*parent);
1325 Printf(
"Bin %5.1f-%5.1f%%: %10d events", fMin, fMax,
Int_t(nEvents));
1329 ipZ->Scale(1./nEvents);
1332 TIter next(fHistoSets);
1334 while ((set = static_cast<HistoSet*>(next()))) {
1335 if (set == fDataSet) {
1339 EstimateBackground(dataRes, set, result, deltaCut, deltaTail);
1360 if (set ==
kNormal) hset = fDataSet;
1362 else if (set ==
kRotation) hset = fRotSet;
1364 if (!hset)
return false;
1366 hset->
Fill(isSignal ? ipZ : -1000,eta,dPhi,dPhiS,dTheta,dThetaX,delta,weight);
1413 "ESD:AliESDRun.,AliESDHeader.,AliMultiplicity.,"
1414 "SPDVertex.,PrimaryVertex.";
1416 DefineOutput(1, Container::Class());
1417 DefineOutput(2, Container::Class());
1423 lDebug = DebugLevel();
1430 const AliVVertex* ip = 0;
1431 AliMultiplicity* mult = 0;
1432 TTree* clusters = 0;
1434 AliWarningF(
"Event didn't pass %f, %p, %p, %p",
1435 cent, ip, mult, clusters);
1448 lDebug = DebugLevel();
1451 results->SetName(Form(
"%sResults",GetName()));
1452 results->SetOwner();
1457 AliWarning(
"No sum container found!");
1465 PostData(2, results);
1469 const char* resFile)
1473 AliError(
"No analysis manager to connect to.");
1483 if (sumFile && sumFile[0] !=
'\0') sumOut = sumFile;
1484 if (resFile && resFile[0] !=
'\0') resOut = resFile;
1485 else if (sumFile && sumFile[0] !=
'\0') resOut = sumFile;
1488 if (sumOut.IsNull() || sumOut.EqualTo(
"default", TString::kIgnoreCase))
1489 sumOut = AliAnalysisManager::GetCommonFileName();
1491 if (resOut.IsNull() || resOut.EqualTo(
"default", TString::kIgnoreCase))
1492 resOut = AliAnalysisManager::GetCommonFileName();
1495 mgr->ConnectInput(
this, 0, mgr->GetCommonInputContainer());
1498 if (!sumOut.EqualTo(
"none", TString::kIgnoreCase)) {
1499 TString sumName(Form(
"%sSums", GetName()));
1500 AliAnalysisDataContainer* sumCon =
1501 mgr->CreateContainer(sumName, TList::Class(),
1502 AliAnalysisManager::kOutputContainer, sumOut);
1503 mgr->ConnectOutput(
this, 1, sumCon);
1507 if (!resOut.EqualTo(
"none", TString::kIgnoreCase)) {
1508 TString resName(Form(
"%sResults", GetName()));
1509 AliAnalysisDataContainer* resCon =
1510 mgr->CreateContainer(resName, TList::Class(),
1511 AliAnalysisManager::kParamContainer, resOut);
1512 mgr->ConnectOutput(
this, 2, resCon);
1520 if (shiftedDPhiCut < 0)
1523 Printf(
"%s: %s", ClassName(), GetName());
1524 Printf(
" %22s: 0x%x",
"Reconstruction mode",
fRecMode);
1525 Printf(
" %22s: %d",
"Scale by sin^2(theta)",
fScaleDTheta);
1526 Printf(
" %22s: %f",
"Delta phi shift",
fDPhiShift);
1527 Printf(
" %22s: %f",
"Shifted Delta phi cut", shiftedDPhiCut);
1529 Printf(
" %22s: %f",
"Delta cut",
fDeltaCut);
1530 Printf(
" %22s: %f",
"max Delta",
fMaxDelta);
1531 Printf(
" %22s: %f",
"tail Delta",
fTailDelta);
1533 Printf(
" %22s: %f",
"Delta phi window",
fDPhiWindow);
1553 TAxis dThetaAxis(100, -maxdTheta,+maxdTheta);
1554 TAxis dPhiAxis (100, -maxdPhi, +maxdPhi);
1556 Form(
"#Delta=[(#Delta#phi-#delta#phi)/#sigma_{#phi}]^{2}+"
1557 "[#Delta#theta%s/#sigma_{#theta}]^{2}",
1559 FixAxis(dThetaAxis,
"#Delta#theta");
1560 FixAxis(dPhiAxis,
"#Delta#phi");
1566 deltaAxis, dThetaAxis, dPhiAxis);
1579 deltaAxis, dThetaAxis, dPhiAxis);
1588 Printf(
"Now initialising CDB");
1591 AliError(
"No manager defined!");
1596 const char* cdbNames[] = {
"CDBconnect",
"cdb", 0 };
1597 const char** ptr = cdbNames;
1600 if (cdbConnect && cdbConnect->IsA()->InheritsFrom(
"AliTaskCDBconnect")) {
1601 AliInfoF(
"CDB-connect task (%s: %s) present, do nothing",
1602 cdbConnect->ClassName(), *ptr);
1608 Printf(
"Get the CDB manager");
1609 AliCDBManager* cdbMgr = AliCDBManager::Instance();
1611 AliError(
"Failed to get instance of CDB manager");
1616 AliWarningF(
"Using reference CDB storage \"%s\" and run \"%d\"",
1617 refUrl.Data(), refRun);
1622 cdbMgr->SetDefaultStorage(refUrl);
1624 Printf(
"Get Geometry entry");
1625 AliCDBEntry* cdbEnt = cdbMgr->Get(
"GRP/Geometry/Data", refRun);
1627 AliErrorF(
"No geometry found from %d", refRun);
1631 Printf(
"Set Geometry");
1632 AliGeomManager::SetGeometry(static_cast<TGeoManager*>(cdbEnt->GetObject()));
1634 Printf(
"Misalign geometry");
1635 if (!AliGeomManager::ApplyAlignObjsToGeom(
"ITS",refRun,-1,-1)) {
1636 AliErrorF(
"Failed to misalign geometry from %d", refRun);
1646 if (!AliGeomManager::GetGeometry()) {
1647 AliError(
"No geometry loaded, needed for reconstruction");
1648 AliError(
"Add the AliTaskCDBconnect to the train");
1666 fContainer->SetName(Form(
"%sSums",GetName()));
1672 fIPz ->SetFillStyle(0);
1673 fCent ->SetFillStyle(0);
1676 TAxis phiAxis(80, 0,TMath::TwoPi());
FixAxis(phiAxis,
"#phi");
1677 TAxis ph2Axis(160,0,TMath::TwoPi());
FixAxis(ph2Axis,
"#phi");
1680 "Used clusters on layer 0",
1681 kBlack, 1, zAxis, phiAxis);
1683 "Used clusters on layer 1",
1684 kBlack, 1, zAxis, ph2Axis);
1686 "All clusters on layer 0",
1687 kBlack, 1, zAxis, phiAxis);
1689 "All clusters on layer 1",
1690 kBlack, 1, zAxis, ph2Axis);
1692 fStatus =
new TH1F(
"status",
"Status of task",
1695 fStatus->SetMarkerColor(kMagenta+2);
1696 fStatus->SetLineColor(kMagenta+2);
1697 fStatus->SetFillColor(kMagenta+2);
1703 fStatus->SetXTitle(
"Event have");
1704 fStatus->SetYTitle(
"# Events");
1705 fStatus->GetXaxis()->SetBinLabel(
kAll,
"Been seen");
1722 params->SetName(
"parameters");
1725 params->Add(
new IP(
"RecMode",
fRecMode,
'f'));
1727 params->Add(
new DP(
"DPhiShift",
fDPhiShift,
'f'));
1730 params->Add(
new DP(
"DeltaCut",
fDeltaCut,
'f'));
1731 params->Add(
new DP(
"MaxDelta",
fMaxDelta,
'f'));
1732 params->Add(
new DP(
"TailDelta",
fTailDelta,
'f'));
1734 params->Add(
new DP(
"DPhiWindow",
fDPhiWindow,
'f'));
1746 Printf(
"This worker had %f events within cuts",
1747 fIPz->GetEntries());
1758 Printf(
"Event summary:");
1761 fStatus->GetXaxis()->GetBinLabel(i));
1763 fIPz ->Scale(1./nEvents);
1786 while ((bin = static_cast<CentBin*>(next()))) {
1793 if (!needed)
return 0;
1795 AliVEventHandler* inh = mgr->GetInputEventHandler();
1796 if (!inh->IsA()->InheritsFrom(AliESDInputHandlerRP::Class())) {
1797 AliErrorF(
"Not the right kind of input handler: %s",
1801 AliESDInputHandlerRP* rph =
static_cast<AliESDInputHandlerRP*
>(inh);
1802 TTree* tree = rph->GetTreeR(
"ITS");
1804 AliError(
"Tree of clusters (rec.points) not found");
1812 if (
fCentMethod.EqualTo(
"MB", TString::kIgnoreCase))
return 0;
1813 AliMultSelection* cent =
1814 static_cast<AliMultSelection*
>(
event->FindListObject(
"MultSelection"));
1816 AliWarning(
"No centrality in event");
1821 if (centPer < -safety)
return -2;
1822 if (centPer < +safety) centPer = safety;
1823 else if (centPer > 100-safety) centPer = 100-safety;
1826 AliWarningF(
"Centrality = %f out of range [%f,%f]",
1837 const AliVVertex* ip =
event->GetPrimaryVertex();
1838 if (ip->GetNContributors() <= 0) {
1839 AliWarning(
"Not enough contributors for IP");
1843 if (ip->IsFromVertexerZ()) {
1846 ip->GetCovarianceMatrix(covar);
1847 Double_t sigmaZ = TMath::Sqrt(covar[5]);
1848 if (sigmaZ >= maxZError) {
1849 AliWarningF(
"IPz resolution = %f >= %f", sigmaZ, maxZError);
1854 if (ip->IsA()->InheritsFrom(AliVertex::Class())) {
1855 const AliVertex* ipv =
static_cast<const AliVertex*
>(ip);
1857 if (ipv->GetDispersion() >= maxDispersion) {
1858 AliWarningF(
"IP dispersion = %f >= %f",
1859 ipv->GetDispersion(), maxDispersion);
1868 AliWarningF(
"IPz = %fcm out of range [%f,%f]cm",
1878 UInt_t evBits = fInputHandler->IsEventSelected();
1879 Bool_t trgOK = evBits & fOfflineTriggerMask;
1885 AliITSMultRecBg* reco,
1888 AliMultiplicity* mult)
1901 Int_t nTracklets = mult->GetNumberOfTracklets();
1902 for (
Int_t trackletNumber = 0; trackletNumber < nTracklets;
1905 Double_t theta = mult->GetTheta(trackletNumber);
1906 Double_t phi = mult->GetPhi(trackletNumber);
1907 Double_t dTheta = mult->GetDeltaTheta(trackletNumber);
1908 Double_t dPhi = mult->GetDeltaPhi(trackletNumber);
1909 Double_t delta = mult->CalcDist(trackletNumber);
1910 Double_t eta = -TMath::Log(TMath::Tan(theta/2));
1913 if (
fScaleDTheta) dThetaX /= TMath::Power(TMath::Sin(theta),2);
1924 if (delta >
fDeltaCut) isSignal =
false;
1928 FillBins(toRun, reco, mult, trackletNumber, isSignal, ipZ,
1929 eta, dPhi, dPhiS, dTheta, dThetaX, delta, weight);
1932 if (isSignal)
fEtaPhi->Fill(eta,phi);
1940 switch (reco->GetRecType()) {
1942 case AliITSMultRecBg::kBgInj:
return kInjection;
1943 case AliITSMultRecBg::kBgRot:
return kRotation;
1945 AliWarningF(
"Unsupported reconstruction mode: %d", reco->GetRecType());
1952 AliITSMultRecBg* reco,
1953 AliMultiplicity* mult,
1954 Int_t trackletNumber,
1966 if (mode >= 999)
return;
1968 TIter nextB(&toRun);
1970 while ((bin = static_cast<CentBin*>(nextB())))
1971 bin->
FillSet(mode, isSignal, ipz, eta,
1972 dPhi, dPhiS, dTheta, dThetaX, delta, weight);
1979 const AliVVertex* ip)
1982 AliITSMultRecBg reco;
1983 reco.SetCreateClustersCopy (
true);
1993 reco.SetHistOn (
false);
2004 reco.SetRecType(AliITSMultRecBg::kBgRot);
2011 ipv[0] = ip->GetX();
2012 ipv[1] = ip->GetY();
2013 ipv[2] = ip->GetZ();
2014 reco.Run(clusters, ipv);
2018 reco.GetMultiplicity());
2024 reco.SetRecType(AliITSMultRecBg::kBgInj);
2025 reco.Run(clusters, ipv);
2029 reco.GetMultiplicity());
2042 Int_t nTracklets = reco->GetNTracklets();
2043 for (
Int_t trackletNo = nTracklets; trackletNo--; ) {
2045 Float_t* tracklet = reco->GetTracklet(trackletNo);
2047 Float_t dPhi = tracklet[AliITSMultReconstructor::kTrDPhi];
2048 Float_t dTheta = tracklet[AliITSMultReconstructor::kTrDTheta];
2049 Float_t theta = tracklet[AliITSMultReconstructor::kTrTheta];
2053 Float_t delta = reco->CalcDist(dPhi, dTheta, theta);
2056 Int_t clusterID[] = {
Int_t(tracklet[AliITSMultReconstructor::kClID1]),
2057 Int_t(tracklet[AliITSMultReconstructor::kClID2]) };
2058 for (
Int_t layer = 0; layer < 2; layer++) {
2060 Float_t* cluster = reco->GetClusterOfLayer(layer, clusterID[layer]);
2062 usedClusters[layer]->Fill(cluster[AliITSMultReconstructor::kClZ],
2063 cluster[AliITSMultReconstructor::kClPh]);
2067 for (
Int_t layer = 0; layer < 2; layer++) {
2068 for (
Int_t clusterNo = reco->GetNClustersLayer(layer); clusterNo--; ) {
2069 Float_t* cluster = reco->GetClusterOfLayer(layer, clusterNo);
2070 allClusters[layer]->Fill(cluster[AliITSMultReconstructor::kClZ],
2071 cluster[AliITSMultReconstructor::kClPh]);
2079 const double kRSPD2 = 3.9;
2082 Int_t nTracklets = mult->GetNumberOfTracklets();
2083 for (
Int_t trackletNo = nTracklets; trackletNo--; ) {
2084 Double_t phi = mult->GetPhi(trackletNo);
2085 Double_t z = kRSPD2 / TMath::Tan(mult->GetTheta(trackletNo)) + ipZ;
2086 Double_t dPhi = mult->GetDeltaPhi(trackletNo);
2088 (mult->CalcDist(trackletNo )<=
fDeltaCut))
2093 Int_t nClusters = mult->GetNumberOfSingleClusters();
2094 for (
Int_t clusterNo = nClusters; clusterNo--; ) {
2095 Double_t phi = mult->GetPhiSingle(clusterNo);
2096 Double_t z = kRSPD2 / TMath::Tan(mult->GetThetaSingle(clusterNo)) + ipZ;
2102 const AliVVertex*& ip,
2103 AliMultiplicity*& mult,
2110 AliVEvent*
event = InputEvent();
2112 AliWarning(
"No event");
2125 if (!TGeoGlobalMagField::Instance()->GetField() &&
2126 !event->InitMagneticField()) {
2127 AliWarning(
"Failed to initialize magnetic field");
2132 AliVMultiplicity* vmult =
event->GetMultiplicity();
2133 if (!vmult)
return false;
2134 if (!vmult->IsA()->InheritsFrom(AliMultiplicity::Class())) {
2135 AliWarningF(
"Multiplicity is a %s object", vmult->ClassName());
2138 mult =
static_cast<AliMultiplicity*
>(vmult);
2144 if (needRP && !clusters)
return false;
2149 if (!trg)
return false;
2154 if (!ip)
return false;
2159 if (cent < 0)
return false;
2162 fIPz->Fill(ip->GetZ());
2169 const AliVVertex* ip,
2170 AliMultiplicity* mult,
2178 while ((bin = static_cast<CentBin*>(next()))) {
2179 if (!bin->
Accept(cent))
continue;
2185 if (nAcc <= 0)
return;
2201 Reconstruct(toRun, kInjection, clusters, cent, ip);
2206 Reconstruct(toRun, kRotation, clusters, cent, ip);
2217 #include <AliStack.h>
2218 #include <AliMCEvent.h>
2219 #include <AliGenEventHeader.h>
2220 #include <TParticle.h>
2221 #include <TParticlePDG.h>
2222 #include <TDatabasePDG.h>
2223 #include <TGraphAsymmErrors.h>
2280 const TAxis& etaAxis,
2281 const TAxis& ipzAxis,
2282 const TAxis& deltaAxis,
2283 const TAxis& dThetaAxis,
2284 const TAxis& dPhiAxis);
2360 TH2* primaries)
const;
2509 Printf(
" %22s: %s",
"Reweigh",
fReweigh ?
"yes" :
"no");
2533 return "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual";
2552 const AliVVertex*& ip,
2553 AliMultiplicity*& mult,
2570 const AliMultiplicity* mult)
const;
2591 TParticle* particle,
2629 const Float_t* labels1)
const;
2648 AliITSMultRecBg* reco,
2649 AliMultiplicity* mult,
2650 Int_t trackletNumber,
2718 fPrimaryParentPdg(0),
2719 fSecondaryParentPdg(0),
2735 const TAxis& etaAxis,
2736 const TAxis& ipzAxis,
2737 const TAxis& deltaAxis,
2738 const TAxis& dThetaAxis,
2739 const TAxis& dPhiAxis)
2743 dThetaAxis, dPhiAxis);
2746 fEtaVsIPzMC =
Make2D(*c,
"etaVsIPzMC",
2747 "#eta vs IP_{#it{z}} signal",
2748 kCyan+2,24, etaAxis, ipzAxis);
2749 fEtaVsIPzMC->SetYTitle(
"IP_{#it{z},gen}");
2750 fEtaVsIPzMCSel =
Make2D(*c,
"etaVsIPzMCSel",
2751 "#eta vs IP_{#it{z}} selected signal",
2752 kMagenta+2,24, etaAxis, ipzAxis);
2753 fEtaVsIPzMCSel->SetYTitle(
"IP_{#it{z},rec}");
2754 fPdgMC =
Make1D(*c,
"pdgMC",
"Particle types",
2756 fPdgMC->GetXaxis()->LabelsOption(
"v");
2757 fPrimaryPdg =
Make2D(*c,
"primaryPdg",
"Primary specie",
2758 kBlue+2, 20, pdg, deltaAxis);
2759 fSecondaryPdg =
Make2D(*c,
"secondaryPdg",
"Secondary specie",
2760 kGreen+2, 21, pdg, deltaAxis);
2761 fPrimaryParentPdg =
Make2D(*c,
"primaryParentPdg",
2762 "Parent of primary specie",
2763 kBlue+2, 20, pdg, deltaAxis);
2764 fSecondaryParentPdg =
Make2D(*c,
"secondaryParentPdg",
2765 "Parent of secondary specie",
2766 kGreen+2, 21, pdg, deltaAxis);
2767 fPrimaryPdg->GetXaxis()->LabelsOption(
"v");
2768 fSecondaryPdg->GetXaxis()->LabelsOption(
"v");
2769 fPrimaryParentPdg->GetXaxis()->LabelsOption(
"v");
2770 fSecondaryParentPdg->GetXaxis()->LabelsOption(
"v");
2771 TAxis dIPz(ipzAxis);
2773 dIPz.SetTitle(
"IP_{#it{z}} - IP_{#it{z},gen}");
2774 fIPzVsMC =
Make2D(*c,
"ipzVsGenIPz",
"Resolution vs IP_{#it{z}}",
2775 kCyan+2, 24, ipzAxis, dIPz);
2776 fIPzGen =
Make1D(*c,
"ipzGen",
"Generated IP_{z}",
2777 kCyan+2, 25, ipzAxis);
2778 fIPzSel =
Make1D(*c,
"ipzSel",
"Selected, generated IP_{#it{z}}",
2779 kCyan+2, 21, ipzAxis);
2780 fIPzGen->SetMarkerSize(1.2*fIPzGen->GetMarkerSize());
2781 fIPz->SetMarkerStyle(24);
2782 fIPz->SetMarkerColor(kCyan+2);
2783 fIPz->SetMarkerSize(1.4*
fIPz->GetMarkerSize());
2784 fIPz->SetLineColor(kCyan+2);
2799 dPhi, dPhiS, dTheta, dThetaX,
2800 delta, weight))
return true;
2807 if (!hset)
return false;
2809 hset->
Fill(isSignal ? ipZ : -1000,
2810 eta, dPhi, dPhiS, dTheta, dThetaX, delta, weight);
2823 TH2* pdgHist = (primary ? fPrimaryPdg : fSecondaryPdg);
2824 TH2* parHist = (primary ? fPrimaryParentPdg : fSecondaryParentPdg);
2825 if (pdg >= 0) pdgHist->Fill(bin, delta, weight);
2826 if (parentPdg >= 0) parHist->Fill(parentBin, delta, weight);
2831 fIPzGen->Fill(genIPz);
2832 if (ipZ < -999)
return;
2833 fIPzSel->Fill(genIPz);
2834 fIPzVsMC->Fill(ipZ, ipZ-genIPz);
2846 if (!charged)
return;
2847 fEtaVsIPzMC->Fill(eta, genIPz, weight);
2848 if (ipZ > -999) fEtaVsIPzMCSel->Fill(eta, ipZ, weight);
2856 TH2* primaries)
const
2859 AliWarning(
"No primaries supplied for alpha calculation");
2863 AliWarning(
"No data supplied for alpha calculations");
2866 TH2* data =
GetH2(result,
"signalEst");
2868 alpha->SetName(name);
2869 alpha->SetTitle(title);
2870 alpha->Divide(data);
2881 if (!a1 || !a2)
return 0;
2882 TH2* mst = (a1 ? a1 : a2);
2883 TH2* ret =
static_cast<TH2*
>(mst->Clone(
"fiducial"));
2884 ret->SetTitle(
"Fiducial cut");
2885 ret->SetDirectory(0);
2886 ret->SetMarkerColor(kBlack);
2887 ret->SetMarkerSize(1);
2888 ret->SetMarkerStyle(1);
2889 ret->SetFillColor(kBlack);
2890 ret->SetFillStyle(1001);
2891 ret->SetLineColor(kBlack);
2894 for (
Int_t ix = 1; ix <= mst->GetNbinsX(); ix++) {
2895 for (
Int_t iy = 1; iy <= mst->GetNbinsY(); iy++) {
2896 Double_t c1 = (a1 ? a1->GetBinContent(ix,iy) : min);
2897 Double_t c2 = (a2 ? a2->GetBinContent(ix,iy) : min);
2898 if ((c1 > min && c1 <= max) ||
2899 (c2 > min && c2 <= max))
2900 ret->SetBinContent(ix,iy,1);
2914 AliWarningF(
"Nothing to make %s from", name);
2918 Int_t last = (cut < 0 ?
2919 orig->GetYaxis()->GetNbins() :
2920 orig->GetYaxis()->FindBin(cut-1e-6));
2922 TH1* proj = orig->ProjectionX(name,first,last,
"e");
2924 AliWarningF(
"Failed to project %s between 0 and %f",
2925 orig->GetName(), cut);
2929 proj->SetMarkerStyle(proj->GetMarkerStyle()+4);
2930 proj->SetMarkerSize(1.2*proj->GetMarkerSize());
2932 proj->SetFillStyle(0);
2933 proj->SetFillColor(0);
2934 proj->SetTitle(title);
2935 proj->SetDirectory(0);
2947 if (intg > 0) proj->Scale(1./intg);
2961 deltaCut, deltaTail);
2969 TProfile* ipzVsMC = fIPzVsMC->ProfileX(fIPzVsMC->GetName());
2970 ipzVsMC->SetYTitle(Form(
"#LT%s#GT",
2971 fIPzVsMC->GetYaxis()->GetTitle()));
2972 result->Add(ipzVsMC);
2973 result->Add(fEtaVsIPzMC);
2974 result->Add(fEtaVsIPzMCSel);
2978 dNdetaAll->SetMarkerSize(1.4*dNdetaAll->GetMarkerSize());
2979 dNdetaAll->SetTitle(
"All events");
2980 dNdetaSel->SetTitle(
"Selected events");
2981 dNdetaAll->SetYTitle(
"d#it{N}_{ch}/d#eta");
2982 dNdetaSel->SetYTitle(
"d#it{N}_{ch}/d#eta");
2983 result->Add(dNdetaAll);
2984 result->Add(dNdetaSel);
2986 result->Add(MakePdgProj(
"allPrimaryPdg",
"All primary particle PDGs",
2988 result->Add(MakePdgProj(
"allSecondaryPdg",
"All secondary particle PDGs",
2990 result->Add(MakePdgProj(
"cutPrimaryPdg",
"Selected primary particle PDGs",
2992 result->Add(MakePdgProj(
"cutSecondaryPdg",
"Selected secondary particle PDGs",
2994 result->Add(MakePdgProj(
"allPrimaryParentPdg",
2995 "All primary particle parents PDGs",
2997 result->Add(MakePdgProj(
"allSecondaryParentPdg",
2998 "All secondary particle parents PDGs",
3000 result->Add(MakePdgProj(
"cutPrimaryParentPdg",
3001 "Selected primary particle parents PDGs",
3003 result->Add(MakePdgProj(
"cutSecondaryParentPdg",
3004 "Selected secondary particle parents PDGs",
3012 ipzEff->SetName(
"ipzEff");
3013 ipzEff->SetTitle(
"IP_{z} efficiency");
3014 ipzEff->BayesDivide(fIPzSel, fIPzGen);
3015 ipzEff->SetMarkerStyle(20);
3016 ipzEff->SetMarkerColor(kRed+2);
3017 ipzEff->SetLineColor(kRed+2);
3018 ipzEff->SetFillColor(kRed-2);
3019 ipzEff->SetFillStyle(1001);
3020 fIPzGen->Scale(1./fIPzGen->GetEntries());
3021 fIPzSel->Scale(1./fIPzGen->GetEntries());
3022 result->Add(ipzEff);
3024 const char* subs[] = {
"injection",
3026 "uncorrelatedCombinatorics",
3028 const char** ptr = subs;
3032 AliWarningF(
"Container %s not found in %s", *ptr, result->GetName());
3035 TH2* a1 = MakeAlpha(
"alpha",
"#alpha all MC events",
3037 TH2* a2 = MakeAlpha(
"alphaSel",
"#alpha selected MC events",sub,
3039 TH2* am = MakeAlphaMask(a1, a2);
3054 fMCStatus =
new TH1F(
"statusMC",
"Status of task (MC part)",
3075 fStatus->SetFillColor(kCyan+2);
3076 fStatus->SetLineColor(kCyan+2);
3080 fIPz ->SetMarkerSize(1.2*
fIPz->GetMarkerSize());
3081 fIPz ->SetMarkerStyle(24);
3082 fIPz ->SetMarkerColor(kCyan+2);
3083 fIPz ->SetLineColor(kCyan+2);
3085 fCent ->SetMarkerSize(1.2*
fIPz->GetMarkerSize());
3086 fCent ->SetMarkerStyle(24);
3087 fCent ->SetMarkerColor(kCyan+2);
3088 fCent ->SetLineColor(kCyan+2);
3092 const AliVVertex*& ip,
3093 AliMultiplicity*& mult,
3100 AliMCEvent* mcEvent = MCEvent();
3102 AliWarning(
"No MC event found");
3108 if (!mcEvent->Stack()) {
3109 AliWarning(
"No particle stack in MC event");
3116 AliGenEventHeader* genHeader = mcEvent->GenEventHeader();
3118 AliWarning(
"No generator header found in MC event");
3121 genHeader->PrimaryVertex(genIP);
3136 if (
FillPrimaries(cent, ip ? ip->GetZ() : -1000, genIP[2], dataOK))
3155 const AliMultiplicity* mult)
const
3160 Int_t label[] = { mult->GetLabel(trackletNumber, 0),
3161 mult->GetLabel(trackletNumber, 1) };
3163 if (label[0] == label[1]) nLayer = 1;
3164 for (
Int_t layer = 0; layer < nLayer; layer++) {
3165 if (label[layer] < 0)
3168 TParticle* particle = MCEvent()->Stack()->Particle(label[layer]);
3173 weight *= particle->GetWeight();
3183 AliStack* stack = MCEvent()->Stack();
3184 Int_t nTracks = stack->GetNtrack();
3185 for (
Int_t trackNo = nTracks; trackNo--;) {
3186 TParticle* particle = stack->Particle(trackNo);
3187 if (!particle)
continue;
3188 particle->SetWeight(
LookupWeight(trackNo, particle, cent));
3193 TParticle* particle,
3199 AliStack* stack = MCEvent()->Stack();
3200 if (!stack->IsPhysicalPrimary(trackNo)) {
3203 Int_t mother = particle->GetFirstMother();
3204 return LookupWeight(mother, stack->Particle(mother), cent);
3217 AliInfoF(
"Fill primaries for ipZ=%f, genIPz=%f centrality=%5.1f%% (%s)",
3218 ipZ, genIPz, cent, (dataOK ?
"selected" :
"ignored"));
3223 while ((bin = static_cast<CentBin*>(next()))) {
3224 if (!bin->
Accept(cent))
continue;
3226 bin->
FillMCIPz(dataOK ? ipZ : -1000, genIPz);
3231 AliWarningF(
"No centrality bins found for %f%%", cent);
3235 AliStack* stack = MCEvent()->Stack();
3236 Int_t nTracks = stack->GetNtrack();
3237 for (
Int_t trackNo = nTracks; trackNo--; ) {
3238 if (!stack->IsPhysicalPrimary(trackNo)) {
3244 TParticle* particle = stack->Particle(trackNo);
3246 AliWarningF(
"No particle found for track # %d", trackNo);
3250 Double_t theta = particle->Theta();
3252 if (theta < 1e-6 || TMath::Abs(theta-TMath::Pi()) < 1e-6) {
3253 AliWarningF(
"Track # %6d is beam-like (%f)", trackNo,
3254 TMath::RadToDeg()*theta);
3260 Double_t weight = particle->GetWeight();
3261 Int_t pdgID = TMath::Abs(particle->GetPdgCode());
3262 TParticlePDG*
pdg = particle->GetPDG();
3266 TIter nextB(&toRun);
3267 while ((bin = static_cast<CentBin*>(nextB()))) {
3270 eta, charge, pdgID, weight);
3281 const Int_t kMaxParents = 50;
3284 Int_t parents[2][kMaxParents];
3285 Int_t nParents[] = { 0, 0 };
3288 const Float_t* labels[2] = { labels0, labels1 };
3291 Int_t nTracks = MCEvent()->Stack()->GetNtrack();
3294 for (
Int_t layer = 0; layer < 2; layer++) {
3296 for (
Int_t labelNo = 0; labelNo < 3; labelNo++) {
3299 if (label < 0 || label >= nTracks)
continue;
3301 while (nParents[layer] < kMaxParents) {
3303 parents[layer][nParents[layer]++] = label;
3305 TParticle* particle = MCEvent()->Stack()->Particle(label);
3307 if (!particle)
break;
3309 label = particle->GetFirstMother();
3311 if (label < 1 || label > nTracks)
break;
3317 for (
Int_t label0No = nParents[0]; label0No--; ) {
3318 for (
Int_t label1No = nParents[1]; label1No--; ) {
3319 if (parents[0][label0No] == parents[1][label1No])
3329 AliITSMultRecBg* reco,
3330 AliMultiplicity* mult,
3331 Int_t trackletNumber,
3343 if (mode >= 999)
return;
3348 Int_t parentPdg = -1;
3354 Int_t label0 = mult->GetLabel(trackletNumber, 0);
3355 Int_t label1 = mult->GetLabel(trackletNumber, 1);
3357 if (label0 == label1)
3358 which = (MCEvent()->Stack()->IsPhysicalPrimary(label0) ?
3363 Float_t* trl = reco->GetTracklet(trackletNumber);
3365 Int_t cl0 =
Int_t(trl[AliITSMultReconstructor::kClID1]);
3366 Int_t cl1 =
Int_t(trl[AliITSMultReconstructor::kClID2]);
3368 Float_t* labels0 = (reco->GetClusterOfLayer(0,cl0)+
3369 AliITSMultRecBg::kClMC0);
3370 Float_t* labels1 = (reco->GetClusterOfLayer(1,cl1)+
3371 AliITSMultRecBg::kClMC0);
3376 AliStack* stack = MCEvent()->Stack();
3377 Int_t nTracks = stack->GetNtrack();
3378 TParticle* particle = stack->Particle(label0);
3379 pdg = TMath::Abs(particle->GetPdgCode());
3381 Int_t parentID = particle->GetFirstMother();
3382 while (parentID >= 0 && parentID < nTracks) {
3383 particle = stack->Particle(parentID);
3384 parentPdg = TMath::Abs(particle->GetPdgCode());
3385 parentID = particle->GetFirstMother();
3392 TIter nextB(&toRun);
3394 while ((bin = static_cast<CentBin*>(nextB()))) {
3396 bin->
FillSet(mode, isSignal, ipz, eta,
3397 dPhi, dPhiS, dTheta, dThetaX, delta, weight);
3398 if (which >= 999)
continue;
3402 bin->
FillSet(which, isSignal, ipz, eta, dPhi, dPhiS,
3403 dTheta, dThetaX, delta, weight);
3407 if (!uncorr)
continue;
3409 dTheta, dThetaX, delta, weight);
3416 static Int_t codes[] = {
3465 size =
sizeof(codes) /
sizeof(
Int_t);
3472 static Int_t nCodes = 0;
3473 static Int_t* codes = 0;
3474 static Int_t* sorted = 0;
3482 sorted =
new Int_t[nCodes];
3484 TMath::Sort(nCodes, codes, idx,
false);
3485 for (
Int_t i = 0; i < nCodes; i++) {
3486 sorted[i] = codes[idx[i]];
3497 Int_t idx = TMath::BinarySearch(size, array, pdg);
3499 if (idx == size-1)
return idx;
3500 if (array[idx] != pdg)
return size;
3507 static TAxis* axis = 0;
3508 if (axis)
return axis;
3513 axis =
new TAxis(size+1, -.5, size+.5);
3516 TDatabasePDG* pdgDb = TDatabasePDG::Instance();
3517 for (
Int_t i = 1; i < size; i++) {
3520 TParticlePDG* pdgP = pdgDb->GetParticle(pdg);
3521 if (pdgP) name = pdgP->GetName();
3523 axis->SetBinLabel(i, name.Data());
3525 axis->SetBinLabel(size,
"Nuclei");
3526 axis->SetBinLabel(size+1,
"Unknown");
virtual void WorkerFinalize()
SubBase(const SubBase &o)
static TH2 * CopyH2(Container *parent, const char *name, const char *newName=0)
virtual void FillBins(TList &toRun, AliITSMultRecBg *reco, AliMultiplicity *mult, Int_t trackletNumber, Bool_t isSignal, Double_t ipz, Double_t eta, Double_t dPhi, Double_t dPhiS, Double_t dTheta, Double_t dThetaX, Double_t delta, Double_t weight) const
virtual AliTrackletdNdetaTask::CentBin * MakeCentBin(Float_t c1, Float_t c2, UShort_t recFlags)
virtual ~AliTrackletdNdetaTask()
virtual void InitCentBins(Container *existing)
virtual void FinalizeInit(Container *parent)
void SetZEtaOverlapCut(Double_t x=0.05)
virtual void FillIPz(Double_t ipZ)
void SetPhiAxis(Int_t n, Double_t min, Double_t max)
virtual void FillMCIPz(Double_t ipZ, Double_t genIPz)
virtual void FillBins(TList &toRun, AliITSMultRecBg *reco, AliMultiplicity *mult, Int_t trackletNumber, Bool_t isSignal, Double_t ipz, Double_t eta, Double_t dPhi, Double_t dPhiS, Double_t dTheta, Double_t dThetaX, Double_t delta, Double_t weight) const
virtual Container * MasterFinalize(Container *parent, TH1 *ipz, Double_t deltaCut, Double_t deltaTail)
void SetDeltaCut(Double_t x=1.5)
virtual Bool_t FillSet(UShort_t set, Bool_t isSignal, Double_t ipZ, Double_t eta, Double_t dPhi, Double_t dPhiS, Double_t dTheta, Double_t dThetaX, Double_t delta, Double_t weight)
virtual Double_t TrackletWeight(Int_t trackletNumber, const AliMultiplicity *mult) const
CentBin(const CentBin &o)
TH2 * fSecondaryParentPdg
static TH1 * AverageOverIPz(TH2 *h, const char *name, UShort_t mode, TH1 *ipz, TH2 *mask=0)
void SetReconstructionMode(const TString &mode)
virtual void MasterFinalize(Container *results)
static TH1 * Make1D(Container &c, const TString &name, const TString &title, Color_t color, Style_t style, const TAxis &xAxis)
virtual Container * MasterFinalize(Container *parent, TH1 *ipz, Double_t deltaCut, Double_t deltaTail)=0
virtual const char * GetCDBReferenceURL() const
virtual void FillPrimary(Double_t ipZ, Double_t genIPz, Double_t eta, Bool_t charged, Int_t pdg, Double_t weight)
SubBase & operator=(SubBase &o)
static void SetAxis(TAxis &axis, Int_t n, Double_t *borders)
void SetTailDelta(Double_t x=5)
static Double_t RatioE(Double_t n, Double_t en, Double_t d, Double_t ed, Double_t &er)
static Int_t * SortedPdgArray(Int_t &size)
ClassDef(AliTrackletdNdetaMCTask, 1)
AliTrackletdNdetaTask::Container Container
void SetPhiAxis(Int_t n, Double_t max)
virtual void WorkerInit()
void UserExec(Option_t *)
virtual TH2 * MakeAlpha(const char *name, const char *title, Container *result, TH2 *primaries) const
void SetCentralityAxis(Int_t n, Double_t *bins)
Double_t fScaledDThetaCut
virtual Container * CreateContainer(Container &parent)
static Int_t FindPdg(Int_t pdg)
void SetEtaAxis(const TString &spec)
virtual Bool_t CheckEvent(Double_t ¢, const AliVVertex *&ip, AliMultiplicity *&mult, TTree *&clusters)
virtual Bool_t CheckEvent(Double_t ¢, const AliVVertex *&ip, AliMultiplicity *&mult, TTree *&clusters)
static Double_t Integrate(TH1 *h, Double_t min, Double_t max, Double_t &err)
void SetIPzAxis(Int_t n, Double_t min, Double_t max)
virtual const char * Name() const =0
virtual const char * GetCDBReferenceURL() const
virtual Int_t GetCDBReferenceRun() const
virtual TH1 * MakePdgProj(const char *name, const char *title, TH2 *orig, Double_t cut=-1) const
static TH2 * ScaleToIPz(TH2 *h, TH1 *ipZ, Bool_t full=false)
virtual Container * MasterFinalize(Container *parent, TH1 *ipz, Double_t deltaCut, Double_t deltaTail)
static void PrintAxis(const TAxis &axis, Int_t nSig=2, const char *alt=0)
TString kData
Declare data MC or deltaAOD.
virtual void FillSpecie(Bool_t primary, Int_t pdg, Int_t parentPdg, Double_t delta, Double_t weight)
virtual Bool_t FillPrimaries(Double_t cent, Double_t ipZ, Double_t genIPz, Bool_t dataOK)
static Container * GetC(Container *parent, const char *name)
static TH1 * CopyH1(Container *parent, const char *name, const char *newName=0)
void SetDThetaWindow(Double_t x=0.025)
void SetDPhiWindow(Double_t x=0.06)
void SetScaleDThetaCut(Double_t x=-1)
virtual Bool_t ProcessTracklets(TList &toRun, AliITSMultRecBg *reco, Double_t cent, Double_t ipZ, AliMultiplicity *mult)
virtual const AliVVertex * FindIP(AliVEvent *event, Double_t maxDispersion=0.04, Double_t maxZError=0.25)
virtual void MasterFinalize(Container *results)
virtual void WorkerInit(Container &parent, const TAxis &etaAxis, const TAxis &ipzAxis, const TAxis &deltaAxis, const TAxis &dThetaAxis, const TAxis &dPhiAxis)=0
CentBin & operator=(const CentBin &)
virtual Bool_t Reconstruct(TList &toRun, UShort_t mode, TTree *clusters, Double_t cent, const AliVVertex *ip)
void SetMaxDelta(Double_t x=25)
static void FixAxis(TAxis &axis, const char *title=0)
virtual void WorkerInit(Container &parent, const TAxis &etaAxis, const TAxis &ipzAxis, const TAxis &deltaAxis, const TAxis &dThetaAxis, const TAxis &dPhiAxis)
void UserCreateOutputObjects()
static void ScaleAxis(TAxis &axis, Double_t fact=1)
void SetReconstructionMode(UShort_t flags)
CentBin(const CentBin &o)
void SetEtaAxis(Int_t n, Double_t min, Double_t max)
AliTrackletdNdetaMCTask()
void ReweighStack(Double_t cent) const
virtual Double_t FindCentrality(AliVEvent *event)
Bool_t HaveCommonParent(const Float_t *labels0, const Float_t *labels1) const
AliTrackletdNdetaMCTask(const AliTrackletdNdetaMCTask &o)
virtual void Print(Option_t *option) const
static Int_t * PdgArray(Int_t &size)
virtual void ProcessEvent(Double_t cent, const AliVVertex *ip, AliMultiplicity *mult, TTree *clusters)
void SetIPzAxis(Int_t n, Double_t max)
static TH1 * Scale(TH1 *h, Double_t x, Double_t xe)
virtual Container * EstimateBackground(Container *dataCon, HistoSet *set, Container *result, Double_t deltaCut, Double_t deltaTail)
CentBin & operator=(const CentBin &)
virtual void FillClusters(AliITSMultRecBg *reco)
virtual Bool_t FillSet(UShort_t set, Bool_t isSignal, Double_t ipZ, Double_t eta, Double_t dPhi, Double_t dPhiS, Double_t dTheta, Double_t dThetaX, Double_t delta, Double_t weight)
virtual Double_t TrackletWeight(Int_t trackletNumber, const AliMultiplicity *mult) const
virtual TH2 * MakeAlphaMask(TH2 *a1, TH2 *a2, Double_t min=0, Double_t max=2.5) const
virtual Double_t LookupWeight(TParticle *particle, Double_t cent) const
static Double_t GetD(Container *parent, const char *name, Double_t def=-1)
virtual Bool_t Accept(Float_t value) const
AliTrackletdNdetaTask & operator=(const AliTrackletdNdetaTask &o)
virtual void Fill(Double_t ipZ, Double_t eta, Double_t dphi, Double_t dphis, Double_t dtheta, Double_t dthetax, Double_t delta, Double_t weight=1)
void SetCentralityAxis(const TString &spec)
virtual void FinalizeInit(Container *parent)
static TAxis * MakePdgAxis()
void SetScaleDTheta(Bool_t x=false)
UShort_t FindMode(AliITSMultRecBg *reco) const
virtual Bool_t Connect(const char *sumFile=0, const char *resFile=0)
ClassDef(AliTrackletdNdetaTask, 1)
virtual Container * MasterFinalize(Container *parent, TH1 *ipz, Double_t deltaCut, Double_t deltaTail)
virtual void WorkerInit()
void SetCentralityMethod(const TString &name)
virtual Bool_t InitGeometry()
virtual const char * Name() const
static TH1 * GetH1(Container *parent, const char *name)
void SetPhiOverlapCut(Double_t x=0.005)
void SetShiftedDPhiCut(Double_t x=-1)
virtual void Print(Option_t *) const
HistoSet(const HistoSet &o)
virtual const char * Name() const
void SetIPzAxis(const TString &spec)
void SetDPhiShift(Double_t x=0.0045)
HistoSet(const char *name="", Color_t color=kBlack, Style_t style=20)
Double_t LookupWeight(Int_t trackNo, TParticle *particle, Double_t cent) const
virtual void WorkerInit(Container &parent, const TAxis &etaAxis, const TAxis &ipzAxis, const TAxis &deltaAxis, const TAxis &dThetaAxis, const TAxis &dPhiAxis)
virtual CentBin * MakeCentBin(Float_t c1, Float_t c2, UShort_t recFlags)
AliTrackletdNdetaMCTask & operator=(const AliTrackletdNdetaMCTask &o)
AliTrackletdNdetaTask(const AliTrackletdNdetaTask &o)
HistoSet & operator=(const HistoSet &)
void SetPhiRotation(Double_t x=TMath::Pi())
virtual void FinalizeInit(Container *parent)=0
void Terminate(Option_t *)
static TH2 * Make2D(Container &c, const TString &name, const TString &title, Color_t color, Style_t style, const TAxis &xAxis, const TAxis &yAxis)
virtual Bool_t FindTrigger()
static TObject * CloneAndAdd(Container *c, TObject *o)
void SetEtaAxis(Int_t n, Double_t max)
virtual void WorkerInit(Container &parent, const TAxis &etaAxis, const TAxis &ipzAxis, const TAxis &deltaAxis, const TAxis &dThetaAxis, const TAxis &dPhiAxis)
static TH2 * GetH2(Container *parent, const char *name)
AliTrackletdNdetaMCTask(const char *name, Bool_t reweigh=false)
virtual TTree * FindClusters(Bool_t needed)