Hi Wlav,
I’ve attached an example of my code.
Essentially I’m trying to read data from jet cluster and toss events depending on the ratio of the jet pt. Then i’m trying to save them into a new root file which has the same format as the original so that it can be used in an another processing script. If I print out the original array format its like this. Please let me know if you need me to clarify things further.
[ array([ 1.18108533e+03, 9.04519287e+02, 3.02184497e+03,
1.23331250e+03, 4.84120697e+02, 4.28273499e+02,
1.82929712e+03, 7.83793579e+02, 1.61371826e+03,
5.18673193e+03, 2.20749536e+03, 5.80503357e+02,
2.04210571e+03, 4.70369720e+02, 4.28637891e+03,
1.39147302e+03, 5.77580908e+03, 1.47646942e+02,
8.06518066e+02, 4.67209961e+02, 5.18042053e+02,
1.89679260e+03, 1.18152222e+03, 7.88970764e+02,
6.42265076e+02, 5.77979553e+02, 2.48790527e+03,
2.90703217e+02, 4.10976904e+03, 1.98431555e+03,
2.00360913e+03, 2.54040869e+03, 1.16357837e+03,
3.36290576e+03, 5.99869263e+02, 8.91479675e+02,
2.18348901e+03, 5.91977722e+02, 1.90555939e+02,
2.48055444e+03, 5.88423218e+02, 1.27246399e+03,
7.86266052e+02, 2.87363678e+02, 1.04793005e+03,
5.77161865e+02, 6.40477417e+02, 3.56781342e+02,
3.56315063e+02, 4.83562500e+02, 7.90638123e+02,
9.00685669e+02, 9.04517395e+02, 2.53372757e+02,
5.39737122e+02, 1.72372852e+04, 4.67898750e+04,
3.61929625e+05], dtype=float32)
array([ 1.19759045e+03, 1.39756091e+03, 5.41287109e+02,
3.99256897e+02, 3.74767456e+02, 2.71507690e+03,
1.06788232e+03, 2.21911328e+03, 3.04491333e+03,
1.16833923e+03, 1.93684058e+03, 4.11025360e+02,
2.86714993e+01, 1.05827576e+02, 3.63362158e+03,
1.40520044e+03, 1.02330463e+03, 3.60290031e+01,
2.88414819e+03, 2.34773605e+02, 1.14307263e+03,
4.20900078e+01, 1.24197278e+03, 1.73647049e+02,
1.85284351e+03, 5.69345825e+02, 8.95068054e+02,
1.13068335e+03, 2.19429581e+02, 5.12877808e+02,
9.78123108e+02, 4.56866455e+02, 1.02758936e+03,
4.07080139e+02, 5.25493103e+02, 2.40770630e+03,
2.77651855e+02, 4.44729889e+02, 2.10584473e+03,
1.28448315e+03, 1.39501453e+03, 1.88084488e+01,
1.46668030e+03, 1.25668030e+03, 1.96674451e+03,
8.60963562e+02, 1.46088257e+03, 5.42577515e+02,
1.50466232e+02, 6.08737915e+02, 1.25062923e+01,
3.52039307e+03, 3.25381763e+03, 5.46108887e+02,
1.13470032e+03, 1.22876660e+03, 1.25030530e+03,
4.41629004e+03, 4.85909277e+03, 1.22660669e+03,
4.78635864e+02, 1.14753479e+03, 9.92383606e+02,
5.29895752e+02, 1.95257336e+03, 3.18306738e+04,
3.27122969e+04, 2.31173859e+05], dtype=float32)
…
EventsTossExample.py (1.9 KB)