diff --git a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMCORLin.h b/CalibCalorimetry/EcalLaserAnalyzer/interface/TMCORLin.h deleted file mode 100644 index d534b6fb89129..0000000000000 --- a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMCORLin.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef TMCORLin_H -#define TMCORLin_H - -#include "TObject.h" - -class TMCORLin: public TObject -{ - - private: - - int smin; - float pn_par0[36][2][10]; - float pn_par1[36][2][10]; - float pn_par2[36][2][10]; - float apd_par0[36][3][1700]; - float apd_par1[36][3][1700]; - float apd_par2[36][3][1700]; - - int convert(int); - - void init(); - void loadConsts(); - void loadConsts(int,int); - - public: - // Default Constructor, mainly for Root - TMCORLin(); - TMCORLin(int); - - // Destructor: Does nothing - virtual ~TMCORLin(); - - double computeCorlin_pn(int, int ,int ,double ); - double computeCorlin_apd(int, int ,int ,double ); - - // ClassDef(TMCORLin,1) -}; - -#endif - diff --git a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMCORSat.h b/CalibCalorimetry/EcalLaserAnalyzer/interface/TMCORSat.h deleted file mode 100644 index 701469f22d6f0..0000000000000 --- a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMCORSat.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef TMCORSat_H -#define TMCORSat_H - -#include "TObject.h" - -class TMCORSat: public TObject -{ - - private: - - int smin; - float pn_rg[36][10]; - float apd_rg[36][2][1700]; - - int convert(int); - - void init(); - void loadConsts(); - void loadConsts(int); - - public: - // Default Constructor, mainly for Root - TMCORSat(); - TMCORSat(int); - - // Destructor: Does nothing - virtual ~TMCORSat(); - - double getPNrg(int, int, int); - double getAPDrg(int, int ,int); - - // ClassDef(TMCORSat,1) -}; - -#endif - diff --git a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMCReader.h b/CalibCalorimetry/EcalLaserAnalyzer/interface/TMCReader.h deleted file mode 100644 index 04a1e4ad4a490..0000000000000 --- a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMCReader.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef TMCReader_H -#define TMCReader_H - -#include "TObject.h" - -class TMCReader : public TObject { -public: - static constexpr unsigned int FNPNMAX = 10; - static constexpr unsigned int FNLMODNMAX = 9; - static constexpr unsigned int FNCHANMAX = 200; - static constexpr unsigned int fNpns = 2; - static constexpr unsigned int fNchans = 400; - static constexpr unsigned int fNbins = 102; - -private: - int smN, nlmodN, arr[FNLMODNMAX]; - long int timestart, timestop; - float evts[fNpns + 1][FNCHANMAX + FNPNMAX]; - double min[fNpns + 1][FNCHANMAX + FNPNMAX], max[fNpns + 1][FNCHANMAX + FNPNMAX]; - double val[fNpns + 1][FNCHANMAX + FNPNMAX], sig[fNpns + 1][FNCHANMAX + FNPNMAX]; - double wbin[fNpns + 1][FNCHANMAX + FNPNMAX]; - float sumprob; - - int smlocal, color, lmdir, part; - - void init(); - -public: - // Default Constructor, mainly for Root - TMCReader(); - - // Destructor: Does nothing - virtual ~TMCReader(); - - void validMCLaser(int, int); - void getMCLaserData(int, int); - void validMCPulse(int); - void getMCPulseData(int); - - int getSMNumb() { return smN; } - int getNbOflmodN() { return nlmodN; } - int getlmodN(int indx) { return arr[indx]; } - int getstartime() { return timestart; } - int getstoptime() { return timestop; } - int getnevts(int norm) { return (int)evts[norm][0]; } - - void setsmlocal(int sm) { smlocal = sm; } - void setcolor(int c) { color = c; } - void setdirlmodN(int lmp) { lmdir = lmp; } - void setpartition(int p) { part = p; } - - void changedatatoraw(int, int, int); - void changedatatopeak(int, int, int); - - void printeinjData(int, int, int); - void printlaserData(int, int, int, int); - void printlaserpeak(int, int, int); - void printnormlaserData(int, int, int, int, int); - void printnormlaserpeak(int, int, int, int); - - // ClassDef(TMCReader,1) -}; - -#endif diff --git a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMConfig.h b/CalibCalorimetry/EcalLaserAnalyzer/interface/TMConfig.h deleted file mode 100644 index 3a56395a9ace3..0000000000000 --- a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMConfig.h +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef TMConfig_H -#define TMConfig_H - -#include "TObject.h" - -class TMConfig : public TObject { -public: - static constexpr unsigned int fNsmNmax = 36; //number of SM - static constexpr unsigned int fNlmodN = 9; //number of lmodN in a SM - static constexpr unsigned int fNmem = 10; //number of PNs in a MEM - static constexpr unsigned int fNmodN = 4; //number of modN in a SM - static constexpr unsigned int fNtt = 68; //number of trigger towers in a SM - static constexpr unsigned int fNmax = 8; - static constexpr unsigned int fNburmax = 3; - static constexpr unsigned int fNseqmax = 3; - static constexpr unsigned int fNcolors = 6; //number of laser colors - -private: - int smin; - int arr[fNsmNmax + 1][fNmodN + 1]; - int nbof[fNsmNmax + 1][fNlmodN + 1]; - int towerlist[fNsmNmax + 1][fNlmodN][fNmax + 1]; - int channlist[fNsmNmax + 1][fNlmodN][fNmax + 1]; - int addrpn[fNsmNmax + 1][fNmodN + 1][fNmem]; - int n_pin[fNsmNmax + 1][fNmodN + 1]; - int seqTypeOfSignal[fNseqmax + 1], numbOfEventperBurstAndSignal[fNseqmax + 1]; - int numbOfBurstperSignal[fNseqmax + 1]; - int ped_size[fNburmax + 1], laser_size[fNcolors][fNseqmax + 1]; - double alpha[fNcolors], beta[fNcolors]; - double alpha_run[fNcolors][fNsmNmax + 1][fNtt], beta_run[fNcolors][fNsmNmax + 1][fNtt]; - - void init(); - void readSequenzaConfig(); - void readlmodNConfig(); - void readpnConfig(); - void initShapeAnalysis(); - void initLaserPulseFit(); - void initTPFit(); - void initPNFit(); - void initMatacqPulseFit(); - - int convert(int); - - int firstSample, lastSample; - double alpha_start, beta_start; - - int firstpnSample, lastpnSample; - int nbofiter, nbofpresamp, samplemin, samplemax; - int nbofpnpresamp, nbofpnsamp, nbofsamp; - - int nbofmtqsamples, nbofmtqpresamp, vlastmtqsample, nbofmtqsigmas; - int nbofmtqsamp1esbeforemax_parab, nbofmtqsamplesaftermax_parab; - int thres_mtq, ampllow_trise, amplhigh_trise; - -public: - // Default Constructor, mainly for Root - TMConfig(); - - // Destructor: Does nothing - virtual ~TMConfig(); - - int getfirstSM() { return smin; } - int getfirstSample() { return firstSample; } - int getlastSample() { return lastSample; } - int getfirstPNSample() { return firstpnSample; } - int getlastPNSample() { return lastpnSample; } - float getalpha0() { return alpha_start; } - float getbeta0() { return beta_start; } - int getsampleMin() { return samplemin; } - int getsampleMax() { return samplemax; } - int getNbOfxtalpresamples() { return nbofpresamp; } - int getNbOfPNpresamples() { return nbofpnpresamp; } - int getNbOfiterations() { return nbofiter; } - int getNbOfPNsamples() { return nbofpnsamp; } - int getNbOfxtalsamples() { return nbofsamp; } - double getalpha_ls(int c) { return alpha[c]; } - double getbeta_ls(int c) { return beta[c]; } - - void loadPParams(); - double getalpha_run(int, int, int); - double getbeta_run(int, int, int); - - int getNbOf(int, int); - int getTNumb(int, int, int); - int getXNumb(int, int, int); - int getPNaddr(int, int, int); - int getNbOfPNs(int, int); - - int getNbOfMatacqsamples() { return nbofmtqsamples; } - int getNbOfMatacqpresamples() { return nbofmtqpresamp; } - int getvlastMatacqsample() { return vlastmtqsample; } - int getNoiseCutForMatacq() { return nbofmtqsigmas; } - int getNbOfsamplesBefMax() { return nbofmtqsamp1esbeforemax_parab; } - int getNbOfsamplesAftMax() { return nbofmtqsamplesaftermax_parab; } - int getThresForMatacq() { return thres_mtq; } - int getLowLevelForTRise() { return ampllow_trise; } - int getHighLevelForTRise() { return amplhigh_trise; } - - int getSignalTypeForSeq(int seqNumb) { return seqTypeOfSignal[seqNumb]; } - int getNbOfBurstperSignalForSeq(int seqNumb) { return numbOfBurstperSignal[seqNumb]; } - int getNbOfEventperBurstAndSignalForSeq(int seqNumb) { return numbOfEventperBurstAndSignal[seqNumb]; } - - // ClassDef(TMConfig,1) -}; - -#endif diff --git a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMEGeom.h b/CalibCalorimetry/EcalLaserAnalyzer/interface/TMEGeom.h deleted file mode 100644 index c2ed19c2daf0c..0000000000000 --- a/CalibCalorimetry/EcalLaserAnalyzer/interface/TMEGeom.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef TMEGeom_H -#define TMEGeom_H - -#include "TObject.h" - -class TMEGeom : public TObject { -public: - static constexpr unsigned int nTT = 25; - -private: - int ttindarr[5][5]; - -public: - // Default Constructor, mainly for Root - TMEGeom(); - - // Destructor: Does nothing - virtual ~TMEGeom(); - - int nbOfXTalinmodN(int); - int nbOfXTalinlmodN(int); - - int xtaltoadcn(int); - int adcltoxtal(int, int); - int adcltoadcn(int, int); - int adcltotNumb(int, int); - int adcmtoadcn(int, int); - int adcmtoadcl(int, int, int); - int adcntoadcm(int); - int adcntomodN(int); - int adcntolmodN(int, int); - int adcntoxtal(int); - int tNumbtomodN(int); - int tNumbtomodulN(int); - int tNumbtolmodN(int); - int tNumbtoside(int); - int lmodNtoside(int); - int lmodNtomodN(int); - int lmodNtolmcha(int); - - int modN_offset(int); - int lmodN_offset(int); - - int adcntoij(int); - int adcltoij(int, int); - int ijtoadcn(int, int); - int ijtoadcl(int, int, int); - - int tNumbtolvcha(int); - int tNumbtohvcha(int); - int adcltolvcha(int, int); - int adcltohvcha(int, int); - - int hvchatolvcha(int); - - void tNumbtoij(int); - - // ClassDef(TMEGeom,1) -}; - -#endif diff --git a/CalibCalorimetry/EcalLaserAnalyzer/interface/TPEDestalAnalysis.h b/CalibCalorimetry/EcalLaserAnalyzer/interface/TPEDestalAnalysis.h deleted file mode 100644 index abcf8f656c8d3..0000000000000 --- a/CalibCalorimetry/EcalLaserAnalyzer/interface/TPEDestalAnalysis.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef TPEDestalAnalysis_H -#define TPEDestalAnalysis_H - -#include "TObject.h" - -class TPEDestalAnalysis : public TObject { -public: - static constexpr unsigned int fNpns = 2; - static constexpr unsigned int fNchans = 400; - static constexpr unsigned int ngains = 3; - -private: - int nevt; - long int timestart[ngains], timestop[ngains]; - long int pntimestart[ngains], pntimestop[ngains]; - double valhf[ngains][fNchans + fNpns], sighf[ngains][fNchans + fNpns]; - double valbf[ngains][fNchans + fNpns], sigbf[ngains][fNchans + fNpns]; - double evts[ngains][fNchans + fNpns], evtn[ngains][fNchans + fNpns]; - - double cuthflow[ngains][fNchans + fNpns], cuthfhig[ngains][fNchans + fNpns]; - double cutbflow[ngains][fNchans + fNpns], cutbfhig[ngains][fNchans + fNpns]; - - void init(); - -public: - // Default Constructor, mainly for Root - TPEDestalAnalysis(); - - // Destructor: Does nothing - virtual ~TPEDestalAnalysis(); - - void reinit(); - void reinit(int); - void putDateStart(int, long int); - void putDateStop(int, long int); - void putpnDateStart(int, long int); - void putpnDateStop(int, long int); - void getDateStart(int); - void getDateStop(int); - double getCuthflow(int g, int i) { return cuthflow[g][i]; } - double getCutbfhig(int g, int i) { return cutbfhig[g][i]; } - void putValues(int, int, double, double, double); - void putValuesWithCuts(int, int, double, double, double); - void computepedestalcuts(int, int, int, int); - void printpedestalData(int, int, int, int, int, int); - - // ClassDef(TPEDestalAnalysis,1) -}; - -#endif diff --git a/CalibCalorimetry/HcalAlgos/interface/DoublePadeDelay.h b/CalibCalorimetry/HcalAlgos/interface/DoublePadeDelay.h deleted file mode 100644 index eb02251ae4466..0000000000000 --- a/CalibCalorimetry/HcalAlgos/interface/DoublePadeDelay.h +++ /dev/null @@ -1,168 +0,0 @@ -#ifndef CalibCalorimetry_HcalAlgos_DoublePadeDelay_h_ -#define CalibCalorimetry_HcalAlgos_DoublePadeDelay_h_ - -#include -#include - -#include "CalibCalorimetry/HcalAlgos/interface/AbsElectronicODERHS.h" - -// -// Two differential equations using the Pade delay scheme. The control -// equation and the output equation are coupled only via the timing -// parameter of the output equation (this timing is determined by the -// control output). In this particular model, there is no feedback from -// the output into the control. -// -template -class DoublePadeDelay : public AbsElectronicODERHS -{ -public: - inline DoublePadeDelay(const unsigned padeRow1, const unsigned padeColumn1, - const unsigned padeRow2, const unsigned padeColumn2) - : ode1_(padeRow1, padeColumn1), ode2_(padeRow2, padeColumn2) - { - validate(); - } - - inline DoublePadeDelay(const unsigned padeRow1, const unsigned padeColumn1, - const unsigned padeRow2, const unsigned padeColumn2, - const HcalInterpolatedPulse& pulse) - : AbsElectronicODERHS(pulse), - ode1_(padeRow1, padeColumn1), - ode2_(padeRow2, padeColumn2) - { - validate(); - } - - inline virtual DoublePadeDelay* clone() const - {return new DoublePadeDelay(*this);} - - inline virtual void calc(const double t, - const double* x, const unsigned lenX, - double* derivative) - { - if (!allParametersSet()) throw cms::Exception( - "In DoublePadeDelay::calc: timing and/or ODE parameters not set"); - - // The input signal - const double currentIn = inputPulse_(t); - - // The output signal - const double currentOut = x[outputNode()]; - - // Numbers of parameters used by the member objects - const unsigned npTau1 = tau1_.nParameters(); - const unsigned npOde1 = ode1_.nParameters(); - const unsigned npTau2 = tau2_.nParameters(); - const unsigned npOde2 = ode2_.nParameters(); - - // Parameters for this code. - // Order of parameters in the overall parameter set is: - // parameters for tau1, then for ode1, then tau2, then ode2, - // then parameters of this code. - const double* pstart = ¶ms_[npTau1 + npOde1 + npTau2 + npOde2]; - const double* pars = pstart; - const double ctlGainOut = *pars++; - const double inGainOut = *pars++; - const double outGainOut = *pars++; - assert(thisCodeNumPars == static_cast(pars - pstart)); - - // Save a little bit of time by not calculating the input - // signal derivatives in case they will not be needed - const unsigned row = std::max(ode1_.getPadeRow(), ode2_.getPadeRow()); - const double dIdt = row ? inputPulse_.derivative(t) : 0.0; - const double d2Id2t = row > 1U ? inputPulse_.secondDerivative(t) : 0.0; - - // Set the timing parameters of the control circuit - unsigned firstPar = npTau1 + npOde1; - const double tau2 = tau2_(currentIn, ¶ms_[firstPar], npTau2); - - // Set the ODE parameters for the control circuit - firstPar += npTau2; - if (npOde2) - ode2_.setParameters(¶ms_[firstPar], npOde2); - - // Run the control circuit - const unsigned ctrlNode = controlNode(); - double control; - if (ctrlNode < AbsElectronicODERHS::invalidNode) - { - // The control circuit solves an ODE - control = x[ctrlNode]; - ode2_.calculate(tau2, currentIn, dIdt, d2Id2t, - x, lenX, ctrlNode, derivative); - } - else - { - // The control circuit does not solve an ODE. - // Instead, it drives its output directly. - ode2_.calculate(tau2, currentIn, dIdt, d2Id2t, - 0, 0U, 0U, &control); - } - - // Timing parameter for the output circuit (the preamp) - const double vtau = ctlGainOut*control + - inGainOut*currentIn + - outGainOut*currentOut; - const double tau = tau1_(vtau, ¶ms_[0], npTau1); - - // ODE parameters for the output circuit - if (npOde1) - ode1_.setParameters(¶ms_[npTau1], npOde1); - - // Run the output circuit - ode1_.calculate(tau, currentIn, dIdt, d2Id2t, x, lenX, 0U, derivative); - } - - inline unsigned numberOfNodes() const - {return ode1_.getPadeColumn() + ode2_.getPadeColumn();} - - inline unsigned nParameters() const - { - const unsigned npTau1 = tau1_.nParameters(); - const unsigned npOde1 = ode1_.nParameters(); - const unsigned npTau2 = tau2_.nParameters(); - const unsigned npOde2 = ode2_.nParameters(); - return npTau1 + npOde1 + npTau2 + npOde2 + thisCodeNumPars; - } - - inline unsigned outputNode() const {return 0U;} - - // The second ODE is the one for control. It's output node - // is the control node. - inline unsigned controlNode() const - { - if (ode2_.getPadeColumn()) - // ode2 has a real output node - return ode1_.getPadeColumn(); - else - // ode2 does not have a real output node - return AbsElectronicODERHS::invalidNode; - } - -private: - static const unsigned thisCodeNumPars = 3U; - - inline void validate() const - { - // Basically, we need to avoid the situation in which - // we need to solve the differential equation for the control - // circuit but do not need to solve the differential equation - // for the preamp. It this case we will not have a good way - // to pass the preamp output to the simulator. The simplest - // way to ensure correctness of the whole procedure is to require - // that the preamp must always be modeled by an ODE. Indeed, - // one will almost surely need to represent it by at least - // a low-pass filter. - if (!ode1_.getPadeColumn()) throw cms::Exception( - "In DoublePadeDelay::validate: the output " - "circuit must be modeled by an ODE"); - } - - ODE1 ode1_; - ODE2 ode2_; - DelayTimeModel1 tau1_; - DelayTimeModel2 tau2_; -}; - -#endif // CalibCalorimetry_HcalAlgos_DoublePadeDelay_h_ diff --git a/CalibCalorimetry/HcalAlgos/interface/equalADCSignalTime.h b/CalibCalorimetry/HcalAlgos/interface/equalADCSignalTime.h deleted file mode 100644 index baa88e325b8ee..0000000000000 --- a/CalibCalorimetry/HcalAlgos/interface/equalADCSignalTime.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef CalibCalorimetry_HcalAlgos_equalADCSignalTime_h_ -#define CalibCalorimetry_HcalAlgos_equalADCSignalTime_h_ - -class QIE8Simulator; - -// -// Determine the start time of the simulator input signal which -// produces equal ADC counts in time slices N and N+1. If the start -// time is set to "ttry" then ADC[N] should be larger than ADC[N+1]. -// If the start time is set to "ttry"+25 then ADC[N] should be smaller -// than ADC[N+1]. Note that N should be positive. -// -double equalADCSignalTime(QIE8Simulator& sim, double dt, - double tDigitize, unsigned N, double ttry); - -#endif // CalibCalorimetry_HcalAlgos_equalADCSignalTime_h_ diff --git a/CalibFormats/SiPixelObjects/interface/PixelAliasList.h b/CalibFormats/SiPixelObjects/interface/PixelAliasList.h deleted file mode 100644 index ec3df7f2b7fb9..0000000000000 --- a/CalibFormats/SiPixelObjects/interface/PixelAliasList.h +++ /dev/null @@ -1,279 +0,0 @@ -#ifndef PixelAliasList_h -#define PixelAliasList_h -/*! \file CalibFormats/SiPixelObjects/interface/PixelAliasList.h -* \brief The class to handle 'aliases.txt' -* -* A longer explanation will be placed here later -*/ - -#include "CalibFormats/SiPixelObjects/interface/PixelConfigAlias.h" -#include "CalibFormats/SiPixelObjects/interface/PixelConfigList.h" -#include "CalibFormats/SiPixelObjects/interface/PixelVersionAlias.h" - -#include -#include -#include -#include - -namespace pos { - /*! \class PixelAliasList PixelAliasList.h "interface/PixelAliasList.h" -* -* A longer explanation will be placed here later -*/ - // Added by Dario, May 20th, 2008 ===================================================================== - typedef std::pair versionAliasPair; - typedef std::vector vectorVAPairs; - typedef std::map pathVersionAliasMmap; - typedef std::map pathAliasPair; - typedef std::map pathAliasMmap; - // End of Dario's addition ============================================================================ - class PixelAliasList { - public: - void writefile() { - std::string directory = std::getenv("PIXELCONFIGURATIONBASE"); - - std::string filename = directory + "/aliases.txt"; - - std::ofstream out(filename.c_str()); - - out << "ConfigurationAliases" << std::endl; - for (unsigned int i = 0; i < pixelConfigAliases_.size(); i++) { - PixelConfigAlias& theAlias = pixelConfigAliases_[i]; - out << theAlias.name() << " " << theAlias.key() << " "; - - unsigned int n = theAlias.nVersionAliases(); - for (unsigned int j = 0; j < n; j++) { - out << theAlias.versionAliasesPath(j) << " "; - out << theAlias.versionAliasesAlias(j) << " "; - } - - out << ";" << std::endl; - } - - out << "VersionAliases" << std::endl; - for (unsigned int i = 0; i < pixelVersionAliases_.size(); i++) { - PixelVersionAlias& theAlias = pixelVersionAliases_[i]; - - out << theAlias.path() << " " << theAlias.version() << " " << theAlias.alias() << " ;" << std::endl; - } - } - - void readfile(std::string filename) { - std::ifstream in(filename.c_str()); - if (!in.good()) { - std::cout << "[PixelAliasList::readfile()]\t\tCould not open file:" << filename << std::endl; - } - assert(in.good()); - - // Added by Dario, May 28th, 2008 ===================================================================== - pixelConfigAliases_.clear(); - pixelVersionAliases_.clear(); - aliasMmap.clear(); - versionMmap.clear(); - // End of Dario's addition ============================================================================ - - std::string tag; - - in >> tag; - while (tag.substr(0, 1) == "#") { - in.ignore(4096, '\n'); //skips to endl; - in >> tag; - } - - assert(tag == "ConfigurationAliases"); - - in >> tag; - - while (tag != "VersionAliases") { - std::string alias = tag; - - unsigned int key; - in >> key; - - //std::cout << "[PixelAliasList::readfile()] Alias, key:"<> tag; - std::string theAlias = alias; - - // Added by Dario, May 20th, 2008 ===================================================================== - pathAliasPair tmpPAPair; - if (tag == ";") { - tmpPAPair[""] = " "; - aliasMmap[theAlias] = tmpPAPair; - } - // End of Dario's addition ============================================================================ - while (tag != ";") { - std::string path; - std::string alias; - - path = tag; - in >> alias; - //std::cout << "[PixelAliasList::readfile()] path, alias:"<> tag; - } - - pixelConfigAliases_.push_back(anAlias); - - in >> tag; - } - - assert(tag == "VersionAliases"); - - std::string path; - std::string alias; - unsigned int version; - - in >> path; - in >> version; - in >> alias; - in >> tag; - - //std::cout << "path version alias tag:"<> path; - in >> version; - in >> alias; - in >> tag; - } - - in.close(); - } - - void insertAlias(PixelConfigAlias& anAlias) { - for (unsigned int i = 0; i < pixelConfigAliases_.size(); i++) { - if (pixelConfigAliases_[i].name() == anAlias.name()) { - std::cout << "[PixelAliasList::insertAlias()]\t\t\tReplacing existing alias:" << anAlias.name() << std::endl; - pixelConfigAliases_[i] = anAlias; - return; - } - } - pixelConfigAliases_.push_back(anAlias); - } - - PixelConfigAlias* versionAliases(std::string aliasName) { - for (unsigned int i = 0; i < pixelConfigAliases_.size(); i++) { - if (pixelConfigAliases_[i].name() == aliasName) { - return &(pixelConfigAliases_[i]); - } - } - return 0; - } - - void insertVersionAlias(PixelVersionAlias& anAlias) { - for (unsigned int i = 0; i < pixelVersionAliases_.size(); i++) { - if (pixelVersionAliases_[i].alias() == anAlias.alias() && pixelVersionAliases_[i].path() == anAlias.path()) { - std::cout << "[PixelAliasList::insertVersionAlias()]\t\tReplacing existing version alias:" << anAlias.path() - << " " << anAlias.alias() << std::endl; - pixelVersionAliases_[i] = anAlias; - return; - } - } - pixelVersionAliases_.push_back(anAlias); - } - - void updateConfigAlias(std::string path, unsigned int version, std::string alias, PixelConfigList& config) { - //first loop over configuration aliases - for (unsigned int i = 0; i < pixelConfigAliases_.size(); i++) { - //std::cout << "Looping over aliases:"< getVersionAliases(std::string path) { - std::vector tmp; - for (unsigned int i = 0; i < pixelVersionAliases_.size(); i++) { - //std::cout << "path alias:"< getConfigAliases(std::string path) { - std::vector configAliasVector; - for (pathAliasMmap::iterator it = aliasMmap.begin(); it != aliasMmap.end(); it++) { - if ((*it).first == path) { - configAliasVector.push_back((*it).second); - } - } - return configAliasVector; - } - // End of Dario's addition ============================================================================ - - unsigned int nAliases() { return pixelConfigAliases_.size(); } - std::string name(unsigned int i) { return pixelConfigAliases_[i].name(); } - unsigned int key(unsigned int i) { return pixelConfigAliases_[i].key(); } - PixelConfigAlias operator[](unsigned int i) { return pixelConfigAliases_[i]; } - - unsigned int nVersionAliases() { return pixelVersionAliases_.size(); } - std::string path(unsigned int i) { return pixelVersionAliases_[i].path(); } - unsigned int version(unsigned int i) { return pixelVersionAliases_[i].version(); } - std::string alias(unsigned int i) { return pixelVersionAliases_[i].alias(); } - - private: - std::vector pixelConfigAliases_; - std::vector pixelVersionAliases_; - // Added by Dario, May 20th, 2008 ===================================================================== - pathAliasMmap aliasMmap; - pathVersionAliasMmap versionMmap; - // End of Dario's addition ============================================================================ - }; -} // namespace pos - -#endif diff --git a/CalibFormats/SiPixelObjects/interface/PixelConfig.h b/CalibFormats/SiPixelObjects/interface/PixelConfig.h deleted file mode 100644 index a050e02b37759..0000000000000 --- a/CalibFormats/SiPixelObjects/interface/PixelConfig.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef PixelConfig_h -#define PixelConfig_h -/*! \file CalibFormats/SiPixelObjects/interface/PixelConfig.h -* \brief This class implements.. -* -* A longer explanation will be placed here later -*/ - -#include -#include -#include -#include - -namespace pos{ -/*! \class PixelConfig PixelConfig.h "interface/PixelConfig.h" -* \brief This class implements.. -* -* A longer explanation will be placed here later -*/ - class PixelConfig { - - public: - - void write(std::ofstream& out){ - for (unsigned int i=0;i aPair(dir,version); - versions_.push_back(aPair); - } - //returns -1 if it can not find the dir. - int find(std::string dir, unsigned int &version){ -// std::cout << "[pos::PixelConfig::find()] versions_.size() = " << versions_.size() << std::endl ; - for(unsigned int i=0;i > versions(){ - return versions_; - } - - private: - - std::vector > versions_; - - }; -} -#endif diff --git a/CalibFormats/SiPixelObjects/interface/PixelConfigAlias.h b/CalibFormats/SiPixelObjects/interface/PixelConfigAlias.h deleted file mode 100644 index b113fd7a49ac1..0000000000000 --- a/CalibFormats/SiPixelObjects/interface/PixelConfigAlias.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef PixelConfigAlias_h -#define PixelConfigAlias_h -/*! \file CalibFormats/SiPixelObjects/interface/PixelConfigAlias.h -* \brief This class implements the steps that are used in a scan over Threshold and CalDelay -* -* A longer explanation will be placed here later -*/ - -#include -#include - -namespace pos{ -/*! \class PixelConfigAlias PixelConfigAlias.h "interface/PixelConfigAlias.h" -* -* A longer explanation will be placed here later -*/ - class PixelConfigAlias { - - public: - PixelConfigAlias(std::string name, unsigned int key) { - name_=name; - key_=key; - } - void addVersionAlias(std::string path, std::string alias) { - std::pair apair(path,alias); - versionAliases_.push_back(apair); - } - - std::string name() { return name_; } - unsigned int key() { return key_; } - - unsigned int nVersionAliases() { return versionAliases_.size(); } - std::string versionAliasesPath(unsigned int i) { return versionAliases_[i].first; } - std::string versionAliasesAlias(unsigned int i) { return versionAliases_[i].second; } - - void setKey(unsigned int key) {key_=key;} - - std::vector > versionAliases() { - return versionAliases_; - } - - - private: - - std::string name_; - unsigned int key_; - std::vector > versionAliases_; - - }; -} -#endif diff --git a/CalibFormats/SiPixelObjects/interface/PixelConfigFile.h b/CalibFormats/SiPixelObjects/interface/PixelConfigFile.h deleted file mode 100644 index 12357d4724be2..0000000000000 --- a/CalibFormats/SiPixelObjects/interface/PixelConfigFile.h +++ /dev/null @@ -1,843 +0,0 @@ -#ifndef PixelConfigFile_h -#define PixelConfigFile_h -/*! \file CalibFormats/SiPixelObjects/interface/PixelConfigFile.h -* \brief This class implements.. -* -* OK, first this is not a DB; this class will try to -* define an interface to accessing the configuration data. -*/ - -#include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h" -#include "CalibFormats/SiPixelObjects/interface/PixelConfigAlias.h" -#include "CalibFormats/SiPixelObjects/interface/PixelConfig.h" -#include "CalibFormats/SiPixelObjects/interface/PixelConfigList.h" -#include "CalibFormats/SiPixelObjects/interface/PixelAliasList.h" -#include "CalibFormats/SiPixelObjects/interface/PixelVersionAlias.h" -#include "CalibFormats/SiPixelObjects/interface/PixelCalibBase.h" -#include "CalibFormats/SiPixelObjects/interface/PixelConfigKey.h" -#include "CalibFormats/SiPixelObjects/interface/PixelTrimBase.h" -#include "CalibFormats/SiPixelObjects/interface/PixelTrimAllPixels.h" -#include "CalibFormats/SiPixelObjects/interface/PixelMaskBase.h" -#include "CalibFormats/SiPixelObjects/interface/PixelMaskAllPixels.h" -#include "CalibFormats/SiPixelObjects/interface/PixelDACSettings.h" -#include "CalibFormats/SiPixelObjects/interface/PixelTBMSettings.h" -#include "CalibFormats/SiPixelObjects/interface/PixelDetectorConfig.h" -#include "CalibFormats/SiPixelObjects/interface/PixelLowVoltageMap.h" -#include "CalibFormats/SiPixelObjects/interface/PixelMaxVsf.h" -#include "CalibFormats/SiPixelObjects/interface/PixelNameTranslation.h" -#include "CalibFormats/SiPixelObjects/interface/PixelFEDCard.h" -#include "CalibFormats/SiPixelObjects/interface/PixelCalibConfiguration.h" -#include "CalibFormats/SiPixelObjects/interface/PixelPortCardConfig.h" -#include "CalibFormats/SiPixelObjects/interface/PixelPortcardMap.h" -#include "CalibFormats/SiPixelObjects/interface/PixelDelay25Calib.h" -#include "CalibFormats/SiPixelObjects/interface/PixelFECConfig.h" -#include "CalibFormats/SiPixelObjects/interface/PixelTKFECConfig.h" -#include "CalibFormats/SiPixelObjects/interface/PixelFEDConfig.h" -#include "CalibFormats/SiPixelObjects/interface/PixelTTCciConfig.h" -#include "CalibFormats/SiPixelObjects/interface/PixelLTCConfig.h" -#include "CalibFormats/SiPixelObjects/interface/PixelFEDTestDAC.h" -#include "CalibFormats/SiPixelObjects/interface/PixelGlobalDelay25.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DEBUG_CF_ 0 - -namespace pos { - /*! \class PixelConfigFile PixelConfigFile.h "interface/PixelConfigFile.h" -* -* -* OK, first this is not a DB; this class will try to -* define an interface to accessing the configuration data. -*/ - class PixelConfigFile { - public: - static std::vector > getAliases() { - PixelAliasList& aliases = getAlias(); - std::vector > tmp; - for (unsigned int i = 0; i < aliases.nAliases(); i++) { - std::pair apair(aliases.name(i), aliases.key(i)); - tmp.push_back(apair); - } - return tmp; - } - - static std::vector getVersionAliases(std::string path) { return getAlias().getVersionAliases(path); } - - static bool getVersionAliases(std::string configAlias, - unsigned int& key, - std::vector >& versionAliases) { - PixelConfigAlias* alias = getAlias().versionAliases(configAlias); - if (alias == 0) { - return false; - } - key = alias->key(); - versionAliases = alias->versionAliases(); - return true; - } - - static std::map getAliases_map() { - PixelAliasList& aliases = getAlias(); - std::map tmp; - for (unsigned int i = 0; i < aliases.nAliases(); i++) { - tmp.insert(make_pair(aliases.name(i), aliases.key(i))); - } - return tmp; - } - - static PixelConfigList& configList() { - static PixelConfigList theConfigList = getConfig(); - return theConfigList; - } - - static unsigned int getVersion(std::string path, std::string alias) { return getAlias().getVersion(path, alias); } - - // Added by Dario, May 20th, 2008 ===================================================================== - static pos::pathVersionAliasMmap getVersionData() { return getAlias().getVersionData(); } - static pos::pathVersionAliasMmap getVersionData(std::string koc) { return getAlias().getVersionData(koc); } - - static std::vector getConfigAliases(std::string path) { return getAlias().getConfigAliases(path); } - // End of Dario's addition ============================================================================ - - static void addAlias(std::string alias, unsigned int key) { - PixelConfigAlias anAlias(alias, key); - getAlias().insertAlias(anAlias); - getAlias().writefile(); - } - - static void addAlias(std::string alias, - unsigned int key, - std::vector > versionaliases) { - PixelConfigAlias anAlias(alias, key); - for (unsigned int i = 0; i < versionaliases.size(); i++) { - anAlias.addVersionAlias(versionaliases[i].first, versionaliases[i].second); - } - getAlias().insertAlias(anAlias); - getAlias().writefile(); - } - - static std::vector > getVersions(pos::PixelConfigKey key) { - static PixelConfigList& configs = getConfig(); - PixelConfig& theConfig = configs[key.key()]; - return theConfig.versions(); - } - - static void addVersionAlias(std::string path, unsigned int version, std::string alias) { - PixelConfigList& configs = getConfig(); - - PixelVersionAlias anAlias(path, version, alias); - getAlias().insertVersionAlias(anAlias); - getAlias().updateConfigAlias(path, version, alias, configs); - getAlias().writefile(); - configs.writefile(); - } - - static unsigned int makeKey(std::vector > versions) { - PixelConfig config; - - for (unsigned int i = 0; i < versions.size(); i++) { - config.add(versions[i].first, versions[i].second); - } - - PixelConfigList& configs = getConfig(); - - unsigned int newkey = configs.add(config); - - configs.writefile(); - - return newkey; - } - - static PixelConfigList& getConfig() { - static PixelConfigList configs; - - //FIXME - - static int counter = 0; - - if (counter != 0) { - while (counter != 0) { - std::cout << __LINE__ - << "]\t[PixelConfigFile::getConfig()]\t\t\t\t Waiting for other thread to complete reading" - << std::endl; - ::sleep(1); - } - return configs; - } - - counter++; - - static std::string directory; - static int first = 1; - - directory = std::getenv("PIXELCONFIGURATIONBASE"); - std::string filename = directory + "/configurations.txt"; - /* Don't know who put this snippet of code here: this case is already contemplated in the 'else' of the 'if' statement below - if(!first) - { - configs.reload(filename) - } -*/ - if (first) { - first = 0; - configs.readfile(filename); - forceConfigReload(false); - } else { - // if( getForceConfigReload() ) { - configs.reload(filename); - forceConfigReload(false); - // } - } - - counter--; - - return configs; - } - - static PixelAliasList& getAlias() { - static std::string directory; - static int first = 1; - - static PixelAliasList aliases; - - directory = std::getenv("PIXELCONFIGURATIONBASE"); - std::string filename = directory + "/aliases.txt"; - - if (first) { - first = 0; - aliases.readfile(filename); - - forceAliasesReload(false); - } else { - if (getForceAliasesReload()) { - aliases.readfile(filename); - forceAliasesReload(false); - } - } - - return aliases; - } - - static void forceAliasesReload(bool m) { - if (getForceAliasesReload() != m) { - getForceAliasesReload() = m; - } - } - - static void forceConfigReload(bool m) { - if (getForceConfigReload() != m) { - getForceConfigReload() = m; - } - } - - //Returns the path the the configuration data. - static std::string getPath(std::string path, PixelConfigKey key) { - unsigned int theKey = key.key(); - - assert(theKey <= getConfig().size()); - - unsigned int last = path.find_last_of("/"); - assert(last != (unsigned int)std::string::npos); - - std::string base = path.substr(0, last); - std::string ext = path.substr(last + 1); - - unsigned int slashpos = base.find_last_of("/"); - if (slashpos == (unsigned int)std::string::npos) { - std::cout << "[pos::PixelConfigFile::getPath()]\t\t\tOn path:" << path << std::endl; - std::cout << "[pos::PixelConfigFile::getPath()]\t\t\tRecall that you need a trailing /" << std::endl; - ::abort(); - } - - std::string dir = base.substr(slashpos + 1); - - // std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted dir:" < - static void get(T*& data, std::string path, PixelConfigKey key) { - unsigned int theKey = key.key(); - - if (theKey >= configList().size()) { - configList() = getConfig(); - } - - assert(theKey <= configList().size()); - - unsigned int last = path.find_last_of("/"); - assert(last != (unsigned int)std::string::npos); - - std::string base = path.substr(0, last); - std::string ext = path.substr(last + 1); - - unsigned int slashpos = base.find_last_of("/"); - if (slashpos == (unsigned int)std::string::npos) { - std::cout << "[pos::PixelConfigFile::get()]\t\t\tAsking for data of type:" << typeid(data).name() << std::endl; - std::cout << "[pos::PixelConfigFile::get()]\t\t\tOn path:" << path << std::endl; - std::cout << "[pos::PixelConfigFile::get()]\t\t\tRecall that you need a trailing /" << std::endl; - ::abort(); - } - - std::string dir = base.substr(slashpos + 1); - - // std::cout << "[pos::PixelConfigFile::get()]\t\t\tExtracted dir:" < - static bool configurationDataExists(T*& data, std::string path, PixelConfigKey key) { - std::string mthn = "]\t[pos::PixelConfigFile::configurationDataExists()]\t "; - /* pos::PixelTimeFormatter * timer = new pos::PixelTimeFormatter("PixelConfigFile::ConfigurationDataExists") ; */ - unsigned int theKey = key.key(); - - assert(theKey <= configList().size()); - - unsigned int last = path.find_last_of("/"); - assert(last != (unsigned int)std::string::npos); - - std::string base = path.substr(0, last); - std::string ext = path.substr(last + 1); - - unsigned int slashpos = base.find_last_of("/"); - if (slashpos == (unsigned int)std::string::npos) { - std::cout << __LINE__ << mthn << "Asking for data of type:" << typeid(data).name() << std::endl; - std::cout << __LINE__ << mthn << "On path:" << path << std::endl; - std::cout << __LINE__ << mthn << "Recall that you need a trailing /" << std::endl; - ::abort(); - } - - std::string dir = base.substr(slashpos + 1); - /* timer->stopTimer() ; */ - // std::cout << __LINE__ << mthn << "Extracted dir:" << dir <stopTimer() ; */ - /* delete timer ; */ - - std::ostringstream s1; - s1 << version; - std::string strversion = s1.str(); - - static std::string directory; - directory = std::getenv("PIXELCONFIGURATIONBASE"); - - std::string fullpath = directory + "/" + dir + "/" + strversion + "/"; - - //std::cout << __LINE__ << mthn << "Directory for configuration data:"< - static void get(T*& data, std::string path, unsigned int version) { - std::string mthn = "]\t[pos::PixelConfigFile::get()]\t\t\t\t "; - - unsigned int last = path.find_last_of("/"); - assert(last != (unsigned int)std::string::npos); - - std::string base = path.substr(0, last); - std::string ext = path.substr(last + 1); - - unsigned int slashpos = base.find_last_of("/"); - //if (slashpos==std::string::npos) { - //std::cout << __LINE__ << mthn << "Asking for data of type:" << typeid(data).name() << std::endl; - //std::cout << __LINE__ << mthn << "On path:" << path << std::endl; - //std::cout << __LINE__ << mthn << "Recall that you need a trailing /" << std::endl; - //::abort(); - //} - - std::string dir = base.substr(slashpos + 1); - - //std::cout << __LINE__ << mthn << "Extracted dir :" << dir < - static void get(std::map& pixelObjects, PixelConfigKey key) { - typename std::map::iterator iObject = pixelObjects.begin(); - - for (; iObject != pixelObjects.end(); ++iObject) { - get(iObject->second, iObject->first, key); - } - } - - static int makeNewVersion(std::string path, std::string& dir) { - //std::cout << "[pos::PixelConfigFile::makeNewVersion()]\t\tInserting data on path:"< - static int put(const T* object, std::string path) { - std::string dir; - int version = makeNewVersion(path, dir); - object->writeASCII(dir); - return version; - } - - template - static int put(std::vector objects, std::string path) { - std::cout << "[pos::PixelConfigFile::put()]\t\t# of objects to write: " << objects.size() << std::endl; - std::string dir; - int version = makeNewVersion(path, dir); - for (unsigned int i = 0; i < objects.size(); i++) { - // std::cout << "[pos::PixelConfigFile::put()]\t\t\t\t\tWill write i="<writeASCII(dir); - } - return version; - } - - private: - static bool& getForceAliasesReload() { - static bool forceAliasesReload = false; - return forceAliasesReload; - } - static bool& getForceConfigReload() { - static bool forceConfigReload = false; - return forceConfigReload; - } - }; - -} // namespace pos -#endif diff --git a/CalibFormats/SiPixelObjects/interface/PixelConfigList.h b/CalibFormats/SiPixelObjects/interface/PixelConfigList.h deleted file mode 100644 index 859287d1b1cb2..0000000000000 --- a/CalibFormats/SiPixelObjects/interface/PixelConfigList.h +++ /dev/null @@ -1,132 +0,0 @@ -#ifndef PixelConfigList_h -#define PixelConfigList_h -/*! \file CalibFormats/SiPixelObjects/interface/PixelConfigList.h -* \brief This class implements the configuration key which actually just is an integer. -* -* A longer explanation will be placed here later -*/ - -#include "CalibFormats/SiPixelObjects/interface/PixelConfig.h" - -#include -#include -#include -#include - -namespace pos { - /*! \class PixelConfigList PixelConfigList.h "interface/PixelConfigList.h" -* \brief This class implements.. -* -* A longer explanation will be placed here later -*/ - class PixelConfigList { - public: - void writefile() { - std::string directory = std::getenv("PIXELCONFIGURATIONBASE"); - /* directory+="/PixelConfigDataExamples/"; */ - directory += "/"; - - std::string filename = directory + "/configurations.txt"; - - std::ofstream out(filename.c_str()); - assert(out.good()); - - for (unsigned int i = 0; i < configs.size(); i++) { - //std::cout << "key "<> tag; - while (tag.substr(0, 1) == "#") { - in.ignore(4096, '\n'); //skips to endl; - in >> tag; - } - - unsigned int version = 0; - - while (!in.eof()) { - if (tag != "key") { - std::cout << "PixelConfigDB: tag=" << tag << std::endl; - assert(0); - } - unsigned int tmp_version; - in >> tmp_version; - if (version != tmp_version) { - std::cout << "PixelConfigDB: read version: " << tmp_version << " while expected " << version << std::endl; - assert(0); - } - - in >> tag; - while (tag.substr(0, 1) == "#") { - in.ignore(4096, '\n'); //skips to endl; - in >> tag; - } - - PixelConfig aConfig; - while (tag != "key" && in.good()) { - unsigned int tmp; - in >> tmp; - //std::cout << "adding: "<> tag; - while (tag.substr(0, 1) == "#") { - in.ignore(4096, '\n'); //skips to endl; - in >> tag; - } - } - - configs.push_back(aConfig); - version++; - }; - - in.close(); - } - - //Method will return new key - unsigned int clone(unsigned int oldkey, std::string path, unsigned int version) { - PixelConfig aConfig = configs[oldkey]; - - unsigned int oldversion; - - if (-1 == aConfig.update(path, oldversion, version)) { - std::cout << "Old version not found for path=" << path << " in config " << oldkey << std::endl; - assert(0); - } - - configs.push_back(aConfig); - - return configs.size() - 1; - } - - //Method will return new key - unsigned int add(PixelConfig& aConfig) { - configs.push_back(aConfig); - - return configs.size() - 1; - } - - unsigned int size() { return configs.size(); } - - PixelConfig& operator[](unsigned int i) { return configs[i]; } - - void reload(std::string filename) { - configs.clear(); - readfile(filename); - } - - unsigned int numberOfConfigs() { return configs.size(); } - - private: - std::vector configs; - }; -} // namespace pos -#endif diff --git a/CalibFormats/SiPixelObjects/interface/PixelMaskOverride.h b/CalibFormats/SiPixelObjects/interface/PixelMaskOverride.h deleted file mode 100644 index 6d3fe01377ed4..0000000000000 --- a/CalibFormats/SiPixelObjects/interface/PixelMaskOverride.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef PixelMaskOverride_h -#define PixelMaskOverride_h -/** -* \file CalibFormats/SiPixelObjects/interface/PixelMaskOverride.h -* \brief This class implements.. -* -* A longer explanation will be placed here later -* -*/ - -#include -#include "PixelROCMaskBits.h" -#include "CalibFormats/SiPixelObjects/interface/PixelMaskOverrideBase.h" - -namespace pos{ -/*! \ingroup ConfigurationObjects "Configuration Objects" -* -* @{ -* -* \class PixelMaskOverride PixelMaskOverride.h -* \brief This is the documentation about PixelMaskOverride... -* -*/ - class PixelMaskOverride: public PixelMaskOverrideBase { - - public: - - PixelMaskOverride(std::string filename); - - PixelROCMaskBits getMaskBits(int ROCId ); - - private: - - //need to store the input here.... - - }; -} -/* @} */ -#endif diff --git a/CalibFormats/SiPixelObjects/interface/PixelTrimOverride.h b/CalibFormats/SiPixelObjects/interface/PixelTrimOverride.h deleted file mode 100644 index 3b0e9c1892ffc..0000000000000 --- a/CalibFormats/SiPixelObjects/interface/PixelTrimOverride.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef PixelTrimOverride_h -#define PixelTrimOverride_h -// -// This class provide a base class for the -// pixel trim data for the pixel FEC configuration -// This is a pure interface (abstract class) that -// needs to have an implementation. -// -// Need to figure out what is 'VMEcommand' below! -// -// All applications should just use this -// interface and not care about the specific -// implementation -// -#include -#include "PixelTrimBase.h" -#include "PixelMaskBase.h" - -namespace pos{ - class PixelTrimOverride: public PixelTrimOverrideBase { - - public: - - PixelTrimOverride(std::string filename); - - //Build the commands needed to configure ROC - //Need to use the mask bits also for this - std::string getConfigCommand(PixelMaskBase& pixelMask); - - private: - - //need to store the private data here... - - }; -} -#endif diff --git a/CalibFormats/SiPixelObjects/interface/PixelVersionAlias.h b/CalibFormats/SiPixelObjects/interface/PixelVersionAlias.h deleted file mode 100644 index 54c9b08fceeb5..0000000000000 --- a/CalibFormats/SiPixelObjects/interface/PixelVersionAlias.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef PixelVersionAlias_h -#define PixelVersionAlias_h - -#include - -namespace pos{ - class PixelVersionAlias { - - public: - PixelVersionAlias(std::string path, unsigned int version, std::string alias) { - path_=path; - version_=version; - alias_=alias; - } - - std::string path() {return path_;} - unsigned int version() {return version_;} - std::string alias() {return alias_;} - - private: - - std::string path_; - unsigned int version_; - std::string alias_; - }; -} -#endif diff --git a/CalibMuon/CSCCalibration/interface/CSCFakeCrosstalkMap.h b/CalibMuon/CSCCalibration/interface/CSCFakeCrosstalkMap.h deleted file mode 100644 index 8f2944e44bffa..0000000000000 --- a/CalibMuon/CSCCalibration/interface/CSCFakeCrosstalkMap.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CSC_FAKE_CROSSTALK_MAP -#define _CSC_FAKE_CROSSTALK_MAP - -#include "CondFormats/CSCObjects/interface/CSCcrosstalk.h" - -class CSCFakeCrosstalkMap{ - public: - CSCFakeCrosstalkMap(); - - const CSCcrosstalk & get(){ - return (*cncrosstalk); - } - - void smear(); - - private: - float theMean; - float theMin; - float theMinChi; - int theSeed; - long int theM; - - CSCcrosstalk *cncrosstalk ; - -}; - -#endif diff --git a/CalibMuon/CSCCalibration/interface/CSCFakeDBCrosstalkPopCon.h b/CalibMuon/CSCCalibration/interface/CSCFakeDBCrosstalkPopCon.h deleted file mode 100644 index 0dc7fd7a2c5bd..0000000000000 --- a/CalibMuon/CSCCalibration/interface/CSCFakeDBCrosstalkPopCon.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _CSCFAKEDBCROSSTALKPOPCON_H -#define _CSCFAKEDBCROSSTALKPOPCON_H - -#include -#include "FWCore/Framework/interface/SourceFactory.h" -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/ESProducer.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "CondFormats/CSCObjects/interface/CSCDBCrosstalk.h" -#include "CondFormats/DataRecord/interface/CSCDBCrosstalkRcd.h" -#include - -class CSCFakeDBCrosstalkPopCon: public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { - public: - CSCFakeDBCrosstalkPopCon(const edm::ParameterSet&); - ~CSCFakeDBCrosstalkPopCon(); - - float mean,min,minchi; - int seed;long int M; - - CSCDBCrosstalk * prefillDBFakeCrosstalk(); - - typedef std::unique_ptr ReturnType; - - ReturnType produceDBCrosstalk(const CSCDBCrosstalkRcd&); - - private: - // ----------member data --------------------------- - void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ); - CSCDBCrosstalk *cndbcrosstalk ; - -}; - -#endif - diff --git a/CalibMuon/CSCCalibration/interface/CSCFakeDBGainsPopCon.h b/CalibMuon/CSCCalibration/interface/CSCFakeDBGainsPopCon.h deleted file mode 100644 index e43e57c0e6331..0000000000000 --- a/CalibMuon/CSCCalibration/interface/CSCFakeDBGainsPopCon.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _CSCFAKEDBGAINSPOPCON_H -#define _CSCFAKEDBGAINSPOPCON_H - -#include -#include "FWCore/Framework/interface/SourceFactory.h" -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/ESProducer.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/Framework/interface/EventSetup.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "CondFormats/CSCObjects/interface/CSCDBGains.h" -#include "CondFormats/DataRecord/interface/CSCDBGainsRcd.h" -#include - -class CSCFakeDBGainsPopCon: public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { - public: - CSCFakeDBGainsPopCon(const edm::ParameterSet&); - ~CSCFakeDBGainsPopCon(); - - float mean,min,minchi; - int seed;long int M; - - CSCDBGains * prefillDBGains(); - - typedef std::unique_ptr ReturnType; - - ReturnType produceDBGains(const CSCDBGainsRcd&); - - private: - // ----------member data --------------------------- - void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ); - CSCDBGains *cndbgains ; - -}; - -#endif diff --git a/Calibration/IsolatedParticles/interface/CaloSimInfoExtra.h b/Calibration/IsolatedParticles/interface/CaloSimInfoExtra.h deleted file mode 100644 index e8344427f89fd..0000000000000 --- a/Calibration/IsolatedParticles/interface/CaloSimInfoExtra.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef CalibrationIsolatedParticlesCaloSimInfoExtra_h -#define CalibrationIsolatedParticlesCaloSimInfoExtra_h - -// system include files -#include -#include -#include -#include - -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" - -#include "FWCore/Framework/interface/Event.h" - -#include "DataFormats/Common/interface/Handle.h" -#include "DataFormats/TrackReco/interface/Track.h" -#include "DataFormats/TrackReco/interface/TrackFwd.h" -#include "DataFormats/DetId/interface/DetId.h" -#include "DataFormats/Candidate/interface/Candidate.h" - -#include "SimDataFormats/Track/interface/SimTrack.h" -#include "SimDataFormats/Track/interface/SimTrackContainer.h" -#include "SimDataFormats/Vertex/interface/SimVertex.h" -#include "SimDataFormats/Vertex/interface/SimVertexContainer.h" -#include "SimTracker/TrackerHitAssociation/interface/TrackerHitAssociator.h" - -#include "Geometry/CaloGeometry/interface/CaloGeometry.h" -#include "Geometry/CaloTopology/interface/CaloTopology.h" -#include "Geometry/CaloTopology/interface/HcalTopology.h" -#include "RecoCaloTools/Navigation/interface/CaloTowerNavigator.h" -#include "Calibration/IsolatedParticles/interface/CaloSimInfo.h" - -namespace spr{ - - struct energyMap { - energyMap() {pdgId=0;} - int pdgId; - std::vector > matched; - std::vector > gamma; - std::vector > charged; - std::vector > neutral; - std::vector > rest; - std::vector > all; - }; - - // takes the EcalSimHits and returns a map energy matched to SimTrack, photons, neutral hadrons etc. - template< typename T> - std::map eECALSimInfo(const edm::Event&, CaloNavigator& navigator, const CaloGeometry* geo, edm::Handle& hits, edm::Handle& SimTk, edm::Handle& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, double timeCut=150, bool debug=false); - - template< typename T> - std::map eECALSimInfoTotal(const edm::Event&, const DetId& det, const CaloGeometry* geo, const CaloTopology* caloTopology, edm::Handle& hitsEB, edm::Handle& hitsEE, edm::Handle& SimTk, edm::Handle& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, int itry=-1, double timeCut=150, bool debug=false); - - template< typename T> - energyMap eECALSimInfoMatrix(const edm::Event&, const DetId& det, const CaloGeometry* geo, const CaloTopology* caloTopology, edm::Handle& hitsEB, edm::Handle& hitsEE, edm::Handle& SimTk, edm::Handle& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, double timeCut=150, bool debug=false); - - // takes the HcalSimHits and returns a map energy matched to SimTrack, photons, neutral hadrons etc. - template - std::map eHCALSimInfoTotal(const edm::Event&, const HcalTopology* topology, const DetId& det, const CaloGeometry* geo, edm::Handle& hits,edm::Handle& SimTk, edm::Handle& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, int itry=-1, double timeCut=150, bool includeHO=false, bool debug=false); - - template - energyMap eHCALSimInfoMatrix(const edm::Event&, const HcalTopology* topology, const DetId& det, const CaloGeometry* geo, edm::Handle& hits,edm::Handle& SimTk, edm::Handle& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, double timeCut=150, bool includeHO=false, bool debug=false); - - // Actual function which does the matching of SimHits to SimTracks using geantTrackId - template - energyMap caloSimInfoMatrix(const CaloGeometry* geo, edm::Handle& hits, edm::Handle& SimTk, edm::Handle& SimVtx, std::vector< typename T::const_iterator> hit, edm::SimTrackContainer::const_iterator trkInfo, double timeCut=150, bool includeHO=false, bool debug=false); - - // Functions to study the Hits for which history cannot be traced back - template - std::vector missedECALHits(const edm::Event&, CaloNavigator& navigator, edm::Handle& hits, edm::Handle& SimTk, edm::Handle& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, bool flag, bool debug=false); - - template - std::vector missedHCALHits(const edm::Event&, const HcalTopology* topology, const DetId& det, edm::Handle& hits,edm::Handle& SimTk, edm::Handle& SimVtx, const reco::Track* pTrack, TrackerHitAssociator& associate, int ieta, int iphi, bool flag, bool includeHO=false, bool debug=false); - - template - std::vector missedCaloHits(edm::Handle& hits, std::vector matchedId, std::vector< typename T::const_iterator> caloHits, bool flag, bool includeHO=false, bool debug=false); -} - -#include "Calibration/IsolatedParticles/interface/CaloSimInfoExtra.icc" -#endif diff --git a/Calibration/IsolatedParticles/interface/eECALMatrixExtra.h b/Calibration/IsolatedParticles/interface/eECALMatrixExtra.h deleted file mode 100644 index 437efa65d9fad..0000000000000 --- a/Calibration/IsolatedParticles/interface/eECALMatrixExtra.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -The function eECALmatrix returns total energy contained in -NxN crystal matrix for EcalRecHits or PCaloSimHits. - -Inputs : -1. CaloNavigator at the DetId around which NxN has to be formed -2. The EcalRecHitCollection and -3. Number of crystals to be navigated along eta and phi along - one direction (navigation is done alone +-deta and +-dphi). - -Authors: Seema Sharma, Sunanda Banerjee -Created: August 2009 -*/ - - -#ifndef CalibrationIsolatedParticleseECALMatrixExtra_h -#define CalibrationIsolatedParticleseECALMatrixExtra_h - -// system include files -#include -#include -#include - -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "DataFormats/Common/interface/Handle.h" -#include "DataFormats/Candidate/interface/Candidate.h" -#include "DataFormats/DetId/interface/DetId.h" - -#include "Calibration/IsolatedParticles/interface/MatrixECALDetIds.h" -#include "RecoCaloTools/Navigation/interface/CaloNavigator.h" -#include "Geometry/CaloGeometry/interface/CaloGeometry.h" -#include "Geometry/CaloTopology/interface/CaloTopology.h" -#include "Calibration/IsolatedParticles/interface/eECALMatrix.h" - -namespace spr{ - - // Energy in NxN crystal matrix - template< typename T> - double eECALmatrix(CaloNavigator& navigator,edm::Handle& hits, int ieta, int iphi, bool debug=false); - - template< typename T> - std::vector > eECALmatrixCell(const DetId& detId, edm::Handle& hitsEB, edm::Handle& hitsEE, const CaloGeometry* geo, const CaloTopology* caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, bool debug=false); - - // Energy in ietaXiphi crystal matrix - template< typename T> - std::pair eECALmatrixTotal(const DetId& detId, edm::Handle& hitsEB, edm::Handle& hitsEE, const CaloGeometry* geo, const CaloTopology* caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, bool debug=false); - - // returns vector of hits in NxN matrix - template - std::vector > energyECALCell(std::vector& vdets, edm::Handle& hitsEB, edm::Handle& hitsEE, double ebThr=-100, double eeThr=-100, bool debug=false); - -} - -#include "Calibration/IsolatedParticles/interface/eECALMatrixExtra.icc" - -#endif diff --git a/Calibration/Tools/interface/TrackDetMatchInfoCollection.h b/Calibration/Tools/interface/TrackDetMatchInfoCollection.h deleted file mode 100644 index caf10e4172aa6..0000000000000 --- a/Calibration/Tools/interface/TrackDetMatchInfoCollection.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef HTrackAssociator_HTrackDetMatchInfoCollection_h -#define HTrackAssociator_HTrackDetMatchInfoCollection_h - -#include -#include "Calibration/Tools/interface/TrackDetMatchInfo.h" - -typedef std::vector HTrackDetMatchInfoCollection; - -#endif diff --git a/Calibration/Tools/interface/smartSelector.h b/Calibration/Tools/interface/smartSelector.h deleted file mode 100644 index 12e38f1a10bf6..0000000000000 --- a/Calibration/Tools/interface/smartSelector.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*/ - -#ifndef smartSelector_h -#define smartSelector_h - -#include - -class smartSelector -{ - public : - - //! ctor - smartSelector (int smallestPart = 0) : - m_smallestPart (smallestPart) {} - - //! set the smallest part only if was set to 0 - int setSmallestPart (int smallestPart) - { - if (!m_smallestPart) - { - m_smallestPart = smallestPart ; - return 0 ; - } - else return 1 ; - } - - //! actual selector - int accept (int eventNb, const int numberOfFractions) const - { - if (!m_smallestPart) return 1 ; - if (m_smallestPart == numberOfFractions) return 1 ; - int position = eventNb % m_smallestPart ; - int sum = 0 ; - for (int i=1 ; i= sum && - position < sum + numberOfFractions) - return 1 ; - return 0 ; - } - - private : - - int m_smallestPart ; - -} ; - - -#endif