CMS 3D CMS Logo

L1TMuonBarrelTrackProducer.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1TMuonBarrelTrackProducer
4 //
5 // L1 BM Track Finder EDProducer
6 //
7 //
8 //
9 // Author :
10 // J. Troconiz UAM Madrid
11 // Modified :
12 // G. Flouris U Ioannina
13 //--------------------------------------------------
14 
16 
19 
26 
30 
31 #include <iostream>
32 #include <iomanip>
33 
34 using namespace std;
35 
37  produces<l1t::RegionalMuonCandBxCollection>("BMTF");
38  produces<l1t::RegionalMuonCandBxCollection>("UnsortedBMTF");
39  produces<vector<L1MuBMTrack> >("BMTF");
40  produces<vector<L1MuBMTrackSegPhi> >("BMTF");
41  produces<vector<L1MuBMTrackSegEta> >("BMTF");
42 
43  usesResource("L1TMuonBarrelTrackProducer");
44  setup1 = std::make_unique<L1MuBMTFSetup>(pset, consumesCollector());
45 }
46 
48 
50  if (L1MuBMTFConfig::Debug(1))
51  cout << endl;
52  if (L1MuBMTFConfig::Debug(1))
53  cout << "**** L1MuonBMTFTrigger processing event ****" << endl;
54 
55  L1MuBMTrackFinder* dtbx = setup1->TrackFinder();
56  dtbx->clear();
57 
58  dtbx->run(e, c);
59 
60  int ndt = dtbx->numberOfTracks();
61  if (L1MuBMTFConfig::Debug(1))
62  cout << "Number of muons found by the L1 BBMX TRIGGER : " << ndt << endl;
63 
64  std::unique_ptr<l1t::RegionalMuonCandBxCollection> tra_product(new l1t::RegionalMuonCandBxCollection);
65  std::unique_ptr<l1t::RegionalMuonCandBxCollection> vec_product(new l1t::RegionalMuonCandBxCollection);
66  unique_ptr<vector<L1MuBMTrack> > vec_L1MuBMTrack(new vector<L1MuBMTrack>);
67  unique_ptr<vector<L1MuBMTrackSegPhi> > vec_L1MuBMTrackSegPhi(new vector<L1MuBMTrackSegPhi>);
68  unique_ptr<vector<L1MuBMTrackSegEta> > vec_L1MuBMTrackSegEta(new vector<L1MuBMTrackSegEta>);
69 
72  *tra_product = dtTracks;
73 
76  *vec_product = BMTracks;
77 
78  *vec_L1MuBMTrack = dtbx->getcache1();
79  *vec_L1MuBMTrackSegPhi = dtbx->getcache2();
80  *vec_L1MuBMTrackSegEta = dtbx->getcache3();
81 
82  //for (int ibx = BMTracks.getFirstBX(); ibx <= BMTracks.getLastBX(); ibx++){
83  //cout << "DEBUG: BMTF size at bx " << ibx << " " << BMTracks.size(ibx) << "\n";
84  //}
85  e.put(std::move(tra_product), "UnsortedBMTF");
86  e.put(std::move(vec_product), "BMTF");
87  e.put(std::move(vec_L1MuBMTrack), "BMTF");
88  e.put(std::move(vec_L1MuBMTrackSegPhi), "BMTF");
89  e.put(std::move(vec_L1MuBMTrackSegEta), "BMTF");
90 }
91 
L1MuBMTrackFinder::numberOfTracks
int numberOfTracks()
get number of muon candidates found by the barrel MTTF
Definition: L1MuBMTrackFinder.cc:414
Handle.h
L1MuBMTrackFinder::getcache1
L1MuBMTrackCollection & getcache1()
Definition: L1MuBMTrackFinder.h:121
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1TMuonBarrelTrackProducer
Definition: L1TMuonBarrelTrackProducer.h:23
L1MuBMTrackFinder.h
L1MuBMTrackFinder::clear
void clear()
Definition: L1MuBMTrackFinder.cc:426
L1MuDTChambThContainer.h
L1TMuonBarrelTrackProducer::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Produce digis out of raw data.
Definition: L1TMuonBarrelTrackProducer.cc:49
L1TMuonBarrelTrackProducer.h
BXVector< RegionalMuonCand >
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
L1MuBMTFConfig::Debug
static bool Debug()
Definition: L1MuBMTFConfig.h:52
EDGetToken.h
L1MuBMTrackFinder::run
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
Definition: L1MuBMTrackFinder.cc:161
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
L1MuBMTrackFinder::getcache2
L1MuBMTrackSegPhiCollection & getcache2()
Definition: L1MuBMTrackFinder.h:122
L1MuBMTFConfig.h
L1TMuonBarrelTrackProducer::~L1TMuonBarrelTrackProducer
~L1TMuonBarrelTrackProducer() override
Destructor.
Definition: L1TMuonBarrelTrackProducer.cc:47
edm::EventSetup
Definition: EventSetup.h:58
L1MuDTChambPhContainer.h
InputTag.h
L1MuBMTrackFinder::getcache3
L1MuBMTrackSegEtaCollection & getcache3()
Definition: L1MuBMTrackFinder.h:123
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
L1MuBMTrackFinder::getcache
l1t::RegionalMuonCandBxCollection & getcache()
Definition: L1MuBMTrackFinder.h:119
L1MuBMTrackFinder::getcache0
l1t::RegionalMuonCandBxCollection & getcache0()
Definition: L1MuBMTrackFinder.h:120
L1TMuonBarrelTrackProducer::L1TMuonBarrelTrackProducer
L1TMuonBarrelTrackProducer(const edm::ParameterSet &pset)
Constructor.
Definition: L1TMuonBarrelTrackProducer.cc:36
L1MuBMTFSetup.h
ConsumesCollector.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
edm::Event
Definition: Event.h:73
TrackStub.h
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
L1MuBMTrackFinder
Definition: L1MuBMTrackFinder.h:69