43 m_tdt(
"Trig::TrigDecisionTool/TrigDecisionTool"),
64 std::string selectChain = name().substr(name().
find(
".")+1,name().
size());
66 if ( selectChain.find(
":")==std::string::npos ) selectChain =
":"+selectChain;
104 <<
"\t" << tagchain.
roi()
106 <<
"\t" << tagchain.
extra()
144 std::unique_ptr<TrackAnalysisDefinition> config = std::make_unique<TrackAnalysisDefinition>();
149 config->setTestType(
"Trigger" );
150 config->setReferenceType(
"Offline" );
157 config->setUseTrigger(
true );
158 config->setUseOffline(
true );
159 config->setDoTrigNavigation(
true );
165 m_trkAnaDef = std::move( config );
181 return StatusCode::SUCCESS;
192 return StatusCode::SUCCESS;
200 if (
execute( context ) )
return StatusCode::SUCCESS;
201 return StatusCode::FAILURE;
207void printtracks(
const std::vector<const TrackView*>& ars,
const std::string& sht=
"" ) {
208 std::cout <<
"\nSUTT printtracks: " << sht <<
"\tsize: " << ars.size() << std::endl;
209 for (
size_t i=0 ; i<ars.size() && i<10 ; i++ ) std::cout <<
"\t" << i <<
"\t" << *ars[i] << std::endl;
210 std::cout << std::endl;
215std::ostream&
operator<<( std::ostream& s, std::vector<T>& v ) {
216 for (
size_t i=0 ; i<v.size() ; i++ ) s <<
"\t" << v[i];
225 feclearexcept(FE_ALL_EXCEPT);
226 fedisableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
234 MY_MSG_DEBUG <<
"␛[91;1m PROCESSING ------------------------------------------------------------------------------------␛[m" <<
endmsg;
245 const std::vector<std::string> configuredChains =
m_tdt->getListOfTriggers(
"HLT_.*, EF_.*");
247 for (
unsigned i=0 ; i<configuredChains.size() ; i++ ) {
248 if(
m_tdt->isPassed( configuredChains[i], decisionType ) ) std::cout << i <<
"\t" <<
"␛[91;1m" <<
"Chain " << configuredChains[i] <<
" pass (ACN)␛[m" << std::endl;
249 if ( configuredChains[i] ==
m_triggerchain ) std::cout <<
"Mutha ..." << configuredChains[i] <<
" " <<
m_triggerchain <<
"\n\n" << std::endl;
252 MY_MSG_INFO <<
"␛[91;1m" << configuredChains.size() <<
" Configured Chains" <<
"␛[m"
280 std::vector<TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> > selectedRois;
284 std::vector<TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> > tagRois;
288 size_t selectedRoisSize = 1;
297 std::unique_ptr<TagNProbe> tnp = 0;
312 selectedRoisSize = selectedRois.size();
321 std::unique_ptr<TrackAnalysisStore> tagStore = 0;
328 const std::vector<const TrackView*>* vref_ptr;
334 tagStore = std::make_unique<TrackAnalysisStore>(
"tagstore", context );
336 vref_ptr = &tagStore->reference_tracks();
342 const std::vector<const TrackView*>& vref = *vref_ptr;
346 for (
auto roi : tagRois ) {
348 if( ! roi_link.
isValid() )
continue;
349 std::vector<const TrackView*> v = roiFilter.
getTracks( vref, *roi_link.
cptr() );
359 for (
size_t i=0 ; i<v.size() ; i++ ) {
360 bool ok = tnp->select( v[i] );
361 std::vector<double> m = tnp->masses( v[i] );
362 std::cout <<
"\ttnp: " << ok <<
"\tm: " << m.size() << m <<
"\t " << *v[i] << std::endl;
406 for(
size_t ir=selectedRoisSize ;
ir-- ; ) {
494 std::unique_ptr<TIDA::Associator<const TrackView> > matcher =
m_trackMatchingTool->uclone();
546 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
std::ostream & operator<<(std::ostream &s, const std::tuple< Tup... > &tup)
emacs: this is -*- c++ -*-
size_t size() const
Number of registered mappings.
emacs: this is -*- c++ -*-
void printtracks(const std::vector< const TrackView * > &ars, const std::string &sht="")
emacs: this is -*- c++ -*-
emacs: this is -*- c++ -*-
virtual void match(const std::vector< T * > &ref, const std::vector< S * > &test)
const std::string & extra() const
const std::string & roi() const
const std::string & head() const
const std::string & tail() const
const std::string & vtx() const
const std::string & element() const
ElementLink implementation for ROOT usage.
ElementConstPointer cptr() const
Get a constant pointer to the referenced object.
bool isValid() const
Check if the element can be found.
std::vector< roi_info_t > retrieveRois(const std::string &chainName, const std::string &roiKey, const int &chainLeg=-1) const
Retrieve RoIs.
void addTagNProbe(const TagNProbe *t)
const xAOD::EventInfo * eventInfo() const
get event info
void fillVertexViewTest(const std::string &key)
void setBeamKeys(const beam_key_t *k)
int roiIndex() const
odds n ends ...
void set_vertex_matcher(const TIDA::Associator< const VertexView > *m)
void fillVertexViewRef(const std::string &key)
vertex fillers ...
const std::vector< const TrackView * > & reference_tracks() const
void fillViewRef(const std::string &key)
track fillers ...
void set_matcher(const TIDA::Associator< const TrackView > *m)
const std::vector< const VertexView * > & testvertices() const
const std::vector< const TrackView * > & test_tracks() const
StatusCode fillEventInfo(const std::string &key)
const std::vector< const VertexView * > & refvertices() const
vertex accessors
void fillViewTest(const std::string &key)
virtual StatusCode fillHistograms(const EventContext &context) const
std::string m_refTracks_tag
ToolHandle< TrackViewMatchingTool > m_trackMatchingTool
need to define a proper interface class
std::string m_triggerchain
Gaudi::Property< ConfiguredValue< int > > m_refPdgId_tag
virtual StatusCode initialize() override
Gaudi::Property< float > m_maxTagMass
std::unique_ptr< AnalysisR4 > m_analysis
and the lightweight tool to actually fill them - could join this with the above montool,...
std::string m_triggerchain_tag
Gaudi::Property< std::string > m_referenceVertices
Gaudi::Property< std::string > m_reference
properties
Gaudi::Property< float > m_minTagPT
bool m_initialized
and sensible internal variables we can set from the configuration ...
virtual ~TrackAnalysis()
Destructor.
ToolHandle< IDTPM2::ITrackSelector > m_testSelector
std::string m_refVertices
SG::ReadDecorHandleKeyArray< xAOD::EventInfo > m_beamKeys
bool execute(const EventContext &context) const
finalise histograms in stop()
virtual StatusCode bookHistograms()
virtual StatusCode proc()
finalise histograms in stop()
Gaudi::Property< float > m_minTagMass
std::unique_ptr< IPredicate< TrackView > > m_tnpPredicate
ToolHandle< IDTPM2::ITrackSelector > m_refSelector
tools
Gaudi::Property< std::vector< std::string > > m_fillers
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoName
read handles, but ...
ToolHandle< GenericMonitoringTool > m_tool
histogram montool - books the histograms in the python
Gaudi::Property< bool > m_useDecorations
Gaudi::Property< std::string > m_reference_tag
Gaudi::Property< std::string > m_tagChain
ToolHandle< Trig::TrigDecisionTool > m_tdt
doesn't actually need to be an algtool as it class variables, so requires no python configuration
std::vector< const T * > getTracks(const std::vector< const T * > &tracks, const TrigRoiDescriptor *roi) const
track getter function (for offline tracks || truth particles)
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
uint64_t eventNumber() const
The current event's event number.
int ir
counter of the current depth
std::string find(const std::string &s)
return a remapped string
static const unsigned int Physics