ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/DTDPGAnalysis/interface/TTreeGenerator.h
Revision: 1.1
Committed: Mon May 3 14:05:47 2010 UTC (15 years ago) by pellicci
Content type: text/plain
Branch: MAIN
Log Message:
adding the ntuple dumper to the package

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     #include "DTDPGAnalysis/interface/DefineTreeVariables.h"
9    
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     edm::ESHandle<MagneticField> theBField;
70     edm::ESHandle<Propagator> propagatorAlong;
71     edm::ESHandle<Propagator> propagatorOpposite;
72    
73     edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
74    
75     int digisSize_;
76     int dtsegmentsSize_;
77     int cscsegmentsSize_;
78     int dtltDCCSize_;
79     int dtltDDUSize_;
80     int gmtSize_;
81     int STAMuSize_;
82    
83     //counters
84     short idigis;
85     short idtsegments;
86     short icscsegments;
87     short idtltDCC;
88     short idtltDDU;
89     short imuons;
90     short igmtdt;
91     short igmtcands;
92    
93     TFile *outFile;
94     TTree *tree_;
95    
96     };