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 
L1MuBMTrackCollection & getcache1()
void produce(edm::Event &e, const edm::EventSetup &c) override
Produce digis out of raw data.
int numberOfTracks()
get number of muon candidates found by the barrel MTTF
L1MuBMTrackSegPhiCollection & getcache2()
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
L1MuBMTrackSegEtaCollection & getcache3()
~L1TMuonBarrelTrackProducer() override
Destructor.
static bool Debug()
l1t::RegionalMuonCandBxCollection & getcache()
L1TMuonBarrelTrackProducer(const edm::ParameterSet &pset)
Constructor.
l1t::RegionalMuonCandBxCollection & getcache0()
def move(src, dest)
Definition: eostools.py:511