62 std::cout <<
"EcalSimpleTBAnalyzer: fetching hitCollection: " << hitCollection_.c_str()
63 <<
" produced by " << hitProducer_.c_str() << std::endl;
103 h_ampltdc =
new TH2F(
"h_ampltdc",
"Max Amplitude vs TDC offset", 100,0.,1.,1000, 0., 4000.);
106 h_tableIsMoving =
new TH1F(
"h_tableIsMoving",
"TableIsMoving", 100000, 0., 100000.);
108 h_e1x1 =
new TH1F(
"h_e1x1",
"E1x1 energy", 1000, 0., 4000.);
109 h_e3x3 =
new TH1F(
"h_e3x3",
"E3x3 energy", 1000, 0., 4000.);
110 h_e5x5 =
new TH1F(
"h_e5x5",
"E5x5 energy", 1000, 0., 4000.);
112 h_e1x1_center =
new TH1F(
"h_e1x1_center",
"E1x1 energy", 1000, 0., 4000.);
113 h_e3x3_center =
new TH1F(
"h_e3x3_center",
"E3x3 energy", 1000, 0., 4000.);
114 h_e5x5_center =
new TH1F(
"h_e5x5_center",
"E5x5 energy", 1000, 0., 4000.);
116 h_e1e9 =
new TH1F(
"h_e1e9",
"E1/E9 ratio", 600, 0., 1.2);
117 h_e1e25 =
new TH1F(
"h_e1e25",
"E1/E25 ratio", 600, 0., 1.2);
118 h_e9e25 =
new TH1F(
"h_e9e25",
"E9/E25 ratio", 600, 0., 1.2);
120 h_bprofx =
new TH1F(
"h_bprofx",
"Beam Profile X",100,-20.,20.);
121 h_bprofy =
new TH1F(
"h_bprofy",
"Beam Profile Y",100,-20.,20.);
123 h_qualx =
new TH1F(
"h_qualx",
"Beam Quality X",5000,0.,5.);
124 h_qualy =
new TH1F(
"h_qualy",
"Beam Quality X",5000,0.,5.);
126 h_slopex =
new TH1F(
"h_slopex",
"Beam Slope X",500, -5
e-4 , 5
e-4 );
127 h_slopey =
new TH1F(
"h_slopey",
"Beam Slope Y",500, -5
e-4 , 5
e-4 );
131 for (
unsigned int icry=0;icry<25;icry++)
133 sprintf(hname,
"h_mapx_%d",icry);
134 sprintf(htitle,
"Max Amplitude vs X %d",icry);
135 h_mapx[icry] =
new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
136 sprintf(hname,
"h_mapy_%d",icry);
137 sprintf(htitle,
"Max Amplitude vs Y %d",icry);
138 h_mapy[icry] =
new TH2F(hname,htitle,80,-20,20,1000,0.,4000.);
141 h_e1e9_mapx =
new TH2F(
"h_e1e9_mapx",
"E1/E9 vs X",80,-20,20,600,0.,1.2);
142 h_e1e9_mapy =
new TH2F(
"h_e1e9_mapy",
"E1/E9 vs Y",80,-20,20,600,0.,1.2);
144 h_e1e25_mapx =
new TH2F(
"h_e1e25_mapx",
"E1/E25 vs X",80,-20,20,600,0.,1.2);
145 h_e1e25_mapy =
new TH2F(
"h_e1e25_mapy",
"E1/E25 vs Y",80,-20,20,600,0.,1.2);
147 h_e9e25_mapx =
new TH2F(
"h_e9e25_mapx",
"E9/E25 vs X",80,-20,20,600,0.,1.2);
148 h_e9e25_mapy =
new TH2F(
"h_e9e25_mapy",
"E9/E25 vs Y",80,-20,20,600,0.,1.2);
150 h_Shape_ =
new TH2F(
"h_Shape_",
"Xtal in Beam Shape",250,0,10,350,0,3500);
188 for (
unsigned int icry=0;icry<25;icry++)
269 if ( pEventHeader.
isValid() ) {
270 evtHeader = pEventHeader.
product();
331 for (
unsigned int icry=0;icry<25;icry++)
333 unsigned int row = icry / 5;
334 unsigned int column= icry %5;
339 Xtals5x5[icry]=tempId;
347 double samples_save[10];
for(
int i=0;
i < 10; ++
i) samples_save[
i]=0.0;
352 if (myDg != digis->
end())
358 samples_save[
sample] = analogSample;
360 if ( eMax < analogSample )
368 for(
int i =0;
i < 10; ++
i) {
374 double amplitude3x3=0;
375 double amplitude5x5=0;
377 for (
unsigned int icry=0;icry<25;icry++)
379 if (!Xtals5x5[icry].null())
382 amplitude5x5 += amplitude[icry];
384 if ( icry == 6 || icry == 7 || icry == 8 ||
385 icry == 11 || icry == 12 || icry ==13 ||
386 icry == 16 || icry == 17 || icry ==18 )
388 amplitude3x3+=amplitude[icry];
394 h_e1x1->Fill(amplitude[12]);
395 h_e3x3->Fill(amplitude3x3);
396 h_e5x5->Fill(amplitude5x5);
398 h_e1e9->Fill(amplitude[12]/amplitude3x3);
399 h_e1e25->Fill(amplitude[12]/amplitude5x5);
400 h_e9e25->Fill(amplitude3x3/amplitude5x5);
407 float x=recHodo->
posX();
408 float y=recHodo->
posY();
409 float xslope=recHodo->
slopeX();
410 float yslope=recHodo->
slopeY();
411 float xqual=recHodo->
qualX();
412 float yqual=recHodo->
qualY();
425 if ( fabs(x + 2.5) < 2.5 && fabs(y + 0.5) < 2.5)
431 h_e1e9->Fill(amplitude[12]/amplitude3x3);
432 h_e1e25->Fill(amplitude[12]/amplitude5x5);
433 h_e9e25->Fill(amplitude3x3/amplitude5x5);
436 for (
unsigned int icry=0;icry<25;icry++)
438 h_mapx[icry]->Fill(x,amplitude[icry]);
439 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_
constexpr bool null() const
is this a null id ?
void analyze(const edm::Event &, const edm::EventSetup &) override
EcalMGPASample sample(int i) const
~EcalSimpleTBAnalyzer() override
int ism() const
get the ECAL/SM id
int iphi() const
get the crystal iphi
const_iterator find(id_type i) const
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_
Namespace of DDCMS conversion namespace.
EcalSimpleTBAnalyzer(const edm::ParameterSet &)
T const * product() const
std::string tdcRecInfoProducer_
const_iterator end() const
iterator find(key_type k)
std::string digiCollection_
static const int SMCRYSTALMODE
int adc() const
get the ADC sample (12 bits)
std::string hitCollection_