test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  usesResource("L1TMuonBarrelTrackProducer");
44  setup1 = new L1MuBMTFSetup(*m_ps,consumesCollector());
45 
46 
47 }
48 
50 
51  delete setup1;
52 }
53 
55 
56 
57  if ( L1MuBMTFConfig::Debug(1) ) cout << endl;
58  if ( L1MuBMTFConfig::Debug(1) ) cout << "**** L1MuonBMTFTrigger processing event ****" << endl;
59 
60  L1MuBMTrackFinder* dtbx = setup1->TrackFinder();
61  dtbx->clear();
62 
63  dtbx->run(e,c);
64 
65  int ndt = dtbx->numberOfTracks();
66  if ( L1MuBMTFConfig::Debug(1) ) cout << "Number of muons found by the L1 BBMX TRIGGER : "
67  << ndt << endl;
68 
69  std::auto_ptr<l1t::RegionalMuonCandBxCollection> tra_product(new l1t::RegionalMuonCandBxCollection);
70  std::auto_ptr<l1t::RegionalMuonCandBxCollection> vec_product(new l1t::RegionalMuonCandBxCollection);
71 
74  *tra_product = dtTracks;
75 
78  *vec_product = BMTracks;
79 
80 
81  //for (int ibx = BMTracks.getFirstBX(); ibx <= BMTracks.getLastBX(); ibx++){
82  //cout << "DEBUG: BMTF size at bx " << ibx << " " << BMTracks.size(ibx) << "\n";
83  //}
84  e.put(tra_product,"UnsortedBMTF");
85  e.put(vec_product,"BMTF");
86 
87 }
88 
89 
92 
int numberOfTracks()
get number of muon candidates found by the barrel MTTF
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
virtual ~L1TMuonBarrelTrackProducer()
Destructor.
static bool Debug()
tuple cout
Definition: gather_cfg.py:145
l1t::RegionalMuonCandBxCollection & getcache()
L1TMuonBarrelTrackProducer(const edm::ParameterSet &pset)
Constructor.
void produce(edm::Event &e, const edm::EventSetup &c)
Produce digis out of raw data.
l1t::RegionalMuonCandBxCollection & getcache0()