#include <Validation/EcalDigis/interface/EcalSelectiveReadoutValidation.h>
Public Member Functions | |
EcalSelectiveReadoutValidation (const edm::ParameterSet &ps) | |
Constructor. | |
~EcalSelectiveReadoutValidation () | |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyzes the event. | |
void | beginJob (const edm::EventSetup &c) |
Calls at job start. | |
void | endJob (void) |
Calls at job end. | |
Private Types | |
enum | subdet_t { EB, EE } |
distinguishes barral and endcap of ECAL. More... | |
Private Member Functions | |
template<class T, class U> | |
void | anaDigi (const T &frame, const U &srFlagColl) |
Accumulates statitics for data volume analysis. | |
void | anaDigiInit () |
Initializes statistics accumalator for data volume analysis. | |
void | analyzeDataVolume (const edm::Event &e, const edm::EventSetup &es) |
Data volume analysis. | |
void | analyzeEB (const edm::Event &event, const edm::EventSetup &es) |
ECAL barrel data analysis. | |
void | analyzeEE (const edm::Event &event, const edm::EventSetup &es) |
ECAL endcap data analysis. | |
void | analyzeTP (const edm::Event &event, const edm::EventSetup &es) |
Trigger primitive analysis. | |
int | cIndex2iEta (int i) const |
converse of iEta2cIndex() method. | |
int | cIndex2iPhi (int i) const |
converse of iPhi2cIndex() method. | |
int | cIndex2iXY (int iX0) const |
converse of iXY2cIndex() method. | |
unsigned | dccNum (const DetId &xtalId) const |
Retrieve the logical number of the DCC reading a given crystal channel. | |
double | frame2Energy (const EcalDataFrame &frame) const |
Energy reconstruction from ADC samples. | |
template<class T> | |
double | frame2EnergyForTp (const T &frame, int offset=0) const |
Energy reconstruction from ADC samples to be used for trigger primitive estimate. | |
double | getBytesPerCrystal () const |
Gets the number of bytes per crystal channel of the event part depending on the number of read crystal channels. | |
double | getDccEventSize (int iDcc0, double nReadXtals) const |
Gets the size of an DCC event fragment. | |
double | getDccOverhead (subdet_t subdet) const |
Gets the size in bytes fixed-size part of a DCC event fragment. | |
double | getEbEventSize (double nReadXtals) const |
Computes the size of an ECAL barrel event fragment. | |
double | getEeEventSize (double nReadXtals) const |
Computes the size of an ECAL endcap event fragment. | |
int | getRuCount (int iDcc0) const |
Gets the number of readout unit read by a DCC. | |
int | iEta2cIndex (int iEta) const |
Converts a std CMSSW crystal eta index to a c-array index (starting from zero and without hole). | |
int | iPhi2cIndex (int iPhi) const |
Converts a std CMSSW crystal phi index to a c-array index (starting from zero and without hole). | |
int | iTTEta2cIndex (int iEta) const |
Transforms CMSSW eta ECAL TT indices to indices starting at 0 to use for c-array or vector. | |
int | iTTPhi2cIndex (int iPhi) const |
Transforms CMSSW phi ECAL crystal indices to indices starting at 0 to use for c-array or vector. | |
int | iXY2cIndex (int iX) const |
Converts a std CMSSW crystal x or y index to a c-array index (starting from zero and without hole). | |
void | printAvailableHists () |
Prints the list of available histograms (registered by the registerHist method), including disabled one. | |
void | readAllCollections (const edm::Event &e) |
Reads the data collections from the event. | |
bool | registerHist (const std::string &name, const std::string &title) |
Register a histogram in the available histogram list and check if the histogram is enabled. | |
void | setTtEtSums (const edm::EventSetup &es, const EBDigiCollection &ebDigis, const EEDigiCollection &eeDigis) |
Computes trigger primitive estimates. | |
EcalScDetId | superCrystalOf (const EEDetId &xtalId) const |
Retrieves the endcap supercrystal containing a given crysal. | |
MonitorElement * | book1D (const std::string &name, const std::string &title, int nbins, double xmin, double xmax) |
Wrappers to the book methods of the DQMStore DQM histogramming interface. | |
MonitorElement * | book2D (const std::string &name, const std::string &title, int nxbins, double xmin, double xmax, int nybins, double ymin, double ymax) |
MonitorElement * | bookProfile (const std::string &name, const std::string &title, int nbins, double xmin, double xmax) |
MonitorElement * | bookProfile2D (const std::string &name, const std::string &title, int nbinx, double xmin, double xmax, int nbiny, double ymin, double ymax, const char *option="") |
void | fill (MonitorElement *me, float x, float y, float z, float w) |
void | fill (MonitorElement *me, float x, float y, float zw) |
void | fill (MonitorElement *me, float x, float yw) |
void | fill (MonitorElement *me, float x) |
Wrapper to fill methods of DQM monitor elements. | |
EcalScDetId | readOutUnitOf (const EEDetId &xtalId) const |
EcalTrigTowerDetId | readOutUnitOf (const EBDetId &xtalId) const |
Retrives the readout unit, a trigger tower in the barrel case, and a supercrystal in the endcap case, a given crystal belongs to. | |
Private Attributes | |
bool | allHists_ |
When true, every histogram is enabled. | |
std::map< std::string, std::string > | availableHistList_ |
List of available histograms. | |
bool | collNotFoundWarn_ |
Switch for collection-not-found warning. | |
DQMStore * | dbe_ |
Histogramming interface. | |
energiesEb_t | ebEnergies [nEbEta][nEbPhi] |
Energy deposited in ECAL barrel crystals. | |
energiesEe_t | eeEnergies [nEndcaps][nEeX][nEeY] |
Energy deposited in ECAL endcap crystals. | |
const EcalElectronicsMapping * | elecMap_ |
Ecal electronics/geometrical mapping. | |
std::string | histDir_ |
Histogram directory PATH in DQM or within the output ROOT file. | |
std::set< std::string > | histList_ |
List of enabled histograms. | |
int | ievt_ |
Event sequence number. | |
bool | localReco_ |
Local reconstruction switch: true to reconstruct locally the amplitude insted of using the Rec Hits. | |
int | nEb_ |
ECAL barrel read channel count. | |
int | nEbHI_ |
ECAL barrel high interest read channel count. | |
int | nEbLI_ |
ECAL barrel low interest read channel count. | |
int | nEe_ |
ECAL endcap read channel count. | |
int | nEeHI_ |
ECAL endcap high interest read channel count. | |
int | nEeLI_ |
ECAL endcap low interest read channel count. | |
int | nPerDcc_ [nDccs] |
ECAL read channel count for each DCC:. | |
int | nRuPerDcc_ [nDccs] |
Count for each DCC of RUs with at leat one channel read out:. | |
std::string | outputFile_ |
Output file for histograms. | |
bool | tpInGeV_ |
Switch for uncompressing TP value. | |
const EcalTPParameters * | tpParam_ |
Interface to access trigger primitive parameters, especially to convert Et in compressed formart into natural unit. | |
const EcalTrigTowerConstituentsMap * | triggerTowerMap_ |
ECAL trigger tower mapping. | |
double | ttEtSums [nTtEta][nTtPhi] |
Trigger tower Et computed as sum the crystal Et. | |
bool | verbose_ |
Verbosity switch. | |
std::vector< double > | weights_ |
Weights for amplitude local reconstruction. | |
CollHandle< EBDigiCollection > | ebDigis_ |
The event product collections. | |
CollHandle< EBDigiCollection > | ebNoZsDigis_ |
CollHandle< EcalRecHitCollection > | ebRecHits_ |
CollHandle< std::vector < PCaloHit > > | ebSimHits_ |
CollHandle< EBSrFlagCollection > | ebSrFlags_ |
CollHandle< EEDigiCollection > | eeDigis_ |
CollHandle< EEDigiCollection > | eeNoZsDigis_ |
CollHandle< EcalRecHitCollection > | eeRecHits_ |
CollHandle< std::vector < PCaloHit > > | eeSimHits_ |
CollHandle< EESrFlagCollection > | eeSrFlags_ |
CollHandle< FEDRawDataCollection > | fedRaw_ |
CollHandle < EcalTrigPrimDigiCollection > | tps_ |
bool | ebRuActive_ [nEbEta/ebTtEdge][nEbPhi/ebTtEdge] |
For book keeping of RU actually read out (not fully zero suppressed). | |
bool | eeRuActive_ [nEndcaps][nEeX/scEdge][nEeY/scEdge] |
MonitorElement * | meChOcc_ |
MonitorElement * | meDccVol_ |
The histograms. | |
MonitorElement * | meDccVolFromData_ |
MonitorElement * | meEbEMean_ |
MonitorElement * | meEbNoise_ |
MonitorElement * | meEbNoZsRecVsSimE_ |
MonitorElement * | meEbRecE_ |
MonitorElement * | meEbRecEHitXtal_ |
MonitorElement * | meEbRecVsSimE_ |
MonitorElement * | meEbSimE_ |
MonitorElement * | meEeEMean_ |
MonitorElement * | meEeNoise_ |
MonitorElement * | meEeNoZsRecVsSimE_ |
MonitorElement * | meEeRecE_ |
MonitorElement * | meEeRecEHitXtal_ |
MonitorElement * | meEeRecVsSimE_ |
MonitorElement * | meEeSimE_ |
MonitorElement * | meForcedTt_ |
MonitorElement * | meFullRoTt_ |
MonitorElement * | meHiTtf_ |
MonitorElement * | meLiTtf_ |
MonitorElement * | meTp_ |
MonitorElement * | meTpMap_ |
MonitorElement * | meTpVsEtSum_ |
MonitorElement * | meTtf_ |
MonitorElement * | meTtfVsEtSum_ |
MonitorElement * | meTtfVsTp_ |
MonitorElement * | meVol_ |
MonitorElement * | meVolB_ |
MonitorElement * | meVolBHI_ |
MonitorElement * | meVolBLI_ |
MonitorElement * | meVolE_ |
MonitorElement * | meVolEHI_ |
MonitorElement * | meVolELI_ |
MonitorElement * | meVolHI_ |
MonitorElement * | meVolLI_ |
MonitorElement * | meZs1Tt_ |
Static Private Attributes | |
static const int | ebTtEdge = 5 |
Number of crystals along an EB TT. | |
static const int | kByte_ = 1024 |
number of bytes in 1 kByte: | |
static const unsigned | nDccs = 54 |
Total number of DCCs. | |
static const int | nEbDccs = 36 |
number of DCCs for EB | |
static const int | nEbEta = 170 |
number of crystals along Eta in EB | |
static const int | nEbPhi = 360 |
number of crystals along Phi in EB | |
static const int | nEbRus = 36*68 |
number of RUs for EB | |
static const int | nEeDccs = 18 |
number of DCCs for EE | |
static const int | nEeRus = 2*(34+32+33+33+32+34+33+34+33) |
number of RUs for EE | |
static const int | nEeX = 100 |
EE crystal grid size along X. | |
static const int | nEeY = 100 |
EE crystal grid size along Y. | |
static const int | nEndcaps = 2 |
number of endcaps | |
static const int | nTtEta = 56 |
Number of Trigger Towers along Eta. | |
static const int | nTtPhi = 72 |
Number of Trigger Towers along Phi. | |
static const double | rad2deg = 45./atan(1.) |
Conversion factor from radian to degree. | |
static const int | scEdge = 5 |
Number of crystals along a supercrystal edge. | |
Classes | |
struct | energiesEb_t |
Used to store barrel crystal channel information. More... | |
struct | energiesEe_t |
Used to store endcap crystal channel information. More... | |
class | Sorter |
Used to sort crystal by decrasing simulated energy. More... |
Definition at line 47 of file EcalSelectiveReadoutValidation.h.
enum EcalSelectiveReadoutValidation::subdet_t [private] |
distinguishes barral and endcap of ECAL.
Definition at line 70 of file EcalSelectiveReadoutValidation.h.
EcalSelectiveReadoutValidation::EcalSelectiveReadoutValidation | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 47 of file EcalSelectiveReadoutValidation.cc.
References allHists_, availableHistList_, book1D(), book2D(), bookProfile(), bookProfile2D(), dbe_, edm::ParameterSet::getUntrackedParameter(), histDir_, histList_, it, meChOcc_, meDccVol_, meDccVolFromData_, meEbEMean_, meEbNoise_, meEbNoZsRecVsSimE_, meEbRecE_, meEbRecEHitXtal_, meEbRecVsSimE_, meEbSimE_, meEeEMean_, meEeNoise_, meEeNoZsRecVsSimE_, meEeRecE_, meEeRecEHitXtal_, meEeRecVsSimE_, meEeSimE_, meForcedTt_, meFullRoTt_, meHiTtf_, meLiTtf_, meTp_, meTpMap_, meTpVsEtSum_, meTtf_, meTtfVsEtSum_, meTtfVsTp_, meVol_, meVolB_, meVolBHI_, meVolBLI_, meVolE_, meVolEHI_, meVolELI_, meVolHI_, meVolLI_, meZs1Tt_, nDccs, outputFile_, printAvailableHists(), s, indexGen::title, tpInGeV_, and verbose_.
00048 : 00049 collNotFoundWarn_(ps.getUntrackedParameter<bool>("warnIfCollectionNotFound", true)), 00050 ebDigis_(ps.getParameter<edm::InputTag>("EbDigiCollection"), false, 00051 collNotFoundWarn_), 00052 eeDigis_(ps.getParameter<edm::InputTag>("EeDigiCollection"), false, 00053 collNotFoundWarn_), 00054 ebNoZsDigis_(ps.getParameter<edm::InputTag>("EbUnsuppressedDigiCollection"), 00055 false, collNotFoundWarn_), 00056 eeNoZsDigis_(ps.getParameter<edm::InputTag>("EeUnsuppressedDigiCollection"), 00057 false, collNotFoundWarn_), 00058 ebSrFlags_(ps.getParameter<edm::InputTag>("EbSrFlagCollection"), false, 00059 collNotFoundWarn_), 00060 eeSrFlags_(ps.getParameter<edm::InputTag>("EeSrFlagCollection"), false, 00061 collNotFoundWarn_), 00062 ebSimHits_(ps.getParameter<edm::InputTag>("EbSimHitCollection"), false, 00063 collNotFoundWarn_), 00064 eeSimHits_(ps.getParameter<edm::InputTag>("EeSimHitCollection"), false, 00065 collNotFoundWarn_), 00066 tps_(ps.getParameter<edm::InputTag>("TrigPrimCollection"), false, 00067 collNotFoundWarn_), 00068 ebRecHits_(ps.getParameter<edm::InputTag>("EbRecHitCollection"), false, 00069 collNotFoundWarn_), 00070 eeRecHits_(ps.getParameter<edm::InputTag>("EeRecHitCollection"), false, 00071 collNotFoundWarn_), 00072 fedRaw_(ps.getParameter<edm::InputTag>("FEDRawCollection"), false, 00073 collNotFoundWarn_), 00074 triggerTowerMap_(0), 00075 localReco_(ps.getParameter<bool>("LocalReco")), 00076 weights_(ps.getParameter<vector<double> >("weights")), 00077 tpInGeV_(ps.getParameter<bool>("tpInGeV")), 00078 ievt_(0), 00079 allHists_(false), 00080 histDir_(ps.getParameter<string>("histDir")){ 00081 00082 // DQM ROOT output 00083 outputFile_ = ps.getUntrackedParameter<string>("outputFile", ""); 00084 00085 if(outputFile_.size() != 0){ 00086 LogInfo("OutputInfo") << " Ecal Digi Task histograms will be saved to '" 00087 << outputFile_.c_str() << "'"; 00088 } else{ 00089 LogInfo("OutputInfo") << " Ecal Digi Task histograms will NOT be saved"; 00090 } 00091 00092 // verbosity switch 00093 verbose_ = ps.getUntrackedParameter<bool>("verbose", false); 00094 00095 // get hold of back-end interface 00096 dbe_ = Service<DQMStore>().operator->(); 00097 00098 if(verbose_){ 00099 dbe_->setVerbose(1); 00100 } else{ 00101 dbe_->setVerbose(0); 00102 } 00103 00104 if(verbose_) dbe_->showDirStructure(); 00105 00106 dbe_->setCurrentFolder(histDir_); 00107 00108 vector<string> 00109 hists(ps.getUntrackedParameter<vector<string> >("histograms", 00110 vector<string>(1, "all"))); 00111 00112 for(vector<string>::iterator it = hists.begin(); 00113 it!=hists.end(); ++it) histList_.insert(*it); 00114 if(histList_.find("all") != histList_.end()) allHists_ = true; 00115 00116 //Data volume 00117 meDccVol_ = bookProfile("EcalDccEventSizeComputed", 00118 "ECAL DCC event fragment size;Dcc id; " 00119 "<Event size> (kB)", nDccs, .5, .5+nDccs); 00120 00121 meDccVolFromData_ = bookProfile("EcalDccEventSize", 00122 "ECAL DCC event fragment size;Dcc id; " 00123 "<Event size> (kB)", nDccs, .5, .5+nDccs); 00124 00125 meVolBLI_ = book1D("EBLowInterestPayload", 00126 "ECAL Barrel low interest crystal data payload;" 00127 "Event size (kB);Nevts", 00128 100, 0., 200.); 00129 00130 meVolELI_ = book1D("EELowInterestPayload", 00131 "Endcap low interest crystal data payload;" 00132 "Event size (kB);Nevts", 00133 100, 0., 200.); 00134 00135 meVolLI_ = book1D("EcalLowInterestPayload", 00136 "ECAL low interest crystal data payload;" 00137 "Event size (kB);Nevts", 00138 100, 0., 200.); 00139 00140 meVolBHI_ = book1D("EBHighInterestPayload", 00141 "Barrel high interest crystal data payload;" 00142 "Event size (kB);Nevts", 00143 100, 0., 200.); 00144 00145 meVolEHI_ = book1D("EEHighInterestPayload", 00146 "Endcap high interest crystal data payload;" 00147 "Event size (kB);Nevts", 00148 100, 0., 200.); 00149 00150 meVolHI_ = book1D("EcalHighInterestPayload", 00151 "ECAL high interest crystal data payload;" 00152 "Event size (kB);Nevts", 00153 100, 0., 200.); 00154 00155 meVolB_ = book1D("EBEventSize", 00156 "Barrel data volume;Event size (kB);Nevts", 00157 100, 0., 200.); 00158 00159 meVolE_ = book1D("EEEventSize", 00160 "Endcap data volume;Event size (kB);Nevts", 00161 100, 0., 200.); 00162 00163 meVol_ = book1D("EcalEventSize", 00164 "ECAL data volume;Event size (kB);Nevts", 00165 100, 0., 200.); 00166 00167 meChOcc_ = book2D("EcalChannelOccupancy", 00168 "ECAL crystal channel occupancy after zero suppression;" 00169 "iX0 / iEta0+120 / iX0 + 310;" 00170 "iY0 / iPhi0 (starting from 0);" 00171 "Event count", 00172 410, -.5, 409.5, 00173 360, -.5, 359.5); 00174 00175 //TP 00176 string tpUnit; 00177 if(tpInGeV_) tpUnit = string("GeV"); else tpUnit = string(""); 00178 string title; 00179 title = string("Trigger primitive TT E_{T};E_{T} ") 00180 + tpUnit + string(";Event Count"); 00181 meTp_ = book1D("EcalTriggerPrimitiveEt", 00182 title.c_str(), 00183 100, 0., (tpInGeV_?10.:40.)); 00184 00185 meTtf_ = book1D("EcalTriggerTowerFlag", 00186 "Trigger primitive TT flag;Flag number;Event count", 00187 8, -.5, 7.5); 00188 00189 title = string("Trigger tower flag vs TP;E_{T}(TT) (") 00190 + tpUnit + string(");Flag number"); 00191 meTtfVsTp_ = book2D("ttfVsTp", 00192 title.c_str(), 00193 100, 0., (tpInGeV_?10.:40.), 00194 8, -.5, 7.5); 00195 00196 meTtfVsEtSum_ = book2D("ttfVsEtSum", 00197 "Trigger tower flag vs #sumE_{T};" 00198 "E_{T}(TT) (GeV);" 00199 "TTF", 00200 100, 0., (tpInGeV_?10.:40.), 00201 8, -.5, 7.5); 00202 title = string("Trigger primitive Et (TP) vs #sumE_{T};" 00203 "E_{T} (sum) (GeV);" 00204 "E_{T} (TP) (") + tpUnit + string (")"); 00205 00206 meTpVsEtSum_ = book2D("tpVsEtSum", 00207 title.c_str(), 00208 100, 0., 10., 00209 100, 0., (tpInGeV_?10.:40.)); 00210 00211 meTpMap_ = bookProfile2D("EcalTriggerPrimitiveEtMap", 00212 "Trigger primitive;" 00213 "iPhi;" 00214 "iEta;" 00215 "Event count", 00216 72, 1, 73, 00217 38, -19, 19) ; 00218 00219 //SRF 00220 meFullRoTt_ = book2D("EcalFullReadoutSRFlagMap", 00221 "Full Read-out trigger tower;" 00222 "iPhi;" 00223 "iEta;" 00224 "Event count", 00225 72, 1, 73, 00226 38, -19, 19) ; 00227 00228 meZs1Tt_ = book2D("EbZeroSupp1SRFlagMap", 00229 "Trigger tower read-out with ZS threshold 1;" 00230 "iPhi;" 00231 "iEta;" 00232 "Event count", 00233 72, 1, 73, 00234 38, -19, 19) ; 00235 00236 00237 meForcedTt_ = book2D("EcalReadoutUnitForcedBitMap", 00238 "ECAL readout unit with forced bit of SR flag on;" 00239 "iPhi;" 00240 "iEta;" 00241 "Event count", 00242 72, 1, 73, 00243 38, -19, 19) ; 00244 00245 00246 meLiTtf_ = book2D("EcalLowInterestTriggerTowerFlagMap", 00247 "Low interest trigger tower flags " 00248 "iPhi;" 00249 "iEta;" 00250 "Event count", 00251 72, 1, 73, 00252 38, -19, 19) ; 00253 00254 00255 meHiTtf_ = book2D("EcalHighInterestTriggerTowerFlagMap", 00256 "High interest trigger tower flags " 00257 "1 distribution;" 00258 "iPhi;" 00259 "iEta;" 00260 "Event count", 00261 72, 1, 73, 38, -19, 19) ; 00262 00263 00264 const float ebMinE = 0.; 00265 const float ebMaxE = 120.; 00266 00267 const float eeMinE = 0.; 00268 const float eeMaxE = 120.; 00269 00270 const float ebMinNoise = -1.; 00271 const float ebMaxNoise = 1.; 00272 00273 const float eeMinNoise = -1.; 00274 const float eeMaxNoise = 1.; 00275 00276 const int evtMax = 500; 00277 00278 meEbRecE_ = book1D("hEbRecE", 00279 "Crystal reconstructed energy;E (GeV);Event count", 00280 100, ebMinE, ebMaxE); 00281 00282 meEbEMean_ = bookProfile("hEbEMean", 00283 "EE <E_hit>;event #;<E_hit> (GeV)", 00284 evtMax, .5, evtMax + .5); 00285 00286 meEbNoise_ = book1D("hEbNoise", 00287 "Crystal noise " 00288 "(rec E of crystal without deposited energy)", 00289 100, ebMinNoise, ebMaxNoise); 00290 00291 meEbSimE_ = book1D("hEbSimE", "EB hit crystal simulated energy", 00292 100, -1., 2.5); 00293 00294 meEbRecEHitXtal_ = book1D("hEbRecEHitXtal", 00295 "EB rec energy of hit crystals", 00296 100, -1., 2.5); 00297 00298 meEbRecVsSimE_ = book2D("hEbRecVsSimE", 00299 "Crystal simulated vs reconstructed energy;" 00300 "Esim (GeV);Erec GeV);Event count", 00301 100, ebMinE, ebMaxE, 00302 100, ebMinE, ebMaxE); 00303 00304 meEbNoZsRecVsSimE_ = book2D("hEbNoZsRecVsSimE", 00305 "Crystal no-zs simulated vs reconstructed " 00306 "energy;" 00307 "Esim (GeV);Erec GeV);Event count", 00308 100, ebMinE, ebMaxE, 00309 100, ebMinE, ebMaxE); 00310 00311 meEeRecE_ = book1D("hEeRecE", 00312 "EE crystal reconstructed energy;E (GeV);" 00313 "Event count", 00314 100, eeMinE, eeMaxE); 00315 00316 meEeEMean_ = bookProfile("hEeEMean", 00317 "EE <E_hit>;event #;<E_hit> (GeV)", 00318 evtMax, .5, evtMax + .5); 00319 00320 00321 meEeNoise_ = book1D("hEeNoise", 00322 "EE crystal noise " 00323 "(rec E of crystal without deposited energy);" 00324 "E (GeV); Event count", 00325 200, eeMinNoise, eeMaxNoise); 00326 00327 meEeSimE_ = book1D("hEeSimE", "EE hit crystal simulated energy", 00328 100, -1., 2.5); 00329 00330 meEeRecEHitXtal_ = book1D("hEeRecEHitXtal", 00331 "EE rec energy of hit crystals", 00332 100, -1., 2.5); 00333 00334 meEeRecVsSimE_ = book2D("hEeRecVsSimE", 00335 "EE crystal simulated vs reconstructed energy;" 00336 "Esim (GeV);Erec GeV);Event count", 00337 100, eeMinE, eeMaxE, 00338 100, eeMinE, eeMaxE); 00339 00340 meEeNoZsRecVsSimE_ = book2D("hEeNoZsRecVsSimE", 00341 "EE crystal no-zs simulated vs " 00342 "reconstructed " 00343 "energy;Esim (GeV);Erec GeV);Event count", 00344 100, eeMinE, eeMaxE, 00345 100, eeMinE, eeMaxE); 00346 //print list of available histograms (must be called after 00347 //the bookXX methods): 00348 printAvailableHists(); 00349 00350 //check the histList parameter: 00351 stringstream s; 00352 for(set<string>::iterator it = histList_.begin(); 00353 it!=histList_.end(); 00354 ++it){ 00355 if(*it!=string("all") 00356 && availableHistList_.find(*it)==availableHistList_.end()){ 00357 s << (s.str().size()==0?"":", ") << *it; 00358 } 00359 } 00360 if(s.str().size()!=0){ 00361 LogWarning("Configuration") 00362 << "Parameter 'histList' contains some unknown histogram(s). " 00363 "Check spelling. Following name were not found: " 00364 << s.str(); 00365 } }
EcalSelectiveReadoutValidation::~EcalSelectiveReadoutValidation | ( | ) |
Destructor.
Definition at line 692 of file EcalSelectiveReadoutValidation.cc.
References dbe_, outputFile_, and DQMStore::save().
00693 { 00694 if(outputFile_.size()!=0) dbe_->save(outputFile_);
void EcalSelectiveReadoutValidation::anaDigi | ( | const T & | frame, | |
const U & | srFlagColl | |||
) | [inline, private] |
Accumulates statitics for data volume analysis.
To be called for each ECAL digi. See anaDigiInit().
Definition at line 803 of file EcalSelectiveReadoutValidation.cc.
References GeomDetEnumerators::barrel, dccNum(), ebRuActive_, ebTtEdge, EcalBarrel, eeRuActive_, Exception, iEta2cIndex(), iPhi2cIndex(), iXY2cIndex(), nEb_, nEbHI_, nEbLI_, nEe_, nEeHI_, nEeLI_, nPerDcc_, nRuPerDcc_, readOutUnitOf(), scEdge, EcalSrFlag::SRF_FULL, and DetId::subdetId().
00806 { 00807 const DetId& xtalId = frame.id(); 00808 typename U::const_iterator srf = srFlagColl.find(readOutUnitOf(frame.id())); 00809 00810 if(srf == srFlagColl.end()){ 00811 throw cms::Exception("EcalSelectiveReadoutValidation") 00812 << __FILE__ << ":" << __LINE__ << ": SR flag not found"; 00813 } 00814 00815 bool highInterest = ((srf->value() & ~EcalSrFlag::SRF_FORCED_MASK) 00816 == EcalSrFlag::SRF_FULL); 00817 00818 bool barrel = (xtalId.subdetId()==EcalBarrel); 00819 00820 if(barrel){ 00821 ++nEb_; 00822 if(highInterest){ 00823 ++nEbHI_; 00824 } else{//low interest 00825 ++nEbLI_; 00826 } 00827 int iEta0 = iEta2cIndex(static_cast<const EBDetId&>(xtalId).ieta()); 00828 int iPhi0 = iPhi2cIndex(static_cast<const EBDetId&>(xtalId).iphi()); 00829 if(!ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge]){ 00830 ++nRuPerDcc_[dccNum(xtalId)-1]; 00831 ebRuActive_[iEta0/ebTtEdge][iPhi0/ebTtEdge] = true; 00832 } 00833 } else{//endcap 00834 ++nEe_; 00835 if(highInterest){ 00836 ++nEeHI_; 00837 } else{//low interest 00838 ++nEeLI_; 00839 } 00840 int iX0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).ix()); 00841 int iY0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).iy()); 00842 int iZ0 = static_cast<const EEDetId&>(frame.id()).zside()>0?1:0; 00843 00844 if(!eeRuActive_[iZ0][iX0/scEdge][iY0/scEdge]){ 00845 ++nRuPerDcc_[dccNum(xtalId)]; 00846 eeRuActive_[iZ0][iX0/scEdge][iY0/scEdge] = true; 00847 } 00848 } 00849
void EcalSelectiveReadoutValidation::anaDigiInit | ( | ) | [private] |
Initializes statistics accumalator for data volume analysis.
To be call at start of each event analysis.
Definition at line 851 of file EcalSelectiveReadoutValidation.cc.
00853 { 00854 nEb_ = 0; 00855 nEe_ = 0; 00856 nEeLI_ = 0; 00857 nEeHI_ = 0; 00858 nEbLI_ = 0; 00859 nEbHI_ = 0; 00860 bzero(nPerDcc_, sizeof(nPerDcc_)); 00861 bzero(nRuPerDcc_, sizeof(nRuPerDcc_)); 00862 bzero(ebRuActive_, sizeof(ebRuActive_));
void EcalSelectiveReadoutValidation::analyze | ( | const edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
Analyzes the event.
Implements edm::EDAnalyzer.
Definition at line 367 of file EcalSelectiveReadoutValidation.cc.
References analyzeDataVolume(), analyzeEB(), analyzeEE(), analyzeTP(), ebDigis_, eeDigis_, readAllCollections(), and setTtEtSums().
00369 { 00370 //retrieves event products: 00371 readAllCollections(event); 00372 00373 //computes Et sum trigger tower crystals: 00374 setTtEtSums(es, *ebDigis_, *eeDigis_); 00375 00376 //Data Volume 00377 analyzeDataVolume(event, es); 00378 00379 //EB digis 00380 analyzeEB(event, es); 00381 00382 //EE digis 00383 analyzeEE(event, es); 00384 00385 //TP 00386 analyzeTP(event, es);
void EcalSelectiveReadoutValidation::analyzeDataVolume | ( | const edm::Event & | e, | |
const edm::EventSetup & | es | |||
) | [private] |
Data volume analysis.
To be called for each event.
event | EDM event | |
es | event setup |
Definition at line 752 of file EcalSelectiveReadoutValidation.cc.
Referenced by analyze().
00755 { 00756 00757 anaDigiInit(); 00758 00759 //Barrel 00760 for (unsigned int digis=0; digis<ebDigis_->size(); ++digis){ 00761 EBDataFrame ebdf = (*ebDigis_)[digis]; 00762 anaDigi(ebdf, *ebSrFlags_); 00763 } 00764 00765 // Endcap 00766 for (unsigned int digis=0; digis<eeDigis_->size(); ++digis){ 00767 EEDataFrame eedf = (*eeDigis_)[digis]; 00768 anaDigi(eedf, *eeSrFlags_); 00769 } 00770 00771 //histos 00772 for(unsigned iDcc = 0; iDcc < nDccs; ++iDcc){ 00773 fill(meDccVol_, iDcc+1, getDccEventSize(iDcc, nPerDcc_[iDcc])/kByte_); 00774 const FEDRawDataCollection& raw = *fedRaw_; 00775 fill(meDccVolFromData_, iDcc+1, 00776 ((double)raw.FEDData(601+iDcc).size())/kByte_); 00777 } 00778 00779 00780 //low interesest channels: 00781 double a = nEbLI_*getBytesPerCrystal()/kByte_; //getEbEventSize(nEbLI_)/kByte_; 00782 fill(meVolBLI_, a); 00783 double b = nEeLI_*getBytesPerCrystal()/kByte_; //getEeEventSize(nEeLI_)/kByte_; 00784 fill(meVolELI_, b); 00785 fill(meVolLI_, a+b); 00786 00787 //high interest chanels: 00788 a = nEbHI_*getBytesPerCrystal()/kByte_; //getEbEventSize(nEbHI_)/kByte_; 00789 fill(meVolBHI_, a); 00790 b = nEeHI_*getBytesPerCrystal()/kByte_; //getEeEventSize(nEeHI_)/kByte_; 00791 fill(meVolEHI_, b); 00792 fill(meVolHI_, a+b); 00793 00794 //any-interest channels: 00795 a = getEbEventSize(nEb_)/kByte_; 00796 fill(meVolB_, a); 00797 b = getEeEventSize(nEe_)/kByte_; 00798 fill(meVolE_, b); 00799 fill(meVol_, a+b);
void EcalSelectiveReadoutValidation::analyzeEB | ( | const edm::Event & | event, | |
const edm::EventSetup & | es | |||
) | [private] |
ECAL barrel data analysis.
To be called for each event.
event | EDM event | |
es | event setup |
Definition at line 520 of file EcalSelectiveReadoutValidation.cc.
References GenMuonPlsPt100GeV_cfg::cout, detId, ebDigis_, ebEnergies, ebRecHits_, ebSimHits_, ebSrFlags_, DetId::Ecal, EcalBarrel, CaloRecHit::energy(), PCaloHit::energy(), EcalSelectiveReadoutValidation::energiesEb_t::eta, PV3DBase< T, PVType, FrameType >::eta(), Exception, fill(), frame2Energy(), edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), i, EBDataFrame::id(), EcalRecHit::id(), PCaloHit::id(), EBSrFlag::id(), EcalTrigTowerDetId::ieta(), iEta2cIndex(), ievt_, EcalTrigTowerDetId::iphi(), iPhi2cIndex(), it, localReco_, max, meChOcc_, meEbEMean_, meEbNoise_, meEbNoZsRecVsSimE_, meEbRecE_, meEbRecEHitXtal_, meEbRecVsSimE_, meEbSimE_, meForcedTt_, meFullRoTt_, meZs1Tt_, nEbEta, nEbPhi, EcalSelectiveReadoutValidation::energiesEb_t::noZsRecE, EcalSelectiveReadoutValidation::energiesEb_t::phi, PV3DBase< T, PVType, FrameType >::phi(), rad2deg, EcalSelectiveReadoutValidation::energiesEb_t::recE, s, EcalSelectiveReadoutValidation::energiesEb_t::simE, EcalSelectiveReadoutValidation::energiesEb_t::simHit, python::multivaluedict::sort(), EcalSrFlag::SRF_FORCED_MASK, EcalSrFlag::SRF_FULL, EcalSrFlag::SRF_ZS1, and EcalSrFlag::value().
Referenced by analyze().
00522 { 00523 vector<pair<int,int> > xtalEtaPhi; 00524 xtalEtaPhi.reserve(nEbPhi*nEbEta); 00525 for(int iEta0=0; iEta0<nEbEta; ++iEta0){ 00526 for(int iPhi0=0; iPhi0<nEbPhi; ++iPhi0){ 00527 ebEnergies[iEta0][iPhi0].noZsRecE = -numeric_limits<double>::max(); 00528 ebEnergies[iEta0][iPhi0].recE = -numeric_limits<double>::max(); 00529 ebEnergies[iEta0][iPhi0].simE = 0; //must be zero. 00530 ebEnergies[iEta0][iPhi0].simHit = 0; 00531 xtalEtaPhi.push_back(pair<int,int>(iEta0, iPhi0)); 00532 } 00533 } 00534 00535 // get the barrel geometry: 00536 edm::ESHandle<CaloGeometry> geoHandle; 00537 es.get<MyCaloGeometryRecord>().get(geoHandle); 00538 const CaloSubdetectorGeometry *geometry_p 00539 = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalBarrel); 00540 CaloSubdetectorGeometry const& geometry = *geometry_p; 00541 00542 //EB unsuppressed digis: 00543 for(EBDigiCollection::const_iterator it = ebDigis_->begin(); 00544 it != ebDigis_->end(); ++it){ 00545 const EBDataFrame& frame = *it; 00546 int iEta0 = iEta2cIndex(static_cast<const EBDetId&>(frame.id()).ieta()); 00547 int iPhi0 = iPhi2cIndex(static_cast<const EBDetId&>(frame.id()).iphi()); 00548 if(iEta0<0 || iEta0>=nEbEta){ 00549 stringstream s; 00550 s << "EcalSelectiveReadoutValidation: " 00551 << "iEta0 (= " << iEta0 << ") is out of range (" 00552 << "[0," << nEbEta -1 << "]\n"; 00553 throw cms::Exception(s.str()); 00554 } 00555 if(iPhi0<0 || iPhi0>=nEbPhi){ 00556 stringstream s; 00557 s << "EcalSelectiveReadoutValidation: " 00558 << "iPhi0 (= " << iPhi0 << ") is out of range (" 00559 << "[0," << nEbPhi -1 << "]\n"; 00560 throw cms::Exception(s.str()); 00561 } 00562 00563 ebEnergies[iEta0][iPhi0].noZsRecE = frame2Energy(frame); 00564 00565 const GlobalPoint xtalPos 00566 = geometry.getGeometry(frame.id())->getPosition(); 00567 00568 ebEnergies[iEta0][iPhi0].phi = rad2deg*((double)xtalPos.phi()); 00569 ebEnergies[iEta0][iPhi0].eta = xtalPos.eta(); 00570 } //next non-zs digi 00571 00572 //EB sim hits 00573 for(vector<PCaloHit>::const_iterator it = ebSimHits_->begin(); 00574 it != ebSimHits_->end(); ++it){ 00575 const PCaloHit& simHit = *it; 00576 EBDetId detId(simHit.id()); 00577 int iEta = detId.ieta(); 00578 int iEta0 =iEta2cIndex(iEta); 00579 int iPhi = detId.iphi(); 00580 int iPhi0 = iPhi2cIndex(iPhi); 00581 ebEnergies[iEta0][iPhi0].simE += simHit.energy(); 00582 ++ebEnergies[iEta0][iPhi0].simHit; 00583 } 00584 00585 bool crystalShot[nEbEta][nEbPhi]; 00586 for(int iEta0=0; iEta0<nEbEta; ++iEta0){ 00587 for(int iPhi0=0; iPhi0<nEbPhi; ++iPhi0){ 00588 crystalShot[iEta0][iPhi0] = false; 00589 } 00590 } 00591 00592 int nEbDigi = 0; 00593 00594 for(EBDigiCollection::const_iterator it = ebDigis_->begin(); 00595 it != ebDigis_->end(); ++it){ 00596 ++nEbDigi; 00597 const EBDataFrame& frame = *it; 00598 int iEta = static_cast<const EBDetId&>(frame.id()).ieta(); 00599 int iPhi = static_cast<const EBDetId&>(frame.id()).iphi(); 00600 int iEta0 = iEta2cIndex(iEta); 00601 int iPhi0 = iPhi2cIndex(iPhi); 00602 if(iEta0<0 || iEta0>=nEbEta){ 00603 throw (cms::Exception("EcalSelectiveReadoutValidation") 00604 << "iEta0 (= " << iEta0 << ") is out of range (" 00605 << "[0," << nEbEta -1 << "]"); 00606 } 00607 if(iPhi0<0 || iPhi0>=nEbPhi){ 00608 throw (cms::Exception("EcalSelectiveReadoutValidation") 00609 << "iPhi0 (= " << iPhi0 << ") is out of range (" 00610 << "[0," << nEbPhi -1 << "]"); 00611 } 00612 assert(iEta0>=0 && iEta0<nEbEta); 00613 assert(iPhi0>=0 && iPhi0<nEbPhi); 00614 if(!crystalShot[iEta0][iPhi0]){ 00615 crystalShot[iEta0][iPhi0] = true; 00616 } else{ 00617 cout << "Error: several digi for same crystal!"; 00618 abort(); 00619 } 00620 if(localReco_){ 00621 ebEnergies[iEta0][iPhi0].recE = frame2Energy(frame); 00622 } 00623 fill(meChOcc_, iEta0+120, iPhi0); 00624 } //next EB digi 00625 00626 if(!localReco_){ 00627 for(EcalRecHitCollection::const_iterator it 00628 = ebRecHits_->begin(); 00629 it != ebRecHits_->end(); ++it){ 00630 ++nEbDigi; 00631 const EcalRecHit& hit = *it; 00632 int iEta = static_cast<const EBDetId&>(hit.id()).ieta(); 00633 int iPhi = static_cast<const EBDetId&>(hit.id()).iphi(); 00634 int iEta0 = iEta2cIndex(iEta); 00635 int iPhi0 = iPhi2cIndex(iPhi); 00636 if(iEta0<0 || iEta0>=nEbEta){ 00637 cout << "iEta0 (= " << iEta0 << ") is out of range (" 00638 << "[0," << nEbEta -1 << "]\n"; 00639 } 00640 if(iPhi0<0 || iPhi0>=nEbPhi){ 00641 cout << "iPhi0 (= " << iPhi0 << ") is out of range (" 00642 << "[0," << nEbPhi -1 << "]\n"; 00643 } 00644 ebEnergies[iEta0][iPhi0].recE = hit.energy(); 00645 } 00646 } 00647 00648 //sorts crystal in increasing sim hit energy. ebEnergies[][].simE 00649 //must be set beforehand: 00650 sort(xtalEtaPhi.begin(), xtalEtaPhi.end(), Sorter(this)); 00651 00652 // cout << "\niEta\tiPhi\tsimE\tnoZsE\tzsE\n"; 00653 for(unsigned int i=0; i<xtalEtaPhi.size(); ++i){ 00654 int iEta0 = xtalEtaPhi[i].first; 00655 int iPhi0= xtalEtaPhi[i].second; 00656 energiesEb_t& energies = ebEnergies[iEta0][iPhi0]; 00657 00658 double recE = ebEnergies[iEta0][iPhi0].recE; 00659 if(recE!=-numeric_limits<double>::max()){//not zero suppressed 00660 fill(meEbRecE_, ebEnergies[iEta0][iPhi0].recE); 00661 fill(meEbEMean_, ievt_+1, recE); 00662 } //not zero suppressed 00663 00664 if(!energies.simHit){//noise only crystal channel 00665 fill(meEbNoise_, energies.noZsRecE); 00666 } else{ 00667 fill(meEbSimE_, energies.simE); 00668 fill(meEbRecEHitXtal_, energies.recE); 00669 } 00670 fill(meEbRecVsSimE_, energies.simE, energies.recE); 00671 fill(meEbNoZsRecVsSimE_, energies.simE, energies.noZsRecE); 00672 } 00673 00674 //SRF 00675 for(EBSrFlagCollection::const_iterator it = ebSrFlags_->begin(); 00676 it != ebSrFlags_->end(); ++it){ 00677 const EBSrFlag& srf = *it; 00678 int iEta = srf.id().ieta(); 00679 int iPhi = srf.id().iphi(); 00680 int flag = srf.value() & ~EcalSrFlag::SRF_FORCED_MASK; 00681 if(flag == EcalSrFlag::SRF_ZS1){ 00682 fill(meZs1Tt_, iPhi, iEta); 00683 } 00684 if(flag == EcalSrFlag::SRF_FULL){ 00685 fill(meFullRoTt_, iPhi, iEta); 00686 } 00687 if(srf.value() & EcalSrFlag::SRF_FORCED_MASK){ 00688 fill(meForcedTt_, iPhi, iEta); 00689 } 00690 }
void EcalSelectiveReadoutValidation::analyzeEE | ( | const edm::Event & | event, | |
const edm::EventSetup & | es | |||
) | [private] |
ECAL endcap data analysis.
To be called for each event.
event | EDM event | |
es | event setup |
Definition at line 389 of file EcalSelectiveReadoutValidation.cc.
References GenMuonPlsPt100GeV_cfg::cout, detId, DetId::Ecal, EcalEndcap, eeDigis_, eeEnergies, eeNoZsDigis_, eeRecHits_, eeSimHits_, CaloRecHit::energy(), PCaloHit::energy(), PV3DBase< T, PVType, FrameType >::eta(), EcalSelectiveReadoutValidation::energiesEe_t::eta, fill(), frame2Energy(), edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), EcalRecHit::id(), PCaloHit::id(), EEDataFrame::id(), ievt_, it, iXY2cIndex(), localReco_, max, meChOcc_, meEeEMean_, meEeNoise_, meEeNoZsRecVsSimE_, meEeRecE_, meEeRecEHitXtal_, meEeRecVsSimE_, meEeSimE_, nEeX, nEeY, nEndcaps, EcalSelectiveReadoutValidation::energiesEe_t::noZsRecE, PV3DBase< T, PVType, FrameType >::phi(), EcalSelectiveReadoutValidation::energiesEe_t::phi, rad2deg, EcalSelectiveReadoutValidation::energiesEe_t::recE, EcalSelectiveReadoutValidation::energiesEe_t::simE, and EcalSelectiveReadoutValidation::energiesEe_t::simHit.
Referenced by analyze().
00391 { 00392 for(int iZ0=0; iZ0<nEndcaps; ++iZ0){ 00393 for(int iX0=0; iX0<nEeX; ++iX0){ 00394 for(int iY0=0; iY0<nEeY; ++iY0){ 00395 eeEnergies[iZ0][iX0][iY0].noZsRecE = -numeric_limits<double>::max(); 00396 eeEnergies[iZ0][iX0][iY0].recE = -numeric_limits<double>::max(); 00397 eeEnergies[iZ0][iX0][iY0].simE = 0; //must be set to zero. 00398 eeEnergies[iZ0][iX0][iY0].simHit = 0; 00399 } 00400 } 00401 } 00402 00403 // gets the endcap geometry: 00404 edm::ESHandle<CaloGeometry> geoHandle; 00405 es.get<MyCaloGeometryRecord>().get(geoHandle); 00406 const CaloSubdetectorGeometry *geometry_p 00407 = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalEndcap); 00408 CaloSubdetectorGeometry const& geometry = *geometry_p; 00409 00410 //EE unsupressed digis: 00411 for (unsigned int digis=0; digis<eeNoZsDigis_->size(); ++digis){ 00412 00413 EEDataFrame frame = (*eeNoZsDigis_)[digis]; 00414 int iX0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).ix()); 00415 int iY0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).iy()); 00416 int iZ0 = static_cast<const EEDetId&>(frame.id()).zside()>0?1:0; 00417 00418 if(iX0<0 || iX0>=nEeX){ 00419 cout << "iX0 (= " << iX0 << ") is out of range (" 00420 << "[0," << nEeX -1 << "]\n"; 00421 } 00422 if(iY0<0 || iY0>=nEeY){ 00423 cout << "iY0 (= " << iY0 << ") is out of range (" 00424 << "[0," << nEeY -1 << "]\n"; 00425 } 00426 // cout << "EE no ZS energy computation..." ; 00427 eeEnergies[iZ0][iX0][iY0].noZsRecE = frame2Energy(frame); 00428 00429 const GlobalPoint xtalPos 00430 = geometry.getGeometry(frame.id())->getPosition(); 00431 00432 eeEnergies[iZ0][iX0][iY0].phi = rad2deg*((double)xtalPos.phi()); 00433 eeEnergies[iZ0][iX0][iY0].eta = xtalPos.eta(); 00434 } 00435 00436 //EE rec hits: 00437 if(!localReco_){ 00438 for(EcalRecHitCollection::const_iterator it 00439 = eeRecHits_->begin(); 00440 it != eeRecHits_->end(); ++it){ 00441 const EcalRecHit& hit = *it; 00442 int iX0 = iXY2cIndex(static_cast<const EEDetId&>(hit.id()).ix()); 00443 int iY0 = iXY2cIndex(static_cast<const EEDetId&>(hit.id()).iy()); 00444 int iZ0 = static_cast<const EEDetId&>(hit.id()).zside()>0?1:0; 00445 00446 if(iX0<0 || iX0>=nEeX){ 00447 cout << "iX0 (= " << iX0 << ") is out of range (" 00448 << "[0," << nEeX -1 << "]\n"; 00449 } 00450 if(iY0<0 || iY0>=nEeY){ 00451 cout << "iY0 (= " << iY0 << ") is out of range (" 00452 << "[0," << nEeY -1 << "]\n"; 00453 } 00454 // cout << "EE no ZS energy computation..." ; 00455 eeEnergies[iZ0][iX0][iY0].recE = hit.energy(); 00456 } 00457 } 00458 00459 //EE sim hits: 00460 for(vector<PCaloHit>::const_iterator it = eeSimHits_->begin(); 00461 it != eeSimHits_->end(); ++it){ 00462 const PCaloHit& simHit = *it; 00463 EEDetId detId(simHit.id()); 00464 int iX = detId.ix(); 00465 int iX0 =iXY2cIndex(iX); 00466 int iY = detId.iy(); 00467 int iY0 = iXY2cIndex(iY); 00468 int iZ0 = detId.zside()>0?1:0; 00469 eeEnergies[iZ0][iX0][iY0].simE += simHit.energy(); 00470 ++eeEnergies[iZ0][iX0][iY0].simHit; 00471 } 00472 00473 //EE suppressed digis 00474 for(EEDigiCollection::const_iterator it = eeDigis_->begin(); 00475 it != eeDigis_->end(); ++it){ 00476 const EEDataFrame& frame = *it; 00477 int iX0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).ix()); 00478 int iY0 = iXY2cIndex(static_cast<const EEDetId&>(frame.id()).iy()); 00479 int iZ0 = static_cast<const EEDetId&>(frame.id()).zside()>0?1:0; 00480 if(iX0<0 || iX0>=nEeX){ 00481 cout << "iX0 (= " << iX0 << ") is out of range (" 00482 << "[0," << nEeX -1 << "]\n"; 00483 } 00484 if(iY0<0 || iY0>=nEeY){ 00485 cout << "iY0 (= " << iY0 << ") is out of range (" 00486 << "[0," << nEeY -1 << "]\n"; 00487 } 00488 // cout << "EE zs Energy computation..."; 00489 if(localReco_){ 00490 eeEnergies[iZ0][iX0][iY0].recE = frame2Energy(frame); 00491 } 00492 fill(meChOcc_, iX0 + iZ0*310, iY0); 00493 } //next ZS digi. 00494 00495 for(int iZ0=0; iZ0<nEndcaps; ++iZ0){ 00496 for(int iX0=0; iX0<nEeX; ++iX0){ 00497 for(int iY0=0; iY0<nEeY; ++iY0){ 00498 double recE = eeEnergies[iZ0][iX0][iY0].recE; 00499 if(recE==-numeric_limits<double>::max()) continue; //not a crystal or ZS 00500 fill(meEeRecE_, eeEnergies[iZ0][iX0][iY0].recE); 00501 00502 fill(meEeEMean_, ievt_+1, 00503 eeEnergies[iZ0][iX0][iY0].recE); 00504 00505 if(!eeEnergies[iZ0][iX0][iY0].simHit){//noise only crystal channel 00506 fill(meEeNoise_, eeEnergies[iZ0][iX0][iY0].noZsRecE); 00507 } else{ 00508 fill(meEeSimE_, eeEnergies[iZ0][iX0][iY0].simE); 00509 fill(meEeRecEHitXtal_, eeEnergies[iZ0][iX0][iY0].recE); 00510 } 00511 fill(meEeRecVsSimE_, eeEnergies[iZ0][iX0][iY0].simE, 00512 eeEnergies[iZ0][iX0][iY0].recE); 00513 fill(meEeNoZsRecVsSimE_, eeEnergies[iZ0][iX0][iY0].simE, 00514 eeEnergies[iZ0][iX0][iY0].noZsRecE); 00515 } 00516 } 00517 }
void EcalSelectiveReadoutValidation::analyzeTP | ( | const edm::Event & | event, | |
const edm::EventSetup & | es | |||
) | [private] |
Trigger primitive analysis.
To be called for each event.
event | EDM event | |
es | event setup |
Definition at line 712 of file EcalSelectiveReadoutValidation.cc.
References fill(), EcalTPGScale::getTPGInGeV(), it, iTTEta2cIndex(), meHiTtf_, meLiTtf_, meTp_, meTpMap_, meTpVsEtSum_, meTtf_, meTtfVsEtSum_, meTtfVsTp_, EcalTPGScale::setEventSetup(), tpInGeV_, tps_, and ttEtSums.
Referenced by analyze().
00714 { 00715 EcalTPGScale ecalScale; 00716 #if (CMSSW_COMPAT_VERSION>=210) 00717 ecalScale.setEventSetup(es) ; 00718 #endif 00719 for(EcalTrigPrimDigiCollection::const_iterator it = tps_->begin(); 00720 it != tps_->end(); ++it){ 00721 //const int iTcc = elecMap_->TCCid(it->id()); 00722 //const int iTT = elecMap_->iTT(it->id()); 00723 double tpEt; 00724 if(tpInGeV_){ 00725 #if (CMSSW_COMPAT_VERSION<210) 00726 tpEt = ecalScale.getTPGInGeV(es, *it); 00727 #else 00728 tpEt = ecalScale.getTPGInGeV(it->compressedEt(), it->id()) ; 00729 #endif 00730 } else{ 00731 tpEt = it->compressedEt(); 00732 } 00733 int iEta = it->id().ieta(); 00734 int iEta0 = iTTEta2cIndex(iEta); 00735 int iPhi = it->id().iphi(); 00736 int iPhi0 = iTTEta2cIndex(iPhi); 00737 double etSum = ttEtSums[iEta0][iPhi0]; 00738 fill(meTp_, tpEt); 00739 fill(meTpVsEtSum_, etSum, tpEt); 00740 fill(meTtf_, it->ttFlag()); 00741 if((it->ttFlag() & 0x3) == 0){ 00742 fill(meLiTtf_, iPhi, iEta); 00743 } 00744 00745 if((it->ttFlag() & 0x3) == 3){ 00746 fill(meHiTtf_, iPhi, iEta); 00747 } 00748 fill(meTtfVsTp_, tpEt, it->ttFlag()); 00749 fill(meTtfVsEtSum_, etSum, it->ttFlag()); 00750 fill(meTpMap_, iPhi, iEta, tpEt, 1.);
void EcalSelectiveReadoutValidation::beginJob | ( | const edm::EventSetup & | c | ) | [protected, virtual] |
Calls at job start.
Reimplemented from edm::EDAnalyzer.
Definition at line 696 of file EcalSelectiveReadoutValidation.cc.
References elecMap_, edm::EventSetup::get(), edm::ESHandle< T >::product(), and triggerTowerMap_.
00697 { 00698 // endcap mapping 00699 edm::ESHandle<EcalTrigTowerConstituentsMap> hTriggerTowerMap; 00700 setup.get<IdealGeometryRecord>().get(hTriggerTowerMap); 00701 triggerTowerMap_ = hTriggerTowerMap.product(); 00702 00703 //electronics map 00704 ESHandle< EcalElectronicsMapping > ecalmapping; 00705 setup.get< EcalMappingRcd >().get(ecalmapping); 00706 elecMap_ = ecalmapping.product();
MonitorElement * EcalSelectiveReadoutValidation::book1D | ( | const std::string & | name, | |
const std::string & | title, | |||
int | nbins, | |||
double | xmin, | |||
double | xmax | |||
) | [private] |
Wrappers to the book methods of the DQMStore DQM histogramming interface.
Definition at line 1084 of file EcalSelectiveReadoutValidation.cc.
Referenced by EcalSelectiveReadoutValidation().
01086 { 01087 if(!registerHist(name, title)) return 0; //this histo is disabled 01088 MonitorElement* result = dbe_->book1D(name, title, nbins, xmin, xmax); 01089 if(result==0){ 01090 throw cms::Exception("Histo") 01091 << "Failed to book histogram " << name; 01092 }
MonitorElement * EcalSelectiveReadoutValidation::book2D | ( | const std::string & | name, | |
const std::string & | title, | |||
int | nxbins, | |||
double | xmin, | |||
double | xmax, | |||
int | nybins, | |||
double | ymin, | |||
double | ymax | |||
) | [private] |
Definition at line 1094 of file EcalSelectiveReadoutValidation.cc.
Referenced by EcalSelectiveReadoutValidation().
01096 { 01097 if(!registerHist(name, title)) return 0; //this histo is disabled 01098 MonitorElement* result = dbe_->book2D(name, title, nxbins, xmin, xmax, 01099 nybins, ymin, ymax); 01100 if(result==0){ 01101 throw cms::Exception("Histo") 01102 << "Failed to book histogram " << name; 01103 }
MonitorElement * EcalSelectiveReadoutValidation::bookProfile | ( | const std::string & | name, | |
const std::string & | title, | |||
int | nbins, | |||
double | xmin, | |||
double | xmax | |||
) | [private] |
Definition at line 1105 of file EcalSelectiveReadoutValidation.cc.
Referenced by EcalSelectiveReadoutValidation().
01107 { 01108 if(!registerHist(name, title)) return 0; //this histo is disabled 01109 MonitorElement* result = dbe_->bookProfile(name, title, nbins, xmin, xmax, 01110 0, 0, 0); 01111 if(result==0){ 01112 throw cms::Exception("Histo") 01113 << "Failed to book histogram " << name; 01114 }
MonitorElement * EcalSelectiveReadoutValidation::bookProfile2D | ( | const std::string & | name, | |
const std::string & | title, | |||
int | nbinx, | |||
double | xmin, | |||
double | xmax, | |||
int | nbiny, | |||
double | ymin, | |||
double | ymax, | |||
const char * | option = "" | |||
) | [private] |
Definition at line 1116 of file EcalSelectiveReadoutValidation.cc.
Referenced by EcalSelectiveReadoutValidation().
01118 { 01119 if(!registerHist(name, title)) return 0; //this histo is disabled 01120 MonitorElement* result 01121 = dbe_->bookProfile2D(name, 01122 title, 01123 nbinx, xmin, xmax, 01124 nbiny, ymin, ymax, 01125 0, 0, 0, 01126 option); 01127 if(result==0){ 01128 throw cms::Exception("Histo") 01129 << "Failed to book histogram " << name; 01130 }
converse of iPhi2cIndex() method.
Definition at line 237 of file EcalSelectiveReadoutValidation.h.
00237 { 00238 return i+1; 00239 }
unsigned EcalSelectiveReadoutValidation::dccNum | ( | const DetId & | xtalId | ) | const [private] |
Retrieve the logical number of the DCC reading a given crystal channel.
xtarId | crystal channel identifier |
Definition at line 909 of file EcalSelectiveReadoutValidation.cc.
Referenced by anaDigi().
00911 { 00912 int i; 00913 int j; 00914 int k; 00915 00916 assert(xtalId.det()==DetId::Ecal); 00917 assert(!xtalId.null()); 00918 00919 if(xtalId.subdetId()==EcalBarrel){ 00920 EBDetId ebDetId(xtalId); 00921 i = 1; //barrel 00922 j = iEta2cIndex(ebDetId.ieta()); 00923 k = iPhi2cIndex(ebDetId.iphi()); 00924 } else if(xtalId.subdetId()==EcalEndcap){ 00925 EEDetId eeDetId(xtalId); 00926 i = eeDetId.zside()<0?0:2; 00927 j = iXY2cIndex(eeDetId.ix()); 00928 k = iXY2cIndex(eeDetId.iy()); 00929 } else{ 00930 throw cms::Exception("EcalSelectiveReadoutValidation") 00931 <<"Not recognized subdetector. Probably a bug."; 00932 } 00933 int iDcc0 = ::dccIndex(i,j,k); 00934 assert(iDcc0>=0 && (unsigned)iDcc0<nDccs);
Calls at job end.
Reimplemented from edm::EDAnalyzer.
Definition at line 708 of file EcalSelectiveReadoutValidation.cc.
void EcalSelectiveReadoutValidation::fill | ( | MonitorElement * | me, | |
float | x, | |||
float | y, | |||
float | z, | |||
float | w | |||
) | [inline, private] |
void EcalSelectiveReadoutValidation::fill | ( | MonitorElement * | me, | |
float | x, | |||
float | y, | |||
float | zw | |||
) | [inline, private] |
void EcalSelectiveReadoutValidation::fill | ( | MonitorElement * | me, | |
float | x, | |||
float | yw | |||
) | [inline, private] |
void EcalSelectiveReadoutValidation::fill | ( | MonitorElement * | me, | |
float | x | |||
) | [inline, private] |
Wrapper to fill methods of DQM monitor elements.
Definition at line 303 of file EcalSelectiveReadoutValidation.h.
References MonitorElement::Fill().
Referenced by analyzeEB(), analyzeEE(), and analyzeTP().
double EcalSelectiveReadoutValidation::frame2Energy | ( | const EcalDataFrame & | frame | ) | const [private] |
Energy reconstruction from ADC samples.
frame | the ADC sample of an ECA channel |
Definition at line 864 of file EcalSelectiveReadoutValidation.cc.
Referenced by analyzeEB(), and analyzeEE().
00866 { 00867 static bool firstCall = true; 00868 if(firstCall){ 00869 cout << "Weights:"; 00870 for(unsigned i=0; i<weights_.size();++i){ 00871 cout << "\t" << weights_[i]; 00872 } 00873 cout << "\n"; 00874 firstCall = false; 00875 } 00876 double adc2GeV = 0.; 00877 00878 if(typeid(EBDataFrame)==typeid(frame)){//barrel APD 00879 adc2GeV = .035; 00880 } else if(typeid(EEDataFrame)==typeid(frame)){//endcap VPT 00881 adc2GeV = 0.06; 00882 } else{ 00883 assert(false); 00884 } 00885 00886 double acc = 0; 00887 00888 const int n = min(frame.size(), (int)weights_.size()); 00889 00890 double gainInv[] = {12., 1., 6., 12.}; 00891 00892 for(int i=0; i < n; ++i){ 00893 acc += weights_[i]*frame[i].adc()*gainInv[frame[i].gainId()]*adc2GeV; 00894 }
double EcalSelectiveReadoutValidation::frame2EnergyForTp | ( | const T & | frame, | |
int | offset = 0 | |||
) | const [inline, private] |
Energy reconstruction from ADC samples to be used for trigger primitive estimate.
frame | the ADC sample of an ECA channel | |
offset | time offset. To be used to evaluate energy of the event previous (offset=-1) and next (offset=+1) to the triggered one. |
Definition at line 1046 of file EcalSelectiveReadoutValidation.cc.
References Exception, and weights.
Referenced by setTtEtSums().
01049 { 01050 //we have to start by 0 in order to handle offset=-1 01051 //(however Fenix FIR has AFAK only 5 taps) 01052 double weights[] = {0., -1/3., -1/3., -1/3., 0., 1.}; 01053 01054 double adc2GeV = 0.; 01055 if(typeid(frame) == typeid(EBDataFrame)){ 01056 adc2GeV = 0.035; 01057 } else if(typeid(frame) == typeid(EEDataFrame)){ 01058 adc2GeV = 0.060; 01059 } else{ //T is an invalid type! 01060 //TODO: replace message by a cms exception 01061 throw cms::Exception("Severe Error") 01062 << __FILE__ << ":" << __LINE__ << ": " 01063 << "this is a bug. Please report it.\n"; 01064 } 01065 01066 double acc = 0; 01067 01068 const int n = min<int>(frame.size(), sizeof(weights)/sizeof(weights[0])); 01069 01070 double gainInv[] = {12., 1., 6., 12}; 01071 01072 for(int i=offset; i < n; ++i){ 01073 int iframe = i + offset; 01074 if(iframe>=0 && iframe<frame.size()){ 01075 acc += weights[i]*frame[iframe].adc() 01076 *gainInv[frame[iframe].gainId()]*adc2GeV; 01077 //cout << (iframe>offset?"+":"") 01078 // << frame[iframe].adc() << "*" << gainInv[frame[iframe].gainId()] 01079 // << "*" << adc2GeV << "*(" << weights[i] << ")"; 01080 } 01081 } 01082 //cout << "\n";
double EcalSelectiveReadoutValidation::getBytesPerCrystal | ( | ) | const [inline, private] |
Gets the number of bytes per crystal channel of the event part depending on the number of read crystal channels.
Definition at line 151 of file EcalSelectiveReadoutValidation.h.
Referenced by getDccEventSize().
double EcalSelectiveReadoutValidation::getDccEventSize | ( | int | iDcc0, | |
double | nReadXtals | |||
) | const [inline, private] |
Gets the size of an DCC event fragment.
iDcc0 | the DCC logical number starting from 0. | |
nReadXtals | number of read crystal channels. |
Definition at line 160 of file EcalSelectiveReadoutValidation.h.
References EB, EE, getBytesPerCrystal(), getDccOverhead(), and getRuCount().
00160 { 00161 subdet_t subdet; 00162 if(iDcc0<9 || iDcc0>=45){ 00163 subdet = EE; 00164 } else{ 00165 subdet = EB; 00166 } 00167 return getDccOverhead(subdet)+nReadXtals*getBytesPerCrystal() 00168 + getRuCount(iDcc0)*8; 00169 }
double EcalSelectiveReadoutValidation::getDccOverhead | ( | subdet_t | subdet | ) | const [inline, private] |
Gets the size in bytes fixed-size part of a DCC event fragment.
Definition at line 142 of file EcalSelectiveReadoutValidation.h.
References EB.
Referenced by getDccEventSize().
00142 { 00143 // return (subdet==EB?34:25)*8; 00144 return (subdet==EB?34:52)*8; 00145 }
double EcalSelectiveReadoutValidation::getEbEventSize | ( | double | nReadXtals | ) | const [private] |
Computes the size of an ECAL barrel event fragment.
nReadXtals | number of read crystal channels |
Definition at line 1165 of file EcalSelectiveReadoutValidation.cc.
01167 { 01168 double ruHeaderPayload = 0.; 01169 const int firstEbDcc0 = nEeDccs/2; 01170 for(int iDcc0 = firstEbDcc0; iDcc0 < firstEbDcc0 + nEbDccs; ++iDcc0){ 01171 ruHeaderPayload += getRuCount(iDcc0)*8.; 01172 } 01173 01174 return getDccOverhead(EB)*nEbDccs + nReadXtals*getBytesPerCrystal()
double EcalSelectiveReadoutValidation::getEeEventSize | ( | double | nReadXtals | ) | const [private] |
Computes the size of an ECAL endcap event fragment.
nReadXtals | number of read crystal channels |
Definition at line 1176 of file EcalSelectiveReadoutValidation.cc.
01178 { 01179 double ruHeaderPayload = 0.; 01180 const unsigned firstEbDcc0 = nEeDccs/2; 01181 for(unsigned iDcc0 = 0; iDcc0 < nDccs; ++iDcc0){ 01182 //skip barrel: 01183 if(iDcc0== firstEbDcc0) iDcc0 += nEbDccs; 01184 ruHeaderPayload += getRuCount(iDcc0)*8.; 01185 } 01186 return getDccOverhead(EE)*nEeDccs + nReadXtals*getBytesPerCrystal()
Gets the number of readout unit read by a DCC.
A readout unit correspond to an active DCC input channel.
iDcc0 | DCC logical number starting from 0. |
Definition at line 896 of file EcalSelectiveReadoutValidation.cc.
Referenced by getDccEventSize().
00898 { 00899 // static int nEemRu[] = {34, 32, 33, 33, 32, 34, 33, 34, 33}; 00900 // static int nEepRu[] = {32, 33, 33, 32, 34, 33, 34, 33, 34}; 00901 // if(iDcc0<9){//EE- 00902 // return nEemRu[iDcc0]; 00903 // } else if(iDcc0>=45){//EE+ 00904 // return nEepRu[iDcc0-45]; 00905 // } else{//EB 00906 // return 68; 00907 // }
Converts a std CMSSW crystal eta index to a c-array index (starting from zero and without hole).
Definition at line 204 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi(), and analyzeEB().
Converts a std CMSSW crystal phi index to a c-array index (starting from zero and without hole).
Definition at line 211 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi(), and analyzeEB().
Transforms CMSSW eta ECAL TT indices to indices starting at 0 to use for c-array or vector.
iEta | CMSSW eta index (numbering -28...-1,28...56) |
Definition at line 246 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and setTtEtSums().
Transforms CMSSW phi ECAL crystal indices to indices starting at 0 to use for c-array or vector.
iPhi | CMSSW phi index (numbering 1...72) |
Definition at line 255 of file EcalSelectiveReadoutValidation.h.
Referenced by setTtEtSums().
Converts a std CMSSW crystal x or y index to a c-array index (starting from zero and without hole).
Definition at line 218 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi(), and analyzeEE().
void EcalSelectiveReadoutValidation::printAvailableHists | ( | ) | [private] |
Prints the list of available histograms (registered by the registerHist method), including disabled one.
Definition at line 1153 of file EcalSelectiveReadoutValidation.cc.
Referenced by EcalSelectiveReadoutValidation().
01155 { 01156 LogInfo log("EcalSelectiveReadout"); 01157 log << "Avalailable histograms (DQM monitor elements): \n"; 01158 for(map<string, string>::iterator it = availableHistList_.begin(); 01159 it != availableHistList_.end(); 01160 ++it){ 01161 log << it->first << ": " << it->second << "\n"; 01162 } 01163 log << "\nTo include an histogram add its name in the vstring parameter "
void EcalSelectiveReadoutValidation::readAllCollections | ( | const edm::Event & | e | ) | [private] |
Reads the data collections from the event.
Called at start of each event analysis.
event | the EDM event. |
Definition at line 1138 of file EcalSelectiveReadoutValidation.cc.
Referenced by analyze().
01140 { 01141 ebRecHits_.read(event); 01142 eeRecHits_.read(event); 01143 ebDigis_.read(event); 01144 eeDigis_.read(event); 01145 ebNoZsDigis_.read(event); 01146 eeNoZsDigis_.read(event); 01147 ebSrFlags_.read(event); 01148 eeSrFlags_.read(event); 01149 ebSimHits_.read(event); 01150 eeSimHits_.read(event); 01151 tps_.read(event);
EcalScDetId EcalSelectiveReadoutValidation::readOutUnitOf | ( | const EEDetId & | xtalId | ) | const [private] |
EcalTrigTowerDetId EcalSelectiveReadoutValidation::readOutUnitOf | ( | const EBDetId & | xtalId | ) | const [private] |
Retrives the readout unit, a trigger tower in the barrel case, and a supercrystal in the endcap case, a given crystal belongs to.
xtalId | identifier of the crystal |
Definition at line 947 of file EcalSelectiveReadoutValidation.cc.
References EcalTrigTowerConstituentsMap::towerOf(), and triggerTowerMap_.
Referenced by anaDigi().
bool EcalSelectiveReadoutValidation::registerHist | ( | const std::string & | name, | |
const std::string & | title | |||
) | [private] |
Register a histogram in the available histogram list and check if the histogram is enabled.
Called by the histogram booking methods.
Definition at line 1132 of file EcalSelectiveReadoutValidation.cc.
01135 { 01136 availableHistList_.insert(pair<string, string>(name, title));
void EcalSelectiveReadoutValidation::setTtEtSums | ( | const edm::EventSetup & | es, | |
const EBDigiCollection & | ebDigis, | |||
const EEDigiCollection & | eeDigis | |||
) | [private] |
Computes trigger primitive estimates.
A sum of crystal deposited transverse energy is performed.
es | event setup | |
ebDigis | the ECAL barrel unsuppressed digi to use for the computation | |
ebDigis | the ECAL endcap unsuppressed digi to use for the computation |
Definition at line 957 of file EcalSelectiveReadoutValidation.cc.
References edm::DataFrameContainer::begin(), ebDigis_, DetId::Ecal, EcalBarrel, EcalEndcap, edm::DataFrameContainer::end(), frame2EnergyForTp(), edm::EventSetup::get(), CaloSubdetectorGeometry::getGeometry(), EBDataFrame::id(), EEDataFrame::id(), EcalTrigTowerDetId::ieta(), EcalTrigTowerDetId::iphi(), it, iTTEta2cIndex(), iTTPhi2cIndex(), nTtEta, nTtPhi, funct::sin(), theta, EcalTrigTowerConstituentsMap::towerOf(), triggerTowerMap_, and ttEtSums.
Referenced by analyze().
00961 { 00962 //ecal geometry: 00963 static const CaloSubdetectorGeometry* eeGeometry = 0; 00964 static const CaloSubdetectorGeometry* ebGeometry = 0; 00965 if(eeGeometry==0 || ebGeometry==0){ 00966 edm::ESHandle<CaloGeometry> geoHandle; 00967 es.get<MyCaloGeometryRecord>().get(geoHandle); 00968 eeGeometry 00969 = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalEndcap); 00970 ebGeometry 00971 = (*geoHandle).getSubdetectorGeometry(DetId::Ecal, EcalBarrel); 00972 } 00973 00974 //init etSum array: 00975 for(int iEta0 = 0; iEta0 < nTtEta; ++iEta0){ 00976 for(int iPhi0 = 0; iPhi0 < nTtPhi; ++iPhi0){ 00977 ttEtSums[iEta0][iPhi0] = 0.; 00978 } 00979 } 00980 00981 for(EBDigiCollection::const_iterator it = ebDigis_->begin(); 00982 it != ebDigis_->end(); ++it){ 00983 const EBDataFrame& frame = *it; 00984 const EcalTrigTowerDetId& ttId = triggerTowerMap_->towerOf(frame.id()); 00985 // LogDebug("TT") 00986 // << ((EBDetId&)frame.id()).ieta() 00987 // << "," << ((EBDetId&)frame.id()).iphi() 00988 // << " -> " << ttId.ieta() << "," << ttId.iphi(); 00989 const int iTTEta0 = iTTEta2cIndex(ttId.ieta()); 00990 const int iTTPhi0 = iTTPhi2cIndex(ttId.iphi()); 00991 double theta = ebGeometry->getGeometry(frame.id())->getPosition().theta(); 00992 double e = frame2EnergyForTp(frame); 00993 if((frame2EnergyForTp(frame,-1) < e) && (frame2EnergyForTp(frame, 1) < e)){ 00994 ttEtSums[iTTEta0][iTTPhi0] += e*sin(theta); 00995 } 00996 } 00997 00998 for(EEDigiCollection::const_iterator it = eeDigis.begin(); 00999 it != eeDigis.end(); ++it){ 01000 const EEDataFrame& frame = *it; 01001 const EcalTrigTowerDetId& ttId = triggerTowerMap_->towerOf(frame.id()); 01002 const int iTTEta0 = iTTEta2cIndex(ttId.ieta()); 01003 const int iTTPhi0 = iTTPhi2cIndex(ttId.iphi()); 01004 // LogDebug("TT") << ": EE xtal->TT " 01005 // << ((EEDetId&)frame.id()).ix() 01006 // << "," << ((EEDetId&)frame.id()).iy() 01007 // << " -> " << ttId.ieta() << "," << ttId.iphi() << "\n"; 01008 double theta = eeGeometry->getGeometry(frame.id())->getPosition().theta(); 01009 double e = frame2EnergyForTp(frame); 01010 if((frame2EnergyForTp(frame,-1) < e) && (frame2EnergyForTp(frame, 1) < e)){ 01011 ttEtSums[iTTEta0][iTTPhi0] += e*sin(theta); 01012 } 01013 } 01014 01015 //dealing with pseudo-TT in two inner EE eta-ring: 01016 int innerTTEtas[] = {0, 1, 54, 55}; 01017 for(unsigned iRing = 0; iRing < sizeof(innerTTEtas)/sizeof(innerTTEtas[0]); 01018 ++iRing){ 01019 int iTTEta0 = innerTTEtas[iRing]; 01020 //this detector eta-section is divided in only 36 phi bins 01021 //For this eta regions, 01022 //current tower eta numbering scheme is inconsistent. For geometry 01023 //version 133: 01024 //- TT are numbered from 0 to 72 for 36 bins 01025 //- some TT have an even index, some an odd index 01026 //For geometry version 125, there are 72 phi bins. 01027 //The code below should handle both geometry definition. 01028 //If there are 72 input trigger primitives for each inner eta-ring, 01029 //then the average of the trigger primitive of the two pseudo-TT of 01030 //a pair (nEta, nEta+1) is taken as Et of both pseudo TTs. 01031 //If there are only 36 input TTs for each inner eta ring, then half 01032 //of the present primitive of a pseudo TT pair is used as Et of both 01033 //pseudo TTs. 01034 01035 for(unsigned iTTPhi0 = 0; iTTPhi0 < nTtPhi-1; iTTPhi0 += 2){ 01036 double et = .5*(ttEtSums[iTTEta0][iTTPhi0] 01037 +ttEtSums[iTTEta0][iTTPhi0+1]); 01038 //divides the TT into 2 phi bins in order to match with 72 phi-bins SRP 01039 //scheme or average the Et on the two pseudo TTs if the TT is already 01040 //divided into two trigger primitives. 01041 ttEtSums[iTTEta0][iTTPhi0] = et; 01042 ttEtSums[iTTEta0][iTTPhi0+1] = et; 01043 }
EcalScDetId EcalSelectiveReadoutValidation::superCrystalOf | ( | const EEDetId & | xtalId | ) | const [private] |
Retrieves the endcap supercrystal containing a given crysal.
xtalId | identifier of the crystal |
Definition at line 937 of file EcalSelectiveReadoutValidation.cc.
References EEDetId::ix(), EEDetId::iy(), scEdge, and EEDetId::zside().
Referenced by readOutUnitOf().
00940 { 00941 const int scEdge = 5; 00942 return EcalScDetId((xtalId.ix()-1)/scEdge+1, 00943 (xtalId.iy()-1)/scEdge+1,
When true, every histogram is enabled.
Definition at line 561 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
std::map<std::string, std::string> EcalSelectiveReadoutValidation::availableHistList_ [private] |
List of available histograms.
Filled by the booking methods. key: name, value: title.
Definition at line 570 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Switch for collection-not-found warning.
Definition at line 400 of file EcalSelectiveReadoutValidation.h.
DQMStore* EcalSelectiveReadoutValidation::dbe_ [private] |
Histogramming interface.
Definition at line 394 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation(), and ~EcalSelectiveReadoutValidation().
The event product collections.
Definition at line 405 of file EcalSelectiveReadoutValidation.h.
Referenced by analyze(), analyzeEB(), and setTtEtSums().
Energy deposited in ECAL barrel crystals.
Eta index starts from 0 at eta minimum and phi index starts at phi=0+ in CMS std coordinate system.
Definition at line 546 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation::Sorter::operator()().
Definition at line 407 of file EcalSelectiveReadoutValidation.h.
For book keeping of RU actually read out (not fully zero suppressed).
Definition at line 529 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
CollHandle<std::vector<PCaloHit> > EcalSelectiveReadoutValidation::ebSimHits_ [private] |
const int EcalSelectiveReadoutValidation::ebTtEdge = 5 [static, private] |
Number of crystals along an EB TT.
Definition at line 376 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
Definition at line 406 of file EcalSelectiveReadoutValidation.h.
Referenced by analyze(), and analyzeEE().
Energy deposited in ECAL endcap crystals.
Endcap index is 0 for EE- and 1 for EE+. X and Y index starts at x and y minimum in std CMS coordinate system.
Definition at line 552 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE().
CollHandle<std::vector<PCaloHit> > EcalSelectiveReadoutValidation::eeSimHits_ [private] |
Definition at line 410 of file EcalSelectiveReadoutValidation.h.
const EcalElectronicsMapping* EcalSelectiveReadoutValidation::elecMap_ [private] |
Ecal electronics/geometrical mapping.
Definition at line 479 of file EcalSelectiveReadoutValidation.h.
Referenced by beginJob().
Definition at line 416 of file EcalSelectiveReadoutValidation.h.
std::string EcalSelectiveReadoutValidation::histDir_ [private] |
Histogram directory PATH in DQM or within the output ROOT file.
Definition at line 565 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
std::set<std::string> EcalSelectiveReadoutValidation::histList_ [private] |
List of enabled histograms.
Special name "all" is used to indicate all available histograms.
Definition at line 557 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
int EcalSelectiveReadoutValidation::ievt_ [private] |
Event sequence number.
Definition at line 535 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and analyzeEE().
const int EcalSelectiveReadoutValidation::kByte_ = 1024 [static, private] |
Local reconstruction switch: true to reconstruct locally the amplitude insted of using the Rec Hits.
Definition at line 484 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and analyzeEE().
Definition at line 433 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), analyzeEE(), and EcalSelectiveReadoutValidation().
The histograms.
Definition at line 422 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 423 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 442 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
Definition at line 443 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
Definition at line 447 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
Definition at line 441 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
Definition at line 445 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
Definition at line 446 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
Definition at line 444 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
Definition at line 450 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE(), and EcalSelectiveReadoutValidation().
Definition at line 451 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE(), and EcalSelectiveReadoutValidation().
Definition at line 455 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE(), and EcalSelectiveReadoutValidation().
Definition at line 449 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE(), and EcalSelectiveReadoutValidation().
Definition at line 453 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE(), and EcalSelectiveReadoutValidation().
Definition at line 454 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE(), and EcalSelectiveReadoutValidation().
Definition at line 452 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE(), and EcalSelectiveReadoutValidation().
Definition at line 459 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
Definition at line 457 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
Definition at line 462 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and EcalSelectiveReadoutValidation().
Definition at line 461 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and EcalSelectiveReadoutValidation().
Definition at line 435 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and EcalSelectiveReadoutValidation().
Definition at line 464 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and EcalSelectiveReadoutValidation().
Definition at line 439 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and EcalSelectiveReadoutValidation().
Definition at line 436 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and EcalSelectiveReadoutValidation().
Definition at line 438 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and EcalSelectiveReadoutValidation().
Definition at line 437 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and EcalSelectiveReadoutValidation().
Definition at line 424 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 425 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 430 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 427 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 426 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 431 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 428 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 432 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 429 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
Definition at line 458 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and EcalSelectiveReadoutValidation().
const unsigned EcalSelectiveReadoutValidation::nDccs = 54 [static, private] |
Total number of DCCs.
Definition at line 346 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
int EcalSelectiveReadoutValidation::nEb_ [private] |
ECAL barrel read channel count.
Definition at line 496 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
const int EcalSelectiveReadoutValidation::nEbDccs = 36 [static, private] |
const int EcalSelectiveReadoutValidation::nEbEta = 170 [static, private] |
number of crystals along Eta in EB
Definition at line 364 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB().
int EcalSelectiveReadoutValidation::nEbHI_ [private] |
ECAL barrel high interest read channel count.
Definition at line 516 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
int EcalSelectiveReadoutValidation::nEbLI_ [private] |
ECAL barrel low interest read channel count.
Definition at line 512 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
const int EcalSelectiveReadoutValidation::nEbPhi = 360 [static, private] |
number of crystals along Phi in EB
Definition at line 367 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB().
const int EcalSelectiveReadoutValidation::nEbRus = 36*68 [static, private] |
int EcalSelectiveReadoutValidation::nEe_ [private] |
ECAL endcap read channel count.
Definition at line 500 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
const int EcalSelectiveReadoutValidation::nEeDccs = 18 [static, private] |
int EcalSelectiveReadoutValidation::nEeHI_ [private] |
ECAL endcap high interest read channel count.
Definition at line 508 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
int EcalSelectiveReadoutValidation::nEeLI_ [private] |
ECAL endcap low interest read channel count.
Definition at line 504 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
const int EcalSelectiveReadoutValidation::nEeRus = 2*(34+32+33+33+32+34+33+34+33) [static, private] |
const int EcalSelectiveReadoutValidation::nEeX = 100 [static, private] |
EE crystal grid size along X.
Definition at line 370 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE().
const int EcalSelectiveReadoutValidation::nEeY = 100 [static, private] |
EE crystal grid size along Y.
Definition at line 373 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE().
const int EcalSelectiveReadoutValidation::nEndcaps = 2 [static, private] |
number of endcaps
Definition at line 361 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEE().
int EcalSelectiveReadoutValidation::nPerDcc_[nDccs] [private] |
ECAL read channel count for each DCC:.
Definition at line 520 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
int EcalSelectiveReadoutValidation::nRuPerDcc_[nDccs] [private] |
Count for each DCC of RUs with at leat one channel read out:.
Definition at line 524 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi().
const int EcalSelectiveReadoutValidation::nTtEta = 56 [static, private] |
Number of Trigger Towers along Eta.
Definition at line 382 of file EcalSelectiveReadoutValidation.h.
Referenced by setTtEtSums().
const int EcalSelectiveReadoutValidation::nTtPhi = 72 [static, private] |
Number of Trigger Towers along Phi.
Definition at line 385 of file EcalSelectiveReadoutValidation.h.
Referenced by setTtEtSums().
std::string EcalSelectiveReadoutValidation::outputFile_ [private] |
Output file for histograms.
Definition at line 397 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation(), and ~EcalSelectiveReadoutValidation().
const double EcalSelectiveReadoutValidation::rad2deg = 45./atan(1.) [static, private] |
Conversion factor from radian to degree.
Definition at line 388 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeEB(), and analyzeEE().
const int EcalSelectiveReadoutValidation::scEdge = 5 [static, private] |
Number of crystals along a supercrystal edge.
Definition at line 379 of file EcalSelectiveReadoutValidation.h.
Referenced by anaDigi(), and superCrystalOf().
bool EcalSelectiveReadoutValidation::tpInGeV_ [private] |
Switch for uncompressing TP value.
Definition at line 492 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and EcalSelectiveReadoutValidation().
const EcalTPParameters* EcalSelectiveReadoutValidation::tpParam_ [private] |
Interface to access trigger primitive parameters, especially to convert Et in compressed formart into natural unit.
Definition at line 475 of file EcalSelectiveReadoutValidation.h.
ECAL trigger tower mapping.
Definition at line 470 of file EcalSelectiveReadoutValidation.h.
Referenced by beginJob(), readOutUnitOf(), and setTtEtSums().
double EcalSelectiveReadoutValidation::ttEtSums[nTtEta][nTtPhi] [private] |
Trigger tower Et computed as sum the crystal Et.
Indices stands for the eta and phi TT index starting from 0 at eta minimum and at phi=0+ in std CMS coordinate system.
Definition at line 541 of file EcalSelectiveReadoutValidation.h.
Referenced by analyzeTP(), and setTtEtSums().
bool EcalSelectiveReadoutValidation::verbose_ [private] |
Verbosity switch.
Definition at line 391 of file EcalSelectiveReadoutValidation.h.
Referenced by EcalSelectiveReadoutValidation().
std::vector<double> EcalSelectiveReadoutValidation::weights_ [private] |
Weights for amplitude local reconstruction.
Definition at line 488 of file EcalSelectiveReadoutValidation.h.