CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

Public Member Functions

void beginOfJob ()
 BeginOfJob. More...
 
Status duringLoop (const edm::Event &, const edm::EventSetup &)
 duringLoop More...
 
void endOfJob ()
 
Status endOfLoop (const edm::EventSetup &, unsigned int iCounter)
 
 InvRingCalib (const edm::ParameterSet &)
 ctor More...
 
void startingNewLoop (unsigned int)
 startingNewLoop More...
 
 ~InvRingCalib ()
 dtor More...
 
- Public Member Functions inherited from edm::EDLooper
 EDLooper ()
 
 EDLooper (EDLooper const &)=delete
 
EDLooperoperator= (EDLooper const &)=delete
 
virtual ~EDLooper ()
 
- 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 copyInfo (ScheduleInfo const &)
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal &, EventSetup const &, ProcessContext *)
 
void doBeginRun (RunPrincipal &, EventSetup const &, ProcessContext *)
 
Status doDuringLoop (EventPrincipal &eventPrincipal, EventSetup const &es, ProcessingController &, StreamContext *)
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetup const &, ProcessContext *)
 
Status doEndOfLoop (EventSetup const &es)
 
void doEndRun (RunPrincipal &, EventSetup const &, ProcessContext *)
 
void doStartingNewLoop ()
 
 EDLooperBase ()
 
 EDLooperBase (EDLooperBase const &)=delete
 
virtual std::set
< eventsetup::EventSetupRecordKey
modifyingRecords () const
 
EDLooperBaseoperator= (EDLooperBase const &)=delete
 
void prepareForNextLoop (eventsetup::EventSetupProvider *esp)
 
void setActionTable (ExceptionToActionTable const *actionTable)
 
void setModuleChanger (ModuleChanger const *)
 
virtual ~EDLooperBase ()
 

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 }
 
- Protected Member Functions inherited from edm::EDLooperBase
ModuleChanger const * moduleChanger () const
 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...
 

Detailed Description

ECAL TB 2006 calibration with matrix inversion technique.

Author

Definition at line 27 of file InvRingCalib.h.

Constructor & Destructor Documentation

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

ctor

Definition at line 30 of file InvRingCalib.cc.

References funct::abs(), algorithm(), EBRegionNum(), EERegionNum(), cmsRelvalreport::exit, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, m_EEZone, m_endRing, m_etaEnd, m_etaStart, m_etaWidth, m_IMACalibBlocks, m_loops, m_mapFillerType, m_startRing, and AlCaHLTBitMon_QueryRunRegistry::string.

