60 _nsamples( iConfig.getUntrackedParameter< unsigned int >(
"nSamples", 10 ) ),
61 _presample( iConfig.getUntrackedParameter< unsigned int >(
"nPresamples", 2 ) ),
62 _firstsample( iConfig.getUntrackedParameter< unsigned int >(
"firstSample", 1 ) ),
63 _lastsample( iConfig.getUntrackedParameter< unsigned int >(
"lastSample", 2 ) ),
64 _timingcutlow( iConfig.getUntrackedParameter< unsigned int >(
"timingCutLow", 2 ) ),
65 _timingcuthigh( iConfig.getUntrackedParameter< unsigned int >(
"timingCutHigh", 9 ) ),
66 _timingquallow( iConfig.getUntrackedParameter< unsigned int >(
"timingQualLow", 3 ) ),
67 _timingqualhigh( iConfig.getUntrackedParameter< unsigned int >(
"timingQualHigh", 8 ) ),
68 _ratiomincutlow( iConfig.getUntrackedParameter< double >(
"ratioMinCutLow", 0.4 ) ),
69 _ratiomincuthigh( iConfig.getUntrackedParameter< double >(
"ratioMinCutHigh", 0.95 ) ),
70 _ratiomaxcutlow( iConfig.getUntrackedParameter< double >(
"ratioMaxCutLow", 0.8 ) ),
71 _presamplecut( iConfig.getUntrackedParameter< double >(
"presampleCut", 5.0 ) ),
72 _niter( iConfig.getUntrackedParameter< unsigned int >(
"nIter", 3 ) ),
73 _alpha( iConfig.getUntrackedParameter< double >(
"alpha", 1.5076494 ) ),
74 _beta( iConfig.getUntrackedParameter< double >(
"beta", 1.5136036 ) ),
75 _nevtmax( iConfig.getUntrackedParameter< unsigned int >(
"nEvtMax", 200 ) ),
76 _noise( iConfig.getUntrackedParameter< double >(
"noise", 2.0 ) ),
77 _chi2cut( iConfig.getUntrackedParameter< double >(
"chi2cut", 100.0 ) ),
78 _ecalPart( iConfig.getUntrackedParameter< std::string >(
"ecalPart",
"EB" ) ),
79 _qualpercent( iConfig.getUntrackedParameter< double >(
"qualPercent", 0.2 ) ),
80 _debug( iConfig.getUntrackedParameter< int >(
"debug", 0 ) ),
82 runType(-1), runNum(0), fedID(-1), dccID(-1), side(2), lightside(2), iZ(1),
173 std::stringstream nameabinitfile;
174 nameabinitfile <<
resdir_ <<
"/ABInit.root";
177 std::stringstream nameabfile;
178 std::stringstream
link;
179 nameabfile << resdir_ <<
"/AB.root";
182 test = fopen(nameabinitfile.str().c_str(),
"r");
190 TFile *fAB=0; TTree *ABInit=0;
192 fAB=
new TFile(nameabinitfile.str().c_str());
195 ABInit = (TTree*) fAB->Get(
"ABCol0");
217 link<<
"ln -s "<<resdir_<<
"/ABInit.root "<< resdir_<<
"/AB.root";
218 system(link.str().c_str());
224 namefile << resdir_ <<
"/AB.root";
240 DCCHeader=pDCCHeader.
product();
265 std::cout <<
" Wrong ecalPart in cfg file " << std::endl;
274 TheMapping = ecalmapping.
product();
276 std::cerr <<
"Error! can't get the product EcalMappingRcd"<< std::endl;
289 int fed = headerItr->fedId();
292 runType=headerItr->getRunType();
293 runNum=headerItr->getRunNumber();
294 event=headerItr->getLV1();
296 dccID=headerItr->getDccInTCCCommand();
297 fedID=headerItr->fedId();
315 if(
color <0 )
return;
345 EBDetId id_crystal(digiItr->id()) ;
348 int etaG = id_crystal.ieta() ;
349 int phiG = id_crystal.iphi() ;
355 etaL=LocalCoord.first ;
356 phiL=LocalCoord.second ;
367 int towerID=elecid_crystal.
towerId();
369 int xtal=elecid_crystal.
xtalId();
370 int channelID= 5*(strip-1) + xtal-1;
374 assert( channel <
nCrys );
388 for (
unsigned int i=0;
i< (*digiItr).size() ; ++
i ) {
391 adc[
i]=samp_crystal.adc() ;
392 adcG[
i]=samp_crystal.gainId();
394 if (
i==0) adcGain=
adcG[
i];
435 EEDetId id_crystal(digiItr->id()) ;
438 phi = id_crystal.ix() ;
439 eta = id_crystal.iy() ;
441 int iX = (
phi-1)/5+1;
442 int iY = (
eta-1)/5+1;
447 int towerID=elecid_crystal.
towerId();
448 int channelID=elecid_crystal.
channelId()-1;
459 assert ( channel <
nCrys );
471 if( (*digiItr).size()>10)
std::cout <<
"SAMPLES SIZE > 10!" << (*digiItr).size()<< std::endl;
475 for (
unsigned int i=0;
i< (*digiItr).size() ; ++
i ) {
478 adc[
i]=samp_crystal.adc() ;
479 adcG[
i]=samp_crystal.gainId();
482 if (
i==0) adcGain=
adcG[
i];
518 std::cout <<
"\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" << std::endl;
519 std::cout <<
"\t+=+ Analyzing data: getting (alpha, beta) +=+" << std::endl;
547 std::cout <<
"\n\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" << std::endl;
548 std::cout <<
"\t+=+ Analyzing data: getting (alpha, beta) +=+" << std::endl;
549 TFile *fAB=0; TTree *ABInit=0;
554 ABInit = (TTree*) fAB->Get(
"ABCol0");
560 double BadGainEvtPercentage=0.0;
561 double BadTimingEvtPercentage=0.0;
564 int nChanBadTiming=0;
581 double BadGainChanPercentage=double(nChanBadGain)/double(nCrys);
582 double BadTimingChanPercentage=double(nChanBadTiming)/double(nCrys);
589 std::cout <<
"\t+=+ ............................ WARNING! APD GAIN WAS NOT 1 +=+" << std::endl;
591 std::cout <<
"\t+=+ ............................ WARNING! TIMING WAS BAD +=+" << std::endl;
593 std::cout <<
"\t+=+ .................................... done +=+" << std::endl;
594 std::cout <<
"\t+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" << std::endl;
void addEntry(double val)
static XYCoord localCoord(int icr)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string digiProducer_
std::string alphainitfile
int xtalId() const
get the channel id
std::string eventHeaderProducer_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
int stripId() const
get the tower id
double getDelta(int, int)
#define DEFINE_FWK_MODULE(type)
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
static int side(SuperCrysCoord iX, SuperCrysCoord iY, int iz)
unsigned int nevtAB[NCRYSEB]
std::vector< T >::const_iterator const_iterator
void computeShape(std::string namefile, TTree *)
int towerId() const
get the tower id
unsigned int _firstsample
int nEvtBadTiming[NCRYSEB]
const_iterator begin() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< int > colors
std::string link(std::string &nm, std::string &ns)
int hashedIndex(int ieta, int iphi)
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
EcalABAnalyzer(const edm::ParameterSet &iConfig)
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool wasTimingOK[NCRYSEB]
unsigned int _timingcuthigh
const_iterator end() const
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
T const * product() const
std::map< int, int > channelMapEE
T const * product() const
const_iterator end() const
std::string digiCollection_
unsigned int _timingqualhigh
std::string eventHeaderCollection_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
unsigned int _timingcutlow
unsigned int _timingquallow
int channelId() const
so far for EndCap only :
const_iterator begin() const