check whether the chains have actually run, otherwise there's no point doing anything
bomb out if no chains passed and not told to keep all events and found no offline objects
keep this printout here, but commented for usefull debug purposes ...
hmm, if we stored the types as a map it would be more straightforward than having to stick all this in a loop
hmm, if we stored the types as a map it would be more straightforward than having to stick all this in a loop
now decide whether we want all the TEs for this chain, or just those that are still active
a hack to fetch back the Rois with "_probe" in the name if the standard named RoiDescriptors are not actually present for this chain ...
don't extract any additional rois if a superRoi is requested: In this case, the superRoi would be shared between the different chains
fetch vertices if available ...
97 {
98
99#ifdef USE_DATE_TIME_STAMP
101 <<
" compiled " << __DATE__ <<
" " << __TIME__ <<
"\t: " <<
date() <<
"␛[m" <<
endmsg;
102#endif
103
104 bool foundOffline = false;
105
106
107 double xbeam = 0;
108 double ybeam = 0;
109 double zbeam = 0;
110 std::vector<double> beamline;
111
112
113
114 double xbeam_online = 0;
115 double ybeam_online = 0;
116 double zbeam_online = 0;
117
118 std::vector<double> beamline_online;
119
120
121
122
125
129 Filter_etaPT filterRef(5,500);
131 Filter_etaPT filter_etaPT(5.0,
m_ptmin);
133
134 TrackFilter* truthFilter = &filter_etaPT;
135
137
138 TrigTrackSelector selectorRef( &filter_etaPT );
139 TrigTrackSelector selectorTest( &filter );
140
141 TIDAVertexBuilder vertexBuilder;
142
143 if ( xbeam!=0 || ybeam!=0 ) {
144 selectorTruth.setBeamline( xbeam, ybeam, zbeam );
145 selectorRef.setBeamline( xbeam, ybeam, zbeam );
146 }
147
148 if ( xbeam_online!=0 || ybeam_online!=0 ) {
149 selectorTest.setBeamline( xbeam_online, ybeam_online, zbeam_online );
150 }
151
152 selectorTruth.correctTracks( true );
153 selectorRef.correctTracks( true );
154 selectorTest.correctTracks( true );
155
156
157
159
161
163 unsigned long long event_number = 0;
164 unsigned lumi_block = 0;
165 unsigned bunch_crossing_id = 0;
166 unsigned time_stamp = 0;
167 double mu_val = 0;
168
169 if (
retrieve(pEventInfo,
"EventInfo").isFailure() ) {
171 }
172 else {
177 bunch_crossing_id = pEventInfo->
bcid();
179 }
180
182 << "\tevent " << event_number
183 <<
"\tlb " << lumi_block <<
endmsg;
184
185 m_event->run_number(run_number);
186 m_event->event_number(event_number);
187 m_event->lumi_block(lumi_block);
188 m_event->time_stamp(time_stamp);
189 m_event->bunch_crossing_id(bunch_crossing_id);
191
192
193 const Trig::ChainGroup* L2chain=(*m_tdt)->getChainGroup("L2_.*");
194 const Trig::ChainGroup* EFchain=(*m_tdt)->getChainGroup("EF_.*");
195 const Trig::ChainGroup* HLTchain=(*m_tdt)->getChainGroup("HLT_.*");
196
198 <<
"L2 pass " << L2chain->
isPassed() <<
"\t"
199 <<
"EF pass " << EFchain->
isPassed() <<
"\t"
200 <<
"HLT pass " << HLTchain->
isPassed() <<
"␛[m"
202
205
206 bool analyse = false;
207
209
211
212 int passed_chains = 0;
213
215
218 return;
219 }
220
221 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
222
224
225
226
227 if (chainName.find("L2") == std::string::npos &&
228 chainName.find("EF") == std::string::npos &&
229 chainName.find("HLT") == std::string::npos ) continue;
230
231 if ( configuredHLTChains.find(chainName)==configuredHLTChains.end() ) {
232 m_provider->msg(MSG::WARNING) <<
"␛[91;1m" <<
"Chain " << chainName
233 << " is not configured for this event" << "␛[m"
235 continue;
236 }
237
240
241 std::string roistring = "";
243
244 bool passPhysics = (*m_tdt)->isPassed(chainName);
245
246 m_provider->msg(MSG::DEBUG) <<
"Chain " << chainName <<
"\troi " << roistring
247 << "\tpres " << (*m_tdt)->getPrescale(chainName)
248 << ( passPhysics ? "␛[91;1m" : "" ) << "\tpass physics " << passPhysics << ( passPhysics ? "␛[m" : "" )
249 <<
"\t: ( pass " << (*m_tdt)->isPassed(chainName, decisiontype ) <<
"\tdec type " << decisiontype <<
" ) " <<
endmsg;
250
251 if ( (*m_tdt)->isPassed(chainName, decisiontype ) || !
m_chainNames[ichain].passed() ) {
252 analyse = true;
253 passed_chains++;
254 }
255
256 }
257
258
259
263 m_provider->msg(MSG::DEBUG) <<
"No chains passed unprescaled - not processing this event: " <<
run_number <<
" " << event_number <<
" " << lumi_block <<
endmsg;
264 return;
265 }
266
267
269
270
272
273
274
275 selectorTruth.clear();
276
278
281
283
285 }
289 }
293 }
297 }
301 }
302 else {
303 m_provider->msg(MSG::WARNING) <<
"Truth not found - none whatsoever!" <<
endmsg;
304 }
305 }
306
307
308
310
312
314
316
317 selectorRef.clear();
318
321 }
322 else {
324 }
325
326
329
330 std::vector<TIDA::Vertex> vertices;
331
333 std::string vertexChainname = "Vertex";
337 }
338
340
342
343 if (
retrieve( xaodVtxCollection, vertexType ).isFailure()) {
345 }
346
347 if ( xaodVtxCollection!=0 ) {
348
350
351
352
353 if (
vertexType.find(
"SecVtx") != std::string::npos ) {
354 vertices = vertexBuilder.
select( xaodVtxCollection, &selectorRef.tracks(),
true );
355 }
356 else {
357 vertices = vertexBuilder.
select( xaodVtxCollection, &selectorRef.tracks() );
358 }
359 }
360
361
363 m_event->addChain( vertexChainname );
364 m_event->back().addRoi(TIDARoiDescriptor(
true));
365 m_event->back().back().addVertices( vertices );
366 }
367 }
368
370
372
375 m_event->back().addRoi(TIDARoiDescriptor(
true));
376 m_event->back().back().addTracks(selectorTruth.tracks());
377 }
378
379#if 0
381 for (
unsigned i=0 ;
i<vertices.size() ;
i++ ) {
383 m_event->addVertex(vertices[i]);
384 }
385#endif
386
388
389 int Noff = 0;
390 int Nmu = 0;
391 int Nel = 0;
392 int Ntau = 0;
393
395
397
398 m_event->addChain(
"Offline" );
399 m_event->back().addRoi(TIDARoiDescriptor(
true));
400 m_event->back().back().addTracks(selectorRef.tracks());
401
402 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
403 std::vector<double> beamline_;
404 beamline_.push_back( selectorRef.getBeamX() );
405 beamline_.push_back( selectorRef.getBeamY() );
406 beamline_.push_back( selectorRef.getBeamZ() );
407 m_event->back().back().addUserData(beamline_);
408 }
409
410
411 Noff = selectorRef.tracks().size();
412
413 m_provider->msg(MSG::DEBUG) <<
"ref tracks.size() " << selectorRef.tracks().size() <<
endmsg;
414 for (
int ii=selectorRef.tracks().size() ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" ref track " << ii <<
" " << *selectorRef.tracks()[ii] <<
endmsg;
415
416 }
417
419 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
420
422
423
426 std::string collectionname =
m_chainNames[ichain].tail();
428
429
430 if ( chainname!="" ) continue;
431 if ( collectionname=="" ) continue;
432
433 chainname = collectionname;
434 if ( vtx_name!="" ) chainname += ":" + vtx_name;
435
436
437
440
441 selectorTest.clear();
442
444
445 std::string collection_test = collectionname;
446 size_t pos = collectionname.find(
"/");
447 if ( pos!=std::string::npos ) collection_test = collectionname.substr( pos+1, collectionname.size()-pos );
448
451 }
454 }
455 else {
456 m_provider->msg(MSG::WARNING) <<
"\tcollection " << collectionname <<
" not found" <<
endmsg;
457 }
458
459
461
462 std::vector<TIDA::Vertex> tidavertices;
463
464 m_provider->msg(MSG::DEBUG) <<
"\tFetch xAOD::VertexContainer with key " << vtx_name <<
endmsg;
465
466 if ( vtx_name!="" ) {
467
468 m_provider->msg(MSG::DEBUG) <<
"\tFetch xAOD::VertexContainer with key " << vtx_name <<
endmsg;
469
471
473
474 if (
retrieve( xaodVtxCollection, vtx_name ).isFailure() ) {
475 if (
m_provider->msg().level() <= MSG::WARNING)
m_provider->msg(MSG::WARNING) <<
"xAOD vertex container not found with key " << vtx_name <<
endmsg;
476 }
477
478 if ( xaodVtxCollection!=0 ) {
479
480 m_provider->msg(MSG::DEBUG) <<
"\txAOD::VertexContainer found with size " << xaodVtxCollection->
size()
481 <<
"\t" << vtx_name <<
endmsg;
482
483
484
485 if ( vtx_name.find("SecVtx") != std::string::npos ) {
486 tidavertices = vertexBuilder.
select( xaodVtxCollection, 0,
true );
487 }
488 else {
489 tidavertices = vertexBuilder.
select( xaodVtxCollection );
490 }
491 }
492
493 }
494
495
496 if ( found ) {
497
498 m_event->addChain( chainname );
499 m_event->back().addRoi(TIDARoiDescriptor(
true));
500 if ( vtx_name!=
"" )
m_event->back().back().addVertices( tidavertices );
501 m_event->back().back().addTracks(selectorTest.tracks());
502
503 if ( selectorTest.getBeamX()!=0 || selectorTest.getBeamY()!=0 || selectorTest.getBeamZ()!=0 ) {
504 std::vector<double> beamline_;
505 beamline_.push_back( selectorTest.getBeamX() );
506 beamline_.push_back( selectorTest.getBeamY() );
507 beamline_.push_back( selectorTest.getBeamZ() );
508 m_event->back().back().addUserData(beamline_);
509 }
510
511 int Ntest = selectorTest.tracks().size();
512
513 m_provider->msg(MSG::DEBUG) <<
"collection " << collectionname <<
"\ttest tracks.size() " << Ntest <<
endmsg;
514 for (
int ii=Ntest ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" test track " << ii <<
" " << *selectorTest.tracks()[ii] <<
endmsg;
515 }
516 }
517
518
519 std::string ElectronRef[7] = {
520 "",
521 "TightCB", "MediumCB", "LooseCB",
522 "TightLH", "MediumLH", "LooseLH" };
523
524
526
530
531 int itype = -1;
533 if ( itype<0 ) continue;
534
535 std::vector<TrackTrigObject> elevec;
536
537 std::string echain = std::string("Electrons");
539
541
542 if ( Nel_ < 1 ) continue;
543
544 Nel += Nel_;
545
548
550 m_event->back().addRoi(TIDARoiDescriptor(
true));
551 m_event->back().back().addTracks(selectorRef.tracks());
552 m_event->back().back().addObjects( elevec );
553
554 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
555 std::vector<double> beamline_;
556 beamline_.push_back( selectorRef.getBeamX() );
557 beamline_.push_back( selectorRef.getBeamY() );
558 beamline_.push_back( selectorRef.getBeamZ() );
559 m_event->back().back().addUserData(beamline_);
560 }
561
562 }
563
564
565 std::string MuonRef[5] = { "", "Tight", "Medium", "Loose", "VeryLoose" };
566
568 for (
size_t imuon=0 ; imuon<
m_muonType.size() ; imuon++ ) {
569
571
572 int muonType = -1;
573 for (
int it=0 ;
it<5 ;
it++ )
if (
m_muonType[imuon] == MuonRef[it] ) muonType=
it;
574 if ( muonType<0 ) continue;
575
576 std::string mchain = "Muons";
578
579 int Nmu_ =
processMuons( selectorRef, muonType, 0, mchain );
580
581 if ( Nmu_ < 1 ) continue;
582
583 Nmu += Nmu_;
584
585 m_provider->msg(MSG::DEBUG) <<
"found " << Nmu <<
" offline muons " <<
endmsg;
586
588
590 m_event->back().addRoi(TIDARoiDescriptor(
true));
591 m_event->back().back().addTracks(selectorRef.tracks());
592
593 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
594 std::vector<double> beamline_;
595 beamline_.push_back( selectorRef.getBeamX() );
596 beamline_.push_back( selectorRef.getBeamY() );
597 beamline_.push_back( selectorRef.getBeamZ() );
598 m_event->back().back().addUserData(beamline_);
599 }
600
601 m_provider->msg(MSG::DEBUG) <<
"ref muon tracks.size() " << selectorRef.tracks().size() <<
endmsg;
602 for (
int ii=selectorRef.tracks().size() ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" ref muon track " << ii <<
" " << *selectorRef.tracks()[ii] <<
endmsg;
603 }
604
605
608
610
611 int muonType = 0;
612
614
615 m_provider->msg(MSG::DEBUG) <<
"found " << Nmu <<
" offline muons " <<
endmsg;
616
618 m_event->back().addRoi(TIDARoiDescriptor(
true));
619 m_event->back().back().addTracks(selectorRef.tracks());
620
621 m_provider->msg(MSG::DEBUG) <<
"ref muon tracks.size() " << selectorRef.tracks().size() <<
endmsg;
622 for (
int ii=selectorRef.tracks().size() ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" ref muon track " << ii <<
" " << *selectorRef.tracks()[ii] <<
endmsg;
623 }
624
625
626
628 std::string TauRef[4] = { "", "Tight", "Medium", "Loose" };
629
630
631 for (
size_t itau=0 ; itau<
m_tauType.size() ; itau++ ) {
634
635 int itype = -1;
636 for (
int it=0 ;
it<4 ;
it++ )
if (
m_tauType[itau]==TauRef[it] ) itype =
it;
637 if ( itype<0 ) continue;
638
640 int requireNtracks = 0;
641 if (
m_tauProngs[itau]==
"3Prong" ) requireNtracks = 3;
642 if (
m_tauProngs[itau]==
"1Prong" ) requireNtracks = 1;
643
644 std::vector<TrackTrigObject> tauvec;
645
646 int Ntau_ =
processTaus( selectorRef, &tauvec, itype, requireNtracks, 20000 );
647
648 Ntau += Ntau_;
649
650 if ( Ntau_ > 0 ) {
653
654 std::string tchain = std::string("Taus");
657
659 m_event->back().addRoi(TIDARoiDescriptor(
true));
660 m_event->back().back().addTracks(selectorRef.tracks());
661 m_event->back().back().addObjects( tauvec ) ;
662
663 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
664 std::vector<double> beamline_;
665 beamline_.push_back( selectorRef.getBeamX() );
666 beamline_.push_back( selectorRef.getBeamY() );
667 beamline_.push_back( selectorRef.getBeamZ() );
668 m_event->back().back().addUserData(beamline_);
669 }
670
671 }
672 }
673
674 if ( Nmu==0 && Noff==0 && Nel==0 && Ntau==0 )
m_provider->msg(MSG::DEBUG) <<
"No offline objects found " <<
endmsg;
675 else foundOffline = true;
676
677
678
679
680 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
681
682
683
685 const std::string& chainName =
m_chainNames[ichain].head();
686
688 const std::string& collectionName =
m_chainNames[ichain].tail();
689
690 if( chainName.find("L2_")==std::string::npos &&
691 chainName.find("EF_")==std::string::npos &&
692 chainName.find("HLT_")==std::string::npos ) continue;
693
696
697
698 m_provider->msg(MSG::DEBUG) <<
"chain " << chainName
699 << "\tprescale " << (*m_tdt)->getPrescale(chainName)
700 << "\tpass " << (*m_tdt)->isPassed(chainName) << " physics "
701 << " (req dec " << (*m_tdt)->isPassed(chainName, decisiontype ) << " dec type " << decisiontype << ")"
703
706
708 if ( !(*m_tdt)->isPassed( chainName, decisiontype ) ) continue;
709
711
712
715
716
717#if 0
722
723
724 if ( roi_name!="" ) {
725
726 std::string roi_name_tmp = roi_name;
727 std::string roi_tename = "";
728
729 if ( roi_name.find("/")!=std::string::npos ) {
730 roi_name_tmp = roi_name.substr( roi_name.find("/")+1, roi_name.size()-roi_name.find("/") );
731 roi_tename = roi_name.substr( 0, roi_name.find("/") );
732 }
733
735
736 if ( roist.size()>0 ) {
737 for (
unsigned ir=0 ;
ir<roist.size() ;
ir++ )
m_provider->msg(MSG::DEBUG) <<
"\t\tRetrieved roi " << roi_name <<
"\t" << *roist[
ir].cptr() <<
endmsg;
738 }
739 else {
740 m_provider->msg(MSG::WARNING) <<
"\t\tRequested roi " << roi_name <<
" not found" <<
endmsg;
741 }
742
743 }
744 else {
749 }
750#endif
751
752
754
756
758
761 }
762
763
764 std::string rgex = roi_key;
765
766 std::vector< TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> > rois =
767 (*m_tdt)->template features<TrigRoiDescriptorCollection>( Trig::FeatureRequestDescriptor( chainName,
768 decisiontype,
769 rgex,
770 feature_type,
771 "roi",
772 leg ) );
773
776 if ( rois.empty() ) {
777 if ( !rgex.empty() ) {
778 rgex += "_probe";
779 rois = (*m_tdt)->template features<TrigRoiDescriptorCollection>( Trig::FeatureRequestDescriptor( chainName,
780 decisiontype,
781 rgex,
782 feature_type,
783 "roi",
784 leg ) );
785 }
786 }
787
788 int iroi = 0;
789
791
792 if ( rois.size()==0 ) continue;
793
795
797
799
801 for ( const TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection>& roi_info : rois ) {
802
803 iroi++;
804
808
809 if ( roi_key=="SuperRoi" && iroi>1 ) continue;
810
811 if ( roi_key.find("JetSuper")!=std::string::npos && iroi>1 ) continue;
812
813 const ElementLink<TrigRoiDescriptorCollection> roi_link = roi_info.link;
814
816 if ( roi_key!=
"" && roi_link.
dataID()!=rgex )
continue;
817
819
820 if ( roiptr == 0 ) {
821
822 continue;
823 }
824
825 if (
m_provider->msg().level() <= MSG::VERBOSE) {
826 m_provider->msg(MSG::VERBOSE) <<
" RoI descriptor for seeded chain " << chainName <<
" " << **roiptr <<
endmsg;
827 }
828
829 TIDARoiDescriptor* roi_tmp = new TIDARoiDescriptor( TIDARoiDescriptorBuilder(**roiptr) );
830
832
835
838
839 selectorTest.clear();
840
841
842 if ( chainName.find("HLT_")!=std::string::npos || chainName.find("EF_")!=std::string::npos ) {
844 else {
845 if (
m_provider->msg().level() <= MSG::DEBUG) {
846 m_provider->msg(MSG::WARNING) <<
"\tNo track collection " << collectionName <<
" found" <<
endmsg;
847 }
848 }
849 }
850
852
853 std::vector<TIDA::Vertex> tidavertices;
854
855 if ( vtx_name!="" ) {
856
857 m_provider->msg(MSG::DEBUG) <<
"\tFetch xAOD::VertexContainer for chain " << chainName <<
" with key " << vtx_name <<
endmsg;
858
860
863
864 if ( vtx_itrpair.first == vtx_itrpair.second ) {
865 if (
m_provider->msg().level() <= MSG::DEBUG ) {
866 m_provider->msg(MSG::WARNING) <<
"\tNo xAOD::Vertex for chain " << chainName <<
" for key " << vtx_name <<
endmsg;
867 }
868 }
869 else {
870
871 m_provider->msg(MSG::DEBUG) <<
"\txAOD::VertexContainer found with size " << (vtx_itrpair.second - vtx_itrpair.first)
872 <<
"\t" << vtx_name <<
endmsg;
873
874
875
876 if ( vtx_name.find("SecVtx") != std::string::npos ) {
877 tidavertices = vertexBuilder.
select( vtx_itrpair.first, vtx_itrpair.second, &selectorRef.tracks(),
true );
878 }
879 else {
880 tidavertices = vertexBuilder.
select( vtx_itrpair.first, vtx_itrpair.second, &selectorTest.tracks() );
881 }
882 }
883 }
884
885#if 0
887
888 std::vector<TrackTrigObject>
jets;
889 if ( chainName.find("HLT_j")!=std::string::npos || chainName.find("EF_j")!=std::string::npos ) {
891 }
892#endif
893
894 const std::vector<TIDA::Track*>& testTracks = selectorTest.tracks();
895 m_provider->msg(MSG::DEBUG) <<
"\ttest tracks.size() " << testTracks.size() <<
endmsg;
896 for (unsigned int ii=0; ii < testTracks.size(); ii++) {
897 m_provider->msg(MSG::DEBUG) <<
" test track " << ii <<
"for chain " << chainName +
":" + collectionName <<
" " << *testTracks[ii] <<
endmsg;
898 }
899
900
901
902
903
904 if ( roi_tmp == 0 ) {
905 if ( testTracks.size()>0 )
m_provider->msg(MSG::WARNING) <<
"\ttest tracks.size() " << testTracks.size() <<
"found but no roi!!!" <<
endmsg;
906 roi_tmp = new TIDARoiDescriptor(true);
907 }
908
909 chain.addRoi( *roi_tmp );
910
911 chain.back().addTracks(testTracks);
912 chain.back().addVertices(tidavertices);
913
914#if 0
916 if ( chainName.find(
"HLT_j")!=std::string::npos )
chain.back().addObjects( jets );
917#endif
918
919 if ( selectorTest.getBeamX()!=0 || selectorTest.getBeamY()!=0 || selectorTest.getBeamZ()!=0 ) {
920 std::vector<double> beamline_;
921 beamline_.push_back( selectorTest.getBeamX() );
922 beamline_.push_back( selectorTest.getBeamY() );
923 beamline_.push_back( selectorTest.getBeamZ() );
924 chain.back().addUserData(beamline_);
925 }
926
927 delete roi_tmp;
928 roi_tmp = 0;
929
930 }
931
932 }
933
934#if 0
936
937 {
939
941
943
944 std::vector<std::string> chainnames =
m_event->chainnames();
945
947
948 for ( size_t ic=chainnames.size() ; ic-- ; ) {
949 if ( chainnames[ic] == "Offline" ) {
951 break;
952 }
953 }
954
955 if ( offline ) {
956
958 std::vector<TIDA::Chain>::iterator citr =
chains.begin();
959
960 std::vector<std::pair<double,double> > philims;
961
962 for ( ; citr!=
chains.end() ; ++citr ) {
963 if ( citr->name().find("HLT_")!=std::string::npos || citr->name().find("EF_")!=std::string::npos ) {
964 for (
size_t ir=0 ;
ir<citr->size() ;
ir++ ) {
965 TIDARoiDescriptor& roi = citr->rois()[
ir].roi();
967 for (
size_t isub=0 ; isub<roi.
size() ; isub++ ) {
968 philims.push_back( std::pair<double,double>( roi[isub]->phiMinus(), roi[isub]->phiPlus() ) );
969 }
970 }
971 else philims.push_back( std::pair<double,double>( roi.
phiMinus(), roi.
phiPlus() ) );
972 }
973 }
974 }
975
977
978 for (
size_t iroi=0 ; iroi<
offline->size() ; iroi++ ) {
979
980 std::vector<TIDA::Track>& tracks =
offline->rois()[iroi].tracks();
981
984
985
986 for ( std::vector<TIDA::Track>::iterator it=tracks.begin() ; it<tracks.end() ; ) {
987 bool inc = true;
989 if ( std::fabs(
it->pT())<
m_ptmin ) { inc=
false; tracks.erase( it ); }
990 }
992 bool remove_track = true;
993 for ( size_t isub=0 ; isub<philims.size() ; isub++ ) {
994
995 if ( philims[isub].first < philims[isub].second ) {
996 if (
it->phi()>=philims[isub].first &&
it->phi()<=philims[isub].second ) {
997 remove_track = false;
998 break;
999 }
1000 }
1001 else {
1002 if (
it->phi()>=philims[isub].first ||
it->phi()<=philims[isub].second ) {
1003 remove_track = false;
1004 break;
1005 }
1006 }
1007 }
1008 if ( remove_track ) { inc=false; tracks.erase( it ); }
1009 }
1011 }
1012
1015
1016
1017 }
1018
1019 }
1020
1021 }
1022 }
1023
1024#endif
1025
1027
1028}
void remove_duplicates(std::vector< T > &vec)
Athena::TPCnvVers::Current TruthParticleContainer
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
Athena::TPCnvVers::Current TrigRoiDescriptor
std::set< std::string > get_configured_chains()
std::vector< std::string > m_tauType
std::vector< std::string > m_muonType
size_t get_jets(Trig::FeatureContainer::combination_const_iterator citr, std::vector< TrackTrigObject > &objects, const std::string &key="")
retrieve the jets from the Roi
std::vector< std::string > m_tauProngs
std::vector< std::string > m_electronType
std::vector< std::string > m_rawElectrons
std::vector< bool > m_electronIsLRT
std::vector< bool > m_muonIsLRT
std::vector< std::string > m_vertexType
size_type size() const noexcept
Returns the number of elements in the collection.
const ID_type & dataID() const
Get the key that we reference, as a string.
ElementConstPointer cptr() const
Get a constant pointer to the referenced object.
bool composite() const
composite RoI methods
static std::vector< TIDA::Vertex > select(const xAOD::VertexContainer *xAODVertices, const std::vector< TIDA::Track * > *trackCollection=0, bool useType0=false, bool require_tracks=true)
unsigned processMuons(TrigTrackSelector &selectorRef, const unsigned int selection=0, double ETOffline=0, const std::string &containerName="Muons")
std::pair< typename Collection::const_iterator, typename Collection::const_iterator > getCollection(const ElementLink< TrigRoiDescriptorCollection > &roi_link, 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="Electrons")
std::string m_analysisInstanceName
bool selectTracks(TrigTrackSelector *selector, const ElementLink< TrigRoiDescriptorCollection > &roi_link, const std::string &key="")
unsigned processTaus(TrigTrackSelector &selectorRef, std::vector< TrackTrigObject > *tauvec=0, const unsigned selection=0, int requireNtracks=0, double EtCutOffline=0, const std::string &containerName="TauJets")
bool isPassed(unsigned int condition=TrigDefs::Physics) const
tells if chain group passed
uint32_t lumiBlock() const
The current event's luminosity block number.
uint32_t bcid() const
The bunch crossing ID of the event.
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
int ir
counter of the current depth
std::string date()
sadly, includes a return at the end
static const unsigned int includeFailedDecisions
Run3 synonym of alsoDeactivateTEs.
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
static const unsigned int allFeaturesOfType
Run 3 "enum". Return all features along legs (still with type and container checks).
static const unsigned int Physics
EventInfo_v1 EventInfo
Definition of the latest event info version.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.