30  :
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 {
51  //controls if the parameters inputed are correct
52  if ((m_etaEnd*m_etaStart)>0)
53  assert (!((m_etaEnd - m_etaStart )%m_etaWidth));
54  if ((m_etaEnd*m_etaStart)<0)
55  assert (!((m_etaEnd - m_etaStart-1 )%m_etaWidth));
56 
57  assert (m_etaStart >=-85 && m_etaStart <= 86);
58  assert (m_etaEnd >= m_etaStart && m_etaEnd <= 86);
59  assert (m_startRing>-1 && m_startRing<= 40);
60  assert (m_endRing>=m_startRing && m_endRing<=40);
61 
62  assert (!((m_endRing - m_startRing)%m_etaWidth));
63  assert (( abs(m_EEZone)<=1));
64 
65  m_loops = (unsigned int) iConfig.getParameter<int>("loops")- 1;
66  //LP CalibBlock vector instantiation
67  edm::LogInfo ("IML") << "[InvRingCalib][ctor] Calib Block" ;
68  std::string algorithm = iConfig.getParameter<std::string> ("algorithm") ;
69  m_mapFillerType = iConfig.getParameter<std::string> ("FillType");
70  int eventWeight = iConfig.getUntrackedParameter<int> ("L3EventWeight",1) ;
71 
72  for (int i = 0 ; i < EBRegionNum () ; ++i)
73  {
74  if (algorithm == "IMA")
75  m_IMACalibBlocks.push_back (
77  ) ;
78  else if (algorithm == "L3")
79  m_IMACalibBlocks.push_back (
80  new L3CalibBlock (m_etaWidth, eventWeight)
81  ) ;
82  else
83  {
84  edm::LogError ("building") << algorithm
85  << " is not a valid calibration algorithm" ;
86  exit (1) ;
87  }
88  }
89  int EEBlocks = 0 ;
90  if (m_EEZone == 0) EEBlocks = 2 * EERegionNum () ;
91  if (m_EEZone == 1 || m_EEZone == -1) EEBlocks = EERegionNum () ;
92 
93  for (int i = 0; i < EEBlocks ; ++i)
94  {
95 
96  if (algorithm == "IMA")
97  m_IMACalibBlocks.push_back (
99  ) ;
100  else if (algorithm == "L3")
101  m_IMACalibBlocks.push_back (
102  new L3CalibBlock (m_etaWidth, eventWeight)
103  ) ;
104  else
105  {
106  edm::LogError ("building") << algorithm
107  << " is not a valid calibration algorithm" ;
108  exit (1) ;
109  }
110  }
111  edm::LogInfo ("IML") <<" [InvRingCalib][ctor] end of creator";
112 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
< trclass="colgroup">< tdclass="colgroup"colspan=5 > Ecal cluster collections</td ></tr >< tr >< td >< ahref="classreco_1_1BasicCluster.html"> reco::BasicCluster</a ></td >< td >< ahref="DataFormats_EgammaReco.html"> reco::BasicClusterCollection</a ></td >< td >< ahref="#"> hybridSuperClusters</a ></td >< tdclass="description"> Basic clusters reconstructed with hybrid algorithm(barrel only)</td >< td >S.Rahatlou</td ></tr >< tr >< td >< a href
edm::InputTag m_ElectronLabel
To take the electrons.
Definition: InvRingCalib.h:70
int EBRegionNum() const
Number of regions in EB.
double m_maxCoeff
maximum coefficient accepted (RAW)
Definition: InvRingCalib.h:94
int m_maxSelectedNumPerRing
maximum number of events per Ring
Definition: InvRingCalib.h:86
std::string m_EEcoeffFile
Definition: InvRingCalib.h:121
int m_recoWindowSidey
Definition: InvRingCalib.h:73
double m_minEnergyPerCrystal
minimum energy per crystal cut
Definition: InvRingCalib.h:75
int m_EEZone
endcap zone to be calibrated
Definition: InvRingCalib.h:123
double m_maxEnergyPerCrystal
maximum energy per crystal cut
Definition: InvRingCalib.h:77
std::vector< VEcalCalibBlock * > m_IMACalibBlocks
single blocks calibrators
Definition: InvRingCalib.h:90
int m_etaStart
eta start of the zone of interest
Definition: InvRingCalib.h:79
edm::InputTag m_endcapAlCa
EcalEndcap Input Collection name.
Definition: InvRingCalib.h:68
int m_startRing
LP define the EE region to calibrate.
Definition: InvRingCalib.h:107
interface to the L3Univ class for testing
Definition: L3CalibBlock.h:24
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int m_etaWidth
eta size of the regions
Definition: InvRingCalib.h:83
unsigned int m_loops
LP sets the number of loops to do.
Definition: InvRingCalib.h:105
int m_usingBlockSolver
to exclude the blocksolver
Definition: InvRingCalib.h:96
edm::InputTag m_barrelAlCa
EcalBarrel Input Collection name.
Definition: InvRingCalib.h:66
int m_etaEnd
eta end of the zone of interest
Definition: InvRingCalib.h:81
double m_minCoeff
minimum coefficient accepted (RAW)
Definition: InvRingCalib.h:92
std::string m_EBcoeffFile
coeffs filenames
Definition: InvRingCalib.h:120
int m_recoWindowSidex
reconstruction window size
Definition: InvRingCalib.h:72
std::string m_mapFillerType
Definition: InvRingCalib.h:126
int EERegionNum() const
The number of regions in EE.
InvRingCalib::~InvRingCalib ( )

dtor

destructor

Definition at line 119 of file InvRingCalib.cc.

120 {
121 }

Member Function Documentation

void InvRingCalib::beginOfJob ( )
virtual

BeginOfJob.

Reimplemented from edm::EDLooperBase.

Definition at line 130 of file InvRingCalib.cc.

References isfirstcall_.

131 {
132  isfirstcall_=true;
133 
134 
135 }
edm::EDLooper::Status InvRingCalib::duringLoop ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

duringLoop

Implements edm::EDLooper.

Definition at line 165 of file InvRingCalib.cc.

References DetId::det(), EBRegionDef(), DetId::Ecal, EcalBarrel, EcalEndcap, EERegionDef(), EERingDef(), HcalObjRepresent::Fill(), VFillMap::fillMap(), first, geometry, edm::EventSetup::get(), CaloMiscalibMapEcal::get(), edm::Event::getByLabel(), EcalCondObjectContainer< T >::getMap(), CaloGeometry::getValidDetIds(), EBDetId::ieta(), 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, siStripFEDMonitor_P5_cff::Max, dbtoconf::out, MiscalibReaderFromXML::parseXMLMiscalibFile(), CaloMiscalibMapEcal::prefillMap(), edm::Handle< T >::product(), DetId::rawId(), and EEDetId::zside().

167 {
168 
169 
170  if (isfirstcall_){
171  edm::LogInfo ("IML") << "[InvRingCalib][beginOfJob]" ;
172  //gets the geometry from the event setup
173  edm::ESHandle<CaloGeometry> geoHandle;
174  iSetup.get<CaloGeometryRecord>().get(geoHandle);
175  const CaloGeometry& geometry = *geoHandle;
176  edm::LogInfo ("IML") <<"[InvRingCalib] Event Setup read";
177  //fills a vector with all the cells
180  //Defines the EB regions
181  edm::LogInfo ("IML") <<"[InvRingCalib] Defining Barrel Regions";
182  EBRegionDef();
183  //Defines what is a ring in the EE
184  edm::LogInfo ("IML") <<"[InvRingCalib] Defining endcap Rings";
185  EERingDef(iSetup);
186  //Defines the regions in the EE
187  edm::LogInfo ("IML") <<"[InvRingCalib] Defining endcap Regions";
188  EERegionDef();
189  if (m_mapFillerType == "Cluster") m_MapFiller= new ClusterFillMap (
193  & m_barrelMap ,
194  & m_endcapMap );
195  if (m_mapFillerType == "Matrix") m_MapFiller = new MatrixFillMap (
199  & m_barrelMap ,
200  & m_endcapMap);
201  edm::LogInfo ("IML") <<"[InvRingCalib] Initializing the coeffs";
202  //Sets the initial coefficients to 1.
203  //Graphs to check ring, regions and so on, not needed in the final version
204  TH2F EBRegion ("EBRegion","EBRegion",171,-85,86,360,1,361);
205  TH2F EBRing ("EBRing","EBRing",171,-85,86,360,1,361);
206  for (std::vector<DetId>::const_iterator it= m_barrelCells.begin();
207  it!= m_barrelCells.end();
208  ++it )
209  {
210  EBDetId eb (*it);
211  EBRing.Fill(eb.ieta(),eb.iphi(),m_RinginRegion[it->rawId()]);
212  EBRegion.Fill(eb.ieta(),eb.iphi(),m_xtalRegionId[it->rawId()]);
213  }
214 
215  TH2F EEPRegion ("EEPRegion", "EEPRegion",100,1,101,100,1,101);
216  TH2F EEPRing ("EEPRing", "EEPRing",100,1,101,100,1,101);
217  TH2F EEPRingReg ("EEPRingReg", "EEPRingReg",100,1,101,100,1,101);
218  TH2F EEMRegion ("EEMRegion", "EEMRegion",100,1,101,100,1,101);
219  TH2F EEMRing ("EEMRing", "EEMRing",100,1,101,100,1,101);
220  TH2F EEMRingReg ("EEMRingReg", "EEMRingReg",100,1,101,100,1,101);
221  // TH1F eta ("eta","eta",250,-85,165);
222  for (std::vector<DetId>::const_iterator it = m_endcapCells.begin();
223  it!= m_endcapCells.end();
224  ++it)
225  {
226  EEDetId ee (*it);
227  if (ee.zside()>0)
228  {
229  EEPRegion.Fill(ee.ix(),ee.iy(),m_xtalRegionId[ee.rawId()]);
230  EEPRing.Fill(ee.ix(),ee.iy(),m_xtalRing[ee.rawId()]);
231  EEPRingReg.Fill(ee.ix(),ee.iy(),m_RinginRegion[ee.rawId()]);
232  }
233  if (ee.zside()<0)
234  {
235  EEMRegion.Fill(ee.ix(),ee.iy(),m_xtalRegionId[ee.rawId()]);
236  EEMRing.Fill(ee.ix(),ee.iy(),m_xtalRing[ee.rawId()]);
237  EEMRingReg.Fill(ee.ix(),ee.iy(),m_RinginRegion[ee.rawId()]);
238  }
239  }
240 
241  // for (std::map<int,float>::iterator it=m_eta.begin();
242  // it!=m_eta.end();++it)
243  // eta.Fill(it->first,it->second);
244  TFile out ("EBZone.root", "recreate");
245  EBRegion.Write();
246  EBRing.Write();
247  EEPRegion.Write();
248  EEPRing.Write();
249  EEPRingReg.Write();
250  EEMRegion.Write();
251  EEMRing.Write();
252  // eta.Write();
253  EEMRingReg.Write();
254  out.Close();
255  edm::LogInfo ("IML") <<"[InvRingCalib] Start to acquire the coeffs";
256  CaloMiscalibMapEcal EBmap;
257  EBmap.prefillMap ();
258  MiscalibReaderFromXMLEcalBarrel barrelreader (EBmap);
259  if (!m_EBcoeffFile.empty()) barrelreader.parseXMLMiscalibFile (m_EBcoeffFile);
260  EcalIntercalibConstants costants (EBmap.get());
261  m_barrelMap = costants.getMap();
262  CaloMiscalibMapEcal EEmap ;
263  EEmap.prefillMap ();
264  MiscalibReaderFromXMLEcalEndcap endcapreader (EEmap);
265  if (!m_EEcoeffFile.empty()) endcapreader.parseXMLMiscalibFile (m_EEcoeffFile) ;
266  EcalIntercalibConstants EEcostants (EEmap.get());
267  m_endcapMap = EEcostants.getMap();
268 
269  isfirstcall_=false;
270  } // if isfirstcall
271 
272 
273 
274 
275 
276 
277  //gets the barrel recHits
278  double pSubtract = 0.;
279  double pTk = 0.;
280  const EcalRecHitCollection* barrelHitsCollection = 0;
281  edm::Handle<EBRecHitCollection> barrelRecHitsHandle ;
282  iEvent.getByLabel (m_barrelAlCa, barrelRecHitsHandle) ;
283  barrelHitsCollection = barrelRecHitsHandle.product () ;
284 
285  if (!barrelRecHitsHandle.isValid ()) {
286  edm::LogError ("IML") << "[EcalEleCalibLooper] barrel rec hits not found" ;
287  return kContinue ;
288  }
289  //gets the endcap recHits
290  const EcalRecHitCollection* endcapHitsCollection = 0;
291  edm::Handle<EERecHitCollection> endcapRecHitsHandle ;
292  iEvent.getByLabel (m_endcapAlCa, endcapRecHitsHandle) ;
293  endcapHitsCollection = endcapRecHitsHandle.product () ;
294 
295  if (!endcapRecHitsHandle.isValid ()) {
296  edm::LogError ("IML") << "[EcalEleCalibLooper] endcap rec hits not found" ;
297  return kContinue;
298  }
299 
300  //gets the electrons
302  iEvent.getByLabel(m_ElectronLabel,pElectrons);
303 
304  if (!pElectrons.isValid ()) {
305  edm::LogError ("IML")<< "[EcalEleCalibLooper] electrons not found" ;
306  return kContinue;
307  }
308 
309  //loops over the electrons in the event
310  for (reco::GsfElectronCollection::const_iterator eleIt = pElectrons->begin();
311  eleIt != pElectrons->end();
312  ++eleIt )
313  {
314  pSubtract =0;
315  pTk=eleIt->trackMomentumAtVtx().R();
316  std::map<int , double> xtlMap;
317  DetId Max=0;
318  if (fabs(eleIt->eta()<1.49))
319  Max = EcalClusterTools::getMaximum(eleIt->superCluster()->hitsAndFractions(),barrelHitsCollection).first;
320  else
321  Max = EcalClusterTools::getMaximum(eleIt->superCluster()->hitsAndFractions(),endcapHitsCollection).first;
322  if (Max.det()==0) continue;
323  m_MapFiller->fillMap(eleIt->superCluster ()->hitsAndFractions (),Max,
324  barrelHitsCollection,endcapHitsCollection, xtlMap,pSubtract);
325  if (m_xtalRegionId[Max.rawId()]==-1) continue;
326  pSubtract += eleIt->superCluster()->preshowerEnergy() ;
327  ++m_RingNumOfHits[m_xtalRing[Max.rawId()]];
328  //fills the calibBlock
330  xtlMap.begin(), xtlMap.end(),pTk,pSubtract
331  ) ;
332  }
333  return kContinue;
334 } //end of duringLoop
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.
edm::InputTag m_ElectronLabel
To take the electrons.
Definition: InvRingCalib.h:70
void EERingDef(const edm::EventSetup &)
Defines the rins in the endcap.
void EBRegionDef()
Defines the regions in the barrel.
const self & getMap() const
std::string m_EEcoeffFile
Definition: InvRingCalib.h:121
int m_recoWindowSidey
Definition: InvRingCalib.h:73
double m_minEnergyPerCrystal
minimum energy per crystal cut
Definition: InvRingCalib.h:75
EcalIntercalibConstantMap m_endcapMap
Definition: InvRingCalib.h:103
void EERegionDef()
Defines the regions in the endcap.
double m_maxEnergyPerCrystal
maximum energy per crystal cut
Definition: InvRingCalib.h:77
std::vector< VEcalCalibBlock * > m_IMACalibBlocks
single blocks calibrators
Definition: InvRingCalib.h:90
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
EcalIntercalibConstantMap m_barrelMap
Definition: InvRingCalib.h:102
std::map< int, int > m_RingNumOfHits
number of events already read per Ring
Definition: InvRingCalib.h:88
std::map< int, int > m_xtalRegionId
association map between raw detIds and Region
Definition: InvRingCalib.h:112
edm::InputTag m_endcapAlCa
EcalEndcap Input Collection name.
Definition: InvRingCalib.h:68
VFillMap * m_MapFiller
The class that fills the map!
Definition: InvRingCalib.h:62
const EcalIntercalibConstants & get()
std::vector< DetId > m_barrelCells
geometry things used all over the file
Definition: InvRingCalib.h:117
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::InputTag m_barrelAlCa
EcalBarrel Input Collection name.
Definition: InvRingCalib.h:66
bool first
Definition: L1TdeRCT.cc:79
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
tuple out
Definition: dbtoconf.py:99
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: Handle.h:81
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:90
ESHandle< TrackerGeometry > geometry
std::string m_EBcoeffFile
coeffs filenames
Definition: InvRingCalib.h:120
int m_recoWindowSidex
reconstruction window size
Definition: InvRingCalib.h:72
std::vector< DetId > m_endcapCells
Definition: InvRingCalib.h:118
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
std::map< int, int > m_RinginRegion
association map between raw detIds and the number of the ring inside the region
Definition: InvRingCalib.h:114
std::map< int, int > m_xtalRing
association map between Raw detIds and Rings
Definition: InvRingCalib.h:110
std::string m_mapFillerType
Definition: InvRingCalib.h:126
int InvRingCalib::EBRegId ( const int  ieta)
private

