CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
SiStripGainFromCalibTree Class Reference
Inheritance diagram for SiStripGainFromCalibTree:
ConditionDBWriter< SiStripApvGain > edm::EDAnalyzer edm::EDConsumerBase

Classes

class  isEqual
 

Public Member Functions

 SiStripGainFromCalibTree (const edm::ParameterSet &)
 
 ~SiStripGainFromCalibTree ()
 
- Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
 ConditionDBWriter (const edm::ParameterSet &iConfig)
 
virtual ~ConditionDBWriter ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void algoAnalyze (const edm::Event &, const edm::EventSetup &)
 
void algoAnalyzeTheTree ()
 
virtual void algoBeginJob (const edm::EventSetup &)
 
void algoComputeMPVandGain ()
 
virtual void algoEndJob ()
 
SiStripApvGaingetNewObject ()
 
void getPeakOfLandau (TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
 
bool IsGoodLandauFit (double *FitResults)
 
void MakeCalibrationMap ()
 
void storeOnTree ()
 

Private Attributes

bool AllowSaturation
 
__gnu_cxx::hash_map< unsigned
int, stAPVGain
*, __gnu_cxx::hash< unsigned
int >, isEqual
APVsColl
 
std::vector< stAPVGain * > APVsCollOrdered
 
unsigned int BAD
 
int CalibrationLevel
 
TH2F * Charge_Vs_Index
 
TH2F * Charge_Vs_Index_Absolute
 
TH2F * Charge_Vs_PathlengthTECM1
 
TH2F * Charge_Vs_PathlengthTECM2
 
TH2F * Charge_Vs_PathlengthTECP1
 
TH2F * Charge_Vs_PathlengthTECP2
 
TH2F * Charge_Vs_PathlengthTIB
 
TH2F * Charge_Vs_PathlengthTIDM
 
TH2F * Charge_Vs_PathlengthTIDP
 
TH2F * Charge_Vs_PathlengthTOB
 
unsigned int ERun
 
bool FirstSetOfConstants
 
unsigned int GOOD
 
string m_calibrationPath
 
double MaxChi2OverNDF
 
double MaxMPVError
 
unsigned int MaxNrStrips
 
double MaxTrackChiOverNdf
 
double MaxTrackEta
 
double MaxTrackMomentum
 
double MinNrEntries
 
double MinTrackEta
 
unsigned int MinTrackHits
 
double MinTrackMomentum
 
unsigned int NCluster
 
unsigned int NEvent
 
unsigned int NTrack
 
bool OldGainRemoving
 
std::string OutputGains
 
unsigned int SRun
 
edm::Service< TFileServicetfs
 
bool useCalibration
 
bool Validation
 
vector< string > VInputFiles
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from ConditionDBWriter< SiStripApvGain >
void setDoStore (const bool doStore)
 When set to false the payload will not be written to the db. More...
 
void storeOnDbNow ()
 
cond::Time_t timeOfLastIOV ()
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 111 of file SiStripGainFromCalibTree.cc.

Constructor & Destructor Documentation

SiStripGainFromCalibTree::SiStripGainFromCalibTree ( const edm::ParameterSet iConfig)
explicit

Definition at line 186 of file SiStripGainFromCalibTree.cc.

References AllowSaturation, CalibrationLevel, FirstSetOfConstants, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), m_calibrationPath, MaxChi2OverNDF, MaxMPVError, MaxNrStrips, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackMomentum, MinNrEntries, MinTrackEta, MinTrackHits, MinTrackMomentum, OldGainRemoving, OutputGains, AlCaHLTBitMon_QueryRunRegistry::string, useCalibration, Validation, and VInputFiles.

