CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
InvRingCalib Class Reference

ECAL TB 2006 calibration with matrix inversion technique. More...

#include <InvRingCalib.h>

Inheritance diagram for InvRingCalib:
edm::EDLooper edm::EDLooperBase edm::EDConsumerBase

Public Member Functions

void beginOfJob () override
 BeginOfJob. More...
 
Status duringLoop (const edm::Event &, const edm::EventSetup &) override
 duringLoop More...
 
void endOfJob () override
 
Status endOfLoop (const edm::EventSetup &, unsigned int iCounter) override
 
 InvRingCalib (const edm::ParameterSet &)
 ctor More...
 
void startingNewLoop (unsigned int) override
 startingNewLoop More...
 
 ~InvRingCalib () override
 dtor More...
 
- Public Member Functions inherited from edm::EDLooper
 EDLooper ()
 
 EDLooper (EDLooper const &)=delete
 
EDLooperoperator= (EDLooper const &)=delete
 
 ~EDLooper () override
 
- Public Member Functions inherited from edm::EDLooperBase
virtual void attachTo (ActivityRegistry &)
 Override this method if you need to monitor the state of the processing. More...
 
virtual void beginOfJob (EventSetup const &)
 
void beginOfJob (EventSetupImpl const &)
 
void copyInfo (ScheduleInfo const &)
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doBeginRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doDuringLoop (EventPrincipal &eventPrincipal, EventSetupImpl const &es, ProcessingController &, StreamContext *)
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
 
Status doEndOfLoop (EventSetupImpl const &es)
 
void doEndRun (RunPrincipal &, EventSetupImpl const &, ProcessContext *)
 
void doStartingNewLoop ()
 
 EDLooperBase ()
 
 EDLooperBase (EDLooperBase const &)=delete
 
virtual std::set< eventsetup::EventSetupRecordKeymodifyingRecords () const
 
EDLooperBaseoperator= (EDLooperBase const &)=delete
 
void prepareForNextLoop (eventsetup::EventSetupProvider *esp)
 
void setActionTable (ExceptionToActionTable const *actionTable)
 
void setModuleChanger (ModuleChanger *)
 
 ~EDLooperBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

int EBRegId (const int)
 Gives back in which region you are: More...
 
void EBRegionDef ()
 Defines the regions in the barrel. More...
 
int EBRegionNum () const
 Number of regions in EB. More...
 
int EERegId (int)
 gives back in which region of the endcap you are. More...
 
void EERegionDef ()
 Defines the regions in the endcap. More...
 
int EERegionNum () const
 The number of regions in EE. More...
 
void EERingDef (const edm::EventSetup &)
 Defines the rins in the endcap. More...
 
void RegPrepare ()
 Prepares the EB regions;. More...
 

Private Attributes

bool isfirstcall_
 
edm::InputTag m_barrelAlCa
 EcalBarrel Input Collection name. More...
 
std::vector< DetIdm_barrelCells
 geometry things used all over the file More...
 
EcalIntercalibConstantMap m_barrelMap
 
std::map< int, int > m_cellPhi
 
std::map< int, GlobalPointm_cellPos
 position of the cell, borders, coords etc... More...
 
std::string m_EBcoeffFile
 coeffs filenames More...
 
std::string m_EEcoeffFile
 
int m_EEZone
 endcap zone to be calibrated More...
 
edm::InputTag m_ElectronLabel
 To take the electrons. More...
 
edm::InputTag m_endcapAlCa
 EcalEndcap Input Collection name. More...
 
std::vector< DetIdm_endcapCells
 
EcalIntercalibConstantMap m_endcapMap
 
int m_endRing
 
int m_etaEnd
 eta end of the zone of interest More...
 
int m_etaStart
 eta start of the zone of interest More...
 
int m_etaWidth
 eta size of the regions More...
 
std::vector< VEcalCalibBlock * > m_IMACalibBlocks
 single blocks calibrators More...
 
unsigned int m_loops
 LP sets the number of loops to do. More...
 
VFillMapm_MapFiller
 The class that fills the map! More...
 
std::string m_mapFillerType
 
double m_maxCoeff
 maximum coefficient accepted (RAW) More...
 
double m_maxEnergyPerCrystal
 maximum energy per crystal cut More...
 
int m_maxSelectedNumPerRing
 maximum number of events per Ring More...
 
double m_minCoeff
 minimum coefficient accepted (RAW) More...
 
double m_minEnergyPerCrystal
 minimum energy per crystal cut More...
 
int m_recoWindowSidex
 reconstruction window size More...
 
int m_recoWindowSidey
 
std::map< int, int > m_Reg
 EB regions vs. eta index. More...
 
std::map< int, int > m_RinginRegion
 association map between raw detIds and the number of the ring inside the region More...
 
std::map< int, int > m_RingNumOfHits
 number of events already read per Ring More...
 
int m_startRing
 LP define the EE region to calibrate. More...
 
int m_usingBlockSolver
 to exclude the blocksolver More...
 
std::map< int, int > m_xtalRegionId
 association map between raw detIds and Region More...
 
std::map< int, int > m_xtalRing
 association map between Raw detIds and Rings More...
 

Additional Inherited Members

- Public Types inherited from edm::EDLooperBase
enum  Status { kContinue, kStop }
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDLooperBase
ModuleChangermoduleChanger ()
 This only returns a non-zero value during the call to endOfLoop. More...
 
ScheduleInfo const * scheduleInfo () const
 This returns a non-zero value after the constructor has been called. More...
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

ECAL TB 2006 calibration with matrix inversion technique.

Author

Definition at line 26 of file InvRingCalib.h.

Constructor & Destructor Documentation

◆ InvRingCalib()

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

ctor

Definition at line 30 of file InvRingCalib.cc.

