CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
sistrip::MeasureLA Class Reference

#include <MeasureLA.h>

Inheritance diagram for sistrip::MeasureLA:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 MeasureLA (const edm::ParameterSet &)
 
std::unique_ptr< SiStripLorentzAngleproduce (const SiStripLorentzAngleRcd &)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Types

enum  GRANULARITY { LAYER =0, MODULE =1, MODULESUMMARY =2 }
 

Private Member Functions

void calibrate (const std::pair< unsigned, LA_Filler_Fitter::Method >, LA_Filler_Fitter::Result &) const
 
std::pair< unsigned, LA_Filler_Fitter::Methodcalibration_key (const std::string layer, const LA_Filler_Fitter::Method) const
 
std::pair< unsigned, LA_Filler_Fitter::Methodcalibration_key (const uint32_t detid, const LA_Filler_Fitter::Method) const
 
void process_reports () const
 
void store_calibrations ()
 
void store_methods_and_granularity (const edm::VParameterSet &)
 
void summarize_module_muH_byLayer (const LA_Filler_Fitter &)
 
void write_report_plots (const std::string, const LA_Filler_Fitter::Method, const GRANULARITY) const
 
template<class T >
void write_report_text (const std::string, const LA_Filler_Fitter::Method &, const std::map< T, LA_Filler_Fitter::Result > &) const
 
void write_report_text_ms (const std::string, const LA_Filler_Fitter::Method) const
 

Static Private Member Functions

static std::string granularity (int32_t g)
 

Private Attributes

Book book
 
bool byLayer
 
bool byModule
 
const edm::VParameterSet calibrations
 
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > error_scaling
 
const edm::FileInPath fp_
 
const std::string inFileLocation
 
const std::vector< std::string > inputFiles
 
const float localybin
 
const unsigned maxEvents
 
const edm::VParameterSet measurementPreferences
 
int32_t methods
 
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > offset
 
const edm::VParameterSet reports
 
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > slope
 
const unsigned stripsperbin
 
TrackerTopology tTopo_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 17 of file MeasureLA.h.

Member Enumeration Documentation

Enumerator
LAYER 
MODULE 
MODULESUMMARY 

Definition at line 26 of file MeasureLA.h.

Constructor & Destructor Documentation

sistrip::MeasureLA::MeasureLA ( const edm::ParameterSet conf)
explicit

Definition at line 22 of file MeasureLA.cc.

References book, byLayer, byModule, FrontierConditions_GlobalTag_cff::file, LA_Filler_Fitter::fill(), LA_Filler_Fitter::fit(), inFileLocation, inputFiles, localybin, maxEvents, measurementPreferences, methods, process_reports(), produce(), reports, edm::ESProducer::setWhatProduced(), store_calibrations(), store_methods_and_granularity(), AlCaHLTBitMon_QueryRunRegistry::string, stripsperbin, summarize_module_muH_byLayer(), and tTopo_.