187 {
188  OutputGains = iConfig.getParameter<std::string>("OutputGains");
189 
190  MinNrEntries = iConfig.getUntrackedParameter<double> ("minNrEntries" , 20);
191  MaxMPVError = iConfig.getUntrackedParameter<double> ("maxMPVError" , 500.0);
192  MaxChi2OverNDF = iConfig.getUntrackedParameter<double> ("maxChi2OverNDF" , 5.0);
193  MinTrackMomentum = iConfig.getUntrackedParameter<double> ("minTrackMomentum" , 3.0);
194  MaxTrackMomentum = iConfig.getUntrackedParameter<double> ("maxTrackMomentum" , 99999.0);
195  MinTrackEta = iConfig.getUntrackedParameter<double> ("minTrackEta" , -5.0);
196  MaxTrackEta = iConfig.getUntrackedParameter<double> ("maxTrackEta" , 5.0);
197  MaxNrStrips = iConfig.getUntrackedParameter<unsigned>("maxNrStrips" , 2);
198  MinTrackHits = iConfig.getUntrackedParameter<unsigned>("MinTrackHits" , 8);
199  MaxTrackChiOverNdf = iConfig.getUntrackedParameter<double> ("MaxTrackChiOverNdf" , 3);
200  AllowSaturation = iConfig.getUntrackedParameter<bool> ("AllowSaturation" , false);
201  FirstSetOfConstants = iConfig.getUntrackedParameter<bool> ("FirstSetOfConstants", true);
202  Validation = iConfig.getUntrackedParameter<bool> ("Validation" , false);
203  OldGainRemoving = iConfig.getUntrackedParameter<bool> ("OldGainRemoving" , false);
204 
205  CalibrationLevel = iConfig.getUntrackedParameter<int> ("CalibrationLevel" , 0);
206  VInputFiles = iConfig.getParameter<vector<string> > ("InputFiles");
207 
208 
209  useCalibration = iConfig.getUntrackedParameter<bool>("UseCalibration", false);
210  m_calibrationPath = iConfig.getUntrackedParameter<string>("calibrationPath");
211 
212 
213 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
SiStripGainFromCalibTree::~SiStripGainFromCalibTree ( )

Definition at line 695 of file SiStripGainFromCalibTree.cc.

696 {
697 }

Member Function Documentation

void SiStripGainFromCalibTree::algoAnalyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 317 of file SiStripGainFromCalibTree.cc.

318 {
319 }
void SiStripGainFromCalibTree::algoAnalyzeTheTree ( )
private

Definition at line 359 of file SiStripGainFromCalibTree.cc.

References AllowSaturation, sistrip::APV, APVsColl, stAPVGain::CalibGain, DeDxDiscriminatorTools::charge(), Charge_Vs_Index, Charge_Vs_Index_Absolute, Charge_Vs_PathlengthTECM1, Charge_Vs_PathlengthTECM2, Charge_Vs_PathlengthTECP1, Charge_Vs_PathlengthTECP2, Charge_Vs_PathlengthTIB, Charge_Vs_PathlengthTIDM, Charge_Vs_PathlengthTIDP, Charge_Vs_PathlengthTOB, ERun, stAPVGain::Eta, funct::false, FirstSetOfConstants, i, stAPVGain::Index, MaxNrStrips, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackMomentum, MinTrackEta, MinTrackHits, MinTrackMomentum, NCluster, NEvent, NTrack, NULL, OldGainRemoving, getHLTPrescaleColumns::path, stAPVGain::PreviousGain, cond::runnumber, alignCSCRings::s, SRun, stAPVGain::SubDet, StripSubdetector::TEC, stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, diffTreeTool::tree, funct::true, useCalibration, Validation, and VInputFiles.

Referenced by algoBeginJob().

360 {
361  for(unsigned int i=0;i<VInputFiles.size();i++){
362  printf("Openning file %3i/%3i --> %s\n",i+1, (int)VInputFiles.size(), (char*)(VInputFiles[i].c_str())); fflush(stdout);
363  TChain* tree = new TChain("gainCalibrationTree/tree");
364  tree->Add(VInputFiles[i].c_str());
365 
366  TString EventPrefix("");
367  TString EventSuffix("");
368 
369  TString TrackPrefix("track");
370  TString TrackSuffix("");
371 
372  TString CalibPrefix("GainCalibration");
373  TString CalibSuffix("");
374 
375  unsigned int eventnumber = 0; tree->SetBranchAddress(EventPrefix + "event" + EventSuffix, &eventnumber , NULL);
376  unsigned int runnumber = 0; tree->SetBranchAddress(EventPrefix + "run" + EventSuffix, &runnumber , NULL);
377  std::vector<bool>* TrigTech = 0; tree->SetBranchAddress(EventPrefix + "TrigTech" + EventSuffix, &TrigTech , NULL);
378 
379  std::vector<double>* trackchi2ndof = 0; tree->SetBranchAddress(TrackPrefix + "chi2ndof" + TrackSuffix, &trackchi2ndof , NULL);
380  std::vector<float>* trackp = 0; tree->SetBranchAddress(TrackPrefix + "momentum" + TrackSuffix, &trackp , NULL);
381  std::vector<float>* trackpt = 0; tree->SetBranchAddress(TrackPrefix + "pt" + TrackSuffix, &trackpt , NULL);
382  std::vector<double>* tracketa = 0; tree->SetBranchAddress(TrackPrefix + "eta" + TrackSuffix, &tracketa , NULL);
383  std::vector<double>* trackphi = 0; tree->SetBranchAddress(TrackPrefix + "phi" + TrackSuffix, &trackphi , NULL);
384  std::vector<unsigned int>* trackhitsvalid = 0; tree->SetBranchAddress(TrackPrefix + "hitsvalid" + TrackSuffix, &trackhitsvalid, NULL);
385 
386  std::vector<int>* trackindex = 0; tree->SetBranchAddress(CalibPrefix + "trackindex" + CalibSuffix, &trackindex , NULL);
387  std::vector<unsigned int>* rawid = 0; tree->SetBranchAddress(CalibPrefix + "rawid" + CalibSuffix, &rawid , NULL);
388  std::vector<float>* localdirx = 0; tree->SetBranchAddress(CalibPrefix + "localdirx" + CalibSuffix, &localdirx , NULL);
389  std::vector<float>* localdiry = 0; tree->SetBranchAddress(CalibPrefix + "localdiry" + CalibSuffix, &localdiry , NULL);
390  std::vector<float>* localdirz = 0; tree->SetBranchAddress(CalibPrefix + "localdirz" + CalibSuffix, &localdirz , NULL);
391  std::vector<unsigned short>* firststrip = 0; tree->SetBranchAddress(CalibPrefix + "firststrip" + CalibSuffix, &firststrip , NULL);
392  std::vector<unsigned short>* nstrips = 0; tree->SetBranchAddress(CalibPrefix + "nstrips" + CalibSuffix, &nstrips , NULL);
393  std::vector<bool>* saturation = 0; tree->SetBranchAddress(CalibPrefix + "saturation" + CalibSuffix, &saturation , NULL);
394  std::vector<bool>* overlapping = 0; tree->SetBranchAddress(CalibPrefix + "overlapping" + CalibSuffix, &overlapping , NULL);
395  std::vector<bool>* farfromedge = 0; tree->SetBranchAddress(CalibPrefix + "farfromedge" + CalibSuffix, &farfromedge , NULL);
396  std::vector<unsigned int>* charge = 0; tree->SetBranchAddress(CalibPrefix + "charge" + CalibSuffix, &charge , NULL);
397  std::vector<float>* path = 0; tree->SetBranchAddress(CalibPrefix + "path" + CalibSuffix, &path , NULL);
398  std::vector<float>* chargeoverpath = 0; tree->SetBranchAddress(CalibPrefix + "chargeoverpath" + CalibSuffix, &chargeoverpath, NULL);
399  std::vector<unsigned char>* amplitude = 0; tree->SetBranchAddress(CalibPrefix + "amplitude" + CalibSuffix, &amplitude , NULL);
400  std::vector<double>* gainused = 0; tree->SetBranchAddress(CalibPrefix + "gainused" + CalibSuffix, &gainused , NULL);
401 
402 
403  printf("Number of Events = %i + %i = %i\n",NEvent,(unsigned int)tree->GetEntries(),(unsigned int)(NEvent+tree->GetEntries()));
404  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
405  printf("Looping on the Tree :");
406  int TreeStep = tree->GetEntries()/50;if(TreeStep<=1)TreeStep=1;
407  for (unsigned int ientry = 0; ientry < tree->GetEntries(); ientry++) {
408 // for (unsigned int ientry = 0; ientry < tree->GetEntries() && ientry<50000; ientry++) {
409  if(ientry%TreeStep==0){printf(".");fflush(stdout);}
410  tree->GetEntry(ientry);
411 
412  if(runnumber<SRun)SRun=runnumber;
413  if(runnumber>ERun)ERun=runnumber;
414 
415  NEvent++;
416  NTrack+=(*trackp).size();
417 
418  unsigned int FirstAmplitude=0;
419  for(unsigned int i=0;i<(*chargeoverpath).size();i++){
420  FirstAmplitude+=(*nstrips)[i];
421  int TI = (*trackindex)[i];
422  if((*tracketa )[TI] < MinTrackEta )continue;
423  if((*tracketa )[TI] > MaxTrackEta )continue;
424  if((*trackp )[TI] < MinTrackMomentum )continue;
425  if((*trackp )[TI] > MaxTrackMomentum )continue;
426  if((*trackhitsvalid)[TI] < MinTrackHits )continue;
427  if((*trackchi2ndof )[TI] > MaxTrackChiOverNdf )continue;
428  if((*farfromedge)[i] == false )continue;
429  if((*overlapping)[i] == true )continue;
430  if((*saturation )[i] && !AllowSaturation)continue;
431  if((*nstrips )[i] > MaxNrStrips )continue;
432  NCluster++;
433 
434  stAPVGain* APV = APVsColl[((*rawid)[i]<<3) | ((*firststrip)[i]/128)];
435 
436 // printf("detId=%7i run=%7i event=%9i charge=%5i cs=%3i\n",(*rawid)[i],runnumber,eventnumber,(*charge)[i],(*nstrips)[i]);
437 
438 
439 
440  //double trans = atan2((*localdiry)[i],(*localdirx)[i])*(180/3.14159265);
441  //double alpha = acos ((*localdirx)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265);
442  //double beta = acos ((*localdiry)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265);
443 
444  //printf("NStrip = %i : Charge = %i --> Path = %f --> ChargeOverPath=%f\n",(*nstrips)[i],(*charge)[i],(*path)[i],(*chargeoverpath)[i]);
445  //printf("Amplitudes: ");
446  //for(unsigned int a=0;a<(*nstrips)[i];a++){printf("%i ",(*amplitude)[FirstAmplitude+a]);}
447  //printf("\n");
448 
449 
450  int Charge = 0;
452  bool Saturation = false;
453  for(unsigned int s=0;s<(*nstrips)[i];s++){
454  int StripCharge = (*amplitude)[FirstAmplitude-(*nstrips)[i]+s];
455  if(useCalibration && !FirstSetOfConstants){ StripCharge=(int)(StripCharge*(APV->PreviousGain/APV->CalibGain));
456  }else if(useCalibration){ StripCharge=(int)(StripCharge/APV->CalibGain);
457  }else if(!FirstSetOfConstants){ StripCharge=(int)(StripCharge*APV->PreviousGain);}
458  if(StripCharge>1024){
459  StripCharge = 255;
460  Saturation = true;
461  }else if(StripCharge>254){
462  StripCharge = 254;
463  Saturation = true;
464  }
465  Charge += StripCharge;
466  }
467  if(Saturation && !AllowSaturation)continue;
468  }else{
469  Charge = (*charge)[i];
470  }
471 
472  //printf("ChargeDifference = %i Vs %i with Gain = %f\n",(*charge)[i],Charge,APV->CalibGain);
473 
474  double ClusterChargeOverPath = ( (double) Charge )/(*path)[i] ;
475  if(Validation) {ClusterChargeOverPath/=(*gainused)[i];}
476  if(OldGainRemoving){ClusterChargeOverPath*=(*gainused)[i];}
477  Charge_Vs_Index_Absolute->Fill(APV->Index,Charge);
478  Charge_Vs_Index ->Fill(APV->Index,ClusterChargeOverPath);
479 
480 
481  if(APV->SubDet==StripSubdetector::TIB){ Charge_Vs_PathlengthTIB ->Fill((*path)[i],Charge);
482  }else if(APV->SubDet==StripSubdetector::TOB){ Charge_Vs_PathlengthTOB ->Fill((*path)[i],Charge);
483  }else if(APV->SubDet==StripSubdetector::TID){
484  if(APV->Eta<0){ Charge_Vs_PathlengthTIDM ->Fill((*path)[i],Charge);
485  }else if(APV->Eta>0){ Charge_Vs_PathlengthTIDP ->Fill((*path)[i],Charge);
486  }
487  }else if(APV->SubDet==StripSubdetector::TEC){
488  if(APV->Eta<0){
489  if(APV->Thickness<0.04){ Charge_Vs_PathlengthTECM1->Fill((*path)[i],Charge);
490  }else if(APV->Thickness>0.04){ Charge_Vs_PathlengthTECM2->Fill((*path)[i],Charge);
491  }
492  }else if(APV->Eta>0){
493  if(APV->Thickness<0.04){ Charge_Vs_PathlengthTECP1->Fill((*path)[i],Charge);
494  }else if(APV->Thickness>0.04){ Charge_Vs_PathlengthTECP2->Fill((*path)[i],Charge);
495  }
496  }
497  }
498 
499  }// END OF ON-CLUSTER LOOP
500  }printf("\n");// END OF EVENT LOOP
501 
502  }
503 }
int i
Definition: DBlmapReader.cc:9
#define NULL
Definition: scimark2.h:8
double charge(const std::vector< uint8_t > &Ampls)
__gnu_cxx::hash_map< unsigned int, stAPVGain *, __gnu_cxx::hash< unsigned int >, isEqual > APVsColl
void SiStripGainFromCalibTree::algoBeginJob ( const edm::EventSetup iSetup)
privatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 219 of file SiStripGainFromCalibTree.cc.

