ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
T_AnalysisConfig_Tier0< T > Class Template Reference

#include <T_AnalysisConfig_Tier0.h>

Inheritance diagram for T_AnalysisConfig_Tier0< T >:
Collaboration diagram for T_AnalysisConfig_Tier0< T >:

Public Member Functions

 T_AnalysisConfig_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)
 
virtual ~T_AnalysisConfig_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 TrackAnalysisanalysis () 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)
 
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
 

Public Attributes

Analysis_Tier0_analysis
 

Protected Member Functions

virtual void loop ()
 
virtual void book ()
 
virtual void finalize ()
 
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...
 

Protected Attributes

bool m_useBeamCondSvc
 
TIDA::Eventm_event
 
std::vector< ChainStringm_chainNames
 
std::vector< Analysis_Tier0 * > m_analyses
 
std::string m_testType
 
bool m_doOffline
 
bool m_doMuons
 
bool m_doElectrons
 
bool m_doTaus
 
bool m_doBjets
 
bool m_hasTruthMap
 
bool m_doTauThreeProng
 
bool m_tauEtCutOffline
 
std::string m_outputFileName
 
int m_NRois
 output stats More...
 
int m_NRefTracks
 
int m_NTestTracks
 
bool m_runPurity
 
bool m_shifter
 
double m_pTthreshold
 
bool m_first
 
bool m_containTracks
 
T * m_provider
 
ToolHandle< Trig::TrigDecisionTool > * m_tdt
 
std::string m_analysisInstanceName
 
std::vector< std::vector< std::string > > m_types
 
std::vector< std::vector< std::string > > m_keys
 
std::string m_refChainName
 
std::string m_refChainKey
 
std::string m_testChainName
 
std::string m_testChainKey
 
std::vector< std::vector< TrackFilter * > > m_filters
 
TrigTrackSelectorm_selectorRef
 
TrigTrackSelectorm_selectorTest
 
TrigTrackSelectorm_selectorSel
 
TrackAssociatorm_associator
 
TrackAnalysism_analysis
 
bool m_mcTruth
 
double m_beamX
 
double m_beamY
 
double m_beamZ
 
int m_genericFlag
 
std::string m_releaseData
 
bool m_keepAllEvents
 
bool m_useHighestPT
 
int m_vtxIndex
 
bool m_filterOnRoi
 
bool m_requireDecision
 

Detailed Description

template<typename T>
class T_AnalysisConfig_Tier0< T >

Definition at line 87 of file T_AnalysisConfig_Tier0.h.

Constructor & Destructor Documentation

◆ T_AnalysisConfig_Tier0()

template<typename T >
T_AnalysisConfig_Tier0< T >::T_AnalysisConfig_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 
)
inline

Definition at line 97 of file T_AnalysisConfig_Tier0.h.

102  :
103  T_AnalysisConfig<T>( analysisInstanceName,
104  testChainName, testType, testKey,
105  referenceChainName, referenceType, referenceKey,
106  testFilter, referenceFilter,
107  associator,
108  analysis ),
109  m_useBeamCondSvc(false),
110  m_doOffline(true),
111  m_doMuons(false),
112  m_doElectrons(false),
113  m_doTaus(false),
114  m_doBjets(false),
115  m_hasTruthMap(false),
116  m_NRois(0),
117  m_NRefTracks(0),
118  m_NTestTracks(0),
119  m_runPurity(false),
120  m_shifter(false),
121  m_pTthreshold(0),
122  m_first(true),
123  m_containTracks(false)
124  {
125  m_event = new TIDA::Event();
126  m_chainNames.push_back(testChainName);
127 
128 #if 0
129  ChainString& chain = m_chainNames.back();
130 
131  std::cout << "\nT_AnalysisConfig_Tier0::name: " << name() << "\t" << this << std::endl;
132  std::cout << "T_AnalysisConfig_Tier0::chain specification: " << testChainName << " -> " << chain << "\t" << chain.raw() << std::endl;
133  std::cout << "\tchain: " << chain.head() << std::endl;
134  std::cout << "\tkey: " << chain.tail() << std::endl;
135  std::cout << "\troi: " << chain.roi() << std::endl;
136  std::cout << "\tvtx: " << chain.vtx() << std::endl;
137  std::cout << "\tte: " << chain.element() << std::endl;
138 
139  std::cout << "\tpost: " << chain.post() << std::endl;
140  std::cout << "\tpt: " << chain.postvalue("pt") << std::endl;
141 
142  std::cout << "\tcontainTracks: " << m_containTracks << std::endl;
143 #endif
144 
145  m_testType = testType;
146  }

◆ ~T_AnalysisConfig_Tier0()

template<typename T >
virtual T_AnalysisConfig_Tier0< T >::~T_AnalysisConfig_Tier0 ( )
inlinevirtual

Definition at line 148 of file T_AnalysisConfig_Tier0.h.

148 { delete m_event; }

Member Function Documentation

◆ addReferenceChain()

void T_AnalysisConfig< T >::addReferenceChain ( const std::string &  chainName,
const std::string &  type,
const std::string &  key 
)
inlineinherited

Definition at line 201 of file T_AnalysisConfig.h.

201  {
202  m_chainNames[1].push_back(chainName); m_types[1].push_back(type); m_keys[1].push_back(key);
203  }

◆ addReferenceFilter()

void T_AnalysisConfig< T >::addReferenceFilter ( TrackFilter filter)
inlineinherited

Definition at line 210 of file T_AnalysisConfig.h.

210 { m_filters[1].push_back(filter); }

◆ addSelectionChain()

void T_AnalysisConfig< T >::addSelectionChain ( const std::string &  chainName,
const std::string &  type,
const std::string &  key 
)
inlineinherited

Definition at line 205 of file T_AnalysisConfig.h.

205  {
206  m_chainNames[2].push_back(chainName); m_types[2].push_back(type); m_keys[2].push_back(key);
207  }

◆ addSelectionFilter()

void T_AnalysisConfig< T >::addSelectionFilter ( TrackFilter filter)
inlineinherited

Definition at line 211 of file T_AnalysisConfig.h.

211 { m_filters[2].push_back(filter); }

◆ addTestChain()

void T_AnalysisConfig< T >::addTestChain ( const std::string &  chainName,
const std::string &  type,
const std::string &  key 
)
inlineinherited

Definition at line 197 of file T_AnalysisConfig.h.

197  {
198  m_chainNames[0].push_back(chainName); m_types[0].push_back(type); m_keys[0].push_back(key);
199  }

◆ addTestFilter()

void T_AnalysisConfig< T >::addTestFilter ( TrackFilter filter)
inlineinherited

Definition at line 209 of file T_AnalysisConfig.h.

209 { m_filters[0].push_back(filter); }

◆ analysis()

const TrackAnalysis* T_AnalysisConfig< T >::analysis
inlineinherited

Definition at line 256 of file T_AnalysisConfig.h.

256 {return m_analysis;}

◆ beamX()

double T_AnalysisConfig< T >::beamX
inlineinherited

Definition at line 264 of file T_AnalysisConfig.h.

264 { return m_beamX; }

◆ beamY()

double T_AnalysisConfig< T >::beamY
inlineinherited

Definition at line 265 of file T_AnalysisConfig.h.

265 { return m_beamY; }

◆ beamZ()

double T_AnalysisConfig< T >::beamZ
inlineinherited

Definition at line 266 of file T_AnalysisConfig.h.

266 { return m_beamZ; }

◆ book()

template<typename T >
virtual void T_AnalysisConfig_Tier0< T >::book ( )
inlineprotectedvirtual

Reimplemented from T_AnalysisConfig< T >.

Definition at line 1189 of file T_AnalysisConfig_Tier0.h.

1189  {
1190 
1191  if(m_provider->msg().level() <= MSG::VERBOSE)
1192  m_provider->msg(MSG::VERBOSE) << "AnalysisConfig_Tier0::book() " << name() << endmsg;
1193 
1194  m_provider->msg(MSG::ERROR) << "AnalysisConfig_Tier0::book() should no longer ever be called: " << name() << endmsg;
1195 
1196  }

◆ containTracks()

template<typename T >
void T_AnalysisConfig_Tier0< T >::containTracks ( bool  b)
inline

Definition at line 156 of file T_AnalysisConfig_Tier0.h.

156 { m_containTracks = b; }

◆ execute()

virtual void T_AnalysisConfig< T >::execute
inlinevirtualinherited

Definition at line 223 of file T_AnalysisConfig.h.

223  {
224  if ( !m_provider ) std::cerr << "ERROR T_AnalysisConfig::execute() called without initialising" << std::endl;
225  loop();
226  }

◆ filterOnRoi()

bool T_AnalysisConfig< T >::filterOnRoi
inlineinherited

Definition at line 282 of file T_AnalysisConfig.h.

282 { return m_filterOnRoi; }

◆ finalize()

template<typename T >
virtual void T_AnalysisConfig_Tier0< T >::finalize ( )
inlineprotectedvirtual

Reimplemented from T_AnalysisConfig< T >.

Definition at line 1200 of file T_AnalysisConfig_Tier0.h.

1200  {
1201 
1202  if(m_provider->msg().level() <= MSG::VERBOSE)
1203  m_provider->msg(MSG::VERBOSE) << "AnalysisConfig_Tier0::finalise() " << m_provider->name() << endmsg;
1204 
1205  m_analysis->finalise();
1206 
1207  m_provider->msg(MSG::INFO) << m_provider->name() << " " << m_chainNames[0] << " \tNRois processed: " << m_NRois << "\tRef tracks: " << m_NRefTracks << "\tTestTracks: " << m_NTestTracks << endmsg;
1208 
1209  if(m_provider->msg().level() <= MSG::VERBOSE)
1210  m_provider->msg(MSG::VERBOSE) << m_provider->name() << " finalised" << endmsg;
1211 
1212  }

◆ genericFlag()

bool T_AnalysisConfig< T >::genericFlag
inlineinherited

Definition at line 268 of file T_AnalysisConfig.h.

268 { return m_genericFlag; }

◆ getBeamspot() [1/2]

std::vector<double> T_AnalysisConfig< T >::getBeamspot ( const std::string &  key)
inlineprotectedinherited

Definition at line 632 of file T_AnalysisConfig.h.

632  {
633  const Collection* collection = 0;
634  std::vector<double> v;
635 
636  if ( key!="" ) {
637  if ( m_provider->evtStore()->template contains<Collection>( key ) ) {
638  StatusCode sc = retrieve( collection, key );
639  m_provider->msg(MSG::DEBUG) << "SG Collection->size() " << collection->size() << " (" << key << ")" << endmsg;
640  if( sc.isSuccess() && collection ) {
641 
642  typename Collection::const_iterator trackitr = collection->begin();
643  typename Collection::const_iterator trackend = collection->end();
644  if ( trackitr!=trackend ) {
645  v.resize(3);
646  v[0] = (*trackitr)->vx();
647  v[1] = (*trackitr)->vy();
648  v[2] = (*trackitr)->vz();
649  return v;
650  } // only need to look at the first track
651  }
652  }
653  }
654  return v;
655  }

◆ getBeamspot() [2/2]

std::vector<double> T_AnalysisConfig< T >::getBeamspot ( Trig::FeatureContainer::combination_const_iterator  citr,
const std::string &  key = "" 
)
inlineprotectedinherited

Definition at line 661 of file T_AnalysisConfig.h.

661  {
662  std::vector< Trig::Feature<Collection> > trackcollections = citr->get<Collection>( key, TrigDefs::alsoDeactivateTEs );
663  std::vector<double> v;
664  if ( !trackcollections.empty() ) {
665  // NB!! a combination should never have more than one entry for a track collection from a single algorithm,
666  // if ( trackcollections.size()>1 ) std::cerr << "SUTT OH NO!!!!!!!!" << endmsg;
667  for ( unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) {
668  // std::cout << "selectTracks() ifeat=" << ifeat << "\tkey " << key << std::endl;
669  Trig::Feature<Collection> trackfeature = trackcollections.at(ifeat);
670  if ( !trackfeature.empty() ) {
671  // m_provider->msg(MSG::DEBUG) << "TDT TrackFeature->size() " << trackfeature.cptr()->size() << " (" << key << ")" << endmsg;
672  // actually select the tracks from this roi at last!!
673  const Collection* trigtracks = trackfeature.cptr();
674 
675  typename Collection::const_iterator trackitr = trigtracks->begin();
676  typename Collection::const_iterator trackend = trigtracks->end();
677  if ( trackitr!=trackend ) {
678  v.resize(3);
679  v[0] = (*trackitr)->vx();
680  v[1] = (*trackitr)->vy();
681  v[2] = (*trackitr)->vz();
682  return v;
683  } // only need to look at the first track
684  }
685  }
686  return v;
687  }
688  else {
689  m_provider->msg(MSG::DEBUG) << "TDT TrackFeature collection (" << key << ") is empty " << endmsg;
690  return v;
691  }
692  }

◆ getCollection()

std::pair< typename Collection::const_iterator, typename Collection::const_iterator > T_AnalysisConfig< T >::getCollection ( const ElementLink< TrigRoiDescriptorCollection > &  roi_link,
const std::string &  key = "" 
)
inlineprotectedinherited

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 297 of file T_AnalysisConfig.h.

