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
100 <<
" compiled " << __DATE__ <<
" " << __TIME__ <<
"\t: " <<
date() <<
"␛[m" <<
endmsg;
101
102
103 bool foundOffline = false;
104
105
106 double xbeam = 0;
107 double ybeam = 0;
108 double zbeam = 0;
109 std::vector<double> beamline;
110
111
112
113 double xbeam_online = 0;
114 double ybeam_online = 0;
115 double zbeam_online = 0;
116
117 std::vector<double> beamline_online;
118
119
120
121
124
128 Filter_etaPT filterRef(5,500);
130 Filter_etaPT filter_etaPT(5.0,
m_ptmin);
132
133 TrackFilter* truthFilter = &filter_etaPT;
134
136
137 TrigTrackSelector selectorRef( &filter_etaPT );
138 TrigTrackSelector selectorTest( &filter );
139
140 TIDAVertexBuilder vertexBuilder;
141
142 if ( xbeam!=0 || ybeam!=0 ) {
143 selectorTruth.setBeamline( xbeam, ybeam, zbeam );
144 selectorRef.setBeamline( xbeam, ybeam, zbeam );
145 }
146
147 if ( xbeam_online!=0 || ybeam_online!=0 ) {
148 selectorTest.setBeamline( xbeam_online, ybeam_online, zbeam_online );
149 }
150
151 selectorTruth.correctTracks( true );
152 selectorRef.correctTracks( true );
153 selectorTest.correctTracks( true );
154
155
156
158
160
162 unsigned long long event_number = 0;
163 unsigned lumi_block = 0;
164 unsigned bunch_crossing_id = 0;
165 unsigned time_stamp = 0;
166 double mu_val = 0;
167
168 if (
retrieve(pEventInfo,
"EventInfo").isFailure() ) {
170 }
171 else {
176 bunch_crossing_id = pEventInfo->
bcid();
178 }
179
181 << "\tevent " << event_number
182 <<
"\tlb " << lumi_block <<
endmsg;
183
184 m_event->run_number(run_number);
185 m_event->event_number(event_number);
186 m_event->lumi_block(lumi_block);
187 m_event->time_stamp(time_stamp);
188 m_event->bunch_crossing_id(bunch_crossing_id);
190
191
192 const Trig::ChainGroup* L2chain=(*m_tdt)->getChainGroup("L2_.*");
193 const Trig::ChainGroup* EFchain=(*m_tdt)->getChainGroup("EF_.*");
194 const Trig::ChainGroup* HLTchain=(*m_tdt)->getChainGroup("HLT_.*");
195
197 <<
"L2 pass " << L2chain->
isPassed() <<
"\t"
198 <<
"EF pass " << EFchain->
isPassed() <<
"\t"
199 <<
"HLT pass " << HLTchain->
isPassed() <<
"␛[m"
201
204
205 bool analyse = false;
206
208
210
211 int passed_chains = 0;
212
214
217 return;
218 }
219
220 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
221
223
224
225
226 if (chainName.find("L2") == std::string::npos &&
227 chainName.find("EF") == std::string::npos &&
228 chainName.find("HLT") == std::string::npos ) continue;
229
230 if ( configuredHLTChains.find(chainName)==configuredHLTChains.end() ) {
231 m_provider->msg(MSG::WARNING) <<
"␛[91;1m" <<
"Chain " << chainName
232 << " is not configured for this event" << "␛[m"
234 continue;
235 }
236
239
240 std::string roistring = "";
242
243 bool passPhysics = (*m_tdt)->isPassed(chainName);
244
245 m_provider->msg(MSG::DEBUG) <<
"Chain " << chainName <<
"\troi " << roistring
246 << "\tpres " << (*m_tdt)->getPrescale(chainName)
247 << ( passPhysics ? "␛[91;1m" : "" ) << "\tpass physics " << passPhysics << ( passPhysics ? "␛[m" : "" )
248 <<
"\t: ( pass " << (*m_tdt)->isPassed(chainName, decisiontype ) <<
"\tdec type " << decisiontype <<
" ) " <<
endmsg;
249
250 if ( (*m_tdt)->isPassed(chainName, decisiontype ) || !
m_chainNames[ichain].passed() ) {
251 analyse = true;
252 passed_chains++;
253 }
254
255 }
256
257
258
262 m_provider->msg(MSG::DEBUG) <<
"No chains passed unprescaled - not processing this event: " <<
run_number <<
" " << event_number <<
" " << lumi_block <<
endmsg;
263 return;
264 }
265
266
268
269
271
272
273
274 selectorTruth.clear();
275
278
281 if (
retrieve(truthMap,
"TrigInDetTrackTruthMap").isFailure()) {
283 }
284 else {
286 }
288
290 }
294 }
298 }
302 }
306 }
307 else {
308 m_provider->msg(MSG::WARNING) <<
"Truth not found - none whatsoever!" <<
endmsg;
309 }
310 }
311
312
313
315
317
319
321
322 selectorRef.clear();
323
326 }
327 else if (
m_provider->evtStore()->contains<Rec::TrackParticleContainer>(
"TrackParticleCandidate")) {
329 }
330 else {
332 }
333
334
337
338 std::vector<TIDA::Vertex> vertices;
339
341 std::string vertexChainname = "Vertex";
345 }
346
348
350
351 if (
retrieve( xaodVtxCollection, vertexType ).isFailure()) {
353 }
354
355 if ( xaodVtxCollection!=0 ) {
356
358
359
360
361 if (
vertexType.find(
"SecVtx") != std::string::npos ) {
362 vertices = vertexBuilder.
select( xaodVtxCollection, &selectorRef.tracks(),
true );
363 }
364 else {
365 vertices = vertexBuilder.
select( xaodVtxCollection, &selectorRef.tracks() );
366 }
367 }
368
369
371 m_event->addChain( vertexChainname );
372 m_event->back().addRoi(TIDARoiDescriptor(
true));
373 m_event->back().back().addVertices( vertices );
374 }
375 }
376
378
380
383 m_event->back().addRoi(TIDARoiDescriptor(
true));
384 m_event->back().back().addTracks(selectorTruth.tracks());
385 }
386
387#if 0
389 for (
unsigned i=0 ;
i<vertices.size() ;
i++ ) {
391 m_event->addVertex(vertices[i]);
392 }
393#endif
394
396
397 int Noff = 0;
398 int Nmu = 0;
399 int Nel = 0;
400 int Ntau = 0;
401
403
405
406 m_event->addChain(
"Offline" );
407 m_event->back().addRoi(TIDARoiDescriptor(
true));
408 m_event->back().back().addTracks(selectorRef.tracks());
409
410 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
411 std::vector<double> beamline_;
412 beamline_.push_back( selectorRef.getBeamX() );
413 beamline_.push_back( selectorRef.getBeamY() );
414 beamline_.push_back( selectorRef.getBeamZ() );
415 m_event->back().back().addUserData(beamline_);
416 }
417
418
419 Noff = selectorRef.tracks().size();
420
421 m_provider->msg(MSG::DEBUG) <<
"ref tracks.size() " << selectorRef.tracks().size() <<
endmsg;
422 for (
int ii=selectorRef.tracks().size() ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" ref track " << ii <<
" " << *selectorRef.tracks()[ii] <<
endmsg;
423
424 }
425
427 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
428
430
431
434 std::string collectionname =
m_chainNames[ichain].tail();
436
437
438 if ( chainname!="" ) continue;
439 if ( collectionname=="" ) continue;
440
441 chainname = collectionname;
442 if ( vtx_name!="" ) chainname += ":" + vtx_name;
443
444
445
448
449 selectorTest.clear();
450
452
453 std::string collection_test = collectionname;
454 size_t pos = collectionname.find(
"/");
455 if ( pos!=std::string::npos ) collection_test = collectionname.substr( pos+1, collectionname.size()-pos );
456
457 if (
m_provider->evtStore()->contains<Rec::TrackParticleContainer>(collection_test)) {
459 }
462 }
465 }
468 }
469 else {
470 m_provider->msg(MSG::WARNING) <<
"\tcollection " << collectionname <<
" not found" <<
endmsg;
471 }
472
473
475
476 std::vector<TIDA::Vertex> tidavertices;
477
478 m_provider->msg(MSG::DEBUG) <<
"\tFetch xAOD::VertexContainer with key " << vtx_name <<
endmsg;
479
480 if ( vtx_name!="" ) {
481
482 m_provider->msg(MSG::DEBUG) <<
"\tFetch xAOD::VertexContainer with key " << vtx_name <<
endmsg;
483
485
487
488 if (
retrieve( xaodVtxCollection, vtx_name ).isFailure() ) {
489 if (
m_provider->msg().level() <= MSG::WARNING)
m_provider->msg(MSG::WARNING) <<
"xAOD vertex container not found with key " << vtx_name <<
endmsg;
490 }
491
492 if ( xaodVtxCollection!=0 ) {
493
494 m_provider->msg(MSG::DEBUG) <<
"\txAOD::VertexContainer found with size " << xaodVtxCollection->
size()
495 <<
"\t" << vtx_name <<
endmsg;
496
497
498
499 if ( vtx_name.find("SecVtx") != std::string::npos ) {
500 tidavertices = vertexBuilder.
select( xaodVtxCollection, 0,
true );
501 }
502 else {
503 tidavertices = vertexBuilder.
select( xaodVtxCollection );
504 }
505 }
506
507 }
508
509
510 if ( found ) {
511
512 m_event->addChain( chainname );
513 m_event->back().addRoi(TIDARoiDescriptor(
true));
514 if ( vtx_name!=
"" )
m_event->back().back().addVertices( tidavertices );
515 m_event->back().back().addTracks(selectorTest.tracks());
516
517 if ( selectorTest.getBeamX()!=0 || selectorTest.getBeamY()!=0 || selectorTest.getBeamZ()!=0 ) {
518 std::vector<double> beamline_;
519 beamline_.push_back( selectorTest.getBeamX() );
520 beamline_.push_back( selectorTest.getBeamY() );
521 beamline_.push_back( selectorTest.getBeamZ() );
522 m_event->back().back().addUserData(beamline_);
523 }
524
525 int Ntest = selectorTest.tracks().size();
526
527 m_provider->msg(MSG::DEBUG) <<
"collection " << collectionname <<
"\ttest tracks.size() " << Ntest <<
endmsg;
528 for (
int ii=Ntest ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" test track " << ii <<
" " << *selectorTest.tracks()[ii] <<
endmsg;
529 }
530 }
531
532
533 std::string ElectronRef[7] = {
534 "",
535 "TightCB", "MediumCB", "LooseCB",
536 "TightLH", "MediumLH", "LooseLH" };
537
538
540
544
545 int itype = -1;
547 if ( itype<0 ) continue;
548
549 std::vector<TrackTrigObject> elevec;
550
551 std::string echain = std::string("Electrons");
553
555
556 if ( Nel_ < 1 ) continue;
557
558 Nel += Nel_;
559
562
564 m_event->back().addRoi(TIDARoiDescriptor(
true));
565 m_event->back().back().addTracks(selectorRef.tracks());
566 m_event->back().back().addObjects( elevec );
567
568 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
569 std::vector<double> beamline_;
570 beamline_.push_back( selectorRef.getBeamX() );
571 beamline_.push_back( selectorRef.getBeamY() );
572 beamline_.push_back( selectorRef.getBeamZ() );
573 m_event->back().back().addUserData(beamline_);
574 }
575
576 }
577
578
579 std::string MuonRef[5] = { "", "Tight", "Medium", "Loose", "VeryLoose" };
580
582 for (
size_t imuon=0 ; imuon<
m_muonType.size() ; imuon++ ) {
583
585
586 int muonType = -1;
587 for (
int it=0 ;
it<5 ;
it++ )
if (
m_muonType[imuon] == MuonRef[it] ) muonType=
it;
588 if ( muonType<0 ) continue;
589
590 std::string mchain = "Muons";
592
593 int Nmu_ =
processMuons( selectorRef, muonType, 0, mchain );
594
595 if ( Nmu_ < 1 ) continue;
596
597 Nmu += Nmu_;
598
599 m_provider->msg(MSG::DEBUG) <<
"found " << Nmu <<
" offline muons " <<
endmsg;
600
602
604 m_event->back().addRoi(TIDARoiDescriptor(
true));
605 m_event->back().back().addTracks(selectorRef.tracks());
606
607 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
608 std::vector<double> beamline_;
609 beamline_.push_back( selectorRef.getBeamX() );
610 beamline_.push_back( selectorRef.getBeamY() );
611 beamline_.push_back( selectorRef.getBeamZ() );
612 m_event->back().back().addUserData(beamline_);
613 }
614
615 m_provider->msg(MSG::DEBUG) <<
"ref muon tracks.size() " << selectorRef.tracks().size() <<
endmsg;
616 for (
int ii=selectorRef.tracks().size() ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" ref muon track " << ii <<
" " << *selectorRef.tracks()[ii] <<
endmsg;
617 }
618
619
622
624
625 int muonType = 0;
626
628
629 m_provider->msg(MSG::DEBUG) <<
"found " << Nmu <<
" offline muons " <<
endmsg;
630
632 m_event->back().addRoi(TIDARoiDescriptor(
true));
633 m_event->back().back().addTracks(selectorRef.tracks());
634
635 m_provider->msg(MSG::DEBUG) <<
"ref muon tracks.size() " << selectorRef.tracks().size() <<
endmsg;
636 for (
int ii=selectorRef.tracks().size() ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" ref muon track " << ii <<
" " << *selectorRef.tracks()[ii] <<
endmsg;
637 }
638
639
640
642 std::string TauRef[4] = { "", "Tight", "Medium", "Loose" };
643
644
645 for (
size_t itau=0 ; itau<
m_tauType.size() ; itau++ ) {
648
649 int itype = -1;
650 for (
int it=0 ;
it<4 ;
it++ )
if (
m_tauType[itau]==TauRef[it] ) itype =
it;
651 if ( itype<0 ) continue;
652
654 int requireNtracks = 0;
655 if (
m_tauProngs[itau]==
"3Prong" ) requireNtracks = 3;
656 if (
m_tauProngs[itau]==
"1Prong" ) requireNtracks = 1;
657
658 std::vector<TrackTrigObject> tauvec;
659
660 int Ntau_ =
processTaus( selectorRef, &tauvec, itype, requireNtracks, 20000 );
661
662 Ntau += Ntau_;
663
664 if ( Ntau_ > 0 ) {
667
668 std::string tchain = std::string("Taus");
671
673 m_event->back().addRoi(TIDARoiDescriptor(
true));
674 m_event->back().back().addTracks(selectorRef.tracks());
675 m_event->back().back().addObjects( tauvec ) ;
676
677 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
678 std::vector<double> beamline_;
679 beamline_.push_back( selectorRef.getBeamX() );
680 beamline_.push_back( selectorRef.getBeamY() );
681 beamline_.push_back( selectorRef.getBeamZ() );
682 m_event->back().back().addUserData(beamline_);
683 }
684
685 }
686 }
687
688 if ( Nmu==0 && Noff==0 && Nel==0 && Ntau==0 )
m_provider->msg(MSG::DEBUG) <<
"No offline objects found " <<
endmsg;
689 else foundOffline = true;
690
691
692
693
694 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
695
696
697
699 const std::string& chainName =
m_chainNames[ichain].head();
700
702 const std::string& collectionName =
m_chainNames[ichain].tail();
703
704 if( chainName.find("L2_")==std::string::npos &&
705 chainName.find("EF_")==std::string::npos &&
706 chainName.find("HLT_")==std::string::npos ) continue;
707
710
711
712 m_provider->msg(MSG::DEBUG) <<
"chain " << chainName
713 << "\tprescale " << (*m_tdt)->getPrescale(chainName)
714 << "\tpass " << (*m_tdt)->isPassed(chainName) << " physics "
715 << " (req dec " << (*m_tdt)->isPassed(chainName, decisiontype ) << " dec type " << decisiontype << ")"
717
720
722 if ( !(*m_tdt)->isPassed( chainName, decisiontype ) ) continue;
723
725
726
729
730
731#if 0
736
737
738 if ( roi_name!="" ) {
739
740 std::string roi_name_tmp = roi_name;
741 std::string roi_tename = "";
742
743 if ( roi_name.find("/")!=std::string::npos ) {
744 roi_name_tmp = roi_name.substr( roi_name.find("/")+1, roi_name.size()-roi_name.find("/") );
745 roi_tename = roi_name.substr( 0, roi_name.find("/") );
746 }
747
749
750 if ( roist.size()>0 ) {
751 for (
unsigned ir=0 ;
ir<roist.size() ;
ir++ )
m_provider->msg(MSG::DEBUG) <<
"\t\tRetrieved roi " << roi_name <<
"\t" << *roist[
ir].cptr() <<
endmsg;
752 }
753 else {
754 m_provider->msg(MSG::WARNING) <<
"\t\tRequested roi " << roi_name <<
" not found" <<
endmsg;
755 }
756
757 }
758 else {
763 }
764#endif
765
766
768
770
772
775 }
776
777
778 std::string rgex = roi_key;
779
780 std::vector< TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> >
rois =
781 (*m_tdt)->template features<TrigRoiDescriptorCollection>( Trig::FeatureRequestDescriptor( chainName,
782 decisiontype,
783 rgex,
784 feature_type,
785 "roi",
786 leg ) );
787
790 if (
rois.empty() ) {
791 if ( !rgex.empty() ) {
792 rgex += "_probe";
793 rois = (*m_tdt)->template features<TrigRoiDescriptorCollection>( Trig::FeatureRequestDescriptor( chainName,
794 decisiontype,
795 rgex,
796 feature_type,
797 "roi",
798 leg ) );
799 }
800 }
801
802 int iroi = 0;
803
805
806 if (
rois.size()==0 )
continue;
807
809
811
813
815 for ( const TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection>& roi_info : rois ) {
816
817 iroi++;
818
822
823 if ( roi_key=="SuperRoi" && iroi>1 ) continue;
824
825 if ( roi_key.find("JetSuper")!=std::string::npos && iroi>1 ) continue;
826
827 const ElementLink<TrigRoiDescriptorCollection> roi_link = roi_info.link;
828
830 if ( roi_key!=
"" && roi_link.
dataID()!=rgex )
continue;
831
833
834 if ( roiptr == 0 ) {
835
836 continue;
837 }
838
839 if (
m_provider->msg().level() <= MSG::VERBOSE) {
840 m_provider->msg(MSG::VERBOSE) <<
" RoI descriptor for seeded chain " << chainName <<
" " << **roiptr <<
endmsg;
841 }
842
843 TIDARoiDescriptor* roi_tmp = new TIDARoiDescriptor( TIDARoiDescriptorBuilder(**roiptr) );
844
846
849
852
853 selectorTest.clear();
854
855
856 if ( chainName.find("HLT_")!=std::string::npos ) {
858 else {
859 if (
m_provider->msg().level() <= MSG::DEBUG) {
860 m_provider->msg(MSG::WARNING) <<
"\tNo track collection " << collectionName <<
" found" <<
endmsg;
861 }
862 }
863 }
864
866
867 std::vector<TIDA::Vertex> tidavertices;
868
869 if ( vtx_name!="" ) {
870
871 m_provider->msg(MSG::DEBUG) <<
"\tFetch xAOD::VertexContainer for chain " << chainName <<
" with key " << vtx_name <<
endmsg;
872
874
877
878 if ( vtx_itrpair.first == vtx_itrpair.second ) {
879 if (
m_provider->msg().level() <= MSG::DEBUG ) {
880 m_provider->msg(MSG::WARNING) <<
"\tNo xAOD::Vertex for chain " << chainName <<
" for key " << vtx_name <<
endmsg;
881 }
882 }
883 else {
884
885 m_provider->msg(MSG::DEBUG) <<
"\txAOD::VertexContainer found with size " << (vtx_itrpair.second - vtx_itrpair.first)
886 <<
"\t" << vtx_name <<
endmsg;
887
888
889
890 if ( vtx_name.find("SecVtx") != std::string::npos ) {
891 tidavertices = vertexBuilder.
select( vtx_itrpair.first, vtx_itrpair.second, &selectorRef.tracks(),
true );
892 }
893 else {
894 tidavertices = vertexBuilder.
select( vtx_itrpair.first, vtx_itrpair.second, &selectorTest.tracks() );
895 }
896 }
897 }
898
899#if 0
901
902 std::vector<TrackTrigObject>
jets;
903 if ( chainName.find("HLT_j")!=std::string::npos ) {
905 }
906#endif
907
908 const std::vector<TIDA::Track*>& testTracks = selectorTest.tracks();
909 m_provider->msg(MSG::DEBUG) <<
"\ttest tracks.size() " << testTracks.size() <<
endmsg;
910 for (unsigned int ii=0; ii < testTracks.size(); ii++) {
911 m_provider->msg(MSG::DEBUG) <<
" test track " << ii <<
"for chain " << chainName +
":" + collectionName <<
" " << *testTracks[ii] <<
endmsg;
912 }
913
914
915
916
917
918 if ( roi_tmp == 0 ) {
919 if ( testTracks.size()>0 )
m_provider->msg(MSG::WARNING) <<
"\ttest tracks.size() " << testTracks.size() <<
"found but no roi!!!" <<
endmsg;
920 roi_tmp = new TIDARoiDescriptor(true);
921 }
922
923 chain.addRoi( *roi_tmp );
924
925 chain.back().addTracks(testTracks);
926 chain.back().addVertices(tidavertices);
927
928#if 0
930 if ( chainName.find(
"HLT_j")!=std::string::npos )
chain.back().addObjects( jets );
931#endif
932
933 if ( selectorTest.getBeamX()!=0 || selectorTest.getBeamY()!=0 || selectorTest.getBeamZ()!=0 ) {
934 std::vector<double> beamline_;
935 beamline_.push_back( selectorTest.getBeamX() );
936 beamline_.push_back( selectorTest.getBeamY() );
937 beamline_.push_back( selectorTest.getBeamZ() );
938 chain.back().addUserData(beamline_);
939 }
940
941 delete roi_tmp;
942 roi_tmp = 0;
943
944 }
945
946 }
947
948#if 0
950
951 {
953
955
957
958 std::vector<std::string> chainnames =
m_event->chainnames();
959
961
962 for ( size_t ic=chainnames.size() ; ic-- ; ) {
963 if ( chainnames[ic] == "Offline" ) {
965 break;
966 }
967 }
968
969 if ( offline ) {
970
972 std::vector<TIDA::Chain>::iterator citr =
chains.begin();
973
974 std::vector<std::pair<double,double> > philims;
975
976 for ( ; citr!=
chains.end() ; ++citr ) {
977 if ( citr->name().find("HLT_")!=std::string::npos ) {
978 for (
size_t ir=0 ;
ir<citr->size() ;
ir++ ) {
979 TIDARoiDescriptor& roi = citr->rois()[
ir].roi();
981 for (
size_t isub=0 ; isub<roi.
size() ; isub++ ) {
982 philims.push_back( std::pair<double,double>( roi[isub]->phiMinus(), roi[isub]->phiPlus() ) );
983 }
984 }
985 else philims.push_back( std::pair<double,double>( roi.
phiMinus(), roi.
phiPlus() ) );
986 }
987 }
988 }
989
991
992 for (
size_t iroi=0 ; iroi<
offline->size() ; iroi++ ) {
993
994 std::vector<TIDA::Track>& tracks =
offline->rois()[iroi].tracks();
995
998
999
1000 for ( std::vector<TIDA::Track>::iterator it=tracks.begin() ; it<tracks.end() ; ) {
1001 bool inc = true;
1003 if ( std::fabs(
it->pT())<
m_ptmin ) { inc=
false; tracks.erase( it ); }
1004 }
1006 bool remove_track = true;
1007 for ( size_t isub=0 ; isub<philims.size() ; isub++ ) {
1008
1009 if ( philims[isub].first < philims[isub].second ) {
1010 if (
it->phi()>=philims[isub].first &&
it->phi()<=philims[isub].second ) {
1011 remove_track = false;
1012 break;
1013 }
1014 }
1015 else {
1016 if (
it->phi()>=philims[isub].first ||
it->phi()<=philims[isub].second ) {
1017 remove_track = false;
1018 break;
1019 }
1020 }
1021 }
1022 if ( remove_track ) { inc=false; tracks.erase( it ); }
1023 }
1025 }
1026
1029
1030
1031 }
1032
1033 }
1034
1035 }
1036 }
1037
1038#endif
1039
1041
1042}
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::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current TrigInDetTrackCollection
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
Return a pointer to the referenced element.
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)
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="ElectronAODCollection")
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="TauRecContainer")
unsigned processMuons(TrigTrackSelector &selectorRef, const unsigned int selection=0, double ETOffline=0, const std::string &containerName="StacoMuonCollection")
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.