CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalTB04Analysis.h
Go to the documentation of this file.
1 #ifndef HcalTestBeam_HcalTB04Analysis_H
2 #define HcalTestBeam_HcalTB04Analysis_H
3 // -*- C++ -*-
4 //
5 // Package: HcalTestBeam
6 // Class : HcalTB04Analysis
7 //
14 //
15 // Original Author: Sunanda Banerjee
16 // Created: Thu May 18 10:14:34 CEST 2006
17 // $Id: HcalTB04Analysis.h,v 1.3 2006/05/23 10:53:29 sunanda Exp $
18 //
19 
20 // system include files
21 #include <iostream>
22 #include <memory>
23 #include <vector>
24 #include <string>
25 
26 // user include files
29 
32 
35 
36 #include "G4Step.hh"
37 #include "G4Track.hh"
38 #include "G4ThreeVector.hh"
39 
40 #include <boost/cstdint.hpp>
41 
42 class BeginOfRun;
43 class BeginOfEvent;
44 class EndOfEvent;
45 
46 class PHcalTB04Info;
47 
49  public Observer<const BeginOfRun *>,
50  public Observer<const BeginOfEvent *>,
51  public Observer<const EndOfEvent *>,
52  public Observer<const G4Step *> {
53 
54 public:
55 
57  virtual ~HcalTB04Analysis();
58 
59  virtual void produce(edm::Event&, const edm::EventSetup&);
60 
61 private:
62 
63  HcalTB04Analysis(const HcalTB04Analysis&); // stop default
65 
66  void init();
67 
68  // observer methods
69  void update(const BeginOfRun * run);
70  void update(const BeginOfEvent * evt);
71  void update(const G4Step * step);
72  void update(const EndOfEvent * evt);
73 
74  //User methods
75  void fillBuffer(const EndOfEvent * evt);
76  void qieAnalysis();
77  void xtalAnalysis();
78  void finalAnalysis();
79  void fillEvent(PHcalTB04Info&);
80 
81  void clear();
82  int unitID(uint32_t id);
83  double scale(int det, int layer);
84  double timeOfFlight(int det, int layer, double eta);
85 
86 private:
87 
90 
91  // to read from parameter set
92  bool hcalOnly;
93  int mode, type;
95  int iceta, icphi;
97  std::vector<std::string> names;
98  G4RotationMatrix* beamline_RM;
99 
100  // Constants for the run
101  int count;
103  std::vector<int> idHcal, idXtal;
104  std::vector<uint32_t> idTower, idEcal;
105 
106  // Constants for the event
109  std::vector<CaloHit> ecalHitCache;
110  std::vector<CaloHit> hcalHitCache, hcalHitLayer;
111  std::vector<double> esimh, eqie, esime, enois;
112  std::vector<double> eseta, eqeta, esphi, eqphi, eslay, eqlay;
114 
115  bool pvFound;
116  int evNum, pvType;
117  G4ThreeVector pvPosition, pvMomentum, pvUVW;
118  std::vector<int> secTrackID, secPartID;
119  std::vector<G4ThreeVector> secMomentum;
120  std::vector<double> secEkin;
121  std::vector<int> shortLivedSecondaries;
122 };
123 
124 #endif
void update(const BeginOfRun *run)
This routine will be called when the appropriate signal arrives.
std::vector< double > secEkin
std::vector< int > idHcal
std::vector< CaloHit > hcalHitLayer
std::vector< double > eqeta
std::vector< double > eqie
virtual void produce(edm::Event &, const edm::EventSetup &)
void fillBuffer(const EndOfEvent *evt)
std::vector< int > shortLivedSecondaries
std::vector< int > secTrackID
std::vector< double > eqphi
T eta() const
std::vector< int > secPartID
std::vector< uint32_t > idEcal
std::vector< double > eseta
G4ThreeVector pvUVW
G4RotationMatrix * beamline_RM
std::vector< double > esime
double scale(int det, int layer)
std::vector< double > esphi
double timeOfFlight(int det, int layer, double eta)
std::vector< CaloHit > hcalHitCache
const HcalTB04Analysis & operator=(const HcalTB04Analysis &)
HcalTB04Analysis(const edm::ParameterSet &p)
std::vector< int > idXtal
std::vector< CaloHit > ecalHitCache
std::vector< double > enois
std::vector< G4ThreeVector > secMomentum
int unitID(uint32_t id)
HcalTB04Histo * histo
G4ThreeVector pvMomentum
virtual ~HcalTB04Analysis()
std::vector< uint32_t > idTower
std::vector< double > eslay
std::vector< double > eqlay
G4ThreeVector pvPosition
std::vector< std::string > names
void fillEvent(PHcalTB04Info &)
std::vector< double > esimh