298  {
299 
302  // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl;
303 
306  std::string key_collection = key;
307  std::string key_tename = "";
308  size_t pos = key_collection.find("/");
309  if ( pos!=std::string::npos ) {
310  key_collection = key.substr( pos+1, key.size()-pos );
311  key_tename = key.substr( 0, pos );
312  }
313 
314  std::pair< typename Collection::const_iterator,
315  typename Collection::const_iterator > itrpair;
316 
318 
319  CLID checkCLID;
320  const std::string* keyStr = m_provider->evtStore()->keyToString(roi_link.key(), checkCLID);
321  m_provider->msg(MSG::DEBUG) << "Requesting range over (" << key << ") associated to ROI from " << (keyStr == nullptr ? "UNKNOWN" : *keyStr) << endmsg;
322 
323  itrpair = (*m_tdt)->associateToEventView( handle, roi_link );
324 
325  return itrpair;
326  }

◆ getUseHighestPT()

bool T_AnalysisConfig< T >::getUseHighestPT
inlineinherited

Definition at line 277 of file T_AnalysisConfig.h.

277 { return m_useHighestPT; }

◆ getVtxIndex()

int T_AnalysisConfig< T >::getVtxIndex
inlineinherited

Definition at line 280 of file T_AnalysisConfig.h.

280 { return m_vtxIndex; }

◆ initialize()

virtual void T_AnalysisConfig< T >::initialize ( T *  p,
ToolHandle< Trig::TrigDecisionTool > *  tdt 
)
inlinevirtualinherited

Definition at line 214 of file T_AnalysisConfig.h.

214  {
215  m_provider = p;
216  m_tdt = tdt;
217  if ( m_tdt==0 ) m_analysis->initialise();
218 
219  }

◆ keepAllEvents()

void T_AnalysisConfig< T >::keepAllEvents ( bool  b)
inlineinherited

Definition at line 274 of file T_AnalysisConfig.h.

274 { m_keepAllEvents = b; }

◆ loop()

template<typename T >
virtual void T_AnalysisConfig_Tier0< T >::loop ( )
inlineprotectedvirtual

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

add the truth particles if needed

now add the vertices

now add the offline tracks and reco objects

now loop over all relevant chains to get the trigger tracks...

create chains for ntpl

why does this need to be a class variable ???

and the index of the collection (if any)

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

dummy full scan chain

HLT and EF-like EDM

L2 track EDM

get vertex information

now also add xAOD vertices

leave this code commented so that we have a record of the change - as soon as we can fix the missing track multiplicity from the vertex this will need to go back

variances

quality

retrieve online vertices

loop over combinations

"offline" type chains

now loop over the rois (again)

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

AOD

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

get offline tracks

what is this ???

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 185 of file T_AnalysisConfig_Tier0.h.