22  :
23  inputFiles( conf.getParameter<std::vector<std::string> >("InputFiles") ),
24  inFileLocation( conf.getParameter<std::string>("InFileLocation")),
25  fp_(conf.getParameter<edm::FileInPath>("SiStripDetInfo") ),
26  reports( conf.getParameter<edm::VParameterSet>("Reports")),
27  measurementPreferences( conf.getParameter<edm::VParameterSet>("MeasurementPreferences")),
28  calibrations(conf.getParameter<edm::VParameterSet>("Calibrations")),
29  methods(0), byModule(false), byLayer(false),
30  localybin(conf.getUntrackedParameter<double>("LocalYBin",0.0)),
31  stripsperbin(conf.getUntrackedParameter<unsigned>("StripsPerBin",0)),
32  maxEvents( conf.getUntrackedParameter<unsigned>("MaxEvents",0)),
34 {
38 
39  TChain*const chain = new TChain("la_data");
40  BOOST_FOREACH(const std::string file, inputFiles) chain->Add((file+inFileLocation).c_str());
41 
43  laff.fill(chain, book);
44  laff.fit(book);
47 
49 }
T getParameter(std::string const &) const
const edm::FileInPath fp_
Definition: MeasureLA.h:49
T getUntrackedParameter(std::string const &, T const &) const
void summarize_module_muH_byLayer(const LA_Filler_Fitter &)
Definition: MeasureLA.cc:71
Definition: chain.py:1
const unsigned stripsperbin
Definition: MeasureLA.h:55
const edm::VParameterSet measurementPreferences
Definition: MeasureLA.h:50
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
const std::vector< std::string > inputFiles
Definition: MeasureLA.h:47
const unsigned maxEvents
Definition: MeasureLA.h:55
const float localybin
Definition: MeasureLA.h:54
void process_reports() const
Definition: MeasureLA.cc:94
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void store_methods_and_granularity(const edm::VParameterSet &)
Definition: MeasureLA.cc:14
const edm::VParameterSet calibrations
Definition: MeasureLA.h:50
MeasureLA(const edm::ParameterSet &)
Definition: MeasureLA.cc:22
const edm::VParameterSet reports
Definition: MeasureLA.h:50
const std::string inFileLocation
Definition: MeasureLA.h:48
std::unique_ptr< SiStripLorentzAngle > produce(const SiStripLorentzAngleRcd &)
Definition: MeasureLA.cc:53
void store_calibrations()
Definition: MeasureLA.cc:154
TrackerTopology fromTrackerParametersXMLFile(const std::string &xmlFileName)
std::string fullPath() const
Definition: FileInPath.cc:197
TrackerTopology tTopo_
Definition: MeasureLA.h:58

Member Function Documentation

void sistrip::MeasureLA::calibrate ( const std::pair< unsigned, LA_Filler_Fitter::Method key,
LA_Filler_Fitter::Result result 
) const
inlineprivate

Definition at line 172 of file MeasureLA.cc.

References calibration_key(), LA_Filler_Fitter::Result::calMeasured, error_scaling, LA_Filler_Fitter::Result::measured, offset, and slope.

Referenced by granularity(), store_calibrations(), summarize_module_muH_byLayer(), and write_report_text().

172  {
173  result.calMeasured = std::make_pair<float,float>( ( result.measured.first - offset.find(key)->second ) / slope.find(key)->second ,
174  result.measured.second * error_scaling.find(key)->second / slope.find(key)->second );
175 }
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > slope
Definition: MeasureLA.h:51
std::pair< float, float > measured
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > offset
Definition: MeasureLA.h:51
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > error_scaling
Definition: MeasureLA.h:51
std::pair< float, float > calMeasured
std::pair< uint32_t, LA_Filler_Fitter::Method > sistrip::MeasureLA::calibration_key ( const std::string  layer,
const LA_Filler_Fitter::Method  method 
) const
private

Definition at line 178 of file MeasureLA.cc.

References cmsPerfStripChart::format, and LA_Filler_Fitter::layer_index().

Referenced by calibrate(), granularity(), summarize_module_muH_byLayer(), and write_report_text().

178  {
179  boost::regex format(".*(T[IO]B)_layer(\\d)([as]).*");
180  const bool isTIB = "TIB" == boost::regex_replace(layer, format, "\\1");
181  const bool stereo = "s" == boost::regex_replace(layer, format, "\\3");
182  const unsigned layerNum = boost::lexical_cast<unsigned>(boost::regex_replace(layer, format, "\\2"));
183  return std::make_pair(LA_Filler_Fitter::layer_index(isTIB,stereo,layerNum),method);
184 }
static unsigned layer_index(bool TIB, bool stereo, unsigned layer)
format
Some error handling for the usage.
std::pair< uint32_t, LA_Filler_Fitter::Method > sistrip::MeasureLA::calibration_key ( const uint32_t  detid,
const LA_Filler_Fitter::Method  method 
) const
private

Definition at line 187 of file MeasureLA.cc.

References LA_Filler_Fitter::layer_index(), SiStripDetId::subDetector(), SiStripDetId::TIB, TrackerTopology::tibLayer(), TrackerTopology::tibStereo(), TrackerTopology::tobStereo(), and tTopo_.

