CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
LA_Filler_Fitter Class Reference

#include <LA_Filler_Fitter.h>

Classes

struct  EnsembleSummary
 
struct  Result
 

Public Types

enum  Method {
  WIDTH =1<<0, FIRST_METHOD =1<<0, PROB1 =1<<1, AVGV2 =1<<2,
  AVGV3 =1<<3, RMSV2 =1<<4, RMSV3 =1<<5, LAST_METHOD =1<<5
}
 

Public Member Functions

poly< std::string > allAndOne (const unsigned width) const
 
void fill (TTree *, Book &) const
 
void fill_one_cluster (Book &, const poly< std::string > &, const unsigned, const float, const float, const float, const float) const
 
poly< std::string > granularity (const SiStripDetId, const float, const Long64_t, const float, const unsigned) const
 
 LA_Filler_Fitter (int methods, int M, int N, double low, double up, unsigned max)
 
 LA_Filler_Fitter (int methods, bool layer, bool module, float localybin, unsigned stripbin, unsigned max)
 
void summarize_ensembles (Book &) const
 
poly< std::string > varWidth (const unsigned width) const
 

Static Public Member Functions

static std::map< std::string,
std::vector< Result > > 
ensemble_results (const Book &, const Method)
 
static std::map< std::string,
std::vector< EnsembleSummary > > 
ensemble_summary (const Book &)
 
static unsigned find_rebin (const TH1 *const)
 
static void fit (Book &book)
 
static void fit_width_profile (Book &)
 
static unsigned layer_index (bool TIB, bool stereo, unsigned layer)
 
static std::map< std::string,
Result
layer_results (const Book &, const Method)
 
static std::string layerLabel (const SiStripDetId)
 
static void make_and_fit_symmchi2 (Book &)
 
static std::string method (Method m, bool fit=true)
 
static std::map< uint32_t, Resultmodule_results (const Book &, const Method)
 
static std::string moduleLabel (const SiStripDetId)
 
static std::pair< std::pair
< float, float >, std::pair
< float, float > > 
offset_slope (const std::vector< EnsembleSummary > &)
 
static float pull (const std::vector< EnsembleSummary > &)
 
static Result result (Method, const std::string name, const Book &)
 
static TH1 * rms_profile (const std::string, const TProfile *const)
 
static std::string subdetLabel (const SiStripDetId)
 
static TH1 * subset_probability (const std::string name, const TH1 *const , const TH1 *const )
 

Private Attributes

const bool byLayer_
 
const bool byModule_
 
const int ensembleBins_
 
const double ensembleLow_
 
const int ensembleSize_
 
const double ensembleUp_
 
const float localYbin_
 
const Long64_t maxEvents_
 
const int methods_
 
const unsigned stripsPerBin_
 

Detailed Description

Definition at line 14 of file LA_Filler_Fitter.h.

Member Enumeration Documentation

Enumerator
WIDTH 
FIRST_METHOD 
PROB1 
AVGV2 
AVGV3 
RMSV2 
RMSV3 
LAST_METHOD 

Definition at line 38 of file LA_Filler_Fitter.h.

Constructor & Destructor Documentation

LA_Filler_Fitter::LA_Filler_Fitter ( int  methods,
int  M,
int  N,
double  low,
double  up,
unsigned  max 
)
inline

Definition at line 19 of file LA_Filler_Fitter.h.

19  :
20  ensembleSize_(M),
22  byLayer_(true),byModule_(false),
23  localYbin_(0),
24  stripsPerBin_(0),
25  maxEvents_(max),
26  methods_(methods) {};
Definition: BitonicSort.h:8
const Long64_t maxEvents_
const float localYbin_
#define N
Definition: blowfish.cc:9
const double ensembleUp_
const unsigned stripsPerBin_
const double ensembleLow_
LA_Filler_Fitter::LA_Filler_Fitter ( int  methods,
bool  layer,
bool  module,
float  localybin,
unsigned  stripbin,
unsigned  max 
)
inline

Definition at line 29 of file LA_Filler_Fitter.h.

29  :
30  ensembleSize_(0),
32  byLayer_(layer),byModule_(module),
33  localYbin_(localybin),
34  stripsPerBin_(stripbin),
35  maxEvents_(max),
36  methods_(methods) {};
const Long64_t maxEvents_
const float localYbin_
const double ensembleUp_
const unsigned stripsPerBin_
const double ensembleLow_
Definition: vlib.h:208