185  {
186 
187  if( m_provider->msg().level() <= MSG::VERBOSE) {
188  m_provider->msg(MSG::VERBOSE) << "AnalysisConfig_Tier0::loop() for " << T_AnalysisConfig<T>::m_analysisInstanceName << endmsg;
189  }
190 
191  // get (offline) beam position
192  double xbeam = 0;
193  double ybeam = 0;
194 
195  if ( m_first ) {
196 
197  m_first = false;
198 
199  m_provider->msg(MSG::VERBOSE) << " using beam position\tx=" << xbeam << "\ty=" << ybeam << endmsg;
200 
201  if (m_provider->msg().level() <= MSG::VERBOSE) {
202 
203  std::vector<std::string> configuredChains = (*(m_tdt))->getListOfTriggers("L2_.*, EF_.*, HLT_.*");
204 
205  for ( unsigned i=0 ; i<configuredChains.size() ; i++ ) {
206  m_provider->msg(MSG::VERBOSE) << "Chain " << configuredChains[i] << endmsg;
207  }
208 
209  }
210 
211 
213 
214  std::vector<ChainString> chains;
215 
219  while ( chainitr!=m_chainNames.end() ) {
220 
222  ChainString& chainName = (*chainitr);
223 
224  m_provider->msg(MSG::INFO) << "process chain " << chainName << endmsg;
225 
226  if ( chainName.head() == "" ) {
227 
228  std::string selectChain = chainName.raw();
229 
230  chains.push_back( ChainString(selectChain) );
231 
232  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
233  m_provider->msg(MSG::VERBOSE) << "Matching chain " << selectChain << " (" << chainName.head() << ")" << endmsg;
234  }
235 
236  }
237  else {
238 
240  std::vector<std::string> selectChains = (*(m_tdt))->getListOfTriggers( chainName.head() );
241 
242 
243  for ( unsigned iselected=0 ; iselected<selectChains.size() ; iselected++ ) {
244 
245  selectChains[iselected] = chainName.subs( selectChains[iselected] );
246 
247 #if 0
248  std::cout << "sorting:: chain specification: " << chainName << "\traw:" << chainName.raw() << std::endl;
249  std::cout << "\tchain: " << chainName.head() << std::endl;
250  std::cout << "\tkey: " << chainName.tail() << std::endl;
251  std::cout << "\troi: " << chainName.roi() << std::endl;
252  std::cout << "\tvtx: " << chainName.vtx() << std::endl;
253  std::cout << "\tte: " << chainName.element() << std::endl;
254  std::cout << "\tind: " << chainName.extra() << std::endl;
255 #endif
256 
258  chains.push_back( ChainString(selectChains[iselected]) );
259 
260  if(m_provider->msg().level() <= MSG::VERBOSE) {
261  m_provider->msg(MSG::VERBOSE) << "Matching chain " << selectChains[iselected] << " (" << chainName.head() << ")" << endmsg;
262  }
263 
264  }
265  }
266 
267  chainitr++;
268  }
269 
270  // m_chainNames.insert( m_chainNames.end(), chains.begin(), chains.end() );
272 
273  for ( unsigned ic=0 ; ic<m_chainNames.size() ; ic++ ) m_provider->msg(MSG::VERBOSE) << "Analyse chain " << m_chainNames[ic] << endmsg;
274 
275  }
276 
277 
280 
281  Filter_etaPT filter_etaPT(5,200);
282  Filter_Combined filter_truth( &filter_etaPT, &filter_etaPT);
283 
285  // Filter_Combined filterRef (&filter_offline, &filter_vertex);
286 
287  int iRefFilter = 1;
288  int iTestFilter = 0;
289 
290  if ( m_runPurity ) {
291  iRefFilter = 0;
292  iTestFilter = 1;
293  }
294 
295  Filter_Combined filterRef( m_filters[iRefFilter][0], &filter );
296  Filter_Combined filterTest( m_filters[iTestFilter][0], &filter );
297 
298  TrigTrackSelector selectorTruth( &filter_truth );
299  TrigTrackSelector selectorRef( &filterRef );
300  m_selectorRef = &selectorRef;
301  TrigTrackSelector selectorTest( &filterTest );
302  m_selectorTest = &selectorTest;
303 
304  if ( xbeam!=0 || ybeam!=0 ) {
305  m_selectorRef->setBeamline( xbeam, ybeam );
306  }
307 
309 
310  // clear the ntuple TIDA::Event class
311  m_event->clear();
312 
314 #ifndef XAODTRACKING_TRACKPARTICLE_H
315  const EventInfo* pEventInfo;
316 #else
317  const xAOD::EventInfo* pEventInfo;
318 #endif
319  unsigned run_number = 0;
320  uint64_t event_number = 0;
321  unsigned lumi_block = 0;
322  unsigned bunch_crossing_id = 0;
323  unsigned time_stamp = 0;
324  double mu_val = 0;
325 
326  if ( this->template retrieve(pEventInfo, "EventInfo").isFailure() ) {
327  m_provider->msg(MSG::WARNING) << "Failed to get EventInfo " << endmsg;
328  } else {
329 
330 #ifndef XAODTRACKING_TRACKPARTICLE_H
331  run_number = pEventInfo->event_ID()->run_number();
332  event_number = pEventInfo->event_ID()->event_number();
333  lumi_block = pEventInfo->event_ID()->lumi_block();
334  time_stamp = pEventInfo->event_ID()->time_stamp();
335  bunch_crossing_id = pEventInfo->event_ID()->bunch_crossing_id();
336  mu_val = pEventInfo->averageInteractionsPerCrossing();
337 #else
338  run_number = pEventInfo->runNumber();
339  event_number = pEventInfo->eventNumber();
340  lumi_block = pEventInfo->lumiBlock();
341  time_stamp = pEventInfo->timeStamp();
342  bunch_crossing_id = pEventInfo->bcid();
343  mu_val = pEventInfo->averageInteractionsPerCrossing();
344 #endif
345  }
346 
347  if(m_provider->msg().level() <= MSG::VERBOSE){
348  m_provider->msg(MSG::VERBOSE) << "run " << run_number
349  << "\tevent " << event_number
350  << "\tlb " << lumi_block << endmsg;
351  }
352 
353  // m_provider->msg(MSG::INFO) << "run " << run_number
354  // << "\tevent " << event_number
355  // << "\tlb " << lumi_block << endmsg;
356 
357  // std::cout << "run " << run_number << "\tevent " << event_number << "\tlb " << lumi_block << std::endl;
358 
359 
360  // clear the ntuple TIDA::Event class
361  m_event->clear();
362 
364  m_event->event_number(event_number);
365  m_event->lumi_block(lumi_block);
366  m_event->time_stamp(time_stamp);
367  m_event->bunch_crossing_id(bunch_crossing_id);
368  m_event->mu(mu_val);
369 
372 
373  bool analyse = false;
374 
375  // Check HLTResult
376 
377  for ( unsigned ichain=0 ; ichain<m_chainNames.size() ; ichain++ ) {
378 
379  const std::string& chainname = m_chainNames[ichain].head();
380 
381  if ( chainname == "" ) analyse = true;
382  else {
383 
384  //Only for trigger chains
385  if ( chainname.find("L2") == std::string::npos &&
386  chainname.find("EF") == std::string::npos &&
387  chainname.find("HLT") == std::string::npos ) continue;
388 
389  if ( m_provider->msg().level() <= MSG::DEBUG ) {
390  m_provider->msg(MSG::DEBUG) << "Chain " << chainname
391  << "\tpass " << (*m_tdt)->isPassed(chainname)
392  << "\tpres " << (*m_tdt)->getPrescale(chainname) << endmsg;
393  }
394 
395  // std::cout << "Chain " << chainname << "\tpass " << (*m_tdt)->isPassed(chainname)
396  // << "\tpres " << (*m_tdt)->getPrescale(chainname) << std::endl;
397 
398  if ( (*(m_tdt))->isPassed(chainname) || (*(m_tdt))->getPrescale(chainname) ) analyse = true;
399 
400  }
401  }
402 
403  // Remove this code to skip on truncated HLT results
404  // Need to leave the code here for the time being however, since we will
405  // still need in the future a more robust test to achieve this same
406  // functionality
407  //
408  // if ( (*m_tdt)->ExperimentalAndExpertMethods().isHLTTruncated() ) {
409  // m_provider->msg(MSG::WARNING) << "HLTResult truncated, skipping event" << endmsg;
410  // return;
411  // }
412 
413  if ( !this->m_keepAllEvents && !analyse ) {
414  // m_provider->msg(MSG::VERBOSE) << "No chains passed unprescaled - not processing this event" << endmsg;
415  if(m_provider->msg().level() <= MSG::VERBOSE)
416  m_provider->msg(MSG::VERBOSE) << "No chains passed unprescaled - not processing this event" << endmsg;
417  return;
418  }
419 
421 
422  selectorTruth.clear();
423 
424  if(m_provider->msg().level() <= MSG::VERBOSE)
425  m_provider->msg(MSG::VERBOSE) << "MC Truth flag " << m_mcTruth << endmsg;
426 
427  const TrigInDetTrackTruthMap* truthMap = 0;
428 
429  if ( m_mcTruth ) {
430  if(m_provider->msg().level() <= MSG::VERBOSE ) m_provider->msg(MSG::VERBOSE) << "getting Truth" << endmsg;
431 
432  if ( this->template retrieve(truthMap, "TrigInDetTrackTruthMap").isFailure()) {
433  if(m_provider->msg().level() <= MSG::VERBOSE)
434  m_provider->msg(MSG::VERBOSE) << "TrigInDetTrackTruthMap not found" << endmsg;
435  m_hasTruthMap = false;
436  }
437  else {
438  if(m_provider->msg().level() <= MSG::VERBOSE)
439  m_provider->msg(MSG::VERBOSE) << "TrigInDetTrackTruthMap found" << endmsg;
440  m_hasTruthMap = true;
441  }
442  }
443 
444 
446 
447  std::vector<TIDA::Vertex> vertices;
448  std::vector<TIDA::Vertex> vertices_rec;
449 
450  std::vector<double> refbeamspot;
451  std::vector<double> testbeamspot;
452 
453 
454 
455 #ifndef XAODTRACKING_TRACKPARTICLE_H
456 
457  const VxContainer* primaryVtxCollection;
458 
459  if ( m_doOffline ) {
460  if ( m_provider->evtStore()->template contains<VxContainer>("VxPrimaryCandidate") ) {
461  if ( this->template retrieve(primaryVtxCollection, "VxPrimaryCandidate").isFailure()) {
462  if (m_provider->msg().level() <= MSG::WARNING) m_provider->msg(MSG::WARNING) << "Primary vertex container not found" << endmsg;
463  }
464  else {
465  VxContainer::const_iterator vtxitr = primaryVtxCollection->begin();
466  for ( ; vtxitr != primaryVtxCollection->end(); ++vtxitr) {
467  if ( (*vtxitr)->vxTrackAtVertex()->size()>0 ) {
468  vertices.push_back( TIDA::Vertex( (*vtxitr)->recVertex().position().x(),
469  (*vtxitr)->recVertex().position().y(),
470  (*vtxitr)->recVertex().position().z(),
471  0,0,0,
472  (*vtxitr)->vxTrackAtVertex()->size() ) );
473  }
474  }
475  }
476 
477  // filter_vertex.setVertex(vertices);
478  }
479  }
480 
481 #else
482 
483  //std::vector<TIDA::Vertex> vertices;
484 
485  m_provider->msg(MSG::VERBOSE) << "fetching AOD Primary vertex container" << endmsg;
486 
487  const xAOD::VertexContainer* xaodVtxCollection = 0;
488 
489  if ( this->template retrieve( xaodVtxCollection, "PrimaryVertices" ).isFailure()) {
490  if (m_provider->msg().level() <= MSG::WARNING) m_provider->msg(MSG::WARNING) << "xAOD Primary vertex container not found with key " << "PrimaryVertices" << endmsg;
491  }
492 
493  if ( xaodVtxCollection!=0 ) {
494 
495  m_provider->msg(MSG::VERBOSE) << "xAOD Primary vertex container " << xaodVtxCollection->size() << " entries" << endmsg;
496 
497  xAOD::VertexContainer::const_iterator vtxitr = xaodVtxCollection->begin();
498  for ( ; vtxitr != xaodVtxCollection->end(); vtxitr++ ) {
499  if ( (*vtxitr)->nTrackParticles()>0 && (*vtxitr)->vertexType()!=0 ) {
500  vertices.push_back( TIDA::Vertex( (*vtxitr)->x(),
501  (*vtxitr)->y(),
502  (*vtxitr)->z(),
504  (*vtxitr)->covariancePosition()(Trk::x,Trk::x),
505  (*vtxitr)->covariancePosition()(Trk::y,Trk::y),
506  (*vtxitr)->covariancePosition()(Trk::z,Trk::z),
507  (*vtxitr)->nTrackParticles(),
509  (*vtxitr)->chiSquared(),
510  (*vtxitr)->numberDoF() ) );
511  }
512  }
513  }
514 
515 
516 #endif
517 
518 
520 
521  if ( m_mcTruth ) {
522  m_event->addChain( "Truth" );
524  m_event->back().back().addTracks(selectorTruth.tracks());
525  }
526 
528 
529  if ( m_doOffline ) {
530  for ( unsigned i=0 ; i<vertices.size() ; i++ ) {
531  if(m_provider->msg().level() <= MSG::VERBOSE)
532  m_provider->msg(MSG::VERBOSE) << "vertex " << i << " " << vertices[i] << endmsg;
533  m_event->addVertex(vertices[i]);
534  }
535  }
536 
538 
539  // int Noff = 0;
540  std::vector<TIDA::Track*> offline_tracks;
541  std::vector<TIDA::Track*> electron_tracks;
542  std::vector<TIDA::Track*> muon_tracks;
543 
544  std::vector<TIDA::Track*> ref_tracks;
545  std::vector<TIDA::Track*> test_tracks;
546 
547  offline_tracks.clear();
548  electron_tracks.clear();
549  muon_tracks.clear();
550 
551  ref_tracks.clear();
552  test_tracks.clear();
553 
555  for ( unsigned ichain=0 ; ichain<m_chainNames.size() ; ichain++ ) {
556 
557  test_tracks.clear();
558 
560 
561  // std::string& chainname = chains[ichain];
562  const std::string& chainname = m_chainNames[ichain].head();
563  const std::string& key = m_chainNames[ichain].tail();
564  const std::string& vtx_name = m_chainNames[ichain].vtx();
565  //no currently used but retained in case
566  //const std::string& roi_name = m_chainNames[ichain].roi();
567  //const std::string& te_name = m_chainNames[ichain].element();
568 
569  m_pTthreshold = 0;
570 
571  if ( m_chainNames[ichain].postcount() ) {
572  std::string ptvalue = m_chainNames[ichain].postvalue("pt");
573  if ( ptvalue!="" ) m_pTthreshold = std::stod(ptvalue);
574  }
575 
576  // std::cout << "\tchain " << m_chainNames[ichain] << "\tchainname " << chainname << "\tvtx " << vtx_name << "\troi " << roi_name << std::endl;
577 
578  unsigned _decisiontype = TrigDefs::Physics;
579  unsigned decisiontype;
580 
581  if ( this->requireDecision() ) _decisiontype = TrigDefs::requireDecision;
582 
583 
584  if ( m_chainNames[ichain].passed() ) decisiontype = _decisiontype;
585  else decisiontype = TrigDefs::alsoDeactivateTEs;
586 
587  // if ( decisiontype==TrigDefs::requireDecision ) std::cout << "\tSUTT TrigDefs::requireDecision " << decisiontype << std::endl;
588  // if ( decisiontype==TrigDefs::Physics ) std::cout << "\tSUTT TrigDefs::Physics " << decisiontype << std::endl;
589 
590 
592  const std::string& key_index_string = m_chainNames[ichain].extra();
593  unsigned key_index = 0;
594  if ( key_index_string!="" ) key_index = std::atoi( key_index_string.c_str() );
595 
596  if ( chainname!="" && m_provider->msg().level() <= MSG::VERBOSE ) {
597 
598  m_provider->msg(MSG::VERBOSE) << "status for chain " << chainname
599  << "\tpass " << (*m_tdt)->isPassed(chainname)
600  << "\tprescale " << (*m_tdt)->getPrescale(chainname) << endmsg;
601 
602  m_provider->msg(MSG::VERBOSE) << "fetching features for chain " << chainname << endmsg;
603 
604  m_provider->msg(MSG::VERBOSE) << chainname << "\tpassed: " << (*m_tdt)->isPassed( chainname ) << endmsg;
605  }
606 
607  // std::cout << "\tstatus for chain " << chainname
608  // << "\tpass " << (*m_tdt)->isPassed( chainname )
609  // << "\tpassdt " << (*m_tdt)->isPassed( chainname, decisiontype )
610  // << "\tprescale " << (*m_tdt)->getPrescale( chainname ) << std::endl;
611 
612 
613  // m_provider->msg(MSG::INFO) << chainname << "\tpassed: " << (*m_tdt)->isPassed( chainname ) << "\t" << m_chainNames[ichain] << "\trun " << run_number << "\tevent " << event_number << endmsg;
614 
615 
616  if ( chainname!="" && !this->m_keepAllEvents && !(*m_tdt)->isPassed( chainname, decisiontype ) ) continue;
617 
620  // Trig::FeatureContainer f = (*m_tdt)->features( chainname, TrigDefs::alsoDeactivateTEs);
621 
624 
625  ChainString& chainConfig = m_chainNames[ichain];
626 
627  std::string chainName = chainConfig.head();
628 
629  m_event->addChain( chainConfig );
630 
632 
633  if ( chainName == "" ) {
634 
636 
638 
639  TIDARoiDescriptor* roiInfo = new TIDARoiDescriptor(true);
640 
641  chain.addRoi( *roiInfo );
642 
643 
644 # ifdef XAODTRACKING_TRACKPARTICLE_H
645  if ( m_provider->evtStore()->template contains<xAOD::TrackParticleContainer>(key) ) {
646  this->template selectTracks<xAOD::TrackParticleContainer>( m_selectorTest, key );
647  refbeamspot = this->template getBeamspot<xAOD::TrackParticleContainer>( key );
648  }
649 # endif
650 
651  const std::vector<TIDA::Track*>& testtracks = m_selectorTest->tracks();
652 
653  chain.back().addTracks(testtracks);
654 
655  if ( roiInfo ) delete roiInfo;
656 
657  }
658  else {
659 
660  Trig::FeatureContainer f = (*m_tdt)->features( chainname, decisiontype );
661  Trig::FeatureContainer::combination_const_iterator c(f.getCombinations().begin());
662  Trig::FeatureContainer::combination_const_iterator cEnd(f.getCombinations().end());
663 
664 
665  if ( c==cEnd ) {
666  if(m_provider->msg().level() <= MSG::VERBOSE){
667  m_provider->msg(MSG::VERBOSE) << "No combinations: skipping this chain " << chainname << endmsg;
668  }
669  continue;
670  }
671 
672  if(m_provider->msg().level() <= MSG::VERBOSE) {
673  m_provider->msg(MSG::VERBOSE) << "combinations for chain " << chainname << " " << (cEnd-c) << endmsg;
674  }
675 
676  unsigned icomb = 0;
677 
678  for( ; c!=cEnd ; ++c ) {
679 
680  icomb++;
681 
682  // now add rois to this ntuple chain
683 
684  // Get seeding RoI
685  // std::vector< Trig::Feature<TrigRoiDescriptor> > initRois = c->get<TrigRoiDescriptor>("initialRoI", TrigDefs::alsoDeactivateTEs);
686  // std::vector< Trig::Feature<TrigRoiDescriptor> > initRois = c->get<TrigRoiDescriptor>("forID", TrigDefs::alsoDeactivateTEs);
687 
688  std::vector< Trig::Feature<TrigRoiDescriptor> > initRois;
689 
690  std::string roi_key = m_chainNames[ichain].roi();
691 
692  if ( roi_key=="SuperRoi" && icomb>1 ) continue;
693 
694  if ( roi_key!="" ) {
695  initRois = c->get<TrigRoiDescriptor>(roi_key, decisiontype );
696  }
697  else {
698  initRois = c->get<TrigRoiDescriptor>("forID", decisiontype );
699  if ( initRois.empty() ) initRois = c->get<TrigRoiDescriptor>("", decisiontype );
700  if ( initRois.empty() ) initRois = c->get<TrigRoiDescriptor>("initialRoI", decisiontype );
701  }
702 
703  // std::cout << "initRois.size() " << initRois.size() << std::endl;
704 
705  if ( initRois.empty() ) continue;
706 
707 
708  // for ( unsigned ir=0 ; ir<initRois.size() ; ir++ ) {
709  // std::cout << "\t" << ir << "\t" << *initRois[ir].cptr() << std::endl;
710  // }
711 
712  // Skip chains seeded by multiple RoIs: not yet implemented
713  if(initRois.size()>1 && roi_key!="SuperRoi" ) {
714  if(m_provider->msg().level() <= MSG::VERBOSE)
715  m_provider->msg(MSG::VERBOSE) << " More than one initial RoI found for seeded chain " << chainname << ": not yet supported" << endmsg;
716  continue;
717  }
718 
719  TIDARoiDescriptor* roiInfo = 0;
720 
721  if( !initRois.empty() ) {
722  const TrigRoiDescriptor* roid = initRois[0].cptr();
723 
724  if(m_provider->msg().level() <= MSG::VERBOSE)
725  m_provider->msg(MSG::VERBOSE) << " RoI descriptor for seeded chain " << chainname << " " << *roid << endmsg;
726 
727  roiInfo = new TIDARoiDescriptor(TIDARoiDescriptorBuilder(*roid));
728  // roiInfo->etaHalfWidth(m_roiInfo->etaHalfWidth());
729  // roiInfo->phiHalfWidth(m_roiInfo->phiHalfWidth());
730  // roiInfo->etaHalfWidth(roid->etaHalfWidth());
731  // roiInfo->phiHalfWidth(roid->phiHalfWidth());
732  // roiInfo->zedHalfWidth(roid->zedHalfWidth());
733 
734  if(m_provider->msg().level() <= MSG::VERBOSE)
735  m_provider->msg(MSG::VERBOSE) << "using chain roi " << *roid << endmsg;
736 
737  }
738  else {
739  roiInfo = new TIDARoiDescriptor();
740  // roiInfo->etaHalfWidth(5);
741  // roiInfo->phiHalfWidth(M_PI);
742  // roiInfo->zedHalfWidth(m_roiInfo->zedHalfWidth());
743 
744  if(m_provider->msg().level() <= MSG::WARNING)
745  m_provider->msg(MSG::WARNING) << "roi not found" << endmsg;
746 
747  }
748 
749  if(m_provider->msg().level() <= MSG::VERBOSE) m_provider->msg(MSG::VERBOSE) << *roiInfo << endmsg;
750 
752 
753  m_provider->msg(MSG::VERBOSE) << "Searching for collection " << key << endmsg;
754  // std::cout << "Searching for collection " << key << std::endl;
755 
757  if ( key.find("InDetTrigParticleCreation")!=std::string::npos ||
758  key.find("_IDTrig")!=std::string::npos ||
759  key.find("_EFID")!=std::string::npos ||
760  chainName.find("EF_")!=std::string::npos ||
761  chainName.find("HLT_")!=std::string::npos ) {
762 # ifdef XAODTRACKING_TRACKPARTICLE_H
763  if ( this->template selectTracks<xAOD::TrackParticleContainer>( m_selectorTest, c, key ) ) testbeamspot = this->template getBeamspot<xAOD::TrackParticleContainer>( c, key );
764  else if ( this->template selectTracks<Rec::TrackParticleContainer>( m_selectorTest, c, key ) );
765 # else
766  if ( this->template selectTracks<Rec::TrackParticleContainer>( m_selectorTest, c, key ) );
767 # endif
768  else if ( this->template selectTracks<TrackCollection>( m_selectorTest, c, key ) );
769  else if ( this->template selectTracks<TrigInDetTrackCollection>( m_selectorTest, c, truthMap, key, key_index ) );
770  else {
771  //m_provider->msg(MSG::WARNING) << "No track collection " << key << " found" << endmsg;
772  }
773  }
774  else {
776  if ( chainName.find("L2_")!=std::string::npos ) {
777  if ( this->template selectTracks<TrigInDetTrackCollection>( m_selectorTest, c, truthMap, key, key_index ) );
778  else if ( this->template selectTracks<Rec::TrackParticleContainer>( m_selectorTest, c, key ) );
779  else if ( this->template selectTracks<TrackCollection>( m_selectorTest, c, key ) );
780 # ifdef XAODTRACKING_TRACKPARTICLE_H
781  else if ( this->template selectTracks<xAOD::TrackParticleContainer>( m_selectorTest, c, key ) ) testbeamspot = this->template getBeamspot<xAOD::TrackParticleContainer>( c, key );
782 # endif
783  else m_provider->msg(MSG::WARNING) << "No track collection " << key << " found" << endmsg;
784  }
785  }
786 
787 
788  const std::vector<TIDA::Track*>& testtracks = m_selectorTest->tracks();
789 
790  m_provider->msg(MSG::VERBOSE) << "test tracks.size() " << testtracks.size() << endmsg;
791  // std::cout << "test tracks.size() " << testtracks.size() << std::endl;
792 
793  // std::cout << "\ttest tracks.size() " << testtracks.size() << std::endl;
794 
795  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
796  m_provider->msg(MSG::VERBOSE) << "test tracks.size() " << testtracks.size() << endmsg;
797  for ( int ii=testtracks.size() ; ii-- ; ) {
798  m_provider->msg(MSG::VERBOSE) << " test track " << ii << " " << *testtracks[ii] << endmsg;
799  //test_tracks.push_back(testtracks.at(ii));
800  }
801  }
802 
803  chain.addRoi( *roiInfo );
804 
805  chain.back().addTracks(testtracks);
806 
807  if ( roiInfo ) delete roiInfo;
808 
810 
812 
813  // std::cout << "vertex " << vtx_name << "\tchain " << chainName << "\tconfig " << chainConfig << std::endl;
814 
815  if ( vtx_name!="" ) {
816 
817  m_provider->msg(MSG::VERBOSE) << "\tFetch xAOD::VertexContainer for chain " << chainConfig << " with key " << vtx_name << endmsg;
818 
819  std::vector< Trig::Feature<xAOD::VertexContainer> > xaodtrigvertices = c->get<xAOD::VertexContainer>(vtx_name);
820 
821  if ( xaodtrigvertices.empty() ) {
822  if ( m_provider->msg().level() <= MSG::DEBUG ) {
823  m_provider->msg(MSG::WARNING) << "\tNo xAOD::VertexContainer for chain " << chainConfig << " for key " << vtx_name << endmsg;
824  }
825  }
826  else {
827 
828  m_provider->msg(MSG::VERBOSE) << "\txAOD::VertexContainer found with size " << xaodtrigvertices.size() << "\t" << vtx_name << endmsg;
829 
830  for ( unsigned iv=0 ; iv<xaodtrigvertices.size() ; iv++ ) {
831 
832  const xAOD::VertexContainer* vert = xaodtrigvertices[iv].cptr();
833 
834  m_provider->msg(MSG::VERBOSE) << "\t" << iv << " xAOD VxContainer for " << chainConfig << " " << vert << " key " << vtx_name << endmsg;
835 
837 
838  for ( ; vtxitr != vert->end(); ++vtxitr) {
841  // if ( ( (*vtxitr)->nTrackParticles()>0 && (*vtxitr)->vertexType()!=0 ) || vtx_name=="EFHistoPrmVtx" ) {
842  if ( (*vtxitr)->vertexType()!=0 || vtx_name=="EFHistoPrmVtx" ) {
843  chain.back().addVertex( TIDA::Vertex( (*vtxitr)->x(),
844  (*vtxitr)->y(),
845  (*vtxitr)->z(),
847  (*vtxitr)->covariancePosition()(Trk::x,Trk::x),
848  (*vtxitr)->covariancePosition()(Trk::y,Trk::y),
849  (*vtxitr)->covariancePosition()(Trk::z,Trk::z),
850  (*vtxitr)->nTrackParticles(),
852  (*vtxitr)->chiSquared(),
853  (*vtxitr)->numberDoF() ) );
854 
855  }
856  }
857  }
858 
859  }
860 
861  }
862 
863  }
864 
865  }
866 
867 
868  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
869  m_provider->msg(MSG::VERBOSE) << "event: " << *m_event << endmsg;
870  }
871 
873 
874  for ( unsigned iroi=0 ; iroi<chain.size() ; iroi++ ) {
875 
876  m_selectorRef->clear();
877 
878  if ( this->filterOnRoi() ) {
879  filterRef.setRoi( &chain.rois().at(iroi).roi() );
880  filterRef.containtracks( m_containTracks );
881  }
882  else filterRef.setRoi( 0 );
883 
884  test_tracks.clear();
885 
886 
900 
901  if ( m_provider->msg().level() <= MSG::VERBOSE )
902  m_provider->msg(MSG::VERBOSE) << "MC Truth flag " << m_mcTruth << endmsg;
903 
904  bool foundTruth = false;
905 
906  if ( !m_doOffline && m_mcTruth ) {
907 
908  if ( this->filterOnRoi() ) filter_truth.setRoi( &chain.rois().at(iroi).roi() );
909  else filter_truth.setRoi( 0 ); // don't filter on RoI unless needed
910 
911  selectorTruth.clear();
912 
913  if ( m_provider->msg().level() <= MSG::VERBOSE )
914  m_provider->msg(MSG::VERBOSE) << "getting Truth" << endmsg;
915 
916  if ( m_provider->evtStore()->template contains<TruthParticleContainer>("INav4MomTruthEvent") ) {
917  //ESD
918  this->template selectTracks<TruthParticleContainer>( &selectorTruth, "INav4MomTruthEvent" );
919  foundTruth = true;
920  }
921  else if ( m_provider->evtStore()->template contains<TruthParticleContainer>("SpclMC") ) {
923  this->template selectTracks<TruthParticleContainer>( &selectorTruth, "SpclMC");
924  foundTruth = true;
925  }
926  else if ( m_provider->evtStore()->template contains<TruthParticleContainer>("") ) {
928  this->template selectTracks<TruthParticleContainer>( &selectorTruth, "");
929  foundTruth = true;
930  }
931  else
932  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
933  m_provider->msg(MSG::VERBOSE) << "Truth not found - none whatsoever!" << endmsg;
934  }
935  }
936 
937 
938  if ( !m_doOffline && m_mcTruth && !foundTruth ) {
939 
940  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
941  m_provider->msg(MSG::VERBOSE) << "getting Truth" << endmsg;
942  }
943 
945 
946  const DataHandle<McEventCollection> mcevent;
947 
949 
950  std::string keys[4] = { "GEN_AOD", "TruthEvent", "", "G4Truth" };
951 
952  std::string key = "";
953 
954  bool foundcollection = false;
955 
956  for ( int ik=0 ; ik<4 ; ik++ ) {
957 
958  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
959  m_provider->msg(MSG::VERBOSE) << "Try McEventCollection: " << keys[ik] << endmsg;
960  }
961 
962  if ( !m_provider->evtStore()->template contains<McEventCollection>(keys[ik]) ) {
963  if( m_provider->msg().level() <= MSG::VERBOSE )
964  m_provider->msg(MSG::VERBOSE) << "No McEventCollection: " << keys[ik] << endmsg;
965  continue;
966  }
967 
968  if ( m_provider->msg().level() <= MSG::VERBOSE )
969  m_provider->msg(MSG::VERBOSE) << "evtStore()->retrieve( mcevent, " << keys[ik] << " )" << endmsg;
970 
971  if ( this->template retrieve( mcevent, keys[ik] ).isFailure() ) {
972  if ( m_provider->msg().level() <= MSG::VERBOSE )
973  m_provider->msg(MSG::VERBOSE) << "Failed to get McEventCollection: " << keys[ik] << endmsg;
974  }
975  else {
977  key = keys[ik];
978  if(m_provider->msg().level() <= MSG::VERBOSE)
979  m_provider->msg(MSG::VERBOSE) << "Found McEventCollection: " << key << endmsg;
980  foundcollection = true;
981  break;
982  }
983  }
984 
986  if ( !foundcollection ) {
987  if(m_provider->msg().level() <= MSG::VERBOSE)
988  m_provider->msg(MSG::WARNING) << "No MC Truth Collections of any sort, whatsoever!!!" << endmsg;
989 
990  // m_tree->Fill();
991  // return StatusCode::FAILURE;
992 
993  return;
994  }
995 
996  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
997  m_provider->msg(MSG::VERBOSE) << "Found McEventCollection: " << key << "\tNevents " << mcevent->size() << endmsg;
998  }
999 
1000  McEventCollection::const_iterator evitr = mcevent->begin();
1001  McEventCollection::const_iterator evend = mcevent->end();
1002 
1003  unsigned ie = 0;
1004  unsigned ip = 0;
1005 
1006  unsigned ie_ip = 0;
1007 
1008  while ( evitr!=evend ) {
1009 
1010  int _ip = 0;
1011 
1012  int pid = HepMC::signal_process_id((*evitr));
1013 
1014  //The logic should be clarified here
1015  if ( pid!=0 ) {
1016 
1017  for (auto pitr: *(*evitr)) {
1018 
1019  selectorTruth.selectTrack( pitr );
1020 
1021  ++_ip;
1022 
1023  }
1024 
1025  }
1026  ++ie;
1027  ++evitr;
1028 
1029  if ( _ip>0 ) {
1031  // m_provider->msg(MSG::VERBOSE) << "Found " << ie << "\tpid " << pid << "\t with " << ip << " TruthParticles (GenParticles)" << endmsg;
1032  ++ie_ip;
1033  ip += _ip;
1034  }
1035  }
1036 
1037  if(m_provider->msg().level() <= MSG::VERBOSE){
1038  m_provider->msg(MSG::VERBOSE) << "Found " << ip << " TruthParticles (GenParticles) in " << ie_ip << " GenEvents out of " << ie << endmsg;
1039  m_provider->msg(MSG::VERBOSE) << "selected " << selectorTruth.size() << " TruthParticles (GenParticles)" << endmsg;
1040  }
1041 
1042  if(selectorTruth.size() > 0) foundTruth = true;
1043 
1044  if ( !(ip>0) ) {
1045  if (m_provider->msg().level() <= MSG::VERBOSE) m_provider->msg(MSG::WARNING) << "NO TRUTH PARTICLES - returning" << endmsg;
1046  return;
1047  }
1048 
1049  }
1050 
1052 
1053  // m_provider->msg(MSG::VERBOSE) << " Offline tracks " << endmsg;
1054 
1055  if ( m_doOffline ) {
1056 
1057 # ifdef XAODTRACKING_TRACKPARTICLE_H
1058  if ( m_provider->evtStore()->template contains<xAOD::TrackParticleContainer>("InDetTrackParticles") ) {
1059  this->template selectTracks<xAOD::TrackParticleContainer>( m_selectorRef, "InDetTrackParticles" );
1060  refbeamspot = this->template getBeamspot<xAOD::TrackParticleContainer>( "InDetTrackParticles" );
1061  }
1062  else if (m_provider->evtStore()->template contains<Rec::TrackParticleContainer>("TrackParticleCandidate") ) {
1063  this->template selectTracks<Rec::TrackParticleContainer>( m_selectorRef, "TrackParticleCandidate" );
1064  }
1065 # else
1066  if (m_provider->evtStore()->template contains<Rec::TrackParticleContainer>("TrackParticleCandidate") ) {
1067  this->template selectTracks<Rec::TrackParticleContainer>( m_selectorRef, "TrackParticleCandidate" );
1068  }
1069 # endif
1070  else if ( m_provider->msg().level() <= MSG::WARNING ) {
1071  m_provider->msg(MSG::WARNING) << " Offline tracks not found " << endmsg;
1072  }
1073 
1074  ref_tracks = m_selectorRef->tracks();
1075 
1076  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
1077  m_provider->msg(MSG::VERBOSE) << "ref tracks.size() " << m_selectorRef->tracks().size() << endmsg;
1078  for ( int ii=m_selectorRef->tracks().size() ; ii-- ; ) {
1079  m_provider->msg(MSG::VERBOSE) << " ref track " << ii << " " << *m_selectorRef->tracks()[ii] << endmsg;
1080  }
1081  }
1082 
1083  }
1084  else {
1086  if ( m_mcTruth && foundTruth ){
1087  ref_tracks=selectorTruth.tracks();
1088  }
1089  }
1090 
1091 
1092 
1093  test_tracks.clear();
1094 
1095  for ( unsigned itrk=0 ; itrk<chain.rois().at(iroi).tracks().size() ; itrk++ ) {
1096  test_tracks.push_back(&(chain.rois().at(iroi).tracks().at(itrk)));
1097  }
1098 
1099 
1100  // std::cout << "sutt track multiplicities: offline " << offline_tracks.size() << "\ttest " << test_tracks.size() << std::endl;
1101 
1102  _analysis->setvertices( vertices.size() );
1103 
1104  if ( refbeamspot.size()>0 ) _analysis->setBeamRef( refbeamspot );
1105  if ( testbeamspot.size()>0 ) _analysis->setBeamTest( testbeamspot );
1106 
1109 
1110  if ( m_runPurity ) {
1111 
1112  if ( this->getUseHighestPT() ) HighestPTOnly( test_tracks );
1113 
1114  if ( m_pTthreshold>0 ) FilterPT( test_tracks, m_pTthreshold );
1115 
1117  m_NRois++;
1118  m_NRefTracks += test_tracks.size();
1119  m_NTestTracks += ref_tracks.size();
1120 
1122  m_associator->match( test_tracks, ref_tracks );
1123 
1124  _analysis->execute( test_tracks, ref_tracks, m_associator );
1125 
1126  }
1127  else {
1128 
1130 
1131  if ( this->getUseHighestPT() ) HighestPTOnly( ref_tracks );
1132 
1134 
1135  if ( m_pTthreshold>0 ) FilterPT( ref_tracks, m_pTthreshold );
1136 
1138  m_NRois++;
1139  m_NRefTracks += ref_tracks.size();
1140  m_NTestTracks += test_tracks.size();
1141 
1143  m_associator->match( ref_tracks, test_tracks );
1144 
1145  // std::cout << "SUTT: execute : N tracks " << ref_tracks.size() << " " << test_tracks.size() << std::endl;
1146 
1147  _analysis->setroi( &chain.rois().at(iroi).roi() );
1148  _analysis->execute( ref_tracks, test_tracks, m_associator );
1149 
1150  // std::cout << "chain " << m_chainNames[ichain] << " " << "\tvtx name " << vtx_name << std::endl;
1151 
1152  if ( vtx_name!="" ) {
1154  std::vector<TIDA::Vertex> vr = chain.rois().at(iroi).vertices();
1155  std::vector<TIDA::Vertex*> vtx_rec;
1156  for ( unsigned iv=0 ; iv<vr.size() ; iv++ ) vtx_rec.push_back( &vr[iv] );
1157 
1158  std::vector<TIDA::Vertex*> vtx;
1159  if ( this->getVtxIndex()<0 ) {
1160  for ( unsigned iv=0 ; iv<vertices.size() ; iv++ ) vtx.push_back( &vertices[iv] );
1161  }
1162  else {
1163  if ( vertices.size()>unsigned(this->getVtxIndex()) ) vtx.push_back( &vertices[this->getVtxIndex()] );
1164  }
1165 
1166  _analysis->execute_vtx( vtx, vtx_rec, m_event );
1167  }
1168 
1169  }
1170 
1171  if ( _analysis->debug() ) {
1172  m_provider->msg(MSG::INFO) << "Missing track for " << m_chainNames[ichain]
1173  << "\trun " << run_number
1174  << "\tevent " << event_number
1175  << "\tlb " << lumi_block << endmsg;
1176  }
1177 
1178  }
1179 
1180  }
1181 
1182  if ( m_provider->msg().level() <= MSG::VERBOSE ) {
1183  m_provider->msg(MSG::VERBOSE) << "\n\nEvent " << *m_event << endmsg;
1184  }
1185  }