References algoAnalyzeTheTree(), algoComputeMPVandGain(), sistrip::APV, stAPVGain::APVId, APVsColl, APVsCollOrdered, BAD, PV3DBase< T, PVType, FrameType >::basicVector(), stAPVGain::Bin, Surface::bounds(), Charge_Vs_Index, Charge_Vs_Index_Absolute, Charge_Vs_PathlengthTECM1, Charge_Vs_PathlengthTECM2, Charge_Vs_PathlengthTECP1, Charge_Vs_PathlengthTECP2, Charge_Vs_PathlengthTIB, Charge_Vs_PathlengthTIDM, Charge_Vs_PathlengthTIDP, Charge_Vs_PathlengthTOB, stAPVGain::DetId, ERun, stAPVGain::Eta, Basic3DVector< T >::eta(), cmsRelvalreport::exit, FirstSetOfConstants, stAPVGain::FitChi2, stAPVGain::FitMPV, stAPVGain::FitMPVErr, stAPVGain::FitWidth, stAPVGain::FitWidthErr, stAPVGain::Gain, edm::EventSetup::get(), GOOD, i, stAPVGain::Index, stAPVGain::isMasked, edm::ESHandleBase::isValid(), j, TFileDirectory::make(), MakeCalibrationMap(), NCluster, stAPVGain::NEntries, NEvent, StripTopology::nstrips(), NTrack, stAPVGain::Phi, Basic3DVector< T >::phi(), GeomDet::position(), stAPVGain::PreviousGain, stAPVGain::R, DetId::rawId(), StripGeomDetUnit::specificTopology(), SRun, stAPVGain::SubDet, DetId::subdetId(), GeomDet::surface(), StripSubdetector::TEC, tfs, Bounds::thickness(), stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Basic3DVector< T >::transverse(), stAPVGain::x, Basic3DVector< T >::x(), stAPVGain::y, Basic3DVector< T >::y(), stAPVGain::z, and Basic3DVector< T >::z().

