68 #include "TMultiGraph.h"
85 virtual void endJob()
override ;
142 h1BadAPVperEvent_->SetXTitle(
"# Modules with Bad APVs");
143 h1BadAPVperEvent_->SetYTitle(
"Entries");
144 h1BadAPVperEvent_->SetLineWidth(2);
145 h1BadAPVperEvent_->SetLineStyle(2);
148 h1APVCM_->SetXTitle(
"APV CM [adc]");
183 std::vector<uint32_t> detIdV;
186 for(uint32_t
i=0;
i < detIdV.size(); ++
i){
189 pedestals.resize((pedestalsRange.second- pedestalsRange.first)*8/10);
201 for (; itCMDetSetV != moduleCM->end(); ++itCMDetSetV){
203 for(;itCM != itCMDetSetV->
end(); ++itCM)
h1APVCM_->Fill(itCM->adc());
242 uint32_t NBabAPVs = moduleRawDigi->size();
243 std::cout<<
"Number of module with HIP in this event: " << NBabAPVs << std::endl;
246 for (; itRawDigis != moduleRawDigi->end(); ++itRawDigis) {
248 uint32_t detId = itRawDigis->id;
252 if(itDSBaseline->id != detId){
253 std::cout <<
"Collections out of Synch. Something of fishy is going on ;-)" << std::endl;
267 bool restAPV[6] = {0,0,0,0,0,0};
268 int strip =0, totADC=0;
269 int minAPVRes = 7, maxAPVRes = -1;
270 for(;itRaw != itRawDigis->
end(); ++itRaw, ++strip){
271 float adc = itRaw->adc();
279 if(APV>maxAPVRes) maxAPVRes =
APV;
280 if(APV<minAPVRes) minAPVRes =
APV;
286 float minx = -0.5, maxx=767.5;
288 minx = minAPVRes * 128 -0.5;
289 maxx = maxAPVRes * 128 + 127.5;
293 sprintf(detIds,
"%ul", detId);
294 sprintf(evs,
"%llu",
event);
295 sprintf(
runs,
"%u", run);
296 char* dHistoName = Form(
"Id:%s_run:%s_ev:%s",detIds,
runs, evs);
297 h1ProcessedRawDigis_ = sdProcessedRawDigis_.make<TH1F>(dHistoName,dHistoName, bins, minx, maxx);
300 h1Baseline_ = sdBaseline_.make<TH1F>(dHistoName,dHistoName, bins, minx, maxx);
311 h1Clusters_ = sdClusters_.make<TH1F>(dHistoName,dHistoName, bins, minx, maxx);
328 std::vector<int16_t> ProcessedRawDigis(itRawDigis->size());
333 std::vector<int16_t>::const_iterator itProcessedRawDigis;
336 for(itProcessedRawDigis = ProcessedRawDigis.begin();itProcessedRawDigis != ProcessedRawDigis.end(); ++itProcessedRawDigis){
337 if(restAPV[strip/128]){
338 float adc = *itProcessedRawDigis;
351 for ( ; itClusters !=
clusters->end(); ++itClusters ){
353 if(itClusters->
id() == detId){
354 int firststrip = clus->firstStrip();
357 for(
auto itAmpl = clus->amplitudes().begin(); itAmpl != clus->amplitudes().end(); ++itAmpl){
int adc(sample_type sample)
get the ADC sample (12 bits)
T getParameter(std::string const &) const
EventNumber_t event() const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator end(bool update=false) const
virtual void endJob() override
#define DEFINE_FWK_MODULE(type)
unsigned long long EventNumber_t
std::vector< TH1F > vBaselineHisto_
T * make(const Args &...args) const
make new ROOT object
data_type const * const_iterator
std::pair< ContainerIterator, ContainerIterator > Range
edm::InputTag srcProcessedRawDigi_
virtual void beginJob() override
id_type id(size_t cell) const
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
~SiStripBaselineAnalyzer()
SiStripBaselineAnalyzer(const edm::ParameterSet &)
usesResource(TFileService::kSharedResource)
std::vector< TH1F > vBaselinePointsHisto_
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
edm::Service< TFileService > fs_
std::vector< TH1F > vClusterHisto_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
iterator end()
Return the off-the-end iterator.
TH1F * h1ProcessedRawDigis_
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
edm::InputTag srcBaseline_
std::vector< int > pedestals
std::vector< TH1F > vProcessedRawDigiHisto_
edm::InputTag srcBaselinePoints_
uint16_t nModuletoDisplay_
iterator begin()
Return an iterator to the first DetSet.
edm::ESHandle< SiStripPedestals > pedestalsHandle
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
std::auto_ptr< SiStripPedestalsSubtractor > subtractorPed_
const_iterator begin(bool update=false) const
static std::auto_ptr< SiStripPedestalsSubtractor > create_SubtractorPed(const edm::ParameterSet &)