Gives back in which region you are:

gives the region Id given ieta

Definition at line 609 of file InvRingCalib.cc.

References m_etaEnd, and m_Reg.

Referenced by EBRegionDef().

610 {
611  if (ieta<m_etaStart || ieta>=m_etaEnd) return -1;
612  else return (m_Reg[ieta]);
613 }
std::map< int, int > m_Reg
EB regions vs. eta index.
Definition: InvRingCalib.h:125
int m_etaEnd
eta end of the zone of interest
Definition: InvRingCalib.h:81
void InvRingCalib::EBRegionDef ( )
private

Defines the regions in the barrel.

Definition at line 620 of file InvRingCalib.cc.

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

Referenced by duringLoop().

621 {
622  RegPrepare();
623  for (std::vector<DetId>::const_iterator it=m_barrelCells.begin();
624  it!=m_barrelCells.end();++it)
625  {
626  EBDetId eb (it->rawId());
627  m_xtalRing[eb.rawId()] = eb.ieta() ;
628  m_xtalRegionId[eb.rawId()] = EBRegId (eb.ieta());
629  if (m_xtalRegionId[eb.rawId()]==-1) continue;
630  m_RinginRegion[eb.rawId()] = (eb.ieta() - m_etaStart)% m_etaWidth;
631  }
632 }
int m_etaStart
eta start of the zone of interest
Definition: InvRingCalib.h:79
std::map< int, int > m_xtalRegionId
association map between raw detIds and Region
Definition: InvRingCalib.h:112
std::vector< DetId > m_barrelCells
geometry things used all over the file
Definition: InvRingCalib.h:117
void RegPrepare()
Prepares the EB regions;.
int m_etaWidth
eta size of the regions
Definition: InvRingCalib.h:83
std::map< int, int > m_RinginRegion
association map between raw detIds and the number of the ring inside the region
Definition: InvRingCalib.h:114
std::map< int, int > m_xtalRing
association map between Raw detIds and Rings
Definition: InvRingCalib.h:110
int EBRegId(const int)
Gives back in which region you are:
int InvRingCalib::EBRegionNum ( ) const
private