31  : m_barrelAlCa(iConfig.getParameter<edm::InputTag>("barrelAlca")),
32  m_endcapAlCa(iConfig.getParameter<edm::InputTag>("endcapAlca")),
33  m_ElectronLabel(iConfig.getParameter<edm::InputTag>("ElectronLabel")),
34  m_recoWindowSidex(iConfig.getParameter<int>("recoWindowSidex")),
35  m_recoWindowSidey(iConfig.getParameter<int>("recoWindowSidey")),
36  m_minEnergyPerCrystal(iConfig.getParameter<double>("minEnergyPerCrystal")),
37  m_maxEnergyPerCrystal(iConfig.getParameter<double>("maxEnergyPerCrystal")),
38  m_etaStart(iConfig.getParameter<int>("etaStart")),
39  m_etaEnd(iConfig.getParameter<int>("etaEnd")),
40  m_etaWidth(iConfig.getParameter<int>("etaWidth")),
41  m_maxSelectedNumPerRing(iConfig.getParameter<int>("maxNumPerRing")),
42  m_minCoeff(iConfig.getParameter<double>("minCoeff")),
43  m_maxCoeff(iConfig.getParameter<double>("maxCoeff")),
44  m_usingBlockSolver(iConfig.getParameter<int>("usingBlockSolver")),
45  m_startRing(iConfig.getParameter<int>("startRing")),
46  m_endRing(iConfig.getParameter<int>("endRing")),
47  m_EBcoeffFile(iConfig.getParameter<std::string>("EBcoeffs")),
48  m_EEcoeffFile(iConfig.getParameter<std::string>("EEcoeffs")),
49  m_EEZone(iConfig.getParameter<int>("EEZone")) {
50  //controls if the parameters inputed are correct
51  if ((m_etaEnd * m_etaStart) > 0)
53  if ((m_etaEnd * m_etaStart) < 0)
54  assert(!((m_etaEnd - m_etaStart - 1) % m_etaWidth));
55 
56  assert(m_etaStart >= -85 && m_etaStart <= 86);
57  assert(m_etaEnd >= m_etaStart && m_etaEnd <= 86);
58  assert(m_startRing > -1 && m_startRing <= 40);
60 
62  assert((abs(m_EEZone) <= 1));
63 
64  m_loops = (unsigned int)iConfig.getParameter<int>("loops") - 1;
65  //LP CalibBlock vector instantiation
66  edm::LogInfo("IML") << "[InvRingCalib][ctor] Calib Block";
67  std::string algorithm = iConfig.getParameter<std::string>("algorithm");
68  m_mapFillerType = iConfig.getParameter<std::string>("FillType");
69  int eventWeight = iConfig.getUntrackedParameter<int>("L3EventWeight", 1);
70 
71  for (int i = 0; i < EBRegionNum(); ++i) {
72  if (algorithm == "IMA")
74  else if (algorithm == "L3")
75  m_IMACalibBlocks.push_back(new L3CalibBlock(m_etaWidth, eventWeight));
76  else {
77  edm::LogError("building") << algorithm << " is not a valid calibration algorithm";
78  exit(1);
79  }
80  }
81  int EEBlocks = 0;
82  if (m_EEZone == 0)
83  EEBlocks = 2 * EERegionNum();
84  if (m_EEZone == 1 || m_EEZone == -1)
85  EEBlocks = EERegionNum();
86 
87  for (int i = 0; i < EEBlocks; ++i) {
88  if (algorithm == "IMA")
90  else if (algorithm == "L3")
91  m_IMACalibBlocks.push_back(new L3CalibBlock(m_etaWidth, eventWeight));
92  else {
93  edm::LogError("building") << algorithm << " is not a valid calibration algorithm";
94  exit(1);
95  }
96  }
97  edm::LogInfo("IML") << " [InvRingCalib][ctor] end of creator";
98 }

References funct::abs(), qcdUeDQM_cfi::algorithm, cms::cuda::assert(), EBRegionNum(), EERegionNum(), beamvalidation::exit(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), mps_fire::i, createfilelist::int, m_EEZone, m_endRing, m_etaEnd, m_etaStart, m_etaWidth, m_IMACalibBlocks, m_loops, m_mapFillerType, m_startRing, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~InvRingCalib()

InvRingCalib::~InvRingCalib ( )
override

dtor

destructor

Definition at line 103 of file InvRingCalib.cc.

103 {}

Member Function Documentation

◆ beginOfJob()

void InvRingCalib::beginOfJob ( )
overridevirtual

BeginOfJob.

Reimplemented from edm::EDLooperBase.

Definition at line 108 of file InvRingCalib.cc.

108 { isfirstcall_ = true; }

References isfirstcall_.

◆ duringLoop()

edm::EDLooper::Status InvRingCalib::duringLoop ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

duringLoop

Implements edm::EDLooper.

Definition at line 129 of file InvRingCalib.cc.