◆ mcTruth()

bool T_AnalysisConfig< T >::mcTruth
inlineinherited

Definition at line 259 of file T_AnalysisConfig.h.

259 { return m_mcTruth; }

◆ name()

const std::string T_AnalysisConfig< T >::name
inlineinherited

Definition at line 233 of file T_AnalysisConfig.h.

233 {return m_analysisInstanceName;}

◆ processElectrons()

unsigned T_AnalysisConfig< T >::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" 
)
inlineprotectedinherited

select offline electrons

Definition at line 701 of file T_AnalysisConfig.h.

711  {
712 
713  m_provider->msg(MSG::DEBUG) << "Fetching offline electrons: " << containerName << endmsg;
714 
715  selectorRef.clear();
716 
717 # ifdef XAODTRACKING_TRACKPARTICLE_H
719 # else
721 # endif
722 
723 
724  const Container* container = 0;
725 
726  if( ! m_provider->evtStore()->template contains<Container>(containerName) ) {
727  m_provider->msg(MSG::WARNING) << "Error No Electron Container " << containerName << " !" << endmsg;
728  return 0;
729  }
730 
731  StatusCode sc = retrieve( container, containerName);
732  if( sc.isFailure() || !container ) {
733  m_provider->msg(MSG::WARNING) << "Error retrieving container: " << containerName << " !" << endmsg;
734  return 0;
735  }
736 
737  m_provider->msg(MSG::DEBUG) << "Event with " << container->size() << " Electron object(s) " << endmsg;
738 
739  Container::const_iterator elec = container->begin();
740  Container::const_iterator elec_end = container->end();
741 
742  for( ; elec!=elec_end ; ++elec ){
743  //m_provider->msg(MSG::DEBUG) << " Electron " << (*elec)
744  // << ", eta " << (*elec)->eta()
745  // << ", phi " << (*elec)->phi()
746  // << ", ET " << (*elec)->pt()
747  // << ", author " << (*elec)->author()
748  // << ", trackParticle " << (*elec)->trackParticle()
749  // << ", conversion " << (*elec)->conversion()
750  // << ", mediumPP " << ((*elec)->isem(egammaPID::ElectronMediumPP)==0)
751  // << endmsg;
752 
753  bool good_electron = false;
754 # ifdef XAODTRACKING_TRACKPARTICLE_H
755  good_electron = TIDA::isGoodOffline( *(*elec), selection, ETOffline );
756 # else
757  good_electron = TIDA::isGoodOffline( *(*elec));
758 # endif
759 
760  if (good_electron) {
761  const xAOD::Electron_v1& eleduff = *(*elec);
762  long unsigned eleid = (unsigned long)(&eleduff) ;
763  TrackTrigObject eleobj = TrackTrigObject( (*elec)->eta(),
764  (*elec)->phi(),
765  (*elec)->pt(),
766  0,
767  (*elec)->type(),
768  eleid );
769 
770  bool trk_added ;
771  if ( raw_track ) trk_added = selectorRef.selectTrack( xAOD::EgammaHelpers::getOriginalTrackParticle( *elec ) );
772  else trk_added = selectorRef.selectTrack( (*elec)->trackParticle() );
773 
774  if (trk_added) eleobj.addChild( selectorRef.tracks().back()->id() );
775  if (elevec) elevec->push_back( eleobj );
776  }
777  }
778 
779  return selectorRef.tracks().size();
780  }