220 {
221  Charge_Vs_Index = tfs->make<TH2F>("Charge_Vs_Index" , "Charge_Vs_Index" , 72785, 0 , 72784,1000,0,2000);
222  Charge_Vs_Index_Absolute = tfs->make<TH2F>("Charge_Vs_Index_Absolute" , "Charge_Vs_Index_Absolute" , 72785, 0 , 72784, 500,0,2000);
223  Charge_Vs_PathlengthTIB = tfs->make<TH2F>("Charge_Vs_PathlengthTIB" , "Charge_Vs_PathlengthTIB" , 20 , 0.3 , 1.3 , 250,0,2000);
224  Charge_Vs_PathlengthTOB = tfs->make<TH2F>("Charge_Vs_PathlengthTOB" , "Charge_Vs_PathlengthTOB" , 20 , 0.3 , 1.3 , 250,0,2000);
225  Charge_Vs_PathlengthTIDP = tfs->make<TH2F>("Charge_Vs_PathlengthTIDP" , "Charge_Vs_PathlengthTIDP" , 20 , 0.3 , 1.3 , 250,0,2000);
226  Charge_Vs_PathlengthTIDM = tfs->make<TH2F>("Charge_Vs_PathlengthTIDM" , "Charge_Vs_PathlengthTIDM" , 20 , 0.3 , 1.3 , 250,0,2000);
227  Charge_Vs_PathlengthTECP1 = tfs->make<TH2F>("Charge_Vs_PathlengthTECP1", "Charge_Vs_PathlengthTECP1", 20 , 0.3 , 1.3 , 250,0,2000);
228  Charge_Vs_PathlengthTECP2 = tfs->make<TH2F>("Charge_Vs_PathlengthTECP2", "Charge_Vs_PathlengthTECP2", 20 , 0.3 , 1.3 , 250,0,2000);
229  Charge_Vs_PathlengthTECM1 = tfs->make<TH2F>("Charge_Vs_PathlengthTECM1", "Charge_Vs_PathlengthTECM1", 20 , 0.3 , 1.3 , 250,0,2000);
230  Charge_Vs_PathlengthTECM2 = tfs->make<TH2F>("Charge_Vs_PathlengthTECM2", "Charge_Vs_PathlengthTECM2", 20 , 0.3 , 1.3 , 250,0,2000);
231 
233  iSetup.get<TrackerDigiGeometryRecord>().get( tkGeom );
234  vector<GeomDet*> Det = tkGeom->dets();
235 
236  edm::ESHandle<SiStripGain> gainHandle;
237  iSetup.get<SiStripGainRcd>().get(gainHandle);
238  if(!gainHandle.isValid()){printf("\n#####################\n\nERROR --> gainHandle is not valid\n\n#####################\n\n");exit(0);}
239 
240 // size_t numberOfTag = gainHandle->getNumberOfTags();
241  for(unsigned int i=0;i<gainHandle->getNumberOfTags();i++){
242  printf("Reccord %i --> Rcd Name = %s Label Name = %s\n",i,gainHandle->getRcdName(i).c_str(), gainHandle->getLabelName(i).c_str());
243  }
244 
245 
246  edm::ESHandle<SiStripQuality> SiStripQuality_;
247  iSetup.get<SiStripQualityRcd>().get(SiStripQuality_);
248 
249 
250  unsigned int Index=0;
251  for(unsigned int i=0;i<Det.size();i++){
252  DetId Detid = Det[i]->geographicalId();
253  int SubDet = Detid.subdetId();
254 
255  if( SubDet == StripSubdetector::TIB || SubDet == StripSubdetector::TID ||
256  SubDet == StripSubdetector::TOB || SubDet == StripSubdetector::TEC ){
257 
258  StripGeomDetUnit* DetUnit = dynamic_cast<StripGeomDetUnit*> (Det[i]);
259  if(!DetUnit)continue;
260 
261  const StripTopology& Topo = DetUnit->specificTopology();
262  unsigned int NAPV = Topo.nstrips()/128;
263  for(unsigned int j=0;j<NAPV;j++){
264  stAPVGain* APV = new stAPVGain;
265  APV->Index = Index;
266  APV->Bin = Charge_Vs_Index->GetXaxis()->FindBin(APV->Index);
267  APV->DetId = Detid.rawId();
268  APV->APVId = j;
269  APV->SubDet = SubDet;
270  APV->FitMPV = -1;
271  APV->FitMPVErr = -1;
272  APV->FitWidth = -1;
273  APV->FitWidthErr = -1;
274  APV->FitChi2 = -1;
275  APV->Gain = -1;
276  APV->PreviousGain = 1;
277  APV->x = DetUnit->position().basicVector().x();
278  APV->y = DetUnit->position().basicVector().y();
279  APV->z = DetUnit->position().basicVector().z();
280  APV->Eta = DetUnit->position().basicVector().eta();
281  APV->Phi = DetUnit->position().basicVector().phi();
282  APV->R = DetUnit->position().basicVector().transverse();
283  APV->Thickness = DetUnit->surface().bounds().thickness();
284  APV->NEntries = 0;
285  APV->isMasked = SiStripQuality_->IsApvBad(Detid.rawId(),j);
286 
287  if(!FirstSetOfConstants){
288  if(gainHandle->getNumberOfTags()!=2){printf("ERROR: NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n");fflush(stdout);exit(0);};
289  APV->PreviousGain = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 1),1);
290  printf("DETID = %7i APVID=%1i Previous Gain=%8.4f\n",APV->DetId,APV->APVId,APV->PreviousGain);
291  }
292 
293  APVsCollOrdered.push_back(APV);
294  APVsColl[(APV->DetId<<3) | APV->APVId] = APV;
295  Index++;
296  }
297  }
298  }
299 
301 
302 
303  NEvent = 0;
304  NTrack = 0;
305  NCluster = 0;
306  SRun = 1<<31;
307  ERun = 0;
308  GOOD = 0;
309  BAD = 0;
310 
313 }
virtual int nstrips() const =0
int i
Definition: DBlmapReader.cc:9
T y() const
Cartesian y coordinate.
edm::Service< TFileService > tfs
T x() const
Cartesian x coordinate.
const Bounds & bounds() const
Definition: Surface.h:128
Geom::Phi< T > phi() const
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
virtual float thickness() const =0
std::vector< stAPVGain * > APVsCollOrdered
__gnu_cxx::hash_map< unsigned int, stAPVGain *, __gnu_cxx::hash< unsigned int >, isEqual > APVsColl
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:41
T z() const
Cartesian z coordinate.
int j
Definition: DBlmapReader.cc:9
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
Definition: DetId.h:20
const T & get() const
Definition: EventSetup.h:55
T transverse() const
Another name for perp()
T * make() const
make new ROOT object
bool isValid() const
Definition: ESHandle.h:37
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
void SiStripGainFromCalibTree::algoComputeMPVandGain ( )
private

