73 rootFile_ =
new TFile(rootFileName.c_str(),
"RECREATE");
106 for (dtLayerIt = digis->begin();
107 dtLayerIt != digis->end();
113 const DTLayerId layerId = (*dtLayerIt).first;
117 digi != digiRange.second;
119 const DTWireId wireId( layerId, (*digi).wire() );
121 double t0 = (*digi).countsTDC();
126 const DTLayer* layer =
nullptr;
148 std::map<DTLayerId, TH1F*> meanHistoMap;
149 std::map<DTLayerId, TH1F*> sigmaHistoMap;
150 for(std::map<DTWireId, int>::const_iterator wireIdIt =
nDigisPerWire_.begin();
158 double mean = sumW/nDigis;
159 double rms = sumW2/nDigis - mean*
mean;
163 if(meanHistoMap.find(layerId) == meanHistoMap.end()) {
167 TH1F* meanHistoTP =
new TH1F((histoName +
"_tpMean").c_str(),
"mean from test pulses by channel",
168 nWires,firstChannel,(firstChannel + nWires));
169 TH1F* sigmaHistoTP =
new TH1F((histoName +
"_tpSigma").c_str(),
"sigma from test pulses by channel",
170 nWires,firstChannel,(firstChannel + nWires));
171 meanHistoMap[layerId] = meanHistoTP;
172 sigmaHistoMap[layerId] = sigmaHistoTP;
175 int nBin = meanHistoMap[layerId]->GetXaxis()->FindFixBin(wireId.
wire());
176 meanHistoMap[layerId]->SetBinContent(nBin,mean);
177 sigmaHistoMap[layerId]->SetBinContent(nBin,rms);
180 for(std::map<DTLayerId, TH1F*>::const_iterator
key = meanHistoMap.begin();
181 key != meanHistoMap.end(); ++
key){
182 meanHistoMap[(*key).first]->Write();
183 sigmaHistoMap[(*key).first]->Write();
190 std::stringstream theStream;
193 theStream >> histoName;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DTTPAnalyzer(const edm::ParameterSet &)
std::map< DTWireId, double > sumWPerWire_
def setup(process, global_tag, zero_tesla=False)
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::vector< DigiType >::const_iterator const_iterator
void beginRun(const edm::Run &, const edm::EventSetup &) override
DTLayerId layerId() const
Return the corresponding LayerId.
std::pair< const_iterator, const_iterator > Range
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.
T get(const Candidate &c)