129  {
130  if (isfirstcall_) {
131  edm::LogInfo("IML") << "[InvRingCalib][beginOfJob]";
132  //gets the geometry from the event setup
133  edm::ESHandle<CaloGeometry> geoHandle;
134  iSetup.get<CaloGeometryRecord>().get(geoHandle);
135  const CaloGeometry* geometry = geoHandle.product();
136  edm::LogInfo("IML") << "[InvRingCalib] Event Setup read";
137  //fills a vector with all the cells
138  m_barrelCells = geometry->getValidDetIds(DetId::Ecal, EcalBarrel);
139  m_endcapCells = geometry->getValidDetIds(DetId::Ecal, EcalEndcap);
140  //Defines the EB regions
141  edm::LogInfo("IML") << "[InvRingCalib] Defining Barrel Regions";
142  EBRegionDef();
143  //Defines what is a ring in the EE
144  edm::LogInfo("IML") << "[InvRingCalib] Defining endcap Rings";
145  EERingDef(iSetup);
146  //Defines the regions in the EE
147  edm::LogInfo("IML") << "[InvRingCalib] Defining endcap Regions";
148  EERegionDef();
149  if (m_mapFillerType == "Cluster")
156  &m_barrelMap,
157  &m_endcapMap);
158  if (m_mapFillerType == "Matrix")
165  &m_barrelMap,
166  &m_endcapMap);
167  edm::LogInfo("IML") << "[InvRingCalib] Initializing the coeffs";
168  //Sets the initial coefficients to 1.
169  //Graphs to check ring, regions and so on, not needed in the final version
170  TH2F EBRegion("EBRegion", "EBRegion", 171, -85, 86, 360, 1, 361);
171  TH2F EBRing("EBRing", "EBRing", 171, -85, 86, 360, 1, 361);
172  for (std::vector<DetId>::const_iterator it = m_barrelCells.begin(); it != m_barrelCells.end(); ++it) {
173  EBDetId eb(*it);
174  EBRing.Fill(eb.ieta(), eb.iphi(), m_RinginRegion[it->rawId()]);
175  EBRegion.Fill(eb.ieta(), eb.iphi(), m_xtalRegionId[it->rawId()]);
176  }
177 
178  TH2F EEPRegion("EEPRegion", "EEPRegion", 100, 1, 101, 100, 1, 101);
179  TH2F EEPRing("EEPRing", "EEPRing", 100, 1, 101, 100, 1, 101);
180  TH2F EEPRingReg("EEPRingReg", "EEPRingReg", 100, 1, 101, 100, 1, 101);
181  TH2F EEMRegion("EEMRegion", "EEMRegion", 100, 1, 101, 100, 1, 101);
182  TH2F EEMRing("EEMRing", "EEMRing", 100, 1, 101, 100, 1, 101);
183  TH2F EEMRingReg("EEMRingReg", "EEMRingReg", 100, 1, 101, 100, 1, 101);
184  // TH1F eta ("eta","eta",250,-85,165);
185  for (std::vector<DetId>::const_iterator it = m_endcapCells.begin(); it != m_endcapCells.end(); ++it) {
186  EEDetId ee(*it);
187  if (ee.zside() > 0) {
188  EEPRegion.Fill(ee.ix(), ee.iy(), m_xtalRegionId[ee.rawId()]);
189  EEPRing.Fill(ee.ix(), ee.iy(), m_xtalRing[ee.rawId()]);
190  EEPRingReg.Fill(ee.ix(), ee.iy(), m_RinginRegion[ee.rawId()]);
191  }
192  if (ee.zside() < 0) {
193  EEMRegion.Fill(ee.ix(), ee.iy(), m_xtalRegionId[ee.rawId()]);
194  EEMRing.Fill(ee.ix(), ee.iy(), m_xtalRing[ee.rawId()]);
195  EEMRingReg.Fill(ee.ix(), ee.iy(), m_RinginRegion[ee.rawId()]);
196  }
197  }
198 
199  // for (std::map<int,float>::iterator it=m_eta.begin();
200  // it!=m_eta.end();++it)
201  // eta.Fill(it->first,it->second);
202  TFile out("EBZone.root", "recreate");
203  EBRegion.Write();
204  EBRing.Write();
205  EEPRegion.Write();
206  EEPRing.Write();
207  EEPRingReg.Write();
208  EEMRegion.Write();
209  EEMRing.Write();
210  // eta.Write();
211  EEMRingReg.Write();
212  out.Close();
213  edm::LogInfo("IML") << "[InvRingCalib] Start to acquire the coeffs";
214  CaloMiscalibMapEcal EBmap;
215  EBmap.prefillMap();
216  MiscalibReaderFromXMLEcalBarrel barrelreader(EBmap);
217  if (!m_EBcoeffFile.empty())
218  barrelreader.parseXMLMiscalibFile(m_EBcoeffFile);
219  EcalIntercalibConstants costants(EBmap.get());
220  m_barrelMap = costants.getMap();
221  CaloMiscalibMapEcal EEmap;
222  EEmap.prefillMap();
223  MiscalibReaderFromXMLEcalEndcap endcapreader(EEmap);
224  if (!m_EEcoeffFile.empty())
225  endcapreader.parseXMLMiscalibFile(m_EEcoeffFile);
226  EcalIntercalibConstants EEcostants(EEmap.get());
227  m_endcapMap = EEcostants.getMap();
228 
229  isfirstcall_ = false;
230  } // if isfirstcall
231 
232  //gets the barrel recHits
233  double pSubtract = 0.;
234  double pTk = 0.;
235  const EcalRecHitCollection* barrelHitsCollection = nullptr;
236  edm::Handle<EBRecHitCollection> barrelRecHitsHandle;
237  iEvent.getByLabel(m_barrelAlCa, barrelRecHitsHandle);
238  barrelHitsCollection = barrelRecHitsHandle.product();
239 
240  if (!barrelRecHitsHandle.isValid()) {
241  edm::LogError("IML") << "[EcalEleCalibLooper] barrel rec hits not found";
242  return kContinue;
243  }
244  //gets the endcap recHits
245  const EcalRecHitCollection* endcapHitsCollection = nullptr;
246  edm::Handle<EERecHitCollection> endcapRecHitsHandle;
247  iEvent.getByLabel(m_endcapAlCa, endcapRecHitsHandle);
248  endcapHitsCollection = endcapRecHitsHandle.product();
249 
250  if (!endcapRecHitsHandle.isValid()) {
251  edm::LogError("IML") << "[EcalEleCalibLooper] endcap rec hits not found";
252  return kContinue;
253  }
254 
255  //gets the electrons
257  iEvent.getByLabel(m_ElectronLabel, pElectrons);
258 
259  if (!pElectrons.isValid()) {
260  edm::LogError("IML") << "[EcalEleCalibLooper] electrons not found";
261  return kContinue;
262  }
263 
264  //loops over the electrons in the event
265  for (reco::GsfElectronCollection::const_iterator eleIt = pElectrons->begin(); eleIt != pElectrons->end(); ++eleIt) {
266  pSubtract = 0;
267  pTk = eleIt->trackMomentumAtVtx().R();
268  std::map<int, double> xtlMap;
269  DetId Max = 0;
270  if (std::abs(eleIt->eta()) < 1.49)
271  Max = EcalClusterTools::getMaximum(eleIt->superCluster()->hitsAndFractions(), barrelHitsCollection).first;
272  else
273  Max = EcalClusterTools::getMaximum(eleIt->superCluster()->hitsAndFractions(), endcapHitsCollection).first;
274  if (Max.det() == 0)
275  continue;
277  eleIt->superCluster()->hitsAndFractions(), Max, barrelHitsCollection, endcapHitsCollection, xtlMap, pSubtract);
278  if (m_xtalRegionId[Max.rawId()] == -1)
279  continue;
280  pSubtract += eleIt->superCluster()->preshowerEnergy();
281  ++m_RingNumOfHits[m_xtalRing[Max.rawId()]];
282  //fills the calibBlock
283  m_IMACalibBlocks.at(m_xtalRegionId[Max.rawId()])->Fill(xtlMap.begin(), xtlMap.end(), pTk, pSubtract);
284  }
285  return kContinue;
286 } //end of duringLoop

References funct::abs(), EBRegionDef(), DetId::Ecal, EcalBarrel, EcalEndcap, EERegionDef(), EERingDef(), HcalObjRepresent::Fill(), VFillMap::fillMap(), first, edm::EventSetup::get(), CaloMiscalibMapEcal::get(), get, EcalCondObjectContainer< T >::getMap(), EBDetId::ieta(), iEvent, EBDetId::iphi(), isfirstcall_, edm::HandleBase::isValid(), EEDetId::ix(), EEDetId::iy(), edm::EDLooperBase::kContinue, m_barrelAlCa, m_barrelCells, m_barrelMap, m_EBcoeffFile, m_EEcoeffFile, m_ElectronLabel, m_endcapAlCa, m_endcapCells, m_endcapMap, m_IMACalibBlocks, m_MapFiller, m_mapFillerType, m_maxEnergyPerCrystal, m_minEnergyPerCrystal, m_recoWindowSidex, m_recoWindowSidey, m_RinginRegion, m_RingNumOfHits, m_xtalRegionId, m_xtalRing, Max(), MillePedeFileConverter_cfg::out, MiscalibReaderFromXML::parseXMLMiscalibFile(), CaloMiscalibMapEcal::prefillMap(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), DetId::rawId(), and EEDetId::zside().

