test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &)
 
boost::shared_ptr
< SiStripLorentzAngle
produce (const SiStripLorentzAngleRcd &)
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 

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
 
void process_reports () const
 
void store_calibrations ()
 
void store_methods_and_granularity (const edm::VParameterSet &)
 
void summarize_module_muH_byLayer ()
 
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::pair< unsigned,
LA_Filler_Fitter::Method
calibration_key (const std::string layer, const LA_Filler_Fitter::Method)
 
static std::pair< unsigned,
LA_Filler_Fitter::Method
calibration_key (const uint32_t detid, const LA_Filler_Fitter::Method)
 
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
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
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::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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 14 of file MeasureLA.h.

Member Enumeration Documentation

Enumerator
LAYER 
MODULE 
MODULESUMMARY 

Definition at line 23 of file MeasureLA.h.

Constructor & Destructor Documentation

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

Definition at line 19 of file MeasureLA.cc.

References book, byLayer, byModule, mergeVDriftHistosByStation::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, and summarize_module_muH_byLayer().

19  :
20  inputFiles( conf.getParameter<std::vector<std::string> >("InputFiles") ),
21  inFileLocation( conf.getParameter<std::string>("InFileLocation")),
22  fp_(conf.getParameter<edm::FileInPath>("SiStripDetInfo") ),
23  reports( conf.getParameter<edm::VParameterSet>("Reports")),
24  measurementPreferences( conf.getParameter<edm::VParameterSet>("MeasurementPreferences")),
25  calibrations(conf.getParameter<edm::VParameterSet>("Calibrations")),
26  methods(0), byModule(false), byLayer(false),
27  localybin(conf.getUntrackedParameter<double>("LocalYBin",0.0)),
28  stripsperbin(conf.getUntrackedParameter<unsigned>("StripsPerBin",0)),
29  maxEvents( conf.getUntrackedParameter<unsigned>("MaxEvents",0))
30 {
34 
35  TChain*const chain = new TChain("la_data");
36  BOOST_FOREACH(const std::string file, inputFiles) chain->Add((file+inFileLocation).c_str());
37 
39  laff.fill(chain, book);
40  laff.fit(book);
43 
45 }
T getParameter(std::string const &) const
const edm::FileInPath fp_
Definition: MeasureLA.h:46
T getUntrackedParameter(std::string const &, T const &) const
string fill
Definition: lumiContext.py:319
const unsigned stripsperbin
Definition: MeasureLA.h:52
const edm::VParameterSet measurementPreferences
Definition: MeasureLA.h:47
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
const std::vector< std::string > inputFiles
Definition: MeasureLA.h:44
const unsigned maxEvents
Definition: MeasureLA.h:52
const float localybin
Definition: MeasureLA.h:51
void process_reports() const
Definition: MeasureLA.cc:87
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:11
const edm::VParameterSet calibrations
Definition: MeasureLA.h:47
MeasureLA(const edm::ParameterSet &)
Definition: MeasureLA.cc:19
const edm::VParameterSet reports
Definition: MeasureLA.h:47
const std::string inFileLocation
Definition: MeasureLA.h:45
void store_calibrations()
Definition: MeasureLA.cc:147
void summarize_module_muH_byLayer()
Definition: MeasureLA.cc:64
boost::shared_ptr< SiStripLorentzAngle > produce(const SiStripLorentzAngleRcd &)
Definition: MeasureLA.cc:49

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 165 of file MeasureLA.cc.

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

Referenced by summarize_module_muH_byLayer(), and write_report_text().

165  {
166  result.calMeasured = std::make_pair<float,float>( ( result.measured.first - offset.find(key)->second ) / slope.find(key)->second ,
167  result.measured.second * error_scaling.find(key)->second / slope.find(key)->second );
168 }
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > slope
Definition: MeasureLA.h:48
std::pair< float, float > measured
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > offset
Definition: MeasureLA.h:48
list key
Definition: combine.py:13
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > error_scaling
Definition: MeasureLA.h:48
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 
)
staticprivate

