From 64018c7e92d697670d2752c2774f02797c7e93d9 Mon Sep 17 00:00:00 2001 From: Nancy Date: Thu, 2 Mar 2017 12:49:31 +0100 Subject: [PATCH 1/2] Update the dataformat for the TP per crystal. It now follows what presented to the L1-phase II workshop Dec 2016 --- .../interface/EcalEBTriggerPrimitiveDigi.h | 41 ++--- .../interface/EcalEBTriggerPrimitiveSample.h | 56 +++++++ .../src/EcalEBTriggerPrimitiveDigi.cc | 31 ++-- .../src/EcalEBTriggerPrimitiveSample.cc | 29 ++++ DataFormats/EcalDigi/src/classes_def.xml | 7 +- .../interface/EcalEBTrigPrimTestAlgo.h | 10 +- .../interface/EcalFenixTcpFormat.h | 4 +- .../src/EcalEBTrigPrimTestAlgo.cc | 84 +--------- .../src/EcalFenixTcpFormat.cc | 32 ++-- .../plugins/EcalEBTrigPrimAnalyzer.cc | 155 +++++++++++------- .../plugins/EcalEBTrigPrimAnalyzer.h | 3 + .../plugins/EcalEBTrigPrimProducer.cc | 4 +- .../test/checkTP_cfg.py | 10 +- .../test/test_EBTrigPrim_cfg.py | 95 +++++++---- 14 files changed, 301 insertions(+), 260 deletions(-) create mode 100644 DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveSample.h create mode 100644 DataFormats/EcalDigi/src/EcalEBTriggerPrimitiveSample.cc diff --git a/DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveDigi.h b/DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveDigi.h index 392820a386f9c..e38e2d8883ba2 100644 --- a/DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveDigi.h +++ b/DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveDigi.h @@ -4,12 +4,12 @@ #include #include #include "DataFormats/EcalDetId/interface/EBDetId.h" -#include "DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h" +#include "DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveSample.h" /** \class EcalEBTriggerPrimitiveDigi - +\author N. Marinelli - Univ. of Notre Dame */ @@ -31,36 +31,24 @@ class EcalEBTriggerPrimitiveDigi { const EBDetId& id() const { return id_; } int size() const { return size_; } - const EcalTriggerPrimitiveSample& operator[](int i) const { return data_[i]; } - const EcalTriggerPrimitiveSample& sample(int i) const { return data_[i]; } + const EcalEBTriggerPrimitiveSample& operator[](int i) const { return data_[i]; } + const EcalEBTriggerPrimitiveSample& sample(int i) const { return data_[i]; } void setSize(int size); - void setSample(int i, const EcalTriggerPrimitiveSample& sam); + void setSample(int i, const EcalEBTriggerPrimitiveSample& sam); void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); } static const int MAXSAMPLES = 20; - /// get the encoded/compressed Et of interesting sample - int compressedEt() const; - - - /// get the fine-grain bit of interesting sample - bool fineGrain() const; - - /// get the Trigger tower Flag of interesting sample - int ttFlag() const; - - /// Gets the "strip fine grain veto bit" (sFGVB) used as L1A spike detection - /// @return 0 spike like pattern - /// 1 EM shower like pattern - int sFGVB() const; - - /// Gets the L1A spike detection flag. Beware the flag is inverted. - /// Deprecated, use instead sFGVB() method, whose name is less missleading - /// @return 0 spike like pattern - /// 1 EM shower like pattern - int l1aSpike() const { return sFGVB(); } + /// get the 10 bits Et of interesting sample + int encodedEt() const; + /// Spike flag + bool l1aSpike() const; + + /// Time info + int time() const; + /// True if debug mode (# of samples > 1) bool isDebug() const; @@ -70,7 +58,8 @@ class EcalEBTriggerPrimitiveDigi { private: EBDetId id_; int size_; - std::vector data_; + std::vector data_; + }; diff --git a/DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveSample.h b/DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveSample.h new file mode 100644 index 0000000000000..281c449a78460 --- /dev/null +++ b/DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveSample.h @@ -0,0 +1,56 @@ +#ifndef ECALEBTRIGGERPRIMITIVESAMPLE_H +#define ECALEBTRIGGERPRIMITIVESAMPLE_H 1 + +#include +#include + + + +/** \class EcalEBTriggerPrimitiveSample +\author N. Marinelli - Univ of Notre Dame + +*/ + +class EcalEBTriggerPrimitiveSample { + public: + EcalEBTriggerPrimitiveSample(); + EcalEBTriggerPrimitiveSample(uint16_t data); + EcalEBTriggerPrimitiveSample(int encodedEt); + EcalEBTriggerPrimitiveSample(int encodedEt, bool isASpike); + EcalEBTriggerPrimitiveSample(int encodedEt, bool isASpike, int timing); + + ///Set data + void setValue(uint16_t data){ theSample = data;} + // The sample is a 16 bit word defined as: + // + // o o o o o o o o o o o o o o o o + // |________| |____________________| + // ~60ps res spike Et + // time info flag + // + + + /// get the raw word + uint16_t raw() const { return theSample; } + + /// get the encoded Et (10 bits) + int encodedEt() const { return theSample&0x3FF; } + + bool l1aSpike() const { return (theSample&0x400)!=0; } + + int time() const { return theSample>>11; } + + /// for streaming + uint16_t operator()() { return theSample; } + + private: + uint16_t theSample; + +}; + +std::ostream& operator<<(std::ostream& s, const EcalEBTriggerPrimitiveSample& samp); + + + + +#endif diff --git a/DataFormats/EcalDigi/src/EcalEBTriggerPrimitiveDigi.cc b/DataFormats/EcalDigi/src/EcalEBTriggerPrimitiveDigi.cc index 9d03287f60df3..cb0d0f7bf06ca 100644 --- a/DataFormats/EcalDigi/src/EcalEBTriggerPrimitiveDigi.cc +++ b/DataFormats/EcalDigi/src/EcalEBTriggerPrimitiveDigi.cc @@ -12,7 +12,7 @@ EcalEBTriggerPrimitiveDigi::EcalEBTriggerPrimitiveDigi(const EBDetId& id) : id_( size_(0), data_(MAXSAMPLES) { } -void EcalEBTriggerPrimitiveDigi::setSample(int i, const EcalTriggerPrimitiveSample& sam) +void EcalEBTriggerPrimitiveDigi::setSample(int i, const EcalEBTriggerPrimitiveSample& sam) { // std::cout << " In setSample i " << i << " sam " << sam << std::endl; data_[i]=sam; @@ -31,39 +31,30 @@ int EcalEBTriggerPrimitiveDigi::sampleOfInterest() const } /// get the encoded/compressed Et of interesting sample -int EcalEBTriggerPrimitiveDigi::compressedEt() const +int EcalEBTriggerPrimitiveDigi::encodedEt() const { int sample = sampleOfInterest(); if (sample != -1) - return data_[sample].compressedEt(); + return data_[sample].encodedEt(); else return -1; } - -/// get the fine-grain bit of interesting sample -bool EcalEBTriggerPrimitiveDigi::fineGrain() const -{ - int sample = sampleOfInterest(); - if (sample != -1) - return data_[sample].fineGrain(); - else - return false; -} -/// get the Trigger tower Flag of interesting sample -int EcalEBTriggerPrimitiveDigi::ttFlag() const -{ + + +bool EcalEBTriggerPrimitiveDigi::l1aSpike() const +{ int sample = sampleOfInterest(); if (sample != -1) - return data_[sample].ttFlag(); + return data_[sample].l1aSpike(); else return -1; -} +} -int EcalEBTriggerPrimitiveDigi::sFGVB() const +int EcalEBTriggerPrimitiveDigi::time() const { int sample = sampleOfInterest(); if (sample != -1) - return data_[sample].l1aSpike(); + return data_[sample].time(); else return -1; } diff --git a/DataFormats/EcalDigi/src/EcalEBTriggerPrimitiveSample.cc b/DataFormats/EcalDigi/src/EcalEBTriggerPrimitiveSample.cc new file mode 100644 index 0000000000000..b87d0f89a9343 --- /dev/null +++ b/DataFormats/EcalDigi/src/EcalEBTriggerPrimitiveSample.cc @@ -0,0 +1,29 @@ +#include "DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveSample.h" + + + +EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample() : theSample(0) { } +EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample(uint16_t data) : theSample(data) { } + +EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample(int encodedEt, bool isASpike) { + theSample=(encodedEt&0x3FF)| ((isASpike)?(0x400):(0)); +} + + +EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample(int encodedEt, bool isASpike, int timing) { + theSample=(encodedEt&0x3FF)| ((isASpike)?(0x400):(0)) | timing<<11; +} + + +EcalEBTriggerPrimitiveSample::EcalEBTriggerPrimitiveSample(int encodedEt) { + theSample=encodedEt&0x3FF; +} + + + +std::ostream& operator<<(std::ostream& s, const EcalEBTriggerPrimitiveSample& samp) { + return s << "ET=" << samp.encodedEt() << ", isASpike=" << samp.l1aSpike()<< " timing= " << samp.time() ; + +} + + diff --git a/DataFormats/EcalDigi/src/classes_def.xml b/DataFormats/EcalDigi/src/classes_def.xml index 308fceee8eda8..cd9b32c91ae11 100644 --- a/DataFormats/EcalDigi/src/classes_def.xml +++ b/DataFormats/EcalDigi/src/classes_def.xml @@ -17,11 +17,14 @@ + + + - - + + diff --git a/SimCalorimetry/EcalEBTrigPrimAlgos/interface/EcalEBTrigPrimTestAlgo.h b/SimCalorimetry/EcalEBTrigPrimAlgos/interface/EcalEBTrigPrimTestAlgo.h index c76ba352aa39c..47a37e2264912 100644 --- a/SimCalorimetry/EcalEBTrigPrimAlgos/interface/EcalEBTrigPrimTestAlgo.h +++ b/SimCalorimetry/EcalEBTrigPrimAlgos/interface/EcalEBTrigPrimTestAlgo.h @@ -1,9 +1,9 @@ #ifndef EcalEBTrigPrimTestAlgo_h #define EcalEBTrigPrimTestAlgo_h /** \class EcalEBTrigPrimTestAlgo +\author N. Marinelli - Univ. of Notre Dame * forPhase II - * As of now we do not know yet how the electronics would look like - * so for now we build some machinery to produce TPs which are taken from the RecHits + * While the new digitization is not yet implemented, we use the old Digis to make TP per crystal * ************************************************************/ #include @@ -38,7 +38,7 @@ class EcalTrigTowerDetId; class ETPCoherenceTest; -class EcalTriggerPrimitiveSample; +class EcalEBTriggerPrimitiveSample; class CaloSubdetectorGeometry; class EBDataFrame; @@ -128,8 +128,8 @@ class EcalEBTrigPrimTestAlgo std::vector > > > towerMapEB_; std::vector > > > towerMapEE_; std::vector > hitTowers_; - std::vector towtp_; - std::vector towtp2_; + std::vector towtp_; + std::vector towtp2_; enum {nbMaxStrips_=5}; enum {nbMaxXtals_=5}; diff --git a/SimCalorimetry/EcalEBTrigPrimAlgos/interface/EcalFenixTcpFormat.h b/SimCalorimetry/EcalEBTrigPrimAlgos/interface/EcalFenixTcpFormat.h index 5c5343e3d50bb..ca48c874535a0 100644 --- a/SimCalorimetry/EcalEBTrigPrimAlgos/interface/EcalFenixTcpFormat.h +++ b/SimCalorimetry/EcalEBTrigPrimAlgos/interface/EcalFenixTcpFormat.h @@ -1,7 +1,7 @@ #ifndef ECAL_FENIX_TCP_FORMAT_H #define ECAL_FENIX_TCP_FORMAT_H -#include "DataFormats/EcalDigi/interface/EcalTriggerPrimitiveSample.h" +#include "DataFormats/EcalDigi/interface/EcalEBTriggerPrimitiveSample.h" #include class EcalTPGLutGroup ; @@ -26,7 +26,7 @@ class EcalFenixTcpFormat { virtual ~EcalFenixTcpFormat(); void process(std::vector&,std::vector&); - void process(std::vector &Et, std::vector &fgvb, std::vector &sfgvb, int eTTotShift, std::vector & out, std::vector & outTcc, bool isInInnerRings) ; + void process(std::vector &Et, std::vector &fgvb, std::vector &sfgvb, int eTTotShift, std::vector & out, std::vector & outTcc, bool isInInnerRings) ; void setParameters(uint32_t towid,const EcalTPGLutGroup *ecaltpgLutGroup,const EcalTPGLutIdMap *ecaltpgLut, const EcalTPGTowerStatus *ecaltpgbadTT, const EcalTPGSpike * ecaltpgSpike); private: diff --git a/SimCalorimetry/EcalEBTrigPrimAlgos/src/EcalEBTrigPrimTestAlgo.cc b/SimCalorimetry/EcalEBTrigPrimAlgos/src/EcalEBTrigPrimTestAlgo.cc index c2597fbbca8ef..6c0366b345349 100644 --- a/SimCalorimetry/EcalEBTrigPrimAlgos/src/EcalEBTrigPrimTestAlgo.cc +++ b/SimCalorimetry/EcalEBTrigPrimAlgos/src/EcalEBTrigPrimTestAlgo.cc @@ -101,81 +101,6 @@ EcalEBTrigPrimTestAlgo::~EcalEBTrigPrimTestAlgo() delete fenixTcpFormat_; } -/* -void EcalEBTrigPrimTestAlgo::run(const edm::EventSetup & setup, EcalRecHitCollection const * rh, - EcalEBTrigPrimDigiCollection & result, - EcalEBTrigPrimDigiCollection & resultTcp) -{ - - - - //std::cout << " EcalEBTrigPrimTestAlgo: Testing that the algorythm is well plugged " << std::endl; - //std::cout << " EcalEBTrigPrimTestAlgo: recHit size " << rh->size() << std::endl; - - edm::ESHandle theBarrelGeometry_handle; - setup.get().get("EcalBarrel",theBarrelGeometry_handle); - const CaloSubdetectorGeometry *theBarrelGeometry; - theBarrelGeometry = &(*theBarrelGeometry_handle); - - - EcalEBTriggerPrimitiveDigi tp; - std::vector tpSam[10]; - - - uint16_t fEt; - double EtSat=128.; - - for (unsigned int i=0;isize();i++) { - const EBDetId & myid1=(*rh)[i].id(); - if ( (*rh)[i].energy() < 0.2 ) continue; - tp= EcalEBTriggerPrimitiveDigi( myid1); - tp.setSize(nSamples_); - int nSam=0; - - for (int iSample=0; iSamplegetGeometry(myid1)->getPosition().theta(); - //uint16_t et=((*rh)[i].energy())*sin(theta); - double et=((*rh)[i].energy())*sin(theta); - - double lsb10bits = 0. ; - int tpgADC10b = 0.; - lsb10bits = EtSat/1024. ; - if (lsb10bits>0) - tpgADC10b = int(et/lsb10bits+0.5) ; - - if (debug_) std::cout << " Et in GeV " << et << " tpgADC10b " << tpgADC10b << std::endl; - fEt=et; - - - // if (fEt >0xfff) - // fEt=0xfff; - //fEt >>=2; - //if (fEt>0x3ff) fEt=0x3ff; - - //std::cout << " Et after formatting " << fEt << std::endl; - EcalTriggerPrimitiveSample mysam(fEt); - tp.setSample(nSam, mysam ); - nSam++; - if (debug_) std::cout << "in TestAlgo" <<" tp size "<getFormatter()->setParameters( thisTower.rawId(),ecaltpgLutGroup_,ecaltpgLut_,ecaltpgBadTT_,ecaltpgSpike_); this->getFormatter()->process(format_out_,tcpformat_out_); - // loop over the time samples and fill the TP int nSam=0; for (int iSample=firstSample;iSample<=lastSample;++iSample) { etInADC= tcpformat_out_[iSample]; if (debug_) std::cout << " format_out " << tcpformat_out_[iSample] << " etInADC " << etInADC << std::endl; - // EcalTriggerPrimitiveSample mysam(etInADC); - //tp.setSample(nSam, mysam ); - tp.setSample(nSam, EcalTriggerPrimitiveSample(etInADC, false, 0) ); + bool isASpike=0; // no spikes for now + int timing=31; // dummy value for now + tp.setSample(nSam, EcalEBTriggerPrimitiveSample(etInADC,isASpike,timing) ); nSam++; if (debug_) std::cout << "in TestAlgo" <<" tp size "< &Etin, std::vector &Etout int myEt; int eTTotShift=2; - //std::cout << " FenixTcpFormatter Etin size() " << Etin.size() << std::endl; + // std::cout << " FenixTcpFormatter Etin size() " << Etin.size() << std::endl; for (unsigned int i=0; i &Etin, std::vector &Etout //std::cout << " after myEt>>= eTTotShift " << myEt << std::endl; if (myEt>0x3ff) myEt=0x3ff ; - - int lut_out; - if (*badTTStatus_!=0){ - lut_out = 0; - } - else - lut_out = (lut_)[myEt] ; - - // int ttFlag = (lut_out & 0x700) >> 8 ; - - myEt = lut_out & 0xff ; - //std::cout << " FenixTcpFormatter final lut_out " << lut_out << " 0xff " << 0xff << " et " << myEt << std::endl; + + //myEt = lut_out & 0xff ; + // the lut is foreseen for 8 bits. Useless to use it here + + // stay with 10 bits Etout[i]=myEt; } @@ -63,8 +56,8 @@ void EcalFenixTcpFormat::process(std::vector &Etin, std::vector &Etout void EcalFenixTcpFormat::process(std::vector &Et, std::vector &fgvb, std::vector &sfgvb,int eTTotShift, - std::vector & out, - std::vector & out2, bool isInInnerRings){ + std::vector & out, + std::vector & out2, bool isInInnerRings){ // put TP-s in the output // on request also in TcpFormat // for famos version we have to write dummies except for the middle @@ -89,9 +82,10 @@ void EcalFenixTcpFormat::process(std::vector &Et, std::vector &fgvb, int ttFlag = (lut_out & 0x700) >> 8 ; myEt = lut_out & 0xff ; - out[i]=EcalTriggerPrimitiveSample( myEt,fgvb[0],sfgvb[0],ttFlag); + // out[i]=EcalEBTriggerPrimitiveSample( myEt,fgvb[0],sfgvb[0],ttFlag); + out[i]=EcalEBTriggerPrimitiveSample( myEt ); } - else out[i]=EcalTriggerPrimitiveSample( ); + else out[i]=EcalEBTriggerPrimitiveSample( ); } } else { @@ -129,13 +123,13 @@ void EcalFenixTcpFormat::process(std::vector &Et, std::vector &fgvb, int ttFlag = (lut_out & 0x700) >> 8 ; if (tcpFormat_) { - out2[i]=EcalTriggerPrimitiveSample( ((ttFlag&0x7)<<11) | ((myFgvb & 0x1)<<10) | (myEt & 0x3ff)); + out2[i]=EcalEBTriggerPrimitiveSample( myEt & 0x3ff); //std::cout << " FenixTcpFormatter final et " << (myEt & 0x3ff) << std::endl; } myEt = lut_out & 0xff ; //std::cout << " FenixTcpFormatter final lut_out " << lut_out << " 0xff " << 0xff << " et " << myEt << std::endl; - out[i]=EcalTriggerPrimitiveSample( myEt,myFgvb,mysFgvb,ttFlag); + out[i]=EcalEBTriggerPrimitiveSample( myEt ); } } } diff --git a/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimAnalyzer.cc b/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimAnalyzer.cc index b436fd249fc1d..a639b13889323 100644 --- a/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimAnalyzer.cc +++ b/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimAnalyzer.cc @@ -66,19 +66,23 @@ EcalEBTrigPrimAnalyzer::EcalEBTrigPrimAnalyzer(const edm::ParameterSet& iConfig nEvents_=0; hTPvsTow_eta_= new TH2F("TP_vs_Tow_eta","TP vs Tow eta ; #eta(tow); #eta(tp)",50,-2.5,2.5,50,-2.5,2.5); + hAllTPperEvt_ = new TH1F("AllTPperEvt","TP per Event; N_{TP}; ", 100, 0., 20000.); + hTPperEvt_ = new TH1F("TPperEvt","N_{TP} per Event; N_{TP}; ", 100, 0., 500.); + hTP_iphiVsieta_= new TH2F("TP_iphiVsieta","TP i#phi vs i#eta ; i#eta(tp); i#phi(tp)",10,70,80,10,340,350); + hTP_iphiVsieta_fullrange_= new TH2F("TP_iphiVsieta_fullrange","TP i#phi vs i#eta ; i#eta(tp); i#phi(tp)",200,-100,100,350,0,350); + if (recHits_) { hTPvsTow_ieta_= new TH2F("TP_vs_Tow_ieta","TP vs Tow ieta ; i#eta(tow); i#eta(tp)",200,-100,100,200,-100,100); hTPvsRechit_= new TH2F("TP_vs_RecHit","TP vs rechit Et;E_{T}(rh) (GeV);E_{T}(tp) (GeV)",100,0,50,100,0,50); - hTPoverRechit_= new TH1F("TP_over_RecHit","Et(TP/rechit); E_{T}(tp)/E_{T}(rh); Counts",500,0,4); + hDeltaEt_ = new TH1F("DeltaEt","[Et(rh)-Et(TP)]/Et(rh); [E_{T}(rh)-E_{T}(tp)]/E_{T}(rh); Counts",200,-1,1); + hTPoverRechit_= new TH1F("TP_over_RecHit","Et(TP/rechit); E_{T}(tp)/E_{T}(rh); Counts",200,0,2); hRechitEt_= new TH1F("RecHitEt","E_{T};E_{T}(rh) (GeV);Counts",100,0,50); hTPEt_= new TH1F("TPEt","E_{T}{tp);E_{T}(rh) (GeV);Count",100,0,50); hRatioEt_ = new TH1F("RatioTPoverRH","Et",100,0,50); hAllRechitEt_= new TH1F("AllRecHit","Et",100,0,50); - hTP_iphiVsieta_= new TH2F("TP_iphiVsieta","TP i#phi vs i#eta ; i#eta(tp); i#phi(tp)",10,70,80,10,340,350); hRH_iphiVsieta_= new TH2F("RH_iphiVsieta","RH i#phi vs i#eta ; i#eta(rh); i#phi(rh)",10,70,80,10,340,350); - hTP_iphiVsieta_fullrange_= new TH2F("TP_iphiVsieta_fullrange","TP i#phi vs i#eta ; i#eta(tp); i#phi(tp)",200,-100,100,350,0,350); hRH_iphiVsieta_fullrange_= new TH2F("RH_iphiVsieta_fullrange","RH i#phi vs i#eta ; i#eta(rh); i#phi(rh)",200,-100,100,350,0,350); @@ -132,64 +136,81 @@ EcalEBTrigPrimAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup EcalEBTriggerPrimitiveDigi d=(*(tp.product()))[i]; int subdet=0; if (subdet==0) { - ecal_et_[subdet]->Fill(d.compressedEt()); + ecal_et_[subdet]->Fill(d.encodedEt()); } } - if (!recHits_) return; - // comparison with RecHits + + // if (!recHits_) return; + edm::Handle rechit_EB_col; - iEvent.getByToken(rechits_labelEB_,rechit_EB_col); - + if ( recHits_ ) { + // get the RecHits + iEvent.getByToken(rechits_labelEB_,rechit_EB_col); + } edm::ESHandle theBarrelGeometry_handle; iSetup.get().get("EcalBarrel",theBarrelGeometry_handle); const CaloSubdetectorGeometry *theBarrelGeometry; theBarrelGeometry = &(*theBarrelGeometry_handle); - if (debug_) std::cout << " TP analyzer =================> Treating event "<size() << " Number of TPs " << tp.product()->size() << std::endl; - + if (debug_) { std::cout << " TP analyzer =================> Treating event "<size() << std::endl; + if ( recHits_ ) std::cout << " Number of EB rechits "<< rechit_EB_col.product()->size() << std::endl; + } + hAllTPperEvt_->Fill(float(tp.product()->size())); + //if ( iEvent.id().event() != 648) return; //EcalEBTPGScale ecalScale ; EcalTPGScale ecalScale ; ecalScale.setEventSetup(iSetup) ; - - + + // for(unsigned int iDigi = 0; iDigi < ebdigi->size() ; ++iDigi) { // EBDataFrame myFrame((*ebdigi)[iDigi]); // const EBDetId & myId = myFrame.id(); - - for (unsigned int i=0;isize();i++) { - EcalEBTriggerPrimitiveDigi d=(*(tp.product()))[i]; - const EBDetId TPid= d.id(); - // if ( myId != TPid ) continue; - - - /* - int index=getIndex(ebdigi,coarser); - std::cout << " Same xTal " << myId << " " << TPid << " coarser " << coarser << " index " << index << std::endl; - double Et = ecalScale.getTPGInGeV(d.compressedEt(), coarser) ; - */ - float Et=d.compressedEt()*0.5; - if ( Et==0) continue; - - // EcalTrigTowerDetId coarser=(*eTTmap_).towerOf(myId); - // does not work float etaTow = theBarrelGeometry->getGeometry(coarser)->getPosition().theta(); - // float etaTP = theBarrelGeometry->getGeometry(TPid)->getPosition().eta(); - // does not work hTPvsTow_eta_->Fill ( etaTow, etaTP ); - // hTPvsTow_ieta_->Fill ( coarser.ieta(), TPid.ieta() ); - - - tpIphi_ = TPid.iphi() ; - tpIeta_ = TPid.ieta() ; - tpgADC_ = d.compressedEt(); - tpgGeV_ = Et ; - - hTP_iphiVsieta_->Fill(TPid.ieta(), TPid.iphi(), Et); - hTP_iphiVsieta_fullrange_->Fill(TPid.ieta(), TPid.iphi(), Et); - + int nTP=0; + for (unsigned int i=0;isize();i++) { + EcalEBTriggerPrimitiveDigi d=(*(tp.product()))[i]; + const EBDetId TPid= d.id(); + // if ( myId != TPid ) continue; + + + /* + int index=getIndex(ebdigi,coarser); + std::cout << " Same xTal " << myId << " " << TPid << " coarser " << coarser << " index " << index << std::endl; + double Et = ecalScale.getTPGInGeV(d.encodedEt(), coarser) ; + */ + //this works if the energy is compressed into 8 bits float Et=d.compressedEt()/2.; // 2ADC counts/GeV + float Et=d.encodedEt()/8.; // 8 ADCcounts/GeV + if ( Et<= 5 ) continue; + //if ( Et<= 0 ) continue; + nTP++; + + std::cout << " TP digi size " << d.size() << std::endl; + for (int iBx=0;iBxgetGeometry(coarser)->getPosition().theta(); + // float etaTP = theBarrelGeometry->getGeometry(TPid)->getPosition().eta(); + // does not work hTPvsTow_eta_->Fill ( etaTow, etaTP ); + // hTPvsTow_ieta_->Fill ( coarser.ieta(), TPid.ieta() ); + + + tpIphi_ = TPid.iphi() ; + tpIeta_ = TPid.ieta() ; + tpgADC_ = d.encodedEt(); + tpgGeV_ = Et ; + + hTP_iphiVsieta_->Fill(TPid.ieta(), TPid.iphi(), Et); + hTP_iphiVsieta_fullrange_->Fill(TPid.ieta(), TPid.iphi(), Et); + + + if ( recHits_ ) { for (unsigned int j=0;jsize();j++) { const EBDetId & myid1=(*rechit_EB_col.product())[j].id(); float theta = theBarrelGeometry->getGeometry(myid1)->getPosition().theta(); @@ -198,15 +219,15 @@ EcalEBTrigPrimAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup if (debug_) std::cout << " Analyzer same cristal " << myid1 << " " << TPid << std::endl; // if ( rhEt < 1.5 && Et > 10 ) { // std::cout << " TP analyzer =================> Treating event "<size() << " Number of TPs " << tp.product()->size() << std::endl; - //std::cout << " TP compressed et " << d.compressedEt() << " Et in GeV " << Et << " RH Et " << rhEt << " Et/rhEt " << Et/rhEt << std::endl; + //std::cout << " TP compressed et " << d.encodedEt() << " Et in GeV " << Et << " RH Et " << rhEt << " Et/rhEt " << Et/rhEt << std::endl; //} - + //std::cout << " TP out " << d << std::endl; - + // for (int isam=0;isam< d.size();++isam) { // std::cout << " d[isam].raw() " << d[isam].raw() << std::endl; //} - + rhIphi_ = myid1.iphi() ; rhIeta_ = myid1.ieta() ; hRH_iphiVsieta_->Fill(myid1.ieta(), myid1.iphi(), rhEt); @@ -214,31 +235,35 @@ EcalEBTrigPrimAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup hTPvsRechit_->Fill(rhEt,Et); hTPoverRechit_->Fill(Et/rhEt); - if (debug_) std::cout << " TP compressed et " << d.compressedEt() << " Et in GeV " << Et << " RH Et " << rhEt << " Et/rhEt " << Et/rhEt << std::endl; + hDeltaEt_ ->Fill ((rhEt-Et)/rhEt); + if (debug_) std::cout << " TP compressed et " << d.encodedEt() << " Et in GeV " << Et << " RH Et " << rhEt << " Et/rhEt " << Et/rhEt << std::endl; hRechitEt_->Fill(rhEt); hTPEt_->Fill(Et); if ( rhEt < 1000000) eRec_ = rhEt; tree_->Fill() ; } - - } - - } // end loop over TP collection + + } // end loop of recHits + } // if recHits - // } // end loop over digi collection + } // end loop over TP collection - hRatioEt_->Divide( hTPEt_, hRechitEt_); - - for (unsigned int j=0;jsize();j++) { - const EBDetId & myid1=(*rechit_EB_col.product())[j].id(); - float theta = theBarrelGeometry->getGeometry(myid1)->getPosition().theta(); - float rhEt=((*rechit_EB_col.product())[j].energy())*sin(theta); - if ( rhEt >0 ) - hAllRechitEt_ ->Fill(rhEt); - } - - + // } // end loop over digi collection + hTPperEvt_->Fill(float(nTP)); + + if ( recHits_) { + hRatioEt_->Divide( hTPEt_, hRechitEt_); + for (unsigned int j=0;jsize();j++) { + const EBDetId & myid1=(*rechit_EB_col.product())[j].id(); + float theta = theBarrelGeometry->getGeometry(myid1)->getPosition().theta(); + float rhEt=((*rechit_EB_col.product())[j].energy())*sin(theta); + if ( rhEt >0 ) + hAllRechitEt_ ->Fill(rhEt); + } + } + + } void @@ -250,6 +275,9 @@ EcalEBTrigPrimAnalyzer::endJob(){ } + hAllTPperEvt_->Write(); + hTPperEvt_->Write(); + if (recHits_) { hTPvsTow_ieta_->Write(); hTPvsTow_eta_->Write(); @@ -257,6 +285,7 @@ EcalEBTrigPrimAnalyzer::endJob(){ hTPoverRechit_->Write(); hAllRechitEt_->Write(); hRechitEt_->Write(); + hDeltaEt_ ->Write(); hTPEt_->Write(); hRatioEt_->Write(); hTP_iphiVsieta_->Write(); diff --git a/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimAnalyzer.h b/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimAnalyzer.h index ed23c1b38548b..e2a153cd68965 100644 --- a/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimAnalyzer.h +++ b/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimAnalyzer.h @@ -41,8 +41,11 @@ class EcalEBTrigPrimAnalyzer : public edm::one::EDAnalyzer<> { TH1I * ecal_fgvb_[2]; TH1I *histEndc,*histBar; TFile *histfile_; + TH1F *hAllTPperEvt_; + TH1F *hTPperEvt_; TH2F *hTPvsRechit_; TH1F *hTPoverRechit_; + TH1F *hDeltaEt_; TH1F *hAllRechitEt_; TH1F *hRechitEt_; TH1F *hTPEt_; diff --git a/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimProducer.cc b/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimProducer.cc index 48fde2dec0819..72cfc39146379 100644 --- a/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimProducer.cc +++ b/SimCalorimetry/EcalEBTrigPrimProducers/plugins/EcalEBTrigPrimProducer.cc @@ -203,9 +203,9 @@ EcalEBTrigPrimProducer::produce(edm::Event& e, const edm::EventSetup& iSetup) std::cout << "EcalTPG Printing only non zero TP " <<" For tower "<<(((*pOut)[i])).id()<<", TP is "<<(*pOut)[i]; for (int isam=0;isam<(*pOut)[i].size();++isam) { - if ( (*pOut)[i][isam].compressedEt() > 0) { + if ( (*pOut)[i][isam].encodedEt() > 0) { nonZeroTP++; - std::cout << " (*pOut)[i][isam].raw() " << (*pOut)[i][isam].raw() << " (*pOut)[i][isam].compressedEt() " << (*pOut)[i][isam].compressedEt() << std::endl; + std::cout << " (*pOut)[i][isam].raw() " << (*pOut)[i][isam].raw() << " (*pOut)[i][isam].encodedEt() " << (*pOut)[i][isam].encodedEt() << std::endl; } } } diff --git a/SimCalorimetry/EcalEBTrigPrimProducers/test/checkTP_cfg.py b/SimCalorimetry/EcalEBTrigPrimProducers/test/checkTP_cfg.py index d6340dfd5d5f9..e25c90e54e0de 100644 --- a/SimCalorimetry/EcalEBTrigPrimProducers/test/checkTP_cfg.py +++ b/SimCalorimetry/EcalEBTrigPrimProducers/test/checkTP_cfg.py @@ -10,12 +10,12 @@ process.load("CalibCalorimetry.EcalTPGTools.ecalTPGScale_cff") process.source = cms.Source("PoolSource", - fileNames = cms.untracked.vstring('file:EBTP_PhaseII_RelVal2017HGGWithPU.root') -# fileNames = cms.untracked.vstring('file:EBTP_PhaseII.root') + +fileNames = cms.untracked.vstring('file:EBTP_PhaseII_TESTDF_uncompEt_spikeflag.root') ) process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(-1) + input = cms.untracked.int32(2000) ) from SimCalorimetry.EcalTrigPrimProducers.ecalTrigPrimESProducer_cff import * @@ -24,8 +24,8 @@ inputRecHitsEB = cms.InputTag("ecalRecHit","EcalRecHitsEB"), barrelEcalDigis = cms.InputTag("simEcalDigis","ebDigis"), AnalyzeRecHits = cms.bool(True), - Debug = cms.bool(True), - inputTP = cms.InputTag("EcalEBTrigPrimProducer") + Debug = cms.bool(False), + inputTP = cms.InputTag("simEcalEBTriggerPrimitiveDigis") ) diff --git a/SimCalorimetry/EcalEBTrigPrimProducers/test/test_EBTrigPrim_cfg.py b/SimCalorimetry/EcalEBTrigPrimProducers/test/test_EBTrigPrim_cfg.py index 0747fd203cb18..a13a85d59a605 100644 --- a/SimCalorimetry/EcalEBTrigPrimProducers/test/test_EBTrigPrim_cfg.py +++ b/SimCalorimetry/EcalEBTrigPrimProducers/test/test_EBTrigPrim_cfg.py @@ -13,42 +13,66 @@ process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(2000) ) process.source = cms.Source("PoolSource", -# fileNames = cms.untracked.vstring('file:/hdfs/store/mc/TTI2023Upg14D/SingleElectronFlatPt0p2To50/GEN-SIM-DIGI-RAW/PU140bx25_PH2_1K_FB_V3-v2/00000/80EE54BB-1EE6-E311-877F-002354EF3BE0.root') -# fileNames = cms.untracked.vstring('file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre9/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/81X_mcRun2_asymptotic_v2_2023LReco-v1/10000/0E8B87C3-4953-E611-A003-0CC47A4D762A.root') - ###### fileNames = cms.untracked.vstring('file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre9/RelValSingleElectronPt35Extended/GEN-SIM-RECO/81X_mcRun2_asymptotic_v2_2023LReco-v1/10000/72FC7A8C-4E53-E611-95D6-0CC47A78A360.root') + + fileNames = cms.untracked.vstring( + '/store/relval/CMSSW_9_0_0_pre4/RelValSingleElectronPt35_UP15/GEN-SIM-RECO/90X_mcRun2_asymptotic_v1-v1/10000/C09AD137-73EA-E611-A5F2-0CC47A4D769A.root', + '/store/relval/CMSSW_9_0_0_pre4/RelValSingleElectronPt35_UP15/GEN-SIM-RECO/90X_mcRun2_asymptotic_v1-v1/10000/FE7D0259-73EA-E611-B051-0CC47A4D76B2.root' +), + +secondaryFileNames= cms.untracked.vstring( + '/store/relval/CMSSW_9_0_0_pre4/RelValSingleElectronPt35_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/90X_mcRun2_asymptotic_v1-v1/10000/A2D41E53-6CEA-E611-9910-0025905A60B0.root', + '/store/relval/CMSSW_9_0_0_pre4/RelValSingleElectronPt35_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/90X_mcRun2_asymptotic_v1-v1/10000/E6142211-6DEA-E611-BDD6-0CC47A4D7658.root', + '/store/relval/CMSSW_9_0_0_pre4/RelValSingleElectronPt35_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/90X_mcRun2_asymptotic_v1-v1/10000/E828680A-6DEA-E611-9CB6-0CC47A78A418.root') + + +# this is the good one +# two files does not work here #fileNames = cms.untracked.vstring( -#'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-RECO/PU25ns_81X_mcRun2_asymptotic_v8-v1/00000/B2E44B0F-6688-E611-B87B-0025905A6132.root', -#'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-RECO/PU25ns_81X_mcRun2_asymptotic_v8-v1/00000/12C68C0A-6688-E611-BB17-0CC47A4D7694.root' +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre9/RelValSingleElectronPt35Extended/GEN-SIM-RECO/81X_mcRun2_asymptotic_v2_2023LReco-v1/10000/421F5CDF-4F53-E611-B5C2-0CC47A4D7686.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre9/RelValSingleElectronPt35Extended/GEN-SIM-RECO/81X_mcRun2_asymptotic_v2_2023LReco-v1/10000/72FC7A8C-4E53-E611-95D6-0CC47A78A360.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre9/RelValSingleElectronPt35Extended/GEN-SIM-RECO/81X_mcRun2_asymptotic_v2_2023LReco-v1/10000/BACF3CE0-4F53-E611-84E4-0025905A607E.root' +#), + + +# secondaryFileNames = cms.untracked.vstring( +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre9/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/81X_mcRun2_asymptotic_v2_2023LReco-v1/10000/0E8B87C3-4953-E611-A003-0CC47A4D762A.root' +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre9/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/81X_mcRun2_asymptotic_v2_2023LReco-v1/10000/DED7A979-4A53-E611-B937-0CC47A4D762A.root'# #) -fileNames = cms.untracked.vstring( -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/0833A89F-7191-E611-B4F6-0025905B85BE.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/2AD714ED-5A91-E611-9A46-0025905A48EC.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/32341174-5E91-E611-A5DA-0025905A60D6.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/38849E79-5C91-E611-924D-0025905B85EE.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/440A6F90-5B91-E611-922B-0025905B8612.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/4A9E80C8-6391-E611-81B7-0CC47A78A468.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/52F3F9D3-6391-E611-BFF8-0CC47A4D762A.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/5CBEDD6B-4A91-E611-A8EA-0025905A6134.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/749CAA4F-5D91-E611-9839-0025905B85D6.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/76D5F988-6291-E611-8DC0-0CC47A4D769A.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/8A33AC3F-4B91-E611-B88F-0025905A60B4.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/984F8CA1-4891-E611-94E8-0CC47A78A456.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/9EEDA3D4-6391-E611-92C9-0CC47A4C8E22.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/A033E3D6-5C91-E611-A9F2-0CC47A78A456.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/A8BEF2B8-5F91-E611-8538-0025905A60AA.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/DC4BF1BD-5491-E611-9968-0CC47A78A456.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/DE1C7FE0-4991-E611-8A32-0025905B8562.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/EA27CFBB-4D91-E611-BFCC-0CC47A4C8E28.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/F4E4CE9B-5691-E611-9941-0CC47A4D769A.root', -'/store/relval/CMSSW_8_1_0_pre12/RelValH125GGgluonfusion_13/GEN-SIM-DIGI-RAW/PU25ns_81X_upgrade2017_HCALdev_v2_BpixFpixHcalGeom-v1/00000/F64137EF-5E91-E611-8D7A-0CC47A4C8EE8.root' -) + +# PU 140 +#fileNames = cms.untracked.vstring( +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/0ADFD7B5-4277-E6#11-8E89-0025905A6132.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/0C8DF598-1977-E6#11-95D4-0025905A612E.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/148A8242-1577-E6#11-B3B6-0025905B855E.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/149D7C35-1577-E6#11-992B-0CC47A745282.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/1874030D-DC76-E6#11-8FA7-0CC47A4C8E14.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/1C51682A-DD76-E6#11-A258-0025905B857A.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/1E7C6756-1677-E6#11-9633-0025905B8560.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/2007B6E9-CA76-E6#11-9B4C-0CC47A745294.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/22926245-C276-E6#11-9F2A-0025905A48B2.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/24EE0F03-D676-E6#11-B94D-0CC47A4C8E46.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/286DC4E9-CB76-E6#11-B41B-0CC47A7452D8.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/28CF1A1C-1877-E6#11-B14F-0025905A60D2.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/2C32E900-E076-E6#11-BA96-0CC47A4C8EA8.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/32FA5232-0D77-E6#11-A420-0025905B861C.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/34E99ED5-1877-E6#11-B092-0CC47A7C3572.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/40AC3F5E-F376-E6#11-BAA2-0CC47A4D76D0.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/46C79DBE-1D77-E6#11-BA00-0025905B8596.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/487702E0-0377-E6#11-B276-0025905B8560.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/48B2905D-EA76-E6#11-977F-0025905B85DC.root', +#'file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_1_0_pre11/RelValSingleElectronPt35Extended/GEN-SIM-DIGI-RAW/PU25ns_81X_mcRun2_asymptotic_v5_2023D1PU140-v1/00000/48BA4FF7-D976-E6#11-A309-0CC47A4C8F26.root' +#) + +# Vladimir's file +#fileNames = cms.untracked.vstring('/store/group/dpg_trigger/comm_trigger/L1Trigger/rekovic/HGCAL/8_2_0/step2_ZEE_100ev_PU200_CMSSW_8_2_0_MinEnergy_0.5_GeV_editedSimCalorimetryEventContent_simEcalUnsuppressedDigis.root') - #fileNames = cms.untracked.vstring('file:root://cmsxrootd.fnal.gov///store/relval/CMSSW_8_0_5/RelValQCD_FlatPt_15_3000HS_13/GEN-SIM-RECO/PU25ns_80X_mcRun2_asymptotic_2016_miniAODv2_v0_gs71xJecGT-v1/00000/06A1518F-3311-E611-BC5A-0CC47A78A496.root') ) + + # All this stuff just runs the various EG algorithms that we are studying # ---- Global Tag : @@ -62,7 +86,7 @@ ## Not existing in cmssw_8_1_0_pre16 process.load('Configuration.Geometry.GeometryExtended2023GRecoReco_cff') # using this geometry because I'm not sure if the tilted geometry is vetted yet #process.load('Configuration.Geometry.GeometryExtended2023tiltedReco_cff') # this one good? -process.load('Configuration.Geometry.GeometryExtended2023D5Reco_cff') +process.load('Configuration.Geometry.GeometryExtended2023D4Reco_cff') #process.load('Configuration.Geometry.GeometryExtended2016Reco_cff') process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff') @@ -99,15 +123,15 @@ -#process.simEcalEBTriggerPrimitiveDigis = cms.EDProducer("EcalEBTrigPrimProducer", -process.EcalEBTrigPrimProducer = cms.EDProducer("EcalEBTrigPrimProducer", +process.simEcalEBTriggerPrimitiveDigis = cms.EDProducer("EcalEBTrigPrimProducer", BarrelOnly = cms.bool(True), +# barrelEcalDigis = cms.InputTag("simEcalUnsuppressedDigis","","HLT"), # barrelEcalDigis = cms.InputTag("simEcalUnsuppressedDigis","ebDigis"), barrelEcalDigis = cms.InputTag("simEcalDigis","ebDigis"), # barrelEcalDigis = cms.InputTag("selectDigi","selectedEcalEBDigiCollection"), binOfMaximum = cms.int32(6), ## optional from release 200 on, from 1-10 TcpOutput = cms.bool(False), - Debug = cms.bool(True), + Debug = cms.bool(False), Famos = cms.bool(False), nOfSamples = cms.int32(1) ) @@ -115,14 +139,13 @@ -process.pNancy = cms.Path( process.EcalEBTrigPrimProducer ) -#process.pNancy = cms.Path( process.simEcalEBTriggerPrimitiveDigis ) + +process.pNancy = cms.Path( process.simEcalEBTriggerPrimitiveDigis ) process.Out = cms.OutputModule( "PoolOutputModule", -# fileName = cms.untracked.string( "EBTP_PhaseII_RelVal2017.root" ), - fileName = cms.untracked.string( "EBTP_PhaseII.root" ), + fileName = cms.untracked.string( "EBTP_PhaseII_TESTDF_uncompEt_spikeflag.root" ), fastCloning = cms.untracked.bool( False ), outputCommands = cms.untracked.vstring("keep *_EcalEBTrigPrimProducer_*_*", "keep *_TriggerResults_*_*", From a0da5e50e74475245e47de5d1fea86aa46140681 Mon Sep 17 00:00:00 2001 From: Nancy Date: Mon, 6 Mar 2017 18:51:54 +0100 Subject: [PATCH 2/2] fix the dummy time value --- .../EcalEBTrigPrimAlgos/src/EcalEBTrigPrimTestAlgo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SimCalorimetry/EcalEBTrigPrimAlgos/src/EcalEBTrigPrimTestAlgo.cc b/SimCalorimetry/EcalEBTrigPrimAlgos/src/EcalEBTrigPrimTestAlgo.cc index 6c0366b345349..7a06f436d6358 100644 --- a/SimCalorimetry/EcalEBTrigPrimAlgos/src/EcalEBTrigPrimTestAlgo.cc +++ b/SimCalorimetry/EcalEBTrigPrimAlgos/src/EcalEBTrigPrimTestAlgo.cc @@ -228,7 +228,7 @@ void EcalEBTrigPrimTestAlgo::run(const edm::EventSetup & setup, if (debug_) std::cout << " format_out " << tcpformat_out_[iSample] << " etInADC " << etInADC << std::endl; bool isASpike=0; // no spikes for now - int timing=31; // dummy value for now + int timing=0; // set to 0 value for now tp.setSample(nSam, EcalEBTriggerPrimitiveSample(etInADC,isASpike,timing) ); nSam++;