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 
27 
31 
32 #include <iostream>
33 #include <iomanip>
34 
35 using namespace std;
36 
38  m_ps = &pset;
39 
40 
41  produces<l1t::RegionalMuonCandBxCollection>("BMTF");
42  produces<l1t::RegionalMuonCandBxCollection>("UnsortedBMTF");
43  produces<vector<L1MuBMTrack> >("BMTF");
44  produces<vector<L1MuBMTrackSegPhi> >("BMTF");
45  produces<vector<L1MuBMTrackSegEta> >("BMTF");
46 
47  usesResource("L1TMuonBarrelTrackProducer");
48  setup1 = new L1MuBMTFSetup(*m_ps,consumesCollector());
49 
50 
51 }
52 
54 
55  delete setup1;
56 }
57 
59 
60 
61  if ( L1MuBMTFConfig::Debug(1) ) cout << endl;
62  if ( L1MuBMTFConfig::Debug(1) ) cout << "**** L1MuonBMTFTrigger processing event ****" << endl;
63 
64  L1MuBMTrackFinder* dtbx = setup1->TrackFinder();
65  dtbx->clear();
66 
67  dtbx->run(e,c);
68 
69  int ndt = dtbx->numberOfTracks();
70  if ( L1MuBMTFConfig::Debug(1) ) cout << "Number of muons found by the L1 BBMX TRIGGER : "
71  << ndt << endl;
72 
73  std::unique_ptr<l1t::RegionalMuonCandBxCollection> tra_product(new l1t::RegionalMuonCandBxCollection);
74  std::unique_ptr<l1t::RegionalMuonCandBxCollection> vec_product(new l1t::RegionalMuonCandBxCollection);
75  unique_ptr<vector<L1MuBMTrack> > vec_L1MuBMTrack(new vector<L1MuBMTrack>);
76  unique_ptr<vector<L1MuBMTrackSegPhi> > vec_L1MuBMTrackSegPhi(new vector<L1MuBMTrackSegPhi>);
77  unique_ptr<vector<L1MuBMTrackSegEta> > vec_L1MuBMTrackSegEta(new vector<L1MuBMTrackSegEta>);
78 
81  *tra_product = dtTracks;
82 
85  *vec_product = BMTracks;
86 
87  *vec_L1MuBMTrack = dtbx->getcache1();
88  *vec_L1MuBMTrackSegPhi = dtbx->getcache2();
89  *vec_L1MuBMTrackSegEta = dtbx->getcache3();
90 
91  //for (int ibx = BMTracks.getFirstBX(); ibx <= BMTracks.getLastBX(); ibx++){
92  //cout << "DEBUG: BMTF size at bx " << ibx << " " << BMTracks.size(ibx) << "\n";
93  //}
94  e.put(std::move(tra_product),"UnsortedBMTF");
95  e.put(std::move(vec_product),"BMTF");
96  e.put(std::move(vec_L1MuBMTrack),"BMTF");
97  e.put(std::move(vec_L1MuBMTrackSegPhi),"BMTF");
98  e.put(std::move(vec_L1MuBMTrackSegEta),"BMTF");
99 }
100 
101 
104 
L1MuBMTrackCollection & getcache1()
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
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:17
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:510