Skip to content
Closed
6 changes: 4 additions & 2 deletions CalibFormats/CaloObjects/src/CaloTSamples.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "CalibFormats/CaloObjects/interface/CaloTSamples.icc"
#include "CalibFormats/CaloObjects/interface/CaloTSamplesBase.icc"
#include "CalibFormats/CaloObjects/interface/CaloTSamples.icc"
#include "CondFormats/EcalObjects/interface/EcalConstants.h"

template class CaloTSamplesBase<float>;

template class CaloTSamples<float, 10>;
template class CaloTSamples<float, ecalPh2::sampleSize>;
template class CaloTSamples<float, 3>;
template class CaloTSamples<float, 10>;
6 changes: 6 additions & 0 deletions CondFormats/DataRecord/interface/EcalCATIAGainRatiosRcd.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef CondFormats_DataRecord_EcalCATIAGainRatiosRcd_H
#define CondFormats_DataRecord_EcalCATIAGainRatiosRcd_H

#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"
class EcalCATIAGainRatiosRcd : public edm::eventsetup::EventSetupRecordImplementation<EcalCATIAGainRatiosRcd> {};
#endif
6 changes: 6 additions & 0 deletions CondFormats/DataRecord/interface/EcalLiteDTUPedestalsRcd.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef CondFormats_DataRecord_EcalLiteDTUPedestalsRcd_h
#define CondFormats_DataRecord_EcalLiteDTUPedestalsRcd_h

#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"
class EcalLiteDTUPedestalsRcd : public edm::eventsetup::EventSetupRecordImplementation<EcalLiteDTUPedestalsRcd> {};
#endif
4 changes: 4 additions & 0 deletions CondFormats/DataRecord/src/EcalCATIAGainRatiosRcd.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "CondFormats/DataRecord/interface/EcalCATIAGainRatiosRcd.h"
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"

EVENTSETUP_RECORD_REG(EcalCATIAGainRatiosRcd);
4 changes: 4 additions & 0 deletions CondFormats/DataRecord/src/EcalLiteDTUPedestalsRcd.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "CondFormats/DataRecord/interface/EcalLiteDTUPedestalsRcd.h"
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"

EVENTSETUP_RECORD_REG(EcalLiteDTUPedestalsRcd);
10 changes: 10 additions & 0 deletions CondFormats/EcalObjects/interface/EcalCATIAGainRatios.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef CondFormats_EcalObjects_EcalCATIAGainRatios_h
#define CondFormats_EcalObjects_EcalCATIAGainRatios_h

#include "CondFormats/EcalObjects/interface/EcalCondObjectContainer.h"

typedef float EcalCATIAGainRatio;
typedef EcalFloatCondObjectContainer EcalCATIAGainRatioMap;
typedef EcalCATIAGainRatioMap EcalCATIAGainRatios;

#endif
31 changes: 31 additions & 0 deletions CondFormats/EcalObjects/interface/EcalConstants.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//Namespaces for Phase1 and Phase2
#ifndef CondFormats_EcalObject_EcalConstants_h
#define CondFormats_EcalObject_EcalConstants_h

class ecalPh2 {
public:
static constexpr double Samp_Period = 6.25;
static constexpr unsigned int NGAINS = 2;
static constexpr float gains[NGAINS] = {10., 1.};
static constexpr unsigned int gainId1 = 1;
static constexpr unsigned int gainId10 = 0;
static constexpr unsigned int sampleSize = 16;
static constexpr unsigned int NBITS = 12; // number of available bits
static constexpr unsigned int MAXADC = (1 << NBITS) - 1; // 2^12 -1, adc max range
static constexpr unsigned int kEBChannels = 61200;
static constexpr double maxEneEB = 2000.;
static constexpr unsigned int kNOffsets = 2000;
static constexpr unsigned int kAdcMask = 0xFFF;
static constexpr unsigned int kGainIdMask = 0x3;

}; // namespace ecalPh2

