|
ATLAS Offline Software
|
#include <T_AnalysisConfigMT_Tier0.h>
|
| T_AnalysisConfigMT_Tier0 (const std::string &analysisInstanceName, const std::string &testChainName, const std::string &testType, const std::string &testKey, const std::string &referenceChainName, const std::string &referenceType, const std::string &referenceKey, TrackFilter *testFilter, TrackFilter *referenceFilter, TrackAssociator *associator, TrackAnalysis *analysis, TagNProbe *TnP_tool=0) |
|
virtual | ~T_AnalysisConfigMT_Tier0 () |
|
void | setRunPurity (bool b) |
|
void | setShifter (bool b) |
|
void | useBeamCondSvc (bool b) |
|
void | containTracks (bool b) |
|
void | addTestChain (const std::string &chainName, const std::string &type, const std::string &key) |
|
void | addReferenceChain (const std::string &chainName, const std::string &type, const std::string &key) |
|
void | addSelectionChain (const std::string &chainName, const std::string &type, const std::string &key) |
|
void | addTestFilter (TrackFilter *filter) |
|
void | addReferenceFilter (TrackFilter *filter) |
|
void | addSelectionFilter (TrackFilter *filter) |
|
virtual void | initialize (T *p, ToolHandle< Trig::TrigDecisionTool > *tdt) |
|
virtual void | execute () |
|
const std::string & | name () const |
|
const std::string | testChains () const |
|
const std::string | referenceChains () const |
|
const std::string | selectionChains () const |
|
const TrackAnalysis * | analysis () const |
|
void | setMCTruth (bool b=true) |
|
bool | mcTruth () const |
|
void | setBeamX (double d) |
|
void | setBeamY (double d) |
|
void | setBeamZ (double d) |
|
double | beamX () const |
|
double | beamY () const |
|
double | beamZ () const |
|
bool | genericFlag () const |
|
void | setGenericFlag (bool b) |
|
const std::string & | releaseData () const |
|
void | releaseData (const std::string &s) |
|
void | keepAllEvents (bool b) |
|
void | setUseHighestPT (bool b) |
|
bool | getUseHighestPT () const |
|
void | setVtxIndex (int i) |
|
int | getVtxIndex () const |
|
bool | filterOnRoi () const |
|
bool | setFilterOnRoi (bool b) |
|
void | setRequireDecision (bool b) |
|
bool | requireDecision () const |
|
|
virtual void | loop () |
|
virtual void | book () |
|
virtual void | finalize () |
|
void | set_monTool (ToolHandle< GenericMonitoringTool > *m) |
|
ToolHandle< GenericMonitoringTool > * | monTool () |
|
std::pair< typename Collection::const_iterator, typename Collection::const_iterator > | getCollection (const ElementLink< TrigRoiDescriptorCollection > &roi_link, const std::string &key="") |
| new MT feature access More...
|
|
bool | select (std::vector< TIDA::Vertex > &vertices, xAOD::VertexContainer::const_iterator vtx_start, xAOD::VertexContainer::const_iterator vtx_end) |
|
bool | select (std::vector< TIDA::Vertex > &vertices, const ElementLink< TrigRoiDescriptorCollection > &roi_link, const std::string &key="") |
|
bool | select (std::vector< TIDA::Vertex > &vertices, const std::string &key="") |
|
bool | selectTracks (TrigTrackSelector *selector, const ElementLink< TrigRoiDescriptorCollection > &roi_link, const std::string &key="") |
|
bool | selectTracks (TrigTrackSelector *selector, Trig::FeatureContainer::combination_const_iterator citr, const std::string &key="") |
| lagacy run 2 access More...
|
|
bool | selectTracks (TrigTrackSelector *selector, Trig::FeatureContainer::combination_const_iterator citr, const TrigInDetTrackTruthMap *truthmap, const std::string &key="", unsigned index=0) |
| NB: because we want to use this for the L2Star chains, we have to use this method, not the above method without the TruthMap argument - if we don't want/have the TruthMap, just set the pointer to 0 - there should be abetter way to do this, but shan't worry about it now. More...
|
|
bool | selectTracks (TrigTrackSelector *selector, const std::string &key) |
|
StatusCode | retrieve (Collection const *&collection, const std::string &key="") |
|
bool | selectTracksNotEmpty (TrigTrackSelector *selector, const std::string &key) |
|
std::vector< double > | getBeamspot (const std::string &key) |
|
std::vector< double > | getBeamspot (Trig::FeatureContainer::combination_const_iterator citr, const std::string &key="") |
|
unsigned | processElectrons (TrigTrackSelector &selectorRef, std::vector< TrackTrigObject > *elevec=0, const unsigned int selection=0, bool raw_track=false, double ETOffline=0, const std::string &containerName="ElectronAODCollection") |
| select offline electrons More...
|
|
unsigned | processMuons (TrigTrackSelector &selectorRef, const unsigned int selection=0, double ETOffline=0, const std::string &containerName="StacoMuonCollection") |
| select offlinqe muons More...
|
|
unsigned | processTaus (TrigTrackSelector &selectorRef, std::vector< TrackTrigObject > *tauvec=0, const unsigned selection=0, int requireNtracks=0, double EtCutOffline=0, const std::string &containerName="TauRecContainer") |
| select offline taus More...
|
|
template<typename T, typename A = Analysis_Tier0>
class T_AnalysisConfigMT_Tier0< T, A >
Definition at line 93 of file T_AnalysisConfigMT_Tier0.h.
◆ T_AnalysisConfigMT_Tier0()
template<typename T , typename A = Analysis_Tier0>
T_AnalysisConfigMT_Tier0< T, A >::T_AnalysisConfigMT_Tier0 |
( |
const std::string & |
analysisInstanceName, |
|
|
const std::string & |
testChainName, |
|
|
const std::string & |
testType, |
|
|
const std::string & |
testKey, |
|
|
const std::string & |
referenceChainName, |
|
|
const std::string & |
referenceType, |
|
|
const std::string & |
referenceKey, |
|
|
TrackFilter * |
testFilter, |
|
|
TrackFilter * |
referenceFilter, |
|
|
TrackAssociator * |
associator, |
|
|
TrackAnalysis * |
analysis, |
|
|
TagNProbe * |
TnP_tool = 0 |
|
) |
| |
|
inline |
FIXME: the m_event should not be needed, we need to make this a local variable
Definition at line 103 of file T_AnalysisConfigMT_Tier0.h.
111 testChainName, testType, testKey,
112 referenceChainName, referenceType, referenceKey,
113 testFilter, referenceFilter,
146 std::cout <<
"\nT_AnalysisConfigMT_Tier0::name: " <<
name() <<
"\t" <<
this << std::endl;
147 std::cout <<
"T_AnalysisConfigMT_Tier0::chain specification: " << testChainName <<
" -> " <<
chain <<
"\t" <<
chain.raw() << std::endl;
148 std::cout <<
"\tchain: " <<
chain.head() << std::endl;
149 std::cout <<
"\tkey: " <<
chain.tail() << std::endl;
150 std::cout <<
"\troi: " <<
chain.roi() << std::endl;
151 std::cout <<
"\tvtx: " <<
chain.vtx() << std::endl;
152 std::cout <<
"\tte: " <<
chain.element() << std::endl;
154 std::cout <<
"\tpost: " <<
chain.post() << std::endl;
155 std::cout <<
"\tpt: " <<
chain.postvalue(
"pt") << std::endl;
◆ ~T_AnalysisConfigMT_Tier0()
template<typename T , typename A = Analysis_Tier0>
◆ addReferenceChain()
◆ addReferenceFilter()
◆ addSelectionChain()
◆ addSelectionFilter()
◆ addTestChain()
◆ addTestFilter()
◆ analysis()
◆ beamX()
◆ beamY()
◆ beamZ()
◆ book()
template<typename T , typename A = Analysis_Tier0>
◆ containTracks()
template<typename T , typename A = Analysis_Tier0>
◆ execute()
Definition at line 225 of file T_AnalysisConfig.h.
226 if ( !
m_provider ) std::cerr <<
"ERROR T_AnalysisConfig::execute() called without initialising" << std::endl;
◆ filterOnRoi()
◆ finalize()
template<typename T , typename A = Analysis_Tier0>
◆ genericFlag()
◆ getBeamspot() [1/2]
Definition at line 634 of file T_AnalysisConfig.h.
636 std::vector<double>
v;
639 if (
m_provider->evtStore()->template contains<Collection>(
key ) ) {
641 if(
sc.isSuccess() && collection ) {
644 typename Collection::const_iterator trackitr = collection->begin();
645 typename Collection::const_iterator trackend = collection->end();
646 if ( trackitr!=trackend ) {
648 v[0] = (*trackitr)->vx();
649 v[1] = (*trackitr)->vy();
650 v[2] = (*trackitr)->vz();
◆ getBeamspot() [2/2]
Definition at line 663 of file T_AnalysisConfig.h.
664 std::vector< Trig::Feature<Collection> > trackcollections = citr->get<
Collection>(
key, TrigDefs::alsoDeactivateTEs );
665 std::vector<double>
v;
666 if ( !trackcollections.empty() ) {
669 for (
unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) {
672 if ( !trackfeature.
empty() ) {
677 typename Collection::const_iterator trackitr = trigtracks->begin();
678 typename Collection::const_iterator trackend = trigtracks->end();
679 if ( trackitr!=trackend ) {
681 v[0] = (*trackitr)->vx();
682 v[1] = (*trackitr)->vy();
683 v[2] = (*trackitr)->vz();
◆ getCollection()
new MT feature access
will need this printout for debugging the feature access, so leave this commented until it has been properly debugged, then it can be removed
will not use the te name here, but keep it on just the same for the time being, for subsequent development
Definition at line 299 of file T_AnalysisConfig.h.
308 std::string key_collection =
key;
309 std::string key_tename =
"";
310 size_t pos = key_collection.find(
"/");
311 if (
pos!=std::string::npos ) {
313 key_tename =
key.substr( 0,
pos );
316 std::pair<
typename Collection::const_iterator,
317 typename Collection::const_iterator > itrpair;
322 const std::string* keyStr =
m_provider->evtStore()->keyToString(roi_link.
key(), checkCLID);
323 m_provider->msg(
MSG::DEBUG) <<
"Requesting range over (" <<
key <<
") associated to ROI from " << (keyStr ==
nullptr ?
"UNKNOWN" : *keyStr) <<
endmsg;
325 itrpair = (*m_tdt)->associateToEventView( handle, roi_link );
◆ getUseHighestPT()
◆ getVtxIndex()
◆ initialize()
◆ keepAllEvents()
◆ loop()
template<typename T , typename A = Analysis_Tier0>
handle wildcard chain selection - but only the first time NB: also check all other chains as well - only set up an analysis for configured chains
get chain
get matching chains
replace wildcard with actual matching chains ...
end of first event setup
all this should perhaps be class variables
will need to add a vertex filter at some point probably
now start everything going for this event properly ...
(obviously) get the event info
first check whether the chains have actually run, otherwise there's no point doing anything
for Monte Carlo get the truth particles if requested to do so
get the offline vertices into our structure
fetch offline vertices ...
add the truth particles if needed
now add the vertices
now add the offline tracks and reco objects
AOD
xAOD::TruthParticles
anything else?
selectTracks<TruthParticleContainer>( &selectorTruth, "INav4MomTruthEvent" );
now as a check go through the GenEvent collection
found this key
not found any truth collection
count of "events" - or interactions
count of particles
count of "events with some particles"
count of particles in this interaction
hooray! actually found a sensible event
if there were some particles in this interaction ...
need to be careful here, if not requiring truth only should not return
now loop over all relevant chains to get the trigger tracks...
create chains for ntpl
why does this need to be a class variable ???
useful debug information to be kept in for the time being
useful debug information to be kept in
Get chain combinations and loop on them
- loop made on chain selected as the one steering RoI creation
only use the TDT for extracting collections if this was a trigger analysis for fullscan "offline" type analyses (ie fullscan FTK) do not use this
do we still want the blind chain access for track collections ???
dummy full scan chain
MT Vertex access
new Roi based feature access
new FeatureRequestDescriptor with leg access
count of how many rois processed so far
don't extract any additional rois if a superRoi is requested: In this case, the superRoi would be shared between the different chains
check this is not a spurious TDT match
get the tracks
create analysis chain
get tracks
now get the vertices
retrieve online vertices
"offline" of "roi" type chains
This is nonsense and needs restructuring - why is the truth and offline selection done within this RoI loop? It means the complete offline and truth tracks will be retrieved for every RoI ! really we should have the structure
- check_a_trigger_chain_has_passed
- get_offline_or_truth_particles
- loop_over_rois
- get_trigger_tracks
- filter_offline_or_truth_reference
- match_tracks
- call_analyis_routine
will leave as it is for the time being
what is this for ???
if we want a purity, we need to swap round which tracks are the reference tracks and which the test tracks
stats book keeping
match test and reference tracks
filter on highest pt track only if required
ignore all tracks belong the specific analysis pt threshold if set
stats book keeping
match test and reference tracks
get vertices for this roi - have to copy to a vector<Vertex*>
Implements T_AnalysisConfig< T >.
Definition at line 195 of file T_AnalysisConfigMT_Tier0.h.
214 std::vector<std::string> configuredChains = (*(
m_tdt))->getListOfTriggers(
"L2_.*, EF_.*, HLT_.*");
216 for (
unsigned i=0 ;
i<configuredChains.size() ;
i++ ) {
226 std::vector<ChainString>
chains;
242 std::string selectChain =
chainName.raw();
250 std::vector<std::string> selectChains = (*(
m_tdt))->getListOfTriggers(
chainName.head() );
252 for (
unsigned iselected=0 ; iselected<selectChains.size() ; iselected++ ) {
254 selectChains[iselected] =
chainName.subs( selectChains[iselected] );
257 std::cout <<
"sorting:: chain specification: " <<
chainName <<
"\traw:" <<
chainName.raw() << std::endl;
258 std::cout <<
"\tchain: " <<
chainName.head() << std::endl;
259 std::cout <<
"\tkey: " <<
chainName.tail() << std::endl;
260 std::cout <<
"\tind: " <<
chainName.extra() << std::endl;
261 std::cout <<
"\troi: " <<
chainName.roi() << std::endl;
262 std::cout <<
"\tvtx: " <<
chainName.vtx() << std::endl;
263 std::cout <<
"\tte: " <<
chainName.element() << std::endl;
319 if ( xbeam!=0 || ybeam!=0 ) {
333 unsigned long long event_number = 0;
334 unsigned lumi_block = 0;
335 unsigned bunch_crossing_id = 0;
336 unsigned time_stamp = 0;
341 if ( this->
template retrieve(pEventInfo,
"EventInfo").isFailure() ) {
349 bunch_crossing_id = pEventInfo->
bcid();
355 <<
"\tevent " << event_number
356 <<
"\tlb " << lumi_block <<
endmsg;
379 bool analyse =
false;
385 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
387 const std::string& chainname =
m_chainNames[ichain].head();
389 if ( chainname ==
"" ) analyse =
true;
393 if ( chainname.find(
"L2") == std::string::npos &&
394 chainname.find(
"EF") == std::string::npos &&
395 chainname.find(
"HLT") == std::string::npos )
continue;
399 <<
"\tpass " << (*m_tdt)->isPassed(chainname)
400 <<
"\tpres " << (*m_tdt)->getPrescale(chainname) <<
endmsg;
406 if ( (*(
m_tdt))->isPassed(chainname) || (*(
m_tdt))->getPrescale(chainname) ) analyse =
true;
430 selectorTruth.clear();
442 if ( this->
template retrieve(truthMap,
"TrigInDetTrackTruthMap").isFailure()) {
457 std::vector<TIDA::Vertex> vertices;
458 std::vector<TIDA::Vertex> vertices_rec;
460 std::vector<double> refbeamspot;
461 std::vector<double> testbeamspot;
467 if ( !this->
select( vertices,
"PrimaryVertices" ) ) {
482 for (
unsigned i=0 ;
i<vertices.size() ;
i++ ) {
492 std::vector<TIDA::Track*> offline_tracks;
493 std::vector<TIDA::Track*> electron_tracks;
494 std::vector<TIDA::Track*> muon_tracks;
496 std::vector<TIDA::Track*> ref_tracks;
497 std::vector<TIDA::Track*> test_tracks;
499 offline_tracks.clear();
500 electron_tracks.clear();
510 bool foundTruth =
false;
514 filter_truth.setRoi( 0 );
516 selectorTruth.clear();
521 if (
m_provider->evtStore()->template contains<TruthParticleContainer>(
"INav4MomTruthEvent") ) {
523 this->
template selectTracks<TruthParticleContainer>( &selectorTruth,
"INav4MomTruthEvent" );
526 else if (
m_provider->evtStore()->template contains<TruthParticleContainer>(
"SpclMC") ) {
528 this->
template selectTracks<TruthParticleContainer>( &selectorTruth,
"SpclMC");
531 else if (
m_provider->evtStore()->template contains<xAOD::TruthParticleContainer>(
"TruthParticles") ) {
533 this->
template selectTracks<xAOD::TruthParticleContainer>( &selectorTruth,
"TruthParticles");
536 else if (
m_provider->evtStore()->template contains<TruthParticleContainer>(
"") ) {
538 this->
template selectTracks<TruthParticleContainer>( &selectorTruth,
"");
559 std::string
keys[4] = {
"GEN_AOD",
"TruthEvent",
"",
"G4Truth" };
561 std::string
key =
"";
563 bool foundcollection =
false;
565 for (
int ik=0 ; ik<4 ; ik++ ) {
571 if ( !
m_provider->evtStore()->template contains<McEventCollection>(
keys[ik]) ) {
580 if ( this->
template retrieve( mcevent,
keys[ik] ).isFailure() ) {
589 foundcollection =
true;
595 if ( !foundcollection ) {
597 m_provider->msg(MSG::WARNING) <<
"No MC Truth Collections of any sort, whatsoever!!!" <<
endmsg;
617 while ( evitr!=evend ) {
626 for (
auto pitr: *(*evitr) ) {
628 selectorTruth.selectTrack( pitr );
651 if(selectorTruth.size() > 0) foundTruth =
true;
664 if (
m_provider->evtStore()->template contains<xAOD::TrackParticleContainer>(
"InDetTrackParticles") ) {
665 this->
template selectTracks<xAOD::TrackParticleContainer>(
m_selectorRef,
"InDetTrackParticles" );
666 refbeamspot = this->
template getBeamspot<xAOD::TrackParticleContainer>(
"InDetTrackParticles" );
668 else if (
m_provider->evtStore()->template contains<Rec::TrackParticleContainer>(
"TrackParticleCandidate") ) {
669 this->
template selectTracks<Rec::TrackParticleContainer>(
m_selectorRef,
"TrackParticleCandidate" );
671 else if (
m_provider->msg().level() <= MSG::WARNING ) {
681 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
686 const std::string& chainname =
m_chainNames[ichain].head();
688 const std::string& vtx_name =
m_chainNames[ichain].vtx();
695 std::string ptvalue =
m_chainNames[ichain].postvalue(
"pt");
700 unsigned _decisiontype = TrigDefs::Physics;
701 unsigned decisiontype;
703 if ( this->
requireDecision() ) _decisiontype = TrigDefs::requireDecision;
707 else decisiontype = TrigDefs::alsoDeactivateTEs;
716 <<
"\tpass " << (*m_tdt)->isPassed(chainname)
717 <<
"\tprescale " << (*m_tdt)->getPrescale(chainname) <<
endmsg;
734 if ( chainname!=
"" && !this->
m_keepAllEvents && !(*m_tdt)->isPassed( chainname, decisiontype ) )
continue;
745 std::vector<std::string> chainNames ;
756 for (
unsigned i = 0 ;
i < chainNames.size() ; ++
i ) {
775 chain.addRoi( *roiInfo );
777 if (
m_provider->evtStore()->template contains<xAOD::TrackParticleContainer>(
key) ) {
778 this->
template selectTracks<xAOD::TrackParticleContainer>(
m_selectorTest,
key );
779 refbeamspot = this->
template getBeamspot<xAOD::TrackParticleContainer>(
key );
784 chain.back().addTracks(testtracks);
786 if ( vtx_name!=
"" ) {
792 std::vector<TIDA::Vertex> tidavertices;
794 if ( this->
select( tidavertices, vtx_name ) )
chain.back().addVertices( tidavertices );
807 std::string roi_key = chainConfig.
roi();
809 unsigned feature_type =TrigDefs::lastFeatureOfType;
811 if ( roi_key!=
"" ) feature_type= TrigDefs::allFeaturesOfType;
817 if ( chainConfig.
element()!=
"" ) {
821 std::vector< TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> >
rois =
841 if ( roi_key==
"SuperRoi" && iroi>1 )
continue;
848 if ( roi_key!=
"" && roi_link.
dataID()!=roi_key )
continue;
870 if ( this->
template selectTracks<xAOD::TrackParticleContainer>(
m_selectorTest, roi_link,
key ) ) { }
876 chain.addRoi( *roiInfo );
882 chain.back().addTracks(testtracks);
887 if ( vtx_name!=
"" ) {
889 std::vector<TIDA::Vertex> tidavertices;
891 this->
select( tidavertices, roi_link, vtx_name );
893 chain.back().addVertices( tidavertices );
900 std::cout <<
"\tTIDA analysis for chain: " << chainname <<
"\t key: " <<
key <<
"\t" << **roiptr << std::endl;
901 std::cout <<
"\tcollections: " <<
chain.back() << std::endl;
923 for (
unsigned ichain=0 ; ichain<
m_event->
size() ; ichain++ ) {
927 const std::string& vtx_name = chainConfig.
vtx();
930 if ( TnP_flag && chainConfig.
extra().find(
"_tag")!=std::string::npos ) continue ;
932 std::vector<TIDA::Roi*>
rois ;
947 for (
unsigned iroi=0 ; iroi<
rois.size() ; iroi++ ) {
950 filterRef.setRoi( &(
rois.at(iroi)->roi() ) );
953 else filterRef.setRoi( 0 );
977 if ( this->
filterOnRoi() ) filter_truth.setRoi( &(
rois.at(iroi)->roi() ) );
994 for (
unsigned itrk=0 ; itrk<
rois.at(iroi)->tracks().
size() ; itrk++ ) {
995 test_tracks.push_back(&(
rois.at(iroi)->tracks().at(itrk)));
1000 _analysis->setvertices( vertices.size() );
1002 if ( refbeamspot.size()>0 )
_analysis->setBeamRef( refbeamspot );
1003 if ( testbeamspot.size()>0 )
_analysis->setBeamTest( testbeamspot );
1046 if ( vtx_name!=
"" ) {
1048 std::vector<TIDA::Vertex>
vr =
rois.at(iroi)->vertices();
1049 std::vector<TIDA::Vertex*> vtx_rec;
1050 for (
unsigned iv=0 ; iv<
vr.size() ; iv++ ) vtx_rec.push_back( &
vr[iv] );
1052 std::vector<TIDA::Vertex*> vtx;
1054 for (
unsigned iv=0 ; iv<vertices.size() ; iv++ ) vtx.push_back( &vertices[iv] );
1057 if ( vertices.size()>
unsigned(this->getVtxIndex()) ) vtx.push_back( &vertices[this->
getVtxIndex()] );
1068 <<
"\tevent " << event_number
1069 <<
"\tlb " << lumi_block <<
endmsg;
◆ mcTruth()
◆ monTool()
template<typename T , typename A = Analysis_Tier0>
◆ name()
◆ processElectrons()
select offline electrons
Definition at line 703 of file T_AnalysisConfig.h.
719 # ifdef XAODTRACKING_TRACKPARTICLE_H
728 if( !
m_provider->evtStore()->template contains<Container>(containerName) ) {
729 m_provider->msg(MSG::WARNING) <<
"Error No Electron Container " << containerName <<
" !" <<
endmsg;
734 if(
sc.isFailure() || !container ) {
735 m_provider->msg(MSG::WARNING) <<
"Error retrieving container: " << containerName <<
" !" <<
endmsg;
741 Container::const_iterator elec = container->begin();
742 Container::const_iterator elec_end = container->end();
744 for( ; elec!=elec_end ; ++elec ){
755 bool good_electron =
false;
756 # ifdef XAODTRACKING_TRACKPARTICLE_H
764 long unsigned eleid = (
unsigned long)(&eleduff) ;
774 else trk_added = selectorRef.
selectTrack( (*elec)->trackParticle() );
776 if (trk_added) eleobj.
addChild( selectorRef.
tracks().back()->id() );
777 if (elevec) elevec->push_back( eleobj );
781 return selectorRef.
tracks().size();
◆ processMuons()
select offlinqe muons
Definition at line 789 of file T_AnalysisConfig.h.
798 # ifdef XAODTRACKING_TRACKPARTICLE_H
810 if( !
m_provider->evtStore()->template contains<Container>(containerName) ) {
811 m_provider->msg(MSG::WARNING) <<
"Error No MuonCollection" << containerName <<
" !" <<
endmsg;
816 if(
sc.isFailure() || !container ) {
817 m_provider->msg(MSG::WARNING) <<
"Error retrieving " << containerName <<
" !" <<
endmsg;
821 auto muon = container->begin();
822 auto muon_end = container->end();
827 # ifdef XAODTRACKING_TRACKPARTICLE_H
838 return selectorRef.
tracks().size();
◆ processTaus()
select offline taus
Definition at line 846 of file T_AnalysisConfig.h.
858 # ifdef XAODTRACKING_TRACKPARTICLE_H
872 if ( !
m_provider->evtStore()->template contains<Container>(containerName)) {
878 if (
sc != StatusCode::SUCCESS) {
879 m_provider->msg(MSG::WARNING) <<
" Offline tau retrieval not successful" <<
endmsg;
883 Container::const_iterator tau = container->begin();
884 Container::const_iterator tau_end = container->end();
887 for ( ; tau!=tau_end ; ++tau ) {
889 # ifdef XAODTRACKING_TRACKPARTICLE_H
892 # ifndef XAODTAU_VERSIONS_TAUJET_V3_H
893 int N = (*tau)->nTracks();
902 unsigned N = (*tau)->numTrack();
906 bool good_tau =
false;
907 # ifdef XAODTRACKING_TRACKPARTICLE_H
917 long unsigned tauid = (
unsigned long)(&duff) ;
925 bool trk_added =
false;
927 for (
unsigned i=
N ;
i-- ; ) {
928 # ifdef XAODTAU_TAUTRACK_H
930 std::vector< ElementLink<xAOD::TrackParticleContainer> > alink = (*tau)->track(
i)->trackLinks();
934 for (
size_t ilink=0 ; ilink<alink.size() ; ilink++ ) {
943 if ( trk_added ) tauobj.
addChild( selectorRef.
tracks().back()->id() );
945 if ( tauvec ) tauvec->push_back( tauobj );
949 return selectorRef.
tracks().size();
◆ referenceChains()
◆ releaseData() [1/2]
◆ releaseData() [2/2]
◆ requireDecision()
◆ retrieve()
old implementation - leave in place until after the full validation ... return m_provider->evtStore()->retrieve( container, containerName);
commented code intentionally left for development purposes ... std::cout << "\t\t\t T_AnalysisConfig::selectTracks() - > TrackSelector" << std::endl;
Definition at line 573 of file T_AnalysisConfig.h.
576 if (
m_provider->evtStore()->template contains<Collection>(
key ) ) {
578 if ( handle.isValid() ) {
581 collection = handle.cptr();
582 return StatusCode::SUCCESS;
585 return StatusCode::FAILURE;
◆ select() [1/3]
Definition at line 371 of file T_AnalysisConfig.h.
380 if ( vtx_itrpair.first == vtx_itrpair.second ) {
385 m_provider->msg(
MSG::DEBUG) <<
"\txAOD::VertexContainer found with size " << (vtx_itrpair.second - vtx_itrpair.first)
388 return select( vertices, vtx_itrpair.first, vtx_itrpair.second );
◆ select() [2/3]
Definition at line 394 of file T_AnalysisConfig.h.
400 if (
retrieve( xaodVtxCollection,
key ).isFailure()) {
401 m_provider->msg(MSG::WARNING) <<
"xAOD vertex container not found with key " <<
key <<
endmsg;
405 if ( xaodVtxCollection!=0 ) {
409 return select( vertices, xaodVtxCollection->
begin(), xaodVtxCollection->
end() );
415 for ( ; vtxitr != xaodVtxCollection->
end(); vtxitr++ ) {
416 if ( (*vtxitr)->nTrackParticles()>0 && (*vtxitr)->vertexType()!=0 ) {
424 (*vtxitr)->nTrackParticles(),
426 (*vtxitr)->chiSquared(),
427 (*vtxitr)->numberDoF() ) );
◆ select() [3/3]
variances
quality
Definition at line 342 of file T_AnalysisConfig.h.
348 for ( ; vtxitr!=vtx_end ; ++vtxitr ) {
349 if ( (*vtxitr)->vertexType()!=0 ) {
359 (*vtxitr)->nTrackParticles(),
361 (*vtxitr)->chiSquared(),
362 (*vtxitr)->numberDoF() ) );
◆ selectionChains()
◆ selectTracks() [1/4]
will need this printout for debugging the feature access, so leave this commented until it has been properly debugged, then it can be removed
will not use the te name here, but keep it on just the same for the time being, for subsequent development
Definition at line 441 of file T_AnalysisConfig.h.
453 std::string key_collection =
key;
454 std::string key_tename =
"";
455 size_t pos = key_collection.find(
"/");
456 if (
pos!=std::string::npos ) {
458 key_tename =
key.substr( 0,
pos );
461 std::pair<
typename Collection::const_iterator,
462 typename Collection::const_iterator > itrpair;
467 const std::string* keyStr =
m_provider->evtStore()->keyToString(roi_link.
key(), checkCLID);
468 m_provider->msg(
MSG::DEBUG) <<
"Requesting range over (" <<
key <<
") associated to ROI from " << (keyStr ==
nullptr ?
"UNKNOWN" : *keyStr) <<
endmsg;
470 itrpair = (*m_tdt)->associateToEventView( handle, roi_link );
472 if ( itrpair.first != itrpair.second ) {
473 selector->selectTracks( itrpair.first, itrpair.second );
◆ selectTracks() [2/4]
commented code intentionally left for development purposes ...
Definition at line 591 of file T_AnalysisConfig.h.
594 if ( handle.isValid() ) {
597 selector->selectTracks( handle.cptr() );
◆ selectTracks() [3/4]
lagacy run 2 access
Definition at line 487 of file T_AnalysisConfig.h.
491 std::string key_collection =
key;
492 std::string key_tename =
"";
493 size_t pos = key_collection.find(
"/");
494 if (
pos!=std::string::npos ) {
496 key_tename =
key.substr( 0,
pos );
499 std::vector< Trig::Feature<Collection> > trackcollections = citr->get<
Collection>( key_collection, TrigDefs::alsoDeactivateTEs, key_tename );
500 if ( !trackcollections.empty() ) {
502 for (
unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) {
504 if ( !trackfeature.
empty() ) {
507 selector->selectTracks( trigtracks );
◆ selectTracks() [4/4]
NB: because we want to use this for the L2Star chains, we have to use this method, not the above method without the TruthMap argument - if we don't want/have the TruthMap, just set the pointer to 0 - there should be abetter way to do this, but shan't worry about it now.
get the correspondiong TE
get all the named collections attached to the TE
now got the collectionVector, can navigate through this
NB: this is safer than using index as an index, ie collectionVector[index] since it will do nothing if index is out of range, although it will be a little slower
useful for debug
Definition at line 523 of file T_AnalysisConfig.h.
527 std::vector< Trig::Feature<Collection> > trackcollections = citr->get<
Collection>(
key, TrigDefs::alsoDeactivateTEs );
528 if ( !trackcollections.empty() ) {
536 for (
unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) {
544 std::vector< const Collection* > collectionVector;
551 for (
unsigned iv=collectionVector.size() ; iv-- ; ) {
555 if (
index!=iv )
continue;
558 selector->selectTracks( collectionVector[iv], truthmap );
◆ selectTracksNotEmpty()
Definition at line 608 of file T_AnalysisConfig.h.
610 if (
key.empty() )
return false;
611 if ( !
m_provider->evtStore()->template contains<Collection>(
key ) )
return false;
615 if ( !(
sc.isSuccess() && collection ) )
return false;
620 if ( collection->size() == 0 ) {
625 selector->selectTracks( collection );
◆ set_monTool()
template<typename T , typename A = Analysis_Tier0>
◆ setBeamX()
◆ setBeamY()
◆ setBeamZ()
◆ setFilterOnRoi()
◆ setGenericFlag()
◆ setMCTruth()
◆ setRequireDecision()
◆ setRunPurity()
template<typename T , typename A = Analysis_Tier0>
◆ setShifter()
template<typename T , typename A = Analysis_Tier0>
◆ setUseHighestPT()
◆ setVtxIndex()
◆ testChains()
◆ useBeamCondSvc()
template<typename T , typename A = Analysis_Tier0>
◆ _analysis
template<typename T , typename A = Analysis_Tier0>
◆ m_analyses
template<typename T , typename A = Analysis_Tier0>
◆ m_analysis
◆ m_analysisInstanceName
◆ m_associator
◆ m_beamX
◆ m_beamY
◆ m_beamZ
◆ m_chainNames
template<typename T , typename A = Analysis_Tier0>
◆ m_containTracks
template<typename T , typename A = Analysis_Tier0>
◆ m_doBjets
template<typename T , typename A = Analysis_Tier0>
◆ m_doElectrons
template<typename T , typename A = Analysis_Tier0>
◆ m_doMuons
template<typename T , typename A = Analysis_Tier0>
◆ m_doOffline
template<typename T , typename A = Analysis_Tier0>
◆ m_doTaus
template<typename T , typename A = Analysis_Tier0>
◆ m_doTauThreeProng
template<typename T , typename A = Analysis_Tier0>
◆ m_event
template<typename T , typename A = Analysis_Tier0>
◆ m_filterOnRoi
◆ m_filters
◆ m_first
template<typename T , typename A = Analysis_Tier0>
◆ m_genericFlag
◆ m_hasTruthMap
template<typename T , typename A = Analysis_Tier0>
◆ m_invmass
template<typename T , typename A = Analysis_Tier0>
◆ m_invmass_obj
template<typename T , typename A = Analysis_Tier0>
◆ m_keepAllEvents
◆ m_keys
◆ m_mcTruth
◆ m_monTool
template<typename T , typename A = Analysis_Tier0>
◆ m_NRefTracks
template<typename T , typename A = Analysis_Tier0>
◆ m_NRois
template<typename T , typename A = Analysis_Tier0>
◆ m_NTestTracks
template<typename T , typename A = Analysis_Tier0>
◆ m_outputFileName
template<typename T , typename A = Analysis_Tier0>
◆ m_provider
◆ m_pTthreshold
template<typename T , typename A = Analysis_Tier0>
◆ m_refChainKey
◆ m_refChainName
◆ m_releaseData
◆ m_requireDecision
◆ m_runPurity
template<typename T , typename A = Analysis_Tier0>
◆ m_selectorRef
◆ m_selectorSel
◆ m_selectorTest
◆ m_shifter
template<typename T , typename A = Analysis_Tier0>
◆ m_tauEtCutOffline
template<typename T , typename A = Analysis_Tier0>
◆ m_tdt
◆ m_testChainKey
◆ m_testChainName
◆ m_testType
template<typename T , typename A = Analysis_Tier0>
◆ m_TnP_tool
template<typename T , typename A = Analysis_Tier0>
◆ m_types
◆ m_useBeamCondSvc
template<typename T , typename A = Analysis_Tier0>
◆ m_useHighestPT
◆ m_vtxIndex
The documentation for this class was generated from the following file:
JetConstituentVector::iterator iterator
TrigTrackSelector * m_selectorRef
virtual void initialise()=0
standard operation interface
std::vector< std::vector< std::string > > m_types
Const iterator class for DataVector/DataList.
bool isGoodOffline(const Analysis::Electron &elec)
@ z
global position (cartesian)
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
virtual void clear() override
uint64_t eventNumber() const
The current event's event number.
virtual void finalise()=0
void addTracks(const std::vector< TIDA::Track > &tracks)
accessors for the track vector
ToolHandle< Trig::TrigDecisionTool > * m_tdt
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
int signal_process_id(const GenEvent &e)
unsigned size() const
vertex multiplicity ?
const TrackAnalysis * analysis() const
sgkey_t key() const
Get the key that we reference, as a hash.
Describes the Region of Ineterest geometry It has basically 8 parameters.
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
bool getUseHighestPT() const
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
void lumi_block(unsigned lb)
bool empty() const
test method to check if the object is truly there
const ID_type & dataID() const
Get the key that we reference, as a string.
uint32_t runNumber() const
The current event's run number.
const std::vector< TIDA::Chain > & chains() const
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
void addRoi(TIDA::Roi &roi)
add and roi by root dictionary class
std::string m_analysisInstanceName
storage of the time histories of all the cells
std::vector< std::vector< std::string > > m_keys
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
const HLT::TriggerElement * te() const
explicit conversion to TriggerElement
bool getFeatures(const TriggerElement *te, std::vector< const T * > &features, const std::string &label="", std::map< const T *, std::string > *labels=0) const
retrieve features attached to given TriggerElement
void addChain(const std::string &chainname)
methods to add and access chains
void time_stamp(unsigned t)
TIDA::Chain & back()
get the last chain from the vector
void event_number(unsigned long long e)
::StatusCode StatusCode
StatusCode definition for legacy code.
void tag(const std::string &chainName)
getters and setters
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
TrackAnalysis * m_analysis
Class describing a tau jet.
ToolHandle< GenericMonitoringTool > * m_monTool
definition of StoreGate container holding a vector of Analysis::Muon
default simple filter which accepts all tracks
uint32_t CLID
The Class ID type.
const std::string & extra() const
uint32_t lumiBlock() const
The current event's luminosity block number.
bool selectTrack(const TrigInDetTrack *track, const TrigInDetTrackTruthMap *truthMap=0)
neater code to make use of vector function also for a single ancestor pdgid, instead of the full code...
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
const std::string selection
StatusCode retrieve(Collection const *&collection, const std::string &key="")
TrackAssociator * m_associator
const std::vector< TIDA::Track * > & tracks() const
an iterator over instances of a given type in StoreGateSvc. It d-casts and caches locally the pointed...
void addVertex(const TIDA::Vertex &v)
void clear()
clear the event
Class describing the basic event information.
ElementConstPointer cptr() const
Return a pointer to the referenced element.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
int ir
counter of the current depth
const std::string & head() const
const std::string & roi() const
std::vector< TIDA::Roi * > GetRois(std::vector< TIDA::Chain > &chains, const TrackSelector *selector, TrackFilter *filter, T *hmass, T *hmass_obj, TrigObjectMatcher *tom=0) const
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
std::vector< ChainString > m_chainNames
void setBeamline(double x, double y, double z=0)
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
const xAOD::TrackParticle * getOriginalTrackParticle(const xAOD::Electron *el)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the electron.
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
const std::string & element() const
virtual void match(const std::vector< T * > &s1, const std::vector< S * > &s2)=0
void bunch_crossing_id(unsigned b)
std::vector< std::vector< TrackFilter * > > m_filters
uint32_t bcid() const
The bunch crossing ID of the event.
void run_number(unsigned r)
accessors
TrigTrackSelector * m_selectorTest
void addChild(unsigned long id)
size_type size() const noexcept
Returns the number of elements in the collection.
const std::string & name() const
void probe(const std::string &chainName)
const T * cptr() const
explicit conversion to object
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool requireDecision() const
bool select(std::vector< TIDA::Vertex > &vertices, xAOD::VertexContainer::const_iterator vtx_start, xAOD::VertexContainer::const_iterator vtx_end)
const std::string & vtx() const
std::string m_releaseData
std::vector< std::vector< std::string > > m_chainNames