|
13 | 13 | // Department of Physics, Aligarh Muslim University, India |
14 | 14 | // to study the net charge fluctuations by observable, #nu_dyn |
15 | 15 |
|
16 | | - |
17 | | - |
18 | 16 | #include "Framework/AnalysisTask.h" |
19 | 17 | #include "Framework/runDataProcessing.h" |
20 | 18 | #include "Common/DataModel/EventSelection.h" |
|
24 | 22 | #include "Common/Core/TrackSelection.h" |
25 | 23 | #include "Common/DataModel/TrackSelectionTables.h" |
26 | 24 |
|
27 | | - |
28 | 25 | using namespace o2; |
29 | 26 | using namespace o2::framework; |
30 | 27 | using namespace o2::framework::expressions; |
31 | 28 | using namespace std; |
32 | 29 |
|
33 | | - |
34 | 30 | namespace o2::aod |
35 | 31 | { |
36 | | - using MyCollisions = soa::Join<aod::Collisions,aod::EvSels,aod::CentRun2V0Ms,aod::Mults>; |
37 | | - using MyCollision = MyCollisions::iterator; |
| 32 | +using MyCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentRun2V0Ms, aod::Mults>; |
| 33 | +using MyCollision = MyCollisions::iterator; |
38 | 34 |
|
39 | | - using MyTracks = soa::Join<aod::Tracks,aod::TracksExtra,aod::TracksDCA,aod::TrackSelection>; |
40 | | - using MyTrack = MyTracks::iterator; |
41 | | -} |
| 35 | +using MyTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection>; |
| 36 | +using MyTrack = MyTracks::iterator; |
| 37 | +} // namespace o2::aod |
42 | 38 |
|
43 | | -struct NetchargeFluctuations |
44 | | -{ |
| 39 | +struct NetchargeFluctuations { |
45 | 40 | HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; |
46 | | - void init(o2::framework::InitContext&) |
47 | | - { |
48 | | - AxisSpec vtxZAxis = {100, -20, 20, "Z (cm)"}; |
49 | | - AxisSpec dcaAxis = {1000, -100, 100, "DCA_{xy} (cm)"}; |
50 | | - AxisSpec dcazAxis = {1000, -100, 100, "DCA_{z} (cm)"}; |
51 | | - AxisSpec ptAxis = {40, 0.0, 4.0, "#it{p}_{T} (GeV/#it{c})"}; |
52 | | - AxisSpec etaAxis = {30, -1.5, 1.5, "#eta"}; |
53 | | - AxisSpec centAxis = {100, 0., 100., "centrality"}; |
54 | | - AxisSpec multAxis = {2000, 0., 2000., "multiplicity"}; |
55 | | - |
56 | | - histos.add("hVertexZ_bef", "", kTH1F, {vtxZAxis}); |
57 | | - histos.add("hVertexZ_aft", "", kTH1F, {vtxZAxis}); |
58 | | - histos.add("hVertexZ_aft_sel", "", kTH1D, {vtxZAxis}); |
59 | | - histos.add("hDCAxy_bef", "", kTH1D, {dcaAxis}); |
60 | | - histos.add("hDCAxy_aft", "", kTH1D, {dcaAxis}); |
61 | | - histos.add("hDCAz_bef", "", kTH1D, {dcazAxis}); |
62 | | - histos.add("hDCAz_aft", "", kTH1D, {dcazAxis}); |
63 | | - histos.add("hCentrality", "", kTH1D, {centAxis}); |
64 | | - histos.add("hMultiplicity", "", kTH1D, {multAxis}); |
65 | | - histos.add("hEta", "", kTH1F, {etaAxis}); |
66 | | - histos.add("hPt", "", kTH1F, {ptAxis}); |
67 | | - |
68 | | - } |
| 41 | + void init(o2::framework::InitContext&) |
| 42 | + { |
| 43 | + AxisSpec vtxZAxis = {100, -20, 20, "Z (cm)"}; |
| 44 | + AxisSpec dcaAxis = {1000, -100, 100, "DCA_{xy} (cm)"}; |
| 45 | + AxisSpec dcazAxis = {1000, -100, 100, "DCA_{z} (cm)"}; |
| 46 | + AxisSpec ptAxis = {40, 0.0, 4.0, "#it{p}_{T} (GeV/#it{c})"}; |
| 47 | + AxisSpec etaAxis = {30, -1.5, 1.5, "#eta"}; |
| 48 | + AxisSpec centAxis = {100, 0., 100., "centrality"}; |
| 49 | + AxisSpec multAxis = {2000, 0., 2000., "multiplicity"}; |
| 50 | + |
| 51 | + histos.add("hVertexZ_bef", "", kTH1F, {vtxZAxis}); |
| 52 | + histos.add("hVertexZ_aft", "", kTH1F, {vtxZAxis}); |
| 53 | + histos.add("hVertexZ_aft_sel", "", kTH1D, {vtxZAxis}); |
| 54 | + histos.add("hDCAxy_bef", "", kTH1D, {dcaAxis}); |
| 55 | + histos.add("hDCAxy_aft", "", kTH1D, {dcaAxis}); |
| 56 | + histos.add("hDCAz_bef", "", kTH1D, {dcazAxis}); |
| 57 | + histos.add("hDCAz_aft", "", kTH1D, {dcazAxis}); |
| 58 | + histos.add("hCentrality", "", kTH1D, {centAxis}); |
| 59 | + histos.add("hMultiplicity", "", kTH1D, {multAxis}); |
| 60 | + histos.add("hEta", "", kTH1F, {etaAxis}); |
| 61 | + histos.add("hPt", "", kTH1F, {ptAxis}); |
| 62 | + } |
69 | 63 |
|
70 | | - void process(aod::MyCollision const& coll, aod::MyTracks const& inputTracks) |
| 64 | + void process(aod::MyCollision const& coll, aod::MyTracks const& inputTracks) |
71 | 65 | { |
72 | | - histos.fill(HIST("hVertexZ_bef"), coll.posZ()); |
| 66 | + histos.fill(HIST("hVertexZ_bef"), coll.posZ()); |
73 | 67 |
|
74 | | - if (fabs(coll.posZ()) > 10.f) {return;} |
75 | | - histos.fill(HIST("hVertexZ_aft"), coll.posZ()); |
| 68 | + if (fabs(coll.posZ()) > 10.f) { |
| 69 | + return; |
| 70 | + } |
| 71 | + histos.fill(HIST("hVertexZ_aft"), coll.posZ()); |
76 | 72 |
|
77 | | - if (!coll.sel7()) { return;} |
| 73 | + if (!coll.sel7()) { |
| 74 | + return; |
| 75 | + } |
78 | 76 | histos.fill(HIST("hVertexZ_aft_sel"), coll.posZ()); |
79 | | - histos.fill(HIST("hCentrality"), coll.centRun2V0M()); |
80 | | - histos.fill(HIST("hMultiplicity"), coll.multFV0M()); |
81 | | - |
82 | | - |
83 | | - for (auto track : inputTracks) |
84 | | - { |
85 | | - if (fabs(track.eta()) > 0.8) continue; |
86 | | - if (!(track.pt() > 0.2 && track.pt() < 2.)) continue; |
87 | | - |
88 | | - histos.fill(HIST("hDCAxy_bef"), track.dcaXY()); |
89 | | - histos.fill(HIST("hDCAz_bef"), track.dcaZ()); |
90 | | - |
91 | | - if (!track.isGlobalTrack()) continue; |
92 | | - |
93 | | - histos.fill(HIST("hDCAxy_aft"), track.dcaXY()); |
94 | | - histos.fill(HIST("hDCAz_aft"), track.dcaZ()); |
95 | | - histos.fill(HIST("hPt"), track.pt()); |
96 | | - histos.fill(HIST("hEta"), track.eta()); |
97 | | - } |
| 77 | + histos.fill(HIST("hCentrality"), coll.centRun2V0M()); |
| 78 | + histos.fill(HIST("hMultiplicity"), coll.multFV0M()); |
| 79 | + |
| 80 | + for (auto track : inputTracks) { |
| 81 | + if (fabs(track.eta()) > 0.8) |
| 82 | + continue; |
| 83 | + if (!(track.pt() > 0.2 && track.pt() < 2.)) |
| 84 | + continue; |
| 85 | + |
| 86 | + histos.fill(HIST("hDCAxy_bef"), track.dcaXY()); |
| 87 | + histos.fill(HIST("hDCAz_bef"), track.dcaZ()); |
| 88 | + |
| 89 | + if (!track.isGlobalTrack()) |
| 90 | + continue; |
| 91 | + |
| 92 | + histos.fill(HIST("hDCAxy_aft"), track.dcaXY()); |
| 93 | + histos.fill(HIST("hDCAz_aft"), track.dcaZ()); |
| 94 | + histos.fill(HIST("hPt"), track.pt()); |
| 95 | + histos.fill(HIST("hEta"), track.eta()); |
| 96 | + } |
98 | 97 | } |
99 | 98 | }; |
100 | 99 | WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) |
101 | 100 | { |
102 | 101 | WorkflowSpec workflow{adaptAnalysisTask<NetchargeFluctuations>(cfgc)}; |
103 | | - return workflow; |
| 102 | + return workflow; |
104 | 103 | } |
0 commit comments