121 _digicollection(iConfig.getParameter<edm::InputTag>(
"digiCollection")),
122 _zs(iConfig.getUntrackedParameter<bool>(
"zeroSuppressed",
true)),
123 _suffix(iConfig.getParameter<std::string>(
"mapSuffix")),
125 _useCabling(iConfig.getUntrackedParameter<bool>(
"useCabling",
true)),
135 _nShots = tfserv->
make<TH1F>(
"nShots",
"Number of Shots per event",200,-0.5,199.5);
136 _nShots->GetXaxis()->SetTitle(
"Shots");
_nShots->GetYaxis()->SetTitle(
"Events");
139 _nShotsVsTime = tfserv->
make<TProfile>(
"nShotsVsTime",
"Mean number of shots vs orbit number",3600,0.5,3600*11223+0.5);
143 _whichAPV = tfserv->
make<TH1F>(
"whichAPV",
"APV with shots",6,-0.5,5.5);
146 _stripMult = tfserv->
make<TH1F>(
"stripMultiplicity",
"Shot Strip Multiplicity",129,-0.5,128.5);
147 _stripMult->GetXaxis()->SetTitle(
"Number of Strips");
_stripMult->GetYaxis()->SetTitle(
"Shots");
149 _median = tfserv->
make<TH1F>(
"median",
"APV Shot charge median",256,-0.5,255.5);
150 _median->GetXaxis()->SetTitle(
"Charge [ADC]");
_median->GetYaxis()->SetTitle(
"Shots");
152 _subDetector = tfserv->
make<TH1F>(
"subDets",
"SubDetector Shot distribution",10,-0.5,9.5);
156 _fed = tfserv->
make<TH1F>(
"fed",
"FED Shot distribution",440,50,490);
157 _fed->GetYaxis()->SetTitle(
"Shots");
159 _nShotsVsFED = tfserv->
make<TH2F>(
"nShotsVsFED",
"Number of Shots per event vs fedid",440,50,490,200,-0.5,199.5);
163 _medianVsFED = tfserv->
make<TH2F>(
"medianVsFED",
"APV Shot charge median vs fedid",440,50,490,256,-0.5,255.5);
205 std::vector<int> nshotsperFed;
209 nshotsperFed.resize(lNumFeds,0);
213 const std::vector<APVShot>& shots = apvsf.
getShots();
215 for(std::vector<APVShot>::const_iterator shot=shots.begin();shot!=shots.end();++shot) {
216 if(shot->isGenuine()) {
220 uint32_t det=shot->detId();
224 if (!(conns.size()))
continue;
226 for (uint32_t ch = 0; ch<conns.size(); ch++) {
227 lFedId = conns[ch]->fedId();
231 std::cout <<
" -- Invalid fedid " << lFedId <<
" for detid " << det <<
" connection " << ch << std::endl;
238 std::cout <<
" -- No valid fedid (=" << lFedId <<
") found for detid " << det << std::endl;
265 for (uint16_t lFed(0); lFed<lNumFeds; lFed++){
305 std::string tkshotmultmapname =
"ShotMultiplicity_" +
_suffix +
".png";
306 tkmap.
save(
true,0,0,tkshotmultmapname);
307 std::string tkstripmultmapname =
"StripMultiplicity_" +
_suffix +
".png";
308 tkmap2.
save(
true,0,0,tkstripmultmapname);
310 std::string rootmapname =
"TKMap_"+
_suffix+
".root";
static const uint16_t FED_ID_MIN
#define DEFINE_FWK_MODULE(type)
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
const std::vector< APVShot > & getShots() const
void save(std::string filename)
APVShotsAnalyzer(const edm::ParameterSet &)
void fill(uint32_t &detid, float value)
void setPalette(int numpalette)
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
virtual void endRun(const edm::Run &, const edm::EventSetup &)
const SiStripDetCabling * _detCabling
The cabling object.
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
T const * product() const
T * make() const
make new ROOT object
static const uint16_t FED_ID_MAX
uint32_t _cacheIdDet
DB cache ID used to establish if the cabling has changed during the run.
void add(uint32_t &detid, float value)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void updateDetCabling(const edm::EventSetup &setup)
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
edm::InputTag _digicollection