CMS 3D CMS Logo

CSCscaAnalyzer.h

Go to the documentation of this file.
00001 
00009 #include <iostream>
00010 #include <time.h>
00011 #include <sys/stat.h>   
00012 #include <unistd.h>
00013 #include <fstream>
00014 
00015 #include "OnlineDB/CSCCondDB/interface/CSCMap1.h"
00016 #include "OnlineDB/CSCCondDB/interface/CSCOnlineDB.h"
00017 #include "CondFormats/CSCObjects/interface/CSCobject.h"
00018 #include "TFile.h"
00019 #include "TTree.h"
00020 #include "TH1F.h"
00021 #include "TH2F.h"
00022 #include "TCanvas.h"
00023 
00024 class TCalibSCAEvt {
00025   public:
00026   Int_t strip;
00027   Int_t layer;
00028   Int_t cham;
00029   Int_t ddu;
00030   Float_t scaMeanVal;
00031   Int_t id;
00032   Int_t scanumber;
00033 };
00034 
00035 class CSCscaAnalyzer : public edm::EDAnalyzer {
00036  public:
00037   explicit CSCscaAnalyzer(edm::ParameterSet const& conf);
00038   virtual void analyze(edm::Event const& e, edm::EventSetup const& iSetup);
00039    
00040 #define CHAMBERS_sca 9
00041 #define LAYERS_sca 6
00042 #define STRIPS_sca 80
00043 #define TIMEBINS_sca 8
00044 #define DDU_sca 2
00045 #define Number_sca 96
00046 #define TOTALSTRIPS_sca 480
00047 #define TOTALEVENTS_sca 10000
00048 
00049   ~CSCscaAnalyzer();
00050 
00051   
00052  private:
00053   
00054   int eventNumber,evt,strip,misMatch,fff,ret_code,length,Nddu,myevt;
00055   int chamber,layer,reportedChambers,chamber_num,sector,run,NChambers,first_strip_index,strips_per_layer,chamber_index ;
00056   int dmbID[CHAMBERS_sca],crateID[CHAMBERS_sca],size[CHAMBERS_sca];
00057   int value_adc[DDU_sca][CHAMBERS_sca][LAYERS_sca][STRIPS_sca][Number_sca];
00058   int scaNr[DDU_sca][CHAMBERS_sca][LAYERS_sca][STRIPS_sca];
00059   float value_adc_mean[DDU_sca][CHAMBERS_sca][LAYERS_sca][STRIPS_sca][Number_sca];
00060   int count_adc_mean[DDU_sca][CHAMBERS_sca][LAYERS_sca][STRIPS_sca][Number_sca],count_adc[DDU_sca][CHAMBERS_sca][LAYERS_sca][STRIPS_sca][Number_sca];
00061   float div[DDU_sca][CHAMBERS_sca][LAYERS_sca][STRIPS_sca][Number_sca],sum_weightSCAnr[DDU_sca][CHAMBERS_sca][LAYERS_sca][STRIPS_sca][Number_sca];
00062   std::vector<int> adc;
00063   std::string chamber_id;
00064   int lines,myIndex;
00065   std::ifstream filein;
00066   std::string PSet,name,chamber_type;
00067   bool debug;
00068   int flag,counterzero,maxStrip,counter;
00069   unsigned int maxDDU;
00070   float pedMean,my_scaValueMean,my_scaValue;
00071   int scaBlock,trigTime,lctPhase,power,cap,scaNumber,myNcham;
00072 
00073   //root ntuple
00074   TCalibSCAEvt calib_evt;
00075   TBranch *calibevt;
00076   TTree *calibtree;
00077   TFile *calibfile;
00078 };

Generated on Tue Jun 9 17:40:41 2009 for CMSSW by  doxygen 1.5.4