◆ EBRegId()

int InvRingCalib::EBRegId ( const int  ieta)
private

Gives back in which region you are:

gives the region Id given ieta

Definition at line 538 of file InvRingCalib.cc.

538  {
539  if (ieta < m_etaStart || ieta >= m_etaEnd)
540  return -1;
541  else
542  return (m_Reg[ieta]);
543 }

References LEDCalibrationChannels::ieta, m_etaEnd, and m_Reg.

Referenced by EBRegionDef().

◆ EBRegionDef()

void InvRingCalib::EBRegionDef ( )
private

Defines the regions in the barrel.

Definition at line 548 of file InvRingCalib.cc.

548  {
549  RegPrepare();
550  for (std::vector<DetId>::const_iterator it = m_barrelCells.begin(); it != m_barrelCells.end(); ++it) {
551  EBDetId eb(it->rawId());
552  m_xtalRing[eb.rawId()] = eb.ieta();
553  m_xtalRegionId[eb.rawId()] = EBRegId(eb.ieta());
554  if (m_xtalRegionId[eb.rawId()] == -1)
555  continue;
556  m_RinginRegion[eb.rawId()] = (eb.ieta() - m_etaStart) % m_etaWidth;
557  }
558 }

References EBRegId(), m_barrelCells, m_etaStart, m_etaWidth, m_RinginRegion, m_xtalRegionId, m_xtalRing, and RegPrepare().

Referenced by duringLoop().

◆ EBRegionNum()

int InvRingCalib::EBRegionNum ( ) const
private

Number of regions in EB.

number of Ring in EB

Definition at line 517 of file InvRingCalib.cc.

517  {
518  if ((m_etaEnd * m_etaStart) > 0)
519  return ((m_etaEnd - m_etaStart) / m_etaWidth);
520 
521  if ((m_etaEnd * m_etaStart) < 0)
522  return ((m_etaEnd - m_etaStart - 1) / m_etaWidth);
523 
524  return 0;
525 }

References m_etaEnd, m_etaStart, and m_etaWidth.

Referenced by EERegionDef(), and InvRingCalib().

◆ EERegId()

int InvRingCalib::EERegId ( int  id)
private

gives back in which region of the endcap you are.

Gives the Id of the region given the id of the xtal.

Definition at line 444 of file InvRingCalib.cc.

444  {
445  int reg;
446  int ring;
447  EEDetId ee(id);
448  //sets the reg to -1 if the ring doesn't exist or is outside the region of interest
449  if (m_xtalRing[id] == -1)
450  return -1;
451  //avoid the calibration in the wrong zside
452  if (m_EEZone == 1) {
453  if (ee.zside() < 0)
454  return -1;
455  ring = m_xtalRing[id] - 86;
456  if (ring >= m_endRing)
457  return -1;
458  if (ring < m_startRing)
459  return -1;
460  reg = (ring - m_startRing) / m_etaWidth;
462  return reg;
463  }
464  if (m_EEZone == -1) {
465  if (ee.zside() > 0)
466  return -1;
467  ring = m_xtalRing[id] - 125;
468  if (ring >= m_endRing)
469  return -1;
470  if (ring < m_startRing)
471  return -1;
472  reg = (ring - m_startRing) / m_etaWidth;
474  return reg;
475  }
476  if (ee.zside() > 0)
477  ring = m_xtalRing[id] - 86;
478  else
479  ring = m_xtalRing[id] - 125;
480  if (ring >= m_endRing)
481  return -1;
482  if (ring < m_startRing)
483  return -1;
484  reg = (ring - m_startRing) / m_etaWidth;
486  return reg;
487 }

References triggerObjects_cff::id, m_EEZone, m_endRing, m_etaWidth, m_RinginRegion, m_startRing, m_xtalRing, relativeConstraints::ring, and EEDetId::zside().

Referenced by EERegionDef().

◆ EERegionDef()

void InvRingCalib::EERegionDef ( )
private

Defines the regions in the endcap.

Loops over all the endcap xtals and sets for each xtal the value of the region the xtal is in, and the ringNumber inside the region

Definition at line 491 of file InvRingCalib.cc.

491  {
492  int reg;
493  for (std::vector<DetId>::const_iterator endcapIt = m_endcapCells.begin(); endcapIt != m_endcapCells.end();
494  ++endcapIt) {
495  EEDetId ee(*endcapIt);
496  reg = EERegId(endcapIt->rawId());
497  //If the ring is not of interest saves only the region Id(-1)
498  if (reg == -1)
499  m_xtalRegionId[endcapIt->rawId()] = reg;
500  //sums the number of region in EB or EB+EE to have different regionsId in different regions
501  else {
502  if (ee.zside() > 0)
503  reg += EBRegionNum();
504  else
505  reg += EBRegionNum() + EERegionNum();
506  m_xtalRegionId[endcapIt->rawId()] = reg;
507  }
508  }
509 }

References EBRegionNum(), EERegId(), EERegionNum(), m_endcapCells, m_xtalRegionId, and EEDetId::zside().

Referenced by duringLoop().

◆ EERegionNum()

int InvRingCalib::EERegionNum ( ) const
inlineprivate

The number of regions in EE.

Number of Regions in EE.

Definition at line 514 of file InvRingCalib.cc.

514 { return ((m_endRing - m_startRing) / m_etaWidth); }

References m_endRing, m_etaWidth, and m_startRing.

Referenced by EERegionDef(), and InvRingCalib().

◆ EERingDef()

void InvRingCalib::EERingDef ( const edm::EventSetup iSetup)
private

Defines the rins in the endcap.

EE ring definition.

Definition at line 384 of file InvRingCalib.cc.