Member Function Documentation

poly< std::string > LA_Filler_Fitter::allAndOne ( const unsigned  width) const

Definition at line 60 of file LA_Filler.cc.

Referenced by fill_one_cluster().

61 { poly<std::string> a1("_all"); if(width==1) a1*="_w1"; return a1;}
Definition: poly.h:11
std::map< std::string, std::vector< LA_Filler_Fitter::Result > > LA_Filler_Fitter::ensemble_results ( const Book book,
const Method  m 
)
static

Definition at line 73 of file LA_Results.cc.

std::map< std::string, std::vector< LA_Filler_Fitter::EnsembleSummary > > LA_Filler_Fitter::ensemble_summary ( const Book book)
static

Definition at line 107 of file LA_Results.cc.

Referenced by sistrip::EnsembleCalibrationLA::write_ensembles_text().

void LA_Filler_Fitter::fill ( TTree *  tree,
Book book 
) const

Definition at line 8 of file LA_Filler.cc.

References funct::cos(), ensembleBins_, fill_one_cluster(), granularity(), i, localYbin_, maxEvents_, N, jetcorrextractor::sign(), stripsPerBin_, SiStripDetId::subDetector(), swap(), funct::tan(), SiStripDetId::TIB, and SiStripDetId::TOB.

Referenced by sistrip::EnsembleCalibrationLA::endJob().

8  {
9  TTREE_FOREACH_ENTRY(tree) {
10  TFE_MAX(maxEvents_);
11  TFE_PRINTSTATUS;
12  std::vector<unsigned> PLEAF( tsostrackmulti , tree );
13  std::vector<unsigned> PLEAF( clusterdetid , tree );
14  std::vector<unsigned> PLEAF( clusterwidth , tree );
15  std::vector<float> PLEAF( clustervariance , tree );
16  std::vector<float> PLEAF( tsosdriftx , tree );
17  std::vector<float> PLEAF( tsosdriftz , tree );
18  std::vector<float> PLEAF( tsoslocaltheta , tree );
19  std::vector<float> PLEAF( tsoslocalphi , tree );
20  std::vector<float> PLEAF( tsosglobalZofunitlocalY , tree );
21 
22  const unsigned N(clusterdetid.size());
23  std::vector<float> BdotY(N,0); if(!ensembleBins_) { std::vector<float> PLEAF( tsosBdotY , tree ); swap(BdotY, tsosBdotY); }
24  std::vector<float> localy(N,0); if(localYbin_) { std::vector<float> PLEAF( tsoslocaly , tree ); swap(localy, tsoslocaly);}
25  std::vector<unsigned> seedstrip(N,0); if(stripsPerBin_) { std::vector<unsigned> PLEAF( clusterseedstrip , tree ); swap(seedstrip, clusterseedstrip);}
26 
27  for(unsigned i=0; i<N ; i++) {
28 
29  const SiStripDetId detid(clusterdetid[i]);
30  if( tsostrackmulti[i] != 1 || ( detid.subDetector()!=SiStripDetId::TIB &&
31  detid.subDetector()!=SiStripDetId::TOB) ) continue;
32 
33  const int sign = tsosglobalZofunitlocalY[i] < 0 ? -1 : 1;
34  const float tthetaL = sign * tsosdriftx[i] / tsosdriftz[i];
35  const float tthetaT = sign * tan(tsoslocaltheta[i]) * cos(tsoslocalphi[i]);
36 
37  fill_one_cluster( book,
38  granularity(detid, tthetaL, TFE_index, localy[i], seedstrip[i]%128),
39  clusterwidth[i], clustervariance[i], tthetaL, tthetaT, fabs(BdotY[i]) );
40  }
41  }
42 }
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
int i
Definition: DBlmapReader.cc:9
double sign(double x)
const Long64_t maxEvents_
poly< std::string > granularity(const SiStripDetId, const float, const Long64_t, const float, const unsigned) const
Definition: LA_Filler.cc:72
const float localYbin_
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
#define N
Definition: blowfish.cc:9
const unsigned stripsPerBin_
void fill_one_cluster(Book &, const poly< std::string > &, const unsigned, const float, const float, const float, const float) const
Definition: LA_Filler.cc:45
void LA_Filler_Fitter::fill_one_cluster ( Book book,
const poly< std::string > &  gran,
const unsigned  width,
const float  variance,
const float  tthetaL,
const float  tthetaT,
const float  BdotY 
) const

