CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ClusterTask.h
Go to the documentation of this file.
1 #ifndef ClusterTask_H
2 #define ClusterTask_H
3 
5 
9 
10 class CaloTopology;
12 
13 namespace ecaldqm {
14 
15  class ClusterTask : public DQWorkerTask {
16  public:
18  ~ClusterTask();
19 
20  void bookMEs();
21 
22  bool filterRunType(const std::vector<short>&);
23 
24  void beginRun(const edm::Run &, const edm::EventSetup &);
25  void beginEvent(const edm::Event &, const edm::EventSetup &);
26 
27  void analyze(const void*, Collections);
28 
32 
33  enum MESets {
34  kBCEMap, // profile2d
35  kBCEMapProjEta, // profile
36  kBCEMapProjPhi, // profile
37  kBCOccupancy, // h2f
40  kBCSizeMap, // profile2d
41  kBCSizeMapProjEta, // profile
42  kBCSizeMapProjPhi, // profile
43  kBCE, // h1f
44  kBCNum, // h1f for EB & EE
45  kBCSize, // h1f for EB & EE
46  kSCE, // h1f
47  kSCELow, // h1f
48  kSCSeedEnergy, // h1f
52  kSCNum, // h1f
53  kSCNBCs, // h1f
54  kSCNcrystals, // h1f
55  kSCR9, // h1f
56  kPi0, // h1f
57  kJPsi, // h1f
58  kZ, // h1f
59  kHighMass, // h1f
61  };
62 
63  // needs to be declared in each derived class
64  static void setMEData(std::vector<MEData>&);
65 
66  private:
71  int ievt_;
72  float lowEMax_;
74  };
75 
76  inline void ClusterTask::analyze(const void* _p, Collections _collection){
77  switch(_collection){
78  case kEBRecHit:
79  case kEERecHit:
80  runOnRecHits(*static_cast<const EcalRecHitCollection*>(_p), _collection);
81  break;
82  case kEBBasicCluster:
83  case kEEBasicCluster:
84  runOnBasicClusters(*static_cast<const reco::BasicClusterCollection*>(_p), _collection);
85  break;
86  case kEBSuperCluster:
87  case kEESuperCluster:
88  runOnSuperClusters(*static_cast<const reco::SuperClusterCollection*>(_p), _collection);
89  break;
90  default:
91  break;
92  }
93  }
94 
95 }
96 
97 #endif
98 
void analyze(const void *, Collections)
Definition: ClusterTask.h:76
const EcalRecHitCollection * eeHits_
Definition: ClusterTask.h:70
bool filterRunType(const std::vector< short > &)
Definition: ClusterTask.cc:107
const CaloSubdetectorGeometry * eeGeometry_
Definition: ClusterTask.h:69
static void setMEData(std::vector< MEData > &)
Definition: ClusterTask.cc:340
void beginEvent(const edm::Event &, const edm::EventSetup &)
Definition: ClusterTask.cc:72
const EcalRecHitCollection * ebHits_
Definition: ClusterTask.h:70
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
void beginRun(const edm::Run &, const edm::EventSetup &)
Definition: ClusterTask.cc:53
void runOnRecHits(const EcalRecHitCollection &, Collections)
Definition: ClusterTask.cc:122
void runOnSuperClusters(const reco::SuperClusterCollection &, Collections)
Definition: ClusterTask.cc:247
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
const CaloTopology * topology_
Definition: ClusterTask.h:67
ClusterTask(const edm::ParameterSet &, const edm::ParameterSet &)
Definition: ClusterTask.cc:19
void runOnBasicClusters(const reco::BasicClusterCollection &, Collections)
Definition: ClusterTask.cc:137
Definition: Run.h:33
const CaloSubdetectorGeometry * ebGeometry_
Definition: ClusterTask.h:68