Number of regions in EB.

number of Ring in EB

Definition at line 586 of file InvRingCalib.cc.

References m_etaEnd, m_etaStart, and m_etaWidth.

Referenced by EERegionDef(), and InvRingCalib().

587 {
588  if ((m_etaEnd*m_etaStart)>0)
589  return ((m_etaEnd - m_etaStart )/m_etaWidth);
590 
591  if ((m_etaEnd*m_etaStart)<0)
592  return ((m_etaEnd - m_etaStart-1 )/m_etaWidth);
593 
594  return 0;
595 }
int m_etaStart
eta start of the zone of interest
Definition: InvRingCalib.h:79
int m_etaWidth
eta size of the regions
Definition: InvRingCalib.h:83
int m_etaEnd
eta end of the zone of interest
Definition: InvRingCalib.h:81
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 518 of file InvRingCalib.cc.

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

Referenced by EERegionDef().

519 {
520  int reg;
521  int ring;
522  EEDetId ee (id);
523  //sets the reg to -1 if the ring doesn't exist or is outside the region of interest
524  if (m_xtalRing[id] == -1) return -1;
525  //avoid the calibration in the wrong zside
526  if (m_EEZone == 1 ){
527  if (ee.zside()<0) return -1;
528  ring = m_xtalRing[id]-86;
529  if(ring >=m_endRing) return -1;
530  if (ring<m_startRing) return -1;
531  reg = (ring -m_startRing) / m_etaWidth;
532  m_RinginRegion[id]=(ring -m_startRing) % m_etaWidth;
533  return reg;
534  }
535  if (m_EEZone == -1){
536  if (ee.zside()>0) return -1;
537  ring = m_xtalRing[id] -125;
538  if(ring >=m_endRing) return -1;
539  if (ring<m_startRing) return -1;
540  reg = (ring -m_startRing) / m_etaWidth;
541  m_RinginRegion[id]=(ring -m_startRing) % m_etaWidth;
542  return reg;
543  }
544  if (ee.zside()>0) ring=m_xtalRing[id]-86;
545  else ring = m_xtalRing[id]-125;
546  if(ring >=m_endRing) return -1;
547  if (ring<m_startRing) return -1;
548  reg = (ring -m_startRing) / m_etaWidth;
549  m_RinginRegion[id]=(ring -m_startRing) % m_etaWidth;
550  return reg;
551 }
int m_EEZone
endcap zone to be calibrated
Definition: InvRingCalib.h:123
int m_startRing
LP define the EE region to calibrate.
Definition: InvRingCalib.h:107
int m_etaWidth
eta size of the regions
Definition: InvRingCalib.h:83
std::map< int, int > m_RinginRegion
association map between raw detIds and the number of the ring inside the region
Definition: InvRingCalib.h:114
std::map< int, int > m_xtalRing
association map between Raw detIds and Rings
Definition: InvRingCalib.h:110
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 555 of file InvRingCalib.cc.

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

