ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/DTDPGAnalysis/src/DTEffOfflineAnalyzer.h
Revision: 1.3
Committed: Wed Dec 15 11:52:26 2010 UTC (14 years, 4 months ago) by battilan
Content type: text/plain
Branch: MAIN
CVS Tags: V00-01-00, V00-00-15, HEAD
Changes since 1.2: +0 -2 lines
Log Message:
PromptOffline back to CVS First Version from Mary-Cruz

File Contents

# User Rev Content
1 giorgia 1.1 #ifndef DTEFFOFFLINEANALYZER_H
2     #define DTEFFOFFLINEANALYZER_H
3    
4     /** \class DTEffOfflineAnalyzer
5     *
6     * Description:
7     *
8     * detailed description
9     *
10     * \author : Stefano Lacaprara - INFN LNL <stefano.lacaprara@pd.infn.it>
11     * $date : 20/11/2006 16:51:04 CET $
12     *
13     * Modification:
14     *
15     */
16    
17     /* Base Class Headers */
18     #include "FWCore/Framework/interface/EDAnalyzer.h"
19     namespace edm {
20     class ParameterSet;
21     class Event;
22     class EventSetup;
23     }
24    
25     /* Collaborating Class Declarations */
26     #include "DataFormats/Common/interface/Handle.h"
27     #include "FWCore/Framework/interface/ESHandle.h"
28     class TFile;
29 battilan 1.2 class DQMStore;
30 giorgia 1.1 class TH1F;
31     class TH2F;
32     class DTLayerId;
33     class DTSuperLayerId;
34     class DTChamberId;
35     #include "Geometry/DTGeometry/interface/DTGeometry.h"
36     #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
37     class DTTTrigBaseSync;
38    
39     /* C++ Headers */
40     #include <iosfwd>
41     #include <bitset>
42    
43     /* ====================================================================== */
44    
45     /* Class DTEffOfflineAnalyzer Interface */
46    
47     class DTEffOfflineAnalyzer : public edm::EDAnalyzer {
48    
49     public:
50    
51     /* Constructor */
52     DTEffOfflineAnalyzer(const edm::ParameterSet& pset) ;
53    
54     /* Destructor */
55     ~DTEffOfflineAnalyzer() ;
56    
57     /* Operations */
58    
59     void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
60     void beginJob(const edm::EventSetup&);
61    
62     private:
63    
64     TH1F* histo(const std::string& name) const;
65     TH2F* histo2d(const std::string& name) const;
66    
67     enum LCTType { DT, CSC, RPC_W1, RPC_W2 };
68     bool getLCT(LCTType) const;
69     bool selectEvent() const ;
70     void effSegments(const edm::Event & event,
71     const edm::EventSetup& eventSetup);
72    
73     const DTRecSegment4D& getBestSegment(const DTRecSegment4DCollection::range& segs) const;
74     const DTRecSegment4D* getBestSegment(const DTRecSegment4D* s1,
75     const DTRecSegment4D* s2) const;
76     bool isGoodSegment(const DTRecSegment4D& seg) const;
77     LocalPoint interpolate(const DTRecSegment4D& seg1,
78     const DTRecSegment4D& seg3,
79     const DTChamberId& MB2) const;
80    
81     void evaluateEff(const DTChamberId& MidId,
82     int bottom,
83     int top) const ;
84    
85     void createTH1F(const std::string& name,
86     const std::string& title,
87     const std::string& suffix,
88     int nbin, const double& binMin, const double& binMax) const;
89    
90     void createTH2F(const std::string& name,
91     const std::string& title,
92     const std::string& suffix,
93     int nBinX,
94     const double& binXMin,
95     const double& binXMax,
96     int nBinY,
97     const double& binYMin,
98     const double& binYMax) const ;
99    
100     std::string toString(const DTChamberId& id) const;
101     template<class T> std::string hName(const std::string& s, const T& id) const;
102     private:
103     bool LCT_RPC, LCT_DT, LCT_CSC;
104     bool debug;
105     std::string theRootFileName;
106 battilan 1.2 DQMStore *theDQMStore;
107 giorgia 1.1 std::string theDTLocalTriggerLabel;
108     std::string theRecHits4DLabel;
109     std::string theRecHits2DLabel;
110     std::string theRecHits1DLabel;
111     std::string theSTAMuonLabel;
112     bool mc;
113     unsigned int theMinHitsSegment;
114     double theMinChi2NormSegment;
115     double theMinCloseDist;
116    
117     std::bitset<6> LCT;
118    
119     bool init;
120    
121     edm::ESHandle<DTGeometry> dtGeom;
122     edm::Handle<DTRecSegment4DCollection> segs;
123     protected:
124    
125     };
126     #endif // DTANALYZER_H
127