Update hard_scatter/ttbar/v1 dataset card
Browse files
README.md
CHANGED
|
@@ -297,6 +297,79 @@ This dataset is designed for machine learning tasks in high-energy physics, incl
|
|
| 297 |
|
| 298 |
N/A (Physics data)
|
| 299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
## Dataset Structure
|
| 301 |
|
| 302 |
### Data Instances
|
|
|
|
| 297 |
|
| 298 |
N/A (Physics data)
|
| 299 |
|
| 300 |
+
## Quick Start
|
| 301 |
+
|
| 302 |
+
### Installation
|
| 303 |
+
|
| 304 |
+
```bash
|
| 305 |
+
pip install datasets pyarrow
|
| 306 |
+
```
|
| 307 |
+
|
| 308 |
+
### Load First 100 Events (All Objects)
|
| 309 |
+
|
| 310 |
+
```python
|
| 311 |
+
from datasets import load_dataset
|
| 312 |
+
|
| 313 |
+
# Load first 100 rows of each configuration
|
| 314 |
+
particles = load_dataset("OpenDataDetector/ColliderML_ttbar_pu0", "particles", split="train[:100]")
|
| 315 |
+
tracker_hits = load_dataset("OpenDataDetector/ColliderML_ttbar_pu0", "tracker_hits", split="train[:100]")
|
| 316 |
+
calo_hits = load_dataset("OpenDataDetector/ColliderML_ttbar_pu0", "calo_hits", split="train[:100]")
|
| 317 |
+
tracks = load_dataset("OpenDataDetector/ColliderML_ttbar_pu0", "tracks", split="train[:100]")
|
| 318 |
+
|
| 319 |
+
print(f"Loaded {len(particles)} particle events")
|
| 320 |
+
print(f"Loaded {len(tracker_hits)} tracker hit events")
|
| 321 |
+
print(f"Loaded {len(calo_hits)} calo hit events")
|
| 322 |
+
print(f"Loaded {len(tracks)} track events")
|
| 323 |
+
```
|
| 324 |
+
|
| 325 |
+
### Load Specific Columns from First 100 Events
|
| 326 |
+
|
| 327 |
+
```python
|
| 328 |
+
from datasets import load_dataset
|
| 329 |
+
import numpy as np
|
| 330 |
+
|
| 331 |
+
# Load only specific columns from particles
|
| 332 |
+
particles = load_dataset(
|
| 333 |
+
"OpenDataDetector/ColliderML_ttbar_pu0",
|
| 334 |
+
"particles",
|
| 335 |
+
split="train[:100]",
|
| 336 |
+
columns=["event_id", "px", "py", "pz", "energy", "pdg_id"]
|
| 337 |
+
)
|
| 338 |
+
|
| 339 |
+
# Access data
|
| 340 |
+
for event in particles:
|
| 341 |
+
event_id = event['event_id']
|
| 342 |
+
|
| 343 |
+
# Convert to numpy arrays
|
| 344 |
+
px = np.array(event['px'])
|
| 345 |
+
py = np.array(event['py'])
|
| 346 |
+
pz = np.array(event['pz'])
|
| 347 |
+
|
| 348 |
+
# Calculate transverse momentum
|
| 349 |
+
pt = np.sqrt(px**2 + py**2)
|
| 350 |
+
|
| 351 |
+
print(f"Event {event_id}: {len(px)} particles, mean pt = {pt.mean():.2f} GeV")
|
| 352 |
+
|
| 353 |
+
# Load only specific columns from tracks
|
| 354 |
+
tracks = load_dataset(
|
| 355 |
+
"OpenDataDetector/ColliderML_ttbar_pu0",
|
| 356 |
+
"tracks",
|
| 357 |
+
split="train[:100]",
|
| 358 |
+
columns=["event_id", "qop", "theta", "phi"]
|
| 359 |
+
)
|
| 360 |
+
|
| 361 |
+
# Calculate derived quantities
|
| 362 |
+
for event in tracks:
|
| 363 |
+
qop = np.array(event['qop'])
|
| 364 |
+
theta = np.array(event['theta'])
|
| 365 |
+
|
| 366 |
+
# Compute transverse momentum from track parameters
|
| 367 |
+
pt = np.abs(1.0 / qop) * np.sin(theta)
|
| 368 |
+
eta = -np.log(np.tan(theta / 2.0))
|
| 369 |
+
|
| 370 |
+
print(f"Event {event['event_id']}: {len(qop)} tracks, pt range [{pt.min():.2f}, {pt.max():.2f}] GeV")
|
| 371 |
+
```
|
| 372 |
+
|
| 373 |
## Dataset Structure
|
| 374 |
|
| 375 |
### Data Instances
|