CMS 3D CMS Logo

EBBeamCaloTask Class Reference

#include <DQM/EcalBarrelMonitorTasks/interface/EBBeamCaloTask.h>

Inheritance diagram for EBBeamCaloTask:

edm::EDAnalyzer

List of all members.

Public Member Functions

 EBBeamCaloTask (const edm::ParameterSet &ps)
 Constructor.
virtual ~EBBeamCaloTask ()
 Destructor.

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze.
void beginJob (const edm::EventSetup &c)
 BeginJob.
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun.
void cleanup (void)
 Cleanup.
void endJob (void)
 EndJob.
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun.
void reset (void)
 Reset.
void setup (void)
 Setup.

Private Attributes

bool changed_cry_in_beam_
bool changed_tb_status_
int cib_ [12]
int crystal_step_
MonitorElementCrystalInBeam_vs_Event_
MonitorElementCrystalsDone_
DQMStoredqmStore_
edm::InputTag EBDigiCollection_
edm::InputTag EcalRawDataCollection_
edm::InputTag EcalTBEventHeader_
edm::InputTag EcalUncalibratedRecHitCollection_
bool enableCleanup_
int event_last_reset_
int evt_after_change_
int ievt_
bool init_
int last_cry_in_beam_
int lastStableStatus_
MonitorElementmeBBCaloAllNeededCry_
MonitorElementmeBBCaloCryOnBeam_
MonitorElementmeBBCaloCryRead_
MonitorElementmeBBCaloE3x3_
MonitorElementmeBBCaloE3x3Moving_
MonitorElementmeBBCaloEne_ [cryInArray_]
MonitorElementmeBBCaloGains_ [cryInArray_]
MonitorElementmeBBCaloMaxEneCry_
MonitorElementmeBBCaloPulseProf_ [cryInArray_]
MonitorElementmeBBCaloPulseProfG12_ [cryInArray_]
MonitorElementmeBBNumCaloCryRead_
MonitorElementmeEBBCaloBeamCentered_
MonitorElementmeEBBCaloDesync_
MonitorElementmeEBBCaloE1MaxCry_
MonitorElementmeEBBCaloE1vsCry_
MonitorElementmeEBBCaloE3x3vsCry_
MonitorElementmeEBBCaloEntriesVsCry_
MonitorElementmeEBBCaloReadCryErrors_
bool mergeRuns_
std::string prefixME_
int previous_cry_in_beam_
int previous_ev_num_
int PreviousCrystalinBeam_ [3]
int PreviousTableStatus_ [2]
bool profileArranged_
int table_step_
MonitorElementTableMoving_
bool wasFakeChange_

Static Private Attributes

static const int cryInArray_ = 9
static const int defaultPede_ = 200


Detailed Description

Definition at line 20 of file EBBeamCaloTask.h.


Constructor & Destructor Documentation

EBBeamCaloTask::EBBeamCaloTask ( const edm::ParameterSet ps  ) 

Constructor.

Definition at line 38 of file EBBeamCaloTask.cc.

References cryInArray_, CrystalInBeam_vs_Event_, CrystalsDone_, dqmStore_, EBDigiCollection_, EcalRawDataCollection_, EcalTBEventHeader_, EcalUncalibratedRecHitCollection_, enableCleanup_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, meBBCaloAllNeededCry_, meBBCaloCryOnBeam_, meBBCaloCryRead_, meBBCaloE3x3_, meBBCaloE3x3Moving_, meBBCaloEne_, meBBCaloGains_, meBBCaloMaxEneCry_, meBBCaloPulseProf_, meBBCaloPulseProfG12_, meBBNumCaloCryRead_, meEBBCaloBeamCentered_, meEBBCaloDesync_, meEBBCaloE1MaxCry_, meEBBCaloE1vsCry_, meEBBCaloE3x3vsCry_, meEBBCaloEntriesVsCry_, meEBBCaloReadCryErrors_, mergeRuns_, prefixME_, and TableMoving_.

00038                                                     {
00039 
00040   init_ = false;
00041 
00042   dqmStore_ = Service<DQMStore>().operator->();
00043 
00044   prefixME_ = ps.getUntrackedParameter<string>("prefixME", "");
00045 
00046   enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
00047 
00048   mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
00049 
00050   EcalTBEventHeader_ = ps.getParameter<edm::InputTag>("EcalTBEventHeader");
00051   EcalRawDataCollection_ = ps.getParameter<edm::InputTag>("EcalRawDataCollection");
00052   EBDigiCollection_ = ps.getParameter<edm::InputTag>("EBDigiCollection");
00053   EcalUncalibratedRecHitCollection_ = ps.getParameter<edm::InputTag>("EcalUncalibratedRecHitCollection");
00054 
00055   for (int i = 0; i < cryInArray_ ; i++) {
00056     meBBCaloPulseProf_[i]=0;
00057     meBBCaloPulseProfG12_[i]=0;
00058     meBBCaloGains_[i]=0;
00059     meBBCaloEne_[i]=0;
00060 
00061     //meBBCaloPulseProfMoving_[i]=0;
00062     //meBBCaloPulseProfG12Moving_[i]=0;
00063     //meBBCaloGainsMoving_[i]=0;
00064     //meBBCaloEneMoving_[i]=0;
00065   }
00066 
00067   meBBCaloCryRead_ = 0;
00068   //meBBCaloCryReadMoving_ = 0;
00069 
00070   meBBNumCaloCryRead_ = 0;
00071   meBBCaloAllNeededCry_ = 0;
00072 
00073   meBBCaloE3x3_ = 0;
00074   meBBCaloE3x3Moving_ = 0;
00075 
00076   meBBCaloCryOnBeam_ = 0;
00077   meBBCaloMaxEneCry_ = 0;
00078   TableMoving_ = 0;
00079 
00080   CrystalsDone_ = 0;
00081   CrystalInBeam_vs_Event_ = 0;
00082   meEBBCaloReadCryErrors_ = 0;
00083   meEBBCaloE1vsCry_ = 0;
00084   meEBBCaloE3x3vsCry_ = 0;
00085   meEBBCaloEntriesVsCry_ = 0;
00086   meEBBCaloBeamCentered_ = 0;
00087 
00088   meEBBCaloE1MaxCry_ = 0;
00089 //   for(int u=0;u<1701;u++){
00090 //     meBBCaloE3x3Cry_[u]=0;
00091 //     meBBCaloE1Cry_[u]=0;
00092 //   }
00093 
00094   meEBBCaloDesync_ = 0;
00095 
00096 }

EBBeamCaloTask::~EBBeamCaloTask (  )  [virtual]

Destructor.

Definition at line 98 of file EBBeamCaloTask.cc.

00098                                {
00099 
00100 }


Member Function Documentation

void EBBeamCaloTask::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Analyze.

Implements edm::EDAnalyzer.

Definition at line 419 of file EBBeamCaloTask.cc.