Definition at line 45 of file LA_Filler.cc.

References allAndOne(), ensembleBins_, Book::fill(), method(), methods_, varWidth(), and WIDTH.

Referenced by fill().

48 {
49  book.fill( tthetaL, gran+"_reconstruction", 360,-1.0,1.0 );
50  book.fill( tthetaT-tthetaL, gran+ allAndOne(width), 360,-1.0,1.0 );
51  book.fill( tthetaT-tthetaL, variance, gran+ varWidth(width), 360,-1.0,1.0 );
52  if(methods_ & WIDTH) book.fill( tthetaT, width, gran+method(WIDTH), 81,-0.6,0.6 );
53  if(!ensembleBins_) {
54  book.fill( BdotY, gran+"_field", 101,1,5);
55  book.fill( width, gran+"_width", 10,0,10);
56  }
57 }
poly< std::string > varWidth(const unsigned width) const
Definition: LA_Filler.cc:64
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
poly< std::string > allAndOne(const unsigned width) const
Definition: LA_Filler.cc:60
unsigned LA_Filler_Fitter::find_rebin ( const TH1 * const  hist)
static

Definition at line 81 of file LA_Fitter.cc.

References begin, end, i, bookConverter::max, timingPdfMaker::mean, min(), and plotscripts::rms().

Referenced by make_and_fit_symmchi2().

81  {
82  const double mean = hist->GetMean();
83  const double rms = hist->GetRMS();
84  const int begin = std::min( 1, hist->GetXaxis()->FindFixBin(mean-rms));
85  const int end = std::max(hist->GetNbinsX(), hist->GetXaxis()->FindFixBin(mean+rms)) + 1;
86  unsigned current_hole(0), max_hole(0);
87  for(int i=begin; i<end; i++) {
88  if(!hist->GetBinError(i)) current_hole++;
89  else if(current_hole) {max_hole = std::max(current_hole,max_hole); current_hole=0;}
90  }
91  return max_hole+1;
92 }
int i
Definition: DBlmapReader.cc:9
#define end
Definition: vmac.h:37
T min(T a, T b)
Definition: MathUtil.h:58
#define begin
Definition: vmac.h:30
static void LA_Filler_Fitter::fit ( Book book)
inlinestatic

Definition at line 87 of file LA_Filler_Fitter.h.

References fit_width_profile(), and make_and_fit_symmchi2().

Referenced by sistrip::EnsembleCalibrationLA::endJob(), fit_width_profile(), and method().

static void fit_width_profile(Book &)
Definition: LA_Fitter.cc:10
static void make_and_fit_symmchi2(Book &)
Definition: LA_Fitter.cc:34
void LA_Filler_Fitter::fit_width_profile ( Book book)
static

Definition at line 10 of file LA_Fitter.cc.

References Book::begin(), Book::end(), Book::erase(), fit(), bookConverter::max, method(), min(), AlCaHLTBitMon_ParallelJobs::p, and WIDTH.

Referenced by fit().

10  {
11  for(Book::iterator it = book.begin(".*"+method(WIDTH)); it!=book.end(); ++it) {
12  it->second->SetTitle("Mean Cluster Width;tan#theta_{t}");
13  TH1* const p = it->second;
14  if(p->GetEntries() < 400) { delete p; book[it->first]=0; continue;}
15  p->SetTitle(";tan#theta_{t};");
16  const float min = p->GetMinimum();
17  const float max = p->GetMaximum();
18  float xofmin = p->GetBinCenter(p->GetMinimumBin()); if( xofmin>0.0 || xofmin<-0.15) xofmin = -0.05;
19  const float xofmax = p->GetBinCenter(p->GetMaximumBin());
20 
21  TF1* const fit = new TF1("LA_profile_fit","[2]*(TMath::Abs(x-[0]))+[1]",-1,1);
22  fit->SetParLimits(0,-0.15,0.01);
23  fit->SetParLimits(1, 0.6*min, 1.25*min );
24  fit->SetParLimits(2,0.1,10);
25  fit->SetParameters( xofmin, min, (max-min) / fabs( xofmax - xofmin ) );
26 
27  int badfit = p->Fit(fit,"IEQ","",-.5,.3);
28  if( badfit ) badfit = p->Fit(fit,"IEQ","", -.46,.26);
29  if( badfit ) { book.erase(it); }
30  }
31 }
static void fit(Book &book)
iterator begin(string_t re=".*")
Definition: Book.h:48
T min(T a, T b)
Definition: MathUtil.h:58
static std::string method(Method m, bool fit=true)
void erase(string_t name)
Definition: Book.h:57
boost::filter_iterator< match_name, book_t::iterator > iterator
Definition: Book.h:46
iterator end(string_t re=".*")
Definition: Book.h:50
poly< std::string > LA_Filler_Fitter::granularity ( const SiStripDetId  detid,
const float  tthetaL,
const Long64_t  TFE_index,
const float  localy,
const unsigned  apvstrip 
) const

