63 std::cout <<
"EcalSimpleTBAnalyzer: fetching hitCollection: " << hitCollection_.c_str()
64 <<
" produced by " << hitProducer_.c_str() << std::endl;
104 h_ampltdc =
new TH2F(
"h_ampltdc",
"Max Amplitude vs TDC offset", 100,0.,1.,1000, 0., 4000.);
107 h_tableIsMoving =
new TH1F(
"h_tableIsMoving",
"TableIsMoving", 100000, 0., 100000.);
109 h_e1x1 =
new TH1F(
"h_e1x1",
"E1x1 energy", 1000, 0., 4000.);
110 h_e3x3 =
new TH1F(
"h_e3x3",
"E3x3 energy", 1000, 0., 4000.);
111 h_e5x5 =
new TH1F(
"h_e5x5",
"E5x5 energy", 1000, 0., 4000.);
113 h_e1x1_center =
new TH1F(
"h_e1x1_center",
"E1x1 energy", 1000, 0., 4000.);
114 h_e3x3_center =
new TH1F(
"h_e3x3_center",
"E3x3 energy", 1000, 0., 4000.);
115 h_e5x5_center =
new TH1F(
"h_e5x5_center",
"E5x5 energy", 1000, 0., 4000.);
117 h_e1e9 =
new TH1F(
"h_e1e9",
"E1/E9 ratio", 600, 0., 1.2);
118 h_e1e25 =
new TH1F(
"h_e1e25",
"E1/E25 ratio", 600, 0., 1.2);
119 h_e9e25 =
new TH1F(
"h_e9e25",
"E9/E25 ratio", 600, 0., 1.2);
121 h_bprofx =
new TH1F(
"h_bprofx",
"Beam Profile X",100,-20.,20.);
122 h_bprofy =
new TH1F(
"h_bprofy",
"Beam Profile Y",100,-20.,20.);
124 h_qualx =
new TH1F(
"h_qualx",
"Beam Quality X",5000,0.,5.);
125 h_qualy =
new TH1F(
"h_qualy",
"Beam Quality X",5000,0.,5.);
127 h_slopex =
new TH1F(
"h_slopex",
"Beam Slope X",500, -5
e-4 , 5
e-4 );
128 h_slopey =
new TH1F(
"h_slopey",
"Beam Slope Y",500, -5
e-4 , 5
e-4 );
132 for (
unsigned int icry=0;icry<25;icry++)
134 sprintf(hname,
"h_mapx_%d",icry);
135 sprintf(htitle,
"Max Amplitude vs X %d",icry);
136 h_mapx[icry] =
new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
137 sprintf(hname,
"h_mapy_%d",icry);
138 sprintf(htitle,
"Max Amplitude vs Y %d",icry);
139 h_mapy[icry] =
new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
142 h_e1e9_mapx =
new TH2F(
"h_e1e9_mapx",
"E1/E9 vs X",80,-20,20,600,0.,1.2);
143 h_e1e9_mapy =
new TH2F(
"h_e1e9_mapy",
"E1/E9 vs Y",80,-20,20,600,0.,1.2);
145 h_e1e25_mapx =
new TH2F(
"h_e1e25_mapx",
"E1/E25 vs X",80,-20,20,600,0.,1.2);
146 h_e1e25_mapy =
new TH2F(
"h_e1e25_mapy",
"E1/E25 vs Y",80,-20,20,600,0.,1.2);
148 h_e9e25_mapx =
new TH2F(
"h_e9e25_mapx",
"E9/E25 vs X",80,-20,20,600,0.,1.2);
149 h_e9e25_mapy =
new TH2F(
"h_e9e25_mapy",
"E9/E25 vs Y",80,-20,20,600,0.,1.2);
151 h_Shape_ =
new TH2F(
"h_Shape_",
"Xtal in Beam Shape",250,0,10,350,0,3500);
189 for (
unsigned int icry=0;icry<25;icry++)
227 if ( pdigis.isValid() ) {
228 digis = pdigis.product();
239 if (phits.isValid()) {
240 hits = phits.product();
250 if ( pHodo.isValid() ) {
251 recHodo = pHodo.product();
260 if ( pTDC.isValid() ) {
261 recTDC = pTDC.product();
270 if ( pEventHeader.isValid() ) {
271 evtHeader = pEventHeader.product();
288 if (hits->size() == 0)
291 if (evtHeader->tableIsMoving())
303 if (evtHeader->tableIsMoving())
332 for (
unsigned int icry=0;icry<25;icry++)
334 unsigned int row = icry / 5;
335 unsigned int column= icry %5;
340 Xtals5x5[icry]=tempId;
348 double samples_save[10];
for(
int i=0;
i < 10; ++
i) samples_save[
i]=0.0;
353 if (myDg != digis->end())
359 samples_save[
sample] = analogSample;
361 if (
eMax < analogSample )
369 for(
int i =0;
i < 10; ++
i) {
370 h_Shape_->Fill(
double(
i)+recTDC->offset(),samples_save[
i]);
373 double amplitude[25];
375 double amplitude3x3=0;
376 double amplitude5x5=0;
378 for (
unsigned int icry=0;icry<25;icry++)
380 if (!Xtals5x5[icry].null())
382 amplitude[icry]=(hits->find(Xtals5x5[icry]))->amplitude();
383 amplitude5x5 += amplitude[icry];
385 if ( icry == 6 || icry == 7 || icry == 8 ||
386 icry == 11 || icry == 12 || icry ==13 ||
387 icry == 16 || icry == 17 || icry ==18 )
389 amplitude3x3+=amplitude[icry];
395 h_e1x1->Fill(amplitude[12]);
396 h_e3x3->Fill(amplitude3x3);
397 h_e5x5->Fill(amplitude5x5);
399 h_e1e9->Fill(amplitude[12]/amplitude3x3);
400 h_e1e25->Fill(amplitude[12]/amplitude5x5);
401 h_e9e25->Fill(amplitude3x3/amplitude5x5);
404 h_ampltdc->Fill(recTDC->offset(),amplitude[12]);
408 float x=recHodo->posX();
409 float y=recHodo->posY();
410 float xslope=recHodo->slopeX();
411 float yslope=recHodo->slopeY();
412 float xqual=recHodo->qualX();
413 float yqual=recHodo->qualY();
426 if ( fabs(x + 2.5) < 2.5 && fabs(y + 0.5) < 2.5)
432 h_e1e9->Fill(amplitude[12]/amplitude3x3);
433 h_e1e25->Fill(amplitude[12]/amplitude5x5);
434 h_e9e25->Fill(amplitude3x3/amplitude5x5);
437 for (
unsigned int icry=0;icry<25;icry++)
439 h_mapx[icry]->Fill(x,amplitude[icry]);
440 h_mapy[icry]->Fill(y,amplitude[icry]);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string hodoRecInfoCollection_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
std::string eventHeaderProducer_
std::string digiProducer_
std::string eventHeaderCollection_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
EcalMGPASample sample(int i) const
int ism() const
get the ECAL/SM id
int iphi() const
get the crystal iphi
std::string hodoRecInfoProducer_
int ieta() const
get the crystal ieta
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static const int ETAPHIMODE
int ic() const
get ECAL/crystal number inside SM
std::string tdcRecInfoCollection_
EcalSimpleTBAnalyzer(const edm::ParameterSet &)
std::string tdcRecInfoProducer_
bool null() const
is this a null id ?
std::string digiCollection_
static const int SMCRYSTALMODE
int adc() const
get the ADC sample (12 bits)
std::string hitCollection_