References funct::abs(), ecalMGPA::adc(), EcalMGPASample::adc(), EcalDCCHeaderBlock::BEAMH2, EcalDCCHeaderBlock::BEAMH4, TestMuL1L2Filter_cff::cerr, changed_cry_in_beam_, changed_tb_status_, cryInArray_, crystal_step_, EcalTBEventHeader::crystalInBeam(), CrystalInBeam_vs_Event_, CrystalsDone_, dd, defaultPede_, EBDigiCollection_, EcalBarrel, EcalRawDataCollection_, EcalTBEventHeader_, EcalUncalibratedRecHitCollection_, lat::endl(), event(), event_last_reset_, EcalTBEventHeader::eventNumber(), MonitorElement::Fill(), EcalMGPASample::gainId(), MonitorElement::getBinContent(), edm::Event::getByLabel(), i, ievt_, init_, last_cry_in_beam_, lastStableStatus_, LogDebug, meBBCaloAllNeededCry_, meBBCaloCryOnBeam_, meBBCaloCryRead_, meBBCaloE3x3_, meBBCaloE3x3Moving_, meBBCaloEne_, meBBCaloGains_, meBBCaloMaxEneCry_, meBBCaloPulseProf_, meBBCaloPulseProfG12_, meBBNumCaloCryRead_, meEBBCaloBeamCentered_, meEBBCaloDesync_, meEBBCaloE1MaxCry_, meEBBCaloE1vsCry_, meEBBCaloE3x3vsCry_, meEBBCaloEntriesVsCry_, meEBBCaloReadCryErrors_, previous_cry_in_beam_, previous_ev_num_, PreviousCrystalinBeam_, PreviousTableStatus_, edm::Handle< T >::product(), profileArranged_, MonitorElement::Reset(), EcalDataFrame::sample(), MonitorElement::setBinContent(), setup(), Numbers::subDet(), EcalTBEventHeader::syncError(), table_step_, EcalTBEventHeader::tableIsMoving(), TableMoving_, pyDBSRunClass::temp, and wasFakeChange_.