384  {
385  //Gets the Handle for the geometry from the eventSetup
386  edm::ESHandle<CaloGeometry> geoHandle;
387  iSetup.get<CaloGeometryRecord>().get(geoHandle);
388  //Gets the geometry of the endcap
389  const CaloGeometry* geometry = geoHandle.product();
390  const CaloSubdetectorGeometry* endcapGeometry = geometry->getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
391  // const CaloSubdetectorGeometry *barrelGeometry = geometry->getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
392  //for every xtal gets the position Vector and the phi position
393 
394  // for (std::vector<DetId>::const_iterator barrelIt = m_barrelCells.begin();
395  // barrelIt!=m_barrelCells.end();
396  // ++barrelIt) {
397  // const CaloCellGeometry *cellGeometry = barrelGeometry->getGeometry(*barrelIt);
398  // GlobalPoint point;
399  // EBDetId eb (*barrelIt);
400  // point=cellGeometry->getPosition();
401  // m_eta[eb.ieta()]=point.eta() ; //cellGeometry->getPosition().eta();
402  // }
403  for (std::vector<DetId>::const_iterator endcapIt = m_endcapCells.begin(); endcapIt != m_endcapCells.end();
404  ++endcapIt) {
405  auto cellGeometry = endcapGeometry->getGeometry(*endcapIt);
406  m_cellPos[endcapIt->rawId()] = cellGeometry->getPosition();
407  m_cellPhi[endcapIt->rawId()] = cellGeometry->getPosition().phi();
408  }
409  //takes the first 39 xtals at a fixed y varying the x coordinate and saves their eta coordinate
410  float eta_ring[39];
411  for (int ring = 0; ring < 39; ring++)
412  if (EEDetId::validDetId(ring, 50, 1)) {
413  EEDetId det = EEDetId(ring, 50, 1, EEDetId::XYMODE);
414  eta_ring[ring] = m_cellPos[det.rawId()].eta();
415  }
416  //defines the bonduary of the rings as the average eta of a xtal
417  double etaBonduary[40];
418  etaBonduary[0] = 1.49;
419  etaBonduary[39] = 4.0;
420  for (int ring = 1; ring < 39; ++ring)
421  etaBonduary[ring] = (eta_ring[ring] + eta_ring[ring - 1]) / 2.;
422  //assign to each xtal a ring number
423  int CRing;
424  for (int ring = 0; ring < 39; ring++)
425  for (std::vector<DetId>::const_iterator endcapIt = m_endcapCells.begin(); endcapIt != m_endcapCells.end();
426  ++endcapIt) {
427  if (fabs(m_cellPos[endcapIt->rawId()].eta()) > etaBonduary[ring] &&
428  fabs(m_cellPos[endcapIt->rawId()].eta()) < etaBonduary[ring + 1]) {
429  EEDetId ee(*endcapIt);
430  if (ee.zside() > 0)
431  CRing = ring + 86;
432  else
433  CRing = ring + 125;
434  m_xtalRing[endcapIt->rawId()] = CRing;
435  // m_eta[CRing]=m_cellPos[endcapIt->rawId()].eta();
436  }
437  }
438  return;
439 }

References DetId::Ecal, EcalEndcap, edm::EventSetup::get(), get, CaloSubdetectorGeometry::getGeometry(), m_cellPhi, m_cellPos, m_endcapCells, m_xtalRing, edm::ESHandle< T >::product(), DetId::rawId(), relativeConstraints::ring, EEDetId::validDetId(), EEDetId::XYMODE, and EEDetId::zside().

Referenced by duringLoop().

◆ endOfJob()

void InvRingCalib::endOfJob ( )
overridevirtual

Reimplemented from edm::EDLooperBase.

Definition at line 361 of file InvRingCalib.cc.

361  {
362  edm::LogInfo("IML") << "[InvMatrixCalibLooper][endOfJob] saving calib coeffs";
363  calibXMLwriter barrelWriter(EcalBarrel);
364  calibXMLwriter endcapWriter(EcalEndcap);
365  for (std::vector<DetId>::const_iterator barrelIt = m_barrelCells.begin(); barrelIt != m_barrelCells.end();
366  ++barrelIt) {
367  EBDetId eb(*barrelIt);
368  barrelWriter.writeLine(eb, m_barrelMap[eb]);
369  }
370  for (std::vector<DetId>::const_iterator endcapIt = m_endcapCells.begin(); endcapIt != m_endcapCells.end();
371  ++endcapIt) {
372  EEDetId ee(*endcapIt);
373  endcapWriter.writeLine(ee, m_endcapMap[ee]);
374  }
375 }

References EcalBarrel, EcalEndcap, m_barrelCells, m_barrelMap, m_endcapCells, m_endcapMap, and calibXMLwriter::writeLine().

◆ endOfLoop()

edm::EDLooper::Status InvRingCalib::endOfLoop ( const edm::EventSetup ,
unsigned int  iCounter 
)
overridevirtual

Called after the system has finished one loop over the events. Thar argument is a count of how many loops have been processed before this loo. For the first time through the events the argument will be 0.

Implements edm::EDLooperBase.

Definition at line 291 of file InvRingCalib.cc.

291  {
292  std::map<int, double> InterRings;
293  edm::LogInfo("IML") << "[InvMatrixCalibLooper][endOfLoop] Start to invert the matrixes";
294  //call the autoexplaining "solve" method for every calibBlock
295  for (std::vector<VEcalCalibBlock*>::iterator calibBlock = m_IMACalibBlocks.begin();
296  calibBlock != m_IMACalibBlocks.end();
297  ++calibBlock)
298  (*calibBlock)->solve(m_usingBlockSolver, m_minCoeff, m_maxCoeff);
299 
300  edm::LogInfo("IML") << "[InvRingLooper][endOfLoop] Starting to write the coeffs";
301  TH1F* coeffDistr = new TH1F("coeffdistr", "coeffdistr", 100, 0.7, 1.4);
302  TH1F* coeffMap = new TH1F("coeffRingMap", "coeffRingMap", 250, -85, 165);
303  TH1F* ringDistr = new TH1F("ringDistr", "ringDistr", 250, -85, 165);
304  TH1F* RingFill = new TH1F("RingFill", "RingFill", 250, -85, 165);
305  for (std::map<int, int>::const_iterator it = m_xtalRing.begin(); it != m_xtalRing.end(); ++it)
306  ringDistr->Fill(it->second + 0.1);
307 
308  int ID;
309  std::map<int, int> flag;
310  for (std::map<int, int>::const_iterator it = m_xtalRing.begin(); it != m_xtalRing.end(); ++it)
311  flag[it->second] = 0;
312 
313  for (std::vector<DetId>::const_iterator it = m_barrelCells.begin(); it != m_barrelCells.end(); ++it) {
314  ID = it->rawId();
315  if (m_xtalRegionId[ID] == -1)
316  continue;
317  if (flag[m_xtalRing[ID]])
318  continue;
319  flag[m_xtalRing[ID]] = 1;
320  RingFill->Fill(m_xtalRing[ID], m_RingNumOfHits[m_xtalRing[ID]]);
321  InterRings[m_xtalRing[ID]] = m_IMACalibBlocks.at(m_xtalRegionId[ID])->at(m_RinginRegion[ID]);
322  coeffMap->Fill(m_xtalRing[ID] + 0.1, InterRings[m_xtalRing[ID]]);
323  coeffDistr->Fill(InterRings[m_xtalRing[ID]]);
324  }
325 
326  for (std::vector<DetId>::const_iterator it = m_endcapCells.begin(); it != m_endcapCells.end(); ++it) {
327  ID = it->rawId();
328  if (m_xtalRegionId[ID] == -1)
329  continue;
330  if (flag[m_xtalRing[ID]])
331  continue;
332  flag[m_xtalRing[ID]] = 1;
333  InterRings[m_xtalRing[ID]] = m_IMACalibBlocks.at(m_xtalRegionId[ID])->at(m_RinginRegion[ID]);
334  RingFill->Fill(m_xtalRing[ID], m_RingNumOfHits[m_xtalRing[ID]]);
335  coeffMap->Fill(m_xtalRing[ID], InterRings[m_xtalRing[ID]]);
336  coeffDistr->Fill(InterRings[m_xtalRing[ID]]);
337  }
338 
339  char filename[80];
340  sprintf(filename, "coeff%d.root", iCounter);
341  TFile out(filename, "recreate");
342  coeffDistr->Write();
343  coeffMap->Write();
344  ringDistr->Write();
345  RingFill->Write();
346  out.Close();
347  for (std::vector<DetId>::const_iterator it = m_barrelCells.begin(); it != m_barrelCells.end(); ++it) {
348  m_barrelMap[*it] *= InterRings[m_xtalRing[it->rawId()]];
349  }
350  for (std::vector<DetId>::const_iterator it = m_endcapCells.begin(); it != m_endcapCells.end(); ++it)
351  m_endcapMap[*it] *= InterRings[m_xtalRing[it->rawId()]];
352  if (iCounter < m_loops - 1)
353  return kContinue;
354  else
355  return kStop;
356 }