Definition at line 507 of file SiStripGainFromCalibTree.cc.

References sistrip::APV, stAPVGain::APVId, APVsColl, BAD, stAPVGain::Bin, CalibrationLevel, Charge_Vs_Index, stAPVGain::DetId, stAPVGain::FitChi2, stAPVGain::FitMPV, stAPVGain::FitMPVErr, stAPVGain::FitWidth, stAPVGain::FitWidthErr, stAPVGain::Gain, getPeakOfLandau(), GOOD, Exhume::I, i, stAPVGain::NEntries, NULL, and storeOnTree().

Referenced by algoBeginJob().

507  {
508  unsigned int I=0;
509  TH1D* Proj = NULL;
510  double FitResults[5];
511  double MPVmean = 300;
512 
513  printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
514  printf("Fitting Charge Distribution :");
515  int TreeStep = APVsColl.size()/50;
516  for(__gnu_cxx::hash_map<unsigned int, stAPVGain*, __gnu_cxx::hash<unsigned int>, isEqual >::iterator it = APVsColl.begin();it!=APVsColl.end();it++,I++){
517  if(I%TreeStep==0){printf(".");fflush(stdout);}
518  //if(I>1000)break;
519  stAPVGain* APV = it->second;
520 
521  Proj = (TH1D*)(Charge_Vs_Index->ProjectionY("",APV->Bin,APV->Bin,"e"));
522  if(!Proj)continue;
523 
524  if(CalibrationLevel==0){
525  }else if(CalibrationLevel==1){
526  int SecondAPVId = APV->APVId;
527  if(SecondAPVId%2==0){ SecondAPVId = SecondAPVId+1; }else{ SecondAPVId = SecondAPVId-1; }
528  stAPVGain* APV2 = APVsColl[(APV->DetId<<3) | SecondAPVId];
529  TH1D* Proj2 = (TH1D*)(Charge_Vs_Index->ProjectionY("",APV2->Bin,APV2->Bin,"e"));
530  if(Proj2){Proj->Add(Proj2,1);delete Proj2;}
531  }else if(CalibrationLevel==2){
532  for(unsigned int i=0;i<6;i++){
533  __gnu_cxx::hash_map<unsigned int, stAPVGain*, __gnu_cxx::hash<unsigned int>, isEqual >::iterator tmpit;
534  tmpit = APVsColl.find((APV->DetId<<3) | i);
535  if(tmpit==APVsColl.end())continue;
536  stAPVGain* APV2 = tmpit->second;
537  if(APV2->DetId != APV->DetId || APV2->APVId == APV->APVId)continue;
538  TH1D* Proj2 = (TH1D*)(Charge_Vs_Index->ProjectionY("",APV2->Bin,APV2->Bin,"e"));
539 // if(Proj2 && APV->DetId==369171124)printf("B) DetId %6i APVId %1i --> NEntries = %f\n",APV2->DetId, APV2->APVId, Proj2->GetEntries());
540  if(Proj2){Proj->Add(Proj2,1);delete Proj2;}
541  }
542  }else{
543  CalibrationLevel = 0;
544  printf("Unknown Calibration Level, will assume %i\n",CalibrationLevel);
545  }
546 
547  getPeakOfLandau(Proj,FitResults);
548  APV->FitMPV = FitResults[0];
549  APV->FitMPVErr = FitResults[1];
550  APV->FitWidth = FitResults[2];
551  APV->FitWidthErr = FitResults[3];
552  APV->FitChi2 = FitResults[4];
553  APV->NEntries = Proj->GetEntries();
554 
555  if(APV->FitMPV>0){
556  APV->Gain = APV->FitMPV / MPVmean;
557  GOOD++;
558  }else{
559  APV->Gain = 1;
560  BAD++;
561  }
562  if(APV->Gain<=0) APV->Gain = 1;
563 // if(!FirstSetOfConstants) APV->Gain *= APV->PreviousGain;
564 
565 
566  //printf("%5i/%5i: %6i - %1i %5E Entries --> MPV = %f +- %f\n",I,APVsColl.size(),APV->DetId, APV->APVId, Proj->GetEntries(), FitResults[0], FitResults[1]);fflush(stdout);
567  delete Proj;
568  }printf("\n");
569 
570  storeOnTree();
571 }
int i
Definition: DBlmapReader.cc:9
#define NULL
Definition: scimark2.h:8
__gnu_cxx::hash_map< unsigned int, stAPVGain *, __gnu_cxx::hash< unsigned int >, isEqual > APVsColl
const std::complex< double > I
Definition: I.h:8
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
void SiStripGainFromCalibTree::algoEndJob ( )
privatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 322 of file SiStripGainFromCalibTree.cc.

