71 rootFile_ =
new TFile(rootFileName.c_str(),
"RECREATE");
100 for (dtLayerIt = digis->begin(); dtLayerIt != digis->end(); ++dtLayerIt) {
105 const DTLayerId layerId = (*dtLayerIt).first;
109 const DTWireId wireId(layerId, (*digi).wire());
111 double t0 = (*digi).countsTDC();
116 const DTLayer* layer =
nullptr;
137 std::map<DTLayerId, TH1F*> meanHistoMap;
138 std::map<DTLayerId, TH1F*> sigmaHistoMap;
147 double mean = sumW / nDigis;
148 double rms = sumW2 / nDigis - mean *
mean;
152 if (meanHistoMap.find(layerId) == meanHistoMap.end()) {
156 TH1F* meanHistoTP =
new TH1F((histoName +
"_tpMean").c_str(),
157 "mean from test pulses by channel",
160 (firstChannel + nWires));
161 TH1F* sigmaHistoTP =
new TH1F((histoName +
"_tpSigma").c_str(),
162 "sigma from test pulses by channel",
165 (firstChannel + nWires));
166 meanHistoMap[layerId] = meanHistoTP;
167 sigmaHistoMap[layerId] = sigmaHistoTP;
170 int nBin = meanHistoMap[layerId]->GetXaxis()->FindFixBin(wireId.
wire());
171 meanHistoMap[layerId]->SetBinContent(nBin, mean);
172 sigmaHistoMap[layerId]->SetBinContent(nBin, rms);
175 for (std::map<DTLayerId, TH1F*>::const_iterator
key = meanHistoMap.begin();
key != meanHistoMap.end(); ++
key) {
176 meanHistoMap[(*key).first]->Write();
177 sigmaHistoMap[(*key).first]->Write();
183 std::stringstream theStream;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DTTPAnalyzer(const edm::ParameterSet &)
std::map< DTWireId, double > sumWPerWire_
std::map< DTWireId, int > nDigisPerWire_
int layer() const
Return the layer number.
int firstChannel() const
Returns the wire number of the first wire.
std::string getHistoName(const DTLayerId &)
const DTTopology & specificTopology() const
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< DTTTrigBaseSync > tTrigSync_
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< DTWireId, double > sumW2PerWire_
int wire() const
Return the wire number.
int superlayer() const
Return the superlayer number (deprecated method name)
int channels() const
Returns the number of wires in the layer.
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator
void beginRun(const edm::Run &, const edm::EventSetup &) override
DTLayerId layerId() const
Return the corresponding LayerId.
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
edm::ESHandle< DTGeometry > dtGeom_
int station() const
Return the station number.
int wheel() const
Return the wheel number.