176 for(
int u=0;u<10;u++){
cib_[u]=0;}
191 sprintf(histo,
"EEBCT pulse profile cry %01d",
i+1);
195 sprintf(histo,
"EEBCT pulse profile in G12 cry %01d",
i+1);
200 sprintf(histo,
"EEBCT found gains cry %01d",
i+1);
205 sprintf(histo,
"EEBCT rec energy cry %01d",
i+1);
239 sprintf(histo,
"EEBCT readout crystals");
247 sprintf(histo,
"EEBCT all needed crystals readout");
251 sprintf(histo,
"EEBCT readout crystals number");
255 sprintf(histo,
"EEBCT rec Ene sum 3x3");
260 sprintf(histo,
"EEBCT rec Ene sum 3x3 table moving");
264 sprintf(histo,
"EEBCT crystal on beam");
267 sprintf(histo,
"EEBCT crystal with maximum rec energy");
270 sprintf(histo,
"EEBCT table is moving");
275 sprintf(histo,
"EEBCT crystals done");
282 sprintf(histo,
"EEBCT crystal in beam vs event");
289 sprintf(histo,
"EEBCT readout crystals errors");
293 sprintf(histo,
"EEBCT average rec energy in the single crystal");
299 sprintf(histo,
"EEBCT average rec energy in the 3x3 array");
305 sprintf(histo,
"EEBCT number of entries");
310 sprintf(histo,
"EEBCT energy deposition in the 3x3");
315 sprintf(histo,
"EEBCT E1 in the max cry");
319 sprintf(histo,
"EEBCT Desynchronization vs step");
330 if ( !
init_ )
return;
433 if ( ! enable )
return;
441 evtHeader = pEventHeader.
product();
443 std::cerr <<
"Error! can't get the product for the event header" << std::endl;
448 bool tb_moving =
false;
469 bool reset_histos_stable =
false;
470 bool reset_histos_moving =
false;
472 bool skip_this_event =
false;
510 reset_histos_moving=
true;
519 skip_this_event=
true;
537 skip_this_event=
true;
547 reset_histos_stable=
true;
552 skip_this_event=
true;
570 if(temp>0){ dd= temp+0.01; mbin=
bin;
break;}
596 if(reset_histos_moving){
597 edm::LogInfo(
"EEBeamCaloTask") <<
"event " <<
ievt_ <<
" resetting histos for moving table!! ";
622 if(reset_histos_stable){
629 edm::LogInfo(
"EEBeamCaloTask") <<
"event " <<
ievt_ <<
" resetting histos for stable table!! ";
657 edm::LogInfo(
"EEBeamCaloTask") <<
"event " <<
event <<
" analyzed: "<<
ievt_ <<
" : skipping this event!! ";
664 int eta_c = ( cry_in_beam-1)/20 ;
665 int phi_c = ( cry_in_beam-1)%20 ;
667 float xie = eta_c + 0.5;
668 float xip = phi_c + 0.5;
673 int nebd = digis->size();
678 int cry_to_beRead[49];
679 for(
int u=0;u<49;u++){cry_to_beRead[u]=0;}
681 for(
int de=-3; de<4; de++){
682 for(
int dp=-3; dp<4; dp++){
684 int u = de -7*dp + 24;
685 bool existing_cry = (phi_c+dp) >= 0 && (phi_c+dp) <= 19 && (eta_c+de) >=0 && (eta_c+de) <= 84;
686 if(!existing_cry){cry_to_beRead[u]=-1;}
701 int deta_c= ie - eta_c;
702 int dphi_c= ip - phi_c;
707 int i_toBeRead = deta_c -7*dphi_c + 24;
708 if( i_toBeRead > -1 && i_toBeRead <49){
709 cry_to_beRead[i_toBeRead]++;
714 int i_in_array = deta_c -3*dphi_c + 4;
716 if( i_in_array < 0 || i_in_array > 8 ){
continue;}
720 for (
int i = 0;
i < 10;
i++) {
738 else if ( gainid == 2 ){
749 else if ( gainid == 3 ){
764 bool all_cry_readout =
true;
778 int neh = hits->size();
779 LogDebug(
"EEBeamCaloTask") <<
"event " <<
event <<
" analyzed: "<<
ievt_ <<
" hits collection size " << neh;
782 int ieM =-1, ipM = -1;
783 float cryInBeamEne =0;
792 int deta_c= ie - eta_c;
793 int dphi_c= ip - phi_c;
795 int i_in_array = deta_c -3*dphi_c + 4;
797 float R_ene = hitItr->amplitude();
798 if ( R_ene <= 0. ) R_ene = 0.0;
806 if( i_in_array < 0 || i_in_array > 8 ){
continue;}
808 if(i_in_array == 4){cryInBeamEne = R_ene;}
int adc(sample_type sample)
get the ADC sample (12 bits)
T getParameter(std::string const &) const
MonitorElement * meEEBCaloE1MaxCry_
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * meBBCaloEne_[cryInArray_]
void setBinContent(int binx, double content)
set content of bin (1-D)
void cleanup(void)
Cleanup.
MonitorElement * meEEBCaloE1vsCry_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
MonitorElement * CrystalsDone_
static const int defaultPede_
Some "id" conversions.
void beginJob(void)
BeginJob.
bool changed_cry_in_beam_
edm::InputTag EcalTBEventHeader_
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
MonitorElement * meEEBCaloDesync_
int previous_cry_in_beam_
MonitorElement * meBBCaloPulseProfG12_[cryInArray_]
EEBeamCaloTask(const edm::ParameterSet &ps)
Constructor.
int gainId() const
get the gainId (2 bits)
MonitorElement * meEEBCaloReadCryErrors_
MonitorElement * meBBCaloE3x3_
MonitorElement * meBBCaloGains_[cryInArray_]
edm::InputTag EBDigiCollection_
MonitorElement * meBBCaloE3x3Moving_
int PreviousTableStatus_[2]
void removeElement(const std::string &name)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
edm::InputTag EcalRawDataCollection_
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
MonitorElement * TableMoving_
MonitorElement * meBBCaloCryRead_
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
std::string getName(Reflex::Type &cc)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int ic() const
get ECAL/crystal number inside SM
int PreviousCrystalinBeam_[3]
MonitorElement * meBBCaloPulseProf_[cryInArray_]
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
MonitorElement * meEEBCaloEntriesVsCry_
MonitorElement * meBBCaloCryOnBeam_
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
T const * product() const
MonitorElement * CrystalInBeam_vs_Event_
edm::InputTag EcalUncalibratedRecHitCollection_
double getBinContent(int binx) const
get content of bin (1-D)
static const int cryInArray_
MonitorElement * meBBCaloMaxEneCry_
MonitorElement * meBBCaloAllNeededCry_
virtual ~EEBeamCaloTask()
Destructor.
static EcalSubdetector subDet(const EBDetId &id)
MonitorElement * meBBNumCaloCryRead_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
MonitorElement * meEEBCaloE3x3vsCry_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meEEBCaloBeamCentered_
void setCurrentFolder(const std::string &fullpath)
int adc() const
get the ADC sample (12 bits)