322  {
323 }
SiStripApvGain * SiStripGainFromCalibTree::getNewObject ( )
privatevirtual

Implements ConditionDBWriter< SiStripApvGain >.

Definition at line 667 of file SiStripGainFromCalibTree.cc.

References a, sistrip::APV, APVsCollOrdered, stAPVGain::DetId, stAPVGain::Gain, NULL, getGTfromDQMFile::obj, and SiStripApvGain::put().

668 {
670  std::vector<float>* theSiStripVector = NULL;
671  unsigned int PreviousDetId = 0;
672  for(unsigned int a=0;a<APVsCollOrdered.size();a++)
673  {
675  if(APV==NULL){ printf("Bug\n"); continue; }
676  if(APV->DetId != PreviousDetId){
677  if(theSiStripVector!=NULL){
678  SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end());
679  if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId);
680  }
681  theSiStripVector = new std::vector<float>;
682  PreviousDetId = APV->DetId;
683  }
684  theSiStripVector->push_back(APV->Gain);
685  }
686  if(theSiStripVector!=NULL){
687  SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end());
688  if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId);
689  }
690 
691  return obj;
692 }
#define NULL
Definition: scimark2.h:8
bool put(const uint32_t &detID, Range input)
std::vector< stAPVGain * > APVsCollOrdered
std::pair< ContainerIterator, ContainerIterator > Range
double a
Definition: hdecay.h:121
void SiStripGainFromCalibTree::getPeakOfLandau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 50,
double  HighRange = 5400 
)
private

Definition at line 326 of file SiStripGainFromCalibTree.cc.

References MinNrEntries.

Referenced by algoComputeMPVandGain().

327 {
328  FitResults[0] = -0.5; //MPV
329  FitResults[1] = 0; //MPV error
330  FitResults[2] = -0.5; //Width
331  FitResults[3] = 0; //Width error
332  FitResults[4] = -0.5; //Fit Chi2/NDF
333 
334  if( InputHisto->GetEntries() < MinNrEntries)return;
335 
336  // perform fit with standard landau
337  TF1* MyLandau = new TF1("MyLandau","landau",LowRange, HighRange);
338  MyLandau->SetParameter(1,300);
339  InputHisto->Fit("MyLandau","0QR WW");
340 
341  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
342  FitResults[0] = MyLandau->GetParameter(1); //MPV
343  FitResults[1] = MyLandau->GetParError(1); //MPV error
344  FitResults[2] = MyLandau->GetParameter(2); //Width
345  FitResults[3] = MyLandau->GetParError(2); //Width error
346  FitResults[4] = MyLandau->GetChisquare() / MyLandau->GetNDF(); //Fit Chi2/NDF
347 
348  delete MyLandau;
349 }
bool SiStripGainFromCalibTree::IsGoodLandauFit ( double *  FitResults)
private

Definition at line 351 of file SiStripGainFromCalibTree.cc.

References MaxChi2OverNDF, and MaxMPVError.

351  {
352  if(FitResults[0] < 2 )return false;
353  if(FitResults[1] > MaxMPVError )return false;
354  if(FitResults[4] > MaxChi2OverNDF)return false;
355  return true;
356 }
void SiStripGainFromCalibTree::MakeCalibrationMap ( )
private

Definition at line 699 of file SiStripGainFromCalibTree.cc.

