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 
L1MuBMTrackFinder::numberOfTracks
int numberOfTracks()
get number of muon candidates found by the barrel MTTF
Definition: L1MuBMTrackFinder.cc:413
Handle.h
L1MuBMTFSetup
Definition: L1MuBMTFSetup.h:39
L1MuBMTrackFinder::getcache1
L1MuBMTrackCollection & getcache1()
Definition: L1MuBMTrackFinder.h:118
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1TMuonBarrelTrackProducer
Definition: L1TMuonBarrelTrackProducer.h:23
L1MuBMTrackFinder.h
L1MuBMTrackFinder::clear
void clear()
Definition: L1MuBMTrackFinder.cc:425
L1MuDTChambThContainer.h
L1TMuonBarrelTrackProducer::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Produce digis out of raw data.
Definition: L1TMuonBarrelTrackProducer.cc:51
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:54
EDGetToken.h
L1MuBMTrackFinder::run
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
Definition: L1MuBMTrackFinder.cc:160
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
L1MuBMTrackFinder::getcache2
L1MuBMTrackSegPhiCollection & getcache2()
Definition: L1MuBMTrackFinder.h:119
L1MuBMTFConfig.h
L1TMuonBarrelTrackProducer::~L1TMuonBarrelTrackProducer
~L1TMuonBarrelTrackProducer() override
Destructor.
Definition: L1TMuonBarrelTrackProducer.cc:49
edm::EventSetup
Definition: EventSetup.h:58
L1MuDTChambPhContainer.h
InputTag.h
L1MuBMTrackFinder::getcache3
L1MuBMTrackSegEtaCollection & getcache3()
Definition: L1MuBMTrackFinder.h:120
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
L1MuBMTrackFinder::getcache
l1t::RegionalMuonCandBxCollection & getcache()
Definition: L1MuBMTrackFinder.h:116
L1MuBMTrackFinder::getcache0
l1t::RegionalMuonCandBxCollection & getcache0()
Definition: L1MuBMTrackFinder.h:117
L1TMuonBarrelTrackProducer::L1TMuonBarrelTrackProducer
L1TMuonBarrelTrackProducer(const edm::ParameterSet &pset)
Constructor.
Definition: L1TMuonBarrelTrackProducer.cc:36
L1MuBMTFSetup.h
ConsumesCollector.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
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:66