Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Sep 6, 2024
1 parent 335f04c commit 0124bf2
Showing 1 changed file with 54 additions and 59 deletions.
113 changes: 54 additions & 59 deletions PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ struct HfTaskElectronWeakBoson {
// track - match

if (emcClusters.size() < 1)
continue;
continue;
if (track.phi() < 1.39 || track.phi() > 3.265)
continue;
continue;
auto tracksofcluster = matchedtracks.sliceBy(perClusterMatchedTracks, track.globalIndex());

// LOGF(info, "Number of matched track: %d", tracksofcluster.size());
Expand All @@ -184,63 +184,58 @@ struct HfTaskElectronWeakBoson {
double dEta_mim = 999.9;

if (tracksofcluster.size() > 0) {
int nmatch = 0;
for (const auto& match : tracksofcluster) {
if (match.emcalcluster_as<selectedClusters>().time() < minTime || match.emcalcluster_as<selectedClusters>().time() > maxTime)
continue;
if (match.emcalcluster_as<selectedClusters>().m02() < minM02 || match.emcalcluster_as<selectedClusters>().m02() > maxM02)
continue;

double emc_m20 = match.emcalcluster_as<selectedClusters>().m20();
double emc_m02 = match.emcalcluster_as<selectedClusters>().m02();
double emc_energy = match.emcalcluster_as<selectedClusters>().energy();
double emc_phi = match.emcalcluster_as<selectedClusters>().phi();
double emc_eta = match.emcalcluster_as<selectedClusters>().eta();
double emc_time = match.emcalcluster_as<selectedClusters>().time();
// LOG(info) << "tr phi0 = " << match.track_as<TrackEle>().phi();
// LOG(info) << "tr phi1 = " << track.phi();
// LOG(info) << "emc phi = " << emc_phi;
if (nmatch == 0) {
double dPhi = match.track_as<TrackEle>().phi() - emc_phi;
double dEta = match.track_as<TrackEle>().eta() - emc_eta;

histos.fill(HIST("MatchPhiHistogram"), emc_phi, match.track_as<TrackEle>().phi());
histos.fill(HIST("MatchEtaHistogram"), emc_eta, match.track_as<TrackEle>().eta());

double R = sqrt(pow(dPhi, 2)+pow(dEta, 2));
if (R < Rmim)
{
Rmim = R;
dPhi_mim = dPhi;
dEta_mim = dEta;
}
histos.fill(HIST("TrMatchHistogram"), dPhi, dEta);
histos.fill(HIST("EMCtimeHistogram"), emc_time);

if (R < MatchR_cut)
continue;

double eop = emc_energy / match.track_as<TrackEle>().p();
// LOG(info) << "E/p" << eop;
histos.fill(HIST("EopNsigTPCHistogram"), match.track_as<TrackEle>().tpcNSigmaEl(), eop);
histos.fill(HIST("M02Histogram"), match.track_as<TrackEle>().tpcNSigmaEl(), emc_m02);
histos.fill(HIST("M20Histogram"), match.track_as<TrackEle>().tpcNSigmaEl(), emc_m20);
if (match.track_as<TrackEle>().tpcNSigmaEl() > -1.0 && match.track_as<TrackEle>().tpcNSigmaEl() <3)
{
histos.fill(HIST("EopHistogram"), match.track_as<TrackEle>().pt(), eop);
}
}
nmatch++;
}
}


if (Rmim < 10.0)
{
// LOG(info) << "R mim = " << Rmim;
histos.fill(HIST("TrMatchHistogram_mim"), dPhi_mim, dEta_mim);
}

int nmatch = 0;
for (const auto& match : tracksofcluster) {
if (match.emcalcluster_as<selectedClusters>().time() < minTime || match.emcalcluster_as<selectedClusters>().time() > maxTime)
continue;
if (match.emcalcluster_as<selectedClusters>().m02() < minM02 || match.emcalcluster_as<selectedClusters>().m02() > maxM02)
continue;

double emc_m20 = match.emcalcluster_as<selectedClusters>().m20();
double emc_m02 = match.emcalcluster_as<selectedClusters>().m02();
double emc_energy = match.emcalcluster_as<selectedClusters>().energy();
double emc_phi = match.emcalcluster_as<selectedClusters>().phi();
double emc_eta = match.emcalcluster_as<selectedClusters>().eta();
double emc_time = match.emcalcluster_as<selectedClusters>().time();
// LOG(info) << "tr phi0 = " << match.track_as<TrackEle>().phi();
// LOG(info) << "tr phi1 = " << track.phi();
// LOG(info) << "emc phi = " << emc_phi;
if (nmatch == 0) {
double dPhi = match.track_as<TrackEle>().phi() - emc_phi;
double dEta = match.track_as<TrackEle>().eta() - emc_eta;

histos.fill(HIST("MatchPhiHistogram"), emc_phi, match.track_as<TrackEle>().phi());
histos.fill(HIST("MatchEtaHistogram"), emc_eta, match.track_as<TrackEle>().eta());

double R = sqrt(pow(dPhi, 2) + pow(dEta, 2));
if (R < Rmim) {
Rmim = R;
dPhi_mim = dPhi;
dEta_mim = dEta;
}
histos.fill(HIST("TrMatchHistogram"), dPhi, dEta);
histos.fill(HIST("EMCtimeHistogram"), emc_time);

if (R < MatchR_cut)
continue;

double eop = emc_energy / match.track_as<TrackEle>().p();
// LOG(info) << "E/p" << eop;
histos.fill(HIST("EopNsigTPCHistogram"), match.track_as<TrackEle>().tpcNSigmaEl(), eop);
histos.fill(HIST("M02Histogram"), match.track_as<TrackEle>().tpcNSigmaEl(), emc_m02);
histos.fill(HIST("M20Histogram"), match.track_as<TrackEle>().tpcNSigmaEl(), emc_m20);
if (match.track_as<TrackEle>().tpcNSigmaEl() > -1.0 && match.track_as<TrackEle>().tpcNSigmaEl() < 3) {
histos.fill(HIST("EopHistogram"), match.track_as<TrackEle>().pt(), eop);
}
}
nmatch++;
}
}

if (Rmim < 10.0) {
// LOG(info) << "R mim = " << Rmim;
histos.fill(HIST("TrMatchHistogram_mim"), dPhi_mim, dEta_mim);
}

} // end of track loop
}
Expand Down

0 comments on commit 0124bf2

Please sign in to comment.