88// In applying this license CERN does not waive the privileges and immunities
99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
11- // / \ file taskElectronWeakBoson .cxx
12- // / \ task for WeakBoson (W/Z) based on electron in mid-rapidity
13- // / \ author S. Sakai & S. Ito (Univ. of Tsukuba)
11+ // / \file taskElectronWeakNoson .cxx
12+ // / \briff task for WeakBoson (W/Z) based on electron in mid-rapidity
13+ // / \author S. Sakai & S. Ito (Univ. of Tsukuba)
1414
1515#include " Framework/runDataProcessing.h"
1616#include " Framework/AnalysisTask.h"
2323#include " EMCALBase/Geometry.h"
2424#include " EMCALCalib/BadChannelMap.h"
2525
26- #include " PWGJE/DataModel/EMCALClusters.h"
27-
2826#include " DataFormatsEMCAL/Cell.h"
2927#include " DataFormatsEMCAL/Constants.h"
3028#include " DataFormatsEMCAL/AnalysisCluster.h"
3129
30+ #include " PWGJE/DataModel/EMCALClusters.h"
31+
3232using namespace o2 ;
3333using namespace o2 ::framework;
3434using namespace o2 ::framework::expressions;
3535
36- using SelectedClusters = o2::soa::Filtered<o2::aod::EMCALClusters>;
3736
38- // PbPb
39- using TrackEle = o2::soa::Filtered<o2::soa::Join<o2::aod::Tracks, o2::aod::FullTracks, o2::aod::TracksExtra_001, o2::aod::TracksDCA, o2::aod::TrackSelection, o2::aod::pidTPCFullEl>>;
37+ struct HfTaskElectronWeakBoson {
38+
39+ using SelectedClusters = o2::soa::Filtered<o2::aod::EMCALClusters>;
4040
41- // pp
42- // using TrackEle = o2::soa::Filtered<o2::soa::Join<o2::aod::Tracks, o2::aod::FullTracks, o2::aod::TracksDCA , o2::aod::TrackSelection , o2::aod::pidTPCEl , o2::aod::pidTOFEl >>;
41+ // PbPb
42+ using TrackEle = o2::soa::Filtered<o2::soa::Join<o2::aod::Tracks, o2::aod::FullTracks, o2::aod::TracksExtra_001 , o2::aod::TracksDCA , o2::aod::TrackSelection , o2::aod::pidTPCFullEl >>;
4343
44- struct HfTaskElectronWeakBoson {
44+ // pp
45+ // using TrackEle = o2::soa::Filtered<o2::soa::Join<o2::aod::Tracks, o2::aod::FullTracks, o2::aod::TracksDCA, o2::aod::TrackSelection, o2::aod::pidTPCEl, o2::aod::pidTOFEl>>;
4546
4647 Preslice<o2::aod::EMCALClusterCells> perCluster = o2::aod::emcalclustercell::emcalclusterId;
4748 Preslice<o2::aod::EMCALAmbiguousClusterCells> perClusterAmb = o2::aod::emcalclustercell::emcalambiguousclusterId;
@@ -56,24 +57,22 @@ struct HfTaskElectronWeakBoson {
5657 Filter posZFilter = (nabs(o2::aod::collision::posZ) < vtxZ);
5758
5859 // track cuts
59- Filter filter_globalTr = requireGlobalTrackInFilter();
60-
6160 Configurable<float > etalow{" etalow" , -0 .6f , " " };
6261 Configurable<float > etaup{" etaup" , 0 .6f , " " };
63- Filter etafilter = (aod::track::eta < etaup) && (aod::track::eta > etalow);
64-
6562 Configurable<float > dcaxy_cut{" dcaxy_cut" , 2 .0f , " " };
66- Filter dcaxyfilter = (nabs(aod::track::dcaXY) < dcaxy_cut);
67-
6863 Configurable<float > mimpT_cut{" mimpT_cut" , 3 .0f , " minimum pT cut" };
6964 Configurable<float > itschi2_cut{" itschi2_cut" , 15 .0f , " its chi2 cut" };
7065 Configurable<float > tpcchi2_cut{" tpcchi2_cut" , 4 .0f , " tpc chi2 cut" };
7166 Configurable<float > itsNcl_cut{" itsNcl_cut" , 2 .0f , " its # of cluster cut" };
7267 Configurable<float > tpcNcl_cut{" tpcNcl_cut" , 100 .0f , " tpc # if cluster cut" };
7368 Configurable<float > tpcNclCr_cut{" tpcNclCr_cut" , 100 .0f , " tpc # of crossedRows cut" };
7469
70+ Filter filter_globalTr = requireGlobalTrackInFilter();
71+ Filter etafilter = (aod::track::eta < etaup) && (aod::track::eta > etalow);
72+ Filter dcaxyfilter = (nabs(aod::track::dcaXY) < dcaxy_cut);
73+
7574 // cluster cut
76- Configurable<int > mClusterDefinition {" clusterDefinition " , 10 , " cluster definition to be selected, e.g. 10=kV3Default" };
75+ Configurable<int > mClusterDefinition {" mClusterDefinition " , 10 , " cluster definition to be selected, e.g. 10=kV3Default" };
7776 Configurable<float > minTime{" minTime" , -25 ., " Minimum cluster time for time cut" };
7877 Configurable<float > maxTime{" maxTime" , +20 ., " Maximum cluster time for time cut" };
7978 Configurable<float > minM02{" minM02" , 0.1 , " Minimum M02 for M02 cut" };
@@ -130,7 +129,8 @@ struct HfTaskElectronWeakBoson {
130129 histos.add (" EMCtimeHistogram" , " EMCtimeHistogram" , kTH1F , {axisEMCtime});
131130 }
132131
133- void process (soa::Filtered<aod::Collisions>::iterator const & collision, selectedClusters const & emcClusters, TrackEle const & tracks, o2::aod::EMCALMatchedTracks const & matchedtracks)
132+ // void process(soa::Filtered<aod::Collisions>::iterator const& collision, SelectedClusters const& clusters, TrackEle const& tracks, o2::aod::EMCALMatchedTracks const& matchedtracks)
133+ void process (soa::Filtered<aod::Collisions>::iterator const & collision, SelectedClusters const & emcClusters, TrackEle const & tracks, o2::aod::EMCALMatchedTracks const & matchedtracks)
134134 {
135135 histos.fill (HIST (" hEventCounter" ), 0.5 );
136136
@@ -141,7 +141,7 @@ struct HfTaskElectronWeakBoson {
141141
142142 histos.fill (HIST (" ZvtxHistogram" ), collision.posZ ());
143143
144- for (auto & track : tracks) {
144+ for (const auto & track : tracks) {
145145
146146 histos.fill (HIST (" etaHistogram" ), track.eta ());
147147 histos.fill (HIST (" ITS_Chi2_Hist" ), track.itsChi2NCl ());
@@ -150,7 +150,7 @@ struct HfTaskElectronWeakBoson {
150150 histos.fill (HIST (" ITS_NCls_Hist" ), track.itsNCls ());
151151 histos.fill (HIST (" TPC_NClsCrossedRows_Hist" ), track.tpcNClsCrossedRows ());
152152
153- if (std::abs (track.eta ()) > 0.6 )
153+ if (std::abs (track.eta ()) > etaup )
154154 continue ;
155155 if (track.tpcNClsCrossedRows () < tpcNclCr_cut)
156156 continue ;
@@ -172,9 +172,9 @@ struct HfTaskElectronWeakBoson {
172172 // track - match
173173
174174 if (emcClusters.size () < 1 )
175- continue ;
176- if (track.phi () < 1.39 || track.phi () > 3.265 )
177- continue ;
175+ continue ;
176+ if (track.phi () < 1.39 || track.phi () > 3.15 )
177+ continue ;
178178 auto tracksofcluster = matchedtracks.sliceBy (perClusterMatchedTracks, track.globalIndex ());
179179
180180 // LOGF(info, "Number of matched track: %d", tracksofcluster.size());
@@ -184,63 +184,59 @@ struct HfTaskElectronWeakBoson {
184184 double dEta_mim = 999.9 ;
185185
186186 if (tracksofcluster.size () > 0 ) {
187- int nmatch = 0 ;
188- for (const auto & match : tracksofcluster) {
189- if (match.emcalcluster_as <selectedClusters>().time () < minTime || match.emcalcluster_as <selectedClusters>().time () > maxTime)
190- continue ;
191- if (match.emcalcluster_as <selectedClusters>().m02 () < minM02 || match.emcalcluster_as <selectedClusters>().m02 () > maxM02)
192- continue ;
193-
194- double emc_m20 = match.emcalcluster_as <selectedClusters>().m20 ();
195- double emc_m02 = match.emcalcluster_as <selectedClusters>().m02 ();
196- double emc_energy = match.emcalcluster_as <selectedClusters>().energy ();
197- double emc_phi = match.emcalcluster_as <selectedClusters>().phi ();
198- double emc_eta = match.emcalcluster_as <selectedClusters>().eta ();
199- double emc_time = match.emcalcluster_as <selectedClusters>().time ();
200- // LOG(info) << "tr phi0 = " << match.track_as<TrackEle>().phi();
201- // LOG(info) << "tr phi1 = " << track.phi();
202- // LOG(info) << "emc phi = " << emc_phi;
203- if (nmatch == 0 ) {
204- double dPhi = match.track_as <TrackEle>().phi () - emc_phi;
205- double dEta = match.track_as <TrackEle>().eta () - emc_eta;
206-
207- histos.fill (HIST (" MatchPhiHistogram" ), emc_phi, match.track_as <TrackEle>().phi ());
208- histos.fill (HIST (" MatchEtaHistogram" ), emc_eta, match.track_as <TrackEle>().eta ());
209-
210- double R = sqrt (pow (dPhi, 2 )+pow (dEta, 2 ));
211- if (R < Rmim)
212- {
213- Rmim = R;
214- dPhi_mim = dPhi;
215- dEta_mim = dEta;
216- }
217- histos.fill (HIST (" TrMatchHistogram" ), dPhi, dEta);
218- histos.fill (HIST (" EMCtimeHistogram" ), emc_time);
219-
220- if (R < MatchR_cut)
221- continue ;
222-
223- double eop = emc_energy / match.track_as <TrackEle>().p ();
224- // LOG(info) << "E/p" << eop;
225- histos.fill (HIST (" EopNsigTPCHistogram" ), match.track_as <TrackEle>().tpcNSigmaEl (), eop);
226- histos.fill (HIST (" M02Histogram" ), match.track_as <TrackEle>().tpcNSigmaEl (), emc_m02);
227- histos.fill (HIST (" M20Histogram" ), match.track_as <TrackEle>().tpcNSigmaEl (), emc_m20);
228- if (match.track_as <TrackEle>().tpcNSigmaEl () > -1.0 && match.track_as <TrackEle>().tpcNSigmaEl () <3 )
229- {
230- histos.fill (HIST (" EopHistogram" ), match.track_as <TrackEle>().pt (), eop);
231- }
232- }
233- nmatch++;
234- }
235- }
236-
237-
238- if (Rmim < 10.0 )
239- {
240- // LOG(info) << "R mim = " << Rmim;
241- histos.fill (HIST (" TrMatchHistogram_mim" ), dPhi_mim, dEta_mim);
242- }
243-
187+ int nmatch = 0 ;
188+ for (const auto & match : tracksofcluster) {
189+ if (match.emcalcluster_as <SelectedClusters>().time () < minTime || match.emcalcluster_as <SelectedClusters>().time () > maxTime)
190+ continue ;
191+ if (match.emcalcluster_as <SelectedClusters>().m02 () < minM02 || match.emcalcluster_as <SelectedClusters>().m02 () > maxM02)
192+ continue ;
193+
194+ double emc_m20 = match.emcalcluster_as <SelectedClusters>().m20 ();
195+ double emc_m02 = match.emcalcluster_as <SelectedClusters>().m02 ();
196+ double emc_energy = match.emcalcluster_as <SelectedClusters>().energy ();
197+ double emc_phi = match.emcalcluster_as <SelectedClusters>().phi ();
198+ double emc_eta = match.emcalcluster_as <SelectedClusters>().eta ();
199+ double emc_time = match.emcalcluster_as <SelectedClusters>().time ();
200+ // LOG(info) << "tr phi0 = " << match.track_as<TrackEle>().phi();
201+ // LOG(info) << "tr phi1 = " << track.phi();
202+ // LOG(info) << "emc phi = " << emc_phi;
203+ if (nmatch == 0 ) {
204+ double dPhi = match.track_as <TrackEle>().phi () - emc_phi;
205+ double dEta = match.track_as <TrackEle>().eta () - emc_eta;
206+
207+ histos.fill (HIST (" MatchPhiHistogram" ), emc_phi, match.track_as <TrackEle>().phi ());
208+ histos.fill (HIST (" MatchEtaHistogram" ), emc_eta, match.track_as <TrackEle>().eta ());
209+
210+ double R = sqrt (pow (dPhi, 2 ) + pow (dEta, 2 ));
211+ if (R < Rmim) {
212+ Rmim = R;
213+ dPhi_mim = dPhi;
214+ dEta_mim = dEta;
215+ }
216+ histos.fill (HIST (" TrMatchHistogram" ), dPhi, dEta);
217+ histos.fill (HIST (" EMCtimeHistogram" ), emc_time);
218+
219+ if (R < MatchR_cut)
220+ continue ;
221+
222+ double eop = emc_energy / match.track_as <TrackEle>().p ();
223+ // LOG(info) << "E/p" << eop;
224+ histos.fill (HIST (" EopNsigTPCHistogram" ), match.track_as <TrackEle>().tpcNSigmaEl (), eop);
225+ histos.fill (HIST (" M02Histogram" ), match.track_as <TrackEle>().tpcNSigmaEl (), emc_m02);
226+ histos.fill (HIST (" M20Histogram" ), match.track_as <TrackEle>().tpcNSigmaEl (), emc_m20);
227+ if (match.track_as <TrackEle>().tpcNSigmaEl () > -1.0 && match.track_as <TrackEle>().tpcNSigmaEl () < 3 ) {
228+ histos.fill (HIST (" EopHistogram" ), match.track_as <TrackEle>().pt (), eop);
229+ }
230+ }
231+
232+ nmatch++;
233+ }
234+ }
235+
236+ if (Rmim < 10.0 ) {
237+ // LOG(info) << "R mim = " << Rmim;
238+ histos.fill (HIST (" TrMatchHistogram_mim" ), dPhi_mim, dEta_mim);
239+ }
244240
245241 } // end of track loop
246242 }
0 commit comments