41 #include "TApplication.h" 149 std::ofstream MyOut(
txtfile_.c_str());
150 MyOut <<
"total events: " <<
tot_events_ << std::endl;
151 MyOut <<
"events skipped because of no hits: " <<
noHits_ << std::endl;
152 MyOut <<
"events skipped because of no hodos: " <<
noHodo_ << std::endl;
153 MyOut <<
"events skipped because of no tdc: " <<
noTdc_ << std::endl;
154 MyOut <<
"events skipped because of no header: " <<
noHeader_ << std::endl;
155 MyOut <<
"total OK events (passing the basic selection): " <<
tot_events_ok_ << std::endl;
208 int nomXtalInBeam = -999;
209 int nextXtalInBeam = -999;
212 if (xtalInBeamId ==
EBDetId(0)) {
215 int mySupCry = xtalInBeamId.
ic();
216 int mySupEta = xtalInBeamId.
ieta();
217 int mySupPhi = xtalInBeamId.
iphi();
221 double x = recHodo->
posX();
222 double y = recHodo->
posY();
225 double qx = recHodo->
qualX();
226 double qy = recHodo->
qualY();
230 double tdcOffset = recTDC->
offset();
238 for (
unsigned int icry = 0; icry < 49; icry++) {
239 unsigned int row = icry / 7;
240 unsigned int column = icry % 7;
243 if (Xtals7x7[icry].
ism() == 1) {
245 crystal[icry] = Xtals7x7[icry].
ic();
248 crystal[icry] = -100;
256 int maxEneCry = 9999;
257 for (
int ii = 0;
ii < 49;
ii++) {
260 maxEneCry = crystal[
ii];
static const std::string kSharedResource
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalTBTDCRecInfo > tokEcalTDC_
#define DEFINE_FWK_MODULE(type)
int iphi() const
get the crystal iphi
TreeProducerCalibSimul(const edm::ParameterSet &)
edm::EDGetTokenT< EcalTBEventHeader > tokEventHeader_
edm::EDGetTokenT< EcalTBHodoscopeRecInfo > tokEcalHodo_
std::string tdcRecInfoProducer_
int ieta() const
get the crystal ieta
std::string eventHeaderProducer_
T getUntrackedParameter(std::string const &, T const &) const
std::string hodoRecInfoProducer_
std::string eventHeaderCollection_
int ic() const
get ECAL/crystal number inside SM
std::string tdcRecInfoCollection_
~TreeProducerCalibSimul() override=default
static const int ETAPHIMODE
void analyze(const edm::Event &, const edm::EventSetup &) override
std::unique_ptr< TreeMatrixCalib > myTree_
static const int SMCRYSTALMODE
std::string RecHitProducer_
int ism(int ieta, int iphi)
std::string EBRecHitCollection_
std::string hodoRecInfoCollection_
edm::EDGetTokenT< EBRecHitCollection > tokEBRecHit_