187  {
188  const bool isTIB = SiStripDetId(detid).subDetector() == SiStripDetId::TIB;
189  const bool stereo = isTIB ? tTopo_.tibStereo(detid) : tTopo_.tobStereo(detid);
190  const unsigned layer = isTIB ? tTopo_.tibLayer(detid) : tTopo_.tobStereo(detid);
191 
192  return std::make_pair(LA_Filler_Fitter::layer_index(isTIB,stereo,layer),method);
193 }
static unsigned layer_index(bool TIB, bool stereo, unsigned layer)
unsigned int tibLayer(const DetId &id) const
uint32_t tobStereo(const DetId &id) const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
SubDetector subDetector() const
Definition: SiStripDetId.h:114
uint32_t tibStereo(const DetId &id) const
TrackerTopology tTopo_
Definition: MeasureLA.h:58
static std::string sistrip::MeasureLA::granularity ( int32_t  g)
inlinestaticprivate

Definition at line 27 of file MeasureLA.h.

References calibrate(), calibration_key(), LAYER, MODULE, MODULESUMMARY, process_reports(), store_calibrations(), store_methods_and_granularity(), AlCaHLTBitMon_QueryRunRegistry::string, summarize_module_muH_byLayer(), write_report_plots(), write_report_text(), and write_report_text_ms().

Referenced by summarize_module_muH_byLayer(), write_report_plots(), and write_report_text_ms().

27  { switch(g) {
28  case LAYER: return "_layer";
29  case MODULE: return "_module";
30  case MODULESUMMARY: return "_moduleSummary";
31  } return "";};
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
void sistrip::MeasureLA::process_reports ( ) const
private

Definition at line 94 of file MeasureLA.cc.

References Book::begin(), book, Book::end(), edm::ParameterSet::getParameter(), LAYER, LA_Filler_Fitter::layer_results(), AlcaSiPixelAliHarvester0T_cff::method, MODULE, LA_Filler_Fitter::module_results(), MODULESUMMARY, dataset::name, AlCaHLTBitMon_ParallelJobs::p, reports, AlCaHLTBitMon_QueryRunRegistry::string, write_report_plots(), write_report_text(), and write_report_text_ms().

Referenced by granularity(), MeasureLA(), and summarize_module_muH_byLayer().

94  {
95  BOOST_FOREACH(edm::ParameterSet p, reports) {
96  const GRANULARITY gran = (GRANULARITY) p.getParameter<int32_t>("Granularity");
97  const std::string name = p.getParameter<std::string>("ReportName");
99 
100  write_report_plots( name, method, gran);
101  switch(gran) {
102  case LAYER: write_report_text( name, method, LA_Filler_Fitter::layer_results(book, method) ); break;
103  case MODULE: write_report_text( name, method, LA_Filler_Fitter::module_results(book, method) ); break;
104  case MODULESUMMARY: write_report_text_ms( name, method); break;
105  }
106  }
107 
108  { TFile widthsFile("widths.root","RECREATE");
109  for(Book::const_iterator it = book.begin(".*_width"); it!=book.end(); it++) if(it->second) it->second->Write();
110  widthsFile.Close();}
111 }
T getParameter(std::string const &) const
static std::map< std::string, Result > layer_results(const Book &, const Method)
Definition: LA_Results.cc:63
const edm::VParameterSet reports
Definition: MeasureLA.h:50
iterator begin(string_t re=".*")
Definition: Book.h:48
void write_report_text_ms(const std::string, const LA_Filler_Fitter::Method) const
Definition: MeasureLA.cc:137
static std::map< uint32_t, Result > module_results(const Book &, const Method)
Definition: LA_Results.cc:51
void write_report_plots(const std::string, const LA_Filler_Fitter::Method, const GRANULARITY) const
Definition: MeasureLA.cc:114
boost::filter_iterator< match_name, book_t::const_iterator > const_iterator
Definition: Book.h:47
void write_report_text(const std::string, const LA_Filler_Fitter::Method &, const std::map< T, LA_Filler_Fitter::Result > &) const
Definition: MeasureLA.cc:124
iterator end(string_t re=".*")
Definition: Book.h:50
std::unique_ptr< SiStripLorentzAngle > sistrip::MeasureLA::produce ( const SiStripLorentzAngleRcd )

