CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/SimG4CMS/HcalTestBeam/interface/HcalTB02Analysis.h

Go to the documentation of this file.
00001 #ifndef SimG4CMS_HcalTestBeam_HcalTB02Analysis_H
00002 #define SimG4CMS_HcalTestBeam_HcalTB02Analysis_H
00003 // -*- C++ -*-
00004 //
00005 // Package:     HcalTestBeam
00006 // Class  :     HcalTB02Analysis
00007 //
00014 //
00015 // Original Author:  Sunanda Banerjee
00016 //         Created:  Thu May 18 10:14:34 CEST 2006
00017 // $Id: HcalTB02Analysis.h,v 1.2 2006/11/13 10:32:14 sunanda Exp $
00018 //
00019   
00020 // system include files
00021 #include <iostream>
00022 #include <memory>
00023 #include <map>
00024 #include <vector>
00025 #include <string>
00026  
00027 // user include files
00028 #include "SimG4Core/Watcher/interface/SimProducer.h"
00029 #include "SimG4Core/Notification/interface/Observer.h"
00030 #include "SimG4Core/Notification/interface/BeginOfJob.h"
00031 #include "SimG4Core/Notification/interface/BeginOfEvent.h"
00032 #include "SimG4Core/Notification/interface/EndOfEvent.h"
00033  
00034 #include "SimG4CMS/HcalTestBeam/interface/HcalTB02Histo.h"
00035 #include "SimDataFormats/HcalTestBeam/interface/HcalTB02HistoClass.h"
00036 
00037 #include "G4Step.hh"
00038 #include "G4Track.hh"
00039 #include "G4ThreeVector.hh"
00040 
00041 #include <boost/cstdint.hpp>
00042 
00043 class HcalTB02Analysis : public SimProducer,
00044                          public Observer<const BeginOfEvent *>,
00045                          public Observer<const EndOfEvent *> {
00046 
00047 public:
00048 
00049   HcalTB02Analysis(const edm::ParameterSet &p);
00050   virtual ~HcalTB02Analysis();
00051 
00052   virtual void produce(edm::Event&, const edm::EventSetup&);
00053 
00054 private:
00055 
00056   HcalTB02Analysis(const HcalTB02Analysis&); // stop default
00057   const HcalTB02Analysis& operator=(const HcalTB02Analysis&);
00058  
00059   // observer methods
00060   void update(const BeginOfEvent * evt);
00061   void update(const EndOfEvent * evt);
00062 
00063   void fillEvent(HcalTB02HistoClass&);
00064   void clear();
00065   void finish();
00066  
00067 private:
00068 
00069   // Private Tuples
00070   HcalTB02Histo*                      histo;
00071 
00072   // to read from parameter set
00073   bool                                hcalOnly;
00074   std::string                         fileNameTuple;
00075   std::vector<std::string>            names;
00076 
00077   //To be saved
00078   std::map<int,float>                 energyInScints, energyInCrystals;
00079   std::map<int,float>                 primaries;
00080   int                                 particleType;
00081   double                              eta, phi, pInit, incidentEnergy;
00082   float                               SEnergy, E7x7Matrix, E5x5Matrix;
00083   float                               SEnergyN, E7x7MatrixN, E5x5MatrixN;
00084   int                                 maxTime;
00085   double                              xIncidentEnergy;
00086   float                               xSEnergy, xSEnergyN;
00087   float                               xE3x3Matrix, xE5x5Matrix;
00088   float                               xE3x3MatrixN, xE5x5MatrixN;
00089  };
00090 
00091 #endif