68 std::cout <<
"EcalSimple2007H4TBAnalyzer: fetching hitCollection: " << hitCollection_.c_str()
69 <<
" produced by " << hitProducer_.c_str() << std::endl;
119 h_ampltdc =
new TH2F(
"h_ampltdc",
"Max Amplitude vs TDC offset", 100,0.,1.,1000, 0., 4000.);
122 h_tableIsMoving =
new TH1F(
"h_tableIsMoving",
"TableIsMoving", 100000, 0., 100000.);
124 h_e1x1 =
new TH1F(
"h_e1x1",
"E1x1 energy", 1000, 0., 4000.);
125 h_e3x3 =
new TH1F(
"h_e3x3",
"E3x3 energy", 1000, 0., 4000.);
126 h_e5x5 =
new TH1F(
"h_e5x5",
"E5x5 energy", 1000, 0., 4000.);
128 h_e1x1_center =
new TH1F(
"h_e1x1_center",
"E1x1 energy", 1000, 0., 4000.);
129 h_e3x3_center =
new TH1F(
"h_e3x3_center",
"E3x3 energy", 1000, 0., 4000.);
130 h_e5x5_center =
new TH1F(
"h_e5x5_center",
"E5x5 energy", 1000, 0., 4000.);
132 h_e1e9 =
new TH1F(
"h_e1e9",
"E1/E9 ratio", 600, 0., 1.2);
133 h_e1e25 =
new TH1F(
"h_e1e25",
"E1/E25 ratio", 600, 0., 1.2);
134 h_e9e25 =
new TH1F(
"h_e9e25",
"E9/E25 ratio", 600, 0., 1.2);
136 h_S6 =
new TH1F(
"h_S6",
"Amplitude S6", 1000, 0., 4000.);
138 h_bprofx =
new TH1F(
"h_bprofx",
"Beam Profile X",100,-20.,20.);
139 h_bprofy =
new TH1F(
"h_bprofy",
"Beam Profile Y",100,-20.,20.);
141 h_qualx =
new TH1F(
"h_qualx",
"Beam Quality X",5000,0.,5.);
142 h_qualy =
new TH1F(
"h_qualy",
"Beam Quality X",5000,0.,5.);
144 h_slopex =
new TH1F(
"h_slopex",
"Beam Slope X",500, -5
e-4 , 5
e-4 );
145 h_slopey =
new TH1F(
"h_slopey",
"Beam Slope Y",500, -5
e-4 , 5
e-4 );
149 for (
unsigned int icry=0;icry<25;icry++)
151 sprintf(hname,
"h_mapx_%d",icry);
152 sprintf(htitle,
"Max Amplitude vs X %d",icry);
153 h_mapx[icry] =
new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
154 sprintf(hname,
"h_mapy_%d",icry);
155 sprintf(htitle,
"Max Amplitude vs Y %d",icry);
156 h_mapy[icry] =
new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
159 h_e1e9_mapx =
new TH2F(
"h_e1e9_mapx",
"E1/E9 vs X",80,-20,20,600,0.,1.2);
160 h_e1e9_mapy =
new TH2F(
"h_e1e9_mapy",
"E1/E9 vs Y",80,-20,20,600,0.,1.2);
162 h_e1e25_mapx =
new TH2F(
"h_e1e25_mapx",
"E1/E25 vs X",80,-20,20,600,0.,1.2);
163 h_e1e25_mapy =
new TH2F(
"h_e1e25_mapy",
"E1/E25 vs Y",80,-20,20,600,0.,1.2);
165 h_e9e25_mapx =
new TH2F(
"h_e9e25_mapx",
"E9/E25 vs X",80,-20,20,600,0.,1.2);
166 h_e9e25_mapy =
new TH2F(
"h_e9e25_mapy",
"E9/E25 vs Y",80,-20,20,600,0.,1.2);
168 h_Shape_ =
new TH2F(
"h_Shape_",
"Xtal in Beam Shape",250,0,10,350,0,3500);
207 for (
unsigned int icry=0;icry<25;icry++)
245 if ( pdigis.isValid() ) {
246 digis = pdigis.product();
257 if (phits.isValid()) {
258 hits = phits.product();
268 if ( pHodo.isValid() ) {
269 recHodo = pHodo.product();
278 if ( pTDC.isValid() ) {
279 recTDC = pTDC.product();
288 if ( pEventHeader.isValid() ) {
289 evtHeader = pEventHeader.product();
319 if (hits->size() == 0)
326 if (evtHeader->tableIsMoving())
344 h_S6->Fill(evtHeader->S6ADC());
350 std::cout<<
"Xtal In Beam is " << xtalInBeam_.
ic() << xtalInBeam_ << std::endl;
351 for (
unsigned int icry=0;icry<25;icry++)
353 unsigned int row = icry / 5;
354 unsigned int column= icry %5;
355 int ix=xtalInBeam_.ix()+row-2;
356 int iy=xtalInBeam_.iy()+column-2;
359 if (tempId.ix()<16 || tempId.ix()>35 || tempId.iy()<51 || tempId.iy()>75)
367 const TruncatedPyramid* tp ( dynamic_cast<const TruncatedPyramid*>(cell) ) ;
368 std::cout <<
"** Xtal in the matrix **** row " << row <<
", column " << column <<
", xtal " <<
Xtals5x5[icry] <<
" Position " << tp->getPosition(0.) << std::endl;
377 if (evtHeader->tableIsMoving())
379 std::cout <<
"Table is moving" << std::endl;
387 float maxHit= -999999.;
390 if (ithit->amplitude()>=maxHit)
392 maxHit=ithit->amplitude();
393 maxHitId=ithit->id();
399 std::cout <<
"No maxHit found" << std::endl;
405 double samples_save[10];
for(
int i=0;
i < 10; ++
i) samples_save[
i]=0.0;
418 samples_save[
sample] = analogSample;
420 if (
eMax < analogSample )
428 for(
int i =0;
i < 10; ++
i)
429 h_Shape_->Fill(
double(
i)+recTDC->offset(),samples_save[
i]);
434 double amplitude[25];
435 double amplitude3x3=0;
436 double amplitude5x5=0;
437 for (
unsigned int icry=0;icry<25;icry++)
441 amplitude[icry]=(hits->find(
Xtals5x5[icry]))->amplitude();
442 amplitude5x5 += amplitude[icry];
444 if ( icry == 6 || icry == 7 || icry == 8 ||
445 icry == 11 || icry == 12 || icry ==13 ||
446 icry == 16 || icry == 17 || icry ==18 )
448 amplitude3x3+=amplitude[icry];
454 h_e1x1->Fill(amplitude[12]);
455 h_e3x3->Fill(amplitude3x3);
456 h_e5x5->Fill(amplitude5x5);
458 h_e1e9->Fill(amplitude[12]/amplitude3x3);
459 h_e1e25->Fill(amplitude[12]/amplitude5x5);
460 h_e9e25->Fill(amplitude3x3/amplitude5x5);
464 h_ampltdc->Fill(recTDC->offset(),amplitude[12]);
469 float x=recHodo->posX();
470 float y=recHodo->posY();
471 float xslope=recHodo->slopeX();
472 float yslope=recHodo->slopeY();
473 float xqual=recHodo->qualX();
474 float yqual=recHodo->qualY();
487 if ( fabs(x + 2.5) < 2.5 && fabs(y + 0.5) < 2.5)
494 for (
unsigned int icry=0;icry<25;icry++)
496 h_mapx[icry]->Fill(x,amplitude[icry]);
497 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
std::string eventHeaderCollection_
std::vector< T >::const_iterator const_iterator
EcalMGPASample sample(int i) const
std::string tdcRecInfoCollection_
std::string tdcRecInfoProducer_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int ic() const
get ECAL/crystal number inside SM
std::string digiCollection_
~EcalSimple2007H4TBAnalyzer()
EcalSimple2007H4TBAnalyzer(const edm::ParameterSet &)
bool null() const
is this a null id ?
std::string hitCollection_
A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code...
const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
virtual void analyze(edm::Event const &, edm::EventSetup const &)
std::string hodoRecInfoCollection_
std::string hodoRecInfoProducer_
std::string digiProducer_
std::string eventHeaderProducer_
static const int SMCRYSTALMODE
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
int adc() const
get the ADC sample (12 bits)
int zside() const
get the z-side of the crystal (1/-1)