71 subtractT0_(pset.getParameter<bool>(
"subtractT0")),
72 digiLabel_(pset.getParameter<edm::InputTag>(
"digiLabel")),
76 rootFile_ =
new TFile(rootFileName.c_str(),
"RECREATE");
109 for (dtLayerIt = digis->begin();
110 dtLayerIt != digis->end();
116 const DTLayerId layerId = (*dtLayerIt).first;
120 digi != digiRange.second;
122 const DTWireId wireId( layerId, (*digi).wire() );
124 double t0 = (*digi).countsTDC();
151 std::map<DTLayerId, TH1F*> meanHistoMap;
152 std::map<DTLayerId, TH1F*> sigmaHistoMap;
153 for(std::map<DTWireId, int>::const_iterator wireIdIt =
nDigisPerWire_.begin();
161 double mean = sumW/nDigis;
162 double rms = sumW2/nDigis - mean*
mean;
166 if(meanHistoMap.find(layerId) == meanHistoMap.end()) {
168 const int firstChannel =
dtGeom_->layer(layerId)->specificTopology().firstChannel();
169 const int nWires =
dtGeom_->layer(layerId)->specificTopology().channels();
170 TH1F* meanHistoTP =
new TH1F((histoName +
"_tpMean").c_str(),
"mean from test pulses by channel",
171 nWires,firstChannel,(firstChannel + nWires));
172 TH1F* sigmaHistoTP =
new TH1F((histoName +
"_tpSigma").c_str(),
"sigma from test pulses by channel",
173 nWires,firstChannel,(firstChannel + nWires));
174 meanHistoMap[layerId] = meanHistoTP;
175 sigmaHistoMap[layerId] = sigmaHistoTP;
178 int nBin = meanHistoMap[layerId]->GetXaxis()->FindFixBin(wireId.
wire());
179 meanHistoMap[layerId]->SetBinContent(nBin,mean);
180 sigmaHistoMap[layerId]->SetBinContent(nBin,rms);
183 for(std::map<DTLayerId, TH1F*>::const_iterator
key = meanHistoMap.begin();
184 key != meanHistoMap.end(); ++
key){
185 meanHistoMap[(*key).first]->Write();
186 sigmaHistoMap[(*key).first]->Write();
192 std::string histoName;
193 std::stringstream theStream;
196 theStream >> histoName;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DTTPAnalyzer(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
std::map< DTWireId, double > sumWPerWire_
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globalPos)
std::map< DTWireId, int > nDigisPerWire_
int layer() const
Return the layer number.
DTTTrigBaseSync * tTrigSync_
std::string getHistoName(const DTLayerId &)
virtual void setES(const edm::EventSetup &setup)=0
Pass the Event Setup to the synchronization module at each event.
unsigned int offset(bool)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::map< DTWireId, double > sumW2PerWire_
void analyze(const edm::Event &, const edm::EventSetup &)
int wire() const
Return the wire number.
int superlayer() const
Return the superlayer number (deprecated method name)
void beginRun(const edm::Run &, const edm::EventSetup &)
std::vector< DigiType >::const_iterator const_iterator
DTLayerId layerId() const
Return the corresponding LayerId.
std::pair< const_iterator, const_iterator > Range
edm::ESHandle< DTGeometry > dtGeom_
int station() const
Return the station number.
int wheel() const
Return the wheel number.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
T get(const Candidate &c)