Skip to content

Commit

Permalink
Revert "Merge pull request alisw#1165 from ddobrigk/master"
Browse files Browse the repository at this point in the history
This reverts commit 027fb05, reversing
changes made to d45fdd3.
  • Loading branch information
Dario Berzano committed Jun 1, 2017
1 parent 17eb270 commit 15d9304
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 103 deletions.
16 changes: 7 additions & 9 deletions OADB/COMMON/MULTIPLICITY/AliMultSelectionTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1355,17 +1355,15 @@ void AliMultSelectionTask::UserExec(Option_t *)
AliAODHeader * header = dynamic_cast<AliAODHeader*>(aodevent->GetHeader());
fRefMultEta5 -> SetValueInteger ( header->GetRefMultiplicityComb05() );
fRefMultEta8 -> SetValueInteger ( header->GetRefMultiplicityComb08() );

//FIXME: get ZDC information in AOD in a fully consistent way
AliAODZDC *lAODZDC = aodevent->GetZDCData();

for (Int_t j = 0; j < 4; ++j) {
       if (lAODZDC->GetZNATDCm(j) != 0)      fZnaFired -> SetValueInteger(1);
       if (lAODZDC->GetZNCTDCm(j) != 0)      fZncFired -> SetValueInteger(1);
       if (lAODZDC->GetZPATDCm(j) != 0)      fZpaFired -> SetValueInteger(1);
       if (lAODZDC->GetZPCTDCm(j) != 0)      fZpcFired -> SetValueInteger(1);
}


if (TMath::Abs(lAODZDC->GetZNATime()) < 990.) fZnaFired -> SetValueInteger(1);
if (TMath::Abs(lAODZDC->GetZNCTime()) < 990.) fZncFired -> SetValueInteger(1);
if (TMath::Abs(lAODZDC->GetZPATime()) < 990.) fZpaFired -> SetValueInteger(1);
if (TMath::Abs(lAODZDC->GetZPCTime()) < 990.) fZpcFired -> SetValueInteger(1);

const Double_t *ZNAtower = lAODZDC->GetZNATowerEnergy();
const Double_t *ZNCtower = lAODZDC->GetZNCTowerEnergy();
const Double_t *ZPAtower = lAODZDC->GetZPATowerEnergy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,6 @@ fTreeCascVarBachelorDCAptSigmaY2(0),
fTreeCascVarBachelorDCAptSigmaZ2(0),
fTreeCascVarV0DCAptUncertainty_V0Pos(0),
fTreeCascVarV0DCAptUncertainty_V0Ang(0),
fTreeCascVarV0DCAptPosSigmaX2(0),
fTreeCascVarV0DCAptPosSigmaY2(0),
fTreeCascVarV0DCAptPosSigmaZ2(0),
fTreeCascVarV0DCAptNegSigmaX2(0),
fTreeCascVarV0DCAptNegSigmaY2(0),
fTreeCascVarV0DCAptNegSigmaZ2(0),
fTreeCascVarPrimVertexX(0),
fTreeCascVarPrimVertexY(0),
fTreeCascVarPrimVertexZ(0),
fTreeCascVarV0Lifetime(0),
//Track Labels (check for duplicates, etc)
fTreeCascVarNegIndex(0),
Expand Down Expand Up @@ -618,15 +609,6 @@ fTreeCascVarBachelorDCAptSigmaY2(0),
fTreeCascVarBachelorDCAptSigmaZ2(0),
fTreeCascVarV0DCAptUncertainty_V0Pos(0),
fTreeCascVarV0DCAptUncertainty_V0Ang(0),
fTreeCascVarV0DCAptPosSigmaX2(0),
fTreeCascVarV0DCAptPosSigmaY2(0),
fTreeCascVarV0DCAptPosSigmaZ2(0),
fTreeCascVarV0DCAptNegSigmaX2(0),
fTreeCascVarV0DCAptNegSigmaY2(0),
fTreeCascVarV0DCAptNegSigmaZ2(0),
fTreeCascVarPrimVertexX(0),
fTreeCascVarPrimVertexY(0),
fTreeCascVarPrimVertexZ(0),
fTreeCascVarV0Lifetime(0),
//Track Labels (check for duplicates, etc)
fTreeCascVarNegIndex(0),
Expand Down Expand Up @@ -994,18 +976,10 @@ void AliAnalysisTaskStrangenessVsMultiplicityMCRun2::UserCreateOutputObjects()
fTreeCascade->Branch("fTreeCascVarCascadeDecayYMC",&fTreeCascVarCascadeDecayYMC,"fTreeCascVarCascadeDecayYMC/F");
fTreeCascade->Branch("fTreeCascVarCascadeDecayZMC",&fTreeCascVarCascadeDecayZMC,"fTreeCascVarCascadeDecayZMC/F");

