CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTTrackFinder.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTTrackFinder
4 //
5 // L1 DT Track Finder EDProducer
6 //
7 //
8 //
9 // Author :
10 // J. Troconiz UAM Madrid
11 //
12 //--------------------------------------------------
13 
14 #include "DTTrackFinder.h"
15 
18 
23 
27 
28 #include <iostream>
29 #include <iomanip>
30 
31 using namespace std;
32 
34 
35  produces<L1MuDTTrackContainer>("DTTF");
36  produces<vector<L1MuRegionalCand> >("DT");
37 
38  setup1 = new L1MuDTTFSetup(pset,consumesCollector());
39  usesResource("DTTrackFinder");
40 }
41 
43 
44  delete setup1;
45 
46 }
47 
49 
50  if ( L1MuDTTFConfig::Debug(1) ) cout << endl;
51  if ( L1MuDTTFConfig::Debug(1) ) cout << "**** L1MuonDTTFTrigger processing event ****" << endl;
52 
53  L1MuDTTrackFinder* dtbx = setup1->TrackFinder();
54  dtbx->clear();
55  dtbx->run(e,c);
56 
57  int ndt = dtbx->numberOfTracks();
58  if ( L1MuDTTFConfig::Debug(1) ) cout << "Number of muons found by the L1 DTBX TRIGGER : "
59  << ndt << endl;
60 
61  auto_ptr<L1MuDTTrackContainer> tra_product(new L1MuDTTrackContainer);
62  auto_ptr<vector<L1MuRegionalCand> >
63  vec_product(new vector<L1MuRegionalCand>);
64 
65  vector<L1MuDTTrackCand>& dtTracks = dtbx->getcache0();
66  tra_product->setContainer(dtTracks);
67  vector<L1MuRegionalCand>& DTTracks = dtbx->getcache();
68  *vec_product = DTTracks;
69 
70  e.put(tra_product,"DTTF");
71  e.put(vec_product,"DT");
72 
73 }
virtual ~DTTrackFinder()
Destructor.
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
DTTrackFinder(const edm::ParameterSet &pset)
Constructor.
int numberOfTracks()
get number of muon candidates found by the barrel MTTF
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
static bool Debug()
std::vector< L1MuDTTrackCand > & getcache0()
std::vector< L1MuRegionalCand > & getcache()
void produce(edm::Event &e, const edm::EventSetup &c)
Produce digis out of raw data.
tuple cout
Definition: gather_cfg.py:121