Definition at line 72 of file LA_Filler.cc.

References funct::abs(), byLayer_, byModule_, ensembleBins_, ensembleLow_, ensembleSize_, ensembleUp_, layerLabel(), localYbin_, moduleLabel(), AlCaHLTBitMon_QueryRunRegistry::string, stripsPerBin_, and subdetLabel().

Referenced by fill().

72  {
73  poly<std::string> gran;
74  gran += subdetLabel(detid);
75  if(byLayer_) gran *= layerLabel(detid);
76  if(byModule_) gran *= moduleLabel(detid);
77  if(localYbin_) gran += (localy < 0 ? "_yM":"_yP") + boost::lexical_cast<std::string>(abs((int)(localy/localYbin_+(localy<0?-1:0))));
78  if(stripsPerBin_) gran += "_strip"+boost::lexical_cast<std::string>((unsigned)((0.5+((apvstrip/64)?(127-apvstrip):apvstrip)/stripsPerBin_)*stripsPerBin_) );
79  if(ensembleBins_) {
80  gran+= "_ensembleBin"+boost::lexical_cast<std::string>((int)(ensembleBins_*(tthetaL-ensembleLow_)/(ensembleUp_-ensembleLow_)));
81  gran+= "";
82  if(ensembleSize_) gran*= "_sample"+boost::lexical_cast<std::string>(TFE_index % ensembleSize_);
83  }
84  return gran;
85 }
static std::string moduleLabel(const SiStripDetId)
Definition: LA_Filler.cc:90
static std::string layerLabel(const SiStripDetId)
Definition: LA_Filler.cc:92
const float localYbin_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Definition: poly.h:11
const double ensembleUp_
static std::string subdetLabel(const SiStripDetId)
Definition: LA_Filler.cc:88
const unsigned stripsPerBin_
const double ensembleLow_
static unsigned LA_Filler_Fitter::layer_index ( bool  TIB,
bool  stereo,
unsigned  layer 
)
inlinestatic

Definition at line 84 of file LA_Filler_Fitter.h.

Referenced by sistrip::EnsembleCalibrationLA::write_ensembles_text().

84 { return layer + (TIB?0:6) +(stereo?1:0) + ( (layer>2)?1:(layer==1)?-1:0 );}
std::map< std::string, LA_Filler_Fitter::Result > LA_Filler_Fitter::layer_results ( const Book book,
const Method  m 
)
static

Definition at line 63 of file LA_Results.cc.

std::string LA_Filler_Fitter::layerLabel ( const SiStripDetId  detid)
static

Definition at line 92 of file LA_Filler.cc.