Referenced by duringLoop().

556 {
557 int reg;
558 for (std::vector<DetId>::const_iterator endcapIt=m_endcapCells.begin();
559  endcapIt!=m_endcapCells.end();++endcapIt){
560  EEDetId ee(*endcapIt);
561  reg = EERegId(endcapIt->rawId());
562  //If the ring is not of interest saves only the region Id(-1)
563  if(reg==-1)
564  m_xtalRegionId[endcapIt->rawId()]=reg;
565  //sums the number of region in EB or EB+EE to have different regionsId in different regions
566  else {
567  if (ee.zside()>0)reg += EBRegionNum();
568  else reg += EBRegionNum()+EERegionNum();
569  m_xtalRegionId[endcapIt->rawId()]=reg;
570  }
571  }
572 }
int EBRegionNum() const
Number of regions in EB.
int EERegId(int)
gives back in which region of the endcap you are.
std::map< int, int > m_xtalRegionId
association map between raw detIds and Region
Definition: InvRingCalib.h:112
std::vector< DetId > m_endcapCells
Definition: InvRingCalib.h:118
int EERegionNum() const
The number of regions in EE.
int InvRingCalib::EERegionNum ( ) const
inlineprivate

The number of regions in EE.

Number of Regions in EE.

Definition at line 579 of file InvRingCalib.cc.

References m_endRing, m_etaWidth, and m_startRing.

Referenced by EERegionDef(), and InvRingCalib().

580 {
581  return ((m_endRing - m_startRing)/m_etaWidth);
582 }
int m_startRing
LP define the EE region to calibrate.
Definition: InvRingCalib.h:107
int m_etaWidth
eta size of the regions
Definition: InvRingCalib.h:83
void InvRingCalib::EERingDef ( const edm::EventSetup iSetup)
private

Defines the rins in the endcap.

EE ring definition.

Definition at line 455 of file InvRingCalib.cc.

References DetId::Ecal, EcalEndcap, geometry, edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), CaloCellGeometry::getPosition(), CaloGeometry::getSubdetectorGeometry(), m_cellPhi, m_cellPos, m_endcapCells, m_xtalRing, PV3DBase< T, PVType, FrameType >::phi(), DetId::rawId(), relativeConstraints::ring, EEDetId::validDetId(), EEDetId::XYMODE, and EEDetId::zside().

Referenced by duringLoop().