fTreeCascade->Branch("fTreeCascVarPrimVertexX",&fTreeCascVarPrimVertexX,"fTreeCascVarPrimVertexX/F");
fTreeCascade->Branch("fTreeCascVarPrimVertexY",&fTreeCascVarPrimVertexY,"fTreeCascVarPrimVertexY/F");
fTreeCascade->Branch("fTreeCascVarPrimVertexZ",&fTreeCascVarPrimVertexZ,"fTreeCascVarPrimVertexZ/F");

fTreeCascade->Branch("fTreeCascVarV0Lifetime",&fTreeCascVarV0Lifetime,"fTreeCascVarV0Lifetime/F");
//Track Labels (check for duplicates, etc)

//Cascade decay position calculation metrics
fTreeCascade->Branch("fTreeCascVarPrimVertexX",&fTreeCascVarPrimVertexX,"fTreeCascVarPrimVertexX/F");
fTreeCascade->Branch("fTreeCascVarPrimVertexY",&fTreeCascVarPrimVertexY,"fTreeCascVarPrimVertexY/F");
fTreeCascade->Branch("fTreeCascVarPrimVertexZ",&fTreeCascVarPrimVertexZ,"fTreeCascVarPrimVertexZ/F");

//Cascade decay position calculation metrics
fTreeCascade->Branch("fTreeCascVarBachelorDCAptX",&fTreeCascVarBachelorDCAptX,"fTreeCascVarBachelorDCAptX/F");
fTreeCascade->Branch("fTreeCascVarBachelorDCAptY",&fTreeCascVarBachelorDCAptY,"fTreeCascVarBachelorDCAptY/F");
fTreeCascade->Branch("fTreeCascVarBachelorDCAptZ",&fTreeCascVarBachelorDCAptZ,"fTreeCascVarBachelorDCAptZ/F");
Expand All @@ -1018,14 +992,6 @@ void AliAnalysisTaskStrangenessVsMultiplicityMCRun2::UserCreateOutputObjects()
fTreeCascade->Branch("fTreeCascVarBachelorDCAptSigmaZ2",&fTreeCascVarBachelorDCAptSigmaZ2,"fTreeCascVarBachelorDCAptSigmaZ2/F");
fTreeCascade->Branch("fTreeCascVarV0DCAptUncertainty_V0Pos",&fTreeCascVarV0DCAptUncertainty_V0Pos,"fTreeCascVarV0DCAptUncertainty_V0Pos/F");
fTreeCascade->Branch("fTreeCascVarV0DCAptUncertainty_V0Ang",&fTreeCascVarV0DCAptUncertainty_V0Ang,"fTreeCascVarV0DCAptUncertainty_V0Ang/F");

fTreeCascade->Branch("fTreeCascVarV0DCAptPosSigmaX2",&fTreeCascVarV0DCAptPosSigmaX2,"fTreeCascVarV0DCAptPosSigmaX2/F");
fTreeCascade->Branch("fTreeCascVarV0DCAptPosSigmaY2",&fTreeCascVarV0DCAptPosSigmaY2,"fTreeCascVarV0DCAptPosSigmaY2/F");
fTreeCascade->Branch("fTreeCascVarV0DCAptPosSigmaZ2",&fTreeCascVarV0DCAptPosSigmaZ2,"fTreeCascVarV0DCAptPosSigmaZ2/F");