Definition at line 171 of file MeasureLA.cc.

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

Referenced by summarize_module_muH_byLayer(), and write_report_text().

171  {
172  boost::regex format(".*(T[IO]B)_layer(\\d)([as]).*");
173  const bool TIB = "TIB" == boost::regex_replace(layer, format, "\\1");
174  const bool stereo = "s" == boost::regex_replace(layer, format, "\\3");
175  const unsigned layerNum = boost::lexical_cast<unsigned>(boost::regex_replace(layer, format, "\\2"));
176  return std::make_pair(LA_Filler_Fitter::layer_index(TIB,stereo,layerNum),method);
177 }
static unsigned layer_index(bool TIB, bool stereo, unsigned layer)
string 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 
)
staticprivate

Definition at line 180 of file MeasureLA.cc.

References TOBDetId::layer(), TIBDetId::layer(), LA_Filler_Fitter::layer_index(), SiStripDetId::stereo(), SiStripDetId::subDetector(), SiStripDetId::TIB, and sistrip::TIB.

180  {
182  const bool stereo = TIB ? TIBDetId(detid).stereo() : TOBDetId(detid).stereo();
183  const unsigned layer = TIB ? TIBDetId(detid).layer() : TOBDetId(detid).layer();
184  return std::make_pair(LA_Filler_Fitter::layer_index(TIB,stereo,layer),method);
185 }
static unsigned layer_index(bool TIB, bool stereo, unsigned layer)
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
uint32_t stereo() const
Definition: SiStripDetId.h:162
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
SubDetector subDetector() const
Definition: SiStripDetId.h:114
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
static std::string sistrip::MeasureLA::granularity ( int32_t  g)
inlinestaticprivate

Definition at line 24 of file MeasureLA.h.

References LAYER, MODULE, and MODULESUMMARY.

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

