Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #5662 #32

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion PWGUD/TableProducer/DGBCCandProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ struct DGBCCandProducer {
track.length(),
track.tofExpMom(),
track.detectorMap(),
track.itsNCls());
track.itsNCls());
outputTracksFlag(track.has_collision(),
track.isPVContributor());
outputTracksLabel(track.globalIndex());
Expand Down
2 changes: 1 addition & 1 deletion PWGUD/TableProducer/DGCandProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ struct DGCandProducer {
track.length(),
track.tofExpMom(),
track.detectorMap(),
track.itsNCls());
track.itsNCls());
outputTracksFlag(track.has_collision(),
track.isPVContributor());
outputTracksLabel(track.globalIndex());
Expand Down
23 changes: 11 additions & 12 deletions PWGUD/TableProducer/SGCandProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ struct SGCandProducer {
Configurable<SGCutParHolder> SGCuts{"SGCuts", {}, "SG event cuts"};
Configurable<bool> saveAllTracks{"saveAllTracks", true, "save only PV contributors or all tracks associated to a collision"};
Configurable<bool> savenonPVCITSOnlyTracks{"savenonPVCITSOnlyTracks", false, "save non PV contributors with ITS only information"};
Configurable<bool> rejectAtTFBoundary{"rejectAtTFBoundary", true, "reject collisions at a TF boundary"};
Configurable<bool> noITSROFrameBorder{"noITSROFrameBorder", true, "reject ITS RO Frame Border"};
Configurable<bool> noSameBunchPileUp{"noSameBunchPileUp", true, "reject SameBunchPileUp"};
Configurable<bool> IsGoodVertex{"IsGoodVertex", false, "Select FT0 PV vertex matching"};
Configurable<bool> ITSTPCVertex{"ITSTPCVertex", true, "reject ITS-only vertex"}; //if one wants to look at Single Gap pp events
Configurable<bool> rejectAtTFBoundary{"rejectAtTFBoundary", true, "reject collisions at a TF boundary"};
Configurable<bool> noITSROFrameBorder{"noITSROFrameBorder", true, "reject ITS RO Frame Border"};
Configurable<bool> noSameBunchPileUp{"noSameBunchPileUp", true, "reject SameBunchPileUp"};
Configurable<bool> IsGoodVertex{"IsGoodVertex", false, "Select FT0 PV vertex matching"};
Configurable<bool> ITSTPCVertex{"ITSTPCVertex", true, "reject ITS-only vertex"}; // if one wants to look at Single Gap pp events
// SG selector
SGSelector sgSelector;

Expand Down Expand Up @@ -136,8 +136,7 @@ struct SGCandProducer {
track.length(),
track.tofExpMom(),
track.detectorMap(),
track.itsNCls()
);
track.itsNCls());
outputTracksFlag(track.has_collision(),
track.isPVContributor());
outputTracksLabel(track.globalIndex());
Expand All @@ -155,26 +154,26 @@ struct SGCandProducer {
{
LOGF(debug, "<SGCandProducer> collision %d", collision.globalIndex());
registry.get<TH1>(HIST("reco/Stat"))->Fill(0., 1.);
//reject collisions at TF boundaries
// reject collisions at TF boundaries
if (rejectAtTFBoundary && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) {
return;
}
//reject collisions at ITS RO TF boundaries
// reject collisions at ITS RO TF boundaries
if (noITSROFrameBorder && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) {
return;
}
// registry.get<TH1>(HIST("reco/Stat"))->Fill(1., 1.);
//reject Same Bunch PileUp
// reject Same Bunch PileUp
if (noSameBunchPileUp && !collision.selection_bit(aod::evsel::kNoSameBunchPileup)) {
return;
}
// registry.get<TH1>(HIST("reco/Stat"))->Fill(1., 1.);
//check vertex matching to FT0
// check vertex matching to FT0
if (IsGoodVertex && !collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV)) {
return;
}
// registry.get<TH1>(HIST("reco/Stat"))->Fill(1., 1.);
//reject ITS Only vertices
// reject ITS Only vertices
if (ITSTPCVertex && !collision.selection_bit(aod::evsel::kIsVertexITSTPC)) {
return;
}
Expand Down
136 changes: 72 additions & 64 deletions PWGUD/Tasks/SG_FourPi_Analyzer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
using namespace std;
using namespace o2;
using namespace o2::aod;
//using namespace o2::aod::track::v001;
// using namespace o2::aod::track::v001;
using namespace o2::framework;
using namespace o2::framework::expressions;
#define mpion 0.1396
Expand Down Expand Up @@ -92,9 +92,9 @@
// Single gap either side
TLorentzVector v01;
// int truegapSide = sgSelector.trueGap(collision);
//int truegapSide = sgSelector.trueGap(collision, FV0_cut, ZDC_cut);
float FIT_cut[5]={FV0_cut, FT0A_cut, FT0C_cut, FDDA_cut, FDDC_cut};
//int truegapSide = sgSelector.trueGap(collision, *FIT_cut, ZDC_cut);
// int truegapSide = sgSelector.trueGap(collision, FV0_cut, ZDC_cut);
float FIT_cut[5] = {FV0_cut, FT0A_cut, FT0C_cut, FDDA_cut, FDDC_cut};
// int truegapSide = sgSelector.trueGap(collision, *FIT_cut, ZDC_cut);
int truegapSide = sgSelector.trueGap(collision, FIT_cut[0], FIT_cut[1], FIT_cut[3], ZDC_cut);
registry.fill(HIST("GapSide"), gapSide);
registry.fill(HIST("TrueGapSide"), truegapSide);
Expand All @@ -103,70 +103,78 @@
// Look for D0 and D0bar
float sign = 0;
for (auto t : tracks) {
//int itsNCls = t.itsNCls();
int itsNCls = t.uditsNCls();
// int itsNCls = o2::aod::track::v001::ITSNCls<track::ITSClusterSizes>;
// if (t.itsNCls()) {std::cout << t.itsClusterSizes()<<std::endl;
// registry.fill(HIST("ITSNCls"), t.itsClusterSizes());}
//if (itsNCls) {
std::cout <<t.itsClusterSizes()<<"\t"<< itsNCls<<std::endl;
registry.fill(HIST("ITSNCls"), itsNCls);
//}
TLorentzVector a;
a.SetXYZM(t.px(), t.py(), t.pz(), mpion);
if (trackselector(t)){
sign += t.sign();
goodTracks.push_back(a);
}
// int itsNCls = t.itsNCls();
int itsNCls = t.uditsNCls();
// int itsNCls = o2::aod::track::v001::ITSNCls<track::ITSClusterSizes>;

Check failure on line 108 in PWGUD/Tasks/SG_FourPi_Analyzer.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Tab characters found

Indent code using spaces instead of tabs.
// if (t.itsNCls()) {std::cout << t.itsClusterSizes()<<std::endl;

Check failure on line 109 in PWGUD/Tasks/SG_FourPi_Analyzer.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Tab characters found

Indent code using spaces instead of tabs.
// registry.fill(HIST("ITSNCls"), t.itsClusterSizes());}

Check failure on line 110 in PWGUD/Tasks/SG_FourPi_Analyzer.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Tab characters found

Indent code using spaces instead of tabs.
// if (itsNCls) {
std::cout << t.itsClusterSizes() << "\t" << itsNCls << std::endl;
registry.fill(HIST("ITSNCls"), itsNCls);
//}
TLorentzVector a;
a.SetXYZM(t.px(), t.py(), t.pz(), mpion);
if (trackselector(t)) {
sign += t.sign();
goodTracks.push_back(a);
}
}
// std::cout << goodTracks.size()<<std::endl;
if (goodTracks.size()==4) {
for (auto pion : goodTracks){
v01 += pion;
}
// Apply pion hypothesis and create pairs
// Opposite sign pairs
// std::cout << goodTracks.size()<<std::endl;
if (goodTracks.size() == 4) {
for (auto pion : goodTracks) {
v01 += pion;
}
// Apply pion hypothesis and create pairs
// Opposite sign pairs

if (sign == 0) {
registry.fill(HIST("os_4Pi_pT"), v01.Pt());
registry.fill(HIST("os_4Pi_eTa"), v01.Eta());
if(TMath::Abs(v01.Eta()<0.9) && v01.Pt() < .15) registry.fill(HIST("os_4Pi_invm"), v01.M());
if (gapSide == 0) {
registry.fill(HIST("os_4Pi_pT_0"), v01.Pt());
registry.fill(HIST("os_4Pi_eTa_0"), v01.Eta());
if(TMath::Abs(v01.Eta()<0.9) && v01.Pt() < .15) registry.fill(HIST("os_4Pi_invm_0"), v01.M());
}
if (gapSide == 1) {
registry.fill(HIST("os_4Pi_pT_1"), v01.Pt());
registry.fill(HIST("os_4Pi_eTa_1"), v01.Eta());
if(TMath::Abs(v01.Eta()<0.9) && v01.Pt() < .15) registry.fill(HIST("os_4Pi_invm_1"), v01.M());
}
if (gapSide == 2) {
registry.fill(HIST("os_4Pi_pT_2"), v01.Pt());
registry.fill(HIST("os_4Pi_eTa_2"), v01.Eta());
if(TMath::Abs(v01.Eta()<0.9) && v01.Pt() < .15) registry.fill(HIST("os_4Pi_invm_2"), v01.M());
}
} else {
registry.fill(HIST("ss_4Pi_pT"), v01.Pt());
registry.fill(HIST("ss_4Pi_eTa"), v01.Eta());
if(TMath::Abs(v01.Eta()<0.9) && v01.Pt() < .15) registry.fill(HIST("ss_4Pi_invm"), v01.M());
if (gapSide == 0) {
registry.fill(HIST("ss_4Pi_pT_0"), v01.Pt());
registry.fill(HIST("ss_4Pi_eTa_0"), v01.Eta());
if(TMath::Abs(v01.Eta()<0.9) && v01.Pt() < .15) registry.fill(HIST("ss_4Pi_invm_0"), v01.M());
}
if (gapSide == 1) {
registry.fill(HIST("ss_4Pi_pT_1"), v01.Pt());
registry.fill(HIST("ss_4Pi_eTa_1"), v01.Eta());
if(TMath::Abs(v01.Eta()<0.9) && v01.Pt() < .15) registry.fill(HIST("ss_4Pi_invm_1"), v01.M());
}
if (gapSide == 2) {
registry.fill(HIST("ss_4Pi_pT_2"), v01.Pt());
registry.fill(HIST("ss_4Pi_eTa_2"), v01.Eta());
if(TMath::Abs(v01.Eta()<0.9) && v01.Pt() < .15) registry.fill(HIST("ss_4Pi_invm_2"), v01.M());
}
if (sign == 0) {
registry.fill(HIST("os_4Pi_pT"), v01.Pt());
registry.fill(HIST("os_4Pi_eTa"), v01.Eta());
if (TMath::Abs(v01.Eta() < 0.9) && v01.Pt() < .15)
registry.fill(HIST("os_4Pi_invm"), v01.M());
if (gapSide == 0) {
registry.fill(HIST("os_4Pi_pT_0"), v01.Pt());
registry.fill(HIST("os_4Pi_eTa_0"), v01.Eta());
if (TMath::Abs(v01.Eta() < 0.9) && v01.Pt() < .15)
registry.fill(HIST("os_4Pi_invm_0"), v01.M());
}
if (gapSide == 1) {
registry.fill(HIST("os_4Pi_pT_1"), v01.Pt());
registry.fill(HIST("os_4Pi_eTa_1"), v01.Eta());
if (TMath::Abs(v01.Eta() < 0.9) && v01.Pt() < .15)
registry.fill(HIST("os_4Pi_invm_1"), v01.M());
}
if (gapSide == 2) {
registry.fill(HIST("os_4Pi_pT_2"), v01.Pt());
registry.fill(HIST("os_4Pi_eTa_2"), v01.Eta());
if (TMath::Abs(v01.Eta() < 0.9) && v01.Pt() < .15)
registry.fill(HIST("os_4Pi_invm_2"), v01.M());
}
} else {
registry.fill(HIST("ss_4Pi_pT"), v01.Pt());
registry.fill(HIST("ss_4Pi_eTa"), v01.Eta());
if (TMath::Abs(v01.Eta() < 0.9) && v01.Pt() < .15)
registry.fill(HIST("ss_4Pi_invm"), v01.M());
if (gapSide == 0) {
registry.fill(HIST("ss_4Pi_pT_0"), v01.Pt());
registry.fill(HIST("ss_4Pi_eTa_0"), v01.Eta());
if (TMath::Abs(v01.Eta() < 0.9) && v01.Pt() < .15)
registry.fill(HIST("ss_4Pi_invm_0"), v01.M());
}
if (gapSide == 1) {
registry.fill(HIST("ss_4Pi_pT_1"), v01.Pt());
registry.fill(HIST("ss_4Pi_eTa_1"), v01.Eta());
if (TMath::Abs(v01.Eta() < 0.9) && v01.Pt() < .15)
registry.fill(HIST("ss_4Pi_invm_1"), v01.M());
}
if (gapSide == 2) {
registry.fill(HIST("ss_4Pi_pT_2"), v01.Pt());
registry.fill(HIST("ss_4Pi_eTa_2"), v01.Eta());
if (TMath::Abs(v01.Eta() < 0.9) && v01.Pt() < .15)
registry.fill(HIST("ss_4Pi_invm_2"), v01.M());
}
}
}
}
};

Expand Down
Loading