00419                                                                {
00420 
00421   bool enable = false;
00422 
00423   Handle<EcalRawDataCollection> dcchs;
00424 
00425   if ( e.getByLabel(EcalRawDataCollection_, dcchs) ) {
00426 
00427     for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
00428 
00429       if ( Numbers::subDet( *dcchItr ) != EcalBarrel ) continue;
00430 
00431       if ( dcchItr->getRunType() == EcalDCCHeaderBlock::BEAMH4 ||
00432            dcchItr->getRunType() == EcalDCCHeaderBlock::BEAMH2 ) enable = true;
00433 
00434     }
00435 
00436   } else {
00437     LogWarning("EBBeamCaloTask") << EcalRawDataCollection_ << " not available";
00438   }
00439 
00440   if ( ! enable ) return;
00441   if ( ! init_ ) this->setup();
00442   ievt_++;
00443 
00444   Handle<EcalTBEventHeader> pEventHeader;
00445   const EcalTBEventHeader* evtHeader=0;
00446 
00447   if ( e.getByLabel(EcalTBEventHeader_, pEventHeader) ) {
00448     evtHeader = pEventHeader.product(); // get a ptr to the product
00449   } else {
00450     std::cerr << "Error! can't get the product for the event header" << std::endl;
00451   }
00452 
00453   //FIX ME, in the task we should use LV1 instead of ievt_ (prescaling)
00454   int cry_in_beam = 0;
00455   bool tb_moving = false;//just for test, to be filled with info from the event
00456   int event = 0;
00457 
00458   if(evtHeader){
00459     //cry_in_beam = evtHeader->nominalCrystalInBeam();
00460     cry_in_beam = evtHeader->crystalInBeam();
00461     tb_moving = evtHeader->tableIsMoving();
00462     event = evtHeader->eventNumber();
00463     if( evtHeader->syncError() ) {meEBBCaloDesync_->Fill(crystal_step_);}
00464   }
00465   else {
00466     cry_in_beam =   previous_cry_in_beam_;
00467     tb_moving = lastStableStatus_;
00468     event = previous_ev_num_ +10;
00469   }
00470 
00471   previous_cry_in_beam_ = cry_in_beam;
00472   previous_ev_num_ = event;
00473 
00474   //cry_in_beam = 702;//just for test, to be filled with info from the event
00475 
00476   bool reset_histos_stable = false;
00477   bool reset_histos_moving = false;
00478 
00479   bool skip_this_event = false;
00480 
00481 //   if(ievt_ > 500){tb_moving=true; }
00482 //   if(ievt_ > 1000){tb_moving=false; cry_in_beam = 703;}
00483 //   if(ievt_ > 2000){tb_moving=true; }
00484 //   if(ievt_ > 2500){tb_moving=false; cry_in_beam = 704;}
00485 //   if(ievt_ == 3000){cry_in_beam = 702;}
00486 //   if(ievt_ == 3001){cry_in_beam = 703;}
00487 //   if(ievt_ > 3500){tb_moving=true; }
00488 
00489 //   if(ievt_ > 3300){tb_moving=true; }
00490 //   if(ievt_ > 6100){tb_moving=false; cry_in_beam = 705;}
00491 //   if(ievt_ == 6201){tb_moving=true; }
00492 //   if(ievt_ > 9000){tb_moving=true; }
00493 //   if(ievt_ == 11021){tb_moving=false; }
00494 //   if(ievt_ > 12100){tb_moving=false; cry_in_beam = 706;}
00495 //   if(ievt_ > 15320){tb_moving=true; }
00496 //   if(ievt_ > 15500){tb_moving=false; cry_in_beam = 707;}
00497 
00498 
00499  //  //if(ievt_ > 20){tb_moving=true; }
00500 //   //  if(ievt_ == 23){tb_moving=true; }
00501 //   if(ievt_ > 50){tb_moving=false; cry_in_beam = 705;}
00502 //   //if(ievt_ > 90 ){tb_moving=true; }
00503 //   if(ievt_ == 65){tb_moving=false; }
00504 //   if(ievt_ > 110){tb_moving=false; cry_in_beam = 706;}
00505 //   if(ievt_ == 116){cry_in_beam = 709;}
00506 //   //if(ievt_ > 115){tb_moving=true; }
00507 //   if(ievt_ > 150){tb_moving=false; cry_in_beam = 707;}
00508 
00509   //   #include <DQM/EcalBarrelMonitorTasks/interface/cry_in_beam_run_ecs73214.h>
00510 
00511   if(ievt_ < 3){last_cry_in_beam_ = cry_in_beam;}
00512 
00513   if(tb_moving){
00514 
00515     TableMoving_->Fill(1);
00516     if( PreviousTableStatus_[0] == 0 &&  PreviousTableStatus_[1] == 1 && lastStableStatus_ == 0){
00517       reset_histos_moving=true;
00518       wasFakeChange_ = false;
00519       // ! Warning! This works in the assumption that the crystal in beam stay the same
00520       // while the tb is moving and is set to the new one only when the table
00521       // reaches the new position
00522       lastStableStatus_ = 1;
00523 
00524     }
00525     else if( PreviousTableStatus_[1] == 0) {
00526       skip_this_event=true;
00527       changed_tb_status_ = true;
00528       wasFakeChange_ = true;
00529     }
00530     // just skip the first event when the table change status
00531     PreviousTableStatus_[0] = PreviousTableStatus_[1];
00532     PreviousTableStatus_[1] = 1;
00533   }//end of if(tb_moving)
00534 
00535   else {// table is not moving
00536 
00537     TableMoving_->Fill(0);
00538     if( PreviousTableStatus_[0] == 1 &&  PreviousTableStatus_[1] == 0 && lastStableStatus_ == 1){
00539       //reset_histos_stable = true;
00540       wasFakeChange_ = false;
00541       lastStableStatus_ = 0;
00542     }
00543     else if(PreviousTableStatus_[1] == 1) {
00544       skip_this_event=true;
00545       changed_tb_status_ = true;
00546       wasFakeChange_ = true;
00547     }
00548     // just skip the first event when the table change status
00549     PreviousTableStatus_[0]=PreviousTableStatus_[1];
00550     PreviousTableStatus_[1]=0;
00551 
00552     // check also whether cry in beam  has changed
00553     if(  PreviousCrystalinBeam_[0] == PreviousCrystalinBeam_[1]  &&   PreviousCrystalinBeam_[1] != PreviousCrystalinBeam_[2] && PreviousCrystalinBeam_[2] == cry_in_beam ){
00554       reset_histos_stable=true;
00555       wasFakeChange_ = false;
00556     }
00557     else if (PreviousCrystalinBeam_[2] != cry_in_beam){
00558       changed_cry_in_beam_ = true;
00559       skip_this_event=true;
00560       wasFakeChange_ = true;
00561     }
00562     // }
00563 
00564     PreviousCrystalinBeam_[0] = PreviousCrystalinBeam_[1];
00565     PreviousCrystalinBeam_[1] = PreviousCrystalinBeam_[2];
00566     PreviousCrystalinBeam_[2] =  cry_in_beam;
00567   }
00568   //if (! changed_tb_status_ && ! changed_cry_in_beam_ ){// standard data taking
00569 
00570     if( !tb_moving ) {CrystalInBeam_vs_Event_->Fill(event,float(cry_in_beam));}
00571     else{CrystalInBeam_vs_Event_->Fill(event,-100); }
00572     if ( !profileArranged_ ){
00573       float dd=0;
00574       int mbin =0;
00575       for( int bin=1; bin < 20001; bin++ ){
00576         float temp = CrystalInBeam_vs_Event_->getBinContent(bin);
00577         if(temp>0){ dd= temp+0.01; mbin=bin; break;}
00578       }
00579       if(mbin >0) { CrystalInBeam_vs_Event_->Fill(20*mbin-1,dd);}
00580       profileArranged_ = true;
00581     }
00582 
00583     // }
00584 //   else{ // here there is either a step or a daq error
00585 //     // keep 10 events in a buffer waiting to decide for the step or the error
00586 //     if(tb_moving){cib_[evt_after_change_]=-100;}
00587 //     else {cib_[evt_after_change_]=cry_in_beam;}
00588 
00589 //     if(evt_after_change_ >= 9){
00590 //       evt_after_change_ =0;
00591 //       if(wasFakeChange_){// here is an error: put the 10 events in the profile
00592 //      for(int u=0; u<10; u++){
00593 //        CrystalInBeam_vs_Event_->Fill(ievt_-9+u , cib_[u]);
00594 //      }
00595 //       }
00596 //       //for a real change just skip the first 10 events after change
00597 //       changed_tb_status_=false;
00598 //       changed_cry_in_beam_ = false;
00599 //     }
00600 //     else{evt_after_change_ ++;}
00601 //   }
00602 
00603   if(reset_histos_moving){
00604     LogInfo("EBBeamCaloTask") << "event " << ievt_ << " resetting histos for moving table!! ";
00605 
00606     //     meEBBCaloE1vsCry_->setBinContent(crystal_step_ , meBBCaloEne_[4]->getMean() );
00607     //     meEBBCaloE1vsCry_->setBinError(crystal_step_ , meBBCaloEne_[4]->getRMS() );
00608     //     meEBBCaloE3x3vsCry_->setBinContent(crystal_step_ , meBBCaloE3x3_->getMean() );
00609     //     meEBBCaloE3x3vsCry_->setBinError(crystal_step_ , meBBCaloE3x3_->getRMS() );
00610 
00611     //     meEBBCaloEntriesVsCry_->setBinContent(crystal_step_ ,  meBBCaloE3x3_->getEntries() );
00612 
00613     table_step_++;
00614 
00615 
00616     //here the follwowing histos should be reset
00617     // for (int u=0;u<cryInArray_;u++){
00618     //  meBBCaloPulseProfMoving_[u]->Reset();
00619     //  meBBCaloPulseProfG12Moving_[u]->Reset();
00620     //  meBBCaloGainsMoving_[u]->Reset();
00621     //  meBBCaloEneMoving_[u]->Reset();
00622     // }
00623     // meBBCaloCryReadMoving_->Reset();
00624     meBBCaloE3x3Moving_->Reset();
00625 
00626   }
00627 
00628 
00629   if(reset_histos_stable){
00630     if( event - event_last_reset_ > 30){//to be tuned, to avoid a double reset for the change in the table status and
00631                                         //in the crystal in beam. This works ONLY if the crystal in beam stay the same
00632                                         // while the table is moving.
00633                                         //One can also think to remove the reset of the histograms when the table change
00634                                         // status from moving to stable, and to leave the reset only if the cry_in_beam changes.
00635 
00636       LogInfo("EBBeamCaloTask") << "event " << ievt_ << " resetting histos for stable table!! ";
00637 
00638       //       meEBBCaloE1vsCry_->setBinContent(crystal_step_ , meBBCaloEne_[4]->getMean() );
00639       //       meEBBCaloE1vsCry_->setBinError(crystal_step_ , meBBCaloEne_[4]->getRMS() );
00640       //       meEBBCaloE3x3vsCry_->setBinContent(crystal_step_ , meBBCaloE3x3_->getMean() );
00641       //       meEBBCaloE3x3vsCry_->setBinError(crystal_step_ , meBBCaloE3x3_->getRMS() );
00642       //       //
00643       //       meEBBCaloEntriesVsCry_->setBinContent(crystal_step_ ,  meBBCaloE3x3_->getEntries() );
00644 
00645       event_last_reset_ = event;
00646 
00647       last_cry_in_beam_ = cry_in_beam;
00648       crystal_step_++;
00649 
00650       //here the follwowing histos should be reset
00651       for (int u=0;u<cryInArray_;u++){
00652         meBBCaloPulseProf_[u]->Reset();
00653         meBBCaloPulseProfG12_[u]->Reset();
00654         meBBCaloGains_[u]->Reset();
00655         meBBCaloEne_[u]->Reset();
00656       }
00657       meBBCaloCryRead_->Reset();
00658       meBBCaloE3x3_->Reset();
00659       meEBBCaloBeamCentered_->Reset();
00660     }
00661   }
00662 
00663  if(skip_this_event){
00664    LogInfo("EBBeamCaloTask") << "event " << event <<" analyzed: "<<ievt_ << " : skipping this event!! ";
00665    return;}
00666 
00667  // now CrystalsDone_ contains the crystal on beam at the beginning fo a new step, and not when it has finished !!
00668  // <5 just to avoid that we skip the event just after the reset and we do not set CrystalsDone_ .
00669  // if( ievt_ - event_last_reset_ < 5){ CrystalsDone_->setBinContent(cry_in_beam , crystal_step_ );}
00670  CrystalsDone_->setBinContent(cry_in_beam , crystal_step_ );
00671   int eta_c = ( cry_in_beam-1)/20 ;
00672   int phi_c = ( cry_in_beam-1)%20 ;
00673 
00674   float xie = eta_c + 0.5;
00675   float xip = phi_c + 0.5;
00676   if (!tb_moving) {meBBCaloCryOnBeam_->Fill(xie,xip);}
00677 
00678   Handle<EBDigiCollection> digis;
00679   e.getByLabel(EBDigiCollection_, digis);
00680   int nebd = digis->size();
00681   //  LogDebug("EBBeamCaloTask") << "event " << ievt_ << " digi collection size " << nebd;
00682 
00683   meBBNumCaloCryRead_->Fill(nebd);
00684 
00685   //matrix 7x7 around cry in beam
00686   int cry_to_beRead[49]; //0 or -1 for non existing crystals (eg 1702)
00687   for(int u=0;u<49;u++){cry_to_beRead[u]=0;}
00688   // chech that all the crystals in the 7x7 exist
00689   for(int de=-3; de<4; de++){
00690     for(int dp=-3; dp<4; dp++){
00691       //int cry_num = (phi_c+dp) + 20*(eta_c+de) +1;
00692       int u = de -7*dp + 24;
00693       bool existing_cry = (phi_c+dp) >= 0 && (phi_c+dp) <= 19 && (eta_c+de) >=0 && (eta_c+de) <= 84;
00694       if(!existing_cry){cry_to_beRead[u]=-1;}
00695     }
00696   }
00697 
00698 
00699   meEBBCaloEntriesVsCry_->Fill(cry_in_beam);
00700 
00701   for ( EBDigiCollection::const_iterator digiItr = digis->begin(); digiItr != digis->end(); ++digiItr ) {
00702 
00703     EBDetId id = digiItr->id();
00704 
00705     int ic = id.ic();
00706     int ie = (ic-1)/20;
00707     int ip = (ic-1)%20;
00708 
00709     int deta_c= ie - eta_c;
00710     int dphi_c= ip - phi_c;
00711     if (! tb_moving){meBBCaloCryRead_->Fill(deta_c, dphi_c);}
00712     //else {meBBCaloCryReadMoving_->Fill(deta_c, dphi_c);}
00713 
00714     if(abs(deta_c) >3 || abs(dphi_c) >3){continue;}
00715     int i_toBeRead = deta_c -7*dphi_c + 24;
00716     if( i_toBeRead > -1 &&  i_toBeRead <49){
00717       cry_to_beRead[i_toBeRead]++;
00718       //if( (ievt_ == 4000 || ievt_ == 13000 || ievt_ == 13002 ) &&   i_toBeRead == 5){ cry_to_beRead[i_toBeRead] -=1;}
00719     }
00720 
00721     if(abs(deta_c) >1 || abs(dphi_c) >1){continue;}
00722     int i_in_array = deta_c -3*dphi_c + 4;
00723 
00724 
00725     //LogDebug("EBBeamCaloTask") << " det id = " << id;
00726     //LogDebug("EBBeamCaloTask") << " sm, ieta, iphi " << ism << " " << ie << " " << ip;
00727     //LogDebug("EBBeamCaloTask") << " deta, dphi, i_in_array, i_toBeRead " << deta_c  << " " <<  dphi_c << " " <<i_in_array<<" "<<i_toBeRead;
00728 
00729     if( i_in_array < 0 || i_in_array > 8 ){continue;}
00730 
00731     EBDataFrame dataframe = (*digiItr);
00732 
00733     for (int i = 0; i < 10; i++) {
00734       int adc = dataframe.sample(i).adc();
00735       int gainid = dataframe.sample(i).gainId();
00736       //if( (ievt_ == 15400 || ievt_ == 15600 || ievt_ == 15700 ) &&   i_in_array == 4 && i == 4){ gainid =2;}
00737       //if( (ievt_ == 15400 || ievt_ == 15600 || ievt_ == 15700 ) &&   i_in_array == 6 && i == 6){ gainid =3;}
00738 
00739       if ( gainid == 1 ){// gain 12
00740         if(! tb_moving){
00741           meBBCaloPulseProfG12_[i_in_array]->Fill(i,float(adc));
00742           meBBCaloPulseProf_[i_in_array]->Fill(i,float(adc));
00743           meBBCaloGains_[i_in_array]->Fill(12);
00744         }
00745         //else{
00746         //  meBBCaloPulseProfG12Moving_[i_in_array]->Fill(i,float(adc));
00747         //  meBBCaloPulseProfMoving_[i_in_array]->Fill(i,float(adc));
00748         //  meBBCaloGainsMoving_[i_in_array]->Fill(12);
00749         //}
00750       }
00751       else if ( gainid == 2 ){// gain 6
00752         float val = (float(adc)-defaultPede_)*2 + defaultPede_;
00753         if(! tb_moving){
00754           meBBCaloPulseProf_[i_in_array]->Fill(i,val);
00755           meBBCaloGains_[i_in_array]->Fill(6);
00756         }
00757         //else{
00758         //  meBBCaloPulseProfMoving_[i_in_array]->Fill(i,val);
00759         //  meBBCaloGainsMoving_[i_in_array]->Fill(6);
00760         //}
00761       }
00762       else if ( gainid == 3 ){// gain 1
00763         float val = (float(adc)-defaultPede_)*12 + defaultPede_;
00764         if(! tb_moving){
00765         meBBCaloPulseProf_[i_in_array]->Fill(i,val);
00766         meBBCaloGains_[i_in_array]->Fill(1);
00767         }
00768         //else{
00769         //meBBCaloPulseProfMoving_[i_in_array]->Fill(i,val);
00770         //meBBCaloGainsMoving_[i_in_array]->Fill(1);
00771         //}
00772       }
00773     }// end of loop over samples
00774   }// end of loop over digis
00775 
00776   //now  if everything was correct cry_to_beRead should be filled with 1 or -1 but not 0
00777   bool all_cry_readout = true;
00778 
00779   // if( ievt_ == 4000 || ievt_ == 13000 || ievt_ == 13002 ) {all_cry_readout = false;}
00780   if(all_cry_readout){ meBBCaloAllNeededCry_->Fill(1.5);}//bin3
00781   else {
00782     meBBCaloAllNeededCry_->Fill(-0.5);//bin1
00783     if( tb_moving ) {meEBBCaloReadCryErrors_->Fill( crystal_step_+0.5 );}
00784     else {meEBBCaloReadCryErrors_->Fill( crystal_step_ );}
00785   }
00786 
00787   //the part involving rechits
00788 
00789   Handle<EcalUncalibratedRecHitCollection> hits;
00790   e.getByLabel(EcalUncalibratedRecHitCollection_, hits);
00791   int neh = hits->size();
00792   LogDebug("EBBeamCaloTask") << "event " << event <<" analyzed: "<< ievt_ << " hits collection size " << neh;
00793   float ene3x3=0;
00794   float maxEne = 0;
00795   int ieM =-1, ipM = -1;//for the crystal with maximum energy deposition
00796   float cryInBeamEne =0;
00797   for ( EcalUncalibratedRecHitCollection::const_iterator hitItr = hits->begin(); hitItr != hits->end(); ++hitItr ) {
00798 
00799     EBDetId id = hitItr->id();
00800 
00801     int ic = id.ic();
00802     int ie = (ic-1)/20;
00803     int ip = (ic-1)%20;
00804 
00805     int deta_c= ie - eta_c;
00806     int dphi_c= ip - phi_c;
00807 
00808 
00809     int i_in_array = deta_c -3*dphi_c + 4;
00810     //LogDebug("EBBeamCaloTask") << " rechits det id = " << id;
00811     //LogDebug("EBBeamCaloTask") << " rechits sm, ieta, iphi " << ism << " " << ie << " " << ip;
00812     //LogDebug("EBBeamCaloTask") << " rechits deta, dphi, i_in_array" << deta_c  << " " <<  dphi_c << " " <<i_in_array;
00813 
00814     float R_ene = hitItr->amplitude();
00815     if ( R_ene <= 0. ) R_ene = 0.0;
00816     if(R_ene > maxEne){
00817       maxEne=R_ene;
00818       ieM =ie; ipM = ip;
00819     }
00820     if(abs(deta_c) >1 || abs(dphi_c) >1){continue;}
00821     meEBBCaloBeamCentered_->Fill(deta_c,dphi_c,R_ene);
00822 
00823     if( i_in_array < 0 || i_in_array > 8 ){continue;}
00824 
00825     //LogDebug("EBBeamCaloTask") <<"In the array, cry: "<<ic<<" rec ene: "<<R_ene;
00826 
00827     if(i_in_array == 4){cryInBeamEne = R_ene;}
00828     if(! tb_moving){meBBCaloEne_[i_in_array]->Fill(R_ene);}
00829     //else{meBBCaloEneMoving_[i_in_array]->Fill(R_ene);}
00830     ene3x3 += R_ene;
00831 
00832   }//end of loop over rechits
00833 
00834   if (!tb_moving){
00835     meBBCaloE3x3_->Fill(ene3x3);
00836     meEBBCaloE1vsCry_->Fill(cry_in_beam , cryInBeamEne );
00837     meEBBCaloE3x3vsCry_->Fill(cry_in_beam, ene3x3 );
00838     //     if( cry_in_beam > 0 && cry_in_beam < 1701){
00839     //       meBBCaloE3x3Cry_[cry_in_beam]->Fill(ene3x3);
00840     //       meBBCaloE1Cry_[cry_in_beam]->Fill(cryInBeamEne);
00841     //     }
00842     meBBCaloMaxEneCry_->Fill(ieM,ipM);
00843     meEBBCaloE1MaxCry_->Fill(maxEne);
00844   }
00845   else{meBBCaloE3x3Moving_->Fill(ene3x3);}
00847 }

void EBBeamCaloTask::beginJob ( const edm::EventSetup c  )  [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 102 of file EBBeamCaloTask.cc.

References dqmStore_, ievt_, Numbers::initGeometry(), prefixME_, profileArranged_, DQMStore::rmdir(), and DQMStore::setCurrentFolder().

00102                                                 {
00103 
00104   ievt_ = 0;
00105 
00106   profileArranged_ = false;
00107 
00108   if ( dqmStore_ ) {
00109     dqmStore_->setCurrentFolder(prefixME_ + "/EBBeamCaloTask");
00110     dqmStore_->rmdir(prefixME_ + "/EBBeamCaloTask");
00111   }
00112 
00113   Numbers::initGeometry(c, false);
00114 
00115 }

void EBBeamCaloTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 117 of file EBBeamCaloTask.cc.

References mergeRuns_, and reset().

00117                                                                {
00118 
00119   if ( ! mergeRuns_ ) this->reset();
00120 
00121 }

void EBBeamCaloTask::cleanup ( void   )  [protected]

Cleanup.

Definition at line 334 of file EBBeamCaloTask.cc.

References cryInArray_, CrystalInBeam_vs_Event_, CrystalsDone_, dqmStore_, edm::getName(), MonitorElement::getName(), i, init_, meBBCaloAllNeededCry_, meBBCaloCryOnBeam_, meBBCaloCryRead_, meBBCaloE3x3_, meBBCaloE3x3Moving_, meBBCaloEne_, meBBCaloGains_, meBBCaloMaxEneCry_, meBBCaloPulseProf_, meBBCaloPulseProfG12_, meBBNumCaloCryRead_, meEBBCaloBeamCentered_, meEBBCaloDesync_, meEBBCaloE1MaxCry_, meEBBCaloE1vsCry_, meEBBCaloE3x3vsCry_, meEBBCaloEntriesVsCry_, meEBBCaloReadCryErrors_, prefixME_, DQMStore::removeElement(), DQMStore::setCurrentFolder(), and TableMoving_.

Referenced by endJob().

00334                                 {
00335 
00336   if ( ! init_ ) return;
00337 
00338   if ( dqmStore_ ) {
00339     dqmStore_->setCurrentFolder(prefixME_ + "/EBBeamCaloTask");
00340     for (int i = 0; i < cryInArray_ ; i++) {
00341       if ( meBBCaloPulseProf_[i] ) dqmStore_->removeElement( meBBCaloPulseProf_[i]->getName() );
00342       meBBCaloPulseProf_[i] = 0;
00343       if ( meBBCaloPulseProfG12_[i] ) dqmStore_->removeElement( meBBCaloPulseProfG12_[i]->getName() );
00344       meBBCaloPulseProfG12_[i] = 0;
00345       if ( meBBCaloGains_[i] ) dqmStore_->removeElement( meBBCaloGains_[i]->getName() );
00346       meBBCaloGains_[i] = 0;
00347       if ( meBBCaloEne_[i] ) dqmStore_->removeElement( meBBCaloEne_[i]->getName() );
00348       meBBCaloEne_[i] = 0;
00349 
00350 //       if ( meBBCaloPulseProfMoving_[i] ) dqmStore_->removeElement( meBBCaloPulseProfMoving_[i]->getName() );
00351 //       meBBCaloPulseProfMoving_[i] = 0;
00352 //       if ( meBBCaloPulseProfG12Moving_[i] ) dqmStore_->removeElement( meBBCaloPulseProfG12Moving_[i]->getName() );
00353 //       meBBCaloPulseProfG12Moving_[i] = 0;
00354 //       if ( meBBCaloGainsMoving_[i] ) dqmStore_->removeElement( meBBCaloGainsMoving_[i]->getName() );
00355 //       meBBCaloGainsMoving_[i] = 0;
00356 //       if ( meBBCaloEneMoving_[i] ) dqmStore_->removeElement( meBBCaloEneMoving_[i]->getName() );
00357 //       meBBCaloEneMoving_[i] = 0;
00358     }
00359 
00360 //     dqmStore_->setCurrentFolder(prefixME_ + "/EBBeamCaloTask/EnergyHistos");
00361 //     for(int u=0; u< 1701;u++){
00362 //       if ( meBBCaloE3x3Cry_[u] ) dqmStore_->removeElement( meBBCaloE3x3Cry_[u]->getName() );
00363 //       meBBCaloE3x3Cry_[u] = 0;
00364 //       if ( meBBCaloE1Cry_[u] ) dqmStore_->removeElement( meBBCaloE1Cry_[u]->getName() );
00365 //       meBBCaloE1Cry_[u] = 0;
00366 //     }
00367 
00368 //     dqmStore_->setCurrentFolder(prefixME_ + "/EBBeamCaloTask");
00369     if ( meBBCaloCryRead_ ) dqmStore_->removeElement( meBBCaloCryRead_->getName() );
00370     meBBCaloCryRead_ = 0;
00371 //    if ( meBBCaloCryReadMoving_ ) dqmStore_->removeElement( meBBCaloCryReadMoving_->getName() );
00372 //    meBBCaloCryReadMoving_ = 0;
00373     if ( meBBCaloAllNeededCry_ ) dqmStore_->removeElement( meBBCaloAllNeededCry_->getName() );
00374     meBBCaloAllNeededCry_ = 0;
00375     if ( meBBNumCaloCryRead_ ) dqmStore_->removeElement( meBBNumCaloCryRead_->getName() );
00376     meBBNumCaloCryRead_ = 0;
00377     if ( meBBCaloE3x3_ ) dqmStore_->removeElement( meBBCaloE3x3_->getName() );
00378     meBBCaloE3x3_ = 0;
00379     if ( meBBCaloE3x3Moving_ ) dqmStore_->removeElement( meBBCaloE3x3Moving_->getName() );
00380     meBBCaloE3x3Moving_ = 0;
00381     if ( meBBCaloCryOnBeam_ ) dqmStore_->removeElement( meBBCaloCryOnBeam_->getName() );
00382     meBBCaloCryOnBeam_ = 0;
00383     if ( meBBCaloMaxEneCry_ ) dqmStore_->removeElement( meBBCaloMaxEneCry_->getName() );
00384     meBBCaloMaxEneCry_ = 0;
00385     if ( TableMoving_ ) dqmStore_->removeElement( TableMoving_->getName() );
00386     TableMoving_ = 0;
00387     if ( CrystalsDone_ ) dqmStore_->removeElement( CrystalsDone_->getName() );
00388     CrystalsDone_ = 0;
00389     if ( CrystalInBeam_vs_Event_ ) dqmStore_->removeElement( CrystalInBeam_vs_Event_->getName() );
00390     CrystalInBeam_vs_Event_ = 0;
00391     if( meEBBCaloReadCryErrors_ ) dqmStore_->removeElement( meEBBCaloReadCryErrors_->getName() );
00392     meEBBCaloReadCryErrors_ = 0;
00393     if( meEBBCaloE1vsCry_ ) dqmStore_->removeElement( meEBBCaloE1vsCry_->getName() );
00394     meEBBCaloE1vsCry_ = 0;
00395     if( meEBBCaloE3x3vsCry_ ) dqmStore_->removeElement( meEBBCaloE3x3vsCry_->getName() );
00396     meEBBCaloE3x3vsCry_ = 0;
00397     if( meEBBCaloEntriesVsCry_ )  dqmStore_->removeElement( meEBBCaloEntriesVsCry_->getName() );
00398     meEBBCaloEntriesVsCry_ = 0;
00399     if( meEBBCaloBeamCentered_ ) dqmStore_->removeElement( meEBBCaloBeamCentered_->getName() );
00400     meEBBCaloBeamCentered_ = 0;
00401     if( meEBBCaloE1MaxCry_ ) dqmStore_->removeElement(meEBBCaloE1MaxCry_->getName() );
00402     meEBBCaloE1MaxCry_ = 0;
00403     if( meEBBCaloDesync_ ) dqmStore_->removeElement(meEBBCaloDesync_->getName() );
00404     meEBBCaloDesync_ = 0;
00405   }
00406 
00407   init_ = false;
00408 
00409 }

void EBBeamCaloTask::endJob ( void   )  [protected, virtual]

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 411 of file EBBeamCaloTask.cc.

References cleanup(), enableCleanup_, and ievt_.

00411                                {
00412 
00413   LogInfo("EBBeamCaloTask") << "analyzed " << ievt_ << " events";
00414 
00415   if ( enableCleanup_ ) this->cleanup();
00416 
00417 }

void EBBeamCaloTask::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 123 of file EBBeamCaloTask.cc.

00123                                                              {
00124 
00125 }

void EBBeamCaloTask::reset ( void   )  [protected]

Reset.

Definition at line 127 of file EBBeamCaloTask.cc.

References cryInArray_, CrystalInBeam_vs_Event_, CrystalsDone_, i, meBBCaloAllNeededCry_, meBBCaloCryOnBeam_, meBBCaloCryRead_, meBBCaloE3x3_, meBBCaloE3x3Moving_, meBBCaloEne_, meBBCaloGains_, meBBCaloMaxEneCry_, meBBCaloPulseProf_, meBBCaloPulseProfG12_, meBBNumCaloCryRead_, meEBBCaloBeamCentered_, meEBBCaloDesync_, meEBBCaloE1MaxCry_, meEBBCaloE1vsCry_, meEBBCaloE3x3vsCry_, meEBBCaloEntriesVsCry_, meEBBCaloReadCryErrors_, MonitorElement::Reset(), and TableMoving_.

Referenced by beginRun().

00127                                {
00128 
00129     for (int i = 0; i < cryInArray_ ; i++) {
00130       if ( meBBCaloPulseProf_[i] ) meBBCaloPulseProf_[i]->Reset();
00131       if ( meBBCaloPulseProfG12_[i] ) meBBCaloPulseProfG12_[i]->Reset();
00132       if ( meBBCaloGains_[i] ) meBBCaloGains_[i]->Reset();
00133       if ( meBBCaloEne_[i] ) meBBCaloEne_[i]->Reset();
00134 
00135 //       if ( meBBCaloPulseProfMoving_[i] ) meBBCaloPulseProfMoving_[i]->Reset();
00136 //       if ( meBBCaloPulseProfG12Moving_[i] ) meBBCaloPulseProfG12Moving_[i]->Reset();
00137 //       if ( meBBCaloGainsMoving_[i] ) meBBCaloGainsMoving_[i]->Reset();
00138 //       if ( meBBCaloEneMoving_[i] ) meBBCaloEneMoving_[i]->Reset();
00139     }
00140 
00141 //     for(int u=0; u< 1701;u++){
00142 //       if ( meBBCaloE3x3Cry_[u] ) meBBCaloE3x3Cry_[u]->Reset();
00143 //       if ( meBBCaloE1Cry_[u] ) meBBCaloE1Cry_[u]->Reset();
00144 //     }
00145 
00146     if ( meBBCaloCryRead_ ) meBBCaloCryRead_->Reset();
00147 //    if ( meBBCaloCryReadMoving_ ) meBBCaloCryReadMoving_->Reset();
00148     if ( meBBCaloAllNeededCry_ ) meBBCaloAllNeededCry_->Reset();
00149     if ( meBBNumCaloCryRead_ ) meBBNumCaloCryRead_->Reset();
00150     if ( meBBCaloE3x3_ ) meBBCaloE3x3_->Reset();
00151     if ( meBBCaloE3x3Moving_ ) meBBCaloE3x3Moving_->Reset();
00152     if ( meBBCaloCryOnBeam_ ) meBBCaloCryOnBeam_->Reset();
00153     if ( meBBCaloMaxEneCry_ ) meBBCaloMaxEneCry_->Reset();
00154     if ( TableMoving_ ) TableMoving_->Reset();
00155     if ( CrystalsDone_ ) CrystalsDone_->Reset();
00156     if ( CrystalInBeam_vs_Event_ ) CrystalInBeam_vs_Event_->Reset();
00157     if( meEBBCaloReadCryErrors_ ) meEBBCaloReadCryErrors_->Reset();
00158     if( meEBBCaloE1vsCry_ ) meEBBCaloE1vsCry_->Reset();
00159     if( meEBBCaloE3x3vsCry_ ) meEBBCaloE3x3vsCry_->Reset();
00160     if( meEBBCaloEntriesVsCry_ )  meEBBCaloEntriesVsCry_->Reset();
00161     if( meEBBCaloBeamCentered_ ) meEBBCaloBeamCentered_->Reset();
00162     if( meEBBCaloE1MaxCry_ ) meEBBCaloE1MaxCry_->Reset();
00163     if( meEBBCaloDesync_ ) meEBBCaloDesync_->Reset();
00164 
00165 }

void EBBeamCaloTask::setup ( void   )  [protected]

Setup.

Definition at line 167 of file EBBeamCaloTask.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), changed_cry_in_beam_, changed_tb_status_, cib_, cryInArray_, crystal_step_, CrystalInBeam_vs_Event_, CrystalsDone_, dqmStore_, event_last_reset_, evt_after_change_, histo, i, init_, last_cry_in_beam_, lastStableStatus_, meBBCaloAllNeededCry_, meBBCaloCryOnBeam_, meBBCaloCryRead_, meBBCaloE3x3_, meBBCaloE3x3Moving_, meBBCaloEne_, meBBCaloGains_, meBBCaloMaxEneCry_, meBBCaloPulseProf_, meBBCaloPulseProfG12_, meBBNumCaloCryRead_, meEBBCaloBeamCentered_, meEBBCaloDesync_, meEBBCaloE1MaxCry_, meEBBCaloE1vsCry_, meEBBCaloE3x3vsCry_, meEBBCaloEntriesVsCry_, meEBBCaloReadCryErrors_, prefixME_, previous_cry_in_beam_, PreviousCrystalinBeam_, PreviousTableStatus_, profileArranged_, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), table_step_, TableMoving_, and wasFakeChange_.

Referenced by analyze().

00167                               {
00168 
00169   init_ = true;
00170   profileArranged_= false;
00171   char histo[200];
00172 
00173   PreviousTableStatus_[0]=0;//let's start with stable...
00174   PreviousTableStatus_[1]=0;//let's start with stable...
00175 
00176   PreviousCrystalinBeam_[0] = 0;
00177   PreviousCrystalinBeam_[1] = 0;
00178   PreviousCrystalinBeam_[2] = -1;
00179   // PreviousCrystalinBeam_[2] = -1 is needed to have a correct step vs cry matching
00180   lastStableStatus_=0;
00181   for(int u=0;u<10;u++){cib_[u]=0;}
00182   changed_tb_status_= false;
00183   changed_cry_in_beam_ = false;
00184   evt_after_change_ =0;
00185   wasFakeChange_= false;
00186   table_step_=1;
00187   crystal_step_=1;
00188   event_last_reset_ = 0;
00189   last_cry_in_beam_ = 0;
00190   previous_cry_in_beam_ = 1;
00191 
00192   if ( dqmStore_ ) {
00193     dqmStore_->setCurrentFolder(prefixME_ + "/EBBeamCaloTask");
00194 
00195     for (int i = 0; i < cryInArray_ ; i++) {
00196       sprintf(histo, "EBBCT pulse profile cry %01d", i+1);
00197       //considering the gain the range is 4096*12 ~ 50000
00198       meBBCaloPulseProf_[i] = dqmStore_->bookProfile(histo, histo, 10,0.,10.,50000,0.,50000.,"s");
00199 
00200       sprintf(histo, "EBBCT pulse profile in G12 cry %01d", i+1);
00201       meBBCaloPulseProfG12_[i] = dqmStore_->bookProfile(histo, histo, 10,0.,10.,4096,0.,4096.,"s");
00202       meBBCaloPulseProfG12_[i]->setAxisTitle("#sample", 1);
00203       meBBCaloPulseProfG12_[i]->setAxisTitle("ADC", 2);
00204 
00205       sprintf(histo, "EBBCT found gains cry %01d", i+1);
00206       meBBCaloGains_[i] =  dqmStore_->book1D(histo,histo,14,0.,14.);
00207       meBBCaloGains_[i]->setAxisTitle("gain", 1);
00208       // g1-> bin 2, g6-> bin 7, g12-> bin 13
00209 
00210       sprintf(histo, "EBBCT rec energy cry %01d", i+1);
00211       meBBCaloEne_[i] =  dqmStore_->book1D(histo,histo,500,0.,9000.);
00212       meBBCaloEne_[i]->setAxisTitle("rec ene (ADC)", 1);
00213       //9000 ADC in G12 equivalent is about 330 GeV
00214 
00216 
00217 //       sprintf(histo, "EBBCT pulse profile moving table cry %01d", i+1);
00218 //       //considering the gain the range is 4096*12 ~ 50000
00219 //       meBBCaloPulseProfMoving_[i] = dqmStore_->bookProfile(histo, histo, 10,0.,10.,50000,0.,50000.,"s");
00220 
00221 //       sprintf(histo, "EBBCT pulse profile in G12 moving table cry %01d", i+1);
00222 //       meBBCaloPulseProfG12Moving_[i] = dqmStore_->bookProfile(histo, histo, 10,0.,10.,4096,0.,4096.,"s");
00223 
00224 //       sprintf(histo, "EBBCT found gains moving table cry %01d", i+1);
00225 //       meBBCaloGainsMoving_[i] =  dqmStore_->book1D(histo,histo,14,0.,14.);
00226 //       // g1-> bin 2, g6-> bin 7, g12-> bin 13
00227 
00228 //       sprintf(histo, "EBBCT rec energy moving table cry %01d", i+1);
00229 //       meBBCaloEneMoving_[i] =  dqmStore_->book1D(histo,histo,2000,0.,9000.);
00230 //       //9000 ADC in G12 equivalent is about 330 GeV
00231 
00232     }
00233 
00234 //     dqmStore_->setCurrentFolder(prefixME_ + "/EBBeamCaloTask/EnergyHistos");
00235 //     for(int u=0; u< 1701;u++){
00236 //       sprintf(histo, "EBBCT rec Ene sum 3x3 cry: %04d",u);
00237 //       meBBCaloE3x3Cry_[u] = dqmStore_->book1D(histo,histo,1000,0.,4500.);
00238 
00239 //       sprintf(histo, "EBBCT rec Energy1 cry: %04d",u);
00240 //       meBBCaloE1Cry_[u] = dqmStore_->book1D(histo,histo,1000,0.,4500.);
00241 //     }
00242 
00243 //     dqmStore_->setCurrentFolder(prefixME_ + "/EBBeamCaloTask");
00244     sprintf(histo, "EBBCT readout crystals");
00245     meBBCaloCryRead_ =  dqmStore_->book2D(histo,histo,9,-4.,5.,9,-4.,5.);
00246     //matrix of readout crystal around cry in beam
00247 
00248     //sprintf(histo, "EBBCT readout crystals table moving");
00249     //meBBCaloCryReadMoving_ =  dqmStore_->book2D(histo,histo,9,-4.,5.,9,-4.,5.);
00250     //matrix of readout crystal around cry in beam
00251 
00252     sprintf(histo, "EBBCT all needed crystals readout");
00253     meBBCaloAllNeededCry_ = dqmStore_->book1D(histo,histo,3,-1.,2.);
00254     // not all needed cry are readout-> bin 1, all needed cry are readout-> bin 3
00255 
00256     sprintf(histo, "EBBCT readout crystals number");
00257     meBBNumCaloCryRead_ = dqmStore_->book1D(histo,histo,1701,0.,1701.);
00258     meBBNumCaloCryRead_->setAxisTitle("number of read crystals", 1);
00259 
00260     sprintf(histo, "EBBCT rec Ene sum 3x3");
00261     meBBCaloE3x3_ = dqmStore_->book1D(histo,histo,500,0.,9000.);
00262     meBBCaloE3x3_->setAxisTitle("rec ene (ADC)", 1);
00263     //9000 ADC in G12 equivalent is about 330 GeV
00264 
00265     sprintf(histo, "EBBCT rec Ene sum 3x3 table moving");
00266     meBBCaloE3x3Moving_ = dqmStore_->book1D(histo,histo,500,0.,9000.);
00267     //9000 ADC in G12 equivalent is about 330 GeV
00268 
00269     sprintf(histo, "EBBCT crystal on beam");
00270     meBBCaloCryOnBeam_ = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
00271 
00272     sprintf(histo, "EBBCT crystal with maximum rec energy");
00273     meBBCaloMaxEneCry_ = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
00274 
00275     sprintf(histo, "EBBCT table is moving");
00276     TableMoving_ = dqmStore_->book1D(histo,histo,2,0.,1.1);
00277     TableMoving_->setAxisTitle("table status (0=stable, 1=moving)", 1);
00278     //table is moving-> bin 2, table is not moving-> bin 1
00279 
00280     sprintf(histo, "EBBCT crystals done");
00281     CrystalsDone_ = dqmStore_->book1D(histo,histo,1700,1.,1701.);
00282     CrystalsDone_->setAxisTitle("crystal", 1);
00283     CrystalsDone_->setAxisTitle("step in the scan", 2);
00284     //for a crystal done the corresponing bin is filled with the step in the
00285     //autoscan pertainig to the given crystales
00286 
00287     sprintf(histo, "EBBCT crystal in beam vs event");
00288     CrystalInBeam_vs_Event_ = dqmStore_->bookProfile(histo, histo, 20000,0.,400000.,1802,-101.,1701.,"s");
00289     CrystalInBeam_vs_Event_->setAxisTitle("event", 1);
00290     CrystalInBeam_vs_Event_->setAxisTitle("crystal in beam", 2);
00291     // 1 bin each 20 events
00292     // when table is moving for just one events fill with -100
00293 
00294 
00295     sprintf(histo, "EBBCT readout crystals errors");
00296     meEBBCaloReadCryErrors_ = dqmStore_->book1D(histo, histo, 425,1.,86.);
00297     meEBBCaloReadCryErrors_->setAxisTitle("step in the scan", 1);
00298 
00299     sprintf(histo, "EBBCT average rec energy in the single crystal");
00300     //meEBBCaloE1vsCry_ = dqmStore_->book1D(histo, histo, 85,1.,86.);
00301     meEBBCaloE1vsCry_ = dqmStore_->bookProfile(histo, histo, 1700,1.,1701.,500,0.,9000.,"s");
00302     meEBBCaloE1vsCry_->setAxisTitle("crystal", 1);
00303     meEBBCaloE1vsCry_->setAxisTitle("rec energy (ADC)", 2);
00304 
00305     sprintf(histo, "EBBCT average rec energy in the 3x3 array");
00306     //meEBBCaloE3x3vsCry_= dqmStore_->book1D(histo, histo,85,1.,86.);
00307     meEBBCaloE3x3vsCry_ = dqmStore_->bookProfile(histo, histo, 1700,1.,1701.,500,0.,9000.,"s");
00308     meEBBCaloE3x3vsCry_->setAxisTitle("crystal", 1);
00309     meEBBCaloE3x3vsCry_->setAxisTitle("rec energy (ADC)", 2);
00310 
00311     sprintf(histo, "EBBCT number of entries");
00312     meEBBCaloEntriesVsCry_ = dqmStore_->book1D(histo, histo,1700,1.,1701.);
00313     meEBBCaloEntriesVsCry_->setAxisTitle("crystal", 1);
00314     meEBBCaloEntriesVsCry_->setAxisTitle("number of events (prescaled)", 2);
00315 
00316     sprintf(histo, "EBBCT energy deposition in the 3x3");
00317     meEBBCaloBeamCentered_ = dqmStore_->book2D(histo, histo,3,-1.5,1.5,3,-1.5,1.5);
00318     meEBBCaloBeamCentered_->setAxisTitle("\\Delta \\eta", 1);
00319     meEBBCaloBeamCentered_->setAxisTitle("\\Delta \\phi", 2);
00320 
00321     sprintf(histo, "EBBCT E1 in the max cry");
00322     meEBBCaloE1MaxCry_= dqmStore_->book1D(histo,histo,500,0.,9000.);
00323     meEBBCaloE1MaxCry_->setAxisTitle("rec Ene (ADC)", 1);
00324 
00325     sprintf(histo, "EBBCT Desynchronization vs step");
00326     meEBBCaloDesync_= dqmStore_->book1D(histo, histo, 85 ,1.,86.);
00327     meEBBCaloDesync_->setAxisTitle("step", 1);
00328     meEBBCaloDesync_->setAxisTitle("Desynchronized events", 2);
00329 
00330   }
00331 
00332 }


Member Data Documentation

bool EBBeamCaloTask::changed_cry_in_beam_ [private]

Definition at line 130 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

bool EBBeamCaloTask::changed_tb_status_ [private]

Definition at line 129 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

int EBBeamCaloTask::cib_[12] [private]

Definition at line 128 of file EBBeamCaloTask.h.

Referenced by setup().

const int EBBeamCaloTask::cryInArray_ = 9 [static, private]

Definition at line 73 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

int EBBeamCaloTask::crystal_step_ [private]

Definition at line 134 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

MonitorElement* EBBeamCaloTask::CrystalInBeam_vs_Event_ [private]

Definition at line 105 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::CrystalsDone_ [private]

Definition at line 103 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

const int EBBeamCaloTask::defaultPede_ = 200 [static, private]

Definition at line 74 of file EBBeamCaloTask.h.

Referenced by analyze().

DQMStore* EBBeamCaloTask::dqmStore_ [private]

Definition at line 60 of file EBBeamCaloTask.h.

Referenced by beginJob(), cleanup(), EBBeamCaloTask(), and setup().

edm::InputTag EBBeamCaloTask::EBDigiCollection_ [private]

Definition at line 70 of file EBBeamCaloTask.h.

Referenced by analyze(), and EBBeamCaloTask().

edm::InputTag EBBeamCaloTask::EcalRawDataCollection_ [private]

Definition at line 69 of file EBBeamCaloTask.h.

Referenced by analyze(), and EBBeamCaloTask().

edm::InputTag EBBeamCaloTask::EcalTBEventHeader_ [private]

Definition at line 68 of file EBBeamCaloTask.h.

Referenced by analyze(), and EBBeamCaloTask().

edm::InputTag EBBeamCaloTask::EcalUncalibratedRecHitCollection_ [private]

Definition at line 71 of file EBBeamCaloTask.h.

Referenced by analyze(), and EBBeamCaloTask().

bool EBBeamCaloTask::enableCleanup_ [private]

Definition at line 64 of file EBBeamCaloTask.h.

Referenced by EBBeamCaloTask(), and endJob().

int EBBeamCaloTask::event_last_reset_ [private]

Definition at line 135 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

int EBBeamCaloTask::evt_after_change_ [private]

Definition at line 131 of file EBBeamCaloTask.h.

Referenced by setup().

int EBBeamCaloTask::ievt_ [private]

Definition at line 58 of file EBBeamCaloTask.h.

Referenced by analyze(), beginJob(), and endJob().

bool EBBeamCaloTask::init_ [private]

Definition at line 121 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), and setup().

int EBBeamCaloTask::last_cry_in_beam_ [private]

Definition at line 136 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

int EBBeamCaloTask::lastStableStatus_ [private]

Definition at line 133 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloAllNeededCry_ [private]

Definition at line 89 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloCryOnBeam_ [private]

Definition at line 98 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloCryRead_ [private]

Definition at line 86 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloE3x3_ [private]

Definition at line 92 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloE3x3Moving_ [private]

Definition at line 93 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloEne_[cryInArray_] [private]

Definition at line 79 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloGains_[cryInArray_] [private]

Definition at line 78 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloMaxEneCry_ [private]

Definition at line 99 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloPulseProf_[cryInArray_] [private]

Definition at line 76 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBCaloPulseProfG12_[cryInArray_] [private]

Definition at line 77 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meBBNumCaloCryRead_ [private]

Definition at line 90 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meEBBCaloBeamCentered_ [private]

Definition at line 115 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meEBBCaloDesync_ [private]

Definition at line 119 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meEBBCaloE1MaxCry_ [private]

Definition at line 117 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meEBBCaloE1vsCry_ [private]

Definition at line 109 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meEBBCaloE3x3vsCry_ [private]

Definition at line 111 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meEBBCaloEntriesVsCry_ [private]

Definition at line 113 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

MonitorElement* EBBeamCaloTask::meEBBCaloReadCryErrors_ [private]

Definition at line 107 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

bool EBBeamCaloTask::mergeRuns_ [private]

Definition at line 66 of file EBBeamCaloTask.h.

Referenced by beginRun(), and EBBeamCaloTask().

std::string EBBeamCaloTask::prefixME_ [private]

Definition at line 62 of file EBBeamCaloTask.h.

Referenced by beginJob(), cleanup(), EBBeamCaloTask(), and setup().

int EBBeamCaloTask::previous_cry_in_beam_ [private]

Definition at line 137 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

int EBBeamCaloTask::previous_ev_num_ [private]

Definition at line 138 of file EBBeamCaloTask.h.

Referenced by analyze().

int EBBeamCaloTask::PreviousCrystalinBeam_[3] [private]

Definition at line 126 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

int EBBeamCaloTask::PreviousTableStatus_[2] [private]

Definition at line 125 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

bool EBBeamCaloTask::profileArranged_ [private]

Definition at line 123 of file EBBeamCaloTask.h.

Referenced by analyze(), beginJob(), and setup().

int EBBeamCaloTask::table_step_ [private]

Definition at line 134 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().

MonitorElement* EBBeamCaloTask::TableMoving_ [private]

Definition at line 101 of file EBBeamCaloTask.h.

Referenced by analyze(), cleanup(), EBBeamCaloTask(), reset(), and setup().

bool EBBeamCaloTask::wasFakeChange_ [private]

Definition at line 132 of file EBBeamCaloTask.h.

Referenced by analyze(), and setup().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:19:17 2009 for CMSSW by  doxygen 1.5.4