1 |
#ifndef STAOFFLINEANALYZER_H
|
2 |
#define STAOFFLINEANALYZER_H
|
3 |
|
4 |
/** \class STAOfflineAnalyzer
|
5 |
*
|
6 |
* Description:
|
7 |
*
|
8 |
* detailed description
|
9 |
*
|
10 |
* \author : Stefano Lacaprara - INFN Padova <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 |
#include "FWCore/Framework/interface/ESHandle.h"
|
20 |
namespace edm {
|
21 |
class ParameterSet;
|
22 |
class Event;
|
23 |
class EventSetup;
|
24 |
}
|
25 |
|
26 |
/* Collaborating Class Declarations */
|
27 |
#include "DataFormats/Common/interface/Handle.h"
|
28 |
class DQMStore;
|
29 |
class TFile;
|
30 |
class TH1F;
|
31 |
class TH2F;
|
32 |
class DTLayerId;
|
33 |
class DTLayer;
|
34 |
class DTSuperLayerId;
|
35 |
class DTSuperLayer;
|
36 |
class DTChamberId;
|
37 |
class DTChamber;
|
38 |
class Propagator;
|
39 |
class GeomDet;
|
40 |
class DTGeometry;
|
41 |
class TrajectoryStateOnSurface;
|
42 |
#include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
|
43 |
#include "DataFormats/DTRecHit/interface/DTRecSegment2DCollection.h"
|
44 |
#include "DataFormats/DTRecHit/interface/DTRecHitCollection.h"
|
45 |
|
46 |
/* C++ Headers */
|
47 |
#include <iosfwd>
|
48 |
#include <bitset>
|
49 |
|
50 |
/* ====================================================================== */
|
51 |
|
52 |
/* Class STAOfflineAnalyzer Interface */
|
53 |
|
54 |
class STAOfflineAnalyzer : public edm::EDAnalyzer {
|
55 |
|
56 |
public:
|
57 |
|
58 |
/* Constructor */
|
59 |
STAOfflineAnalyzer(const edm::ParameterSet& pset) ;
|
60 |
|
61 |
/* Destructor */
|
62 |
~STAOfflineAnalyzer() ;
|
63 |
|
64 |
/* Operations */
|
65 |
void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
|
66 |
|
67 |
virtual void beginJob(const edm::EventSetup &);
|
68 |
|
69 |
private:
|
70 |
void analyzeSATrack(const edm::Event & event, const edm::EventSetup& eventSetup);
|
71 |
|
72 |
template <typename T, typename C>
|
73 |
void missingHit(const edm::ESHandle<DTGeometry>& dtGeom,
|
74 |
const edm::Handle<C>& segs,
|
75 |
const T* ch,
|
76 |
const TrajectoryStateOnSurface& startTsos) ;
|
77 |
|
78 |
void pippo(const DTRecSegment4DCollection::range segs,
|
79 |
const DTChamber* ch,
|
80 |
const TrajectoryStateOnSurface& extraptsos) ;
|
81 |
|
82 |
void pippo(const DTRecSegment2DCollection::range segs,
|
83 |
const DTSuperLayer* ch,
|
84 |
const TrajectoryStateOnSurface& extraptsos) ;
|
85 |
|
86 |
void pippo(const DTRecHitCollection::range segs,
|
87 |
const DTLayer* ch,
|
88 |
const TrajectoryStateOnSurface& extraptsos) ;
|
89 |
|
90 |
TH1F* histo(const std::string& name) const;
|
91 |
TH2F* histo2d(const std::string& name) const;
|
92 |
|
93 |
void createTH1F(const std::string& name,
|
94 |
const std::string& title,
|
95 |
const std::string& suffix,
|
96 |
int nbin, const double& binMin, const double& binMax) const;
|
97 |
|
98 |
void createTH2F(const std::string& name,
|
99 |
const std::string& title,
|
100 |
const std::string& suffix,
|
101 |
int nBinX,
|
102 |
const double& binXMin,
|
103 |
const double& binXMax,
|
104 |
int nBinY,
|
105 |
const double& binYMin,
|
106 |
const double& binYMax) const ;
|
107 |
|
108 |
enum LCTType { DT, CSC, RPC_W1, RPC_W2 };
|
109 |
bool getLCT(LCTType) const;
|
110 |
bool selectEvent() const ;
|
111 |
|
112 |
std::string toString(const DTLayerId& id) const;
|
113 |
std::string toString(const DTSuperLayerId& id) const;
|
114 |
std::string toString(const DTChamberId& id) const;
|
115 |
template<class T> std::string hName(const std::string& s, const T& id) const;
|
116 |
private:
|
117 |
bool LCT_RPC, LCT_DT, LCT_CSC;
|
118 |
bool debug;
|
119 |
int _ev;
|
120 |
std::string theRootFileName;
|
121 |
DQMStore *theDQMStore;
|
122 |
// TFile* theFile;
|
123 |
//static std::string theAlgoName;
|
124 |
std::string theDTLocalTriggerLabel;
|
125 |
std::string theRecHits4DLabel;
|
126 |
std::string theRecHits2DLabel;
|
127 |
std::string theRecHits1DLabel;
|
128 |
std::string theSTAMuonLabel;
|
129 |
std::string thePropagatorName;
|
130 |
|
131 |
mutable Propagator* thePropagator;
|
132 |
|
133 |
bool mc;
|
134 |
|
135 |
bool doHits;
|
136 |
bool doSegs;
|
137 |
bool doSA;
|
138 |
|
139 |
bool init;
|
140 |
|
141 |
std::bitset<6> LCT;
|
142 |
|
143 |
std::map<DTChamberId, int> hitsPerChamber;
|
144 |
std::map<DTSuperLayerId, int> hitsPerSL;
|
145 |
std::map<DTLayerId, int> hitsPerLayer;
|
146 |
protected:
|
147 |
|
148 |
};
|
149 |
#endif // STANALYZER_H
|
150 |
|