References corrVsCorr::filename, RemoveAddSevLevel::flag, cms::cuda::for(), edm::EDLooperBase::kContinue, edm::EDLooperBase::kStop, m_barrelCells, m_barrelMap, m_endcapCells, m_endcapMap, m_IMACalibBlocks, m_loops, m_maxCoeff, m_minCoeff, m_RinginRegion, m_RingNumOfHits, m_usingBlockSolver, m_xtalRegionId, m_xtalRing, and MillePedeFileConverter_cfg::out.

◆ RegPrepare()

void InvRingCalib::RegPrepare ( )
private

Prepares the EB regions;.

Divides the barrel in region, necessary to take into account the missing 0 xtal

Definition at line 528 of file InvRingCalib.cc.

528  {
529  int k = 0;
530  for (int i = m_etaStart; i < m_etaEnd; ++i) {
531  if (i == 0)
532  continue;
533  m_Reg[i] = k / m_etaWidth;
534  ++k;
535  }
536 }

References mps_fire::i, dqmdumpme::k, m_etaEnd, m_etaStart, m_etaWidth, and m_Reg.

Referenced by EBRegionDef().

◆ startingNewLoop()

void InvRingCalib::startingNewLoop ( unsigned int  ciclo)
overridevirtual

startingNewLoop

Implements edm::EDLooperBase.

Definition at line 113 of file InvRingCalib.cc.

113  {
114  edm::LogInfo("IML") << "[InvMatrixCalibLooper][Start] entering loop " << ciclo;
115  for (std::vector<VEcalCalibBlock*>::iterator calibBlock = m_IMACalibBlocks.begin();
116  calibBlock != m_IMACalibBlocks.end();
117  ++calibBlock) {
118  //LP empties the energies vector, to fill DuringLoop.
119  (*calibBlock)->reset();
120  }
121  for (std::map<int, int>::const_iterator ring = m_xtalRing.begin(); ring != m_xtalRing.end(); ++ring)
122  m_RingNumOfHits[ring->second] = 0;
123  return;
124 }

References m_IMACalibBlocks, m_RingNumOfHits, m_xtalRing, and relativeConstraints::ring.

Member Data Documentation

◆ isfirstcall_

bool InvRingCalib::isfirstcall_
private

Definition at line 124 of file InvRingCalib.h.

Referenced by beginOfJob(), and duringLoop().

◆ m_barrelAlCa

edm::InputTag InvRingCalib::m_barrelAlCa
private

EcalBarrel Input Collection name.

Definition at line 63 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_barrelCells

std::vector<DetId> InvRingCalib::m_barrelCells
private

geometry things used all over the file

Definition at line 114 of file InvRingCalib.h.

Referenced by duringLoop(), EBRegionDef(), endOfJob(), and endOfLoop().

◆ m_barrelMap

EcalIntercalibConstantMap InvRingCalib::m_barrelMap
private

association map between coeff and ring coeffs for the single xtals

Definition at line 99 of file InvRingCalib.h.

Referenced by duringLoop(), endOfJob(), and endOfLoop().

◆ m_cellPhi

std::map<int, int> InvRingCalib::m_cellPhi
private

Definition at line 96 of file InvRingCalib.h.

Referenced by EERingDef().

◆ m_cellPos

std::map<int, GlobalPoint> InvRingCalib::m_cellPos
private

position of the cell, borders, coords etc...

Definition at line 95 of file InvRingCalib.h.

Referenced by EERingDef().

◆ m_EBcoeffFile

std::string InvRingCalib::m_EBcoeffFile
private

coeffs filenames

Definition at line 117 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_EEcoeffFile

std::string InvRingCalib::m_EEcoeffFile
private

Definition at line 118 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_EEZone

int InvRingCalib::m_EEZone
private

endcap zone to be calibrated

Definition at line 120 of file InvRingCalib.h.

Referenced by EERegId(), and InvRingCalib().

◆ m_ElectronLabel

edm::InputTag InvRingCalib::m_ElectronLabel
private

To take the electrons.

Definition at line 67 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_endcapAlCa

edm::InputTag InvRingCalib::m_endcapAlCa
private

EcalEndcap Input Collection name.

Definition at line 65 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_endcapCells

std::vector<DetId> InvRingCalib::m_endcapCells
private

Definition at line 115 of file InvRingCalib.h.

Referenced by duringLoop(), EERegionDef(), EERingDef(), endOfJob(), and endOfLoop().

◆ m_endcapMap

EcalIntercalibConstantMap InvRingCalib::m_endcapMap
private

Definition at line 100 of file InvRingCalib.h.

Referenced by duringLoop(), endOfJob(), and endOfLoop().

◆ m_endRing

int InvRingCalib::m_endRing
private

Definition at line 105 of file InvRingCalib.h.

Referenced by EERegId(), EERegionNum(), and InvRingCalib().

◆ m_etaEnd

int InvRingCalib::m_etaEnd
private

eta end of the zone of interest

Definition at line 78 of file InvRingCalib.h.

Referenced by EBRegId(), EBRegionNum(), InvRingCalib(), and RegPrepare().

◆ m_etaStart

int InvRingCalib::m_etaStart
private

eta start of the zone of interest

Definition at line 76 of file InvRingCalib.h.

