Analyze.
109 TH1F *hOccupancyHisto;
115 for (dtLayerId_It=dtdigis->begin(); dtLayerId_It!=dtdigis->end(); ++dtLayerId_It){
117 digiIt!=((*dtLayerId_It).second).
second; ++digiIt){
120 int tdcTime = (*digiIt).countsTDC();
123 cout<<
"tdcTime (ns): "<<(tdcTime*25)/32<<endl;
125 cout<<
"***Error*** : your digi has a tdcTime (ns) higher than the TDC trigger width :"<<(tdcTime*25)/32<<endl;
131 (*dtLayerId_It).first.superlayerId().chamberId().wheel()==
wh &&
132 (*dtLayerId_It).first.superlayerId().chamberId().sector()==
sect) ||
150 cout<<
"tdcTime (ns): "<<((*digiIt).countsTDC()*25)/32<<
" --- TriggerWidth (ns): "<<(
upperLimit*25)/32<<endl;
153 const DTLayerId dtLId = (*dtLayerId_It).first;
155 const int nWires = dtTopo.
channels();
166 if(hOccupancyHisto == 0) {
169 hOccupancyHisto =
new TH1F(HistoName.c_str(), HistoName.c_str(), nWires, firstWire, lastWire+1);
171 cout <<
" New Occupancy Histo: " << hOccupancyHisto->GetName() << endl;
174 hOccupancyHisto->Fill((*digiIt).wire());
185 stringstream toAppend; toAppend <<
counter;
186 Histo2Name =
"DigiPerWirePerEvent_" +
getLayerName(dtLId) +
"_" + toAppend.str();
188 hEvtPerWireH =
new TH2F(Histo2Name.c_str(), Histo2Name.c_str(), 1000,0.5,1000.5,nWires, firstWire, lastWire+1);
191 cout <<
" New Histo with the number of digi per evt per wire: " << hEvtPerWireH->GetName() << endl;
201 std::map<int,int > DigiPerWirePerEvent;
203 vector<DTChamber*>::const_iterator ch_it =
dtGeom->chambers().begin();
204 vector<DTChamber*>::const_iterator ch_end =
dtGeom->chambers().end();
205 for (; ch_it != ch_end; ++ch_it) {
207 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
208 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
210 for(; sl_it != sl_end; ++sl_it) {
212 vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
213 vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
215 for(; l_it != l_end; ++l_it) {
226 for (
int wire=firstWire; wire<=lastWire; wire++) {
227 DigiPerWirePerEvent[wire]= 0;
232 digi!=layerDigi.second;
235 DigiPerWirePerEvent[(*digi).wire()]+=1;
238 for (
int wire=firstWire; wire<=lastWire; wire++) {
240 int histoEvents =
nevents - (counter*1000);
257 (*lHisto).second->Write();
const int lastChannel() const
Returns the wire number of the last wire.
T getUntrackedParameter(std::string const &, T const &) const
const int channels() const
Returns the number of wires in the layer.
edm::ParameterSet parameters
DTChamberId chamberId() const
Return the corresponding ChamberId.
const int firstChannel() const
Returns the wire number of the first wire.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
U second(std::pair< T, U > const &p)
edm::ESHandle< DTGeometry > dtGeom
std::string getLayerName(const DTLayerId &lId) const
Get the name of the layer.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
float tTrig
tTrig from the DB
int TriggerWidth
variables to set by configuration file
std::vector< DigiType >::const_iterator const_iterator
std::map< DTLayerId, TH2F * > theHistoEvtPerWireMap
std::pair< const_iterator, const_iterator > Range
edm::ESHandle< DTTtrig > tTrigMap
std::map< DTLayerId, int > skippedPlot
int wheel() const
Return the wheel number.
std::map< DTLayerId, TH1F * > theHistoOccupancyMap