class ecalPh1 {
public:
static constexpr double Samp_Period = 25.;
static constexpr unsigned int NGAINS = 4;
static constexpr float gains[NGAINS] = {0., 12., 6., 1.};
static constexpr unsigned int sampleSize = 10;
static constexpr unsigned int kNOffsets = 2000;
}; // namespace ecalPh1
#endif
39 changes: 39 additions & 0 deletions CondFormats/EcalObjects/interface/EcalLiteDTUPedestals.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#ifndef CondFormats_EcalObject_EcalLiteDTUPedestals_h
#define CondFormats_EcalObject_EcalLiteDTUPedestals_h

#include "CondFormats/Serialization/interface/Serializable.h"
#include "CondFormats/EcalObjects/interface/EcalCondObjectContainer.h"
#include "CondFormats/EcalObjects/interface/EcalConstants.h"

class EcalLiteDTUPedestals {
public:
int setMean(unsigned int i, float value) {
if (i >= ecalPh2::NGAINS)
return -1;
else
meanarray[i] = value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meanarray is double but here the element is set by a float.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meanarray is now a float

return 1;
}

int setRMS(unsigned int i, float value) {
if (i >= ecalPh2::NGAINS)
return -1;
else
rmsarray[i] = value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rmsarray is double but here the element is set by a float.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rmsarray is now a float

return 1;
}

float mean(unsigned int i) const { return meanarray[i]; }

float rms(unsigned int i) const { return rmsarray[i]; }

private:
float meanarray[ecalPh2::NGAINS] = {13., 8.};
float rmsarray[ecalPh2::NGAINS] = {2.8, 1.2};
COND_SERIALIZABLE;
};

typedef EcalCondObjectContainer<EcalLiteDTUPedestals> EcalLiteDTUPedestalsMap;
typedef EcalLiteDTUPedestalsMap::const_iterator EcalLiteDTUPedestalsMapIterator;