Definition at line 53 of file MeasureLA.cc.

References summarize_module_muH_byLayer().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), HTMLExport.HTMLExportStatic::export(), and MeasureLA().

53  {
54  auto lorentzAngle = std::make_unique<SiStripLorentzAngle>();
55  /*
56  std::map<uint32_t,LA_Filler_Fitter::Result>
57  module_results = LA_Filler_Fitter::module_results(book, LA_Filler_Fitter::SQRTVAR);
58 
59  BOOST_FOREACH(const uint32_t& detid, SiStripDetInfoFileReader(fp_.fullPath()).getAllDetIds()) {
60  float la = module_results[detid].measure / module_results[detid].field ;
61  lorentzAngle->putLorentzAngle( detid, la );
62  }
63  */
64  return lorentzAngle;
65 }
void sistrip::MeasureLA::store_calibrations ( )
private

Definition at line 154 of file MeasureLA.cc.

References calibrate(), calibrations, error_scaling, edm::ParameterSet::getParameter(), mps_fire::i, crabWrapper::key, AlcaSiPixelAliHarvester0T_cff::method, offset, AlCaHLTBitMon_ParallelJobs::p, and slope.

Referenced by granularity(), MeasureLA(), and write_report_text_ms().

154  {
155  BOOST_FOREACH(edm::ParameterSet p, calibrations) {
157  std::vector<double> slopes(p.getParameter<std::vector<double> >("Slopes")); assert(slopes.size()==14);
158  std::vector<double> offsets(p.getParameter<std::vector<double> >("Offsets")); assert(offsets.size()==14);
159  std::vector<double> pulls(p.getParameter<std::vector<double> >("Pulls")); assert(pulls.size()==14);
160 
161  for(unsigned i=0; i<14; i++) {
162  const std::pair<unsigned,LA_Filler_Fitter::Method> key( i, method);
163  offset[key] = offsets[i];
164  slope[key] = slopes[i];
165  error_scaling[key] = pulls[i];
166  }
167  }
168 }
T getParameter(std::string const &) const
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > slope
Definition: MeasureLA.h:51
const edm::VParameterSet calibrations
Definition: MeasureLA.h:50
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > offset
Definition: MeasureLA.h:51
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > error_scaling
Definition: MeasureLA.h:51
void sistrip::MeasureLA::store_methods_and_granularity ( const edm::VParameterSet vpset)
private

Definition at line 14 of file MeasureLA.cc.

References byLayer, byModule, edm::ParameterSet::getParameter(), methods, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by granularity(), and MeasureLA().

14  {
15  BOOST_FOREACH(edm::ParameterSet p, vpset) {
16  methods |= p.getParameter<int32_t>("Method");
17  byModule = byModule || p.getParameter<int32_t>("Granularity");
18  byLayer = byLayer || !p.getParameter<int32_t>("Granularity");
19  }
20 }
T getParameter(std::string const &) const
void sistrip::MeasureLA::summarize_module_muH_byLayer ( const LA_Filler_Fitter laff)
private

Definition at line 71 of file MeasureLA.cc.

References Book::begin(), book, calibrate(), calibration_key(), Book::end(), Book::fill(), LA_Filler_Fitter::FIRST_METHOD, granularity(), diffTwoXMLs::label, LA_Filler_Fitter::LAST_METHOD, LA_Filler_Fitter::layerLabel(), funct::m, AlcaSiPixelAliHarvester0T_cff::method, LA_Filler_Fitter::method(), LA_Filler_Fitter::module_results(), MODULESUMMARY, funct::pow(), process_reports(), mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by granularity(), MeasureLA(), and produce().

