Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77614
b: "refs/heads/CMSSW_7_1_X"
c: 0202fb2
h: "refs/heads/CMSSW_7_1_X"
v: v3
  • Loading branch information
Edmundo Garcia-Solis committed Nov 10, 2009
1 parent 6ddf627 commit bea91cc
Showing 2 changed files with 47 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": ee0b9cb1ed1aafcfdf0d69230ee6b3c34faa6892
"refs/heads/CMSSW_7_1_X": 0202fb2426545ddeb147ed515b7dea7fda4685fa
64 changes: 46 additions & 18 deletions trunk/Validation/HcalDigis/src/Digi2Raw2Digi.cc
Original file line number Diff line number Diff line change
@@ -43,42 +43,69 @@ void Digi2Raw2Digi::compare(const edm::Event& iEvent, const edm::EventSetup& iSe
typename edm::SortedCollection<Digi>::const_iterator digiItr1;
typename edm::Handle<edm::SortedCollection<Digi> > digiCollection2;
typename edm::SortedCollection<Digi>::const_iterator digiItr2;

if(unsuppressed) { // ZDC
if(unsuppressed) { // ZDC
iEvent.getByLabel ("simHcalUnsuppressedDigis", digiCollection1);
}
}
else iEvent.getByLabel (inputTag1_, digiCollection1);

iEvent.getByLabel (inputTag2_,digiCollection2);

iEvent.getByLabel (inputTag2_, digiCollection2);
int size1 = 0;
int size2 = 0;

for (digiItr1=digiCollection1->begin();digiItr1!=digiCollection1->end();digiItr1++) {
size1++;
}

for(digiItr1=digiCollection1->begin();digiItr1!=digiCollection1->end();digiItr1++)size1++;
for(digiItr2=digiCollection2->begin();digiItr2!=digiCollection2->end();digiItr2++)size2++;
for (digiItr2=digiCollection2->begin();digiItr2!=digiCollection2->end();digiItr2++) {
size2++;
}

std::cout<<"Digi Collection size1 =" << size1 << " size2 =" << size2 << std::endl;
// CYCLE over first DIGI collection ======================================
//std::cout << "Digi collections size1 = "<< size1
// << " size2 = " << size2 << std::endl;


// CYCLE over first DIGI collection ======================================

for (digiItr1=digiCollection1->begin();digiItr1!=digiCollection1->end();digiItr1++) {
// size1++;
HcalGenericDetId HcalGenDetId(digiItr1->id());
int tsize = (*digiItr1).size();
int match = 0;

if(HcalGenDetId.isHcalZDCDetId()){
std::cout<<"Collection 1"<<digiItr1->id()<<std::endl;
//for zdc
HcalZDCDetId element(digiItr1->id());
int zside = element.zside();
int section = element.section();
int channel = element.channel();
int gsub = HcalGenDetId.genericSubdet();
std::cout<< " Zdc genSubdet="<< gsub << " zside=" <<zside
<< " section= "<< section << " channel " <<channel
<<std::endl;

if(section==3){// lumi section not reconstructed
size2++;
match = 1;
goto lumi;
}


//std::cout<< " Zdc genSubdet="<< gsub << " zside=" <<zside
// << " section= "<< section << " channel " <<channel
// <<std::endl;

for (digiItr2=digiCollection2->begin();digiItr2!=digiCollection2->end();digiItr2++) {
std::cout<<"Collection 2"<<digiItr2->id()<<std::endl;
HcalZDCDetId element2(digiItr2->id());

//int zside2 = element2.zside();
//int section2 = element2.section();
//int channel2 = element2.channel();
//int gsub2 = HcalGenDetId.genericSubdet();

//std::cout<< " Zdc genSubdet="<<gsub2
// << " zside=" <<zside2
// << " section= "<<section2
// <<" channel "<<channel2
// <<std::endl;

if(element == element2) {
match = 1;
int identical = 1;
@@ -112,6 +139,7 @@ void Digi2Raw2Digi::compare(const edm::Event& iEvent, const edm::EventSetup& iSe
// go to next (primary collection) cell
}
} // end of cycle over 2d DIGI collection
lumi:
if (!match) {
meStatus->Fill(2.);
std::cout << "===> PROBLEM !!! gsubdet=" << gsub
@@ -120,6 +148,7 @@ void Digi2Raw2Digi::compare(const edm::Event& iEvent, const edm::EventSetup& iSe
<< " HcalZDCId match is not found !!!"
<< std::endl;
}

}
else{
//for Hcal subdetectors
@@ -226,7 +255,6 @@ void Digi2Raw2Digi::endJob() {
if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
}


Digi2Raw2Digi::~Digi2Raw2Digi() {}


0 comments on commit bea91cc

Please sign in to comment.