68 #include "TMultiGraph.h" 126 usesResource(
"TFileService");
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] = {
false,
false,
false,
false,
false,
false};
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);
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
#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_
id_type id(size_t cell) const
void analyze(const edm::Event &, const edm::EventSetup &) override
~SiStripBaselineAnalyzer() override
SiStripBaselineAnalyzer(const edm::ParameterSet &)
std::vector< TH1F > vBaselinePointsHisto_
T * make(const Args &...args) const
make new ROOT object
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.
size_type size() const
Return the number of contained DetSets.
TH1F * h1ProcessedRawDigis_
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
void allPeds(std::vector< int > &pefs, const Range &range) const
void getDetIds(std::vector< uint32_t > &DetIds_) const
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.
const Range getRange(const uint32_t &detID) const
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 &)