71  {
74  std::pair<uint32_t,LA_Filler_Fitter::Result> result;
75  BOOST_FOREACH(result, LA_Filler_Fitter::module_results(book, method)) {
76 
77  calibrate( calibration_key(result.first,method), result.second);
79  label = boost::regex_replace(label,boost::regex("layer"),"");
80 
81  const double mu_H = -result.second.calMeasured.first / result.second.field;
82  const double sigma_mu_H = result.second.calMeasured.second / result.second.field;
83  const double weight = pow(1./sigma_mu_H, 2);
84 
85  book.fill(mu_H, label, 150,-0.05,0.1, weight);
86  }
87  for(Book::iterator it = book.begin(".*"+granularity(MODULESUMMARY)+".*"); it!=book.end(); ++it) {
88  if(it->second->GetEntries()) it->second->Fit("gaus","LLQ");
89  }
90  }
91 }
std::string layerLabel(const SiStripDetId) const
Definition: LA_Filler.cc:93
void calibrate(const std::pair< unsigned, LA_Filler_Fitter::Method >, LA_Filler_Fitter::Result &) const
Definition: MeasureLA.cc:172
Definition: weight.py:1
static std::string granularity(int32_t g)
Definition: MeasureLA.h:27
iterator begin(string_t re=".*")
Definition: Book.h:48
static std::string method(Method m, bool fit=true)
void fill(double_t X, const char *name, uint_t NbinsX, double_t Xlow, double_t Xup, double_t W=1)
Definition: Book.h:60
static std::map< uint32_t, Result > module_results(const Book &, const Method)
Definition: LA_Results.cc:51
boost::filter_iterator< match_name, book_t::iterator > iterator
Definition: Book.h:46
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
std::pair< unsigned, LA_Filler_Fitter::Method > calibration_key(const std::string layer, const LA_Filler_Fitter::Method) const
Definition: MeasureLA.cc:178
iterator end(string_t re=".*")
Definition: Book.h:50
void sistrip::MeasureLA::write_report_plots ( const std::string  name,
const LA_Filler_Fitter::Method  method,
const GRANULARITY  gran 
) const
private

Definition at line 114 of file MeasureLA.cc.

References Book::begin(), book, Book::end(), FrontierConditions_GlobalTag_cff::file, granularity(), create_public_lumi_plots::hist, crabWrapper::key, LA_Filler_Fitter::method(), AlCaHLTBitMon_QueryRunRegistry::string, and write_report_text().

Referenced by granularity(), and process_reports().

114  {
115  TFile file((name+".root").c_str(),"RECREATE");
116  const std::string key = ".*" + granularity(gran) + ".*("+LA_Filler_Fitter::method(method)+"|"+LA_Filler_Fitter::method(method,false)+".*)";
117  for(Book::const_iterator hist = book.begin(key); hist!=book.end(); ++hist)
118  if(hist->second) hist->second->Write();
119  file.Close();
120 }
static std::string granularity(int32_t g)
Definition: MeasureLA.h:27
iterator begin(string_t re=".*")
Definition: Book.h:48
static std::string method(Method m, bool fit=true)
boost::filter_iterator< match_name, book_t::const_iterator > const_iterator
Definition: Book.h:47
iterator end(string_t re=".*")
Definition: Book.h:50
template<class T >
void sistrip::MeasureLA::write_report_text ( const std::string  name,
const LA_Filler_Fitter::Method _method,
const std::map< T, LA_Filler_Fitter::Result > &  _results 
) const
private

Definition at line 124 of file MeasureLA.cc.

References calibrate(), calibration_key(), FrontierConditions_GlobalTag_cff::file, AlcaSiPixelAliHarvester0T_cff::method, MillePedeFileConverter_cfg::out, mps_fire::result, mps_update::results, and write_report_text_ms().

Referenced by granularity(), process_reports(), and write_report_plots().

124  {
126  std::map<T,LA_Filler_Fitter::Result>results = _results;
127  std::fstream file((name+".dat").c_str(),std::ios::out);
128  std::pair<T,LA_Filler_Fitter::Result> result;
129  BOOST_FOREACH(result, results) {
130  calibrate( calibration_key(result.first,method), result.second);
131  file << result.first << "\t" << result.second << std::endl;
132  }
133  file.close();
134 }
void calibrate(const std::pair< unsigned, LA_Filler_Fitter::Method >, LA_Filler_Fitter::Result &) const
Definition: MeasureLA.cc:172
std::pair< unsigned, LA_Filler_Fitter::Method > calibration_key(const std::string layer, const LA_Filler_Fitter::Method) const
Definition: MeasureLA.cc:178
void sistrip::MeasureLA::write_report_text_ms ( const std::string  name,
const LA_Filler_Fitter::Method  method 
) const
private