Referenced by EBRegionDef(), EBRegionNum(), InvRingCalib(), and RegPrepare().

◆ m_etaWidth

int InvRingCalib::m_etaWidth
private

eta size of the regions

Definition at line 80 of file InvRingCalib.h.

Referenced by EBRegionDef(), EBRegionNum(), EERegId(), EERegionNum(), InvRingCalib(), and RegPrepare().

◆ m_IMACalibBlocks

std::vector<VEcalCalibBlock *> InvRingCalib::m_IMACalibBlocks
private

single blocks calibrators

Definition at line 87 of file InvRingCalib.h.

Referenced by duringLoop(), endOfLoop(), InvRingCalib(), and startingNewLoop().

◆ m_loops

unsigned int InvRingCalib::m_loops
private

LP sets the number of loops to do.

Definition at line 102 of file InvRingCalib.h.

Referenced by endOfLoop(), and InvRingCalib().

◆ m_MapFiller

VFillMap* InvRingCalib::m_MapFiller
private

The class that fills the map!

Definition at line 59 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_mapFillerType

std::string InvRingCalib::m_mapFillerType
private

Definition at line 123 of file InvRingCalib.h.

Referenced by duringLoop(), and InvRingCalib().

◆ m_maxCoeff

double InvRingCalib::m_maxCoeff
private

maximum coefficient accepted (RAW)

Definition at line 91 of file InvRingCalib.h.

Referenced by endOfLoop().

◆ m_maxEnergyPerCrystal

double InvRingCalib::m_maxEnergyPerCrystal
private

maximum energy per crystal cut

Definition at line 74 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_maxSelectedNumPerRing

int InvRingCalib::m_maxSelectedNumPerRing
private

maximum number of events per Ring

Definition at line 83 of file InvRingCalib.h.

◆ m_minCoeff

double InvRingCalib::m_minCoeff
private

minimum coefficient accepted (RAW)

Definition at line 89 of file InvRingCalib.h.

Referenced by endOfLoop().

◆ m_minEnergyPerCrystal

double InvRingCalib::m_minEnergyPerCrystal
private

minimum energy per crystal cut

Definition at line 72 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_recoWindowSidex

int InvRingCalib::m_recoWindowSidex
private

reconstruction window size

Definition at line 69 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_recoWindowSidey

int InvRingCalib::m_recoWindowSidey
private

Definition at line 70 of file InvRingCalib.h.

Referenced by duringLoop().

◆ m_Reg

std::map<int, int> InvRingCalib::m_Reg
private

EB regions vs. eta index.

Definition at line 122 of file InvRingCalib.h.

Referenced by EBRegId(), and RegPrepare().

◆ m_RinginRegion

std::map<int, int> InvRingCalib::m_RinginRegion
private

association map between raw detIds and the number of the ring inside the region

Definition at line 111 of file InvRingCalib.h.

Referenced by duringLoop(), EBRegionDef(), EERegId(), and endOfLoop().

◆ m_RingNumOfHits

std::map<int, int> InvRingCalib::m_RingNumOfHits
private

number of events already read per Ring

Definition at line 85 of file InvRingCalib.h.

Referenced by duringLoop(), endOfLoop(), and startingNewLoop().

◆ m_startRing

int InvRingCalib::m_startRing
private

LP define the EE region to calibrate.

Definition at line 104 of file InvRingCalib.h.

Referenced by EERegId(), EERegionNum(), and InvRingCalib().

◆ m_usingBlockSolver

int InvRingCalib::m_usingBlockSolver
private

to exclude the blocksolver

Definition at line 93 of file InvRingCalib.h.

Referenced by endOfLoop().

◆ m_xtalRegionId

std::map<int, int> InvRingCalib::m_xtalRegionId
private

association map between raw detIds and Region

Definition at line 109 of file InvRingCalib.h.

Referenced by duringLoop(), EBRegionDef(), EERegionDef(), and endOfLoop().

◆ m_xtalRing

std::map<int, int> InvRingCalib::m_xtalRing
private

association map between Raw detIds and Rings

Definition at line 107 of file InvRingCalib.h.

Referenced by duringLoop(), EBRegionDef(), EERegId(), EERingDef(), endOfLoop(), and startingNewLoop().

