test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
HcalForwardAnalysis Class Reference

#include <HcalForwardAnalysis.h>

Inheritance diagram for HcalForwardAnalysis:
SimProducer Observer< const BeginOfRun * > Observer< const BeginOfEvent * > Observer< const EndOfEvent * > Observer< const G4Step * > SimWatcher

Classes

struct  Photon
 

Public Member Functions

 HcalForwardAnalysis (const edm::ParameterSet &p)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
virtual ~HcalForwardAnalysis ()
 
- Public Member Functions inherited from SimProducer
void registerProducts (edm::ProducerBase &iProd)
 
 SimProducer ()
 
- Public Member Functions inherited from SimWatcher
 SimWatcher ()
 
virtual ~SimWatcher ()
 
- Public Member Functions inherited from Observer< const BeginOfRun * >
 Observer ()
 
void slotForUpdate (const BeginOfRun *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfEvent * >
 Observer ()
 
void slotForUpdate (const BeginOfEvent *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfEvent * >
 Observer ()
 
void slotForUpdate (const EndOfEvent *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const G4Step * >
 Observer ()
 
void slotForUpdate (const G4Step *iT)
 
virtual ~Observer ()
 

Private Member Functions

void clear ()
 
void fillEvent ()
 
 HcalForwardAnalysis (const HcalForwardAnalysis &)
 
void init ()
 
const HcalForwardAnalysisoperator= (const HcalForwardAnalysis &)
 
void parseDetId (int id, int &tower, int &cell, int &fiber)
 
void setPhotons (const EndOfEvent *evt)
 
void update (const BeginOfRun *run)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfEvent *evt)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *step)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfEvent *evt)
 This routine will be called when the appropriate signal arrives. More...
 

Private Attributes

int count
 
int evNum
 
int fiberId [10000]
 
float lambda [10000]
 
int nphot
 
float primMomX
 
float primMomY
 
float primMomZ
 
float primT
 
float primX
 
float primY
 
float primZ
 
float t [10000]
 
int theEventCounter
 
edm::Service< TFileServicetheFile
 
std::vector< std::string > theNames
 
std::vector< PhotonthePhotons
 
TTree * theTree
 
float x [10000]
 
float y [10000]
 
float z [10000]
 

Additional Inherited Members

- Protected Member Functions inherited from SimProducer
template<class T >
void produces ()
 
template<class T >
void produces (const std::string &instanceName)
 

Detailed Description

Definition at line 35 of file HcalForwardAnalysis.h.

Constructor & Destructor Documentation

HcalForwardAnalysis::HcalForwardAnalysis ( const edm::ParameterSet p)

Definition at line 27 of file HcalForwardAnalysis.cc.

References fiberId, edm::ParameterSet::getParameter(), i, init(), lambda, nphot, primMomX, primMomY, primMomZ, primT, primX, primY, primZ, t, theEventCounter, theNames, x, y, and z.

