18 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
19 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
20 150, 150, 150, 150, 150, 124.261, 111.448, 97.7357, 85.5616, 72.3294,
21 61.0017, 50.8592, 41.6827, 33.7413, 26.9884, 21.3822, 16.8352, 13.1081, 10.2368, 7.96723,
22 6.23636, 4.91757, 3.91519, 3.15519, 2.57768, 2.13622, 1.80524, 1.53102, 1.30677, 1.13582
28 const IInterface*
p ) :
38 ATH_CHECK( m_inDetParticlesKey.initialize (m_streamName) );
39 ATH_MSG_INFO(
"Using " << m_inDetParticlesKey <<
"as the source collection for inner detector track particles");
40 ATH_CHECK( m_vertexContainerKey.initialize() );
43 if (!m_selectionString.empty()) {
44 ATH_CHECK(initializeParser(m_selectionString));
48 m_counter_picked.resize(50);
51 if( 0 == m_pTbins.size() ) {
52 for(
size_t ip = 0;
ip <= 50; ++
ip ) {
53 m_pTbins.emplace_back(
pow( 10, 2.0 + 0.04 *
ip ) );
59 return StatusCode::SUCCESS;
65 ATH_MSG_INFO(
"Processed "<< m_ntot <<
" tracks, "<< m_npass<<
" were retained ");
67 return StatusCode::SUCCESS;
74 const EventContext& ctx = Gaudi::Hive::currentContext();
78 (m_inDetParticlesKey, ctx);
81 size_t nTracks = importedTrackParticles->size();
82 if (nTracks==0)
return StatusCode::SUCCESS;
85 std::vector<bool>
mask;
86 mask.assign(nTracks,
false);
88 std::lock_guard<std::mutex> lock(m_mutex);
94 std::vector<int>
entries = m_parser->evaluateAsVector();
98 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used ID TrackParticles?");
99 return StatusCode::FAILURE;
112 for(
const auto* vtx : *primaryVertices ) {
119 if( !priVtx )
return StatusCode::SUCCESS;
121 auto getBin = [&](
const double pT ) ->
size_t {
122 for(
size_t ip = 0;
ip < m_pTbins.size()-1;
ip++ ) {
123 if(
pT > m_pTbins.at(
ip) &&
pT < m_pTbins.at(
ip+1) ) {
131 for (
size_t i=0;
i<nTracks; ++
i) {
133 const auto* trk = importedTrackParticles->at(
i);
136 if( trk->numberOfIBLOverflowsdEdx() > 0 ) {
138 mask.at(
i) =
true; ++m_npass;
continue;
144 if( std::abs( trk->pt() ) > m_unprescalePtCut ) {
146 mask.at(
i) =
true; ++m_npass;
continue;
158 if( std::abs( trk->z0() - priVtx->
z() ) > m_z0Cut ) {
163 if( std::abs( trk->eta() ) > m_etaCut ) {
168 auto bin =
getBin( std::abs( trk->pt() ) );
170 const auto preScale =
static_cast<unsigned long long>( std::floor( m_preScales.at(
bin ) * m_globalScale ) );
171 const auto preScale10 =
std::max(
static_cast<unsigned long long>( std::floor( m_preScales.at(
bin ) * m_globalScale / 10. ) ), 1
ull );
180 static const float dEdxThr {
static_cast<float>(
pow( 10, 0.1 )) };
181 if( dEdx > dEdxThr ) {
183 mask.at(
i) = ( (m_counter.at(
bin) % preScale10) == 0 );
186 }
else if( dEdx > 0. ) {
188 mask.at(
i) = ( (m_counter.at(
bin) % preScale) == 0 );
196 if(
mask.back() ) { ++m_npass; m_counter_picked.at(
bin)++; }
200 assert( importedTrackParticles->size() ==
mask.size() );
205 return StatusCode::SUCCESS;