CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CalibCalorimetry/EcalLaserAnalyzer/plugins/EcalMatacqAnalyzer.h

Go to the documentation of this file.
00001 // $Id: EcalMatacqAnalyzer.h
00002 
00003 #include <memory>
00004 #include <FWCore/Framework/interface/EDAnalyzer.h>
00005 
00006 class TFile;
00007 class TTree;
00008 class TMTQ;
00009 
00010 #define N_samples 2560
00011 #define N_channels 1
00012 #define NSIDES     2     // Number of sides
00013 
00014 class EcalMatacqAnalyzer: public edm::EDAnalyzer{  
00015 
00016  public:
00017   
00018   explicit EcalMatacqAnalyzer(const edm::ParameterSet& iConfig);  
00019   ~EcalMatacqAnalyzer();
00020   
00021   
00022   virtual void analyze( const edm::Event & e, const  edm::EventSetup& c);
00023   virtual void beginJob();
00024   virtual void endJob();
00025   
00026   enum VarCol  { iBlue, iRed, nColor }; 
00027   enum VarSide { iSide0, iSide1, nSide }; 
00028   
00029  private:
00030     
00031   int iEvent;
00032 
00033 //
00034 // Framework parameters
00035 //
00036 
00037   double       _presample;
00038   unsigned int _nsamplesaftmax;
00039   unsigned int _noiseCut;
00040   unsigned int _parabnbefmax;
00041   unsigned int _parabnaftmax;
00042   unsigned int _thres;
00043   unsigned int _lowlev;
00044   unsigned int _highlev;
00045   unsigned int _nevlasers;
00046   unsigned int _timebefmax;
00047   unsigned int _timeaftmax;
00048   double       _cutwindow;
00049   unsigned int _nsamplesshape;
00050   unsigned int _presampleshape;
00051   unsigned int _slide;
00052   int          _fedid;
00053   int          _debug;
00054 
00055   std::string resdir_;
00056   std::string digiCollection_;
00057   std::string digiProducer_;
00058   std::string eventHeaderCollection_;
00059   std::string eventHeaderProducer_;
00060 
00061   std::string outfile;
00062   std::string sampfile;
00063 
00064 
00065   // Identify run type
00066 
00067   unsigned int nSides;
00068   int lightside;
00069   int runType;
00070   int runNum;
00071   int  dccID;
00072   int  fedID;
00073 
00074   // Count Laser Events
00075   int laserEvents;
00076   bool isThereMatacq;
00077 
00078   //Declaration of leaves types
00079   
00080   int   event ;
00081   int   color ;
00082   double  matacq[N_samples]; 
00083   int  maxsamp; 
00084   int  nsamples; 
00085   double tt;
00086 
00087   TFile *sampFile;
00088   TTree *tree;
00089 
00090   TMTQ *MTQ[nColor][nSide];
00091   TTree *meanTree[nColor];
00092 
00093   std::vector<int> colors;
00094 
00095   TFile *outFile;
00096   int status;
00097   double peak, sigma, fit, ampl, trise, fwhm, fw20, fw80, ped, pedsig, ttrig, sliding;
00098   TTree* mtqShape;
00099 
00100 
00101 };
00102 
00103