fkpAVertexSelection( kFALSE ),
fEtaRefMult ( 0.5 ),
fkRunVertexers ( kFALSE ),
+ fkCheckSwapping( kFALSE ),
+fkSelectCentrality (kFALSE),
+fCentSel_Low(0.0),
+fCentSel_High(0.0),
+fLowPtCutoff(0.0),
//------------------------------------------------
// Tree Variables
//------------------------------------------------
fTreeCascVarDistOverTotMom(0),
fTreeCascVarIsPhysicalPrimary(0),
fTreeCascVarPID(0),
+ fTreeCascVarPIDSwapped(0),
fTreeCascVarPIDBachelor(0),
fTreeCascVarPIDNegative(0),
fTreeCascVarPIDPositive(0),
+ fTreeCascVarBachTransMom(0),
fTreeCascVarPosTransMom(0),
fTreeCascVarNegTransMom(0),
fTreeCascVarPosTransMomMC(0),
fTreeCascVarBachNSigmaPion(0),
fTreeCascVarBachNSigmaKaon(0),
+ fTreeCascVarkITSRefitBachelor(0),
+ fTreeCascVarkITSRefitNegative(0),
+ fTreeCascVarkITSRefitPositive(0),
+
+ fTreeCascVarNegClusters(0),
+ fTreeCascVarPosClusters(0),
+ fTreeCascVarBachClusters(0),
+ fTreeCascVarNegSharedClusters(0),
+ fTreeCascVarPosSharedClusters(0),
+ fTreeCascVarBachSharedClusters(0),
+
+ fTreeCascVarEvHasXiMinus(0),
+ fTreeCascVarEvHasXiPlus(0),
+ fTreeCascVarEvHasOmegaMinus(0),
+ fTreeCascVarEvHasOmegaPlus(0),
+ fTreeCascVarEvHasLambda(0),
+ fTreeCascVarEvHasAntiLambda(0),
+
+ fTreeCascVarEvHasLowPtXiMinus(0),
+ fTreeCascVarEvHasLowPtXiPlus(0),
+ fTreeCascVarEvHasLowPtOmegaMinus(0),
+ fTreeCascVarEvHasLowPtOmegaPlus(0),
+ fTreeCascVarEvHasLowPtLambda(0),
+ fTreeCascVarEvHasLowPtAntiLambda(0),
+
+ fTreeCascVarEvHasVeryLowPtXiMinus(0),
+ fTreeCascVarEvHasVeryLowPtXiPlus(0),
+ fTreeCascVarEvHasVeryLowPtOmegaMinus(0),
+ fTreeCascVarEvHasVeryLowPtOmegaPlus(0),
+ fTreeCascVarEvHasVeryLowPtLambda(0),
+ fTreeCascVarEvHasVeryLowPtAntiLambda(0),
+
+ fTreeCascVarBadCascadeJai(0),
+ fTreeCascVarDeltaDCA(0),
+
//------------------------------------------------
// HISTOGRAMS
// --- Filled on an Event-by-event basis
f3dHistGenSelectedPtVsYCMSVsMultV0AXiPlus(0),
f3dHistGenSelectedPtVsYCMSVsMultV0AOmegaMinus(0),
f3dHistGenSelectedPtVsYCMSVsMultV0AOmegaPlus(0),
+f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiMinus(0),
+f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiPlus(0),
+f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaMinus(0),
+f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaPlus(0),
//ZNA
fkpAVertexSelection( kFALSE ),
fEtaRefMult ( 0.5 ),
fkRunVertexers ( kFALSE ),
+ fkCheckSwapping( kFALSE ),
+fkSelectCentrality (kFALSE),
+fCentSel_Low(0.0),
+fCentSel_High(0.0),
+fLowPtCutoff(0.0),
//------------------------------------------------
// Tree Variables
//------------------------------------------------
fTreeCascVarDistOverTotMom(0),
fTreeCascVarIsPhysicalPrimary(0),
fTreeCascVarPID(0),
+ fTreeCascVarPIDSwapped(0),
fTreeCascVarPIDBachelor(0),
fTreeCascVarPIDNegative(0),
fTreeCascVarPIDPositive(0),
+ fTreeCascVarBachTransMom(0),
fTreeCascVarPosTransMom(0),
fTreeCascVarNegTransMom(0),
fTreeCascVarPosTransMomMC(0),
fTreeCascVarBachNSigmaPion(0),
fTreeCascVarBachNSigmaKaon(0),
+ fTreeCascVarkITSRefitBachelor(0),
+ fTreeCascVarkITSRefitNegative(0),
+ fTreeCascVarkITSRefitPositive(0),
+
+ fTreeCascVarNegClusters(0),
+ fTreeCascVarPosClusters(0),
+ fTreeCascVarBachClusters(0),
+ fTreeCascVarNegSharedClusters(0),
+ fTreeCascVarPosSharedClusters(0),
+ fTreeCascVarBachSharedClusters(0),
+
+ fTreeCascVarEvHasXiMinus(0),
+ fTreeCascVarEvHasXiPlus(0),
+ fTreeCascVarEvHasOmegaMinus(0),
+ fTreeCascVarEvHasOmegaPlus(0),
+ fTreeCascVarEvHasLambda(0),
+ fTreeCascVarEvHasAntiLambda(0),
+
+ fTreeCascVarEvHasLowPtXiMinus(0),
+ fTreeCascVarEvHasLowPtXiPlus(0),
+ fTreeCascVarEvHasLowPtOmegaMinus(0),
+ fTreeCascVarEvHasLowPtOmegaPlus(0),
+ fTreeCascVarEvHasLowPtLambda(0),
+ fTreeCascVarEvHasLowPtAntiLambda(0),
+
+ fTreeCascVarEvHasVeryLowPtXiMinus(0),
+ fTreeCascVarEvHasVeryLowPtXiPlus(0),
+ fTreeCascVarEvHasVeryLowPtOmegaMinus(0),
+ fTreeCascVarEvHasVeryLowPtOmegaPlus(0),
+ fTreeCascVarEvHasVeryLowPtLambda(0),
+ fTreeCascVarEvHasVeryLowPtAntiLambda(0),
+
+ fTreeCascVarBadCascadeJai(0),
+ fTreeCascVarDeltaDCA(0),
+
//------------------------------------------------
// HISTOGRAMS
// --- Filled on an Event-by-event basis
f3dHistGenSelectedPtVsYCMSVsMultV0AXiPlus(0),
f3dHistGenSelectedPtVsYCMSVsMultV0AOmegaMinus(0),
f3dHistGenSelectedPtVsYCMSVsMultV0AOmegaPlus(0),
+f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiMinus(0),
+f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiPlus(0),
+f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaMinus(0),
+f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaPlus(0),
//ZNA
/*21*/ fTreeCascade->Branch("fTreeCascVarV0CosPointingAngleSpecial",&fTreeCascVarV0CosPointingAngleSpecial,"fTreeCascVarV0CosPointingAngleSpecial/F");
/*22*/ fTreeCascade->Branch("fTreeCascVarV0Radius",&fTreeCascVarV0Radius,"fTreeCascVarV0Radius/F");
/*23*/ fTreeCascade->Branch("fTreeCascVarLeastNbrClusters",&fTreeCascVarLeastNbrClusters,"fTreeCascVarLeastNbrClusters/I");
+
+/*23*/ fTreeCascade->Branch("fTreeCascVarNegClusters",&fTreeCascVarNegClusters,"fTreeCascVarNegClusters/I");
+/*23*/ fTreeCascade->Branch("fTreeCascVarPosClusters",&fTreeCascVarPosClusters,"fTreeCascVarPosClusters/I");
+/*23*/ fTreeCascade->Branch("fTreeCascVarBachClusters",&fTreeCascVarBachClusters,"fTreeCascVarBachClusters/I");
+/*23*/ fTreeCascade->Branch("fTreeCascVarNegSharedClusters",&fTreeCascVarNegSharedClusters,"fTreeCascVarNegSharedClusters/I");
+/*23*/ fTreeCascade->Branch("fTreeCascVarPosSharedClusters",&fTreeCascVarPosSharedClusters,"fTreeCascVarPosSharedClusters/I");
+/*23*/ fTreeCascade->Branch("fTreeCascVarBachSharedClusters",&fTreeCascVarBachSharedClusters,"fTreeCascVarBachSharedClusters/I");
//-----------MULTIPLICITY-INFO--------------------
/*24*/ fTreeCascade->Branch("fTreeCascVarMultiplicity",&fTreeCascVarMultiplicity,"fTreeCascVarMultiplicity/I");
/*24*/ fTreeCascade->Branch("fTreeCascVarMultiplicityV0A",&fTreeCascVarMultiplicityV0A,"fTreeCascVarMultiplicityV0A/I");
//-----------MC-PID-------------------------------
/*25bis*/ fTreeCascade->Branch("fTreeCascVarIsPhysicalPrimary",&fTreeCascVarIsPhysicalPrimary,"fTreeCascVarIsPhysicalPrimary/I");
/*26*/ fTreeCascade->Branch("fTreeCascVarPID",&fTreeCascVarPID,"fTreeCascVarPID/I");
+/*26*/ fTreeCascade->Branch("fTreeCascVarPIDSwapped",&fTreeCascVarPIDSwapped,"fTreeCascVarPIDSwapped/I");
/*27*/ fTreeCascade->Branch("fTreeCascVarPIDBachelor",&fTreeCascVarPIDBachelor,"fTreeCascVarPIDBachelor/I");
/*28*/ fTreeCascade->Branch("fTreeCascVarPIDNegative",&fTreeCascVarPIDNegative,"fTreeCascVarPIDNegative/I");
/*29*/ fTreeCascade->Branch("fTreeCascVarPIDPositive",&fTreeCascVarPIDPositive,"fTreeCascVarPIDPositive/I");
+/*30*/ fTreeCascade->Branch("fTreeCascVarBachTransMom",&fTreeCascVarBachTransMom,"fTreeCascVarBachTransMom/F");
/*30*/ fTreeCascade->Branch("fTreeCascVarPosTransMom",&fTreeCascVarPosTransMom,"fTreeCascVarPosTransMom/F");
/*31*/ fTreeCascade->Branch("fTreeCascVarNegTransMom",&fTreeCascVarNegTransMom,"fTreeCascVarNegTransMom/F");
/*32*/ fTreeCascade->Branch("fTreeCascVarPosTransMomMC",&fTreeCascVarPosTransMomMC,"fTreeCascVarPosTransMomMC/F");
/*38*/ fTreeCascade->Branch("fTreeCascVarBachNSigmaPion",&fTreeCascVarBachNSigmaPion,"fTreeCascVarBachNSigmaPion/F");
/*39*/ fTreeCascade->Branch("fTreeCascVarBachNSigmaKaon",&fTreeCascVarBachNSigmaKaon,"fTreeCascVarBachNSigmaKaon/F");
+/*29*/ fTreeCascade->Branch("fTreeCascVarkITSRefitBachelor",&fTreeCascVarkITSRefitBachelor,"fTreeCascVarkITSRefitBachelor/O");
+/*29*/ fTreeCascade->Branch("fTreeCascVarkITSRefitNegative",&fTreeCascVarkITSRefitNegative,"fTreeCascVarkITSRefitNegative/O");
+/*29*/ fTreeCascade->Branch("fTreeCascVarkITSRefitPositive",&fTreeCascVarkITSRefitPositive,"fTreeCascVarkITSRefitPositive/O");
+
+ fTreeCascade->Branch("fTreeCascVarNegClusters",&fTreeCascVarNegClusters,"fTreeCascVarNegClusters/I");
+ fTreeCascade->Branch("fTreeCascVarPosClusters",&fTreeCascVarPosClusters,"fTreeCascVarPosClusters/I");
+ fTreeCascade->Branch("fTreeCascVarBachClusters",&fTreeCascVarBachClusters,"fTreeCascVarBachClusters/I");
+ fTreeCascade->Branch("fTreeCascVarNegSharedClusters",&fTreeCascVarNegSharedClusters,"fTreeCascVarNegSharedClusters/I");
+ fTreeCascade->Branch("fTreeCascVarPosSharedClusters",&fTreeCascVarPosSharedClusters,"fTreeCascVarPosSharedClusters/I");
+ fTreeCascade->Branch("fTreeCascVarBachSharedClusters",&fTreeCascVarBachSharedClusters,"fTreeCascVarBachSharedClusters/I");
+
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasXiMinus", &fTreeCascVarEvHasXiMinus, "fTreeCascVarEvHasXiMinus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasXiPlus", &fTreeCascVarEvHasXiPlus, "fTreeCascVarEvHasXiPlus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasOmegaMinus",&fTreeCascVarEvHasOmegaMinus,"fTreeCascVarEvHasOmegaMinus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasOmegaPlus", &fTreeCascVarEvHasOmegaPlus, "fTreeCascVarEvHasOmegaPlus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasLambda", &fTreeCascVarEvHasLambda, "fTreeCascVarEvHasLambda/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasAntiLambda",&fTreeCascVarEvHasAntiLambda,"fTreeCascVarEvHasAntiLambda/O");
+
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasLowPtXiMinus", &fTreeCascVarEvHasLowPtXiMinus, "fTreeCascVarEvHasLowPtXiMinus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasLowPtXiPlus", &fTreeCascVarEvHasLowPtXiPlus, "fTreeCascVarEvHasLowPtXiPlus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasLowPtOmegaMinus",&fTreeCascVarEvHasLowPtOmegaMinus,"fTreeCascVarEvHasLowPtOmegaMinus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasLowPtOmegaPlus", &fTreeCascVarEvHasLowPtOmegaPlus, "fTreeCascVarEvHasLowPtOmegaPlus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasLowPtLambda", &fTreeCascVarEvHasLowPtLambda, "fTreeCascVarEvHasLowPtLambda/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasLowPtAntiLambda",&fTreeCascVarEvHasLowPtAntiLambda,"fTreeCascVarEvHasLowPtAntiLambda/O");
+
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasVeryLowPtXiMinus", &fTreeCascVarEvHasVeryLowPtXiMinus, "fTreeCascVarEvHasVeryLowPtXiMinus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasVeryLowPtXiPlus", &fTreeCascVarEvHasVeryLowPtXiPlus, "fTreeCascVarEvHasVeryLowPtXiPlus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasVeryLowPtOmegaMinus",&fTreeCascVarEvHasVeryLowPtOmegaMinus,"fTreeCascVarEvHasVeryLowPtOmegaMinus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasVeryLowPtOmegaPlus", &fTreeCascVarEvHasVeryLowPtOmegaPlus, "fTreeCascVarEvHasVeryLowPtOmegaPlus/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasVeryLowPtLambda", &fTreeCascVarEvHasVeryLowPtLambda, "fTreeCascVarEvHasVeryLowPtLambda/O");
+/*39*/ fTreeCascade->Branch("fTreeCascVarEvHasVeryLowPtAntiLambda",&fTreeCascVarEvHasVeryLowPtAntiLambda,"fTreeCascVarEvHasVeryLowPtAntiLambda/O");
+
+ fTreeCascade->Branch("fTreeCascVarBadCascadeJai",&fTreeCascVarBadCascadeJai,"fTreeCascVarBadCascadeJai/O");
+ fTreeCascade->Branch("fTreeCascVarDeltaDCA",&fTreeCascVarDeltaDCA,"fTreeCascVarDeltaDCA/F");
+
//------------------------------------------------
// Particle Identification Setup
//------------------------------------------------
if(fkIsNuclear) fListHist->Add(f3dHistGenSelectedPtVsYCMSVsMultV0AOmegaPlus);
}
+ //Cross-check primary selection criteria
+ //Should not impact much but inspired by rumors of DPMJet issues with primary selection (?)
+
+ if(! f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiMinus) {
+ f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiMinus = new TH3F( "f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiMinus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity);
+ if(fkIsNuclear) fListHist->Add(f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiMinus);
+ }
+ if(! f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiPlus) {
+ f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiPlus = new TH3F( "f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiPlus", "Pt_{#Xi} Vs Y_{#Xi} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Xi} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity);
+ if(fkIsNuclear) fListHist->Add(f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiPlus);
+ }
+ //--- 3D Histo (Pt, Y, Multiplicity) for generated OmegaMinus/Plus
+
+ if(! f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaMinus) {
+ f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaMinus = new TH3F( "f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaMinus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity);
+ if(fkIsNuclear) fListHist->Add(f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaMinus);
+ }
+ if(! f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaPlus) {
+ f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaPlus = new TH3F( "f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaPlus", "Pt_{#Omega} Vs Y_{#Omega} Vs Multiplicity; Pt_{cascade} (GeV/c); Y_{#Omega} ; Mult", lCustomNBins, 0., lCustomPtUpperLimit, 48, -1.2,1.2,lCustomNBinsMultiplicity,0,lCustomNBinsMultiplicity);
+ if(fkIsNuclear) fListHist->Add(f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaPlus);
+ }
//======================================================================================
//--------------------------------------------------------------------------------------
return;
}
}
+
+ if( fkSelectCentrality ){
+ if( lMultiplicity < fCentSel_Low || lMultiplicity >= fCentSel_High ){
+ //Event is outside desired centrality centrality in V0M!
+ PostData(1, fListHist);
+ PostData(2, fTreeCascade);
+ return;
+ }
+ }
+
//Set variable for filling tree afterwards!
//---> pp case......: GetReferenceMultiplicity
// Pre-Physics Selection
//------------------------------------------------
+
+ fTreeCascVarEvHasXiMinus = kFALSE;
+ fTreeCascVarEvHasXiPlus = kFALSE;
+ fTreeCascVarEvHasOmegaMinus = kFALSE;
+ fTreeCascVarEvHasOmegaPlus = kFALSE;
+ fTreeCascVarEvHasLambda = kFALSE;
+ fTreeCascVarEvHasAntiLambda = kFALSE;
+
+ fTreeCascVarEvHasLowPtXiMinus = kFALSE;
+ fTreeCascVarEvHasLowPtXiPlus = kFALSE;
+ fTreeCascVarEvHasLowPtOmegaMinus = kFALSE;
+ fTreeCascVarEvHasLowPtOmegaPlus = kFALSE;
+ fTreeCascVarEvHasLowPtLambda = kFALSE;
+ fTreeCascVarEvHasLowPtAntiLambda = kFALSE;
+
+ fTreeCascVarEvHasVeryLowPtXiMinus = kFALSE;
+ fTreeCascVarEvHasVeryLowPtXiPlus = kFALSE;
+ fTreeCascVarEvHasVeryLowPtOmegaMinus = kFALSE;
+ fTreeCascVarEvHasVeryLowPtOmegaPlus = kFALSE;
+ fTreeCascVarEvHasVeryLowPtLambda = kFALSE;
+ fTreeCascVarEvHasVeryLowPtAntiLambda = kFALSE;
+
+
//----- Loop on primary Xi, Omega --------------------------------------------------------------
for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < lNbMCPrimary; iCurrentLabelStack++)
{// This is the begining of the loop on primaries
Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
continue;
}
+
+ //Event Type Acquisition
+ if(lCurrentParticlePrimary->GetPdgCode() == 3312){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) ) fTreeCascVarEvHasXiMinus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() ==-3312){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) ) fTreeCascVarEvHasXiPlus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() == 3334){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) ) fTreeCascVarEvHasOmegaMinus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() ==-3334){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) ) fTreeCascVarEvHasOmegaPlus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() == 3122){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) ) fTreeCascVarEvHasLambda = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() ==-3122){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) ) fTreeCascVarEvHasAntiLambda = kTRUE; }
+
+ if(lCurrentParticlePrimary->GetPdgCode() == 3312){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<2.0) fTreeCascVarEvHasLowPtXiMinus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() ==-3312){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<2.0) fTreeCascVarEvHasLowPtXiPlus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() == 3334){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<2.0) fTreeCascVarEvHasLowPtOmegaMinus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() ==-3334){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<2.0) fTreeCascVarEvHasLowPtOmegaPlus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() == 3122){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<2.0) fTreeCascVarEvHasLowPtLambda = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() ==-3122){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<2.0) fTreeCascVarEvHasLowPtAntiLambda = kTRUE; }
+
+ if(lCurrentParticlePrimary->GetPdgCode() == 3312){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<1.2) fTreeCascVarEvHasVeryLowPtXiMinus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() ==-3312){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<1.2) fTreeCascVarEvHasVeryLowPtXiPlus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() == 3334){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<1.2) fTreeCascVarEvHasVeryLowPtOmegaMinus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() ==-3334){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<1.2) fTreeCascVarEvHasVeryLowPtOmegaPlus = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() == 3122){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<1.2) fTreeCascVarEvHasVeryLowPtLambda = kTRUE; }
+ if(lCurrentParticlePrimary->GetPdgCode() ==-3122){ if (TMath::Abs(lCurrentParticlePrimary->Eta())<1.2 && lMCstack->IsPhysicalPrimary(iCurrentLabelStack) && lCurrentParticlePrimary->Pt()<1.2) fTreeCascVarEvHasVeryLowPtAntiLambda = kTRUE; }
+
if ( TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3312 || TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3334 ) {
Double_t lRapXiMCPrimary = -100;
if( (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) != 0 ) {
}
//----- End Loop on primary Xi, Omega ----------------------------------------------------------
+
+ //----- Loop on primary Xi, Omega --------------------------------------------------------------
+ for (Int_t iCurrentLabelStack = 0; iCurrentLabelStack < (lMCstack->GetNtrack()); iCurrentLabelStack++)
+ {// This is the begining of the loop on primaries
+
+ TParticle* lCurrentParticlePrimary = 0x0;
+ lCurrentParticlePrimary = lMCstack->Particle( iCurrentLabelStack );
+ if(!lCurrentParticlePrimary){
+ Printf("Cascade loop %d - MC TParticle pointer to current stack particle = 0x0 ! Skip ...\n", iCurrentLabelStack );
+ continue;
+ }
+ if ( TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3312 || TMath::Abs(lCurrentParticlePrimary->GetPdgCode()) == 3334 ) {
+ Double_t lRapXiMCPrimary = -100;
+ if( (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) != 0 ) {
+ if ( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) !=0 ){
+ lRapXiMCPrimary = 0.5*TMath::Log( (lCurrentParticlePrimary->Energy() + lCurrentParticlePrimary->Pz()) / (lCurrentParticlePrimary->Energy() - lCurrentParticlePrimary->Pz() +1.e-13) );
+ }
+ }
+ //IsPhysicalPrimary: Cross-check with old index test
+ // (cascades -> negligible difference ?... )
+ if ( lMCstack->IsPhysicalPrimary(iCurrentLabelStack)!=kTRUE ) continue;
+
+ //=================================================================================
+ // Xi Histograms
+ if( lCurrentParticlePrimary->GetPdgCode() == 3312 ){
+ lPtCurrentPart = lCurrentParticlePrimary->Pt();
+ f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicityV0A);
+ }
+ if( lCurrentParticlePrimary->GetPdgCode() == -3312 ){
+ lPtCurrentPart = lCurrentParticlePrimary->Pt();
+ f3dHistGenSelectedPrimPtVsYCMSVsMultV0AXiPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicityV0A);
+ }
+ // Omega Histograms
+ if( lCurrentParticlePrimary->GetPdgCode() == 3334 ){
+ lPtCurrentPart = lCurrentParticlePrimary->Pt();
+ f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaMinus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicityV0A);
+ }
+ if( lCurrentParticlePrimary->GetPdgCode() == -3334 ){
+ lPtCurrentPart = lCurrentParticlePrimary->Pt();
+ f3dHistGenSelectedPrimPtVsYCMSVsMultV0AOmegaPlus->Fill(lPtCurrentPart, lRapXiMCPrimary+fpArapidityShift, lMultiplicityV0A);
+ }
+ }
+ }
+ //----- End Loop on primary Xi, Omega ----------------------------------------------------------
+
+
//------------------------------------------------
// MAIN CASCADE LOOP STARTS HERE
//------------------------------------------------
continue;
}
- fTreeCascVarPosEta = pTrackXi->Eta();
- fTreeCascVarNegEta = nTrackXi->Eta();
- fTreeCascVarBachEta = bachTrackXi->Eta();
-
+ fTreeCascVarPosEta = pTrackXi->Eta();
+ fTreeCascVarNegEta = nTrackXi->Eta();
+ fTreeCascVarBachEta = bachTrackXi->Eta();
+
+ //Save shared clusters information
+ fTreeCascVarNegSharedClusters = nTrackXi->GetTPCnclsS(0,159);
+ fTreeCascVarPosSharedClusters = pTrackXi->GetTPCnclsS(0,159);
+ fTreeCascVarBachSharedClusters = bachTrackXi->GetTPCnclsS(0,159);
+
+ Double_t lBMom[3], lNMom[3], lPMom[3];
+ xi->GetBPxPyPz( lBMom[0], lBMom[1], lBMom[2] );
+ xi->GetPPxPyPz( lPMom[0], lPMom[1], lPMom[2] );
+ xi->GetNPxPyPz( lNMom[0], lNMom[1], lNMom[2] );
+
+ fTreeCascVarBachTransMom = TMath::Sqrt( lBMom[0]*lBMom[0] + lBMom[1]*lBMom[1] );
+ fTreeCascVarPosTransMom = TMath::Sqrt( lPMom[0]*lPMom[0] + lPMom[1]*lPMom[1] );
+ fTreeCascVarNegTransMom = TMath::Sqrt( lNMom[0]*lNMom[0] + lNMom[1]*lNMom[1] );
+
//------------------------------------------------
// TPC dEdx information
//------------------------------------------------
lNegTPCClusters = nTrackXi->GetTPCNcls();
lBachTPCClusters = bachTrackXi->GetTPCNcls();
+ fTreeCascVarNegClusters = lNegTPCClusters;
+ fTreeCascVarPosClusters = lPosTPCClusters;
+ fTreeCascVarBachClusters = lBachTPCClusters;
+
+ fTreeCascVarkITSRefitBachelor = kTRUE;
+ fTreeCascVarkITSRefitNegative = kTRUE;
+ fTreeCascVarkITSRefitPositive = kTRUE;
+
// 1 - Poor quality related to TPCrefit
ULong_t pStatus = pTrackXi->GetStatus();
ULong_t nStatus = nTrackXi->GetStatus();
if ((pStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Pos. track has no TPCrefit ... continue!"); continue; }
if ((nStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / V0 Neg. track has no TPCrefit ... continue!"); continue; }
if ((bachStatus&AliESDtrack::kTPCrefit) == 0) { AliWarning("Pb / Bach. track has no TPCrefit ... continue!"); continue; }
+
+ //Extra Debug Information: booleans for ITS refit
+ if ((pStatus&AliESDtrack::kITSrefit) == 0) { fTreeCascVarkITSRefitPositive = kFALSE; }
+ if ((nStatus&AliESDtrack::kITSrefit) == 0) { fTreeCascVarkITSRefitNegative = kFALSE; }
+ if ((bachStatus&AliESDtrack::kITSrefit) == 0) { fTreeCascVarkITSRefitBachelor = kFALSE; }
+
// 2 - Poor quality related to TPC clusters: lowest cut of 70 clusters
if(lPosTPCClusters < 70) { AliWarning("Pb / V0 Pos. track has less than 70 TPC clusters ... continue!"); continue; }
if(lNegTPCClusters < 70) { AliWarning("Pb / V0 Neg. track has less than 70 TPC clusters ... continue!"); continue; }
TParticle* mcPosV0Dghter = lMCstack->Particle( lblPosV0Dghter );
TParticle* mcNegV0Dghter = lMCstack->Particle( lblNegV0Dghter );
- TParticle* mcBach = lMCstack->Particle( lblBach );
-
+ TParticle* mcBach = lMCstack->Particle( lblBach );
+
fTreeCascVarPosTransMomMC = mcPosV0Dghter->Pt();
fTreeCascVarNegTransMomMC = mcNegV0Dghter->Pt();
}}}}}}} //Ends all conditionals above...
- //----------------------------------------
- // Regular MC ASSOCIATION ENDS HERE
- //----------------------------------------
+//----------------------------------------
+// Regular MC ASSOCIATION ENDS HERE
+//----------------------------------------
+
+//----------------------------------------
+// Swapped MC Association Starts Here
+//----------------------------------------
+
+ fTreeCascVarPIDSwapped = 0; //Nothing
+ if ( fkCheckSwapping ) { //on/off switch if not needed or otherwise broken
+
+ Int_t lPID_BachMotherSwapped = 0;
+ Int_t lPID_NegMotherSwapped = 0;
+ Int_t lPID_PosMotherSwapped = 0;
+
+ Int_t lblPosV0DghterSwapped = (Int_t) TMath::Abs( pTrackXi->GetLabel() );
+ // Abs value = needed ! question of quality track association ...
+ Int_t lblNegV0DghterSwapped = (Int_t) TMath::Abs( nTrackXi->GetLabel() );
+ Int_t lblBachSwapped = (Int_t) TMath::Abs( bachTrackXi->GetLabel() );
+
+ //This is SWAPPED association: swap like-sign particles
+ TParticle* mcPosV0DghterSwapped = 0x0;
+ TParticle* mcNegV0DghterSwapped = 0x0;
+ TParticle* mcBachSwapped = 0x0;
+
+ //Swapping Case 1: XiMinus/OmegaMinus swapped: exchange negative V0 daughter with bachelor
+ if( lChargeXi == -1 ){
+ mcPosV0DghterSwapped = lMCstack->Particle( lblPosV0DghterSwapped );
+ mcNegV0DghterSwapped = lMCstack->Particle( lblBachSwapped );
+ mcBachSwapped = lMCstack->Particle( lblNegV0DghterSwapped );
+ }
+ //Swapping Case 2: XiPlus/OmegaPlus swapped: exchange positive V0 daughter with bachelor
+ if( lChargeXi == 1 ){
+ mcPosV0DghterSwapped = lMCstack->Particle( lblBachSwapped );
+ mcNegV0DghterSwapped = lMCstack->Particle( lblNegV0DghterSwapped );
+ mcBachSwapped = lMCstack->Particle( lblPosV0DghterSwapped );
+ }
+
+ //fTreeCascVarPosTransMomMC = mcPosV0Dghter->Pt();
+ //fTreeCascVarNegTransMomMC = mcNegV0Dghter->Pt();
+
+ //fTreeCascVarPIDPositive = mcPosV0Dghter -> GetPdgCode();
+ //fTreeCascVarPIDNegative = mcNegV0Dghter -> GetPdgCode();
+ //fTreeCascVarPIDBachelor = mcBach->GetPdgCode();
+
+ // - Step 4.2 : level of the Xi daughters
+
+ Int_t lblMotherPosV0DghterSwapped = mcPosV0DghterSwapped->GetFirstMother() ;
+ Int_t lblMotherNegV0DghterSwapped = mcNegV0DghterSwapped->GetFirstMother();
+
+ //Rather uncivilized: Open brackets for each 'continue'
+ if(! (lblMotherPosV0DghterSwapped != lblMotherNegV0DghterSwapped) ) { // same mother
+ if(! (lblMotherPosV0DghterSwapped < 0) ) { // mother != primary (!= -1)
+ if(! (lblMotherNegV0DghterSwapped < 0) ) {
+
+ // mothers = Lambda candidate ... a priori
+
+ TParticle* mcMotherPosV0DghterSwapped = lMCstack->Particle( lblMotherPosV0DghterSwapped );
+ TParticle* mcMotherNegV0DghterSwapped = lMCstack->Particle( lblMotherNegV0DghterSwapped );
+
+ // - Step 4.3 : level of Xi candidate
+
+ Int_t lblGdMotherPosV0DghterSwapped = mcMotherPosV0DghterSwapped->GetFirstMother() ;
+ Int_t lblGdMotherNegV0DghterSwapped = mcMotherNegV0DghterSwapped->GetFirstMother() ;
+
+ if(! (lblGdMotherPosV0DghterSwapped != lblGdMotherNegV0DghterSwapped) ) {
+ if(! (lblGdMotherPosV0DghterSwapped < 0) ) { // primary lambda ...
+ if(! (lblGdMotherNegV0DghterSwapped < 0) ) { // primary lambda ...
+
+ // Gd mothers = Xi candidate ... a priori
+
+ TParticle* mcGdMotherPosV0DghterSwapped = lMCstack->Particle( lblGdMotherPosV0DghterSwapped );
+ TParticle* mcGdMotherNegV0DghterSwapped = lMCstack->Particle( lblGdMotherNegV0DghterSwapped );
+
+ Int_t lblMotherBachSwapped = (Int_t) TMath::Abs( mcBachSwapped->GetFirstMother() );
+
+ // if( lblMotherBach != lblGdMotherPosV0Dghter ) continue; //same mother for bach and V0 daughters
+ if(!(lblMotherBachSwapped != lblGdMotherPosV0DghterSwapped)) { //same mother for bach and V0 daughters
+
+ TParticle* mcMotherBachSwapped = lMCstack->Particle( lblMotherBachSwapped );
+
+ lPID_BachMotherSwapped = mcMotherBachSwapped->GetPdgCode();
+ lPID_NegMotherSwapped = mcGdMotherPosV0DghterSwapped->GetPdgCode();
+ lPID_PosMotherSwapped = mcGdMotherNegV0DghterSwapped->GetPdgCode();
+
+ if(lPID_BachMotherSwapped==lPID_NegMotherSwapped && lPID_BachMotherSwapped==lPID_PosMotherSwapped){
+ fTreeCascVarPIDSwapped = lPID_BachMotherSwapped; //there!
+ }
+
+ }}}}}}} //Ends all conditionals above...
+
+ }
+//----------------------------------------
+// Swapped MC ASSOCIATION ENDS HERE
+//----------------------------------------
+
+ //------------------------------------------------
+ // Jai Salzwedel's femto-cut: better V0 exists
+ //------------------------------------------------
+
+ fTreeCascVarBadCascadeJai = kFALSE;
+ fTreeCascVarDeltaDCA = -100;
+ Float_t DCAV0DaughtersDiff = -100;
+ for (Int_t iv0=0; iv0<lESDevent->GetNumberOfV0s(); iv0++) {
+ AliESDv0 *v0 = lESDevent->GetV0(iv0);
+ UInt_t posV0TrackIdx = (UInt_t) v0->GetPindex();
+ UInt_t negV0TrackIdx = (UInt_t) v0->GetNindex();
+ if ((posV0TrackIdx == lIdxPosXi) && (negV0TrackIdx == lIdxNegXi)) continue;
+ // if both tracks are the same ones as the cascades V0 daughter tracks, then the V0 belongs to the cascade being analysed; so avoid it
+ if ((posV0TrackIdx == lIdxPosXi) || (negV0TrackIdx == lIdxNegXi)) {
+ DCAV0DaughtersDiff = lDcaV0DaughtersXi - v0->GetDcaV0Daughters();
+ if( fTreeCascVarDeltaDCA < DCAV0DaughtersDiff ) fTreeCascVarDeltaDCA = DCAV0DaughtersDiff;
+ if ( lDcaV0DaughtersXi > v0->GetDcaV0Daughters() ) { // DCA comparison criterion
+ fTreeCascVarBadCascadeJai = kTRUE;
+ } //end DCA comparison
+ } // end shares a daughter check
+ } //end V0 loop
//------------------------------------------------
// Set Variables for adding to tree
//Xi Mass window: 150MeV wide
//Omega mass window: 150MeV wide
- if( (fTreeCascVarMassAsXi<1.32+0.075&&fTreeCascVarMassAsXi>1.32-0.075) ||
- (fTreeCascVarMassAsOmega<1.68+0.075&&fTreeCascVarMassAsOmega>1.68-0.075) ){
- fTreeCascade->Fill();
- }
+ if( (fTreeCascVarMassAsXi<1.32+0.075&&fTreeCascVarMassAsXi>1.32-0.075) ||
+ (fTreeCascVarMassAsOmega<1.68+0.075&&fTreeCascVarMassAsOmega>1.68-0.075) ){
+
+ if( !fkIsNuclear ) fTreeCascade->Fill();
+ if( fkIsNuclear ){
+ //Extra selections in case this is a nuclear collision...
+ if (TMath::Abs(fTreeCascVarNegEta) < 0.8 &&
+ TMath::Abs(fTreeCascVarPosEta) < 0.8 &&
+ TMath::Abs(fTreeCascVarBachEta) < 0.8 &&
+ fTreeCascVarPt > fLowPtCutoff){ //beware ptMC and ptreco differences
+ fTreeCascade->Fill();
+ }
+ }
+ }
//------------------------------------------------
// Fill tree over.