66 std::cout <<
"EcalSimple2007H4TBAnalyzer: fetching hitCollection: " << hitCollection_.c_str() <<
" produced by " 67 << hitProducer_.c_str() << std::endl;
112 h_ampltdc =
new TH2F(
"h_ampltdc",
"Max Amplitude vs TDC offset", 100, 0., 1., 1000, 0., 4000.);
115 h_tableIsMoving =
new TH1F(
"h_tableIsMoving",
"TableIsMoving", 100000, 0., 100000.);
117 h_e1x1 =
new TH1F(
"h_e1x1",
"E1x1 energy", 1000, 0., 4000.);
118 h_e3x3 =
new TH1F(
"h_e3x3",
"E3x3 energy", 1000, 0., 4000.);
119 h_e5x5 =
new TH1F(
"h_e5x5",
"E5x5 energy", 1000, 0., 4000.);
121 h_e1x1_center =
new TH1F(
"h_e1x1_center",
"E1x1 energy", 1000, 0., 4000.);
122 h_e3x3_center =
new TH1F(
"h_e3x3_center",
"E3x3 energy", 1000, 0., 4000.);
123 h_e5x5_center =
new TH1F(
"h_e5x5_center",
"E5x5 energy", 1000, 0., 4000.);
125 h_e1e9 =
new TH1F(
"h_e1e9",
"E1/E9 ratio", 600, 0., 1.2);
126 h_e1e25 =
new TH1F(
"h_e1e25",
"E1/E25 ratio", 600, 0., 1.2);
127 h_e9e25 =
new TH1F(
"h_e9e25",
"E9/E25 ratio", 600, 0., 1.2);
129 h_S6 =
new TH1F(
"h_S6",
"Amplitude S6", 1000, 0., 4000.);
131 h_bprofx =
new TH1F(
"h_bprofx",
"Beam Profile X", 100, -20., 20.);
132 h_bprofy =
new TH1F(
"h_bprofy",
"Beam Profile Y", 100, -20., 20.);
134 h_qualx =
new TH1F(
"h_qualx",
"Beam Quality X", 5000, 0., 5.);
135 h_qualy =
new TH1F(
"h_qualy",
"Beam Quality X", 5000, 0., 5.);
137 h_slopex =
new TH1F(
"h_slopex",
"Beam Slope X", 500, -5
e-4, 5
e-4);
138 h_slopey =
new TH1F(
"h_slopey",
"Beam Slope Y", 500, -5
e-4, 5
e-4);
142 for (
unsigned int icry = 0; icry < 25; icry++) {
143 sprintf(hname,
"h_mapx_%d", icry);
144 sprintf(htitle,
"Max Amplitude vs X %d", icry);
145 h_mapx[icry] =
new TH2F(hname, htitle, 80, -20, 20, 1000, 0., 4000.);
146 sprintf(hname,
"h_mapy_%d", icry);
147 sprintf(htitle,
"Max Amplitude vs Y %d", icry);
148 h_mapy[icry] =
new TH2F(hname, htitle, 80, -20, 20, 1000, 0., 4000.);
151 h_e1e9_mapx =
new TH2F(
"h_e1e9_mapx",
"E1/E9 vs X", 80, -20, 20, 600, 0., 1.2);
152 h_e1e9_mapy =
new TH2F(
"h_e1e9_mapy",
"E1/E9 vs Y", 80, -20, 20, 600, 0., 1.2);
154 h_e1e25_mapx =
new TH2F(
"h_e1e25_mapx",
"E1/E25 vs X", 80, -20, 20, 600, 0., 1.2);
155 h_e1e25_mapy =
new TH2F(
"h_e1e25_mapy",
"E1/E25 vs Y", 80, -20, 20, 600, 0., 1.2);
157 h_e9e25_mapx =
new TH2F(
"h_e9e25_mapx",
"E9/E25 vs X", 80, -20, 20, 600, 0., 1.2);
158 h_e9e25_mapy =
new TH2F(
"h_e9e25_mapy",
"E9/E25 vs Y", 80, -20, 20, 600, 0., 1.2);
160 h_Shape_ =
new TH2F(
"h_Shape_",
"Xtal in Beam Shape", 250, 0, 10, 350, 0, 3500);
197 for (
unsigned int icry = 0; icry < 25; icry++) {
275 evtHeader = pEventHeader.
product();
329 std::cout <<
"Xtal In Beam is " << xtalInBeam_.
ic() << xtalInBeam_ << std::endl;
330 for (
unsigned int icry = 0; icry < 25; icry++) {
331 unsigned int row = icry / 5;
332 unsigned int column = icry % 5;
333 int ix = xtalInBeam_.ix() + row - 2;
334 int iy = xtalInBeam_.iy() + column - 2;
337 if (tempId.ix() < 16 || tempId.ix() > 35 || tempId.iy() < 51 || tempId.iy() > 75)
344 std::cout <<
"** Xtal in the matrix **** row " << row <<
", column " << column <<
", xtal " <<
Xtals5x5[icry]
345 <<
" Position " << cell->getPosition(0.) << std::endl;
354 std::cout <<
"Table is moving" << std::endl;
362 if (ithit->amplitude() >=
maxHit) {
363 maxHit = ithit->amplitude();
364 maxHitId = ithit->id();
368 std::cout <<
"No maxHit found" << std::endl;
373 double samples_save[10];
374 for (
int i = 0;
i < 10; ++
i)
375 samples_save[
i] = 0.0;
385 samples_save[
sample] = analogSample;
387 if (eMax < analogSample) {
394 for (
int i = 0;
i < 10; ++
i)
399 double amplitude3x3 = 0;
400 double amplitude5x5 = 0;
401 for (
unsigned int icry = 0; icry < 25; icry++) {
404 amplitude5x5 += amplitude[icry];
406 if (icry == 6 || icry == 7 || icry == 8 || icry == 11 || icry == 12 || icry == 13 || icry == 16 || icry == 17 ||
408 amplitude3x3 += amplitude[icry];
414 h_e1x1->Fill(amplitude[12]);
415 h_e3x3->Fill(amplitude3x3);
416 h_e5x5->Fill(amplitude5x5);
418 h_e1e9->Fill(amplitude[12] / amplitude3x3);
419 h_e1e25->Fill(amplitude[12] / amplitude5x5);
420 h_e9e25->Fill(amplitude3x3 / amplitude5x5);
428 float x = recHodo->
posX();
429 float y = recHodo->
posY();
430 float xslope = recHodo->
slopeX();
431 float yslope = recHodo->
slopeY();
432 float xqual = recHodo->
qualX();
433 float yqual = recHodo->
qualY();
445 if (fabs(x + 2.5) < 2.5 && fabs(y + 0.5) < 2.5) {
451 for (
unsigned int icry = 0; icry < 25; icry++) {
452 h_mapx[icry]->Fill(x, amplitude[icry]);
453 h_mapy[icry]->Fill(y, amplitude[icry]);
456 h_e1e9_mapx->Fill(x, amplitude[12] / amplitude3x3);
457 h_e1e9_mapy->Fill(y, amplitude[12] / amplitude3x3);
const CaloGeometry * theTBGeometry_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
constexpr bool null() const
is this a null id ?
std::string eventHeaderCollection_
void beginRun(edm::Run const &, edm::EventSetup const &) override
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
const_iterator begin() const
std::string tdcRecInfoCollection_
~EcalSimple2007H4TBAnalyzer() override
std::string tdcRecInfoProducer_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void analyze(edm::Event const &, edm::EventSetup const &) override
int ic() const
get ECAL/crystal number inside SM
Namespace of DDCMS conversion namespace.
const_iterator end() const
std::string digiCollection_
T const * product() const
EcalSimple2007H4TBAnalyzer(const edm::ParameterSet &)
std::string hitCollection_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator end() const
iterator find(key_type k)
std::string hodoRecInfoCollection_
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
std::string hodoRecInfoProducer_
std::string digiProducer_
std::string eventHeaderProducer_
static const int SMCRYSTALMODE
T const * product() const
const_iterator begin() const
int adc() const
get the ADC sample (12 bits)
int zside() const
get the z-side of the crystal (1/-1)