27  {
28 
29  edm::ParameterSet m_SLP = p.getParameter<edm::ParameterSet> ("HFShowerLibraryProducer");
30  theNames = m_SLP.getParameter<std::vector<std::string> > ("Names");
31  //LibVer = m_HS.getParameter<std::string> ("LibVer");
32  //produces<HFShowerPhotonCollection> ();
33  init();
34  theEventCounter = 0;
35  nphot = 0;
36  for (int i = 0; i < 10000; ++i) {
37  x[i] = 0.;
38  y[i] = 0.;
39  z[i] = 0.;
40  t[i] = 0.;
41  lambda[i] = 0.;
42  fiberId[i] = 0;
43  }
44  primX = primY = primZ = primT = 0.;
45  primMomX = primMomY = primMomZ = 0.;
46 
47 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > theNames
HcalForwardAnalysis::~HcalForwardAnalysis ( )
virtual

Definition at line 49 of file HcalForwardAnalysis.cc.

49  {
50 }
HcalForwardAnalysis::HcalForwardAnalysis ( const HcalForwardAnalysis )
private

Member Function Documentation

void HcalForwardAnalysis::clear ( void  )
private

Definition at line 251 of file HcalForwardAnalysis.cc.

References fiberId, i, lambda, nphot, primMomX, primMomY, primMomZ, primT, primX, primY, primZ, t, thePhotons, x, y, and z.

Referenced by init(), and update().

251  {
252  nphot = 0;
253  for (int i = 0; i < 10000; ++i) {
254  x[i] = 0.;
255  y[i] = 0.;
256  z[i] = 0.;
257  t[i] = 0.;
258  lambda[i] = 0.;
259  fiberId[i] = 0;
260  }
261  primX = primY = primZ = primT = 0.;
262  primMomX = primMomY = primMomZ = 0.;
263 
264  thePhotons.clear();
265 }
int i
Definition: DBlmapReader.cc:9
std::vector< Photon > thePhotons
void HcalForwardAnalysis::fillEvent ( )
private

Definition at line 230 of file HcalForwardAnalysis.cc.

References fiberId, i, lambda, nphot, t, thePhotons, theTree, x, y, and z.

Referenced by produce().

230  {
231  /*
232  edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis: =====> filledEvent";
233  */
234  nphot = int(thePhotons.size());
235  for (int i = 0; i < nphot; ++i) {
236  x[i] = thePhotons[i].x;
237  y[i] = thePhotons[i].y;
238  z[i] = thePhotons[i].z;
239  t[i] = thePhotons[i].t;
240  lambda[i] = thePhotons[i].lambda;
241  fiberId[i] = thePhotons[i].fiberId;
242  }
243  theTree->Fill();
244 }
int i
Definition: DBlmapReader.cc:9
std::vector< Photon > thePhotons
void HcalForwardAnalysis::init ( void  )
private

Definition at line 68 of file HcalForwardAnalysis.cc.

References clear(), count, evNum, fiberId, lambda, TFileService::make(), nphot, primMomX, primMomY, primMomZ, primT, primX, primY, primZ, t, theFile, theTree, x, y, and z.

Referenced by HcalForwardAnalysis().

68  {
69 
70  theTree = theFile->make<TTree> ("CherenkovPhotons", "Cherenkov Photons");
71  theTree->Branch("nphot", &nphot, "nphot/I");
72  theTree->Branch("x", &x, "x[nphot]/F");
73  theTree->Branch("y", &y, "y[nphot]/F");
74  theTree->Branch("z", &z, "z[nphot]/F");
75  theTree->Branch("t", &t, "t[nphot]/F");
76  theTree->Branch("lambda", &lambda, "lambda[nphot]/F");
77  theTree->Branch("fiberId", &fiberId, "fiberId[nphot]/I");
78  theTree->Branch("primX", &primX, "primX/F");
79  theTree->Branch("primY", &primY, "primY/F");
80  theTree->Branch("primZ", &primZ, "primZ/F");
81  theTree->Branch("primMomX", &primMomX, "primMomX/F");
82  theTree->Branch("primMomY", &primMomY, "primMomY/F");
83  theTree->Branch("primMomZ", &primMomZ, "primMomZ/F");
84  theTree->Branch("primT", &primT, "primT/F");
85 
86  // counter
87  count = 0;
88  evNum = 0;
89  clear();
90 }
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
edm::Service< TFileService > theFile
const HcalForwardAnalysis& HcalForwardAnalysis::operator= ( const HcalForwardAnalysis )
private
void HcalForwardAnalysis::parseDetId ( int  id,
int &  tower,
int &  cell,
int &  fiber 
)
private

Definition at line 245 of file HcalForwardAnalysis.cc.

Referenced by setPhotons().

245  {
246  tower = id / 10000;
247  cell = id / 10 - tower * 10;
248  fiber = id - tower * 10000 - cell * 10;
249 }
void HcalForwardAnalysis::produce ( edm::Event iEvent,
const edm::EventSetup  
)
virtual

Implements SimProducer.

Definition at line 56 of file HcalForwardAnalysis.cc.

References fillEvent().

56  {
57 
58  //std::auto_ptr<HFShowerPhotonCollection> product(new HFShowerPhotonCollection);
59  //edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis: =====> Filling event";
60  //fillEvent(*product);
61  //iEvent.put(product);
62  //std::auto_ptr<PHcalForwardLibInfo> product(new PHcalForwardLibInfo);
63  //fillEvent(*product);
64  fillEvent();
65  //iEvent.put(product);
66 }
void HcalForwardAnalysis::setPhotons ( const EndOfEvent evt)
private

Definition at line 129 of file HcalForwardAnalysis.cc.

References funct::cos(), gather_cfg::cout, FiberG4Hit::depth(), HFShowerG4Hit::globalPosition(), HFShowerG4Hit::hitId(), j, relval_2017::k, HFShowerPhoton::lambda(), LogDebug, parseDetId(), phi, configurableAnalysis::Photon, FiberG4Hit::photon(), HFShowerG4Hit::primaryMomDir(), primMomX, primMomY, primMomZ, primT, primX, primY, primZ, funct::sin(), AlCaHLTBitMon_QueryRunRegistry::string, HFShowerPhoton::t(), theNames, thePhotons, theta(), HFShowerG4Hit::time(), FiberG4Hit::towerId(), HFShowerG4Hit::trackId(), HFShowerPhoton::x(), HFShowerPhoton::y(), and HFShowerPhoton::z().

Referenced by update().

129  {
130 
131  int idHC, j;
132  FiberG4HitsCollection* theHC;
133  // Look for the Hit Collection of HCal
134  G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
135  std::string sdName = theNames[0];//name for fiber hits
136  idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
137  theHC = (FiberG4HitsCollection*) allHC->GetHC(idHC);
138  LogDebug("HcalForwardLib")<< "HcalForwardAnalysis::setPhotons() Hit Collection for " << sdName
139  << " of ID " << idHC << " is obtained at " << theHC;
140  std::vector<HFShowerPhoton> ShortFiberPhotons;
141  std::vector<HFShowerPhoton> LongFiberPhotons;
142  LongFiberPhotons.clear();
143  ShortFiberPhotons.clear();
144  if (idHC >= 0 && theHC> 0) {
145  std::cout << "FiberhitSize " << theHC->entries() << std::endl;
146  for (j = 0; j < theHC->entries(); j++) {
147  FiberG4Hit* aHit = (*theHC)[j];
148  std::vector<HFShowerPhoton> thePhotonsFromHit = aHit->photon();
149  std::cout << "Fiberhit " << j << " has " << thePhotonsFromHit.size() << " photons." << std::endl;
150  int fTowerId = -1;
151  int fCellId = -1;
152  int fFiberId = -1;
153  parseDetId(aHit->towerId(), fTowerId, fCellId, fFiberId);
154  for(unsigned int iph = 0; iph < thePhotonsFromHit.size(); ++iph){
155  if(aHit->depth() == 1)LongFiberPhotons.push_back(thePhotonsFromHit[iph]);
156  if(aHit->depth() == 2)ShortFiberPhotons.push_back(thePhotonsFromHit[iph]);
157  }
158  LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() NbPhotons " << thePhotonsFromHit.size()
159  << " towerId " << fTowerId << " cellId " << fCellId << " fiberId " << fFiberId << " depth " << aHit->depth();
160  }
161  }else{
162  LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons(): No Photons!";
163  return;
164  }
165  LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() LongFibPhotons: "
166  << LongFiberPhotons.size() << " ShortFibPhotons: " << ShortFiberPhotons.size();
167  std::cout << "HcalForwardAnalysis::setPhotons() LongFibPhotons: "
168  << LongFiberPhotons.size() << " ShortFibPhotons: " << ShortFiberPhotons.size() << std::endl;
169 
170  //Chamber hits to find information about primary particle on surface
171  HFShowerG4HitsCollection* theChamberHC;
172  G4HCofThisEvent* allChamberHC = (*evt)()->GetHCofThisEvent();
173  sdName= theNames[1];
174  idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
175  theChamberHC = (HFShowerG4HitsCollection*) allChamberHC->GetHC(idHC);
176  math::XYZPoint primPosOnSurf(0,0,0);
177  math::XYZPoint primMomDirOnSurf(0,0,0);
178  float primTimeOnSurf = 0;
179  // the chamber hit is for primary particle, but step size can be small
180  // (in newer Geant4 versions) and as a result primary particle may have
181  // multiple hits. We want to take last one which is close the HF absorber
182  if(idHC >= 0 && theChamberHC> 0) {
183  LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() Chamber Hits size: " << theChamberHC->entries();
184  for(j = 0; j < theChamberHC->entries();++j) {
185  HFShowerG4Hit* aHit = (*theChamberHC)[j];
186  LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() Chamber Hit id " << aHit->hitId()
187  << " track id " << aHit->trackId() << " prim. pos. " << aHit->globalPosition() << " prom mom. dir. "
188  << aHit->primaryMomDir() << " time " << aHit->time();
189  primPosOnSurf.SetXYZ(aHit->globalPosition().x(), aHit->globalPosition().y(), aHit->globalPosition().z());
190  primMomDirOnSurf.SetXYZ(aHit->primaryMomDir().x(), aHit->primaryMomDir().y(), aHit->primaryMomDir().z());
191  primTimeOnSurf = aHit->time();
192  }
193  }else{
194  LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons(): No Chamber hits. Something is wrong!";
195  return;
196  }
197  primX = primPosOnSurf.x();
198  primY = primPosOnSurf.y();
199  primZ = primPosOnSurf.z();
200  primT = primTimeOnSurf;
201  primMomX = primMomDirOnSurf.x();
202  primMomY = primMomDirOnSurf.y();
203  primMomZ = primMomDirOnSurf.z();
204  //production point of Cherenkov photons in long fibers w.r.t local coordinates
205  float photonProdX = 0.;
206  float photonProdY = 0.;
207  float photonProdZ = 0.;
208  float photonProdTime = 0.;
209  //angles for rotation matrices
210  double theta = primMomDirOnSurf.theta();
211  double phi = primMomDirOnSurf.phi();
212 
213  for(unsigned int k = 0; k < LongFiberPhotons.size(); ++k){
214  HFShowerPhoton aPhoton = LongFiberPhotons[k];
215  photonProdX = aPhoton.x()*cos(theta)*cos(phi) + aPhoton.y()*cos(theta)*sin(phi) - aPhoton.z()*sin(theta) - primPosOnSurf.x();
216  photonProdY = -aPhoton.x()*sin(phi) + aPhoton.y()*cos(phi) - primPosOnSurf.y();
217  photonProdZ = aPhoton.x()*sin(theta)*cos(phi) + aPhoton.y()*sin(theta)*sin(phi) + aPhoton.z()*cos(theta) - primPosOnSurf.z();
218  photonProdTime = aPhoton.t()- primTimeOnSurf;
219  thePhotons.push_back(Photon(1, photonProdX, photonProdY, photonProdZ, photonProdTime, aPhoton.lambda()));
220  }
221  for(unsigned int k = 0; k < ShortFiberPhotons.size(); ++k){
222  HFShowerPhoton aPhoton = ShortFiberPhotons[k];
223  photonProdX = aPhoton.x()*cos(theta)*cos(phi) + aPhoton.y()*cos(theta)*sin(phi) - aPhoton.z()*sin(theta) - primPosOnSurf.x();
224  photonProdY = -aPhoton.x()*sin(phi) + aPhoton.y()*cos(phi) - primPosOnSurf.y();
225  photonProdZ = aPhoton.x()*sin(theta)*cos(phi) + aPhoton.y()*sin(theta)*sin(phi) + aPhoton.z()*cos(theta) - primPosOnSurf.z();
226  photonProdTime = aPhoton.t()- primTimeOnSurf;
227  thePhotons.push_back(Photon(2, photonProdX, photonProdY, photonProdZ, photonProdTime, aPhoton.lambda()));
228  }
229 }
#define LogDebug(id)
G4ThreeVector primaryMomDir() const
Definition: HFShowerG4Hit.h:57
G4int depth() const
Definition: FiberG4Hit.h:50
G4int hitId() const
Definition: HFShowerG4Hit.h:51
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
float t() const
std::vector< Photon > thePhotons
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
G4int towerId() const
Definition: FiberG4Hit.h:49
int j
Definition: DBlmapReader.cc:9
G4int trackId() const
Definition: HFShowerG4Hit.h:52
std::vector< HFShowerPhoton > photon() const
Definition: FiberG4Hit.h:55
float z() const
float lambda() const
float x() const
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< std::string > theNames
G4THitsCollection< FiberG4Hit > FiberG4HitsCollection
Definition: FiberG4Hit.h:59
G4ThreeVector globalPosition() const
Definition: HFShowerG4Hit.h:56
tuple cout
Definition: gather_cfg.py:145
G4double time() const
Definition: HFShowerG4Hit.h:54
G4THitsCollection< HFShowerG4Hit > HFShowerG4HitsCollection
Definition: HFShowerG4Hit.h:60
void parseDetId(int id, int &tower, int &cell, int &fiber)
float y() const
void HcalForwardAnalysis::update ( const BeginOfRun )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfRun * >.

Definition at line 92 of file HcalForwardAnalysis.cc.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

92  {
93 
94  int irun = (*run)()->GetRunID();
95  edm::LogInfo("HcalForwardLib") << " =====> Begin of Run = " << irun;
96 
97 }
void HcalForwardAnalysis::update ( const BeginOfEvent )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfEvent * >.

Definition at line 99 of file HcalForwardAnalysis.cc.

References clear(), and evNum.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

99  {
100 
101  evNum = (*evt)()->GetEventID();
102  clear();
103  edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis: =====> Begin of event = " << evNum;
104 }
void HcalForwardAnalysis::update ( const G4Step *  )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 106 of file HcalForwardAnalysis.cc.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

106  {
107 }
void HcalForwardAnalysis::update ( const EndOfEvent )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfEvent * >.

Definition at line 109 of file HcalForwardAnalysis.cc.

References count, LogDebug, and setPhotons().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

109  {
110 
111  count++;
112 
113  //fill the buffer
114  LogDebug("HcalForwardLib")<< "HcalForwardAnalysis::Fill event "
115  << (*evt)()->GetEventID();
116  setPhotons(evt);
117 
118  int iEvt = (*evt)()->GetEventID();
119  if (iEvt < 10)
120  edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
121  else if ((iEvt < 100) && (iEvt%10 == 0))
122  edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
123  else if ((iEvt < 1000) && (iEvt%100 == 0))
124  edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
125  else if ((iEvt < 10000) && (iEvt%1000 == 0))
126  edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
127 }
#define LogDebug(id)
void setPhotons(const EndOfEvent *evt)

Member Data Documentation

int HcalForwardAnalysis::count
private

Definition at line 83 of file HcalForwardAnalysis.h.

Referenced by init(), and update().

int HcalForwardAnalysis::evNum
private

Definition at line 84 of file HcalForwardAnalysis.h.

Referenced by init(), and update().

int HcalForwardAnalysis::fiberId[10000]
private

Definition at line 89 of file HcalForwardAnalysis.h.

Referenced by clear(), fillEvent(), HcalForwardAnalysis(), and init().

float HcalForwardAnalysis::lambda[10000]
private

Definition at line 85 of file HcalForwardAnalysis.h.

Referenced by clear(), fillEvent(), HcalForwardAnalysis(), and init().

int HcalForwardAnalysis::nphot
private

Definition at line 88 of file HcalForwardAnalysis.h.

Referenced by clear(), fillEvent(), HcalForwardAnalysis(), and init().

float HcalForwardAnalysis::primMomX
private

Definition at line 87 of file HcalForwardAnalysis.h.

Referenced by clear(), HcalForwardAnalysis(), init(), and setPhotons().

float HcalForwardAnalysis::primMomY
private

Definition at line 87 of file HcalForwardAnalysis.h.

Referenced by clear(), HcalForwardAnalysis(), init(), and setPhotons().

float HcalForwardAnalysis::primMomZ
private

Definition at line 87 of file HcalForwardAnalysis.h.

Referenced by clear(), HcalForwardAnalysis(), init(), and setPhotons().

float HcalForwardAnalysis::primT
private

Definition at line 86 of file HcalForwardAnalysis.h.

Referenced by clear(), HcalForwardAnalysis(), init(), and setPhotons().

float HcalForwardAnalysis::primX
private

Definition at line 86 of file HcalForwardAnalysis.h.

Referenced by clear(), HcalForwardAnalysis(), init(), and setPhotons().

float HcalForwardAnalysis::primY
private

Definition at line 86 of file HcalForwardAnalysis.h.

Referenced by clear(), HcalForwardAnalysis(), init(), and setPhotons().

float HcalForwardAnalysis::primZ
private

Definition at line 86 of file HcalForwardAnalysis.h.

Referenced by clear(), HcalForwardAnalysis(), init(), and setPhotons().

float HcalForwardAnalysis::t[10000]
private

Definition at line 85 of file HcalForwardAnalysis.h.

Referenced by clear(), fillEvent(), HcalForwardAnalysis(), and init().

int HcalForwardAnalysis::theEventCounter
private

Definition at line 82 of file HcalForwardAnalysis.h.

Referenced by HcalForwardAnalysis().

edm::Service<TFileService> HcalForwardAnalysis::theFile
private

Definition at line 79 of file HcalForwardAnalysis.h.

Referenced by init().

std::vector<std::string> HcalForwardAnalysis::theNames
private

Definition at line 91 of file HcalForwardAnalysis.h.

Referenced by HcalForwardAnalysis(), and setPhotons().

std::vector<Photon> HcalForwardAnalysis::thePhotons
private

Definition at line 90 of file HcalForwardAnalysis.h.

Referenced by clear(), fillEvent(), and setPhotons().

TTree* HcalForwardAnalysis::theTree
private

Definition at line 81 of file HcalForwardAnalysis.h.

Referenced by fillEvent(), and init().

float HcalForwardAnalysis::x[10000]
private
float HcalForwardAnalysis::y[10000]
private
float HcalForwardAnalysis::z[10000]
private