Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0de4d1a
updated ploting for new output file structure and removed some nonsense
previsualconsent Jul 22, 2015
c2da05d
fixes for making plots look better
previsualconsent Jul 22, 2015
eb5659c
added ccu plots
previsualconsent Jul 22, 2015
378a14a
added plots for CCU correction
previsualconsent Jul 23, 2015
9d601e6
plots
previsualconsent Jul 24, 2015
49380d0
added crystalmap.txt
previsualconsent Jul 27, 2015
4f642d3
made some plotting codes with a library in loadOldCalib
previsualconsent Jul 29, 2015
2d721ca
fixed issues with crystalmap.txt
previsualconsent Jul 29, 2015
212daa3
merged reco and analysis config file
previsualconsent Jul 29, 2015
e2e4fea
dump Calibrations was missing rawid for EE
previsualconsent Jul 29, 2015
420d346
added options for shifting the minimum energy threshold
previsualconsent Jul 22, 2015
c0aa4b7
submit script final
previsualconsent Jul 22, 2015
0728102
split energyThreshold into EE and EB
previsualconsent Jul 29, 2015
e7682bc
script/testCAF.sh tells cmsRun to do the RECO or not
previsualconsent Aug 4, 2015
d4e4973
plotting
previsualconsent Aug 4, 2015
5327ca6
made comments for the cfg file in documentation
previsualconsent Aug 4, 2015
fec0bcf
changed docs to refer to my repo
previsualconsent Aug 4, 2015
97f997c
plots for dumpTree
previsualconsent Aug 6, 2015
36160f8
added filter for rechit flags and energies
previsualconsent Aug 6, 2015
a9fdc43
have RECO output only save the selected rechits
previsualconsent Aug 6, 2015
2122ec4
updated crystalmap; implemented more plotting macros, new tool runInf…
previsualconsent Sep 30, 2015
6a59413
Merge pull request #1 from previsualconsent/energystability
previsualconsent Sep 30, 2015
abab5ab
updated plot script for making ring plots. updated runInfo and script
previsualconsent Oct 9, 2015
f645980
added DummyRecHit.cc in plugins for Pi0 stream, chi2 threshold, occup…
simoneg90 Aug 20, 2015
9a16ef9
couple of comments
simoneg90 Aug 20, 2015
3fe7cd5
adding the Pi0 sequence in ecalTime_fromAlcaStream_cfg
simoneg90 Aug 21, 2015
5515358
new bash script, infoTree routine implemented - to trace each crystal…
simoneg90 Aug 21, 2015
6dd3802
little changes. Added the exception for no EB or EE RecHit
simoneg90 Sep 15, 2015
8f34ba4
new coding... added Lone Trigger filter, infoTree is before the cut s…
simoneg90 Oct 9, 2015
ed6e418
add choice for Lone Bunch trigger
simoneg90 Oct 9, 2015
fb9c0ef
removed lots of commented out code, dumpAll, and fixed occupancy fill
previsualconsent Oct 12, 2015
d811b5f
removed more comments
previsualconsent Oct 12, 2015
6c6acd5
split getEnergyThreshold into energy and Chi2 functions
previsualconsent Oct 12, 2015
b08257c
Merge remote-tracking branch 'mine/rebaseSimone'
previsualconsent Oct 12, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
*.png
*.root
__init__.py
*.old
pippo*
*processDump.py
*.pyc
html/*
LSF*
*.list
27 changes: 27 additions & 0 deletions EcalTiming/data/crystalmap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,7 @@
-5 299 0 3076 24 4 -5 838863659
-5 300 0 3076 24 4 -5 838863660
-5 301 0 3201 25 1 -5 838863661
-5 302 0 3201 25 1 -5 838863662
-5 303 0 3201 25 1 -5 838863663
-5 304 0 3201 25 1 -5 838863664
-5 305 0 3201 25 1 -5 838863665
Expand Down Expand Up @@ -57453,6 +57454,7 @@
77 110 0 4287 33 63 77 838965870
77 111 0 4286 33 62 77 838965871
77 112 0 4286 33 62 77 838965872
77 113 0 4286 33 62 77 838965873
77 114 0 4286 33 62 77 838965874
77 115 0 4286 33 62 77 838965875
77 116 0 4285 33 61 77 838965876
Expand Down Expand Up @@ -71331,6 +71333,11 @@
50 98 1 6273 49 1 2 872438114
50 99 1 6273 49 1 1 872438115
50 100 1 6273 49 1 0 872438116
51 1 1 6801 53 17 0 872438145
51 2 1 6801 53 17 1 872438146
51 3 1 6801 53 17 2 872438147
51 4 1 6801 53 17 3 872438148
51 5 1 6801 53 17 4 872438149
51 6 1 6800 53 16 5 872438150
51 7 1 6800 53 16 6 872438151
51 8 1 6800 53 16 7 872438152
Expand Down Expand Up @@ -71404,6 +71411,10 @@
51 98 1 6145 48 1 2 872438242
51 99 1 6145 48 1 1 872438243
51 100 1 6145 48 1 0 872438244
52 1 1 6801 53 17 0 872438273
52 3 1 6801 53 17 2 872438275
52 4 1 6801 53 17 3 872438276
52 5 1 6801 53 17 4 872438277
52 6 1 6800 53 16 4 872438278
52 7 1 6800 53 16 6 872438279
52 8 1 6800 53 16 7 872438280
Expand Down Expand Up @@ -71477,6 +71488,11 @@
52 98 1 6145 48 1 2 872438370
52 99 1 6145 48 1 1 872438371
52 100 1 6145 48 1 0 872438372
53 1 1 6801 53 17 0 872438401
53 2 1 6801 53 17 1 872438402
53 3 1 6801 53 17 2 872438403
53 4 1 6801 53 17 3 872438404
53 5 1 6801 53 17 4 872438405
53 6 1 6800 53 16 4 872438406
53 7 1 6800 53 16 5 872438407
53 8 1 6800 53 16 6 872438408
Expand Down Expand Up @@ -71550,6 +71566,11 @@
53 98 1 6145 48 1 2 872438498
53 99 1 6145 48 1 1 872438499
53 100 1 6145 48 1 0 872438500
54 1 1 6801 53 17 0 872438529
54 2 1 6801 53 17 0 872438530
54 3 1 6801 53 17 1 872438531
54 4 1 6801 53 17 2 872438532
54 5 1 6801 53 17 3 872438533
54 6 1 6800 53 16 4 872438534
54 7 1 6800 53 16 5 872438535
54 8 1 6800 53 16 6 872438536
Expand Down Expand Up @@ -71623,6 +71644,11 @@
54 98 1 6145 48 1 2 872438626
54 99 1 6145 48 1 1 872438627
54 100 1 6145 48 1 0 872438628
55 1 1 6801 53 17 0 872438657
55 2 1 6801 53 17 0 872438658
55 3 1 6801 53 17 1 872438659
55 4 1 6801 53 17 2 872438660
55 5 1 6801 53 17 3 872438661
55 6 1 6800 53 16 4 872438662
55 7 1 6800 53 16 5 872438663
55 8 1 6800 53 16 6 872438664
Expand Down Expand Up @@ -71993,6 +72019,7 @@
59 73 1 6158 48 14 26 872439241
59 74 1 6158 48 14 25 872439242
59 75 1 6158 48 14 24 872439243
59 76 1 6157 48 13 23 872439244
59 77 1 6157 48 13 22 872439245
59 78 1 6157 48 13 21 872439246
59 79 1 6157 48 13 20 872439247
Expand Down
1 change: 0 additions & 1 deletion EcalTiming/interface/EcalCrystalTimingCalibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#define DS_RING 0x08
#define DS_CRYS 0x10


class EcalCrystalTimingCalibration
{
public:
Expand Down
234 changes: 234 additions & 0 deletions EcalTiming/plugins/DummyRechitDigis.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
// -*- C++ -*-
//
// Package: ECALlite/DummyRechitDigis
// Class: DummyRechitDigis
//
/**\class DummyRechitDigis DummyRechitDigis.cc ECALlite/DummyRechitDigis/plugins/DummyRechitDigis.cc
Description: [one line class summary]
Implementation:
[Notes on implementation]
*/
//
// Original Author: Joshua Robert Hardenbrook
// Created: Mon, 01 Jun 2015 06:58:24 GMT
//
//