References sistrip::APV, APVsColl, stAPVGain::CalibGain, m_calibrationPath, and useCalibration.

Referenced by algoBeginJob().

699  {
700  if(!useCalibration)return;
701 
702 
703  TChain* t1 = new TChain("SiStripCalib/APVGain");
704  t1->Add(m_calibrationPath.c_str());
705 
706  unsigned int tree_DetId;
707  unsigned char tree_APVId;
708  double tree_Gain;
709 
710  t1->SetBranchAddress("DetId" ,&tree_DetId );
711  t1->SetBranchAddress("APVId" ,&tree_APVId );
712  t1->SetBranchAddress("Gain" ,&tree_Gain );
713 
714  for (unsigned int ientry = 0; ientry < t1->GetEntries(); ientry++) {
715  t1->GetEntry(ientry);
716  stAPVGain* APV = APVsColl[(tree_DetId<<3) | (unsigned int)tree_APVId];
717  APV->CalibGain = tree_Gain;
718  }
719 
720 }
__gnu_cxx::hash_map< unsigned int, stAPVGain *, __gnu_cxx::hash< unsigned int >, isEqual > APVsColl
void SiStripGainFromCalibTree::storeOnTree ( )
private

Definition at line 574 of file SiStripGainFromCalibTree.cc.

References a, sistrip::APV, stAPVGain::APVId, APVsColl, APVsCollOrdered, BAD, stAPVGain::Bin, stAPVGain::DetId, stAPVGain::Eta, stAPVGain::FitChi2, stAPVGain::FitMPV, stAPVGain::FitMPVErr, stAPVGain::FitWidth, stAPVGain::FitWidthErr, stAPVGain::Gain, GOOD, stAPVGain::Index, stAPVGain::isMasked, TFileDirectory::make(), NCluster, stAPVGain::NEntries, NEvent, NTrack, NULL, OutputGains, stAPVGain::Phi, stAPVGain::PreviousGain, stAPVGain::R, stAPVGain::SubDet, tfs, stAPVGain::Thickness, stAPVGain::x, stAPVGain::y, and stAPVGain::z.

Referenced by algoComputeMPVandGain().

575 {
576  unsigned int tree_Index;
577  unsigned int tree_Bin;
578  unsigned int tree_DetId;
579  unsigned char tree_APVId;
580  unsigned char tree_SubDet;
581  float tree_x;
582  float tree_y;
583  float tree_z;
584  float tree_Eta;
585  float tree_R;
586  float tree_Phi;
587  float tree_Thickness;
588  float tree_FitMPV;
589  float tree_FitMPVErr;
590  float tree_FitWidth;
591  float tree_FitWidthErr;
592  float tree_FitChi2NDF;
593  double tree_Gain;
594  double tree_PrevGain;
595  double tree_NEntries;
596  bool tree_isMasked;
597 
598  TTree* MyTree;
599  MyTree = tfs->make<TTree> ("APVGain","APVGain");
600  MyTree->Branch("Index" ,&tree_Index ,"Index/i");
601  MyTree->Branch("Bin" ,&tree_Bin ,"Bin/i");
602  MyTree->Branch("DetId" ,&tree_DetId ,"DetId/i");
603  MyTree->Branch("APVId" ,&tree_APVId ,"APVId/b");
604  MyTree->Branch("SubDet" ,&tree_SubDet ,"SubDet/b");
605  MyTree->Branch("x" ,&tree_x ,"x/F");
606  MyTree->Branch("y" ,&tree_y ,"y/F");
607  MyTree->Branch("z" ,&tree_z ,"z/F");
608  MyTree->Branch("Eta" ,&tree_Eta ,"Eta/F");
609  MyTree->Branch("R" ,&tree_R ,"R/F");
610  MyTree->Branch("Phi" ,&tree_Phi ,"Phi/F");
611  MyTree->Branch("Thickness" ,&tree_Thickness ,"Thickness/F");
612  MyTree->Branch("FitMPV" ,&tree_FitMPV ,"FitMPV/F");
613  MyTree->Branch("FitMPVErr" ,&tree_FitMPVErr ,"FitMPVErr/F");
614  MyTree->Branch("FitWidth" ,&tree_FitWidth ,"FitWidth/F");
615  MyTree->Branch("FitWidthErr" ,&tree_FitWidthErr,"FitWidthErr/F");
616  MyTree->Branch("FitChi2NDF" ,&tree_FitChi2NDF ,"FitChi2NDF/F");
617  MyTree->Branch("Gain" ,&tree_Gain ,"Gain/D");
618  MyTree->Branch("PrevGain" ,&tree_PrevGain ,"PrevGain/D");
619  MyTree->Branch("NEntries" ,&tree_NEntries ,"NEntries/D");
620  MyTree->Branch("isMasked" ,&tree_isMasked ,"isMasked/O");
621 
622 
623  FILE* Gains = fopen(OutputGains.c_str(),"w");
624  fprintf(Gains,"NEvents = %i\n",NEvent);
625  fprintf(Gains,"NTracks = %i\n",NTrack);
626  fprintf(Gains,"NClusters = %i\n",NCluster);
627  fprintf(Gains,"Number of APVs = %lu\n",static_cast<unsigned long>(APVsColl.size()));
628  fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD));
629 
630  for(unsigned int a=0;a<APVsCollOrdered.size();a++){
632  if(APV==NULL)continue;
633 // printf( "%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n", APV->DetId,APV->APVId,APV->PreviousGain,APV->Gain);
634  fprintf(Gains,"%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n", APV->DetId,APV->APVId,APV->PreviousGain,APV->Gain);
635 
636  tree_Index = APV->Index;
637  tree_Bin = APV->Bin;
638  tree_DetId = APV->DetId;
639  tree_APVId = APV->APVId;
640  tree_SubDet = APV->SubDet;
641  tree_x = APV->x;
642  tree_y = APV->y;
643  tree_z = APV->z;
644  tree_Eta = APV->Eta;
645  tree_R = APV->R;
646  tree_Phi = APV->Phi;
647  tree_Thickness = APV->Thickness;
648  tree_FitMPV = APV->FitMPV;
649  tree_FitMPVErr = APV->FitMPVErr;
650  tree_FitWidth = APV->FitWidth;
651  tree_FitWidthErr= APV->FitWidthErr;
652  tree_FitChi2NDF = APV->FitChi2;
653  tree_Gain = APV->Gain;
654  tree_PrevGain = APV->PreviousGain;
655  tree_NEntries = APV->NEntries;
656  tree_isMasked = APV->isMasked;
657 
658  MyTree->Fill();
659  }
660  fclose(Gains);
661 
662 
663 }
edm::Service< TFileService > tfs
#define NULL
Definition: scimark2.h:8
std::vector< stAPVGain * > APVsCollOrdered
__gnu_cxx::hash_map< unsigned int, stAPVGain *, __gnu_cxx::hash< unsigned int >, isEqual > APVsColl
double a
Definition: hdecay.h:121
T * make() const
make new ROOT object