456 {
457  //Gets the Handle for the geometry from the eventSetup
458  edm::ESHandle<CaloGeometry> geoHandle;
459  iSetup.get<CaloGeometryRecord>().get(geoHandle);
460  //Gets the geometry of the endcap
461  const CaloGeometry& geometry = *geoHandle;
462  const CaloSubdetectorGeometry *endcapGeometry = geometry.getSubdetectorGeometry(DetId::Ecal, EcalEndcap);
463 // const CaloSubdetectorGeometry *barrelGeometry = geometry.getSubdetectorGeometry(DetId::Ecal, EcalBarrel);
464  //for every xtal gets the position Vector and the phi position
465 
466 // for (std::vector<DetId>::const_iterator barrelIt = m_barrelCells.begin();
467 // barrelIt!=m_barrelCells.end();
468 // ++barrelIt) {
469 // const CaloCellGeometry *cellGeometry = barrelGeometry->getGeometry(*barrelIt);
470 // GlobalPoint point;
471 // EBDetId eb (*barrelIt);
472 // point=cellGeometry->getPosition();
473 // m_eta[eb.ieta()]=point.eta() ; //cellGeometry->getPosition().eta();
474 // }
475  for (std::vector<DetId>::const_iterator endcapIt = m_endcapCells.begin();
476  endcapIt!=m_endcapCells.end();
477  ++endcapIt) {
478  const CaloCellGeometry *cellGeometry = endcapGeometry->getGeometry(*endcapIt);
479  m_cellPos[endcapIt->rawId()] = cellGeometry->getPosition();
480  m_cellPhi[endcapIt->rawId()] = cellGeometry->getPosition().phi();
481  }
482  //takes the first 39 xtals at a fixed y varying the x coordinate and saves their eta coordinate
483  float eta_ring[39];
484  for (int ring=0; ring<39; ring++)
485  if (EEDetId::validDetId(ring,50,1)){
486  EEDetId det = EEDetId (ring,50,1,EEDetId::XYMODE);
487  eta_ring[ring]=m_cellPos[det.rawId()].eta();
488  }
489  //defines the bonduary of the rings as the average eta of a xtal
490  double etaBonduary[40];
491  etaBonduary[0]=1.49;
492  etaBonduary[39]=4.0;
493  for (int ring=1; ring<39; ++ring)
494  etaBonduary[ring]=(eta_ring[ring]+eta_ring[ring-1])/2.;
495  //assign to each xtal a ring number
496  int CRing;
497  for (int ring=0; ring<39; ring++)
498  for (std::vector<DetId>::const_iterator endcapIt=m_endcapCells.begin();
499  endcapIt!=m_endcapCells.end();++endcapIt){
500  if (fabs(m_cellPos[endcapIt->rawId()].eta())>etaBonduary[ring] &&
501  fabs(m_cellPos[endcapIt->rawId()].eta())<etaBonduary[ring+1])
502  {
503  EEDetId ee(*endcapIt);
504  if (ee.zside()>0) CRing=ring + 86;
505  else CRing = ring + 125;
506  m_xtalRing[endcapIt->rawId()]=CRing;
507 // m_eta[CRing]=m_cellPos[endcapIt->rawId()].eta();
508  }
509  }
510  return;
511 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:43
std::map< int, int > m_cellPhi
Definition: InvRingCalib.h:99
static const int XYMODE
Definition: EEDetId.h:339
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
std::map< int, GlobalPoint > m_cellPos
position of the cell, borders, coords etc...
Definition: InvRingCalib.h:98
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
const T & get() const
Definition: EventSetup.h:55
ESHandle< TrackerGeometry > geometry
std::vector< DetId > m_endcapCells
Definition: InvRingCalib.h:118
std::map< int, int > m_xtalRing
association map between Raw detIds and Rings
Definition: InvRingCalib.h:110
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
void InvRingCalib::endOfJob ( )
virtual

Reimplemented from edm::EDLooperBase.

Definition at line 426 of file InvRingCalib.cc.

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

427 {
428 
429  edm::LogInfo ("IML") << "[InvMatrixCalibLooper][endOfJob] saving calib coeffs" ;
430  calibXMLwriter barrelWriter(EcalBarrel);
431  calibXMLwriter endcapWriter(EcalEndcap);
432  for (std::vector<DetId>::const_iterator barrelIt =m_barrelCells.begin();
433  barrelIt!=m_barrelCells.end();
434  ++barrelIt) {
435  EBDetId eb (*barrelIt);
436  barrelWriter.writeLine(eb,m_barrelMap[eb]);
437  }
438  for (std::vector<DetId>::const_iterator endcapIt = m_endcapCells.begin();
439  endcapIt!=m_endcapCells.end();
440  ++endcapIt) {
441  EEDetId ee (*endcapIt);
442  endcapWriter.writeLine(ee,m_endcapMap[ee]);
443  }
444 }
EcalIntercalibConstantMap m_endcapMap
Definition: InvRingCalib.h:103
EcalIntercalibConstantMap m_barrelMap
Definition: InvRingCalib.h:102
std::vector< DetId > m_barrelCells
geometry things used all over the file
Definition: InvRingCalib.h:117
std::vector< DetId > m_endcapCells
Definition: InvRingCalib.h:118
edm::EDLooper::Status InvRingCalib::endOfLoop ( const edm::EventSetup ,
unsigned int  iCounter 
)
virtual

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 342 of file InvRingCalib.cc.

References lut2db_cfg::filename, 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 dbtoconf::out.

344 {
345  std::map<int,double> InterRings;
346  edm::LogInfo ("IML") << "[InvMatrixCalibLooper][endOfLoop] Start to invert the matrixes" ;
347  //call the autoexplaining "solve" method for every calibBlock
348  for (std::vector<VEcalCalibBlock *>::iterator calibBlock=m_IMACalibBlocks.begin();
349  calibBlock!=m_IMACalibBlocks.end();
350  ++calibBlock)
351  (*calibBlock)->solve(m_usingBlockSolver,m_minCoeff,m_maxCoeff);
352 
353  edm::LogInfo("IML") << "[InvRingLooper][endOfLoop] Starting to write the coeffs";
354  TH1F *coeffDistr = new TH1F("coeffdistr","coeffdistr",100 ,0.7,1.4);
355  TH1F *coeffMap = new TH1F("coeffRingMap","coeffRingMap",250,-85,165);
356  TH1F *ringDistr = new TH1F("ringDistr","ringDistr",250,-85,165);
357  TH1F *RingFill = new TH1F("RingFill","RingFill",250,-85,165);
358  for(std::map<int,int>::const_iterator it=m_xtalRing.begin();
359  it!=m_xtalRing.end();
360  ++it)
361  ringDistr->Fill(it->second+0.1);
362 
363  int ID;
364  std::map<int,int> flag;
365  for(std::map<int,int>::const_iterator it=m_xtalRing.begin();
366  it!=m_xtalRing.end();
367  ++it)
368  flag[it->second]=0;
369 
370  for (std::vector<DetId>::const_iterator it=m_barrelCells.begin();
371  it!=m_barrelCells.end();
372  ++it)
373  {
374  ID= it->rawId();
375  if (m_xtalRegionId[ID]==-1) continue;
376  if (flag[m_xtalRing[ID]]) continue;
377  flag[m_xtalRing[ID]] =1;
378  RingFill->Fill(m_xtalRing[ID],m_RingNumOfHits[m_xtalRing[ID]]);
379  InterRings[m_xtalRing[ID]] = m_IMACalibBlocks.at(m_xtalRegionId[ID])->at(m_RinginRegion[ID]);
380  coeffMap->Fill (m_xtalRing[ID]+0.1,InterRings[m_xtalRing[ID]]);
381  coeffDistr->Fill(InterRings[m_xtalRing[ID]]);
382  }
383 
384  for (std::vector<DetId>::const_iterator it=m_endcapCells.begin();
385  it!=m_endcapCells.end();
386  ++it)
387  {
388  ID= it->rawId();
389  if (m_xtalRegionId[ID]==-1) continue;
390  if (flag[m_xtalRing[ID]]) continue;
391  flag[m_xtalRing[ID]]= 1;
392  InterRings[m_xtalRing[ID]] = m_IMACalibBlocks.at(m_xtalRegionId[ID])->at(m_RinginRegion[ID]);
393  RingFill->Fill(m_xtalRing[ID],m_RingNumOfHits[m_xtalRing[ID]]);
394  coeffMap->Fill (m_xtalRing[ID],InterRings[m_xtalRing[ID]]);
395  coeffDistr->Fill(InterRings[m_xtalRing[ID]]);
396 
397  }
398 
399  char filename[80];
400  sprintf(filename,"coeff%d.root",iCounter);
401  TFile out(filename,"recreate");
402  coeffDistr->Write();
403  coeffMap->Write();
404  ringDistr->Write();
405  RingFill->Write();
406  out.Close();
407  for (std::vector<DetId>::const_iterator it=m_barrelCells.begin();
408  it!=m_barrelCells.end();
409  ++it){
410  m_barrelMap[*it]*=InterRings[m_xtalRing[it->rawId()]];
411  }
412  for (std::vector<DetId>::const_iterator it=m_endcapCells.begin();
413  it!=m_endcapCells.end();
414  ++it)
415  m_endcapMap[*it]*=InterRings[m_xtalRing[it->rawId()]];
416  if (iCounter < m_loops-1 ) return kContinue ;
417  else return kStop;
418 }
double m_maxCoeff
maximum coefficient accepted (RAW)
Definition: InvRingCalib.h:94
uint32_t ID
Definition: Definitions.h:26
EcalIntercalibConstantMap m_endcapMap
Definition: InvRingCalib.h:103
std::vector< VEcalCalibBlock * > m_IMACalibBlocks
single blocks calibrators
Definition: InvRingCalib.h:90
EcalIntercalibConstantMap m_barrelMap
Definition: InvRingCalib.h:102
std::map< int, int > m_RingNumOfHits
number of events already read per Ring
Definition: InvRingCalib.h:88
std::map< int, int > m_xtalRegionId
association map between raw detIds and Region
Definition: InvRingCalib.h:112
std::vector< DetId > m_barrelCells
geometry things used all over the file
Definition: InvRingCalib.h:117
unsigned int m_loops
LP sets the number of loops to do.
Definition: InvRingCalib.h:105
int m_usingBlockSolver
to exclude the blocksolver
Definition: InvRingCalib.h:96
tuple out
Definition: dbtoconf.py:99
std::map< int, CalibCoeff > coeffMap
double m_minCoeff
minimum coefficient accepted (RAW)
Definition: InvRingCalib.h:92
tuple filename
Definition: lut2db_cfg.py:20
std::vector< DetId > m_endcapCells
Definition: InvRingCalib.h:118
std::map< int, int > m_RinginRegion
association map between raw detIds and the number of the ring inside the region
Definition: InvRingCalib.h:114
std::map< int, int > m_xtalRing
association map between Raw detIds and Rings
Definition: InvRingCalib.h:110
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 598 of file InvRingCalib.cc.

References i, gen::k, m_etaEnd, m_etaStart, m_etaWidth, and m_Reg.

Referenced by EBRegionDef().

599 {
600  int k=0;
601  for (int i = m_etaStart;i<m_etaEnd;++i)
602  {
603  if (i==0) continue;
604  m_Reg[i]=k/m_etaWidth;
605  ++k;
606  }
607 }
int i
Definition: DBlmapReader.cc:9
std::map< int, int > m_Reg
EB regions vs. eta index.
Definition: InvRingCalib.h:125
int m_etaStart
eta start of the zone of interest
Definition: InvRingCalib.h:79
int m_etaWidth
eta size of the regions
Definition: InvRingCalib.h:83
int k[5][pyjets_maxn]
int m_etaEnd
eta end of the zone of interest
Definition: InvRingCalib.h:81
void InvRingCalib::startingNewLoop ( unsigned int  ciclo)
virtual

startingNewLoop

Implements edm::EDLooperBase.

Definition at line 142 of file InvRingCalib.cc.

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

143 {
144  edm::LogInfo ("IML") << "[InvMatrixCalibLooper][Start] entering loop " << ciclo;
145  for (std::vector<VEcalCalibBlock *>::iterator calibBlock = m_IMACalibBlocks.begin () ;
146  calibBlock != m_IMACalibBlocks.end () ;
147  ++calibBlock)
148  {
149  //LP empties the energies vector, to fill DuringLoop.
150  (*calibBlock)->reset () ;
151  }
152  for (std::map<int,int>::const_iterator ring=m_xtalRing.begin();
153  ring!=m_xtalRing.end();
154  ++ring)
155  m_RingNumOfHits[ring->second]=0;
156  return ;
157 }
std::vector< VEcalCalibBlock * > m_IMACalibBlocks
single blocks calibrators
Definition: InvRingCalib.h:90
std::map< int, int > m_RingNumOfHits
number of events already read per Ring
Definition: InvRingCalib.h:88
std::map< int, int > m_xtalRing
association map between Raw detIds and Rings
Definition: InvRingCalib.h:110

Member Data Documentation

bool InvRingCalib::isfirstcall_
private

Definition at line 127 of file InvRingCalib.h.

Referenced by beginOfJob(), and duringLoop().

edm::InputTag InvRingCalib::m_barrelAlCa
private

EcalBarrel Input Collection name.

Definition at line 66 of file InvRingCalib.h.

Referenced by duringLoop().

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

geometry things used all over the file

Definition at line 117 of file InvRingCalib.h.

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

EcalIntercalibConstantMap InvRingCalib::m_barrelMap
private

association map between coeff and ring coeffs for the single xtals

Definition at line 102 of file InvRingCalib.h.

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

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

Definition at line 99 of file InvRingCalib.h.

Referenced by EERingDef().

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

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

Definition at line 98 of file InvRingCalib.h.

Referenced by EERingDef().

std::string InvRingCalib::m_EBcoeffFile
private

coeffs filenames

Definition at line 120 of file InvRingCalib.h.

Referenced by duringLoop().

std::string InvRingCalib::m_EEcoeffFile
private

Definition at line 121 of file InvRingCalib.h.

Referenced by duringLoop().

int InvRingCalib::m_EEZone
private

endcap zone to be calibrated

Definition at line 123 of file InvRingCalib.h.

Referenced by EERegId(), and InvRingCalib().

edm::InputTag InvRingCalib::m_ElectronLabel
private

To take the electrons.

Definition at line 70 of file InvRingCalib.h.

Referenced by duringLoop().

edm::InputTag InvRingCalib::m_endcapAlCa
private

EcalEndcap Input Collection name.

Definition at line 68 of file InvRingCalib.h.

Referenced by duringLoop().

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

Definition at line 118 of file InvRingCalib.h.

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

EcalIntercalibConstantMap InvRingCalib::m_endcapMap
private

Definition at line 103 of file InvRingCalib.h.

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

int InvRingCalib::m_endRing
private

Definition at line 108 of file InvRingCalib.h.

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

int InvRingCalib::m_etaEnd
private

eta end of the zone of interest

Definition at line 81 of file InvRingCalib.h.

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

int InvRingCalib::m_etaStart
private

eta start of the zone of interest

Definition at line 79 of file InvRingCalib.h.

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

int InvRingCalib::m_etaWidth
private

eta size of the regions

Definition at line 83 of file InvRingCalib.h.

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

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

single blocks calibrators

Definition at line 90 of file InvRingCalib.h.

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

unsigned int InvRingCalib::m_loops
private

LP sets the number of loops to do.

Definition at line 105 of file InvRingCalib.h.

Referenced by endOfLoop(), and InvRingCalib().

VFillMap* InvRingCalib::m_MapFiller
private

The class that fills the map!

Definition at line 62 of file InvRingCalib.h.

Referenced by duringLoop().

std::string InvRingCalib::m_mapFillerType
private

Definition at line 126 of file InvRingCalib.h.

Referenced by duringLoop(), and InvRingCalib().

double InvRingCalib::m_maxCoeff
private

maximum coefficient accepted (RAW)

Definition at line 94 of file InvRingCalib.h.

Referenced by endOfLoop().

double InvRingCalib::m_maxEnergyPerCrystal
private

maximum energy per crystal cut

Definition at line 77 of file InvRingCalib.h.

Referenced by duringLoop().

int InvRingCalib::m_maxSelectedNumPerRing
private

maximum number of events per Ring

Definition at line 86 of file InvRingCalib.h.

double InvRingCalib::m_minCoeff
private

minimum coefficient accepted (RAW)

Definition at line 92 of file InvRingCalib.h.

Referenced by endOfLoop().

double InvRingCalib::m_minEnergyPerCrystal
private

minimum energy per crystal cut

Definition at line 75 of file InvRingCalib.h.

Referenced by duringLoop().

int InvRingCalib::m_recoWindowSidex
private

reconstruction window size

Definition at line 72 of file InvRingCalib.h.

Referenced by duringLoop().

int InvRingCalib::m_recoWindowSidey
private

Definition at line 73 of file InvRingCalib.h.

Referenced by duringLoop().

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

EB regions vs. eta index.

Definition at line 125 of file InvRingCalib.h.

Referenced by EBRegId(), and RegPrepare().

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 114 of file InvRingCalib.h.

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

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

number of events already read per Ring

Definition at line 88 of file InvRingCalib.h.

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

int InvRingCalib::m_startRing
private

LP define the EE region to calibrate.

Definition at line 107 of file InvRingCalib.h.

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

int InvRingCalib::m_usingBlockSolver
private

to exclude the blocksolver

Definition at line 96 of file InvRingCalib.h.

Referenced by endOfLoop().

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

association map between raw detIds and Region

Definition at line 112 of file InvRingCalib.h.

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

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

association map between Raw detIds and Rings

Definition at line 110 of file InvRingCalib.h.

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