References TOBDetId::layer(), TIBDetId::layer(), SiStripDetId::stereo(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripDetId::subDetector(), subdetLabel(), and SiStripDetId::TOB.

Referenced by granularity().

92  {
93  unsigned layer = detid.subDetector() == SiStripDetId::TOB ? TOBDetId(detid()).layer() : TIBDetId(detid()).layer();
94  return subdetLabel(detid)+"_layer"+boost::lexical_cast<std::string>(layer)+(detid.stereo()?"s":"a");
95 }
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
uint32_t stereo() const
Definition: SiStripDetId.h:160
SubDetector subDetector() const
Definition: SiStripDetId.h:114
static std::string subdetLabel(const SiStripDetId)
Definition: LA_Filler.cc:88
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
void LA_Filler_Fitter::make_and_fit_symmchi2 ( Book book)
static

Definition at line 34 of file LA_Fitter.cc.

References Vispa.Plugins.EdmBrowser.EdmDataAccessor::all(), AVGV2, AVGV3, newFWLiteAna::base, Book::begin(), Book::book(), beam_dqm_sourceclient-live_cfg::chi2, Book::end(), Book::find(), find_rebin(), estimatePileup::hist, bookConverter::max, method(), PROB1, rms_profile(), RMSV2, RMSV3, AlCaHLTBitMon_QueryRunRegistry::string, subset_probability(), and SymmetryFit::symmetryChi2().

Referenced by fit().

34  {
35  for(Book::iterator it = book.begin(".*_all"); it!=book.end(); ++it) {
36  const std::string base = boost::erase_all_copy(it->first,"_all");
37 
38  std::vector<Book::iterator> rebin_hists;
39  Book::iterator all = it; rebin_hists.push_back(all);
40  Book::iterator w1 = book.find(base+"_w1"); rebin_hists.push_back(w1);
41  Book::iterator var_w2 = book.find(base+method(AVGV2,0)); rebin_hists.push_back(var_w2);
42  Book::iterator var_w3 = book.find(base+method(AVGV3,0)); rebin_hists.push_back(var_w3);
43 
44  const unsigned rebin = std::max( var_w2==book.end() ? 0 : find_rebin(var_w2->second),
45  var_w3==book.end() ? 0 : find_rebin(var_w3->second) );
46  BOOST_FOREACH(Book::iterator it, rebin_hists) if(it!=book.end()) it->second->Rebin( rebin>1 ? rebin<7 ? rebin : 6 : 1);
47 
48  TH1* const prob_w1 = w1==book.end() ? 0 : subset_probability( base+method(PROB1,0) ,w1->second,all->second);
49  TH1* const rmsv_w2 = var_w2==book.end() ? 0 : rms_profile( base+method(RMSV2,0), (TProfile*const)var_w2->second);
50  TH1* const rmsv_w3 = var_w3==book.end() ? 0 : rms_profile( base+method(RMSV3,0), (TProfile*const)var_w3->second);
51 
52  std::vector<TH1*> fit_hists;
53  if(prob_w1) {
54  book.book(base+method(PROB1,0),prob_w1);
55  fit_hists.push_back(prob_w1); prob_w1->SetTitle("Width==1 Probability;tan#theta_{t}-(dx/dz)_{reco}");
56  }
57  if(var_w2!=book.end()) {
58  book.book(base+method(RMSV2,0),rmsv_w2);
59  fit_hists.push_back(var_w2->second); var_w2->second->SetTitle("Width==2 Mean Variance;tan#theta_{t}-(dx/dz)_{reco}");
60  fit_hists.push_back(rmsv_w2); rmsv_w2->SetTitle("Width==2 RMS Variance;tan#theta_{t}-(dx/dz)_{reco}");
61  }
62  if(var_w3!=book.end()) {
63  book.book(base+method(RMSV3,0),rmsv_w3);
64  fit_hists.push_back(var_w3->second); var_w3->second->SetTitle("Width==3 Mean Variance;tan#theta_{t}-(dx/dz)_{reco}");
65  fit_hists.push_back(rmsv_w3); rmsv_w3->SetTitle("Width==3 RMS Variance;tan#theta_{t}-(dx/dz)_{reco}");
66  }
67 
68  if(!fit_hists.size()) continue;
69  const unsigned bins = fit_hists[0]->GetNbinsX();
70  const unsigned guess = fit_hists[0]->FindBin(0);
71  const std::pair<unsigned,unsigned> range(guess-bins/30,guess+bins/30);
72 
73  BOOST_FOREACH(TH1*const hist, fit_hists) {
74  TH1*const chi2 = SymmetryFit::symmetryChi2(hist,range);
75  if(chi2) {book.book(chi2->GetName(),chi2); chi2->SetTitle("Symmetry #chi^{2};tan#theta_{t}-(dx/dz)_{reco}");}
76  }
77  }
78 }
tuple base
Main Program
Definition: newFWLiteAna.py:91
static TH1 * subset_probability(const std::string name, const TH1 *const , const TH1 *const )
Definition: LA_Fitter.cc:108
static TH1 * symmetryChi2(std::string, const std::vector< TH1 * > &, const std::pair< unsigned, unsigned >)
Definition: SymmetryFit.cc:7
U second(std::pair< T, U > const &p)
iterator begin(string_t re=".*")
Definition: Book.h:48
#define end
Definition: vmac.h:37
static std::string method(Method m, bool fit=true)
static unsigned find_rebin(const TH1 *const)
Definition: LA_Fitter.cc:81
static TH1 * rms_profile(const std::string, const TProfile *const)
Definition: LA_Fitter.cc:95
string const
Definition: compareJSON.py:14
if(dp >Float(M_PI)) dp-
iterator find(string_t name, string_t re=".*")
Definition: Book.h:52
boost::filter_iterator< match_name, book_t::iterator > iterator
Definition: Book.h:46
iterator end(string_t re=".*")
Definition: Book.h:50
TH1 * book(string_t name, TH1 *const hist)
Definition: Book.h:42
static std::string LA_Filler_Fitter::method ( Method  m,
bool  fit = true 
)
inlinestatic

Definition at line 45 of file LA_Filler_Fitter.h.

References AVGV2, AVGV3, fit(), SymmetryFit::name(), PROB1, RMSV2, RMSV3, and WIDTH.

Referenced by fill_one_cluster(), fit_width_profile(), make_and_fit_symmchi2(), and varWidth().

45  {
46  switch(m) {
47  case WIDTH: return "_width_prof";
48  case PROB1: return fit? SymmetryFit::name(method(m,0)): "_prob_w1" ;
49  case AVGV2: return fit? SymmetryFit::name(method(m,0)): "_avg_var_w2";
50  case AVGV3: return fit? SymmetryFit::name(method(m,0)): "_avg_var_w3";
51  case RMSV2: return fit? SymmetryFit::name(method(m,0)): "_rms_var_w2";
52  case RMSV3: return fit? SymmetryFit::name(method(m,0)): "_rms_var_w3";
53  default: return "_UNKNOWN";
54  }
55  }
static void fit(Book &book)
static std::string name(std::string base)
Definition: SymmetryFit.h:14
static std::string method(Method m, bool fit=true)
std::map< uint32_t, LA_Filler_Fitter::Result > LA_Filler_Fitter::module_results ( const Book book,
const Method  m 
)
static

Definition at line 51 of file LA_Results.cc.

std::string LA_Filler_Fitter::moduleLabel ( const SiStripDetId  detid)
static

Definition at line 90 of file LA_Filler.cc.

References AlCaHLTBitMon_QueryRunRegistry::string, and subdetLabel().

Referenced by granularity().

90 { return subdetLabel(detid) + "_module"+boost::lexical_cast<std::string>(detid());}
static std::string subdetLabel(const SiStripDetId)
Definition: LA_Filler.cc:88
std::pair< std::pair< float, float >, std::pair< float, float > > LA_Filler_Fitter::offset_slope ( const std::vector< EnsembleSummary > &  ensembles)
static

Definition at line 132 of file LA_Results.cc.

Referenced by sistrip::EnsembleCalibrationLA::write_ensembles_text().

float LA_Filler_Fitter::pull ( const std::vector< EnsembleSummary > &  ensembles)
static

Definition at line 156 of file LA_Results.cc.

Referenced by sistrip::EnsembleCalibrationLA::write_ensembles_text().

LA_Filler_Fitter::Result LA_Filler_Fitter::result ( Method  m,
const std::string  name,
const Book book 
)
static

Definition at line 14 of file LA_Results.cc.

TH1 * LA_Filler_Fitter::rms_profile ( const std::string  name,
const TProfile * const  prof 
)
static

Definition at line 95 of file LA_Fitter.cc.

References i, plotscripts::rms(), and mathSSE::sqrt().

Referenced by make_and_fit_symmchi2().

95  {
96  const int bins = prof->GetNbinsX();
97  TH1* const rms = new TH1F(name.c_str(),"",bins, prof->GetBinLowEdge(1), prof->GetBinLowEdge(bins) + prof->GetBinWidth(bins) );
98  for(int i = 1; i<=bins; i++) {
99  const double Me = prof->GetBinError(i);
100  const double neff = prof->GetBinEntries(i); //Should be prof->GetBinEffectiveEntries(i);, not availible this version ROOT. This is only ok for unweighted fills
101  rms->SetBinContent(i, Me*sqrt(neff) );
102  rms->SetBinError(i, Me/sqrt(2) );
103  }
104  return rms;
105 }
int i
Definition: DBlmapReader.cc:9
T sqrt(T t)
Definition: SSEVec.h:18
std::string LA_Filler_Fitter::subdetLabel ( const SiStripDetId  detid)
static

Definition at line 88 of file LA_Filler.cc.

References SiStripDetId::subDetector(), and SiStripDetId::TOB.

Referenced by granularity(), layerLabel(), and moduleLabel().

88 { return detid.subDetector()==SiStripDetId::TOB? "TOB" : "TIB";}
SubDetector subDetector() const
Definition: SiStripDetId.h:114
TH1 * LA_Filler_Fitter::subset_probability ( const std::string  name,
const TH1 * const  subset,
const TH1 * const  total 
)
static

Definition at line 108 of file LA_Fitter.cc.

References i, AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::s, and mathSSE::sqrt().

Referenced by make_and_fit_symmchi2().

108  {
109  const int bins = subset->GetNbinsX();
110  TH1* const prob = new TH1F(name.c_str(),"",bins, subset->GetBinLowEdge(1), subset->GetBinLowEdge(bins) + subset->GetBinWidth(bins) );
111  for(int i = 1; i<=bins; i++) {
112  const double s = subset->GetBinContent(i);
113  const double T = total->GetBinContent(i);
114  const double B = T-s;
115 
116  const double p = T? s/T : 0;
117  const double perr = T? ( (s&&B)? sqrt(s*s*B+B*B*s)/(T*T) : 1/T ) : 0;
118 
119  prob->SetBinContent(i,p);
120  prob->SetBinError(i,perr);
121  }
122  return prob;
123 }
int i
Definition: DBlmapReader.cc:9
double_binary B
Definition: DDStreamer.cc:234
T sqrt(T t)
Definition: SSEVec.h:18
long double T
void LA_Filler_Fitter::summarize_ensembles ( Book book) const

Definition at line 83 of file LA_Results.cc.

Referenced by sistrip::EnsembleCalibrationLA::endJob().

poly< std::string > LA_Filler_Fitter::varWidth ( const unsigned  width) const

Definition at line 64 of file LA_Filler.cc.

References AVGV2, AVGV3, method(), methods_, RMSV2, and RMSV3.

Referenced by fill_one_cluster().

64  {
65  poly<std::string> vw; vw++;
66  if(width==2 && methods_ & (AVGV2|RMSV2) ) vw*=method(AVGV2,0);
67  if(width==3 && methods_ & (AVGV3|RMSV3) ) vw*=method(AVGV3,0);
68  return vw;
69 }
Definition: poly.h:11
static std::string method(Method m, bool fit=true)

Member Data Documentation

const bool LA_Filler_Fitter::byLayer_
private

Definition at line 108 of file LA_Filler_Fitter.h.

Referenced by granularity().

const bool LA_Filler_Fitter::byModule_
private

Definition at line 108 of file LA_Filler_Fitter.h.

Referenced by granularity().

const int LA_Filler_Fitter::ensembleBins_
private

Definition at line 106 of file LA_Filler_Fitter.h.

Referenced by fill(), fill_one_cluster(), and granularity().

const double LA_Filler_Fitter::ensembleLow_
private

Definition at line 107 of file LA_Filler_Fitter.h.

Referenced by granularity().

const int LA_Filler_Fitter::ensembleSize_
private

Definition at line 106 of file LA_Filler_Fitter.h.

Referenced by granularity().

const double LA_Filler_Fitter::ensembleUp_
private

Definition at line 107 of file LA_Filler_Fitter.h.

Referenced by granularity().

const float LA_Filler_Fitter::localYbin_
private

Definition at line 109 of file LA_Filler_Fitter.h.

Referenced by fill(), and granularity().

const Long64_t LA_Filler_Fitter::maxEvents_
private

Definition at line 111 of file LA_Filler_Fitter.h.

Referenced by fill().

const int LA_Filler_Fitter::methods_
private

Definition at line 112 of file LA_Filler_Fitter.h.

Referenced by fill_one_cluster(), and varWidth().

const unsigned LA_Filler_Fitter::stripsPerBin_
private

Definition at line 110 of file LA_Filler_Fitter.h.

Referenced by fill(), and granularity().