fTreeCascade->Branch("fTreeCascVarV0DCAptNegSigmaX2",&fTreeCascVarV0DCAptNegSigmaX2,"fTreeCascVarV0DCAptNegSigmaX2/F");
fTreeCascade->Branch("fTreeCascVarV0DCAptNegSigmaY2",&fTreeCascVarV0DCAptNegSigmaY2,"fTreeCascVarV0DCAptNegSigmaY2/F");
fTreeCascade->Branch("fTreeCascVarV0DCAptNegSigmaZ2",&fTreeCascVarV0DCAptNegSigmaZ2,"fTreeCascVarV0DCAptNegSigmaZ2/F");
/*
fTreeCascade->Branch("fTreeCascVarNegIndex",&fTreeCascVarNegIndex,"fTreeCascVarNegIndex/I");
fTreeCascade->Branch("fTreeCascVarPosIndex",&fTreeCascVarPosIndex,"fTreeCascVarPosIndex/I");
Expand Down Expand Up @@ -2070,14 +2036,7 @@ void AliAnalysisTaskStrangenessVsMultiplicityMCRun2::UserExec(Option_t *)
fTreeCascVarBachelorDCAptSigmaY2 = -100;
fTreeCascVarBachelorDCAptSigmaZ2 = -100;
fTreeCascVarV0DCAptUncertainty_V0Pos = -100;
fTreeCascVarV0DCAptUncertainty_V0Ang = -100;

fTreeCascVarV0DCAptPosSigmaX2 = -100;
fTreeCascVarV0DCAptPosSigmaY2 = -100;
fTreeCascVarV0DCAptPosSigmaY2 = -100;
fTreeCascVarV0DCAptNegSigmaX2 = -100;
fTreeCascVarV0DCAptNegSigmaY2 = -100;
fTreeCascVarV0DCAptNegSigmaY2 = -100;
fTreeCascVarV0DCAptUncertainty_V0Ang = -100;

// - 1st part of initialisation : variables needed to store AliESDCascade data members
Double_t lEffMassXi = 0. ;
Expand Down Expand Up @@ -2226,27 +2185,10 @@ void AliAnalysisTaskStrangenessVsMultiplicityMCRun2::UserExec(Option_t *)
dca=nt.GetDCA(&pt,lMagneticField,xn,xp);
}
nt.PropagateTo(xn,lMagneticField); pt.PropagateTo(xp,lMagneticField);

//_____________________________________________________________________________
//Get uncertainties in V0 decay point
//POSITIVE
Double_t alphaPos=pt.GetAlpha(), csp=TMath::Cos(alphaPos), snp=TMath::Sin(alphaPos);
Double_t sxp=snp*snp*pt.GetSigmaY2()+0.0005*0.0005, syp=csp*csp*pt.GetSigmaY2()+0.0005*0.0005;
fTreeCascVarV0DCAptPosSigmaX2 = sxp;
fTreeCascVarV0DCAptPosSigmaY2 = syp;
fTreeCascVarV0DCAptPosSigmaY2 = pt.GetSigmaZ2();

//NEGATIVE
Double_t alphaNeg=nt.GetAlpha(), csn=TMath::Cos(alphaNeg), snn=TMath::Sin(alphaNeg);
Double_t sxn=snn*snn*nt.GetSigmaY2()+0.0005*0.0005, syn=csn*csn*nt.GetSigmaY2()+0.0005*0.0005;
fTreeCascVarV0DCAptNegSigmaX2 = sxn;
fTreeCascVarV0DCAptNegSigmaY2 = syn;
fTreeCascVarV0DCAptNegSigmaY2 = nt.GetSigmaZ2();

//_____________________________________________________________________________
//Recreate V0
AliESDv0 vertex(nt,lIdxNegXi,pt,lIdxPosXi);

Float_t cpa=vertex.GetV0CosineOfPointingAngle(lBestPrimaryVtxPos[0],lBestPrimaryVtxPos[1],lBestPrimaryVtxPos[2]);

vertex.SetDcaV0Daughters(dca);
vertex.SetV0CosineOfPointingAngle(cpa);
vertex.ChangeMassHypothesis(310);
Expand Down Expand Up @@ -2467,10 +2409,6 @@ void AliAnalysisTaskStrangenessVsMultiplicityMCRun2::UserExec(Option_t *)
fTreeCascVarV0DecayX = lPosV0Xi[0];
fTreeCascVarV0DecayY = lPosV0Xi[1];
fTreeCascVarV0DecayZ = lPosV0Xi[2];

fTreeCascVarPrimVertexX = lBestPrimaryVtxPos[0];
fTreeCascVarPrimVertexY = lBestPrimaryVtxPos[1];
fTreeCascVarPrimVertexZ = lBestPrimaryVtxPos[2];

//========================================================================================
//Calculate V0 lifetime for adaptive decay radius cut
Expand Down Expand Up @@ -4931,22 +4869,22 @@ Double_t AliAnalysisTaskStrangenessVsMultiplicityMCRun2::PropagateToDCA(AliESDv0
v->GetXYZ(x2,y2,z2);
v->GetPxPyPz(px2,py2,pz2);

Double_t dca = 1e+33;

// calculation dca

Double_t dd= Det(x2-x1,y2-y1,z2-z1,px1,py1,pz1,px2,py2,pz2);
Double_t ax= Det(py1,pz1,py2,pz2);
Double_t ay=-Det(px1,pz1,px2,pz2);
Double_t az= Det(px1,py1,px2,py2);

dca=TMath::Abs(dd)/TMath::Sqrt(ax*ax + ay*ay + az*az);
Double_t dca=TMath::Abs(dd)/TMath::Sqrt(ax*ax + ay*ay + az*az);

//points of the DCA
Double_t t1 = Det(x2-x1,y2-y1,z2-z1,px2,py2,pz2,ax,ay,az)/
Det(px1,py1,pz1,px2,py2,pz2,ax,ay,az);

x1 += px1*t1; y1 += py1*t1; //z1 += pz1*t1;


//propagate track to the points of DCA

x1=x1*cs1 + y1*sn1;
Expand Down Expand Up @@ -5061,11 +4999,7 @@ Double_t AliAnalysisTaskStrangenessVsMultiplicityMCRun2::PropagateToDCA(AliESDv0
hV0Traj=0x0;

//Propagate bachelor to the point of DCA
if (!t->PropagateTo(xthis,b)) {
//AliWarning(" propagation failed !";
return 1e+33;
}

t->PropagateTo(xthis,b);

//V0 distance to bachelor: the desired distance
Double_t rBachDCAPt[3]; t->GetXYZ(rBachDCAPt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,18 +504,6 @@ class AliAnalysisTaskStrangenessVsMultiplicityMCRun2 : public AliAnalysisTaskSE
Float_t fTreeCascVarV0DCAptUncertainty_V0Pos; //
Float_t fTreeCascVarV0DCAptUncertainty_V0Ang; //

Float_t fTreeCascVarV0DCAptPosSigmaX2; //
Float_t fTreeCascVarV0DCAptPosSigmaY2; //
Float_t fTreeCascVarV0DCAptPosSigmaZ2; //

Float_t fTreeCascVarV0DCAptNegSigmaX2; //
Float_t fTreeCascVarV0DCAptNegSigmaY2; //
Float_t fTreeCascVarV0DCAptNegSigmaZ2; //

Float_t fTreeCascVarPrimVertexX;
Float_t fTreeCascVarPrimVertexY;
Float_t fTreeCascVarPrimVertexZ;

Float_t fTreeCascVarV0Lifetime; //! //V0 lifetime (actually, mL/p)
//Track Labels (check for duplicates, etc)
Int_t fTreeCascVarNegIndex; //!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,22 +1071,22 @@ Double_t AliAnalysisTaskWeakDecayVertexer::PropagateToDCA(AliESDv0 *v, AliExtern
v->GetXYZ(x2,y2,z2);
v->GetPxPyPz(px2,py2,pz2);

Double_t dca = 1e+33;

// calculation dca

Double_t dd= Det(x2-x1,y2-y1,z2-z1,px1,py1,pz1,px2,py2,pz2);
Double_t ax= Det(py1,pz1,py2,pz2);
Double_t ay=-Det(px1,pz1,px2,pz2);
Double_t az= Det(px1,py1,px2,py2);

dca=TMath::Abs(dd)/TMath::Sqrt(ax*ax + ay*ay + az*az);
Double_t dca=TMath::Abs(dd)/TMath::Sqrt(ax*ax + ay*ay + az*az);

//points of the DCA
Double_t t1 = Det(x2-x1,y2-y1,z2-z1,px2,py2,pz2,ax,ay,az)/
Det(px1,py1,pz1,px2,py2,pz2,ax,ay,az);

x1 += px1*t1; y1 += py1*t1; //z1 += pz1*t1;


//propagate track to the points of DCA

x1=x1*cs1 + y1*sn1;
Expand Down Expand Up @@ -1201,11 +1201,7 @@ Double_t AliAnalysisTaskWeakDecayVertexer::PropagateToDCA(AliESDv0 *v, AliExtern
hV0Traj=0x0;

//Propagate bachelor to the point of DCA
if (!t->PropagateTo(xthis,b)) {
//AliWarning(" propagation failed !";
return 1e+33;
}

t->PropagateTo(xthis,b);

//V0 distance to bachelor: the desired distance
Double_t rBachDCAPt[3]; t->GetXYZ(rBachDCAPt);
Expand Down

0 comments on commit 15d9304

Please sign in to comment.