37 : rootfile_(iConfig.getUntrackedParameter<
std::
string>(
"rootfile",
"ecalSimpleTBanalysis.root")),
38 digiCollection_(iConfig.getParameter<
std::
string>(
"digiCollection")),
39 digiProducer_(iConfig.getParameter<
std::
string>(
"digiProducer")),
40 hitCollection_(iConfig.getParameter<
std::
string>(
"hitCollection")),
41 hitProducer_(iConfig.getParameter<
std::
string>(
"hitProducer")),
42 hodoRecInfoCollection_(iConfig.getParameter<
std::
string>(
"hodoRecInfoCollection")),
43 hodoRecInfoProducer_(iConfig.getParameter<
std::
string>(
"hodoRecInfoProducer")),
44 tdcRecInfoCollection_(iConfig.getParameter<
std::
string>(
"tdcRecInfoCollection")),
45 tdcRecInfoProducer_(iConfig.getParameter<
std::
string>(
"tdcRecInfoProducer")),
46 eventHeaderCollection_(iConfig.getParameter<
std::
string>(
"eventHeaderCollection")),
47 eventHeaderProducer_(iConfig.getParameter<
std::
string>(
"eventHeaderProducer")),
48 eeDigiToken_(consumes<>(
edm::
InputTag(digiProducer_, digiCollection_))),
49 eeUncalibratedRecHitToken_(consumes<>(
edm::
InputTag(hitProducer_, hitCollection_))),
50 tbHodoscopeRecInfoToken_(consumes<>(
edm::
InputTag(hodoRecInfoProducer_, hodoRecInfoCollection_))),
51 tbTDCRecInfoToken_(consumes<>(
edm::
InputTag(tdcRecInfoProducer_, tdcRecInfoCollection_))),
52 tbEventHeaderToken_(consumes<>(
edm::
InputTag(eventHeaderProducer_))),
59 <<
"EcalSimple2007H4TBAnalyzer: fetching hitCollection: " <<
hitCollection_.c_str() <<
" produced by " 98 h_ampltdc =
new TH2F(
"h_ampltdc",
"Max Amplitude vs TDC offset", 100, 0., 1., 1000, 0., 4000.);
101 h_tableIsMoving =
new TH1F(
"h_tableIsMoving",
"TableIsMoving", 100000, 0., 100000.);
103 h_e1x1 =
new TH1F(
"h_e1x1",
"E1x1 energy", 1000, 0., 4000.);
104 h_e3x3 =
new TH1F(
"h_e3x3",
"E3x3 energy", 1000, 0., 4000.);
105 h_e5x5 =
new TH1F(
"h_e5x5",
"E5x5 energy", 1000, 0., 4000.);
107 h_e1x1_center =
new TH1F(
"h_e1x1_center",
"E1x1 energy", 1000, 0., 4000.);
108 h_e3x3_center =
new TH1F(
"h_e3x3_center",
"E3x3 energy", 1000, 0., 4000.);
109 h_e5x5_center =
new TH1F(
"h_e5x5_center",
"E5x5 energy", 1000, 0., 4000.);
111 h_e1e9 =
new TH1F(
"h_e1e9",
"E1/E9 ratio", 600, 0., 1.2);
112 h_e1e25 =
new TH1F(
"h_e1e25",
"E1/E25 ratio", 600, 0., 1.2);
113 h_e9e25 =
new TH1F(
"h_e9e25",
"E9/E25 ratio", 600, 0., 1.2);
115 h_S6 =
new TH1F(
"h_S6",
"Amplitude S6", 1000, 0., 4000.);
117 h_bprofx =
new TH1F(
"h_bprofx",
"Beam Profile X", 100, -20., 20.);
118 h_bprofy =
new TH1F(
"h_bprofy",
"Beam Profile Y", 100, -20., 20.);
120 h_qualx =
new TH1F(
"h_qualx",
"Beam Quality X", 5000, 0., 5.);
121 h_qualy =
new TH1F(
"h_qualy",
"Beam Quality X", 5000, 0., 5.);
123 h_slopex =
new TH1F(
"h_slopex",
"Beam Slope X", 500, -5
e-4, 5
e-4);
124 h_slopey =
new TH1F(
"h_slopey",
"Beam Slope Y", 500, -5
e-4, 5
e-4);
128 for (
unsigned int icry = 0; icry < 25; icry++) {
129 sprintf(hname,
"h_mapx_%d", icry);
130 sprintf(htitle,
"Max Amplitude vs X %d", icry);
131 h_mapx[icry] =
new TH2F(hname, htitle, 80, -20, 20, 1000, 0., 4000.);
132 sprintf(hname,
"h_mapy_%d", icry);
133 sprintf(htitle,
"Max Amplitude vs Y %d", icry);
134 h_mapy[icry] =
new TH2F(hname, htitle, 80, -20, 20, 1000, 0., 4000.);
137 h_e1e9_mapx =
new TH2F(
"h_e1e9_mapx",
"E1/E9 vs X", 80, -20, 20, 600, 0., 1.2);
138 h_e1e9_mapy =
new TH2F(
"h_e1e9_mapy",
"E1/E9 vs Y", 80, -20, 20, 600, 0., 1.2);
140 h_e1e25_mapx =
new TH2F(
"h_e1e25_mapx",
"E1/E25 vs X", 80, -20, 20, 600, 0., 1.2);
141 h_e1e25_mapy =
new TH2F(
"h_e1e25_mapy",
"E1/E25 vs Y", 80, -20, 20, 600, 0., 1.2);
143 h_e9e25_mapx =
new TH2F(
"h_e9e25_mapx",
"E9/E25 vs X", 80, -20, 20, 600, 0., 1.2);
144 h_e9e25_mapy =
new TH2F(
"h_e9e25_mapy",
"E9/E25 vs Y", 80, -20, 20, 600, 0., 1.2);
146 h_Shape_ =
new TH2F(
"h_Shape_",
"Xtal in Beam Shape", 250, 0, 10, 350, 0, 3500);
187 for (
unsigned int icry = 0; icry < 25; icry++) {
230 if (
phits.isValid()) {
258 evtHeader = pEventHeader.
product();
294 for (
unsigned int icry = 0; icry < 25; icry++) {
295 unsigned int row = icry / 5;
296 unsigned int column = icry % 5;
301 if (tempId.ix() < 16 || tempId.ix() > 35 || tempId.iy() < 51 || tempId.iy() > 75)
309 <<
"** Xtal in the matrix **** row " << row <<
", column " << column <<
", xtal " <<
Xtals5x5[icry]
310 <<
" Position " << cell->getPosition(0.);
327 if (ithit->amplitude() >=
maxHit) {
328 maxHit = ithit->amplitude();
329 maxHitId = ithit->id();
338 double samples_save[10];
339 for (
int i = 0;
i < 10; ++
i)
340 samples_save[
i] = 0.0;
350 samples_save[
sample] = analogSample;
351 if (
eMax < analogSample) {
357 for (
int i = 0;
i < 10; ++
i)
362 double amplitude3x3 = 0;
363 double amplitude5x5 = 0;
364 for (
unsigned int icry = 0; icry < 25; icry++) {
369 if (icry == 6 || icry == 7 || icry == 8 || icry == 11 || icry == 12 || icry == 13 || icry == 16 || icry == 17 ||
378 h_e3x3->Fill(amplitude3x3);
379 h_e5x5->Fill(amplitude5x5);
383 h_e9e25->Fill(amplitude3x3 / amplitude5x5);
391 float x = recHodo->
posX();
392 float y = recHodo->
posY();
393 float xslope = recHodo->
slopeX();
394 float yslope = recHodo->
slopeY();
395 float xqual = recHodo->
qualX();
396 float yqual = recHodo->
qualY();
408 if (fabs(
x + 2.5) < 2.5 && fabs(
y + 0.5) < 2.5) {
414 for (
unsigned int icry = 0; icry < 25; icry++) {
Log< level::Info, true > LogVerbatim
const CaloGeometry * theTBGeometry_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const edm::EDGetTokenT< EcalTBTDCRecInfo > tbTDCRecInfoToken_
void beginRun(edm::Run const &, edm::EventSetup const &) override
const std::string hitProducer_
T const * product() const
std::vector< T >::const_iterator const_iterator
const edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
const edm::EDGetTokenT< EEUncalibratedRecHitCollection > eeUncalibratedRecHitToken_
const std::string digiCollection_
Log< level::Error, false > LogError
const edm::EDGetTokenT< EcalTBHodoscopeRecInfo > tbHodoscopeRecInfoToken_
const edm::EDGetTokenT< EcalTBEventHeader > tbEventHeaderToken_
constexpr bool null() const
is this a null id ?
const std::string hitCollection_
TupleMultiplicity< TrackerTraits > const *__restrict__ TrackingRecHitSoAConstView< TrackerTraits > TrackerTraits::tindex_type *__restrict__ double *__restrict__ phits
const std::string tdcRecInfoCollection_
const std::string hodoRecInfoCollection_
~EcalSimple2007H4TBAnalyzer() override
int ic() const
get ECAL/crystal number inside SM
EcalMGPASample sample(int i) const
void analyze(edm::Event const &, edm::EventSetup const &) override
const_iterator end() const
Namespace of DDCMS conversion namespace.
CaloCellGeometryMayOwnPtr getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
const_iterator begin() const
The iterator returned can not safely be used across threads.
EcalSimple2007H4TBAnalyzer(const edm::ParameterSet &)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
int adc() const
get the ADC sample (12 bits)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
static const int SMCRYSTALMODE
void endRun(edm::Run const &, edm::EventSetup const &) override
const std::string rootfile_
const std::string eventHeaderProducer_