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  m_ps = &pset;
38 
39  produces<l1t::RegionalMuonCandBxCollection>("BMTF");
40  produces<l1t::RegionalMuonCandBxCollection>("UnsortedBMTF");
41  produces<vector<L1MuBMTrack> >("BMTF");
42  produces<vector<L1MuBMTrackSegPhi> >("BMTF");
43  produces<vector<L1MuBMTrackSegEta> >("BMTF");
44 
45  usesResource("L1TMuonBarrelTrackProducer");
46  setup1 = new L1MuBMTFSetup(*m_ps, consumesCollector());
47 }
48 
50 
52  if (L1MuBMTFConfig::Debug(1))
53  cout << endl;
54  if (L1MuBMTFConfig::Debug(1))
55  cout << "**** L1MuonBMTFTrigger processing event ****" << endl;
56 
57  L1MuBMTrackFinder* dtbx = setup1->TrackFinder();
58  dtbx->clear();
59 
60  dtbx->run(e, c);
61 
62  int ndt = dtbx->numberOfTracks();
63  if (L1MuBMTFConfig::Debug(1))
64  cout << "Number of muons found by the L1 BBMX TRIGGER : " << ndt << endl;
65 
66  std::unique_ptr<l1t::RegionalMuonCandBxCollection> tra_product(new l1t::RegionalMuonCandBxCollection);
67  std::unique_ptr<l1t::RegionalMuonCandBxCollection> vec_product(new l1t::RegionalMuonCandBxCollection);
68  unique_ptr<vector<L1MuBMTrack> > vec_L1MuBMTrack(new vector<L1MuBMTrack>);
69  unique_ptr<vector<L1MuBMTrackSegPhi> > vec_L1MuBMTrackSegPhi(new vector<L1MuBMTrackSegPhi>);
70  unique_ptr<vector<L1MuBMTrackSegEta> > vec_L1MuBMTrackSegEta(new vector<L1MuBMTrackSegEta>);
71 
74  *tra_product = dtTracks;
75 
78  *vec_product = BMTracks;
79 
80  *vec_L1MuBMTrack = dtbx->getcache1();
81  *vec_L1MuBMTrackSegPhi = dtbx->getcache2();
82  *vec_L1MuBMTrackSegEta = dtbx->getcache3();
83 
84  //for (int ibx = BMTracks.getFirstBX(); ibx <= BMTracks.getLastBX(); ibx++){
85  //cout << "DEBUG: BMTF size at bx " << ibx << " " << BMTracks.size(ibx) << "\n";
86  //}
87  e.put(std::move(tra_product), "UnsortedBMTF");
88  e.put(std::move(vec_product), "BMTF");
89  e.put(std::move(vec_L1MuBMTrack), "BMTF");
90  e.put(std::move(vec_L1MuBMTrackSegPhi), "BMTF");
91  e.put(std::move(vec_L1MuBMTrackSegEta), "BMTF");
92 }
93 
L1MuBMTrackCollection & getcache1()
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
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
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
L1MuBMTrackSegPhiCollection & getcache2()
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