◆ processMuons()

unsigned T_AnalysisConfig< T >::processMuons ( TrigTrackSelector selectorRef,
const unsigned int  selection = 0,
double  ETOffline = 0,
const std::string &  containerName = "StacoMuonCollection" 
)
inlineprotectedinherited

select offlinqe muons

Definition at line 787 of file T_AnalysisConfig.h.

794  {
795 
796 # ifdef XAODTRACKING_TRACKPARTICLE_H
798 # else
800 # endif
801 
802  m_provider->msg(MSG::DEBUG) << " Offline muons (" << containerName << ")" << endmsg;
803 
804  selectorRef.clear();
805 
806  const Container* container = 0;
807 
808  if( ! m_provider->evtStore()->template contains<Container>(containerName) ) {
809  m_provider->msg(MSG::WARNING) << "Error No MuonCollection" << containerName << " !" << endmsg;
810  return 0;
811  }
812 
813  StatusCode sc = retrieve( container, containerName );
814  if( sc.isFailure() || !container ) {
815  m_provider->msg(MSG::WARNING) << "Error retrieving " << containerName << " !" << endmsg;
816  return 0;
817  }
818 
819  auto muon = container->begin();
820  auto muon_end = container->end();
821 
822  // std::cout << "SUTT Offline muons " << container->size() << "\t threshold " << ETOffline << std::endl;
823 
824  for( ; muon!=muon_end ; ++muon ){
825 # ifdef XAODTRACKING_TRACKPARTICLE_H
826  if ( TIDA::isGoodOffline(*(*muon), selection, ETOffline ) ) selectorRef.selectTrack(*((*muon)->inDetTrackParticleLink()));
827 # else
828  if ( TIDA::isGoodOffline(*(*muon)) ) selectorRef.selectTrack((*muon)->inDetTrackParticle());
829 # endif
830  }
831 
832 
833  // std::cout << "SUTT found " << selectorRef.tracks().size() << " muons for " << containerName << std::endl;
834  m_provider->msg(MSG::DEBUG) << "found " << selectorRef.tracks().size() << " muons for " << containerName << endmsg;
835 
836  return selectorRef.tracks().size();
837 }

◆ processTaus()

unsigned T_AnalysisConfig< T >::processTaus ( TrigTrackSelector selectorRef,
std::vector< TrackTrigObject > *  tauvec = 0,
const unsigned  selection = 0,
int  requireNtracks = 0,
double  EtCutOffline = 0,
const std::string &  containerName = "TauRecContainer" 
)
inlineprotectedinherited

select offline taus

Definition at line 844 of file T_AnalysisConfig.h.

854  {
855 
856 # ifdef XAODTRACKING_TRACKPARTICLE_H
858 # else
860 # endif
861 
862  selectorRef.clear();
863 
864  const Container* container = 0;
865 
866  selectorRef.clear();
867 
868  m_provider->msg(MSG::DEBUG) << " Offline taus " << containerName << endmsg;
869 
870  if ( !m_provider->evtStore()->template contains<Container>(containerName)) {
871  m_provider->msg(MSG::WARNING) << " Offline taus not found" << endmsg;
872  return 0;
873  }
874 
875  StatusCode sc = retrieve( container, containerName);
876  if (sc != StatusCode::SUCCESS) {
877  m_provider->msg(MSG::WARNING) << " Offline tau retrieval not successful" << endmsg;
878  return 0;
879  }
880 
881  Container::const_iterator tau = container->begin();
882  Container::const_iterator tau_end = container->end();
883 
884 
885  for ( ; tau!=tau_end ; ++tau ) {
886 
887 # ifdef XAODTRACKING_TRACKPARTICLE_H
888  // unsigned N = (*tau)->nTracks();
889 
890 # ifndef XAODTAU_VERSIONS_TAUJET_V3_H
891  int N = (*tau)->nTracks();
892  // std::cout << "SUTT no tau detail " << N << "\t3prong: " << doThreeProng << std::endl;
893 # else
894  int N=0;
895  (*tau)->detail( xAOD::TauJetParameters::nChargedTracks, N );
896  // std::cout << "SUTT tau detail: N " << N << "\t3prong: " << doThreeProng << std::endl;
897 # endif
898 
899 # else
900  unsigned N = (*tau)->numTrack();
901 # endif
902 
903 
904  bool good_tau = false;
905 # ifdef XAODTRACKING_TRACKPARTICLE_H
906  good_tau = TIDA::isGoodOffline( *(*tau), selection, requireNtracks, EtCutOffline );
907 # else
908  good_tau = TIDA::isGoodOffline( *(*tau), requireNtracks, EtCutOffline );
909 # endif
910 
911  // std::cout << "SUTT tau ntracks: " << N << "\tgoodtau: " << good_tau << "\tpt: " << (*tau)->p4().Et() << "\t3prong: " << doThreeProng << std::endl;
912 
913  if (good_tau){
914  const xAOD::TauJet_v3& duff = *(*tau);
915  long unsigned tauid = (unsigned long)(&duff) ;
916  TrackTrigObject tauobj = TrackTrigObject( (*tau)->eta(),
917  (*tau)->phi(),
918  (*tau)->pt(),
919  0,
920  (*tau)->type(),
921  tauid );
922 
923  bool trk_added = false;
924 
925  for ( unsigned i=N ; i-- ; ) {
926 # ifdef XAODTAU_TAUTRACK_H
927 
928  std::vector< ElementLink<xAOD::TrackParticleContainer> > alink = (*tau)->track(i)->trackLinks();
929 
930  trk_added = false;
931 
932  for ( size_t ilink=0 ; ilink<alink.size() ; ilink++ ) {
933  if ( alink[ilink].isValid() ) trk_added = selectorRef.selectTrack((*alink[ilink]));
934  }
936  // trk_added = selectorRef.selectTrack((*tau)->track(i)->track());
938 # else
939  trk_added = selectorRef.selectTrack((*tau)->track(i));
940 # endif
941  if ( trk_added ) tauobj.addChild( selectorRef.tracks().back()->id() );
942  }
943  if ( tauvec ) tauvec->push_back( tauobj );
944  }
945  }
946 
947  return selectorRef.tracks().size();
948 
949 }

◆ referenceChains()

const std::string T_AnalysisConfig< T >::referenceChains
inlineinherited

