Skip to content
Snippets Groups Projects
Commit 402075df authored by Felipe Garcia's avatar Felipe Garcia
Browse files

moved things to header and initialize()

parent 87255110
No related branches found
No related tags found
4 merge requests!1039Fixed formatting,!1000Fixed formatting,!864Fix crash in TupleToolHerschel when multiple versions are present,!664Centrality tuple tool
Pipeline #1834182 failed
......@@ -48,8 +48,103 @@ TupleToolCentrality::TupleToolCentrality( const std::string& type, const std::st
StatusCode TupleToolCentrality::initialize() {
if ( 100 % m_nclasses == 0 ) {
m_CaloLocation = DeCalorimeterLocation::Ecal;
m_DigitLocation = LHCb::CaloDigitLocation::Ecal;
if ( m_nclasses == 1 ) {
msg() << "TupleToolCentrality requested to use 1 centrality class" << endmsg;
} else {
msg() << Form( "TupleToolCentrality requested to use %i centrality classes", m_nclasses ) << endmsg;
}
////// Width of classes distributions ////
if ( m_nclasses == 100 ) {
m_npart_stat = {0.004, 0.006, 0.007, 0.008, 0.010, 0.011, 0.013, 0.014, 0.015, 0.016, 0.017, 0.018, 0.019,
0.021, 0.021, 0.022, 0.023, 0.025, 0.026, 0.026, 0.028, 0.029, 0.030, 0.031, 0.032, 0.033,
0.035, 0.036, 0.037, 0.038, 0.040, 0.041, 0.042, 0.043, 0.044, 0.046, 0.047, 0.049, 0.050,
0.052, 0.052, 0.054, 0.056, 0.057, 0.057, 0.059, 0.061, 0.063, 0.064, 0.066, 0.067, 0.068,
0.071, 0.072, 0.073, 0.075, 0.077, 0.079, 0.080, 0.081, 0.084, 0.085, 0.086, 0.088, 0.090,
0.092, 0.095, 0.095, 0.096, 0.099, 0.100, 0.102, 0.104, 0.106, 0.108, 0.110, 0.112, 0.113,
0.114, 0.116, 0.117, 0.119, 0.121, 0.122, 0.123, 0.125, 0.126, 0.128, 0.130, 0.129, 0.130,
0.133, 0.132, 0.133, 0.133, 0.131, 0.130, 0.121, 0.105, 0.077};
m_ncoll_stat = {0.004, 0.005, 0.007, 0.008, 0.009, 0.010, 0.012, 0.013, 0.014, 0.015, 0.017, 0.018, 0.020,
0.022, 0.023, 0.025, 0.027, 0.029, 0.031, 0.033, 0.036, 0.039, 0.041, 0.045, 0.047, 0.052,
0.057, 0.061, 0.067, 0.071, 0.075, 0.081, 0.088, 0.094, 0.100, 0.107, 0.114, 0.123, 0.130,
0.137, 0.146, 0.153, 0.166, 0.173, 0.182, 0.193, 0.203, 0.212, 0.223, 0.235, 0.246, 0.260,
0.272, 0.280, 0.293, 0.307, 0.323, 0.332, 0.346, 0.357, 0.371, 0.383, 0.397, 0.411, 0.434,
0.442, 0.454, 0.472, 0.490, 0.496, 0.514, 0.524, 0.545, 0.555, 0.570, 0.586, 0.608, 0.622,
0.627, 0.640, 0.658, 0.668, 0.688, 0.708, 0.721, 0.737, 0.751, 0.756, 0.786, 0.800, 0.812,
0.836, 0.854, 0.876, 0.902, 0.920, 0.960, 0.979, 0.967, 0.952};
m_b_stat = {0.011, 0.010, 0.010, 0.010, 0.010, 0.010, 0.010, 0.010, 0.010, 0.010, 0.009, 0.009, 0.009,
0.009, 0.009, 0.008, 0.008, 0.008, 0.008, 0.007, 0.007, 0.007, 0.007, 0.007, 0.006, 0.006,
0.006, 0.006, 0.006, 0.006, 0.006, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005,
0.005, 0.005, 0.005, 0.005, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004,
0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.003, 0.003, 0.003,
0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003,
0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003,
0.004, 0.004, 0.004, 0.004, 0.004, 0.005, 0.006, 0.006, 0.006};
} else if ( m_nclasses == 50 ) {
m_npart_stat = {0.004, 0.006, 0.007, 0.009, 0.011, 0.013, 0.014, 0.016, 0.017, 0.019, 0.020, 0.022, 0.023,
0.025, 0.027, 0.029, 0.031, 0.033, 0.035, 0.037, 0.039, 0.041, 0.042, 0.045, 0.047, 0.049,
0.052, 0.054, 0.057, 0.059, 0.062, 0.064, 0.067, 0.070, 0.072, 0.074, 0.077, 0.080, 0.083,
0.085, 0.088, 0.090, 0.092, 0.095, 0.097, 0.100, 0.101, 0.101, 0.096, 0.071};
m_ncoll_stat = {0.003, 0.005, 0.007, 0.009, 0.010, 0.012, 0.015, 0.017, 0.020, 0.023, 0.027, 0.031, 0.036,
0.042, 0.049, 0.056, 0.065, 0.074, 0.085, 0.096, 0.107, 0.122, 0.135, 0.149, 0.165, 0.182,
0.199, 0.217, 0.236, 0.254, 0.273, 0.292, 0.318, 0.337, 0.359, 0.378, 0.400, 0.423, 0.450,
0.466, 0.489, 0.515, 0.543, 0.561, 0.595, 0.623, 0.657, 0.695, 0.747, 0.755};
m_b_stat = {0.007, 0.007, 0.007, 0.007, 0.007, 0.007, 0.006, 0.006, 0.006, 0.005, 0.005, 0.005, 0.004,
0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003,
0.003, 0.003, 0.003, 0.003, 0.003, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002,
0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.003, 0.003, 0.003, 0.004, 0.005};
} else if ( m_nclasses == 25 ) {
m_npart_stat = {0.003, 0.006, 0.009, 0.011, 0.013, 0.016, 0.018, 0.021, 0.024, 0.027, 0.031, 0.034, 0.038,
0.042, 0.046, 0.050, 0.054, 0.059, 0.064, 0.069, 0.074, 0.079, 0.085, 0.089, 0.076};
m_ncoll_stat = {0.003, 0.006, 0.008, 0.012, 0.016, 0.021, 0.029, 0.039, 0.052, 0.068, 0.086, 0.107, 0.131,
0.159, 0.188, 0.217, 0.253, 0.288, 0.326, 0.366, 0.409, 0.457, 0.518, 0.598, 0.688};
m_b_stat = {0.005, 0.005, 0.005, 0.004, 0.004, 0.003, 0.003, 0.003, 0.003, 0.003, 0.002, 0.002, 0.002,
0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.003, 0.004};
} else if ( m_nclasses == 20 ) {
m_npart_stat = {0.003, 0.006, 0.009, 0.012, 0.015, 0.018, 0.022, 0.025, 0.030, 0.034,
0.039, 0.043, 0.049, 0.054, 0.060, 0.067, 0.073, 0.081, 0.088, 0.080};
m_ncoll_stat = {0.003, 0.006, 0.009, 0.014, 0.020, 0.030, 0.043, 0.061, 0.083, 0.108,
0.139, 0.173, 0.210, 0.253, 0.297, 0.349, 0.403, 0.475, 0.568, 0.693};
m_b_stat = {0.005, 0.004, 0.004, 0.004, 0.003, 0.003, 0.002, 0.002, 0.002, 0.002,
0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.004};
} else if ( m_nclasses == 10 ) {
m_npart_stat = {0.004, 0.009, 0.015, 0.022, 0.032, 0.042, 0.053, 0.068, 0.086, 0.102};
m_ncoll_stat = {0.004, 0.010, 0.022, 0.047, 0.088, 0.148, 0.226, 0.333, 0.480, 0.749};
m_b_stat = {0.003, 0.003, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.004};
} else if ( m_nclasses == 5 ) {
m_npart_stat = {0.007, 0.022, 0.045, 0.077, 0.126};
m_ncoll_stat = {0.007, 0.038, 0.136, 0.343, 0.803};
m_b_stat = {0.002, 0.002, 0.002, 0.002, 0.004};
} else if ( m_nclasses == 4 ) {
m_npart_stat = {0.009, 0.033, 0.070, 0.132};
m_ncoll_stat = {0.010, 0.071, 0.275, 0.805};
m_b_stat = {0.002, 0.002, 0.002, 0.004};
} else if ( m_nclasses == 2 ) {
m_npart_stat = {0.028, 0.139};
m_ncoll_stat = {0.052, 0.727};
m_b_stat = {0.002, 0.004};
} else if ( m_nclasses == 1 ) {
m_npart_stat = {0.116};
m_ncoll_stat = {0.506};
m_b_stat = {0.004};
}
for ( Int_t i = 0; i < m_nclasses; i++ ) {
m_npart_temp.push_back( 0 );
m_ncoll_temp.push_back( 0 );
m_b_temp.push_back( 0 );
}
m_count = 0;
for ( Int_t i = 0; i < int( m_npart.size() ); i++ ) {
if ( i % int( 100.0 / m_nclasses ) == 0 && i != 0 ) { m_count += 1; }
m_npart_temp[m_count] += m_npart[i];
m_ncoll_temp[m_count] += m_ncoll[i];
m_b_temp[m_count] += m_b[i];
}
return StatusCode::SUCCESS;
}
fatal() << "Number of centrality classes selected not allowed... Must be a divisor of 100." << endmsg;
......@@ -80,134 +175,6 @@ StatusCode TupleToolCentrality::fill( Tuples::Tuple& tuple ) {
m_TES = std::accumulate( std::begin( m_es ), std::end( m_es ), 0.0 ); // Total Energy Sum
m_ecalcuts = {
0.0, 70000.0, 100000.0, 120000.0, 150000.0, 170000.0, 200000.0, 220000.0, 250000.0,
280000.0, 310000.0, 350000.0, 380000.0, 420000.0, 470000.0, 510000.0, 560000.0, 620000.0,
670000.0, 730000.0, 800000.0, 870000.0, 950000.0, 1030000.0, 1110000.0, 1200000.0, 1300000.0,
1400000.0, 1510000.0, 1630000.0, 1750000.0, 1880000.0, 2010000.0, 2150000.0, 2300000.0, 2460000.0,
2620000.0, 2800000.0, 2980000.0, 3160000.0, 3360000.0, 3570000.0, 3790000.0, 4020000.0, 4250000.0,
4500000.0, 4750000.0, 5020000.0, 5300000.0, 5590000.0, 5900000.0, 6200000.0, 6530000.0, 6870000.0,
7230000.0, 7600000.0, 7980000.0, 8370000.0, 8780000.0, 9190000.0, 9630000.0, 10090000.0, 10550000.0,
11020000.0, 11510000.0, 12020000.0, 12550000.0, 13090000.0, 13660000.0, 14260000.0, 14860000.0, 15480000.0,
16130000.0, 16790000.0, 17470000.0, 18200000.0, 18940000.0, 19700000.0, 20480000.0, 21290000.0, 22150000.0,
23010000.0, 23910000.0, 24820000.0, 25760000.0, 26750000.0, 27770000.0, 28840000.0, 29950000.0, 31100000.0,
32280000.0, 33530000.0, 34810000.0, 36130000.0, 37500000.0, 38930000.0, 40440000.0, 41990000.0, 43610000.0,
45410000.0}; // values taken for 100 classes and 6000 bins on ecal glauber from 0 to 60E6 MeV for PbPb at √s_nn
// = 5.02 TeV.
m_npart = {2.13, 2.27, 2.39, 2.55, 2.70, 2.90, 3.16, 3.42, 3.73, 4.04, 4.52, 4.93, 5.42,
5.99, 6.56, 7.17, 7.83, 8.57, 9.28, 10.06, 10.99, 11.91, 12.93, 13.89, 15.00, 16.24,
17.48, 18.74, 20.21, 21.61, 23.17, 24.76, 26.36, 28.13, 29.92, 31.95, 33.89, 35.98, 38.04,
40.28, 42.64, 45.07, 47.56, 50.26, 52.77, 55.62, 58.49, 61.47, 64.59, 67.79, 70.90, 74.29,
77.87, 81.50, 85.20, 89.05, 92.87, 97.01, 101.06, 105.25, 109.80, 114.23, 118.69, 123.32, 128.35,
133.12, 138.15, 143.46, 148.78, 154.50, 160.13, 165.71, 171.71, 177.58, 184.03, 190.61, 197.33, 204.03,
210.87, 218.09, 225.35, 232.93, 240.84, 248.64, 256.65, 265.01, 273.62, 282.39, 291.69, 301.06, 310.44,
320.74, 330.98, 341.21, 351.91, 362.83, 373.72, 384.38, 393.79, 401.71};
m_ncoll = {1.13, 1.26, 1.36, 1.51, 1.64, 1.83, 2.06, 2.29, 2.55, 2.84, 3.26, 3.65,
4.12, 4.67, 5.25, 5.84, 6.51, 7.33, 8.11, 8.94, 10.05, 11.10, 12.34, 13.59,
14.98, 16.70, 18.34, 20.20, 22.36, 24.50, 26.86, 29.49, 32.27, 35.24, 38.36, 42.10,
45.78, 49.86, 54.02, 58.61, 63.75, 69.05, 74.85, 81.13, 87.23, 94.15, 101.60, 109.39,
117.56, 126.61, 135.82, 145.38, 155.83, 167.14, 178.91, 191.39, 204.06, 217.25, 231.95, 246.55,
262.14, 279.10, 295.46, 312.78, 331.88, 351.75, 371.87, 394.13, 415.85, 440.58, 464.59, 490.20,
516.64, 543.35, 572.94, 603.81, 636.28, 669.16, 702.61, 738.93, 775.43, 814.83, 855.98, 897.52,
939.72, 987.79, 1034.64, 1084.22, 1139.00, 1194.86, 1250.94, 1313.38, 1376.87, 1444.74, 1517.07, 1590.93,
1672.70, 1756.68, 1843.50, 1936.92};
m_b = {15.64, 15.62, 15.56, 15.52, 15.47, 15.40, 15.33, 15.24, 15.18, 15.09, 15.00, 14.89, 14.82, 14.70, 14.60,
14.52, 14.41, 14.32, 14.22, 14.15, 14.03, 13.93, 13.84, 13.75, 13.64, 13.54, 13.45, 13.35, 13.25, 13.16,
13.06, 12.96, 12.87, 12.77, 12.66, 12.56, 12.46, 12.37, 12.27, 12.17, 12.06, 11.96, 11.85, 11.75, 11.65,
11.54, 11.43, 11.32, 11.21, 11.10, 10.99, 10.88, 10.77, 10.65, 10.53, 10.41, 10.30, 10.18, 10.06, 9.94,
9.80, 9.68, 9.55, 9.44, 9.30, 9.17, 9.03, 8.91, 8.77, 8.62, 8.48, 8.34, 8.19, 8.04, 7.89,
7.73, 7.57, 7.41, 7.24, 7.07, 6.90, 6.72, 6.53, 6.34, 6.16, 5.95, 5.74, 5.53, 5.30, 5.06,
4.82, 4.55, 4.27, 3.98, 3.65, 3.29, 2.89, 2.42, 1.90, 1.35};
////// Systematic uncertainties //////////
// These are computed for 5% intervals, hence there are 20 values.
m_npart_sys = {0.491, 0.591, 0.782, 0.793, 0.568, 0.697, 0.509, 0.812, 1.14, 1.113,
1.204, 0.776, 1.332, 0.938, 1.571, 1.399, 1.85, 1.801, 0.448, 2.356};
m_ncoll_sys = {0.291, 0.392, 0.594, 0.676, 0.553, 0.81, 0.673, 1.144, 1.895, 2.134,
2.603, 2.25, 3.91, 3.851, 6.222, 6.981, 9.463, 11.19, 11.834, 18.519};
m_b_sys = {3.02, 2.91, 2.18, 1.32, 0.59, 0.44, 0.25, 0.3, 0.26, 0.21,
0.181, 0.081, 0.1, 0.062, 0.071, 0.051, 0.051, 0.04, 0.01, 0.024};
////// Width of classes distributions ////
if ( m_nclasses == 100 ) {
m_npart_stat = {0.004, 0.006, 0.007, 0.008, 0.010, 0.011, 0.013, 0.014, 0.015, 0.016, 0.017, 0.018, 0.019,
0.021, 0.021, 0.022, 0.023, 0.025, 0.026, 0.026, 0.028, 0.029, 0.030, 0.031, 0.032, 0.033,
0.035, 0.036, 0.037, 0.038, 0.040, 0.041, 0.042, 0.043, 0.044, 0.046, 0.047, 0.049, 0.050,
0.052, 0.052, 0.054, 0.056, 0.057, 0.057, 0.059, 0.061, 0.063, 0.064, 0.066, 0.067, 0.068,
0.071, 0.072, 0.073, 0.075, 0.077, 0.079, 0.080, 0.081, 0.084, 0.085, 0.086, 0.088, 0.090,
0.092, 0.095, 0.095, 0.096, 0.099, 0.100, 0.102, 0.104, 0.106, 0.108, 0.110, 0.112, 0.113,
0.114, 0.116, 0.117, 0.119, 0.121, 0.122, 0.123, 0.125, 0.126, 0.128, 0.130, 0.129, 0.130,
0.133, 0.132, 0.133, 0.133, 0.131, 0.130, 0.121, 0.105, 0.077};
m_ncoll_stat = {0.004, 0.005, 0.007, 0.008, 0.009, 0.010, 0.012, 0.013, 0.014, 0.015, 0.017, 0.018, 0.020,
0.022, 0.023, 0.025, 0.027, 0.029, 0.031, 0.033, 0.036, 0.039, 0.041, 0.045, 0.047, 0.052,
0.057, 0.061, 0.067, 0.071, 0.075, 0.081, 0.088, 0.094, 0.100, 0.107, 0.114, 0.123, 0.130,
0.137, 0.146, 0.153, 0.166, 0.173, 0.182, 0.193, 0.203, 0.212, 0.223, 0.235, 0.246, 0.260,
0.272, 0.280, 0.293, 0.307, 0.323, 0.332, 0.346, 0.357, 0.371, 0.383, 0.397, 0.411, 0.434,
0.442, 0.454, 0.472, 0.490, 0.496, 0.514, 0.524, 0.545, 0.555, 0.570, 0.586, 0.608, 0.622,
0.627, 0.640, 0.658, 0.668, 0.688, 0.708, 0.721, 0.737, 0.751, 0.756, 0.786, 0.800, 0.812,
0.836, 0.854, 0.876, 0.902, 0.920, 0.960, 0.979, 0.967, 0.952};
m_b_stat = {0.011, 0.010, 0.010, 0.010, 0.010, 0.010, 0.010, 0.010, 0.010, 0.010, 0.009, 0.009, 0.009, 0.009, 0.009,
0.008, 0.008, 0.008, 0.008, 0.007, 0.007, 0.007, 0.007, 0.007, 0.006, 0.006, 0.006, 0.006, 0.006, 0.006,
0.006, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.004, 0.004,
0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.004,
0.004, 0.004, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003,
0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003,
0.003, 0.004, 0.004, 0.004, 0.004, 0.004, 0.005, 0.006, 0.006, 0.006};
} else if ( m_nclasses == 50 ) {
m_npart_stat = {0.004, 0.006, 0.007, 0.009, 0.011, 0.013, 0.014, 0.016, 0.017, 0.019, 0.020, 0.022, 0.023,
0.025, 0.027, 0.029, 0.031, 0.033, 0.035, 0.037, 0.039, 0.041, 0.042, 0.045, 0.047, 0.049,
0.052, 0.054, 0.057, 0.059, 0.062, 0.064, 0.067, 0.070, 0.072, 0.074, 0.077, 0.080, 0.083,
0.085, 0.088, 0.090, 0.092, 0.095, 0.097, 0.100, 0.101, 0.101, 0.096, 0.071};
m_ncoll_stat = {0.003, 0.005, 0.007, 0.009, 0.010, 0.012, 0.015, 0.017, 0.020, 0.023, 0.027, 0.031, 0.036,
0.042, 0.049, 0.056, 0.065, 0.074, 0.085, 0.096, 0.107, 0.122, 0.135, 0.149, 0.165, 0.182,
0.199, 0.217, 0.236, 0.254, 0.273, 0.292, 0.318, 0.337, 0.359, 0.378, 0.400, 0.423, 0.450,
0.466, 0.489, 0.515, 0.543, 0.561, 0.595, 0.623, 0.657, 0.695, 0.747, 0.755};
m_b_stat = {0.007, 0.007, 0.007, 0.007, 0.007, 0.007, 0.006, 0.006, 0.006, 0.005, 0.005, 0.005, 0.004,
0.004, 0.004, 0.004, 0.004, 0.004, 0.004, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003,
0.003, 0.003, 0.003, 0.003, 0.003, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002,
0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.003, 0.003, 0.003, 0.004, 0.005};
} else if ( m_nclasses == 25 ) {
m_npart_stat = {0.003, 0.006, 0.009, 0.011, 0.013, 0.016, 0.018, 0.021, 0.024, 0.027, 0.031, 0.034, 0.038,
0.042, 0.046, 0.050, 0.054, 0.059, 0.064, 0.069, 0.074, 0.079, 0.085, 0.089, 0.076};
m_ncoll_stat = {0.003, 0.006, 0.008, 0.012, 0.016, 0.021, 0.029, 0.039, 0.052, 0.068, 0.086, 0.107, 0.131,
0.159, 0.188, 0.217, 0.253, 0.288, 0.326, 0.366, 0.409, 0.457, 0.518, 0.598, 0.688};
m_b_stat = {0.005, 0.005, 0.005, 0.004, 0.004, 0.003, 0.003, 0.003, 0.003, 0.003, 0.002, 0.002, 0.002,
0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.003, 0.004};
} else if ( m_nclasses == 20 ) {
m_npart_stat = {0.003, 0.006, 0.009, 0.012, 0.015, 0.018, 0.022, 0.025, 0.030, 0.034,
0.039, 0.043, 0.049, 0.054, 0.060, 0.067, 0.073, 0.081, 0.088, 0.080};
m_ncoll_stat = {0.003, 0.006, 0.009, 0.014, 0.020, 0.030, 0.043, 0.061, 0.083, 0.108,
0.139, 0.173, 0.210, 0.253, 0.297, 0.349, 0.403, 0.475, 0.568, 0.693};
m_b_stat = {0.005, 0.004, 0.004, 0.004, 0.003, 0.003, 0.002, 0.002, 0.002, 0.002,
0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.004};
} else if ( m_nclasses == 10 ) {
m_npart_stat = {0.004, 0.009, 0.015, 0.022, 0.032, 0.042, 0.053, 0.068, 0.086, 0.102};
m_ncoll_stat = {0.004, 0.010, 0.022, 0.047, 0.088, 0.148, 0.226, 0.333, 0.480, 0.749};
m_b_stat = {0.003, 0.003, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.004};
} else if ( m_nclasses == 5 ) {
m_npart_stat = {0.007, 0.022, 0.045, 0.077, 0.126};
m_ncoll_stat = {0.007, 0.038, 0.136, 0.343, 0.803};
m_b_stat = {0.002, 0.002, 0.002, 0.002, 0.004};
} else if ( m_nclasses == 4 ) {
m_npart_stat = {0.009, 0.033, 0.070, 0.132};
m_ncoll_stat = {0.010, 0.071, 0.275, 0.805};
m_b_stat = {0.002, 0.002, 0.002, 0.004};
} else if ( m_nclasses == 2 ) {
m_npart_stat = {0.028, 0.139};
m_ncoll_stat = {0.052, 0.727};
m_b_stat = {0.002, 0.004};
}
m_i = 0; // counter for specific centrality percentile in 1% intervals. The higher m_i the more central the event
m_j = 0; // counter for specific centrality class asked by the user. The higher m_j the more central the event
m_switch = 1;
while ( m_TES > m_ecalcuts[m_i] && m_switch ) { // Find the exact percentile in 1% intervals
m_i += 1;
if ( m_i > 99 ) { // most central events will be higher than last cut value
......@@ -226,20 +193,6 @@ StatusCode TupleToolCentrality::fill( Tuples::Tuple& tuple ) {
m_j += 1;
}
for ( Int_t i = 0; i < m_nclasses; i++ ) {
m_npart_temp.push_back( 0 );
m_ncoll_temp.push_back( 0 );
m_b_temp.push_back( 0 );
}
m_count = 0;
for ( Int_t i = 0; i < int( m_npart.size() ); i++ ) {
if ( i % int( 100.0 / m_nclasses ) == 0 && i != 0 ) { m_count += 1; }
m_npart_temp[m_count] += m_npart[i];
m_ncoll_temp[m_count] += m_ncoll[i];
m_b_temp[m_count] += m_b[i];
}
m_centrality = ( m_nclasses - m_j + 1 ) *
( 100.0 / m_nclasses ); // centrality class upper bound. To get the lower bound, delete the "+1".
m_npart_final =
......@@ -272,19 +225,10 @@ StatusCode TupleToolCentrality::fill( Tuples::Tuple& tuple ) {
m_row.clear();
m_column.clear();
m_es.clear();
m_npart_temp.clear();
m_ncoll_temp.clear();
m_b_temp.clear();
m_ecalcuts.clear();
m_npart.clear();
m_npart_sys.clear();
m_npart_stat.clear();
m_ncoll.clear();
m_ncoll_sys.clear();
m_ncoll_stat.clear();
m_b.clear();
m_b_sys.clear();
m_b_stat.clear();
m_i = 0; // counter for specific centrality percentile in 1% intervals. The higher m_i the more central the event
m_j = 0; // counter for specific centrality class asked by the user. The higher m_j the more central the event;
m_switch = 1;
return StatusCode::SUCCESS;
}
......@@ -66,21 +66,61 @@ private:
double m_ncoll_final;
double m_b_final;
int m_count;
int m_i;
int m_j;
int m_switch;
int m_i = 0; // counter for specific centrality percentile in 1% intervals. The higher m_i the more central the event
int m_j = 0; // counter for specific centrality class asked by the user. The higher m_j the more central the event;
int m_switch = 1;
int m_nclasses = 10;
std::vector<float> m_ecalcuts;
std::vector<float> m_npart;
std::vector<float> m_npart_sys;
std::vector<float> m_ecalcuts = {
0.0, 70000.0, 100000.0, 120000.0, 150000.0, 170000.0, 200000.0, 220000.0, 250000.0,
280000.0, 310000.0, 350000.0, 380000.0, 420000.0, 470000.0, 510000.0, 560000.0, 620000.0,
670000.0, 730000.0, 800000.0, 870000.0, 950000.0, 1030000.0, 1110000.0, 1200000.0, 1300000.0,
1400000.0, 1510000.0, 1630000.0, 1750000.0, 1880000.0, 2010000.0, 2150000.0, 2300000.0, 2460000.0,
2620000.0, 2800000.0, 2980000.0, 3160000.0, 3360000.0, 3570000.0, 3790000.0, 4020000.0, 4250000.0,
4500000.0, 4750000.0, 5020000.0, 5300000.0, 5590000.0, 5900000.0, 6200000.0, 6530000.0, 6870000.0,
7230000.0, 7600000.0, 7980000.0, 8370000.0, 8780000.0, 9190000.0, 9630000.0, 10090000.0, 10550000.0,
11020000.0, 11510000.0, 12020000.0, 12550000.0, 13090000.0, 13660000.0, 14260000.0, 14860000.0, 15480000.0,
16130000.0, 16790000.0, 17470000.0, 18200000.0, 18940000.0, 19700000.0, 20480000.0, 21290000.0, 22150000.0,
23010000.0, 23910000.0, 24820000.0, 25760000.0, 26750000.0, 27770000.0, 28840000.0, 29950000.0, 31100000.0,
32280000.0, 33530000.0, 34810000.0, 36130000.0, 37500000.0, 38930000.0, 40440000.0, 41990000.0, 43610000.0,
45410000.0}; // values taken for 100 classes and 6000 bins on ecal glauber from 0 to 60E6 MeV for PbPb at √s_nn
// = 5.02 TeV.
std::vector<float> m_npart = {
2.13, 2.27, 2.39, 2.55, 2.70, 2.90, 3.16, 3.42, 3.73, 4.04, 4.52, 4.93, 5.42,
5.99, 6.56, 7.17, 7.83, 8.57, 9.28, 10.06, 10.99, 11.91, 12.93, 13.89, 15.00, 16.24,
17.48, 18.74, 20.21, 21.61, 23.17, 24.76, 26.36, 28.13, 29.92, 31.95, 33.89, 35.98, 38.04,
40.28, 42.64, 45.07, 47.56, 50.26, 52.77, 55.62, 58.49, 61.47, 64.59, 67.79, 70.90, 74.29,
77.87, 81.50, 85.20, 89.05, 92.87, 97.01, 101.06, 105.25, 109.80, 114.23, 118.69, 123.32, 128.35,
133.12, 138.15, 143.46, 148.78, 154.50, 160.13, 165.71, 171.71, 177.58, 184.03, 190.61, 197.33, 204.03,
210.87, 218.09, 225.35, 232.93, 240.84, 248.64, 256.65, 265.01, 273.62, 282.39, 291.69, 301.06, 310.44,
320.74, 330.98, 341.21, 351.91, 362.83, 373.72, 384.38, 393.79, 401.71};
std::vector<float> m_npart_sys = {0.491, 0.591, 0.782, 0.793, 0.568, 0.697, 0.509, 0.812, 1.14, 1.113,
1.204, 0.776, 1.332, 0.938, 1.571, 1.399, 1.85, 1.801, 0.448, 2.356};
std::vector<float> m_npart_stat;
double m_npart_error;
std::vector<float> m_ncoll;
std::vector<float> m_ncoll_sys;
std::vector<float> m_ncoll = {
1.13, 1.26, 1.36, 1.51, 1.64, 1.83, 2.06, 2.29, 2.55, 2.84, 3.26, 3.65,
4.12, 4.67, 5.25, 5.84, 6.51, 7.33, 8.11, 8.94, 10.05, 11.10, 12.34, 13.59,
14.98, 16.70, 18.34, 20.20, 22.36, 24.50, 26.86, 29.49, 32.27, 35.24, 38.36, 42.10,
45.78, 49.86, 54.02, 58.61, 63.75, 69.05, 74.85, 81.13, 87.23, 94.15, 101.60, 109.39,
117.56, 126.61, 135.82, 145.38, 155.83, 167.14, 178.91, 191.39, 204.06, 217.25, 231.95, 246.55,
262.14, 279.10, 295.46, 312.78, 331.88, 351.75, 371.87, 394.13, 415.85, 440.58, 464.59, 490.20,
516.64, 543.35, 572.94, 603.81, 636.28, 669.16, 702.61, 738.93, 775.43, 814.83, 855.98, 897.52,
939.72, 987.79, 1034.64, 1084.22, 1139.00, 1194.86, 1250.94, 1313.38, 1376.87, 1444.74, 1517.07, 1590.93,
1672.70, 1756.68, 1843.50, 1936.92};
std::vector<float> m_ncoll_sys = {0.291, 0.392, 0.594, 0.676, 0.553, 0.81, 0.673, 1.144, 1.895, 2.134,
2.603, 2.25, 3.91, 3.851, 6.222, 6.981, 9.463, 11.19, 11.834, 18.519};
std::vector<float> m_ncoll_stat;
double m_ncoll_error;
std::vector<float> m_b;
std::vector<float> m_b_sys;
std::vector<float> m_b = {15.64, 15.62, 15.56, 15.52, 15.47, 15.40, 15.33, 15.24, 15.18, 15.09, 15.00, 14.89, 14.82,
14.70, 14.60, 14.52, 14.41, 14.32, 14.22, 14.15, 14.03, 13.93, 13.84, 13.75, 13.64, 13.54,
13.45, 13.35, 13.25, 13.16, 13.06, 12.96, 12.87, 12.77, 12.66, 12.56, 12.46, 12.37, 12.27,
12.17, 12.06, 11.96, 11.85, 11.75, 11.65, 11.54, 11.43, 11.32, 11.21, 11.10, 10.99, 10.88,
10.77, 10.65, 10.53, 10.41, 10.30, 10.18, 10.06, 9.94, 9.80, 9.68, 9.55, 9.44, 9.30,
9.17, 9.03, 8.91, 8.77, 8.62, 8.48, 8.34, 8.19, 8.04, 7.89, 7.73, 7.57, 7.41,
7.24, 7.07, 6.90, 6.72, 6.53, 6.34, 6.16, 5.95, 5.74, 5.53, 5.30, 5.06, 4.82,
4.55, 4.27, 3.98, 3.65, 3.29, 2.89, 2.42, 1.90, 1.35};
std::vector<float> m_b_sys = {3.02, 2.91, 2.18, 1.32, 0.59, 0.44, 0.25, 0.3, 0.26, 0.21,
0.181, 0.081, 0.1, 0.062, 0.071, 0.051, 0.051, 0.04, 0.01, 0.024};
std::vector<float> m_b_stat;
double m_b_error;
std::vector<float> m_npart_temp = {};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment