49 else iEvent.
getByToken (tok1, digiCollection1);
56 for (digiItr1=digiCollection1->begin();digiItr1!=digiCollection1->end();digiItr1++) {
60 for (digiItr2=digiCollection2->begin();digiItr2!=digiCollection2->end();digiItr2++) {
70 for (digiItr1=digiCollection1->begin();digiItr1!=digiCollection1->end();digiItr1++) {
72 int tsize = (*digiItr1).size();
75 if(HcalGenDetId.isHcalZDCDetId()){
78 int zside = element.
zside();
79 int section = element.section();
80 int channel = element.channel();
81 int gsub = HcalGenDetId.genericSubdet();
94 for (digiItr2=digiCollection2->begin();digiItr2!=digiCollection2->end();digiItr2++) {
108 if(element == element2) {
111 for (
int i=0;
i<tsize;
i++) {
112 double adc = (*digiItr1)[
i].adc();
113 int capid = (*digiItr1)[
i].capid();
117 double adc2 = (*digiItr2)[
i].adc();
118 int capid2 = (*digiItr2)[
i].capid();
121 if( capid != capid2 || adc != adc2) {
122 std::cout <<
"===> PROBLEM !!! gebsubdet=" << gsub
124 <<
" section= "<< section <<
" channel " <<channel
127 <<
" adc1["<<
i <<
"]=" << adc
128 <<
" capid2["<<
i <<
"]=" << capid2
129 <<
" adc2["<<
i <<
"]=" << adc2
144 std::cout <<
"===> PROBLEM !!! gsubdet=" << gsub
146 <<
" section= "<< section <<
" channel " <<channel
147 <<
" HcalZDCId match is not found !!!"
155 int depth = cell.
depth();
156 int iphi = cell.iphi()-1;
157 int ieta = cell.ieta();
158 int sub = cell.subdet();
164 for (digiItr2=digiCollection2->begin();digiItr2!=digiCollection2->end();digiItr2++) {
171 for (
int i=0;
i<tsize;
i++) {
172 double adc = (*digiItr1)[
i].adc();
173 int capid = (*digiItr1)[
i].capid();
177 double adc2 = (*digiItr2)[
i].adc();
178 int capid2 = (*digiItr2)[
i].capid();
181 if( capid != capid2 || adc != adc2) {
182 std::cout <<
"===> PROBLEM !!! subdet=" << sub <<
" ieta="
183 << ieta <<
" inphi=" << iphi <<
" depth=" << depth
186 <<
" adc1["<<
i <<
"]=" << adc
187 <<
" capid2["<<
i <<
"]=" << capid2
188 <<
" adc2["<<
i <<
"]=" << adc2
202 std::cout <<
"===> PROBLEM !!! subdet=" << sub <<
" ieta="
203 << ieta <<
" inphi=" << iphi <<
" depth=" << depth
204 <<
" HcalID match is not found !!!"
210 if (size1 != size2) {
212 std::cout <<
"===> PROBLEM !!! Different size of Digi collections : "
213 << size1 <<
" and " << size2
220 : inputTag1_(iConfig.getParameter<edm::InputTag>(
"digiLabel1")),
221 inputTag2_(iConfig.getParameter<edm::InputTag>(
"digiLabel2")),
222 outputFile_(iConfig.getUntrackedParameter<std::
string>(
"outputFile")),
240 <<
" Hcal RecHit Task histograms will be saved to '"
244 <<
" Hcal RecHit Task histograms will NOT be saved";
256 sprintf (histo,
"Digi2Raw2Digi_status") ;
int adc(sample_type sample)
get the ADC sample (12 bits)
Digi2Raw2Digi(const edm::ParameterSet &)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > tok_hbhe2_
int zside() const
get the z-side of the cell (1/-1)
std::vector< T >::const_iterator const_iterator
int depth() const
get the tower depth
edm::EDGetTokenT< edm::SortedCollection< ZDCDataFrame > > tok_zdc2_
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > tok_hf2_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
edm::EDGetTokenT< edm::SortedCollection< ZDCDataFrame > > tok_zdc1_
void compare(const edm::Event &, const edm::EventSetup &, const edm::EDGetTokenT< edm::SortedCollection< Digi > > &tok1, const edm::EDGetTokenT< edm::SortedCollection< Digi > > &tok2)
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > tok_hbhe1_
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > tok_ho1_
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > tok_hf1_
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > tok_ho2_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * meStatus