Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:49

0001 #ifndef CSCAFEBCONNECTANALYSIS_H
0002 #define CSCAFEBCONNECTANALYSIS_H
0003 
0004 #include "TH1.h"
0005 #include "TH2.h"
0006 #include "TFile.h"
0007 #include "DataFormats/CSCDigi/interface/CSCWireDigiCollection.h"
0008 #include "OnlineDB/CSCCondDB/interface/CSCToAFEB.h"
0009 #include <map>
0010 #include <string>
0011 #include <sstream>
0012 #include <cstdio>
0013 
0014 /** \class CSCAFEBConnectAnalysis
0015   *  
0016   * \author 
0017   */
0018 class CSCAFEBConnectAnalysis {
0019 public:
0020   CSCAFEBConnectAnalysis();
0021   void setup(const std::string& histoFileName);
0022   void analyze(const CSCWireDigiCollection& wirecltn);
0023   void done();
0024 
0025 private:
0026   void bookForId(int flag, const int& idint, const std::string& ids);
0027   void hf1ForId(std::map<int, TH1*>& mp, int flag, const int& id, float& x, float w);
0028   void hf2ForId(std::map<int, TH2*>& mp, int flag, const int& id, float& x, float& y, float w);
0029   /// Statistics
0030   int nmbev;
0031   int nmbev_no_wire;
0032   int npulses;
0033   int nmblayers;
0034   int pulsed_layer;
0035   std::vector<int> nmbpulses;
0036 
0037   /// Maps
0038 
0039   std::map<int, int> m_csc_list;
0040   std::map<int, std::vector<int> > m_wire_ev;
0041   std::map<int, std::vector<std::vector<float> > > m_res_for_db;
0042 
0043   /// Layer, wire to AFEB, channel conversion
0044   const CSCToAFEB csctoafeb;
0045 
0046   /// ROOT hist file
0047   TFile* hist_file;
0048 
0049   /// Histogram maps
0050   std::map<int, TH1*> mh_LayerNmbPulses;
0051   std::map<int, TH1*> mh_WireEff;
0052   std::map<int, TH1*> mh_Eff;
0053   std::map<int, TH1*> mh_WirePairCrosstalk;
0054   std::map<int, TH1*> mh_PairCrosstalk;
0055   std::map<int, TH1*> mh_WireNonPairCrosstalk;
0056   std::map<int, TH1*> mh_NonPairCrosstalk;
0057   std::map<int, TH2*> mh_FirstTime;
0058 };
0059 
0060 #endif