Definition at line 137 of file MeasureLA.cc.

References Book::begin(), book, Book::end(), f, FrontierConditions_GlobalTag_cff::file, granularity(), crabWrapper::key, LA_Filler_Fitter::method(), MODULESUMMARY, MillePedeFileConverter_cfg::out, store_calibrations(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by granularity(), process_reports(), and write_report_text().

137  {
138  std::fstream file((name+".dat").c_str(),std::ios::out);
140  for(Book::const_iterator it = book.begin(key); it!=book.end(); ++it) {
141  const TF1*const f = it->second->GetFunction("gaus");
142  if(f) {
143  file << it->first << "\t"
144  << f->GetParameter(1) << "\t"
145  << f->GetParError(1) << "\t"
146  << f->GetParameter(2) << "\t"
147  << f->GetParError(2) << std::endl;
148  }
149  }
150  file.close();
151 }
static std::string granularity(int32_t g)
Definition: MeasureLA.h:27
double f[11][100]
iterator begin(string_t re=".*")
Definition: Book.h:48
static std::string method(Method m, bool fit=true)
boost::filter_iterator< match_name, book_t::const_iterator > const_iterator
Definition: Book.h:47
iterator end(string_t re=".*")
Definition: Book.h:50

Member Data Documentation

Book sistrip::MeasureLA::book
private
bool sistrip::MeasureLA::byLayer
private

Definition at line 53 of file MeasureLA.h.

Referenced by MeasureLA(), and store_methods_and_granularity().

bool sistrip::MeasureLA::byModule
private

Definition at line 53 of file MeasureLA.h.

Referenced by MeasureLA(), and store_methods_and_granularity().

const edm::VParameterSet sistrip::MeasureLA::calibrations
private

Definition at line 50 of file MeasureLA.h.

Referenced by store_calibrations().

std::map<std::pair<uint32_t,LA_Filler_Fitter::Method>,float> sistrip::MeasureLA::error_scaling
private

Definition at line 51 of file MeasureLA.h.

Referenced by calibrate(), and store_calibrations().

const edm::FileInPath sistrip::MeasureLA::fp_
private

Definition at line 49 of file MeasureLA.h.

const std::string sistrip::MeasureLA::inFileLocation
private

Definition at line 48 of file MeasureLA.h.

Referenced by MeasureLA().

const std::vector<std::string> sistrip::MeasureLA::inputFiles
private

Definition at line 47 of file MeasureLA.h.

Referenced by MeasureLA(), and VarParsing.VarParsing::parseArguments().

const float sistrip::MeasureLA::localybin
private

Definition at line 54 of file MeasureLA.h.

Referenced by MeasureLA().

const unsigned sistrip::MeasureLA::maxEvents
private

Definition at line 55 of file MeasureLA.h.

Referenced by MeasureLA().

const edm::VParameterSet sistrip::MeasureLA::measurementPreferences
private

Definition at line 50 of file MeasureLA.h.

Referenced by MeasureLA().

int32_t sistrip::MeasureLA::methods
private

Definition at line 52 of file MeasureLA.h.

Referenced by MeasureLA(), and store_methods_and_granularity().

std::map<std::pair<uint32_t,LA_Filler_Fitter::Method>,float> sistrip::MeasureLA::offset
private

Definition at line 51 of file MeasureLA.h.

Referenced by calibrate(), and store_calibrations().

const edm::VParameterSet sistrip::MeasureLA::reports
private

Definition at line 50 of file MeasureLA.h.

Referenced by MeasureLA(), and process_reports().

std::map<std::pair<uint32_t,LA_Filler_Fitter::Method>,float> sistrip::MeasureLA::slope
private
const unsigned sistrip::MeasureLA::stripsperbin
private

Definition at line 55 of file MeasureLA.h.

Referenced by MeasureLA().

TrackerTopology sistrip::MeasureLA::tTopo_
private

Definition at line 58 of file MeasureLA.h.

Referenced by calibration_key(), and MeasureLA().