Definition at line 242 of file T_AnalysisConfig.h.

242  {
243  std::string name;
244  for(unsigned int i=0; i<m_chainNames[1].size(); i++)
245  name += (m_chainNames[1][i]+"::"+m_types[1][i]+"::"+m_keys[1][i]+" ");
246  return name;
247  }

◆ releaseData() [1/2]

std::string T_AnalysisConfig< T >::releaseData
inlineinherited

Definition at line 271 of file T_AnalysisConfig.h.

271 { return m_releaseData; }

◆ releaseData() [2/2]

void T_AnalysisConfig< T >::releaseData ( const std::string &  s)
inlineinherited

Definition at line 272 of file T_AnalysisConfig.h.

272 { m_releaseData = s; }

◆ requireDecision()

bool T_AnalysisConfig< T >::requireDecision
inlineinherited

Definition at line 286 of file T_AnalysisConfig.h.

286 { return m_requireDecision; }

◆ retrieve()

StatusCode T_AnalysisConfig< T >::retrieve ( Collection const *&  collection,
const std::string &  key = "" 
)
inlineprotectedinherited

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 571 of file T_AnalysisConfig.h.

571  {
574  if ( m_provider->evtStore()->template contains<Collection>( key ) ) {
576  if ( handle.isValid() ) {
579  collection = handle.cptr();
580  return StatusCode::SUCCESS;
581  }
582  }
583  return StatusCode::FAILURE;
584  }

◆ select() [1/3]

bool T_AnalysisConfig< T >::select ( std::vector< TIDA::Vertex > &  vertices,
const ElementLink< TrigRoiDescriptorCollection > &  roi_link,
const std::string &  key = "" 
)
inlineprotectedinherited

Definition at line 369 of file T_AnalysisConfig.h.

371  {
372 
373  m_provider->msg(MSG::VERBOSE) << "\tFetch xAOD::VertexContainer for key: " << key << endmsg;
374 
376  xAOD::VertexContainer::const_iterator > vtx_itrpair = this->template getCollection<xAOD::VertexContainer>( roi_link, key );
377 
378  if ( vtx_itrpair.first == vtx_itrpair.second ) {
379  m_provider->msg(MSG::WARNING) << "\tNo xAOD::Vertex collection for key " << key << endmsg;
380  return false;
381  }
382 
383  m_provider->msg(MSG::DEBUG) << "\txAOD::VertexContainer found with size " << (vtx_itrpair.second - vtx_itrpair.first)
384  << "\t:" << key << endmsg;
385 
386  return select( vertices, vtx_itrpair.first, vtx_itrpair.second );
387  }

◆ select() [2/3]

bool T_AnalysisConfig< T >::select ( std::vector< TIDA::Vertex > &  vertices,
const std::string &  key = "" 
)
inlineprotectedinherited

Definition at line 392 of file T_AnalysisConfig.h.

392  {
393 
394  m_provider->msg(MSG::VERBOSE) << "fetching AOD vertex container" << endmsg;
395 
396  const xAOD::VertexContainer* xaodVtxCollection = 0;
397 
398  if ( retrieve( xaodVtxCollection, key ).isFailure()) {
399  m_provider->msg(MSG::WARNING) << "xAOD vertex container not found with key " << key << endmsg;
400  return false;
401  }
402 
403  if ( xaodVtxCollection!=0 ) {
404 
405  m_provider->msg(MSG::VERBOSE) << "xAOD vertex container " << xaodVtxCollection->size() << " entries" << endmsg;
406 
407  return select( vertices, xaodVtxCollection->begin(), xaodVtxCollection->end() );
408 
409 #if 0
410 
411  xAOD::VertexContainer::const_iterator vtxitr = xaodVtxCollection->begin();
412 
413  for ( ; vtxitr != xaodVtxCollection->end(); vtxitr++ ) {
414  if ( (*vtxitr)->nTrackParticles()>0 && (*vtxitr)->vertexType()!=0 ) {
415  vertices.push_back( TIDA::Vertex( (*vtxitr)->x(),
416  (*vtxitr)->y(),
417  (*vtxitr)->z(),
419  (*vtxitr)->covariancePosition()(Trk::x,Trk::x),
420  (*vtxitr)->covariancePosition()(Trk::y,Trk::y),
421  (*vtxitr)->covariancePosition()(Trk::z,Trk::z),
422  (*vtxitr)->nTrackParticles(),
424  (*vtxitr)->chiSquared(),
425  (*vtxitr)->numberDoF() ) );
426  }
427  }
428 
429 #endif
430 
431  }
432 
433  return true;
434  }

◆ select() [3/3]

bool T_AnalysisConfig< T >::select ( std::vector< TIDA::Vertex > &  vertices,
xAOD::VertexContainer::const_iterator  vtx_start,
xAOD::VertexContainer::const_iterator  vtx_end 
)
inlineprotectedinherited

variances

quality

Definition at line 340 of file T_AnalysisConfig.h.

342  {
343 
344  xAOD::VertexContainer::const_iterator vtxitr = vtx_start;
345 
346  for ( ; vtxitr!=vtx_end ; vtxitr++ ) {
347  if ( (*vtxitr)->vertexType()!=0 ) {
348  m_provider->msg(MSG::VERBOSE) << "\tvertex " << (*vtxitr)->z() << endmsg;
349 
350  vertices.push_back( TIDA::Vertex( (*vtxitr)->x(),
351  (*vtxitr)->y(),
352  (*vtxitr)->z(),
354  (*vtxitr)->covariancePosition()(Trk::x,Trk::x),
355  (*vtxitr)->covariancePosition()(Trk::y,Trk::y),
356  (*vtxitr)->covariancePosition()(Trk::z,Trk::z),
357  (*vtxitr)->nTrackParticles(),
359  (*vtxitr)->chiSquared(),
360  (*vtxitr)->numberDoF() ) );
361 
362  }
363  }
364 
365  return true;
366  }

◆ selectionChains()

const std::string T_AnalysisConfig< T >::selectionChains
inlineinherited

Definition at line 249 of file T_AnalysisConfig.h.

249  {
250  std::string name;
251  for(unsigned int i=0; i<m_chainNames[2].size(); i++)
252  name += (m_chainNames[2][i]+"::"+m_types[2][i]+"::"+m_keys[2][i]+" ");
253  return name;
254  }

◆ selectTracks() [1/4]

bool T_AnalysisConfig< T >::selectTracks ( TrigTrackSelector selector,
const ElementLink< TrigRoiDescriptorCollection > &  roi_link,
const std::string &  key = "" 
)
inlineprotectedinherited

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 439 of file T_AnalysisConfig.h.

442  {
443 
444 
447  // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl;
448 
451  std::string key_collection = key;
452  std::string key_tename = "";
453  size_t pos = key_collection.find("/");
454  if ( pos!=std::string::npos ) {
455  key_collection = key.substr( pos+1, key.size()-pos );
456  key_tename = key.substr( 0, pos );
457  }
458 
459  std::pair< typename Collection::const_iterator,
460  typename Collection::const_iterator > itrpair;
461 
463 
464  CLID checkCLID;
465  const std::string* keyStr = m_provider->evtStore()->keyToString(roi_link.key(), checkCLID);
466  m_provider->msg(MSG::DEBUG) << "Requesting range over (" << key << ") associated to ROI from " << (keyStr == nullptr ? "UNKNOWN" : *keyStr) << endmsg;
467 
468  itrpair = (*m_tdt)->associateToEventView( handle, roi_link );
469 
470  if ( itrpair.first != itrpair.second ) {
471  selector->selectTracks( itrpair.first, itrpair.second );
472  return true;
473  }
474  else {
475  m_provider->msg(MSG::DEBUG) << "TDT TrackFeature collection (" << key << ") is empty " << endmsg;
476  return false;
477  }
478  }

◆ selectTracks() [2/4]

bool T_AnalysisConfig< T >::selectTracks ( TrigTrackSelector selector,
const std::string &  key 
)
inlineprotectedinherited

commented code intentionally left for development purposes ...

Definition at line 589 of file T_AnalysisConfig.h.

589  {
590  if ( key!="" ) {
592  if ( handle.isValid() ) {
594  // std::cout << "\t\t\t T_AnalysisConfig::selectTracks() - > TrackSelector" << std::endl;
595  selector->selectTracks( handle.cptr() );
596  return true;
597  }
598  }
599  return false;
600  }

◆ selectTracks() [3/4]

bool T_AnalysisConfig< T >::selectTracks ( TrigTrackSelector selector,
Trig::FeatureContainer::combination_const_iterator  citr,
const std::string &  key = "" 
)
inlineprotectedinherited

lagacy run 2 access

Definition at line 485 of file T_AnalysisConfig.h.

485  {
486 
487  // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl;
488 
489  std::string key_collection = key;
490  std::string key_tename = "";
491  size_t pos = key_collection.find("/");
492  if ( pos!=std::string::npos ) {
493  key_collection = key.substr( pos+1, key.size()-pos );
494  key_tename = key.substr( 0, pos );
495  }
496 
497  std::vector< Trig::Feature<Collection> > trackcollections = citr->get<Collection>( key_collection, TrigDefs::alsoDeactivateTEs, key_tename );
498  if ( !trackcollections.empty() ) {
499  // NB!! a combination should never have more than one entry for a track collection from a single algorithm, for single object triggers
500  for ( unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) {
501  Trig::Feature<Collection> trackfeature = trackcollections.at(ifeat);
502  if ( !trackfeature.empty() ) {
503  // actually select the tracks from this roi at last!!
504  const Collection* trigtracks = trackfeature.cptr();
505  selector->selectTracks( trigtracks );
506  }
507  }
508  return true;
509  }
510  else {
511  m_provider->msg(MSG::DEBUG) << "TDT TrackFeature collection (" << key << ") is empty " << endmsg;
512  return false;
513  }
514  }

◆ selectTracks() [4/4]

bool T_AnalysisConfig< T >::selectTracks ( TrigTrackSelector selector,
Trig::FeatureContainer::combination_const_iterator  citr,
const TrigInDetTrackTruthMap truthmap,
const std::string &  key = "",
unsigned  index = 0 
)
inlineprotectedinherited

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 521 of file T_AnalysisConfig.h.

521  {
522 
523  // std::cout << "try " << key << "\t" << m_provider->evtStore()->template transientContains<Collection>(key) << std::endl;
524 
525  std::vector< Trig::Feature<Collection> > trackcollections = citr->get<Collection>( key, TrigDefs::alsoDeactivateTEs );
526  if ( !trackcollections.empty() ) {
527 
528  const HLT::NavigationCore* nc = (*m_tdt)->ExperimentalAndExpertMethods().getNavigation();
529 
530  // NB!! a combination should never have more than one entry for a track collection from a single algorithm,
531  // if ( trackcollections.size()>1 ) std::cerr << "SUTT OH NO!!!!!!!!" << endmsg;
532  // maybe a bit dodgy, if we really do have multiple objects returned, but that should only be for
533  // multiple object triggers - then probably none of this would work anyhow
534  for ( unsigned ifeat=0 ; ifeat<trackcollections.size() ; ifeat++ ) {
535  // std::cout << "selectTracks() ifeat=" << ifeat << "\tkey " << key << "\t(truthmap)" << std::endl;
536  Trig::Feature<Collection> trackfeature = trackcollections.at(ifeat);
537 
539  const HLT::TriggerElement* te = trackfeature.te();
540 
542  std::vector< const Collection* > collectionVector;
543  if ( !const_cast<HLT::NavigationCore *>(nc)->getFeatures( te, collectionVector, key ) ) return false;
544 
545  // std::cout << "foundok " << foundok << "\tsize " << collectionVector.size() << std::endl;
546 
548 
549  for ( unsigned iv=collectionVector.size() ; iv-- ; ) {
553  if ( index!=iv ) continue;
555  // m_provider->msg(MSG::DEBUG) << "TDT TrackFeature->size() " << collectionVector[iv]->size() << " (" << key << ")" << endmsg;
556  selector->selectTracks( collectionVector[iv], truthmap );
557  break;
558  }
559  }
560  return true;
561  }
562  else {
563  m_provider->msg(MSG::DEBUG) << "TDT TrackFeature collection (" << key << ") is empty" << endmsg;
564  return false;
565  }
566  }

◆ selectTracksNotEmpty()

bool T_AnalysisConfig< T >::selectTracksNotEmpty ( TrigTrackSelector selector,
const std::string &  key 
)
inlineprotectedinherited

Definition at line 606 of file T_AnalysisConfig.h.

606  {
607  const Collection* collection = nullptr;
608  if ( key.empty() ) return false;
609  if ( !m_provider->evtStore()->template contains<Collection>( key ) ) return false;
610 
611  StatusCode sc = retrieve( collection, key );
612 
613  m_provider->msg(MSG::DEBUG) << "SG Collection->size() " << collection->size() << " (" << key << ")" << endmsg;
614 
615  if ( !( sc.isSuccess() && collection ) ) return false;
616 
617  // added to fix muon samples bug
618  if ( collection->size() == 0 ) {
619  m_provider->msg(MSG::WARNING) << "no particles in collection" << endmsg;
620  return false;
621  }
622 
623  selector->selectTracks( collection );
624  return true;
625  }

◆ setBeamX()