// system include files
#include <memory>

// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DataFormats/EgammaReco/interface/BasicCluster.h"
#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
#include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
#include "DataFormats/CaloRecHit/interface/CaloID.h"
#include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"

#include "CondFormats/EcalObjects/interface/EcalSampleMask.h"

#include "EcalTiming/EcalTiming/plugins/EcalTimingCalibProducer.h"

//
// class declaration
//

class DummyRechitDigis : public edm::EDProducer {
public:
explicit DummyRechitDigis(const edm::ParameterSet&);
~DummyRechitDigis();

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
virtual void beginJob() override;
virtual void produce(edm::Event&, const edm::EventSetup&) override;
virtual void endJob() override;

// ----------member data ---------------------------
edm::InputTag tag_barrelHitProducer_;
edm::InputTag tag_endcapHitProducer_;
const std::string barrelRecHitCollection_;
const std::string endcapRecHitCollection_;
edm::InputTag tag_barrelDigiProducer_;
edm::InputTag tag_endcapDigiProducer_;
const std::string barrelDigiCollection_;
const std::string endcapDigiCollection_;
const bool doDigi_;
};

DummyRechitDigis::DummyRechitDigis(const edm::ParameterSet& iConfig):
tag_barrelHitProducer_ (iConfig.getParameter< edm::InputTag > ("barrelHitProducer")),
tag_endcapHitProducer_ (iConfig.getParameter< edm::InputTag > ("endcapHitProducer")),
barrelRecHitCollection_ (iConfig.getUntrackedParameter<std::string>("barrelRecHitCollection")),
endcapRecHitCollection_ (iConfig.getUntrackedParameter<std::string>("endcapRecHitCollection")),
tag_barrelDigiProducer_ (iConfig.getParameter< edm::InputTag > ("barrelDigis")),
tag_endcapDigiProducer_ (iConfig.getParameter< edm::InputTag > ("endcapDigis")),
barrelDigiCollection_ (iConfig.getUntrackedParameter<std::string>("barrelDigiCollection")),
endcapDigiCollection_ (iConfig.getUntrackedParameter<std::string>("endcapDigiCollection")),
doDigi_ (iConfig.getUntrackedParameter<bool>("doDigi"))
{
if(doDigi_) {
produces< EBDigiCollection >(barrelDigiCollection_);
produces< EEDigiCollection >(endcapDigiCollection_);
}
else {
produces< EcalRecHitCollection >(barrelRecHitCollection_);
produces< EcalRecHitCollection >(endcapRecHitCollection_);
}
}