#endif
1 change: 1 addition & 0 deletions CondFormats/EcalObjects/src/SerializationManual.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ COND_SERIALIZATION_INSTANTIATE(EcalCondObjectContainer<EcalLaserAPDPNRatios::Eca
COND_SERIALIZATION_INSTANTIATE(EcalCondObjectContainer<EcalMappingElement>);
COND_SERIALIZATION_INSTANTIATE(EcalCondObjectContainer<EcalMGPAGainRatio>);
COND_SERIALIZATION_INSTANTIATE(EcalCondObjectContainer<EcalPedestal>);
COND_SERIALIZATION_INSTANTIATE(EcalCondObjectContainer<EcalLiteDTUPedestals>);
COND_SERIALIZATION_INSTANTIATE(EcalCondObjectContainer<EcalPulseShape>);
COND_SERIALIZATION_INSTANTIATE(EcalCondObjectContainer<EcalPulseCovariance>);
COND_SERIALIZATION_INSTANTIATE(EcalCondObjectContainer<EcalPulseSymmCovariance>);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "CondFormats/EcalObjects/interface/EcalLiteDTUPedestals.h"
#include "FWCore/Utilities/interface/typelookup.h"

TYPELOOKUP_DATA_REG(EcalLiteDTUPedestalsMap);
11 changes: 9 additions & 2 deletions CondFormats/EcalObjects/src/classes.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#include <cstdint>
#include "CondFormats/EcalObjects/interface/EcalCondObjectContainer.h"
#include "CondFormats/EcalObjects/interface/EcalCondTowerObjectContainer.h"
#include "CondFormats/EcalObjects/interface/EcalPedestals.h"
Expand Down Expand Up @@ -64,7 +64,9 @@
#include "CondFormats/EcalObjects/interface/EcalTPGSpike.h"
#include "CondFormats/EcalObjects/interface/EcalSRSettings.h"
#include "CondFormats/EcalObjects/interface/EcalSimPulseShape.h"
#include <cstdint>
//ECAL PH2:
#include "CondFormats/EcalObjects/interface/EcalLiteDTUPedestals.h"
#include "CondFormats/EcalObjects/interface/EcalCATIAGainRatios.h"

namespace CondFormats_EcalObjects {
struct dictionary {
Expand Down Expand Up @@ -93,6 +95,11 @@ namespace CondFormats_EcalObjects {
EcalContainer<EBDetId, EcalPedestal> ec_ebDetId_ecalPedestal;
EcalCondObjectContainer<EcalPedestal> pedmap; //typedef EcalPedestals

//ECAL PH2:
std::vector<EcalLiteDTUPedestals> v_ecalDTUPedestals;
EcalContainer<EBDetId, EcalLiteDTUPedestals> ec_ebDetId_ecalLiteDTUPedestals;
EcalCondObjectContainer<EcalLiteDTUPedestals> pedmapDTU; //typedef EcalPedestals

std::vector<EcalTPGCrystalStatusCode> v_ecalTPGCrystalStatusCode;
EcalContainer<EEDetId, EcalTPGCrystalStatusCode> ec_eeDetId_ecalTPGCrystalStatusCode;
EcalContainer<EBDetId, EcalTPGCrystalStatusCode> ec_ebDetId_ecalTPGCrystalStatusCode;
Expand Down
8 changes: 8 additions & 0 deletions CondFormats/EcalObjects/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@
<field name = "ee_" mapping = "blob"/>
</class>

<class name="EcalLiteDTUPedestals"/>
<!-- templates for EcalCondObjectContainer having the class as template parameter -->
<class name="std::vector<EcalLiteDTUPedestals>"/>
<class name="EcalContainer<EBDetId,EcalLiteDTUPedestals>"/>
<class name="EcalCondObjectContainer<EcalLiteDTUPedestals>">
<field name = "eb_" mapping = "blob"/>
</class>

<!-- base class -->
<class name="EcalTPGCrystalStatusCode"/>
<!-- templates for EcalCondObjectContainer having the class as template parameter -->
Expand Down
9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalChannelStatus_default.xml

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalGainRatios_default.xml

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalLaserAPDPNRatios_default.xml

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalPedestals_default.xml

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalTBWeights_default.xml

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalTPGCrystalStatus_default.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalTPGLutGroupIdMap_default.xml

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalTPGLutGroup_default.xml

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalTPGPedestals_default.xml

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalTPGTowerStatus_default.xml

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalTPGWeightGroup_default.xml

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalTPGWeightIdMap_default.xml

This file was deleted.

9 changes: 0 additions & 9 deletions CondFormats/EcalObjects/xml/EcalWeightXtalGroups_default.xml

This file was deleted.

8 changes: 8 additions & 0 deletions Configuration/Eras/python/Era_Phase2C10_Ecal_Devel_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_Phase2C10_cff import Phase2C10
from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose

Phase2C10_Ecal_Devel = cms.ModifierChain(Phase2C10,phase2_hfnose,phase2_ecal_devel)

4 changes: 4 additions & 0 deletions Configuration/Eras/python/Modifier_phase2_ecal_devel_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import FWCore.ParameterSet.Config as cms

phase2_ecal_devel = cms.Modifier()

3 changes: 3 additions & 0 deletions Configuration/StandardSequences/python/DigiToRaw_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,8 @@
from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
phase2_muon.toReplaceWith(DigiToRawTask, DigiToRawTask.copyAndExclude([rpcpacker]))

from Configuration.Eras.Modifier_phase2_ecal_devel_cff import phase2_ecal_devel
phase2_ecal_devel.toReplaceWith(DigiToRawTask, DigiToRawTask.copyAndExclude([esDigiToRaw]))

from Configuration.Eras.Modifier_fastSim_cff import fastSim
fastSim.toReplaceWith(DigiToRawTask, DigiToRawTask.copyAndExclude([siPixelRawData,SiStripDigiToRaw,castorRawData,ctppsRawData]))
Loading