ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/CMSSW/RecoTracker/GeometryESProducer/test/TrackerRecoGeometryAnalyzer.cc
Revision: 1.2
Committed: Wed Mar 1 18:21:53 2006 UTC (19 years, 2 months ago) by mangano
Content type: text/plain
Branch: MAIN
CVS Tags: CMSSW_0_7_0_pre4, Hit_tom2, V00-01-00, CMSSW_0_7_0_pre3, CMSSW_0_6_1, V00-00-90, CMSSW_0_7_0_pre2, CMSSW_0_7_0_pre1, CMSSW_0_6_0, CMSSW_0_6_0_pre7, CMSSW_0_6_0_pre6, CMSSW_0_6_0_pre5, CMSSW_0_6_0_pre4, CMSSW_0_6_0_pre3, CMSSW_0_6_0_pre2, tom22032006, V00-00-01
Branch point for: CkfPattern_061_branch
Changes since 1.1: +16 -3 lines
Log Message:
test of layer position added

File Contents

# Content
1 // system include files
2 #include <memory>
3
4 // user include files
5 #include "FWCore/Framework/interface/Frameworkfwd.h"
6 #include "FWCore/Framework/interface/EDAnalyzer.h"
7
8 #include "FWCore/Framework/interface/Event.h"
9 #include "FWCore/Framework/interface/EventSetup.h"
10 #include "FWCore/Framework/interface/ESHandle.h"
11 #include "FWCore/Framework/interface/MakerMacros.h"
12
13 #include "FWCore/ParameterSet/interface/ParameterSet.h"
14
15 #include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"
16 #include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
17
18 //
19 //
20 // class decleration
21 //
22
23 class TrackerRecoGeometryAnalyzer : public edm::EDAnalyzer {
24 public:
25 explicit TrackerRecoGeometryAnalyzer( const edm::ParameterSet& );
26 ~TrackerRecoGeometryAnalyzer();
27
28
29 virtual void analyze( const edm::Event&, const edm::EventSetup& );
30 private:
31 // ----------member data ---------------------------
32 };
33
34 //
35 // constants, enums and typedefs
36 //
37
38 //
39 // static data member definitions
40 //
41
42 //
43 // constructors and destructor
44 //
45 TrackerRecoGeometryAnalyzer::TrackerRecoGeometryAnalyzer( const edm::ParameterSet& iConfig )
46 {
47 //now do what ever initialization is needed
48
49 }
50
51
52 TrackerRecoGeometryAnalyzer::~TrackerRecoGeometryAnalyzer()
53 {
54
55 // do anything here that needs to be done at desctruction time
56 // (e.g. close files, deallocate resources etc.)
57
58 }
59
60
61 //
62 // member functions
63 //
64
65 // ------------ method called to produce the data ------------
66 void
67 TrackerRecoGeometryAnalyzer::analyze( const edm::Event& iEvent, const edm::EventSetup& iSetup )
68 {
69 using namespace edm;
70
71 std::cout << "Here I am " << std::endl;
72 //
73 // get the GeometricSearchDet
74 //
75 edm::ESHandle<GeometricSearchTracker> track;
76 iSetup.get<TrackerRecoGeometryRecord>().get( track );
77
78 //---- testing access to barrelLayers ----
79 vector<BarrelDetLayer*> theBarrelLayers = track->barrelLayers();
80 cout << "number of BarrelLayers: " << theBarrelLayers.size() << endl;
81
82 for(unsigned int i=0; i<3; i++){
83 BarrelDetLayer* theLayer = theBarrelLayers[i];
84 cout << "theLayer[" << i << "]->position().perp(): "
85 << theLayer->components().front()->surface().position().perp() << endl;
86 //cout << "theLayer[" << i << "]->module(): "
87 //<< theLayer->module() << endl;
88 }
89 //--------------------------------------
90
91 }
92
93 //define this as a plug-in
94 DEFINE_FWK_MODULE(TrackerRecoGeometryAnalyzer)
95
96