DummyRechitDigis::~DummyRechitDigis(){ }

void DummyRechitDigis::produce(edm::Event& iEvent, const edm::EventSetup& iSetup){
//std::cout << "\n-----------New Event ----------------\n " << std::endl;
using namespace edm;
// build an empty collection
// fake rechits
// handle to try to fill
edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
// dummy collection to Put()
std::auto_ptr< EcalRecHitCollection > rechits_temp( new EcalRecHitCollection);
std::auto_ptr< EcalRecHitCollection > rechits_temp2( new EcalRecHitCollection);

// EcalRecHit::EcalRecHit(const DetId& id, float energy, float time, uint32_t flags, uint32_t flagBits)
// add one rechit
EcalRecHit zero_rechit(0,0,0,0,0);
EcalRecHitCollection zero_collection;
zero_collection.push_back(zero_rechit);
*rechits_temp = zero_collection;
*rechits_temp2 = zero_collection;

std::auto_ptr< EcalRecHitCollection > rechits_eb( new EcalRecHitCollection);
std::auto_ptr< EcalRecHitCollection > rechits_ee( new EcalRecHitCollection);

// fake digis
// handle to try to fill
Handle<EBDigiCollection> digisEBHandle;
Handle<EEDigiCollection> digisEEHandle;
// dummy collection to Put()
std::auto_ptr<EBDigiCollection> outputEBDigiCollection( new EBDigiCollection );
std::auto_ptr<EEDigiCollection> outputEEDigiCollection( new EEDigiCollection );

//Digi zero_digi;
EBDigiCollection ebfakecol;
EEDigiCollection eefakecol;
//ebfakecol.push_back(zerodigi);
//eefakecol.push_back(zerodigi);

// fake empty collections
std::auto_ptr<EBDigiCollection> fakeEBDigiCollection( new EBDigiCollection );
*fakeEBDigiCollection = ebfakecol;
std::auto_ptr<EEDigiCollection> fakeEEDigiCollection( new EEDigiCollection) ;
*fakeEEDigiCollection = eefakecol;

if(!doDigi_) {
bool foundEBRechit = true;
bool foundEERechit = true;
std::cout<<"sono entrato nel !dodigi"<<std::endl;

// if you dont find the barrel rechits youre looking for, put in a fake one
try {
iEvent.getByLabel(tag_barrelHitProducer_, barrelRecHitsHandle);
*rechits_eb = *(barrelRecHitsHandle.product());
for (auto recHit_itr = barrelRecHitsHandle->begin(); recHit_itr != barrelRecHitsHandle->end(); ++recHit_itr){
std::cout<<"sono entrato nell'if eb"<<std::endl;
}
}
catch(cms::Exception& ex) { foundEBRechit = rechits_eb->size() > 0;}
// if you found the collection put it back into the event
iEvent.put( foundEBRechit ? rechits_eb : rechits_temp, barrelRecHitCollection_);

// if you dont find the endcap rechits youre looking for, put in a fake one
try {
//std::cout<<"sono entrato nell'if ee dodigi"<<std::endl;
iEvent.getByLabel(tag_endcapHitProducer_, endcapRecHitsHandle);
*rechits_ee = *(endcapRecHitsHandle.product());
}
catch (cms::Exception& ex){ foundEERechit = rechits_ee->size() > 0;
}

iEvent.put( foundEERechit ? rechits_ee : rechits_temp2, endcapRecHitCollection_);
std::cout<<"Build fake digi!"<<std::endl;
} // end dummy rechits
// Build fake digi collections
else {
bool foundEBDigi = true;
bool foundEEDigi = true;

//std::cout<<"sono nell'else di dummyrecHit"<<std::endl;

try { // barrel digis
iEvent.getByLabel(tag_barrelDigiProducer_, digisEBHandle);
for(EBDigiCollection::const_iterator digiItr = digisEBHandle->begin(); digiItr != digisEBHandle->end(); ++digiItr){
//EBDetId id_crystal(digiItr->id());
DetId id = digiItr->id();
//std::cout<<id.subdetId()<<std::endl;
//std::cout<<"SUBDETID!! Barrel "<<digiItr->id()<<std::endl;
if(id.subdetId()!=EcalBarrel){
std::cout<<"SUBDETID: "<<id.subdetId()<<std::endl;
throw cms::Exception("EcalProblem") << "No valid subdetId() \n";
}

}

*outputEBDigiCollection = *(digisEBHandle.product());
//std::cout<<"sono entrato nell'else eb"<<std::endl;
}
catch (cms::Exception& ex) {
foundEBDigi = outputEBDigiCollection->size() > 0;
//std::cout<<"sono entrato nel catch eb"<<std::endl;
}

// insert the EB collection
iEvent.put(foundEBDigi ? outputEBDigiCollection : fakeEBDigiCollection, barrelDigiCollection_);

try { // endcap digis
iEvent.getByLabel(tag_endcapDigiProducer_, digisEEHandle);
for(EEDigiCollection::const_iterator digiItr = digisEEHandle->begin(); digiItr != digisEEHandle->end(); ++digiItr){
DetId id = digiItr->id();
// std::cout<<id.subdetId()<<std::endl;
// std::cout<<"SUBDETID: "<<id.subdetId()<<std::endl;
if(id.subdetId()!=EcalEndcap){
std::cout<<"SUBDETID: "<<id.subdetId()<<std::endl;
throw cms::Exception("EcalProblem") << "No valid subdetId() \n";
}
// EEDetId id_crystal(digiItr->id());
// std::cout<<"SUBDETID!! Endcap "<<digiItr->id()<<std::endl;
// throw cms::Exception("EcalProblem") << "No valid subdetId(): "<<digiItr->id().subdetId() <<"\n";
}
*outputEEDigiCollection = *(digisEEHandle.product());
//std::cout<<"sono entrato nell'else ee"<<std::endl;
}
catch (cms::Exception& ex) {
foundEEDigi = outputEEDigiCollection->size() > 0;
//std::cout<<"sono entrato nel catch ee"<<std::endl;
}
// std::cout << "Putting Real EE collection? " << foundEEDigi << std::endl;
iEvent.put(foundEEDigi ? outputEEDigiCollection : fakeEEDigiCollection, endcapDigiCollection_);

}
//std::cout << "-----------End Dummy Rechits ---------- " << std::endl;
}

void DummyRechitDigis::beginJob(){ }
void DummyRechitDigis::endJob(){ }
void DummyRechitDigis::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
//The following says we do not know what parameters are allowed so do no validation
// Please change this to state exactly what you do use, even if it is no parameters
edm::ParameterSetDescription desc;
desc.setUnknown();
descriptions.addDefault(desc);
}

//define this as a plug-in
DEFINE_FWK_MODULE(DummyRechitDigis);


Loading