67 std::cout <<
"EcalSimple2007H4TBAnalyzer: fetching hitCollection: " << hitCollection_.c_str()
68 <<
" produced by " << hitProducer_.c_str() << std::endl;
118 h_ampltdc =
new TH2F(
"h_ampltdc",
"Max Amplitude vs TDC offset", 100,0.,1.,1000, 0., 4000.);
121 h_tableIsMoving =
new TH1F(
"h_tableIsMoving",
"TableIsMoving", 100000, 0., 100000.);
123 h_e1x1 =
new TH1F(
"h_e1x1",
"E1x1 energy", 1000, 0., 4000.);
124 h_e3x3 =
new TH1F(
"h_e3x3",
"E3x3 energy", 1000, 0., 4000.);
125 h_e5x5 =
new TH1F(
"h_e5x5",
"E5x5 energy", 1000, 0., 4000.);
127 h_e1x1_center =
new TH1F(
"h_e1x1_center",
"E1x1 energy", 1000, 0., 4000.);
128 h_e3x3_center =
new TH1F(
"h_e3x3_center",
"E3x3 energy", 1000, 0., 4000.);
129 h_e5x5_center =
new TH1F(
"h_e5x5_center",
"E5x5 energy", 1000, 0., 4000.);
131 h_e1e9 =
new TH1F(
"h_e1e9",
"E1/E9 ratio", 600, 0., 1.2);
132 h_e1e25 =
new TH1F(
"h_e1e25",
"E1/E25 ratio", 600, 0., 1.2);
133 h_e9e25 =
new TH1F(
"h_e9e25",
"E9/E25 ratio", 600, 0., 1.2);
135 h_S6 =
new TH1F(
"h_S6",
"Amplitude S6", 1000, 0., 4000.);
137 h_bprofx =
new TH1F(
"h_bprofx",
"Beam Profile X",100,-20.,20.);
138 h_bprofy =
new TH1F(
"h_bprofy",
"Beam Profile Y",100,-20.,20.);
140 h_qualx =
new TH1F(
"h_qualx",
"Beam Quality X",5000,0.,5.);
141 h_qualy =
new TH1F(
"h_qualy",
"Beam Quality X",5000,0.,5.);
143 h_slopex =
new TH1F(
"h_slopex",
"Beam Slope X",500, -5
e-4 , 5
e-4 );
144 h_slopey =
new TH1F(
"h_slopey",
"Beam Slope Y",500, -5
e-4 , 5
e-4 );
148 for (
unsigned int icry=0;icry<25;icry++)
150 sprintf(hname,
"h_mapx_%d",icry);
151 sprintf(htitle,
"Max Amplitude vs X %d",icry);
152 h_mapx[icry] =
new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
153 sprintf(hname,
"h_mapy_%d",icry);
154 sprintf(htitle,
"Max Amplitude vs Y %d",icry);
155 h_mapy[icry] =
new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
158 h_e1e9_mapx =
new TH2F(
"h_e1e9_mapx",
"E1/E9 vs X",80,-20,20,600,0.,1.2);
159 h_e1e9_mapy =
new TH2F(
"h_e1e9_mapy",
"E1/E9 vs Y",80,-20,20,600,0.,1.2);
161 h_e1e25_mapx =
new TH2F(
"h_e1e25_mapx",
"E1/E25 vs X",80,-20,20,600,0.,1.2);
162 h_e1e25_mapy =
new TH2F(
"h_e1e25_mapy",
"E1/E25 vs Y",80,-20,20,600,0.,1.2);
164 h_e9e25_mapx =
new TH2F(
"h_e9e25_mapx",
"E9/E25 vs X",80,-20,20,600,0.,1.2);
165 h_e9e25_mapy =
new TH2F(
"h_e9e25_mapy",
"E9/E25 vs Y",80,-20,20,600,0.,1.2);
167 h_Shape_ =
new TH2F(
"h_Shape_",
"Xtal in Beam Shape",250,0,10,350,0,3500);
206 for (
unsigned int icry=0;icry<25;icry++)
287 if ( pEventHeader.
isValid() ) {
288 evtHeader = pEventHeader.
product();
349 std::cout<<
"Xtal In Beam is " << xtalInBeam_.
ic() << xtalInBeam_ << std::endl;
350 for (
unsigned int icry=0;icry<25;icry++)
352 unsigned int row = icry / 5;
353 unsigned int column= icry %5;
354 int ix=xtalInBeam_.ix()+row-2;
355 int iy=xtalInBeam_.iy()+column-2;
358 if (tempId.ix()<16 || tempId.ix()>35 || tempId.iy()<51 || tempId.iy()>75)
366 std::cout <<
"** Xtal in the matrix **** row " << row <<
", column " << column <<
", xtal " <<
Xtals5x5[icry] <<
" Position " << cell->getPosition(0.) << std::endl;
377 std::cout <<
"Table is moving" << std::endl;
388 if (ithit->amplitude()>=
maxHit)
390 maxHit=ithit->amplitude();
391 maxHitId=ithit->id();
397 std::cout <<
"No maxHit found" << std::endl;
403 double samples_save[10];
for(
int i=0;
i < 10; ++
i) samples_save[
i]=0.0;
416 samples_save[
sample] = analogSample;
418 if ( eMax < analogSample )
426 for(
int i =0;
i < 10; ++
i)
433 double amplitude3x3=0;
434 double amplitude5x5=0;
435 for (
unsigned int icry=0;icry<25;icry++)
440 amplitude5x5 += amplitude[icry];
442 if ( icry == 6 || icry == 7 || icry == 8 ||
443 icry == 11 || icry == 12 || icry ==13 ||
444 icry == 16 || icry == 17 || icry ==18 )
446 amplitude3x3+=amplitude[icry];
452 h_e1x1->Fill(amplitude[12]);
453 h_e3x3->Fill(amplitude3x3);
454 h_e5x5->Fill(amplitude5x5);
456 h_e1e9->Fill(amplitude[12]/amplitude3x3);
457 h_e1e25->Fill(amplitude[12]/amplitude5x5);
458 h_e9e25->Fill(amplitude3x3/amplitude5x5);
467 float x=recHodo->
posX();
468 float y=recHodo->
posY();
469 float xslope=recHodo->
slopeX();
470 float yslope=recHodo->
slopeY();
471 float xqual=recHodo->
qualX();
472 float yqual=recHodo->
qualY();
485 if ( fabs(x + 2.5) < 2.5 && fabs(y + 0.5) < 2.5)
492 for (
unsigned int icry=0;icry<25;icry++)
494 h_mapx[icry]->Fill(x,amplitude[icry]);
495 h_mapy[icry]->Fill(y,amplitude[icry]);
const CaloGeometry * theTBGeometry_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
constexpr bool null() const
is this a null id ?
std::string eventHeaderCollection_
void beginRun(edm::Run const &, edm::EventSetup const &) override
std::vector< EcalUncalibratedRecHit >::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_
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)