Member Data Documentation

bool SiStripGainFromCalibTree::AllowSaturation
private

Definition at line 145 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

__gnu_cxx::hash_map<unsigned int, stAPVGain*, __gnu_cxx::hash<unsigned int>, isEqual > SiStripGainFromCalibTree::APVsColl
private
std::vector<stAPVGain*> SiStripGainFromCalibTree::APVsCollOrdered
private

Definition at line 182 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), getNewObject(), and storeOnTree().

unsigned int SiStripGainFromCalibTree::BAD
private

Definition at line 174 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), algoComputeMPVandGain(), and storeOnTree().

int SiStripGainFromCalibTree::CalibrationLevel
private

Definition at line 149 of file SiStripGainFromCalibTree.cc.

Referenced by algoComputeMPVandGain(), and SiStripGainFromCalibTree().

TH2F* SiStripGainFromCalibTree::Charge_Vs_Index
private
TH2F* SiStripGainFromCalibTree::Charge_Vs_Index_Absolute
private

Definition at line 158 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

TH2F* SiStripGainFromCalibTree::Charge_Vs_PathlengthTECM1
private

Definition at line 165 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

TH2F* SiStripGainFromCalibTree::Charge_Vs_PathlengthTECM2
private

Definition at line 166 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

TH2F* SiStripGainFromCalibTree::Charge_Vs_PathlengthTECP1
private

Definition at line 163 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

TH2F* SiStripGainFromCalibTree::Charge_Vs_PathlengthTECP2
private

Definition at line 164 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

TH2F* SiStripGainFromCalibTree::Charge_Vs_PathlengthTIB
private

Definition at line 159 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

TH2F* SiStripGainFromCalibTree::Charge_Vs_PathlengthTIDM
private

Definition at line 162 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

TH2F* SiStripGainFromCalibTree::Charge_Vs_PathlengthTIDP
private

Definition at line 161 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

TH2F* SiStripGainFromCalibTree::Charge_Vs_PathlengthTOB
private

Definition at line 160 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

unsigned int SiStripGainFromCalibTree::ERun
private

Definition at line 172 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

bool SiStripGainFromCalibTree::FirstSetOfConstants
private
unsigned int SiStripGainFromCalibTree::GOOD
private

Definition at line 173 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), algoComputeMPVandGain(), and storeOnTree().

string SiStripGainFromCalibTree::m_calibrationPath
private

Definition at line 152 of file SiStripGainFromCalibTree.cc.

Referenced by MakeCalibrationMap(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxChi2OverNDF
private

Definition at line 137 of file SiStripGainFromCalibTree.cc.

Referenced by IsGoodLandauFit(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxMPVError
private

Definition at line 136 of file SiStripGainFromCalibTree.cc.

Referenced by IsGoodLandauFit(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::MaxNrStrips
private

Definition at line 142 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxTrackChiOverNdf
private

Definition at line 144 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxTrackEta
private

Definition at line 141 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MaxTrackMomentum
private

Definition at line 139 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MinNrEntries
private

Definition at line 135 of file SiStripGainFromCalibTree.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MinTrackEta
private

Definition at line 140 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::MinTrackHits
private

Definition at line 143 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

double SiStripGainFromCalibTree::MinTrackMomentum
private

Definition at line 138 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

unsigned int SiStripGainFromCalibTree::NCluster
private

Definition at line 170 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), algoBeginJob(), and storeOnTree().

unsigned int SiStripGainFromCalibTree::NEvent
private

Definition at line 168 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), algoBeginJob(), and storeOnTree().

unsigned int SiStripGainFromCalibTree::NTrack
private

Definition at line 169 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), algoBeginJob(), and storeOnTree().

bool SiStripGainFromCalibTree::OldGainRemoving
private

Definition at line 148 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

std::string SiStripGainFromCalibTree::OutputGains
private

Definition at line 154 of file SiStripGainFromCalibTree.cc.

Referenced by SiStripGainFromCalibTree(), and storeOnTree().

unsigned int SiStripGainFromCalibTree::SRun
private

Definition at line 171 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and algoBeginJob().

edm::Service<TFileService> SiStripGainFromCalibTree::tfs
private

Definition at line 133 of file SiStripGainFromCalibTree.cc.

Referenced by algoBeginJob(), and storeOnTree().

bool SiStripGainFromCalibTree::useCalibration
private
bool SiStripGainFromCalibTree::Validation
private

Definition at line 147 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().

vector<string> SiStripGainFromCalibTree::VInputFiles
private

Definition at line 155 of file SiStripGainFromCalibTree.cc.

Referenced by algoAnalyzeTheTree(), and SiStripGainFromCalibTree().