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
277
280
282
284 }
288 }
292 }
296 }
300 }
301 else {
302 m_provider->msg(MSG::WARNING) <<
"Truth not found - none whatsoever!" <<
endmsg;
303 }
304 }
305
306
307
309
311
313
315
316 selectorRef.clear();
317
320 }
321 else if (
m_provider->evtStore()->contains<Rec::TrackParticleContainer>(
"TrackParticleCandidate")) {
323 }
324 else {
326 }
327
328
331
332 std::vector<TIDA::Vertex> vertices;
333
335 std::string vertexChainname = "Vertex";
339 }
340
342
344
345 if (
retrieve( xaodVtxCollection, vertexType ).isFailure()) {
347 }
348
349 if ( xaodVtxCollection!=0 ) {
350
352
353
354
355 if (
vertexType.find(
"SecVtx") != std::string::npos ) {
356 vertices = vertexBuilder.
select( xaodVtxCollection, &selectorRef.tracks(),
true );
357 }
358 else {
359 vertices = vertexBuilder.
select( xaodVtxCollection, &selectorRef.tracks() );
360 }
361 }
362
363
365 m_event->addChain( vertexChainname );
366 m_event->back().addRoi(TIDARoiDescriptor(
true));
367 m_event->back().back().addVertices( vertices );
368 }
369 }
370
372
374
377 m_event->back().addRoi(TIDARoiDescriptor(
true));
378 m_event->back().back().addTracks(selectorTruth.tracks());
379 }
380
381#if 0
383 for (
unsigned i=0 ;
i<vertices.size() ;
i++ ) {
385 m_event->addVertex(vertices[i]);
386 }
387#endif
388
390
391 int Noff = 0;
392 int Nmu = 0;
393 int Nel = 0;
394 int Ntau = 0;
395
397
399
400 m_event->addChain(
"Offline" );
401 m_event->back().addRoi(TIDARoiDescriptor(
true));
402 m_event->back().back().addTracks(selectorRef.tracks());
403
404 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
405 std::vector<double> beamline_;
406 beamline_.push_back( selectorRef.getBeamX() );
407 beamline_.push_back( selectorRef.getBeamY() );
408 beamline_.push_back( selectorRef.getBeamZ() );
409 m_event->back().back().addUserData(beamline_);
410 }
411
412
413 Noff = selectorRef.tracks().size();
414
415 m_provider->msg(MSG::DEBUG) <<
"ref tracks.size() " << selectorRef.tracks().size() <<
endmsg;
416 for (
int ii=selectorRef.tracks().size() ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" ref track " << ii <<
" " << *selectorRef.tracks()[ii] <<
endmsg;
417
418 }
419
421 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
422
424
425
428 std::string collectionname =
m_chainNames[ichain].tail();
430
431
432 if ( chainname!="" ) continue;
433 if ( collectionname=="" ) continue;
434
435 chainname = collectionname;
436 if ( vtx_name!="" ) chainname += ":" + vtx_name;
437
438
439
442
443 selectorTest.clear();
444
446
447 std::string collection_test = collectionname;
448 size_t pos = collectionname.find(
"/");
449 if ( pos!=std::string::npos ) collection_test = collectionname.substr( pos+1, collectionname.size()-pos );
450
451 if (
m_provider->evtStore()->contains<Rec::TrackParticleContainer>(collection_test)) {
453 }
456 }
459 }
460 else {
461 m_provider->msg(MSG::WARNING) <<
"\tcollection " << collectionname <<
" not found" <<
endmsg;
462 }
463
464
466
467 std::vector<TIDA::Vertex> tidavertices;
468
469 m_provider->msg(MSG::DEBUG) <<
"\tFetch xAOD::VertexContainer with key " << vtx_name <<
endmsg;
470
471 if ( vtx_name!="" ) {
472
473 m_provider->msg(MSG::DEBUG) <<
"\tFetch xAOD::VertexContainer with key " << vtx_name <<
endmsg;
474
476
478
479 if (
retrieve( xaodVtxCollection, vtx_name ).isFailure() ) {
480 if (
m_provider->msg().level() <= MSG::WARNING)
m_provider->msg(MSG::WARNING) <<
"xAOD vertex container not found with key " << vtx_name <<
endmsg;
481 }
482
483 if ( xaodVtxCollection!=0 ) {
484
485 m_provider->msg(MSG::DEBUG) <<
"\txAOD::VertexContainer found with size " << xaodVtxCollection->
size()
486 <<
"\t" << vtx_name <<
endmsg;
487
488
489
490 if ( vtx_name.find("SecVtx") != std::string::npos ) {
491 tidavertices = vertexBuilder.
select( xaodVtxCollection, 0,
true );
492 }
493 else {
494 tidavertices = vertexBuilder.
select( xaodVtxCollection );
495 }
496 }
497
498 }
499
500
501 if ( found ) {
502
503 m_event->addChain( chainname );
504 m_event->back().addRoi(TIDARoiDescriptor(
true));
505 if ( vtx_name!=
"" )
m_event->back().back().addVertices( tidavertices );
506 m_event->back().back().addTracks(selectorTest.tracks());
507
508 if ( selectorTest.getBeamX()!=0 || selectorTest.getBeamY()!=0 || selectorTest.getBeamZ()!=0 ) {
509 std::vector<double> beamline_;
510 beamline_.push_back( selectorTest.getBeamX() );
511 beamline_.push_back( selectorTest.getBeamY() );
512 beamline_.push_back( selectorTest.getBeamZ() );
513 m_event->back().back().addUserData(beamline_);
514 }
515
516 int Ntest = selectorTest.tracks().size();
517
518 m_provider->msg(MSG::DEBUG) <<
"collection " << collectionname <<
"\ttest tracks.size() " << Ntest <<
endmsg;
519 for (
int ii=Ntest ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" test track " << ii <<
" " << *selectorTest.tracks()[ii] <<
endmsg;
520 }
521 }
522
523
524 std::string ElectronRef[7] = {
525 "",
526 "TightCB", "MediumCB", "LooseCB",
527 "TightLH", "MediumLH", "LooseLH" };
528
529
531
535
536 int itype = -1;
538 if ( itype<0 ) continue;
539
540 std::vector<TrackTrigObject> elevec;
541
542 std::string echain = std::string("Electrons");
544
546
547 if ( Nel_ < 1 ) continue;
548
549 Nel += Nel_;
550
553
555 m_event->back().addRoi(TIDARoiDescriptor(
true));
556 m_event->back().back().addTracks(selectorRef.tracks());
557 m_event->back().back().addObjects( elevec );
558
559 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
560 std::vector<double> beamline_;
561 beamline_.push_back( selectorRef.getBeamX() );
562 beamline_.push_back( selectorRef.getBeamY() );
563 beamline_.push_back( selectorRef.getBeamZ() );
564 m_event->back().back().addUserData(beamline_);
565 }
566
567 }
568
569
570 std::string MuonRef[5] = { "", "Tight", "Medium", "Loose", "VeryLoose" };
571
573 for (
size_t imuon=0 ; imuon<
m_muonType.size() ; imuon++ ) {
574
576
577 int muonType = -1;
578 for (
int it=0 ;
it<5 ;
it++ )
if (
m_muonType[imuon] == MuonRef[it] ) muonType=
it;
579 if ( muonType<0 ) continue;
580
581 std::string mchain = "Muons";
583
584 int Nmu_ =
processMuons( selectorRef, muonType, 0, mchain );
585
586 if ( Nmu_ < 1 ) continue;
587
588 Nmu += Nmu_;
589
590 m_provider->msg(MSG::DEBUG) <<
"found " << Nmu <<
" offline muons " <<
endmsg;
591
593
595 m_event->back().addRoi(TIDARoiDescriptor(
true));
596 m_event->back().back().addTracks(selectorRef.tracks());
597
598 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
599 std::vector<double> beamline_;
600 beamline_.push_back( selectorRef.getBeamX() );
601 beamline_.push_back( selectorRef.getBeamY() );
602 beamline_.push_back( selectorRef.getBeamZ() );
603 m_event->back().back().addUserData(beamline_);
604 }
605
606 m_provider->msg(MSG::DEBUG) <<
"ref muon tracks.size() " << selectorRef.tracks().size() <<
endmsg;
607 for (
int ii=selectorRef.tracks().size() ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" ref muon track " << ii <<
" " << *selectorRef.tracks()[ii] <<
endmsg;
608 }
609
610
613
615
616 int muonType = 0;
617
619
620 m_provider->msg(MSG::DEBUG) <<
"found " << Nmu <<
" offline muons " <<
endmsg;
621
623 m_event->back().addRoi(TIDARoiDescriptor(
true));
624 m_event->back().back().addTracks(selectorRef.tracks());
625
626 m_provider->msg(MSG::DEBUG) <<
"ref muon tracks.size() " << selectorRef.tracks().size() <<
endmsg;
627 for (
int ii=selectorRef.tracks().size() ; ii-- ; )
m_provider->msg(MSG::DEBUG) <<
" ref muon track " << ii <<
" " << *selectorRef.tracks()[ii] <<
endmsg;
628 }
629
630
631
633 std::string TauRef[4] = { "", "Tight", "Medium", "Loose" };
634
635
636 for (
size_t itau=0 ; itau<
m_tauType.size() ; itau++ ) {
639
640 int itype = -1;
641 for (
int it=0 ;
it<4 ;
it++ )
if (
m_tauType[itau]==TauRef[it] ) itype =
it;
642 if ( itype<0 ) continue;
643
645 int requireNtracks = 0;
646 if (
m_tauProngs[itau]==
"3Prong" ) requireNtracks = 3;
647 if (
m_tauProngs[itau]==
"1Prong" ) requireNtracks = 1;
648
649 std::vector<TrackTrigObject> tauvec;
650
651 int Ntau_ =
processTaus( selectorRef, &tauvec, itype, requireNtracks, 20000 );
652
653 Ntau += Ntau_;
654
655 if ( Ntau_ > 0 ) {
658
659 std::string tchain = std::string("Taus");
662
664 m_event->back().addRoi(TIDARoiDescriptor(
true));
665 m_event->back().back().addTracks(selectorRef.tracks());
666 m_event->back().back().addObjects( tauvec ) ;
667
668 if ( selectorRef.getBeamX()!=0 || selectorRef.getBeamY()!=0 || selectorRef.getBeamZ()!=0 ) {
669 std::vector<double> beamline_;
670 beamline_.push_back( selectorRef.getBeamX() );
671 beamline_.push_back( selectorRef.getBeamY() );
672 beamline_.push_back( selectorRef.getBeamZ() );
673 m_event->back().back().addUserData(beamline_);
674 }
675
676 }
677 }
678
679 if ( Nmu==0 && Noff==0 && Nel==0 && Ntau==0 )
m_provider->msg(MSG::DEBUG) <<
"No offline objects found " <<
endmsg;
680 else foundOffline = true;
681
682
683
684
685 for (
unsigned ichain=0 ; ichain<
m_chainNames.size() ; ichain++ ) {
686
687
688
690 const std::string& chainName =
m_chainNames[ichain].head();
691
693 const std::string& collectionName =
m_chainNames[ichain].tail();
694
695 if( chainName.find("L2_")==std::string::npos &&
696 chainName.find("EF_")==std::string::npos &&
697 chainName.find("HLT_")==std::string::npos ) continue;
698
701
702
703 m_provider->msg(MSG::DEBUG) <<
"chain " << chainName
704 << "\tprescale " << (*m_tdt)->getPrescale(chainName)
705 << "\tpass " << (*m_tdt)->isPassed(chainName) << " physics "
706 << " (req dec " << (*m_tdt)->isPassed(chainName, decisiontype ) << " dec type " << decisiontype << ")"
708
711
713 if ( !(*m_tdt)->isPassed( chainName, decisiontype ) ) continue;
714
716
717
720
721
722#if 0
727
728
729 if ( roi_name!="" ) {
730
731 std::string roi_name_tmp = roi_name;
732 std::string roi_tename = "";
733
734 if ( roi_name.find("/")!=std::string::npos ) {
735 roi_name_tmp = roi_name.substr( roi_name.find("/")+1, roi_name.size()-roi_name.find("/") );
736 roi_tename = roi_name.substr( 0, roi_name.find("/") );
737 }
738
740
741 if ( roist.size()>0 ) {
742 for (
unsigned ir=0 ;
ir<roist.size() ;
ir++ )
m_provider->msg(MSG::DEBUG) <<
"\t\tRetrieved roi " << roi_name <<
"\t" << *roist[
ir].cptr() <<
endmsg;
743 }
744 else {
745 m_provider->msg(MSG::WARNING) <<
"\t\tRequested roi " << roi_name <<
" not found" <<
endmsg;
746 }
747
748 }
749 else {
754 }
755#endif
756
757
759
761
763
766 }
767
768
769 std::string rgex = roi_key;
770
771 std::vector< TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection> > rois =
772 (*m_tdt)->template features<TrigRoiDescriptorCollection>( Trig::FeatureRequestDescriptor( chainName,
773 decisiontype,
774 rgex,
775 feature_type,
776 "roi",
777 leg ) );
778
781 if ( rois.empty() ) {
782 if ( !rgex.empty() ) {
783 rgex += "_probe";
784 rois = (*m_tdt)->template features<TrigRoiDescriptorCollection>( Trig::FeatureRequestDescriptor( chainName,
785 decisiontype,
786 rgex,
787 feature_type,
788 "roi",
789 leg ) );
790 }
791 }
792
793 int iroi = 0;
794
796
797 if ( rois.size()==0 ) continue;
798
800
802
804
806 for ( const TrigCompositeUtils::LinkInfo<TrigRoiDescriptorCollection>& roi_info : rois ) {
807
808 iroi++;
809
813
814 if ( roi_key=="SuperRoi" && iroi>1 ) continue;
815
816 if ( roi_key.find("JetSuper")!=std::string::npos && iroi>1 ) continue;
817
818 const ElementLink<TrigRoiDescriptorCollection> roi_link = roi_info.link;
819
821 if ( roi_key!=
"" && roi_link.
dataID()!=rgex )
continue;
822
824
825 if ( roiptr == 0 ) {
826
827 continue;
828 }
829
830 if (
m_provider->msg().level() <= MSG::VERBOSE) {
831 m_provider->msg(MSG::VERBOSE) <<
" RoI descriptor for seeded chain " << chainName <<
" " << **roiptr <<
endmsg;
832 }
833
834 TIDARoiDescriptor* roi_tmp = new TIDARoiDescriptor( TIDARoiDescriptorBuilder(**roiptr) );
835
837
840
843
844 selectorTest.clear();
845
846
847 if ( chainName.find("HLT_")!=std::string::npos ) {
849 else {
850 if (
m_provider->msg().level() <= MSG::DEBUG) {
851 m_provider->msg(MSG::WARNING) <<
"\tNo track collection " << collectionName <<
" found" <<
endmsg;
852 }
853 }
854 }
855
857
858 std::vector<TIDA::Vertex> tidavertices;
859
860 if ( vtx_name!="" ) {
861
862 m_provider->msg(MSG::DEBUG) <<
"\tFetch xAOD::VertexContainer for chain " << chainName <<
" with key " << vtx_name <<
endmsg;
863
865
868
869 if ( vtx_itrpair.first == vtx_itrpair.second ) {
870 if (
m_provider->msg().level() <= MSG::DEBUG ) {
871 m_provider->msg(MSG::WARNING) <<
"\tNo xAOD::Vertex for chain " << chainName <<
" for key " << vtx_name <<
endmsg;
872 }
873 }
874 else {
875
876 m_provider->msg(MSG::DEBUG) <<
"\txAOD::VertexContainer found with size " << (vtx_itrpair.second - vtx_itrpair.first)
877 <<
"\t" << vtx_name <<
endmsg;
878
879
880
881 if ( vtx_name.find("SecVtx") != std::string::npos ) {
882 tidavertices = vertexBuilder.
select( vtx_itrpair.first, vtx_itrpair.second, &selectorRef.tracks(),
true );
883 }
884 else {
885 tidavertices = vertexBuilder.
select( vtx_itrpair.first, vtx_itrpair.second, &selectorTest.tracks() );
886 }
887 }
888 }
889
890#if 0
892
893 std::vector<TrackTrigObject>
jets;
894 if ( chainName.find("HLT_j")!=std::string::npos ) {
896 }
897#endif
898
899 const std::vector<TIDA::Track*>& testTracks = selectorTest.tracks();
900 m_provider->msg(MSG::DEBUG) <<
"\ttest tracks.size() " << testTracks.size() <<
endmsg;
901 for (unsigned int ii=0; ii < testTracks.size(); ii++) {
902 m_provider->msg(MSG::DEBUG) <<
" test track " << ii <<
"for chain " << chainName +
":" + collectionName <<
" " << *testTracks[ii] <<
endmsg;
903 }
904
905
906
907
908
909 if ( roi_tmp == 0 ) {
910 if ( testTracks.size()>0 )
m_provider->msg(MSG::WARNING) <<
"\ttest tracks.size() " << testTracks.size() <<
"found but no roi!!!" <<
endmsg;
911 roi_tmp = new TIDARoiDescriptor(true);
912 }
913
914 chain.addRoi( *roi_tmp );
915
916 chain.back().addTracks(testTracks);
917 chain.back().addVertices(tidavertices);
918
919#if 0
921 if ( chainName.find(
"HLT_j")!=std::string::npos )
chain.back().addObjects( jets );
922#endif
923
924 if ( selectorTest.getBeamX()!=0 || selectorTest.getBeamY()!=0 || selectorTest.getBeamZ()!=0 ) {
925 std::vector<double> beamline_;
926 beamline_.push_back( selectorTest.getBeamX() );
927 beamline_.push_back( selectorTest.getBeamY() );
928 beamline_.push_back( selectorTest.getBeamZ() );
929 chain.back().addUserData(beamline_);
930 }
931
932 delete roi_tmp;
933 roi_tmp = 0;
934
935 }
936
937 }
938
939#if 0
941
942 {
944
946
948
949 std::vector<std::string> chainnames =
m_event->chainnames();
950
952
953 for ( size_t ic=chainnames.size() ; ic-- ; ) {
954 if ( chainnames[ic] == "Offline" ) {
956 break;
957 }
958 }
959
960 if ( offline ) {
961
963 std::vector<TIDA::Chain>::iterator citr =
chains.begin();
964
965 std::vector<std::pair<double,double> > philims;
966
967 for ( ; citr!=
chains.end() ; ++citr ) {
968 if ( citr->name().find("HLT_")!=std::string::npos ) {
969 for (
size_t ir=0 ;
ir<citr->size() ;
ir++ ) {
970 TIDARoiDescriptor& roi = citr->rois()[
ir].roi();
972 for (
size_t isub=0 ; isub<roi.
size() ; isub++ ) {
973 philims.push_back( std::pair<double,double>( roi[isub]->phiMinus(), roi[isub]->phiPlus() ) );
974 }
975 }
976 else philims.push_back( std::pair<double,double>( roi.
phiMinus(), roi.
phiPlus() ) );
977 }
978 }
979 }
980
982
983 for (
size_t iroi=0 ; iroi<
offline->size() ; iroi++ ) {
984
985 std::vector<TIDA::Track>& tracks =
offline->rois()[iroi].tracks();
986
989
990
991 for ( std::vector<TIDA::Track>::iterator it=tracks.begin() ; it<tracks.end() ; ) {
992 bool inc = true;
994 if ( std::fabs(
it->pT())<
m_ptmin ) { inc=
false; tracks.erase( it ); }
995 }
997 bool remove_track = true;
998 for ( size_t isub=0 ; isub<philims.size() ; isub++ ) {
999
1000 if ( philims[isub].first < philims[isub].second ) {
1001 if (
it->phi()>=philims[isub].first &&
it->phi()<=philims[isub].second ) {
1002 remove_track = false;
1003 break;
1004 }
1005 }
1006 else {
1007 if (
it->phi()>=philims[isub].first ||
it->phi()<=philims[isub].second ) {
1008 remove_track = false;
1009 break;
1010 }
1011 }
1012 }
1013 if ( remove_track ) { inc=false; tracks.erase( it ); }
1014 }
1016 }
1017
1020
1021
1022 }
1023
1024 }
1025
1026 }
1027 }
1028
1029#endif
1030
1032
1033}
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)
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="TauJets")
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.