void T_AnalysisConfig< T >::setBeamX ( double  d)
inlineinherited

Definition at line 261 of file T_AnalysisConfig.h.

261 { m_beamX=d; }

◆ setBeamY()

void T_AnalysisConfig< T >::setBeamY ( double  d)
inlineinherited

Definition at line 262 of file T_AnalysisConfig.h.

262 { m_beamY=d; }

◆ setBeamZ()

void T_AnalysisConfig< T >::setBeamZ ( double  d)
inlineinherited

Definition at line 263 of file T_AnalysisConfig.h.

263 { m_beamZ=d; }

◆ setFilterOnRoi()

bool T_AnalysisConfig< T >::setFilterOnRoi ( bool  b)
inlineinherited

Definition at line 283 of file T_AnalysisConfig.h.

283 { return m_filterOnRoi=b; }

◆ setGenericFlag()

void T_AnalysisConfig< T >::setGenericFlag ( bool  b)
inlineinherited

Definition at line 269 of file T_AnalysisConfig.h.

269 { m_genericFlag=b; }

◆ setMCTruth()

void T_AnalysisConfig< T >::setMCTruth ( bool  b = true)
inlineinherited

Definition at line 258 of file T_AnalysisConfig.h.

258 { m_mcTruth=b; }

◆ setRequireDecision()

void T_AnalysisConfig< T >::setRequireDecision ( bool  b)
inlineinherited

Definition at line 285 of file T_AnalysisConfig.h.

285 { m_requireDecision=b; }

◆ setRunPurity()

template<typename T >
void T_AnalysisConfig_Tier0< T >::setRunPurity ( bool  b)
inline

Definition at line 150 of file T_AnalysisConfig_Tier0.h.

150 { m_runPurity=b; }

◆ setShifter()

template<typename T >
void T_AnalysisConfig_Tier0< T >::setShifter ( bool  b)
inline

Definition at line 152 of file T_AnalysisConfig_Tier0.h.

152 { m_shifter=b; }

◆ setUseHighestPT()

void T_AnalysisConfig< T >::setUseHighestPT ( bool  b)
inlineinherited

Definition at line 276 of file T_AnalysisConfig.h.

276 { m_useHighestPT=b; }

◆ setVtxIndex()

void T_AnalysisConfig< T >::setVtxIndex ( int  i)
inlineinherited

Definition at line 279 of file T_AnalysisConfig.h.

279 { m_vtxIndex=i; }

◆ testChains()

const std::string T_AnalysisConfig< T >::testChains
inlineinherited

Definition at line 235 of file T_AnalysisConfig.h.

235  {
236  std::string name;
237  for(unsigned int i=0; i<m_chainNames[0].size(); i++)
238  name += (m_chainNames[0][i]+"::"+m_types[0][i]+"::"+m_keys[0][i]+" ");
239  return name;
240  }

◆ useBeamCondSvc()

template<typename T >
void T_AnalysisConfig_Tier0< T >::useBeamCondSvc ( bool  b)
inline

Definition at line 154 of file T_AnalysisConfig_Tier0.h.

154 { m_useBeamCondSvc = b; }

Member Data Documentation

◆ _analysis

template<typename T >
Analysis_Tier0* T_AnalysisConfig_Tier0< T >::_analysis

Definition at line 160 of file T_AnalysisConfig_Tier0.h.

◆ m_analyses

template<typename T >
std::vector<Analysis_Tier0*> T_AnalysisConfig_Tier0< T >::m_analyses
protected

Definition at line 1222 of file T_AnalysisConfig_Tier0.h.

◆ m_analysis

TrackAnalysis* T_AnalysisConfig< T >::m_analysis
protectedinherited

Definition at line 984 of file T_AnalysisConfig.h.

◆ m_analysisInstanceName

std::string T_AnalysisConfig< T >::m_analysisInstanceName
protectedinherited

Definition at line 963 of file T_AnalysisConfig.h.

◆ m_associator

TrackAssociator* T_AnalysisConfig< T >::m_associator
protectedinherited

Definition at line 983 of file T_AnalysisConfig.h.

◆ m_beamX

double T_AnalysisConfig< T >::m_beamX
protectedinherited

Definition at line 988 of file T_AnalysisConfig.h.

◆ m_beamY

double T_AnalysisConfig< T >::m_beamY
protectedinherited

Definition at line 988 of file T_AnalysisConfig.h.

◆ m_beamZ

double T_AnalysisConfig< T >::m_beamZ
protectedinherited

Definition at line 988 of file T_AnalysisConfig.h.

◆ m_chainNames

template<typename T >
std::vector<ChainString> T_AnalysisConfig_Tier0< T >::m_chainNames
protected

Definition at line 1221 of file T_AnalysisConfig_Tier0.h.

◆ m_containTracks

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_containTracks
protected

Definition at line 1249 of file T_AnalysisConfig_Tier0.h.

◆ m_doBjets

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_doBjets
protected

Definition at line 1229 of file T_AnalysisConfig_Tier0.h.

◆ m_doElectrons

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_doElectrons
protected

Definition at line 1227 of file T_AnalysisConfig_Tier0.h.

◆ m_doMuons

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_doMuons
protected

Definition at line 1226 of file T_AnalysisConfig_Tier0.h.

◆ m_doOffline

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_doOffline
protected

Definition at line 1225 of file T_AnalysisConfig_Tier0.h.

◆ m_doTaus

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_doTaus
protected

Definition at line 1228 of file T_AnalysisConfig_Tier0.h.

◆ m_doTauThreeProng

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_doTauThreeProng
protected

Definition at line 1231 of file T_AnalysisConfig_Tier0.h.

◆ m_event

template<typename T >
TIDA::Event* T_AnalysisConfig_Tier0< T >::m_event
protected

Definition at line 1219 of file T_AnalysisConfig_Tier0.h.

◆ m_filterOnRoi

bool T_AnalysisConfig< T >::m_filterOnRoi
protectedinherited

Definition at line 999 of file T_AnalysisConfig.h.

◆ m_filters

std::vector< std::vector<TrackFilter*> > T_AnalysisConfig< T >::m_filters
protectedinherited

Definition at line 977 of file T_AnalysisConfig.h.

◆ m_first

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_first
protected

Definition at line 1247 of file T_AnalysisConfig_Tier0.h.

◆ m_genericFlag

int T_AnalysisConfig< T >::m_genericFlag
protectedinherited

Definition at line 990 of file T_AnalysisConfig.h.

◆ m_hasTruthMap

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_hasTruthMap
protected

Definition at line 1230 of file T_AnalysisConfig_Tier0.h.

◆ m_keepAllEvents

bool T_AnalysisConfig< T >::m_keepAllEvents
protectedinherited

Definition at line 993 of file T_AnalysisConfig.h.

◆ m_keys

std::vector< std::vector<std::string> > T_AnalysisConfig< T >::m_keys
protectedinherited

Definition at line 968 of file T_AnalysisConfig.h.

◆ m_mcTruth

bool T_AnalysisConfig< T >::m_mcTruth
protectedinherited

Definition at line 986 of file T_AnalysisConfig.h.

◆ m_NRefTracks

template<typename T >
int T_AnalysisConfig_Tier0< T >::m_NRefTracks
protected

Definition at line 1238 of file T_AnalysisConfig_Tier0.h.

◆ m_NRois

template<typename T >
int T_AnalysisConfig_Tier0< T >::m_NRois
protected

output stats

Definition at line 1237 of file T_AnalysisConfig_Tier0.h.

◆ m_NTestTracks

template<typename T >
int T_AnalysisConfig_Tier0< T >::m_NTestTracks
protected

Definition at line 1239 of file T_AnalysisConfig_Tier0.h.

◆ m_outputFileName

template<typename T >
std::string T_AnalysisConfig_Tier0< T >::m_outputFileName
protected

Definition at line 1234 of file T_AnalysisConfig_Tier0.h.

◆ m_provider

T * T_AnalysisConfig< T >::m_provider
protectedinherited

Definition at line 955 of file T_AnalysisConfig.h.

◆ m_pTthreshold

template<typename T >
double T_AnalysisConfig_Tier0< T >::m_pTthreshold
protected

Definition at line 1245 of file T_AnalysisConfig_Tier0.h.

◆ m_refChainKey

std::string T_AnalysisConfig< T >::m_refChainKey
protectedinherited

Definition at line 971 of file T_AnalysisConfig.h.

◆ m_refChainName

std::string T_AnalysisConfig< T >::m_refChainName
protectedinherited

Definition at line 970 of file T_AnalysisConfig.h.

◆ m_releaseData

std::string T_AnalysisConfig< T >::m_releaseData
protectedinherited

Definition at line 991 of file T_AnalysisConfig.h.

◆ m_requireDecision

bool T_AnalysisConfig< T >::m_requireDecision
protectedinherited

Definition at line 1001 of file T_AnalysisConfig.h.

◆ m_runPurity

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_runPurity
protected

Definition at line 1241 of file T_AnalysisConfig_Tier0.h.

◆ m_selectorRef

TrigTrackSelector* T_AnalysisConfig< T >::m_selectorRef
protectedinherited

Definition at line 979 of file T_AnalysisConfig.h.

◆ m_selectorSel

TrigTrackSelector* T_AnalysisConfig< T >::m_selectorSel
protectedinherited

Definition at line 981 of file T_AnalysisConfig.h.

◆ m_selectorTest

TrigTrackSelector* T_AnalysisConfig< T >::m_selectorTest
protectedinherited

Definition at line 980 of file T_AnalysisConfig.h.

◆ m_shifter

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_shifter
protected

Definition at line 1243 of file T_AnalysisConfig_Tier0.h.

◆ m_tauEtCutOffline

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_tauEtCutOffline
protected

Definition at line 1232 of file T_AnalysisConfig_Tier0.h.

◆ m_tdt

ToolHandle<Trig::TrigDecisionTool>* T_AnalysisConfig< T >::m_tdt
protectedinherited

Definition at line 957 of file T_AnalysisConfig.h.

◆ m_testChainKey

std::string T_AnalysisConfig< T >::m_testChainKey
protectedinherited

Definition at line 974 of file T_AnalysisConfig.h.

◆ m_testChainName

std::string T_AnalysisConfig< T >::m_testChainName
protectedinherited

Definition at line 973 of file T_AnalysisConfig.h.

◆ m_testType

template<typename T >
std::string T_AnalysisConfig_Tier0< T >::m_testType
protected

Definition at line 1223 of file T_AnalysisConfig_Tier0.h.

◆ m_types

std::vector< std::vector<std::string> > T_AnalysisConfig< T >::m_types
protectedinherited

Definition at line 967 of file T_AnalysisConfig.h.

◆ m_useBeamCondSvc

template<typename T >
bool T_AnalysisConfig_Tier0< T >::m_useBeamCondSvc
protected

Definition at line 1217 of file T_AnalysisConfig_Tier0.h.

◆ m_useHighestPT

bool T_AnalysisConfig< T >::m_useHighestPT
protectedinherited

Definition at line 995 of file T_AnalysisConfig.h.

◆ m_vtxIndex

int T_AnalysisConfig< T >::m_vtxIndex
protectedinherited

Definition at line 997 of file T_AnalysisConfig.h.


