ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/DTDPGAnalysis/interface/TTreeGenerator.h
Revision: 1.3
Committed: Wed May 5 12:20:54 2010 UTC (15 years ago) by pellicci
Content type: text/plain
Branch: MAIN
CVS Tags: V00-00-08
Changes since 1.2: +2 -0 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 pellicci 1.1 #include<iostream>
2    
3     #include "TFile.h"
4     #include "TTree.h"
5     #include "TVectorF.h"
6     #include "TClonesArray.h"
7    
8 pellicci 1.2 #include "UserCode/DTDPGAnalysis/interface/DefineTreeVariables.h"
9 pellicci 1.1
10     #include "FWCore/Framework/interface/EDAnalyzer.h"
11     #include "FWCore/Framework/interface/ESHandle.h"
12     #include "FWCore/Framework/interface/Event.h"
13     #include "FWCore/Framework/interface/Frameworkfwd.h"
14    
15     #include "TrackingTools/GeomPropagators/interface/Propagator.h"
16    
17     //
18     // class declaration
19     //
20     class TTreeGenerator : public edm::EDAnalyzer {
21    
22     public:
23     explicit TTreeGenerator(const edm::ParameterSet&);
24     ~TTreeGenerator() {};
25    
26    
27     private:
28    
29     virtual void beginJob() ;
30     virtual void beginRun(const edm::Run&, const edm::EventSetup&) {};
31     virtual void analyze(const edm::Event&, const edm::EventSetup&);
32     virtual void endJob() ;
33    
34     void initialize_Tree_variables();
35     inline void clear_Arrays();
36    
37     void fill_digi_variables(edm::Handle<DTDigiCollection> dtdigis);
38     void fill_dtsegments_variables(edm::Handle<DTRecSegment4DCollection> segments4D);
39     void fill_cscsegments_variables(edm::Handle<CSCSegmentCollection> cscsegments);
40     void fill_dcc_variables(edm::Handle<L1MuDTChambPhContainer> localTriggerDCC);
41     void fill_ddu_variables(edm::Handle<DTLocalTriggerCollection> localTriggerDDU);
42     void fill_muons_variables(edm::Handle<reco::MuonCollection> MuList);
43     void fill_gmt_variables(edm::Handle<L1MuGMTReadoutCollection> gmtrc);
44    
45     void fill_dtphi_info(const DTChamberRecSegment2D* phiSeg);
46     void fill_dtz_info(const DTSLRecSegment2D* zSeg);
47    
48     std::vector<L1MuRegionalCand> getBXCands(const L1MuGMTReadoutRecord* igmtrr, const int DetectorType) const;
49    
50     TrajectoryStateOnSurface cylExtrapTrkSam(reco::TrackRef track, const float rho) const;
51     FreeTrajectoryState freeTrajStateMuon(const reco::TrackRef track) const;
52    
53     //method to fill empty slots (just to avoid potential crashes)
54     inline void fill_cscsegments_emptyvars();
55     inline void fill_muons_emptyvars();
56    
57     edm::InputTag dtDigiLabel_;
58     edm::InputTag dtSegmentLabel_;
59     edm::InputTag cscSegmentLabel_;
60     edm::InputTag dtTrigDCCLabel_;
61     edm::InputTag dtTrigDDULabel_;
62     edm::InputTag staMuLabel_;
63     edm::InputTag gmtLabel_;
64    
65     edm::InputTag PrimaryVertexTag_;
66    
67     edm::InputTag triggerTag_;
68    
69 pellicci 1.3 bool runOnRaw_;
70    
71 pellicci 1.1 edm::ESHandle<MagneticField> theBField;
72     edm::ESHandle<Propagator> propagatorAlong;
73     edm::ESHandle<Propagator> propagatorOpposite;
74    
75     edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
76    
77     int digisSize_;
78     int dtsegmentsSize_;
79     int cscsegmentsSize_;
80     int dtltDCCSize_;
81     int dtltDDUSize_;
82     int gmtSize_;
83     int STAMuSize_;
84    
85     //counters
86     short idigis;
87     short idtsegments;
88     short icscsegments;
89     short idtltDCC;
90     short idtltDDU;
91     short imuons;
92     short igmtdt;
93     short igmtcands;
94    
95     TFile *outFile;
96     TTree *tree_;
97    
98     };