Skip to content

Commit 447618f

Browse files
committed
Update
1 parent a5f22f0 commit 447618f

1 file changed

Lines changed: 30 additions & 25 deletions

File tree

PWGUD/Tasks/upcPhotonuclearAnalysis.cxx

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -35,38 +35,40 @@ struct upcPhotonuclearAnalysis {
3535
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
3636

3737
// Declare configurables
38-
Configurable<float> cutMyptMin{"cutMyptMin", 0.1f, {"My Track cut"}};
39-
Configurable<float> cutMyptMax{"cutMyptMax", 1e10f, {"My Track cut"}};
38+
Configurable<float> cutMyPosZMin{"cutMyPosZMin", -20., {"My collision cut"}};
39+
Configurable<float> cutMyPosZMax{"cutMyPosZMax", 20., {"My collision cut"}};
40+
Configurable<float> cutMyptMin{"cutMyptMin", 0.15, {"My Track cut"}};
41+
Configurable<float> cutMyptMax{"cutMyptMax", 10., {"My Track cut"}};
4042
Configurable<float> cutMyetaMin{"cutMyetaMin", -1.0, {"My Track cut"}};
4143
Configurable<float> cutMyetaMax{"cutMyetaMax", 1.0, {"My Track cut"}};
4244
Configurable<float> cutMydcaZmax{"cutMydcaZmax", 2.f, {"My Track cut"}};
4345
Configurable<float> cutMydcaXYmax{"cutMydcaXYmax", 1e0f, {"My Track cut"}};
4446
Configurable<bool> cutMydcaXYusePt{"cutMydcaXYusePt", false, {"My Track cut"}};
4547

46-
using FullSGUDCollision = soa::Join<aod::UDCollisions, aod::UDCollisionsSels, aod::SGCollisions, aod::UDZdcs>::iterator;
47-
using FullUDTracks = soa::Join<aod::UDTracks, aod::UDTracksExtra, aod::UDTracksDCA, aod::UDTracksFlags, aod::UDTracksCov>;
48+
using FullSGUDCollision = soa::Join<aod::UDCollisions, aod::UDCollisionsSels, aod::SGCollisions, aod::UDZdcsReduced>::iterator;
49+
using FullUDTracks = soa::Join<aod::UDTracks, aod::UDTracksExtra, aod::UDTracksDCA, aod::UDTracksFlags>;
4850

4951
void init(InitContext const&)
5052
{
51-
const AxisSpec axisCollision{4, 0.5, 3.5};
53+
const AxisSpec axisCollision{4, -0.5, 3.5};
5254
const AxisSpec axisZvtx{40, -20., 20.};
5355
const AxisSpec axisPt{402, -0.05, 20.05};
5456
const AxisSpec axisPhi{64, -2 * o2::constants::math::PI, 2 * o2::constants::math::PI};
5557
const AxisSpec axisEta{50, -1.2, 1.2};
5658
const AxisSpec axisNch{101, -0.5, 100.5};
57-
const AxisSpec axisZNEnergy{1000, -100, 150000};
58-
const AxisSpec axisZNTime{200, -100, 100};
59+
const AxisSpec axisZNEnergy{1000, 0, 1000};
60+
const AxisSpec axisZNTime{40, -20, 20};
5961

6062
histos.add("Events/hCountCollisions", "0 total - 1 side A - 2 side C - 3 both side; Number of analysed collision; counts", kTH1F, {axisCollision});
6163

6264
// histos to selection gap in side A
63-
histos.add("Tracks/SGsideA/hTrackZVtx", "vertex in z; z (cm); counts", kTH1F, {axisZvtx});
6465
histos.add("Tracks/SGsideA/hTrackPt", "#it{p_{T}} distribution; #it{p_{T}}; counts", kTH1F, {axisPt});
6566
histos.add("Tracks/SGsideA/hTrackPhi", "#it{#phi} distribution; #it{#phi}; counts", kTH1F, {axisPhi});
6667
histos.add("Tracks/SGsideA/hTrackEta", "#it{#eta} distribution; #it{#eta}; counts", kTH1F, {axisEta});
6768

69+
histos.add("Events/SGsideA/hTrackZVtx", "vertex in z; z (cm); counts", kTH1F, {axisZvtx});
6870
histos.add("Events/SGsideA/hNch", "#it{N_{ch}} distribution; #it{N_{ch}}; counts", kTH1F, {axisNch});
69-
histos.add("Events/SGsideA/hPtVSNch", "#it{ #LT p_{T} #GT } vs #it{N_{ch}}; #it{ #LT p_{T} #GT }; #it{p_{T}}", kTH2F, {axisPt, axisNch});
71+
histos.add("Events/SGsideA/hPtVSNch", "#it{ #LT p_{T} #GT } vs #it{N_{ch}}; #it{N_{ch}}; #it{ #LT p_{T} #GT }", kTH2F, {axisNch, axisPt});
7072
histos.add("Events/SGsideA/hEnergyZNA", "Energy in side A distribution; Energy in side A; counts", kTH1F, {axisZNEnergy});
7173
histos.add("Events/SGsideA/hEnergyZNC", "Energy in side C distribution; Energy in side C; counts", kTH1F, {axisZNEnergy});
7274
histos.add("Events/SGsideA/hEnergyRelationSides", "Energy in side A vs energy in side C; Energy in side A; Energy in side C", kTH2F, {axisZNEnergy, axisZNEnergy});
@@ -75,13 +77,13 @@ struct upcPhotonuclearAnalysis {
7577
histos.add("Events/SGsideA/hTimeRelationSides", "Time in side A vs time in side C; Time in side A; Time in side C", kTH2F, {axisZNTime, axisZNTime});
7678

7779
// histos to selection gap in side A
78-
histos.add("Tracks/SGsideC/hTrackZVtx", "vertex in z; z (cm); counts", kTH1F, {axisZvtx});
7980
histos.add("Tracks/SGsideC/hTrackPt", "#it{p_{T}} distribution; #it{p_{T}}; counts", kTH1F, {axisPt});
8081
histos.add("Tracks/SGsideC/hTrackPhi", "#it{#phi} distribution; #it{#phi}; counts", kTH1F, {axisPhi});
8182
histos.add("Tracks/SGsideC/hTrackEta", "#it{#eta} distribution; #it{#eta}; counts", kTH1F, {axisEta});
8283

84+
histos.add("Events/SGsideC/hTrackZVtx", "vertex in z; z (cm); counts", kTH1F, {axisZvtx});
8385
histos.add("Events/SGsideC/hNch", "#it{N_{ch}} distribution; #it{N_{ch}}; counts", kTH1F, {axisNch});
84-
histos.add("Events/SGsideC/hPtVSNch", "#it{ #LT p_{T} #GT } vs #it{N_{ch}}; #it{ #LT p_{T} #GT }; #it{p_{T}}", kTH2F, {axisPt, axisNch});
86+
histos.add("Events/SGsideC/hPtVSNch", "#it{ #LT p_{T} #GT } vs #it{N_{ch}}; #it{N_{ch}}; #it{ #LT p_{T} #GT }", kTH2F, {axisNch, axisPt});
8587
histos.add("Events/SGsideC/hEnergyZNA", "Energy in side A distribution; Energy in side A; counts", kTH1F, {axisZNEnergy});
8688
histos.add("Events/SGsideC/hEnergyZNC", "Energy in side C distribution; Energy in side C; counts", kTH1F, {axisZNEnergy});
8789
histos.add("Events/SGsideC/hEnergyRelationSides", "Energy in side A vs energy in side C; Energy in side A; Energy in side C", kTH2F, {axisZNEnergy, axisZNEnergy});
@@ -90,13 +92,13 @@ struct upcPhotonuclearAnalysis {
9092
histos.add("Events/SGsideC/hTimeRelationSides", "Time in side A vs time in side C; Time in side A; Time in side C", kTH2F, {axisZNTime, axisZNTime});
9193

9294
// histos to selection gap in side A
93-
histos.add("Tracks/SGsideBoth/hTrackZVtx", "vertex in z; z (cm); counts", kTH1F, {axisZvtx});
9495
histos.add("Tracks/SGsideBoth/hTrackPt", "#it{p_{T}} distribution; #it{p_{T}}; counts", kTH1F, {axisPt});
9596
histos.add("Tracks/SGsideBoth/hTrackPhi", "#it{#phi} distribution; #it{#phi}; counts", kTH1F, {axisPhi});
9697
histos.add("Tracks/SGsideBoth/hTrackEta", "#it{#eta} distribution; #it{#eta}; counts", kTH1F, {axisEta});
9798

99+
histos.add("Events/SGsideBoth/hTrackZVtx", "vertex in z; z (cm); counts", kTH1F, {axisZvtx});
98100
histos.add("Events/SGsideBoth/hNch", "#it{N_{ch}} distribution; #it{N_{ch}}; counts", kTH1F, {axisNch});
99-
histos.add("Events/SGsideBoth/hPtVSNch", "#it{ #LT p_{T} #GT } vs #it{ #LT p_{T} #GT }; #it{N_{ch}}; #it{ #LTp_{T}#GT }", kTH2F, {axisPt, axisNch});
101+
histos.add("Events/SGsideBoth/hPtVSNch", "#it{ #LT p_{T} #GT } vs #it{N_{ch}}; #it{N_{ch}}; #it{ #LT p_{T} #GT }", kTH2F, {axisNch, axisPt});
100102
histos.add("Events/SGsideBoth/hEnergyZNA", "Energy in side A distribution; Energy in side A; counts", kTH1F, {axisZNEnergy});
101103
histos.add("Events/SGsideBoth/hEnergyZNC", "Energy in side C distribution; Energy in side C; counts", kTH1F, {axisZNEnergy});
102104
histos.add("Events/SGsideBoth/hEnergyRelationSides", "Energy in side A vs energy in side C; Energy in side A; Energy in side C", kTH2F, {axisZNEnergy, axisZNEnergy});
@@ -146,21 +148,22 @@ struct upcPhotonuclearAnalysis {
146148
histos.fill(HIST("Events/SGsideA/hTimeZNA"), reconstructedCollision.timeZNA());
147149
histos.fill(HIST("Events/SGsideA/hTimeZNC"), reconstructedCollision.timeZNC());
148150
histos.fill(HIST("Events/SGsideA/hTimeRelationSides"), reconstructedCollision.timeZNA(), reconstructedCollision.timeZNC());
151+
histos.fill(HIST("Events/SGsideA/hTrackZVtx"), reconstructedCollision.posZ());
149152
for (auto& track : reconstructedTracks) {
150153
if (track.sign() == 1 || track.sign() == -1) {
151154
if (isTrackCut(track) == false) {
152155
continue;
153156
}
154157
nTracksCharged++;
155158
sumPt += track.pt();
156-
histos.fill(HIST("Tracks/SGsideBoth/hTrackZVtx"), track.z());
157-
histos.fill(HIST("Tracks/SGsideBoth/hTrackPt"), track.pt());
158-
histos.fill(HIST("Tracks/SGsideBoth/hTrackPhi"), phi(track.px(), track.py()));
159-
histos.fill(HIST("Tracks/SGsideBoth/hTrackEta"), eta(track.px(), track.py(), track.pz()));
159+
histos.fill(HIST("Tracks/SGsideA/hTrackPt"), track.pt());
160+
histos.fill(HIST("Tracks/SGsideA/hTrackPhi"), phi(track.px(), track.py()));
161+
histos.fill(HIST("Tracks/SGsideA/hTrackEta"), eta(track.px(), track.py(), track.pz()));
160162
}
161163
}
162164
histos.fill(HIST("Events/SGsideA/hNch"), nTracksCharged);
163-
histos.fill(HIST("Events/SGsideA/hPtVSNch"), sumPt / nTracksCharged, nTracksCharged);
165+
histos.fill(HIST("Events/SGsideA/hPtVSNch"), nTracksCharged, (sumPt / nTracksCharged) );
166+
nTracksCharged = sumPt = 0;
164167
break;
165168
case 1: // for side C
166169
histos.fill(HIST("Events/hCountCollisions"), 2);
@@ -170,21 +173,22 @@ struct upcPhotonuclearAnalysis {
170173
histos.fill(HIST("Events/SGsideC/hTimeZNA"), reconstructedCollision.timeZNA());
171174
histos.fill(HIST("Events/SGsideC/hTimeZNC"), reconstructedCollision.timeZNC());
172175
histos.fill(HIST("Events/SGsideC/hTimeRelationSides"), reconstructedCollision.timeZNA(), reconstructedCollision.timeZNC());
176+
histos.fill(HIST("Events/SGsideC/hTrackZVtx"), reconstructedCollision.posZ());
173177
for (auto& track : reconstructedTracks) {
174178
if (track.sign() == 1 || track.sign() == -1) {
175179
if (isTrackCut(track) == false) {
176180
continue;
177181
}
178182
nTracksCharged++;
179183
sumPt += track.pt();
180-
histos.fill(HIST("Tracks/SGsideBoth/hTrackZVtx"), track.z());
181-
histos.fill(HIST("Tracks/SGsideBoth/hTrackPt"), track.pt());
182-
histos.fill(HIST("Tracks/SGsideBoth/hTrackPhi"), phi(track.px(), track.py()));
183-
histos.fill(HIST("Tracks/SGsideBoth/hTrackEta"), eta(track.px(), track.py(), track.pz()));
184+
histos.fill(HIST("Tracks/SGsideC/hTrackPt"), track.pt());
185+
histos.fill(HIST("Tracks/SGsideC/hTrackPhi"), phi(track.px(), track.py()));
186+
histos.fill(HIST("Tracks/SGsideC/hTrackEta"), eta(track.px(), track.py(), track.pz()));
184187
}
185188
}
186189
histos.fill(HIST("Events/SGsideC/hNch"), nTracksCharged);
187-
histos.fill(HIST("Events/SGsideC/hPtVSNch"), sumPt / nTracksCharged, nTracksCharged);
190+
histos.fill(HIST("Events/SGsideC/hPtVSNch"), nTracksCharged, (sumPt / nTracksCharged));
191+
nTracksCharged = sumPt = 0;
188192
break;
189193
case 2: // for both sides
190194
histos.fill(HIST("Events/hCountCollisions"), 3);
@@ -194,21 +198,22 @@ struct upcPhotonuclearAnalysis {
194198
histos.fill(HIST("Events/SGsideBoth/hTimeZNA"), reconstructedCollision.timeZNA());
195199
histos.fill(HIST("Events/SGsideBoth/hTimeZNC"), reconstructedCollision.timeZNC());
196200
histos.fill(HIST("Events/SGsideBoth/hTimeRelationSides"), reconstructedCollision.timeZNA(), reconstructedCollision.timeZNC());
201+
histos.fill(HIST("Events/SGsideBoth/hTrackZVtx"), reconstructedCollision.posZ());
197202
for (auto& track : reconstructedTracks) {
198203
if (track.sign() == 1 || track.sign() == -1) {
199204
if (isTrackCut(track) == false) {
200205
continue;
201206
}
202207
nTracksCharged++;
203208
sumPt += track.pt();
204-
histos.fill(HIST("Tracks/SGsideBoth/hTrackZVtx"), track.z());
205209
histos.fill(HIST("Tracks/SGsideBoth/hTrackPt"), track.pt());
206210
histos.fill(HIST("Tracks/SGsideBoth/hTrackPhi"), phi(track.px(), track.py()));
207211
histos.fill(HIST("Tracks/SGsideBoth/hTrackEta"), eta(track.px(), track.py(), track.pz()));
208212
}
209213
}
210214
histos.fill(HIST("Events/SGsideBoth/hNch"), nTracksCharged);
211-
histos.fill(HIST("Events/SGsideBoth/hPtVSNch"), sumPt / nTracksCharged, nTracksCharged);
215+
histos.fill(HIST("Events/SGsideBoth/hPtVSNch"), nTracksCharged, (sumPt / nTracksCharged));
216+
nTracksCharged = sumPt = 0;
212217
break;
213218
default:
214219
return;

0 commit comments

Comments
 (0)