Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ enum EOccupancyEstimator {
};

// *) Main task:
struct MultiparticleCorrelationsDm { // this name is used in lower-case format, to name the TDirectoryFile in AnalysisResults.root
struct MultiparticleCorrelationsDm { // this name is used in lower-case format to name the TDirectoryFile in AnalysisResults.root

// *) Base TList to hold all output objects:
TString sBaseListName = "Default list name"; // yes, I declare it separately, because I need it also later in BailOut() function
Expand Down Expand Up @@ -163,6 +163,10 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
Configurable<bool> cfUseZFT0vsPV{"cfUseZFT0vsPV", true, "use this cut"};
Configurable<bool> cfUsePrevRof{"cfUsePrevRof", true, " use this cut"};

// Basic Run 3 event selection: keeps only real collisions (FT0 vertex trigger, TVX) that are not cut
// by a time-frame or ITS readout-frame border ---- always be on for Run 3 data !!
Configurable<bool> cfUseSel8{"cfUseSel8", true, "apply the standard Run 3 event selection sel8"};

// 2D correlation cuts:
Configurable<bool> cfUseCentralityCorrelationCut{"cfUseCentralityCorrelationCut", false, "reject events in which centFT0C and centFT0M differ too much (relative)"};
Configurable<std::vector<float>> cfCentralityCorrelationCut{"cfCentralityCorrelationCut", {0.2, 5.}, "{maximum relative difference, floor (%) for the scale}"};
Expand Down Expand Up @@ -210,6 +214,21 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
Configurable<bool> cfUseDcaZCut{"cfUseDcaZCut", true, "apply the cut on |dcaZ|"};
Configurable<float> cfDcaZMax{"cfDcaZMax", 3.2, "keep tracks with |dcaZ| < this value [cm]"};

// Standard track-quality cuts:
// Quality of the TPC track fit: chi2 per TPC cluster. Large values = badly fitted or fake tracks.
Configurable<bool> cfUseTpcChi2NClCut{"cfUseTpcChi2NClCut", true, "apply the cut on the TPC chi2 per cluster"};
Configurable<float> cfTpcChi2NClMax{"cfTpcChi2NClMax", 4., "keep tracks with tpcChi2NCl < this value"};
// Quality of the ITS track fit: chi2 per ITS cluster. Large values = wrong matching between ITS and TPC.
Configurable<bool> cfUseItsChi2NClCut{"cfUseItsChi2NClCut", true, "apply the cut on the ITS chi2 per cluster"};
Configurable<float> cfItsChi2NClMax{"cfItsChi2NClMax", 36., "keep tracks with itsChi2NCl < this value"};
// Number of TPC pad rows the track crosses (out of 159). Few crossed rows = short, often fake or split tracks.
Configurable<bool> cfUseTpcNClsCrossedRowsCut{"cfUseTpcNClsCrossedRowsCut", true, "apply the cut on the number of TPC crossed rows"};
Configurable<int> cfTpcNClsCrossedRowsMin{"cfTpcNClsCrossedRowsMin", 70, "keep tracks with tpcNClsCrossedRows >= this value"};
// Keep only tracks flagged as primary by the central track selection (removes most secondaries from decays and detector material).
Configurable<bool> cfUseIsPrimaryTrack{"cfUseIsPrimaryTrack", true, "keep only tracks with isPrimaryTrack() = true"};
// Keep only tracks that were used to reconstruct the primary vertex of this collision (removes tracks from other, pile-up collisions).
Configurable<bool> cfUseIsPVContributor{"cfUseIsPVContributor", true, "keep only tracks with isPVContributor() = true"};

// binning of the track-quality and charge histograms:
Configurable<std::vector<float>> cfChargeBins{"cfChargeBins", {3, -1.5, 1.5}, "nBins, min, max"};
Configurable<std::vector<float>> cfDcaXYBins{"cfDcaXYBins", {600, -3., 3.}, "nBins, min, max [cm]"};
Expand Down Expand Up @@ -242,6 +261,7 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
bool fUseITSLayers = true;
bool fUseZFT0vsPV = true;
bool fUsePrevRof = true;
bool fUseSel8 = true; // standard Run 3 event selection

bool fUseCentralityCorrelationCut = false;
std::array<float, 2> fCentralityCorrelationCut = {0.2, 5.}; // {maximum relative difference, floor (%)}
Expand Down Expand Up @@ -270,12 +290,20 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
bool fUseDcaXYCut = true;
float fDcaXYMax = 2.4; // [cm]
bool fUseDcaZCut = true;
float fDcaZMax = 3.2; // [cm]
int fCurrentRunNumber = -1; // run number of the weights currently in use
bool fUsePhiWeights = false; // load phi weights
bool fUsePtWeights = false; // load pt weights
bool fUseEtaWeights = false; // load eta weights
bool fVerbose = false; // print the values / collision
float fDcaZMax = 3.2; // [cm]
bool fUseTpcChi2NClCut = true;
float fTpcChi2NClMax = 4.; // maximum TPC chi2 per cluster
bool fUseItsChi2NClCut = true;
float fItsChi2NClMax = 36.; // maximum ITS chi2 per cluster
bool fUseTpcNClsCrossedRowsCut = true;
int fTpcNClsCrossedRowsMin = 70; // minimum number of TPC crossed rows
bool fUseIsPrimaryTrack = true; // only primary tracks
bool fUseIsPVContributor = true; // only tracks that contributed to the primary vertex
int fCurrentRunNumber = -1; // run number of the weights currently in use
bool fUsePhiWeights = false; // load phi weights
bool fUsePtWeights = false; // load pt weights
bool fUseEtaWeights = false; // load eta weights
bool fVerbose = false; // print the values / collision

} tc; // you have to prepend "tc." for all objects name in this group later in the code

Expand Down Expand Up @@ -628,7 +656,7 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
}
}