The documentation for this class was generated from the following file:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
T_AnalysisConfig< T >::m_selectorRef
TrigTrackSelector * m_selectorRef
Definition: T_AnalysisConfig.h:979
Trig::FeatureContainer::combination_const_iterator
std::vector< Combination >::const_iterator combination_const_iterator
Definition: FeatureContainer.h:69
TrackAnalysis::setBeamTest
void setBeamTest(double x, double y, double z=0)
Definition: TrackAnalysis.h:110
Trk::y
@ y
Definition: ParamDefs.h:56
TrackAnalysis::initialise
virtual void initialise()=0
standard operation interface
T_AnalysisConfig< T >::m_types
std::vector< std::vector< std::string > > m_types
Definition: T_AnalysisConfig.h:967
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
T_AnalysisConfig< T >::m_mcTruth
bool m_mcTruth
Definition: T_AnalysisConfig.h:986
Trig::Feature
Definition: Feature.h:112
Analysis_Tier0::setvertices
void setvertices(int numvtx)
Definition: Analysis_Tier0.h:52
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
TIDA::isGoodOffline
bool isGoodOffline(const Analysis::Electron &elec)
Definition: OfflineObjectSelection.cxx:122
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
plotting.plot_kinematics.run_number
run_number
Definition: plot_kinematics.py:29
T_AnalysisConfig< T >::m_filterOnRoi
bool m_filterOnRoi
Definition: T_AnalysisConfig.h:999
T_AnalysisConfig_Tier0::m_containTracks
bool m_containTracks
Definition: T_AnalysisConfig_Tier0.h:1249
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:57
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
T_AnalysisConfig< T >::m_provider
T * m_provider
Definition: T_AnalysisConfig.h:955
TrigTrackSelector::clear
virtual void clear() override
Definition: TrigTrackSelector.h:102
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
TrackAnalysis::finalise
virtual void finalise()=0
TIDA::Roi::addTracks
void addTracks(const std::vector< TIDA::Track > &tracks)
accessors for the track vector
Definition: TIDARoi.h:46
T_AnalysisConfig< T >::m_tdt
ToolHandle< Trig::TrigDecisionTool > * m_tdt
Definition: T_AnalysisConfig.h:957
DataVector::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition: DataVector.h:837
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
hist_file_dump.d
d
Definition: hist_file_dump.py:137
HepMC::signal_process_id
int signal_process_id(const GenEvent &e)
Definition: GenEvent.h:635
Filter_etaPT
Definition: Filter_etaPT.h:27
T_AnalysisConfig_Tier0::m_chainNames
std::vector< ChainString > m_chainNames
Definition: T_AnalysisConfig_Tier0.h:1221
ChainString::head
std::string head() const
Definition: ChainString.h:33
JiveXML::Event
struct Event_t Event
Definition: ONCRPCServer.h:65
T_AnalysisConfig< T >::analysis
const TrackAnalysis * analysis() const
Definition: T_AnalysisConfig.h:256
Analysis_Tier0::execute_vtx
virtual void execute_vtx(const std::vector< TIDA::Vertex * > &vtx0, const std::vector< TIDA::Vertex * > &vtx1, const TIDA::Event *tevt=0)
Definition: Analysis_Tier0.cxx:675
LArDigits2NtupleDumper.tdt
tdt
Definition: LArDigits2NtupleDumper.py:121
Analysis_Tier0::debug
bool debug() const
Definition: Analysis_Tier0.h:66
TIDARoiDescriptor
Describes the Region of Ineterest geometry It has basically 8 parameters.
Definition: TIDARoiDescriptor.h:42
T_AnalysisConfig_Tier0::m_doTaus
bool m_doTaus
Definition: T_AnalysisConfig_Tier0.h:1228
Analysis::TauJetContainer
Definition: Reconstruction/tauEvent/tauEvent/TauJetContainer.h:31
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
ChainString
Definition: ChainString.h:23
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
TrigTrackSelector
L2 tracks.
Definition: TrigTrackSelector.h:58
T_AnalysisConfig_Tier0::m_runPurity
bool m_runPurity
Definition: T_AnalysisConfig_Tier0.h:1241
T_AnalysisConfig< T >::getUseHighestPT
bool getUseHighestPT() const
Definition: T_AnalysisConfig.h:277
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:225
TIDA::Event::lumi_block
void lumi_block(unsigned lb)
Definition: TIDAEvent.h:44
Trig::Feature::empty
bool empty() const
test method to check if the object is truly there
Definition: Feature.h:197
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
T_AnalysisConfig_Tier0::m_doBjets
bool m_doBjets
Definition: T_AnalysisConfig_Tier0.h:1229
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
TIDA::Chain::addRoi
void addRoi(TIDA::Roi &roi)
add and roi by root dictionary class
Definition: TIDAChain.h:44
T_AnalysisConfig< T >::m_analysisInstanceName
std::string m_analysisInstanceName
Definition: T_AnalysisConfig.h:963
PlotCalibFromCool.ie
ie
Definition: PlotCalibFromCool.py:420
Container
storage of the time histories of all the cells
covarianceTool.filter
filter
Definition: covarianceTool.py:514
T_AnalysisConfig< T >::m_keys
std::vector< std::vector< std::string > > m_keys
Definition: T_AnalysisConfig.h:968
Trig::FeatureContainer
Definition: FeatureContainer.h:54
Analysis_Tier0::execute
virtual void execute(const std::vector< TIDA::Track * > &referenceTracks, const std::vector< TIDA::Track * > &testTracks, TrackAssociator *associator)
Definition: Analysis_Tier0.cxx:473
TIDA::Chain::back
TIDA::Roi & back()
Definition: TIDAChain.h:60
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
HLT::NavigationCore
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
Definition: NavigationCore.h:96
FilterPT
void FilterPT(std::vector< T * > &tracks, double pt)
Definition: TIDATools.h:41
Trig::Feature::te
const HLT::TriggerElement * te() const
explicit conversion to TriggerElement
Definition: Feature.h:181
T_AnalysisConfig_Tier0::m_NRois
int m_NRois
output stats
Definition: T_AnalysisConfig_Tier0.h:1237
HLT::NavigationCore::getFeatures
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
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TIDA::Event::addChain
void addChain(const std::string &chainname)
methods to add and access chains
Definition: TIDAEvent.h:67
TIDA::Event::time_stamp
void time_stamp(unsigned t)
Definition: TIDAEvent.h:45
T_AnalysisConfig_Tier0::m_pTthreshold
double m_pTthreshold
Definition: T_AnalysisConfig_Tier0.h:1245
T_AnalysisConfig< T >::m_beamY
double m_beamY
Definition: T_AnalysisConfig.h:988
T_AnalysisConfig< T >::m_beamX
double m_beamX
Definition: T_AnalysisConfig.h:988
TIDA::Event::back
TIDA::Chain & back()
get the last chain from the vector
Definition: TIDAEvent.h:89
lumiFormat.i
int i
Definition: lumiFormat.py:85
TIDA::Event::event_number
void event_number(unsigned long long e)
Definition: TIDAEvent.h:43
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:27
T_AnalysisConfig< T >::m_analysis
TrackAnalysis * m_analysis
Definition: T_AnalysisConfig.h:984
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
T_AnalysisConfig< T >::getVtxIndex
int getVtxIndex() const
Definition: T_AnalysisConfig.h:280
xAOD::TauJetParameters::nChargedTracks
@ nChargedTracks
Definition: TauDefs.h:322
T_AnalysisConfig< T >::m_requireDecision
bool m_requireDecision
Definition: T_AnalysisConfig.h:1001
TrigInDetTrackTruthMap
Definition: TrigInDetTrackTruthMap.h:38
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
HighestPTOnly
void HighestPTOnly(std::vector< T * > &tracks)
Definition: TIDATools.h:20
hist_file_dump.f
f
Definition: hist_file_dump.py:135
T_AnalysisConfig< T >::m_keepAllEvents
bool m_keepAllEvents
Definition: T_AnalysisConfig.h:993
T_AnalysisConfig_Tier0::m_doElectrons
bool m_doElectrons
Definition: T_AnalysisConfig_Tier0.h:1227
VxContainer
Definition: VxContainer.h:28
Analysis::MuonContainer
definition of StoreGate container holding a vector of Analysis::Muon
Definition: Reconstruction/MuonIdentification/muonEvent/muonEvent/MuonContainer.h:38
TrackAnalysis::setBeamRef
void setBeamRef(double x, double y, double z=0)
set the beamline positions
Definition: TrackAnalysis.h:109
selection
std::string selection
Definition: fbtTestBasics.cxx:75
Filter_True
default simple filter which accepts all tracks
Definition: Filters.h:26
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
T_AnalysisConfig_Tier0::m_event
TIDA::Event * m_event
Definition: T_AnalysisConfig_Tier0.h:1219
T_AnalysisConfig_Tier0::m_doOffline
bool m_doOffline
Definition: T_AnalysisConfig_Tier0.h:1225
T_AnalysisConfig_Tier0::m_testType
std::string m_testType
Definition: T_AnalysisConfig_Tier0.h:1223
TIDA::Vertex
Definition: TIDAVertex.h:23
TrigTrackSelector::selectTrack
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...
Definition: TrigTrackSelector.cxx:116
grepfile.ic
int ic
Definition: grepfile.py:33
xAOD::EventInfo_v1::averageInteractionsPerCrossing
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
Definition: EventInfo_v1.cxx:397
T_AnalysisConfig< T >::retrieve
StatusCode retrieve(Collection const *&collection, const std::string &key="")
Definition: T_AnalysisConfig.h:571
T_AnalysisConfig< T >::m_associator
TrackAssociator * m_associator
Definition: T_AnalysisConfig.h:983
TrackSelector::tracks
const std::vector< TIDA::Track * > & tracks() const
Definition: Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/TrackSelector.h:53
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
T_AnalysisConfig_Tier0::m_shifter
bool m_shifter
Definition: T_AnalysisConfig_Tier0.h:1243
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:43
Filter_Combined
Definition: Filters.h:225
TIDA::Chain
Definition: TIDAChain.h:28
DataHandle
an iterator over instances of a given type in StoreGateSvc. It d-casts and caches locally the pointed...
Definition: DataHandle.h:42
TIDARoiDescriptorBuilder
Definition: TIDARoiDescriptorBuilder.h:21
xAOD::Electron_v1
Definition: Electron_v1.h:34
T_AnalysisConfig< T >::loop
virtual void loop()=0
T_AnalysisConfig< T >::m_useHighestPT
bool m_useHighestPT
Definition: T_AnalysisConfig.h:995
TIDA::Event::addVertex
void addVertex(const TIDA::Vertex &v)
Definition: TIDAEvent.h:71
TIDA::Event::clear
void clear()
clear the event
Definition: TIDAEvent.h:86
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
T_AnalysisConfig_Tier0::m_first
bool m_first
Definition: T_AnalysisConfig_Tier0.h:1247
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
TrackAnalysis::setroi
void setroi(TIDARoiDescriptor *r)
Definition: TrackAnalysis.h:139
TIDA::Event::mu
void mu(double m)
Definition: TIDAEvent.h:47
python.copyTCTOutput.chains
chains
Definition: copyTCTOutput.py:81
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.PyAthena.v
v
Definition: PyAthena.py:154
T_AnalysisConfig_Tier0::m_NTestTracks
int m_NTestTracks
Definition: T_AnalysisConfig_Tier0.h:1239
TrackTrigObject
Definition: TrackTrigObject.h:21
python.selector.AtlRunQuerySelectorLhcOlc.selector
selector
Definition: AtlRunQuerySelectorLhcOlc.py:611
T_AnalysisConfig_Tier0::m_NRefTracks
int m_NRefTracks
Definition: T_AnalysisConfig_Tier0.h:1238
T_AnalysisConfig_Tier0::m_hasTruthMap
bool m_hasTruthMap
Definition: T_AnalysisConfig_Tier0.h:1230
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:426
TrigTrackSelector::setBeamline
void setBeamline(double x, double y, double z=0)
Definition: TrigTrackSelector.h:94
ElectronContainer
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/ElectronContainer.h:32
xAOD::EventInfo_v1::timeStamp
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
T_AnalysisConfig_Tier0::m_useBeamCondSvc
bool m_useBeamCondSvc
Definition: T_AnalysisConfig_Tier0.h:1217
T_AnalysisConfig< T >::m_vtxIndex
int m_vtxIndex
Definition: T_AnalysisConfig.h:997
xAOD::EgammaHelpers::getOriginalTrackParticle
const xAOD::TrackParticle * getOriginalTrackParticle(const xAOD::Electron *el)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the electron.
Definition: ElectronxAODHelpers.cxx:11
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
T_AnalysisConfig< T >::filterOnRoi
bool filterOnRoi() const
Definition: T_AnalysisConfig.h:282
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
T_AnalysisConfig< T >::name
const std::string name() const
Definition: T_AnalysisConfig.h:233
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
TIDA::Associator::match
virtual void match(const std::vector< T * > &s1, const std::vector< S * > &s2)=0
python.StandardJetMods.vr
vr
Definition: StandardJetMods.py:294
T_AnalysisConfig< T >::m_genericFlag
int m_genericFlag
Definition: T_AnalysisConfig.h:990
TIDA::Event::bunch_crossing_id
void bunch_crossing_id(unsigned b)
Definition: TIDAEvent.h:46
Trk::x
@ x
Definition: ParamDefs.h:55
T_AnalysisConfig< T >::m_beamZ
double m_beamZ
Definition: T_AnalysisConfig.h:988
T_AnalysisConfig< T >::m_filters
std::vector< std::vector< TrackFilter * > > m_filters
Definition: T_AnalysisConfig.h:977
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
TIDA::Event::run_number
void run_number(unsigned r)
accessors
Definition: TIDAEvent.h:42
T_AnalysisConfig< T >::m_selectorTest
TrigTrackSelector * m_selectorTest
Definition: T_AnalysisConfig.h:980
TrackTrigObject::addChild
void addChild(unsigned long id)
Definition: TrackTrigObject.h:43
python.compressB64.c
def c
Definition: compressB64.py:93
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
T_AnalysisConfig_Tier0::m_doMuons
bool m_doMuons
Definition: T_AnalysisConfig_Tier0.h:1226
T_AnalysisConfig_Tier0::_analysis
Analysis_Tier0 * _analysis
Definition: T_AnalysisConfig_Tier0.h:160
plotBeamSpotMon.nc
int nc
Definition: plotBeamSpotMon.py:83
Trig::Feature::cptr
const T * cptr() const
explicit conversion to object
Definition: Feature.h:171
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
T_AnalysisConfig< T >::requireDecision
bool requireDecision() const
Definition: T_AnalysisConfig.h:286
T_AnalysisConfig< T >::select
bool select(std::vector< TIDA::Vertex > &vertices, xAOD::VertexContainer::const_iterator vtx_start, xAOD::VertexContainer::const_iterator vtx_end)
Definition: T_AnalysisConfig.h:340
T_AnalysisConfig< T >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
T_AnalysisConfig< T >::m_releaseData
std::string m_releaseData
Definition: T_AnalysisConfig.h:991
T_AnalysisConfig< T >::m_chainNames
std::vector< std::vector< std::string > > m_chainNames
Definition: T_AnalysisConfig.h:966