EcalCondObjectContainer::getMap
const self & getMap() const
Definition: EcalCondObjectContainer.h:78
InvRingCalib::m_etaWidth
int m_etaWidth
eta size of the regions
Definition: InvRingCalib.h:80
InvRingCalib::m_EBcoeffFile
std::string m_EBcoeffFile
coeffs filenames
Definition: InvRingCalib.h:117
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
InvRingCalib::m_barrelAlCa
edm::InputTag m_barrelAlCa
EcalBarrel Input Collection name.
Definition: InvRingCalib.h:63
mps_fire.i
i
Definition: mps_fire.py:428
calibXMLwriter
Definition: calibXMLwriter.h:15
InvRingCalib::m_minEnergyPerCrystal
double m_minEnergyPerCrystal
minimum energy per crystal cut
Definition: InvRingCalib.h:72
edm::Handle::product
T const * product() const
Definition: Handle.h:70
InvRingCalib::m_recoWindowSidex
int m_recoWindowSidex
reconstruction window size
Definition: InvRingCalib.h:69
InvRingCalib::RegPrepare
void RegPrepare()
Prepares the EB regions;.
Definition: InvRingCalib.cc:528
CaloMiscalibMapEcal::get
const EcalIntercalibConstants & get()
Definition: CaloMiscalibMapEcal.h:90
InvRingCalib::m_RingNumOfHits
std::map< int, int > m_RingNumOfHits
number of events already read per Ring
Definition: InvRingCalib.h:85
InvRingCalib::m_loops
unsigned int m_loops
LP sets the number of loops to do.
Definition: InvRingCalib.h:102
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
EBDetId
Definition: EBDetId.h:17
InvRingCalib::m_endRing
int m_endRing
Definition: InvRingCalib.h:105
geometry
Definition: geometry.py:1
InvRingCalib::m_etaStart
int m_etaStart
eta start of the zone of interest
Definition: InvRingCalib.h:76
InvRingCalib::m_etaEnd
int m_etaEnd
eta end of the zone of interest
Definition: InvRingCalib.h:78
cms::cuda::assert
assert(be >=bs)
InvRingCalib::m_RinginRegion
std::map< int, int > m_RinginRegion
association map between raw detIds and the number of the ring inside the region
Definition: InvRingCalib.h:111
edm::SortedCollection< EcalRecHit >
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
ClusterFillMap
Definition: ClusterFillMap.h:7
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
CaloMiscalibMapEcal::prefillMap
void prefillMap()
Definition: CaloMiscalibMapEcal.h:20
EcalCondObjectContainer
Definition: EcalCondObjectContainer.h:13
edm::Handle
Definition: AssociativeIterator.h:50
InvRingCalib::m_recoWindowSidey
int m_recoWindowSidey
Definition: InvRingCalib.h:70
InvRingCalib::EBRegionNum
int EBRegionNum() const
Number of regions in EB.
Definition: InvRingCalib.cc:517
EcalBarrel
Definition: EcalSubdetector.h:10
InvRingCalib::EERingDef
void EERingDef(const edm::EventSetup &)
Defines the rins in the endcap.
Definition: InvRingCalib.cc:384
InvRingCalib::m_xtalRegionId
std::map< int, int > m_xtalRegionId
association map between raw detIds and Region
Definition: InvRingCalib.h:109
InvRingCalib::isfirstcall_
bool isfirstcall_
Definition: InvRingCalib.h:124
DetId
Definition: DetId.h:17
InvRingCalib::EERegionNum
int EERegionNum() const
The number of regions in EE.
Definition: InvRingCalib.cc:514
CaloGeometry
Definition: CaloGeometry.h:21
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
InvRingCalib::m_cellPhi
std::map< int, int > m_cellPhi
Definition: InvRingCalib.h:96
InvRingCalib::m_EEcoeffFile
std::string m_EEcoeffFile
Definition: InvRingCalib.h:118
edm::EDLooperBase::kStop
Definition: EDLooperBase.h:80
InvRingCalib::m_EEZone
int m_EEZone
endcap zone to be calibrated
Definition: InvRingCalib.h:120
edm::ESHandle< CaloGeometry >
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
dqmdumpme.k
k
Definition: dqmdumpme.py:60
InvRingCalib::EERegId
int EERegId(int)
gives back in which region of the endcap you are.
Definition: InvRingCalib.cc:444
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
EEDetId
Definition: EEDetId.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalEndcap
Definition: EcalSubdetector.h:10
MiscalibReaderFromXMLEcalBarrel
Definition: MiscalibReaderFromXMLEcalBarrel.h:8
InvRingCalib::m_IMACalibBlocks
std::vector< VEcalCalibBlock * > m_IMACalibBlocks
single blocks calibrators
Definition: InvRingCalib.h:87
IMACalibBlock
Definition: IMACalibBlock.h:22
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
CaloMiscalibMapEcal
Definition: CaloMiscalibMapEcal.h:16
align::ID
uint32_t ID
Definition: Definitions.h:24
InvRingCalib::m_minCoeff
double m_minCoeff
minimum coefficient accepted (RAW)
Definition: InvRingCalib.h:89
qcdUeDQM_cfi.algorithm
algorithm
Definition: qcdUeDQM_cfi.py:32
InvRingCalib::m_ElectronLabel
edm::InputTag m_ElectronLabel
To take the electrons.
Definition: InvRingCalib.h:67
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
InvRingCalib::m_cellPos
std::map< int, GlobalPoint > m_cellPos
position of the cell, borders, coords etc...
Definition: InvRingCalib.h:95
InvRingCalib::m_barrelMap
EcalIntercalibConstantMap m_barrelMap
Definition: InvRingCalib.h:99
InvRingCalib::m_endcapCells
std::vector< DetId > m_endcapCells
Definition: InvRingCalib.h:115
MiscalibReaderFromXMLEcalEndcap
Definition: MiscalibReaderFromXMLEcalEndcap.h:8
Max
T Max(T a, T b)
Definition: MathUtil.h:44
CaloSubdetectorGeometry::getGeometry
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: CaloSubdetectorGeometry.cc:36
edm::EDLooperBase::kContinue
Definition: EDLooperBase.h:80
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
get
#define get
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:27
InvRingCalib::m_MapFiller
VFillMap * m_MapFiller
The class that fills the map!
Definition: InvRingCalib.h:59
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
InvRingCalib::m_barrelCells
std::vector< DetId > m_barrelCells
geometry things used all over the file
Definition: InvRingCalib.h:114
InvRingCalib::m_maxCoeff
double m_maxCoeff
maximum coefficient accepted (RAW)
Definition: InvRingCalib.h:91
L3CalibBlock
interface to the L3Univ class for testing
Definition: L3CalibBlock.h:24
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EEDetId::XYMODE
static const int XYMODE
Definition: EEDetId.h:335
MatrixFillMap
Definition: MatrixFillMap.h:7
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
InvRingCalib::m_endcapAlCa
edm::InputTag m_endcapAlCa
EcalEndcap Input Collection name.
Definition: InvRingCalib.h:65
InvRingCalib::EBRegId
int EBRegId(const int)
Gives back in which region you are:
Definition: InvRingCalib.cc:538
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
InvRingCalib::m_usingBlockSolver
int m_usingBlockSolver
to exclude the blocksolver
Definition: InvRingCalib.h:93
VFillMap::fillMap
virtual void fillMap(const std::vector< std::pair< DetId, float > > &, const DetId, const EcalRecHitCollection *, const EcalRecHitCollection *, std::map< int, double > &xtlMap, double &)=0
The Map filler.
InvRingCalib::m_xtalRing
std::map< int, int > m_xtalRing
association map between Raw detIds and Rings
Definition: InvRingCalib.h:107
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
InvRingCalib::m_mapFillerType
std::string m_mapFillerType
Definition: InvRingCalib.h:123
ecalIM::coeffMap
std::map< int, CalibCoeff > coeffMap
Definition: InvMatrixCommonDefs.h:22
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
InvRingCalib::EERegionDef
void EERegionDef()
Defines the regions in the endcap.
Definition: InvRingCalib.cc:491
InvRingCalib::m_startRing
int m_startRing
LP define the EE region to calibrate.
Definition: InvRingCalib.h:104
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
InvRingCalib::m_maxEnergyPerCrystal
double m_maxEnergyPerCrystal
maximum energy per crystal cut
Definition: InvRingCalib.h:74
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
beamvalidation.exit
def exit(msg="")
Definition: beamvalidation.py:53
InvRingCalib::m_maxSelectedNumPerRing
int m_maxSelectedNumPerRing
maximum number of events per Ring
Definition: InvRingCalib.h:83
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
InvRingCalib::EBRegionDef
void EBRegionDef()
Defines the regions in the barrel.
Definition: InvRingCalib.cc:548
edm::InputTag
Definition: InputTag.h:15
InvRingCalib::m_Reg
std::map< int, int > m_Reg
EB regions vs. eta index.
Definition: InvRingCalib.h:122
InvRingCalib::m_endcapMap
EcalIntercalibConstantMap m_endcapMap
Definition: InvRingCalib.h:100
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116