24  { switch(g) {
25  case LAYER: return "_layer";
26  case MODULE: return "_module";
27  case MODULESUMMARY: return "_moduleSummary";
28  } 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 87 of file MeasureLA.cc.

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

Referenced by MeasureLA().

87  {
88  BOOST_FOREACH(edm::ParameterSet p, reports) {
89  const GRANULARITY gran = (GRANULARITY) p.getParameter<int32_t>("Granularity");
90  const std::string name = p.getParameter<std::string>("ReportName");
92 
93  write_report_plots( name, method, gran);
94  switch(gran) {
95  case LAYER: write_report_text( name, method, LA_Filler_Fitter::layer_results(book, method) ); break;
96  case MODULE: write_report_text( name, method, LA_Filler_Fitter::module_results(book, method)); break;
97  case MODULESUMMARY: write_report_text_ms( name, method); break;
98  }
99  }
100 
101  { TFile widthsFile("widths.root","RECREATE");
102  for(Book::const_iterator it = book.begin(".*_width"); it!=book.end(); it++) if(it->second) it->second->Write();
103  widthsFile.Close();}
104 }
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:47
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:130
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:107
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:117
iterator end(string_t re=".*")
Definition: Book.h:50
boost::shared_ptr< SiStripLorentzAngle > sistrip::MeasureLA::produce ( const SiStripLorentzAngleRcd )

Definition at line 49 of file MeasureLA.cc.

References redigi_cff::SiStripLorentzAngle.

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

49  {
50  boost::shared_ptr<SiStripLorentzAngle> lorentzAngle(new SiStripLorentzAngle());
51  /*
52  std::map<uint32_t,LA_Filler_Fitter::Result>
53  module_results = LA_Filler_Fitter::module_results(book, LA_Filler_Fitter::SQRTVAR);
54 
55  BOOST_FOREACH(const uint32_t& detid, SiStripDetInfoFileReader(fp_.fullPath()).getAllDetIds()) {
56  float la = module_results[detid].measure / module_results[detid].field ;
57  lorentzAngle->putLorentzAngle( detid, la );
58  }
59  */
60  return lorentzAngle;
61 }
tuple SiStripLorentzAngle
Definition: redigi_cff.py:15
void sistrip::MeasureLA::store_calibrations ( )
private

Definition at line 147 of file MeasureLA.cc.

References calibrations, error_scaling, edm::ParameterSet::getParameter(), i, combine::key, PFRecoTauDiscriminationAgainstElectronMVA3GBR_cfi::method, offset, AlCaHLTBitMon_ParallelJobs::p, and slope.

Referenced by MeasureLA().

147  {
148  BOOST_FOREACH(edm::ParameterSet p, calibrations) {
150  std::vector<double> slopes(p.getParameter<std::vector<double> >("Slopes")); assert(slopes.size()==14);
151  std::vector<double> offsets(p.getParameter<std::vector<double> >("Offsets")); assert(offsets.size()==14);
152  std::vector<double> pulls(p.getParameter<std::vector<double> >("Pulls")); assert(pulls.size()==14);
153 
154  for(unsigned i=0; i<14; i++) {
155  const std::pair<unsigned,LA_Filler_Fitter::Method> key( i, method);
156  offset[key] = offsets[i];
157  slope[key] = slopes[i];
158  error_scaling[key] = pulls[i];
159  }
160  }
161 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > slope
Definition: MeasureLA.h:48
const edm::VParameterSet calibrations
Definition: MeasureLA.h:47
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > offset
Definition: MeasureLA.h:48
list key
Definition: combine.py:13
std::map< std::pair< uint32_t, LA_Filler_Fitter::Method >, float > error_scaling
Definition: MeasureLA.h:48
void sistrip::MeasureLA::store_methods_and_granularity ( const edm::VParameterSet vpset)
private

Definition at line 11 of file MeasureLA.cc.

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

Referenced by MeasureLA().

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

Definition at line 64 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(), m, PFRecoTauDiscriminationAgainstElectronMVA3GBR_cfi::method, LA_Filler_Fitter::method(), LA_Filler_Fitter::module_results(), MODULESUMMARY, funct::pow(), query::result, AlCaHLTBitMon_QueryRunRegistry::string, and histoStyle::weight.

Referenced by MeasureLA().

64  {
67  std::pair<uint32_t,LA_Filler_Fitter::Result> result;
68  BOOST_FOREACH(result, LA_Filler_Fitter::module_results(book, method)) {
69 
70  calibrate( calibration_key(result.first,method), result.second);
72  label = boost::regex_replace(label,boost::regex("layer"),"");
73 
74  const double mu_H = -result.second.calMeasured.first / result.second.field;
75  const double sigma_mu_H = result.second.calMeasured.second / result.second.field;
76  const double weight = pow(1./sigma_mu_H, 2);
77 
78  book.fill(mu_H, label, 150,-0.05,0.1, weight);
79  }
80  for(Book::iterator it = book.begin(".*"+granularity(MODULESUMMARY)+".*"); it!=book.end(); ++it) {
81  if(it->second->GetEntries()) it->second->Fit("gaus","LLQ");
82  }
83  }
84 }
static std::pair< unsigned, LA_Filler_Fitter::Method > calibration_key(const std::string layer, const LA_Filler_Fitter::Method)
Definition: MeasureLA.cc:171
void calibrate(const std::pair< unsigned, LA_Filler_Fitter::Method >, LA_Filler_Fitter::Result &) const
Definition: MeasureLA.cc:165
static std::string granularity(int32_t g)
Definition: MeasureLA.h:24
static std::string layerLabel(const SiStripDetId)
Definition: LA_Filler.cc:92
tuple result
Definition: query.py:137
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
int weight
Definition: histoStyle.py:50
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
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 107 of file MeasureLA.cc.

References Book::begin(), book, Book::end(), mergeVDriftHistosByStation::file, granularity(), estimatePileup::hist, combine::key, LA_Filler_Fitter::method(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by process_reports().

107  {
108  TFile file((name+".root").c_str(),"RECREATE");
109  const std::string key = ".*" + granularity(gran) + ".*("+LA_Filler_Fitter::method(method)+"|"+LA_Filler_Fitter::method(method,0)+".*)";
110  for(Book::const_iterator hist = book.begin(key); hist!=book.end(); ++hist)
111  if(hist->second) hist->second->Write();
112  file.Close();
113 }
static std::string granularity(int32_t g)
Definition: MeasureLA.h:24
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
list key
Definition: combine.py:13
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 117 of file MeasureLA.cc.

References calibrate(), calibration_key(), mergeVDriftHistosByStation::file, PFRecoTauDiscriminationAgainstElectronMVA3GBR_cfi::method, dbtoconf::out, query::result, and python.entryComment::results.

Referenced by process_reports().

117  {
119  std::map<T,LA_Filler_Fitter::Result>results = _results;
120  std::fstream file((name+".dat").c_str(),std::ios::out);
121  std::pair<T,LA_Filler_Fitter::Result> result;
122  BOOST_FOREACH(result, results) {
123  calibrate( calibration_key(result.first,method), result.second);
124  file << result.first << "\t" << result.second << std::endl;
125  }
126  file.close();
127 }
static std::pair< unsigned, LA_Filler_Fitter::Method > calibration_key(const std::string layer, const LA_Filler_Fitter::Method)
Definition: MeasureLA.cc:171
void calibrate(const std::pair< unsigned, LA_Filler_Fitter::Method >, LA_Filler_Fitter::Result &) const
Definition: MeasureLA.cc:165
tuple result
Definition: query.py:137
tuple out
Definition: dbtoconf.py:99
void sistrip::MeasureLA::write_report_text_ms ( const std::string  name,
const LA_Filler_Fitter::Method  method 
) const
private

Definition at line 130 of file MeasureLA.cc.

References Book::begin(), book, Book::end(), f, mergeVDriftHistosByStation::file, granularity(), combine::key, LA_Filler_Fitter::method(), MODULESUMMARY, dbtoconf::out, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by process_reports().

130  {
131  std::fstream file((name+".dat").c_str(),std::ios::out);
133  for(Book::const_iterator it = book.begin(key); it!=book.end(); ++it) {
134  const TF1*const f = it->second->GetFunction("gaus");
135  if(f) {
136  file << it->first << "\t"
137  << f->GetParameter(1) << "\t"
138  << f->GetParError(1) << "\t"
139  << f->GetParameter(2) << "\t"
140  << f->GetParError(2) << std::endl;
141  }
142  }
143  file.close();
144 }
static std::string granularity(int32_t g)
Definition: MeasureLA.h:24
double f[11][100]
iterator begin(string_t re=".*")
Definition: Book.h:48
static std::string method(Method m, bool fit=true)
tuple out
Definition: dbtoconf.py:99
boost::filter_iterator< match_name, book_t::const_iterator > const_iterator
Definition: Book.h:47
list key
Definition: combine.py:13
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 50 of file MeasureLA.h.

Referenced by MeasureLA(), and store_methods_and_granularity().

bool sistrip::MeasureLA::byModule
private

Definition at line 50 of file MeasureLA.h.

Referenced by MeasureLA(), and store_methods_and_granularity().

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

Definition at line 47 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 48 of file MeasureLA.h.

Referenced by calibrate(), and store_calibrations().

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

Definition at line 46 of file MeasureLA.h.

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

Definition at line 45 of file MeasureLA.h.

Referenced by MeasureLA().

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

Definition at line 44 of file MeasureLA.h.

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

const float sistrip::MeasureLA::localybin
private

Definition at line 51 of file MeasureLA.h.

Referenced by MeasureLA().

const unsigned sistrip::MeasureLA::maxEvents
private

Definition at line 52 of file MeasureLA.h.

Referenced by MeasureLA().

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

Definition at line 47 of file MeasureLA.h.

Referenced by MeasureLA().

int32_t sistrip::MeasureLA::methods
private

Definition at line 49 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 48 of file MeasureLA.h.

Referenced by calibrate(), and store_calibrations().

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

Definition at line 47 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 52 of file MeasureLA.h.

Referenced by MeasureLA().