// Q(n,p), including negative harmonics: Q(-n,p) = conjugate of Q(n,p) !!
// Q(n,p), including negative harmonics: Q(-n,p) = conjugate of Q(n,p)
std::complex<double> qv(int n, int p)
{
if (std::abs(n) > KMaxHarmonic || p < 1 || p > KMaxPower) {
Expand All @@ -653,6 +681,12 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
template <ERecSim rs, typename T1>
bool eventCuts(T1 const& collision)
{
// *) sel8: standard Run 3 event selection (real collision, not at a time-frame or ITS readout-frame border)
if (tc.fUseSel8) {
if (!collision.sel8()) {
return false; // if at least one event cut is not satisfied
}
}

// *) Vertex Z cut
if (tc.fUseVertexZCut) {
Expand Down Expand Up @@ -712,8 +746,8 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
// *) Occupancy cut, convention: min <= occupancy < max (events without occupancy information, value -1, are rejected for min = 0)
if (tc.fUseOccupancyCut) {
const float occupancy = getOccupancy(collision);
if (!(tc.fOccupancy[0] <= occupancy && occupancy < tc.fOccupancy[1])) {
return false; // if at least one event cut is not satisfied
if (occupancy < tc.fOccupancy[0] || occupancy >= tc.fOccupancy[1]) { // outside {min, max}
return false; // if at least one event cut is not satisfied
}
}

Expand Down Expand Up @@ -808,6 +842,41 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
}
}

// *) TPC chi2 per cluster: reject badly fitted tracks
if (tc.fUseTpcChi2NClCut) {
if (!(track.tpcChi2NCl() < tc.fTpcChi2NClMax)) {
return false; // if at least one particle cut is not satisfied
}
}

// *) ITS chi2 per cluster: reject tracks with a bad ITS-TPC match
if (tc.fUseItsChi2NClCut) {
if (!(track.itsChi2NCl() < tc.fItsChi2NClMax)) {
return false; // if at least one particle cut is not satisfied
}
}

// *) number of TPC crossed rows: reject short tracks
if (tc.fUseTpcNClsCrossedRowsCut) {
if (!(track.tpcNClsCrossedRows() >= tc.fTpcNClsCrossedRowsMin)) {
return false; // if at least one particle cut is not satisfied
}
}

// *) primary track flag from the central track selection
if (tc.fUseIsPrimaryTrack) {
if (!track.isPrimaryTrack()) {
return false; // if at least one particle cut is not satisfied
}
}

// *) track contributed to the primary vertex of this collision
if (tc.fUseIsPVContributor) {
if (!track.isPVContributor()) {
return false; // if at least one particle cut is not satisfied
}
}

} // end of if constexpr (rs != ESim)

return true; // all particle cuts passed
Expand Down Expand Up @@ -1080,6 +1149,14 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
tc.fDcaXYMax = cfDcaXYMax;
tc.fUseDcaZCut = cfUseDcaZCut;
tc.fDcaZMax = cfDcaZMax;
tc.fUseTpcChi2NClCut = cfUseTpcChi2NClCut;
tc.fTpcChi2NClMax = cfTpcChi2NClMax;
tc.fUseItsChi2NClCut = cfUseItsChi2NClCut;
tc.fItsChi2NClMax = cfItsChi2NClMax;
tc.fUseTpcNClsCrossedRowsCut = cfUseTpcNClsCrossedRowsCut;
tc.fTpcNClsCrossedRowsMin = cfTpcNClsCrossedRowsMin;
tc.fUseIsPrimaryTrack = cfUseIsPrimaryTrack;
tc.fUseIsPVContributor = cfUseIsPVContributor;

// technical event cuts: copy the switches
tc.fUseTimeRange = cfUseTimeRange;
Expand All @@ -1089,6 +1166,7 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
tc.fUseITSLayers = cfUseITSLayers;
tc.fUseZFT0vsPV = cfUseZFT0vsPV;
tc.fUsePrevRof = cfUsePrevRof;
tc.fUseSel8 = cfUseSel8;

// 2D correlation cuts and validation: copy the switches and values
tc.fUseCentralityCorrelationCut = cfUseCentralityCorrelationCut;
Expand Down Expand Up @@ -1144,7 +1222,7 @@ struct MultiparticleCorrelationsDm { // this name is used in lower-case format,
}

// *) Book base list:
TList* temp = new TList();
auto* temp = new TList();
temp->SetOwner(true);
fBaseList.setObject(temp);

Expand Down
Loading