CMS 3D CMS Logo

SiStripGainCosmicCalculator.h

Go to the documentation of this file.
00001 #ifndef CalibTracker_SiStripChannelGain_SiStripGainCosmicCalculator_h
00002 #define CalibTracker_SiStripChannelGain_SiStripGainCosmicCalculator_h
00003 // -*- C++ -*-
00004 // Package:    SiStripApvGainCalculator
00005 // Class:      SiStripApvGainCalculator
00010 // Original Author:  Dorian Kcira, Pierre Rodeghiero
00011 //         Created:  Mon Nov 20 10:04:31 CET 2006
00012 // $Id: SiStripGainCosmicCalculator.h,v 1.2 2007/09/13 20:02:52 dkcira Exp $
00013 #include "CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h"
00014 #include "CondFormats/SiStripObjects/interface/SiStripApvGain.h"
00015 #include <vector>
00016 #include "TF1.h"
00017 #include "TH1F.h"
00018 #include "TObjArray.h"
00019 #include "TFile.h"
00020 #include "TString.h"
00021 #include <fstream>
00022 #include <sstream>
00023 
00024 class SiStripGainCosmicCalculator : public ConditionDBWriter<SiStripApvGain> {
00025 public:
00026   explicit SiStripGainCosmicCalculator(const edm::ParameterSet&);
00027   ~SiStripGainCosmicCalculator();
00028 private:
00029   void algoAnalyze(const edm::Event &, const edm::EventSetup &);
00030   void algoBeginJob(const edm::EventSetup&);
00031   void algoEndJob();
00032   SiStripApvGain * getNewObject();
00033 private:
00034   std::pair<double,double> getPeakOfLandau( TH1F * inputHisto );
00035   double moduleWidth(const uint32_t detid, const edm::EventSetup* iSetup);
00036   double moduleThickness(const uint32_t detid, const edm::EventSetup* iSetup);
00037 private:
00038   std::string TrackProducer;
00039   std::string TrackLabel;
00040   //
00041   TObjArray * HlistAPVPairs;
00042   TObjArray * HlistOtherHistos;
00043   uint32_t total_nr_of_events;
00044   double ExpectedChargeDeposition;
00045   std::map<uint32_t, double> thickness_map; // map of detector id to respective thickness
00046   std::vector<uint32_t> SelectedDetIds;
00047   std::vector<uint32_t> detModulesToBeExcluded;
00048   const edm::EventSetup * eventSetupCopy_;
00049   unsigned int MinNrEntries;
00050   double MaxChi2OverNDF;
00051   bool outputHistogramsInRootFile;
00052   TString outputFileName ;
00053   bool printdebug_;
00054 };
00055 #endif

Generated on Tue Jun 9 17:25:50 2009 for CMSSW by  doxygen 1.5.4