57 : ecalRawDataColl_(iConfig.getParameter<
edm::
InputTag>(
"ecalRawDataColl")),
58 ecalRecHitCollectionEB_(iConfig.getParameter<
edm::
InputTag>(
"ecalRecHitCollectionEB")),
59 ecalRecHitCollectionEE_(iConfig.getParameter<
edm::
InputTag>(
"ecalRecHitCollectionEE")),
60 barrelClusterCollection_(iConfig.getParameter<
edm::
InputTag>(
"barrelClusterCollection")),
61 endcapClusterCollection_(iConfig.getParameter<
edm::
InputTag>(
"endcapClusterCollection")),
62 l1GTReadoutRecTag_(iConfig.getUntrackedParameter<
std::
string>(
"L1GlobalReadoutRecord",
"gtDigis")),
63 l1GMTReadoutRecTag_(iConfig.getUntrackedParameter<
std::
string>(
"L1GlobalMuonReadoutRecord",
"gtDigis")),
65 histRangeMax_(iConfig.getUntrackedParameter<double>(
"histogramMaxRange", 1.8)),
66 histRangeMin_(iConfig.getUntrackedParameter<double>(
"histogramMinRange", 0.0)),
67 minTimingAmpEB_(iConfig.getUntrackedParameter<double>(
"MinTimingAmpEB", 0.100)),
68 minTimingAmpEE_(iConfig.getUntrackedParameter<double>(
"MinTimingAmpEE", 0.100)),
69 minRecHitAmpEB_(iConfig.getUntrackedParameter<double>(
"MinRecHitAmpEB", 0.027)),
70 minRecHitAmpEE_(iConfig.getUntrackedParameter<double>(
"MinRecHitAmpEE", 0.18)),
71 minHighEnergy_(iConfig.getUntrackedParameter<double>(
"MinHighEnergy", 2.0)),
72 fileName_(iConfig.getUntrackedParameter<
std::
string>(
"fileName",
std::
string(
"ecalCosmicHists"))),
73 runInFileName_(iConfig.getUntrackedParameter<
bool>(
"runInFileName",
true)),
74 startTime_(iConfig.getUntrackedParameter<double>(
"TimeStampStart", 1215107133.)),
75 runTimeLength_(iConfig.getUntrackedParameter<double>(
"TimeStampLength", 3.)),
76 numTimingBins_(iConfig.getUntrackedParameter<
int>(
"TimeStampBins", 1800)) {
90 string title1 =
"Seed Energy for All Feds; Seed Energy (GeV)";
91 string name1 =
"SeedEnergyAllFEDs";
106 bool hasEndcapClusters =
true;
107 int ievt =
iEvent.id().event();
122 LogWarning(
"EcalCosmicsHists") <<
"Global EB ADC->GeV scale: " << agc->
getEBValue() <<
" GeV/ADC count";
123 LogWarning(
"EcalCosmicsHists") <<
"Global EE ADC->GeV scale: " << agc->
getEEValue() <<
" GeV/ADC count";
132 unsigned int timeStampLow = (0xFFFFFFFF &
iEvent.time().value());
133 unsigned int timeStampHigh = (
iEvent.time().value() >> 32);
134 double rawEventTime = (double)(timeStampHigh) + ((double)(timeStampLow) / 1000000.);
144 LogDebug(
"EcalCosmicsHists") <<
"event " << ievt;
149 hasEndcapClusters =
false;
155 if (!(
hits.isValid())) {
169 LogWarning(
"EcalCosmicsHists") <<
"DCC headers not available";
179 headerItr->getEventSettings();
180 int myorbit = headerItr->getOrbit();
181 int mybx = headerItr->getBX();
182 int myRunType = headerItr->getRunType();
183 int FEDid = headerItr->fedId();
185 if (dccRuntypeHist ==
nullptr) {
189 dccRuntypeHist->Fill(mybx, myRunType);
193 }
else if (
bx != mybx) {
194 LogWarning(
"EcalCosmicsHists") <<
"This header has a conflicting bx OTHERS were " <<
bx <<
" here " << mybx;
203 }
else if (
runType != myRunType) {
204 LogWarning(
"EcalCosmicsHists") <<
"This header has a conflicting runType OTHERS were " <<
bx <<
" here " << mybx;
212 }
else if (orbit != myorbit) {
213 LogWarning(
"EcalCosmicsHists") <<
"This header has a conflicting orbit; OTHERS were " << orbit <<
" here "
224 bool isEcalL1 = l1Triggers[4];
225 bool isHCALL1 = l1Triggers[3];
226 bool isRPCL1 = l1Triggers[2];
227 bool isCSCL1 = l1Triggers[1];
228 bool isDTL1 = l1Triggers[0];
234 int numberOfCosmics = 0;
235 int numberOfCosmicsEB = 0;
236 int numberOfCosmicsEEP = 0;
237 int numberOfCosmicsEEM = 0;
238 int numberOfCosmicsTop = 0;
239 int numberOfCosmicsBottom = 0;
240 int numberOfHighEClusters = 0;
242 std::vector<EBDetId>
seeds;
247 for (reco::SuperClusterCollection::const_iterator clus = clusterCollection_p->begin();
248 clus != clusterCollection_p->end();
250 double energy = clus->energy();
251 double phi = clus->phi();
252 double eta = clus->eta();
253 double time = -1000.0;
255 double secondMin = 0.;
256 double secondTime = -1000.;
257 int numXtalsinCluster = 0;
266 double cphi = (*bclus)->phi();
267 double ceta = (*bclus)->eta();
272 std::vector<std::pair<DetId, float> > clusterDetIds = clus->hitsAndFractions();
273 for (
std::vector<std::pair<DetId, float> >::const_iterator detitr = clusterDetIds.begin();
274 detitr != clusterDetIds.end();
278 std::cout <<
" det is " << (*detitr).first.det() << std::endl;
281 if ((*detitr).first.subdetId() !=
EcalBarrel) {
282 std::cout <<
" subdet is " << (*detitr).first.subdetId() << std::endl;
286 if (thishit ==
hits->end())
292 double thisamp = myhit.
energy();
296 if (thisamp > secondMin) {
298 secondTime = myhit.
time();
299 secDet = (
EBDetId)(*detitr).first;
301 if (secondMin > ampli) {
308 double fullnumXtalsinCluster = clusterDetIds.size();
310 float E2 = ampli + secondMin;
312 int FEDid = 600 + elecId.
dccId();
318 seeds.push_back(maxDet);
321 int ietaSM = maxDet.
ietaSM();
322 int iphiSM = maxDet.
iphiSM();
328 numberOfCosmicsTop++;
330 numberOfCosmicsBottom++;
349 if (uRecHist ==
nullptr) {
367 uRecHist->Fill(ampli);
368 E2uRecHist->Fill(E2);
369 E2vsE1uRecHist->Fill(ampli, E2);
370 energyuRecHist->Fill(
energy);
371 energyvsE1uRecHist->Fill(ampli,
energy);
379 iphiProfileHist->Fill(
iphi);
380 ietaProfileHist->Fill(
ieta);
401 occupHist->Fill(ietaSM, iphiSM);
402 if (fullnumXtalsinCluster == 1) {
409 if (isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
421 if (!isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && isHCALL1) {
433 if (!isEcalL1 && isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
445 if (!isEcalL1 && !isDTL1 && isRPCL1 && !isCSCL1 && !isHCALL1) {
457 if (!isEcalL1 && !isDTL1 && !isRPCL1 && isCSCL1 && !isHCALL1) {
498 if (isEcalL1 && (isCSCL1 || isRPCL1 || isDTL1) && !isHCALL1)
502 timingHist->Fill(
time);
504 timingHistVsAmp->Fill(
time, ampli);
508 timingHistVsPhi->Fill(
time, iphiSM);
509 timingHistVsModule->Fill(
time, ietaSM);
514 if (FEDid >= 610 && FEDid <= 627)
516 if (FEDid >= 628 && FEDid <= 645)
519 if (FEDid >= 610 && FEDid <= 627)
521 if (FEDid >= 628 && FEDid <= 645)
523 if (FEDid >= 613 && FEDid <= 616)
525 if (FEDid >= 631 && FEDid <= 634)
527 if (FEDid >= 622 && FEDid <= 625)
529 if (FEDid >= 640 && FEDid <= 643)
536 LogInfo(
"EcalCosmicsHists") <<
"High energy event " <<
iEvent.id().run() <<
" : " <<
iEvent.id().event() <<
" "
538 <<
ieta <<
" : " << isEcalL1 << isHCALL1 << isDTL1 << isRPCL1 << isCSCL1;
540 numberOfHighEClusters++;
556 LogInfo(
"EcalCosmicsHists") <<
"Very high energy event " <<
iEvent.id().run() <<
" : " <<
iEvent.id().event()
558 <<
iphi <<
" " <<
ieta <<
" : " << isEcalL1 << isHCALL1 << isDTL1 << isRPCL1
572 if (hasEndcapClusters) {
573 clusterCollection_p = escHandle.
product();
574 for (reco::SuperClusterCollection::const_iterator clus = clusterCollection_p->begin();
575 clus != clusterCollection_p->end();
577 double energy = clus->energy();
580 double time = -1000.0;
582 double secondMin = 0.;
583 double secondTime = -1000.;
584 int clusSize = clus->clustersSize();
585 int numXtalsinCluster = 0;
599 std::vector<std::pair<DetId, float> > clusterDetIds = clus->hitsAndFractions();
600 for (
std::vector<std::pair<DetId, float> >::const_iterator detitr = clusterDetIds.begin();
601 detitr != clusterDetIds.end();
607 LogError(
"EcalCosmicsHists") <<
" det is " << (*detitr).first.det();
610 if ((*detitr).first.subdetId() !=
EcalEndcap) {
611 LogError(
"EcalCosmicsHists") <<
" subdet is " << (*detitr).first.subdetId();
617 if (thishit == hitsEE->
end()) {
618 LogInfo(
"EcalCosmicsHists") <<
" WARNING: EEDetId not found in the RecHit collection!";
627 double thisamp = myhit.
energy();
631 if (thisamp > secondMin) {
633 secondTime = myhit.
time();
634 secDet = (
EEDetId)(*detitr).first;
636 if (secondMin > ampli) {
645 double fullnumXtalsinCluster = clusterDetIds.size();
647 float E2 = ampli + secondMin;
656 int ix = maxDet.
ix();
657 int iy = maxDet.
iy();
658 int iz = maxDet.
zside();
665 LogWarning(
"EcalCosmicsHists") <<
"INVALID EE DetId !!!" << endl;
671 numberOfCosmicsEEM++;
673 numberOfCosmicsEEP++;
736 if (fullnumXtalsinCluster == 1) {
749 if (isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
759 if (!isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && isHCALL1) {
769 if (!isEcalL1 && isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
779 if (!isEcalL1 && !isDTL1 && isRPCL1 && !isCSCL1 && !isHCALL1) {
789 if (!isEcalL1 && !isDTL1 && !isRPCL1 && isCSCL1 && !isHCALL1) {
843 if (fullnumXtalsinCluster == 1) {
856 if (isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
866 if (!isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && isHCALL1) {
876 if (!isEcalL1 && isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
886 if (!isEcalL1 && !isDTL1 && isRPCL1 && !isCSCL1 && !isHCALL1) {
896 if (!isEcalL1 && !isDTL1 && !isRPCL1 && isCSCL1 && !isHCALL1) {
938 LogInfo(
"EcalCosmicsHists") <<
"High energy event in EE " <<
iEvent.id().run() <<
" : " <<
iEvent.id().event()
940 <<
" " << iy <<
" : " << isEcalL1 << isHCALL1 << isDTL1 << isRPCL1 << isCSCL1;
963 LogInfo(
"EcalCosmicsHists") <<
"Very high energy event in EE " <<
iEvent.id().run() <<
" : "
965 << numXtalsinCluster <<
" : " << ix <<
" " << iy <<
" : " << isEcalL1 << isHCALL1
966 << isDTL1 << isRPCL1 << isCSCL1;
985 if (numberOfCosmics > 0) {
994 if (numberOfCosmicsEB > 0)
996 if (numberOfCosmicsEEP > 0)
998 if (numberOfCosmicsEEM > 0)
1001 if (numberOfCosmicsTop && numberOfCosmicsBottom) {
1010 iEvent.getByLabel(
"cosmicMuons", recoTracks);
1014 std::map<int, std::vector<DetId> > trackDetIdMap;
1016 for (reco::TrackCollection::const_iterator recoTrack = recoTracks->begin(); recoTrack != recoTracks->end();
1018 if (fabs(recoTrack->d0()) > 70 || fabs(recoTrack->dz()) > 70)
1020 if (recoTrack->numberOfValidHits() < 20)
1050 for (
unsigned int i = 0;
i <
info.crossedEcalIds.size();
i++) {
1059 if (thishit ==
hits->end())
1072 if (!
info.crossedEcalIds.empty())
1073 trackDetIdMap.insert(std::pair<
int, std::vector<DetId> >(
tracks,
info.crossedEcalIds));
1078 int numAssocTracks = 0;
1079 int numAssocClusters = 0;
1080 edm::LogVerbatim(
"TrackAssociator") <<
"Matching cosmic clusters to tracks...";
1081 int numSeeds =
seeds.size();
1082 int numTracks = trackDetIdMap.size();
1083 while (!
seeds.empty() && !trackDetIdMap.empty()) {
1084 double bestDr = 1000;
1085 double bestDPhi = 1000;
1086 double bestDEta = 1000;
1087 double bestEtaTrack = 1000;
1088 double bestEtaSeed = 1000;
1089 double bestPhiTrack = 1000;
1090 double bestPhiSeed = 1000;
1094 std::map<EBDetId, EBDetId> trackDetIdToSeedMap;
1098 for (std::vector<EBDetId>::const_iterator seedItr =
seeds.begin(); seedItr !=
seeds.end(); ++seedItr) {
1099 for (
std::map<
int, std::vector<DetId> >::const_iterator mapItr = trackDetIdMap.begin();
1100 mapItr != trackDetIdMap.end();
1102 for (
unsigned int i = 0;
i < mapItr->second.size();
i++) {
1104 if (mapItr->second[
i].det() ==
DetId::Ecal && mapItr->second[
i].subdetId() == 1) {
1105 EBDetId ebDet = (mapItr->second[
i]);
1106 double seedEta = seedItr->
ieta();
1107 double deta = ebDet.
ieta() - seedEta;
1108 if (seedEta * ebDet.
ieta() < 0)
1109 deta > 0 ? (deta = deta - 1.) : (deta = deta + 1.);
1111 double dphi = ebDet.
iphi() - seedItr->iphi();
1112 if (
abs(dphi) > 180)
1113 dphi > 0 ? (dphi = 360 - dphi) : (dphi = -360 - dphi);
1114 dR =
sqrt(deta * deta + dphi * dphi);
1119 bestTrackDet = mapItr->second[
i];
1120 bestTrack = mapItr->first;
1121 bestSeed = (*seedItr);
1122 bestEtaTrack = ebDet.
ieta();
1123 bestEtaSeed = seedEta;
1124 bestPhiTrack = ebDet.
iphi();
1125 bestPhiSeed = seedItr->iphi();
1131 if (bestDr < 1000) {
1140 trackDetIdMap.erase(trackDetIdMap.find(bestTrack));
1141 trackDetIdToSeedMap[bestTrackDet] = bestSeed;
1146 if (bestDPhi < 1.5 && bestDEta < 1.8) {
1151 if (Ecalhit ==
hits->end()) {
1154 double EcalhitEnergy = Ecalhit->energy();
1160 edm::LogVerbatim(
"TrackAssociator") <<
"could not match cluster seed to track." << bestDr;
1164 if (numSeeds > 0 && numTracks > 0) {
1168 if (numTracks > 0) {
1179 iEvent.getByLabel(
"cosmicMuonsBarrelOnly", recoTracksBarrel);
1180 if (!recoTracksBarrel.
isValid()) {
1185 for (reco::TrackCollection::const_iterator recoTrack = recoTracksBarrel->begin();
1186 recoTrack != recoTracksBarrel->end();
1192 for (reco::SuperClusterCollection::const_iterator clus = clusterCollection_p->begin();
1193 clus != clusterCollection_p->end();
1195 double energy = clus->energy();
1196 double phi = clus->phi();
1197 double eta = clus->eta();
1199 if (recoTracksBarrel->empty())
1201 if (recoTracksBarrel->size() == 1)
1203 if (recoTracksBarrel->size() == 2)
1206 std::vector<std::pair<DetId, float> > clusterDetIds = clus->hitsAndFractions();
1207 for (
std::vector<std::pair<DetId, float> >::const_iterator detitr = clusterDetIds.begin();
1208 detitr != clusterDetIds.end();
1213 if ((*detitr).first.subdetId() !=
EcalBarrel) {
1217 if (thishit ==
hits->end()) {
1221 double rechitenergy = thishit->energy();
1225 if (recoTracksBarrel->empty())
1227 if (recoTracksBarrel->size() == 1)
1229 if (recoTracksBarrel->size() == 2)
1232 if (rechitenergy > 10)
1233 edm::LogWarning(
"EcalCosmicsHists") <<
"!!!!! Crystal with energy " << rechitenergy <<
" at (ieta,iphi) ("
1234 <<
ieta <<
" ," <<
iphi <<
"); Id: " << (*detitr).first.det();
1240 if (recoTracksBarrel->size() == 2) {
1241 reco::TrackCollection::const_iterator Track1 = recoTracksBarrel->begin();
1242 reco::TrackCollection::const_iterator Track2 = (recoTracksBarrel->begin()) + 1;
1243 float angle = (acos(
sin(Track1->theta()) *
cos(Track1->phi()) *
sin(Track2->theta()) *
cos(Track2->phi()) +
1244 sin(Track1->theta()) *
sin(Track1->phi()) *
sin(Track2->theta()) *
sin(Track2->phi()) +
1245 cos(Track1->theta()) *
cos(Track2->theta()))) /
1249 if ((Track1->innerPosition().phi()) > 0 && (Track2->innerPosition().phi()) < 0) {
1265 iEvent.getByLabel(
"hfreco", hfrh);
1268 iEvent.getByLabel(
"horeco", horh);
1270 if (
hbhe.isValid()) {
1308 std::vector<bool> l1Triggers;
1310 l1Triggers.reserve(5);
1311 for (
int i = 0;
i < 5;
i++)
1312 l1Triggers.push_back(
false);
1318 if (!(gmtrc_handle.
isValid())) {
1319 LogWarning(
"EcalCosmicsHists") <<
"l1MuGMTReadoutCollection"
1320 <<
" not available";
1336 bool l1SingleEG1 =
menu->gtAlgorithmResult(
"L1_SingleEG1", dWord);
1337 bool l1SingleEG5 =
menu->gtAlgorithmResult(
"L1_SingleEG5", dWord);
1338 bool l1SingleEG8 =
menu->gtAlgorithmResult(
"L1_SingleEG8", dWord);
1339 bool l1SingleEG10 =
menu->gtAlgorithmResult(
"L1_SingleEG10", dWord);
1340 bool l1SingleEG12 =
menu->gtAlgorithmResult(
"L1_SingleEG12", dWord);
1341 bool l1SingleEG15 =
menu->gtAlgorithmResult(
"L1_SingleEG15", dWord);
1342 bool l1SingleEG20 =
menu->gtAlgorithmResult(
"L1_SingleEG20", dWord);
1343 bool l1SingleEG25 =
menu->gtAlgorithmResult(
"L1_SingleEG25", dWord);
1344 bool l1DoubleNoIsoEGBTBtight =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEG_BTB_tight", dWord);
1345 bool l1DoubleNoIsoEGBTBloose =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEG_BTB_loose ", dWord);
1346 bool l1DoubleNoIsoEGTopBottom =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottom", dWord);
1347 bool l1DoubleNoIsoEGTopBottomCen =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottomCen", dWord);
1348 bool l1DoubleNoIsoEGTopBottomCen2 =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottomCen2", dWord);
1349 bool l1DoubleNoIsoEGTopBottomCenVert =
menu->gtAlgorithmResult(
"L1_DoubleNoIsoEGTopBottomCenVert", dWord);
1351 l1Triggers[4] = l1SingleEG1 || l1SingleEG5 || l1SingleEG8 || l1SingleEG10 || l1SingleEG12 || l1SingleEG15 ||
1352 l1SingleEG20 || l1SingleEG25 || l1DoubleNoIsoEGBTBtight || l1DoubleNoIsoEGBTBloose ||
1353 l1DoubleNoIsoEGTopBottom || l1DoubleNoIsoEGTopBottomCen || l1DoubleNoIsoEGTopBottomCen2 ||
1354 l1DoubleNoIsoEGTopBottomCenVert;
1356 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
1357 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
1358 for (igmtrr = gmt_records.begin(); igmtrr != gmt_records.end(); igmtrr++) {
1359 std::vector<L1MuRegionalCand>::const_iterator iter1;
1360 std::vector<L1MuRegionalCand> rmc;
1364 rmc = igmtrr->getDTBXCands();
1365 for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
1366 if (!(*iter1).empty()) {
1372 if (igmtrr->getBxInEvent() == 0 && idt > 0)
1373 l1Triggers[0] =
true;
1377 rmc = igmtrr->getBrlRPCCands();
1378 for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
1379 if (!(*iter1).empty()) {
1385 if (igmtrr->getBxInEvent() == 0 && irpcb > 0)
1386 l1Triggers[2] =
true;
1390 rmc = igmtrr->getCSCCands();
1391 for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
1392 if (!(*iter1).empty()) {
1398 if (igmtrr->getBxInEvent() == 0 && icsc > 0)
1399 l1Triggers[1] =
true;
1404 for (
int ibx = -1; ibx <= 1; ibx++) {
1405 bool hcal_top =
false;
1406 bool hcal_bot =
false;
1408 std::vector<int> valid_phi;
1409 if ((psb.
aData(4) & 0x3f) >= 1) {
1410 valid_phi.push_back((psb.
aData(4) >> 10) & 0x1f);
1412 if ((psb.
bData(4) & 0x3f) >= 1) {
1413 valid_phi.push_back((psb.
bData(4) >> 10) & 0x1f);
1415 if ((psb.
aData(5) & 0x3f) >= 1) {
1416 valid_phi.push_back((psb.
aData(5) >> 10) & 0x1f);
1418 if ((psb.
bData(5) & 0x3f) >= 1) {
1419 valid_phi.push_back((psb.
bData(5) >> 10) & 0x1f);
1421 std::vector<int>::const_iterator
iphi;
1422 for (
iphi = valid_phi.begin();
iphi != valid_phi.end();
iphi++) {
1429 if (ibx == 0 && hcal_top && hcal_bot)
1430 l1Triggers[3] =
true;
1433 edm::LogInfo(
"EcalCosmicsHists") <<
"**** Trigger SourceSource ****";
1444 edm::LogInfo(
"EcalCosmicsHists") <<
"************************";
1451 using namespace std;
1454 string title1 =
"Energy of Seed Crystal ";
1456 title1.append(
";Seed Energy (GeV);Number of Cosmics");
1457 string name1 =
"SeedEnergyFED";
1473 TH2F* E2vsE1hist =
new TH2F(Form(
"E2vsE1_FED_%d", FED),
1474 Form(
"E2vsE1_FED_%d", FED),
1484 TH2F* energyvsE1hist =
new TH2F(Form(
"EnergyvsE1_FED_%d", FED),
1485 Form(
"EnergyvsE1_FED_%d", FED),
1495 title1 =
"Time for ";
1497 title1.append(
";Relative Time (1 clock = 25ns);Events");
1500 TH1F* timingHist =
new TH1F(name1.c_str(), title1.c_str(), 78, -7, 7);
1505 new TH1F(Form(
"Frequency_FED_%d", FED), Form(
"Frequency for FED %d;Event Number", FED), 100, 0., 100000);
1509 TH1F* iphiProfileHist =
1510 new TH1F(Form(
"iPhi_Profile_FED_%d", FED), Form(
"iPhi Profile for FED %d", FED), 360, 1., 361);
1514 TH1F* ietaProfileHist =
1515 new TH1F(Form(
"iEta_Profile_FED_%d", FED), Form(
"iEta Profile for FED %d", FED), 172, -86, 86);
1519 TH2F* timingHistVsFreq =
1520 new TH2F(Form(
"timeVsFreqFED_%d", FED), Form(
"time Vs Freq FED %d", FED), 78, -7, 7, 100, 0., 100000);
1524 TH2F* timingHistVsAmp =
new TH2F(
1529 TH1F* numXtalInClusterHist =
new TH1F(Form(
"NumXtalsInCluster_FED_%d", FED),
1530 Form(
"Num active Xtals In Cluster for FED %d;Num Active Xtals", FED),
1537 TH2F* OccupHist =
new TH2F(Form(
"occupFED_%d", FED), Form(
"Occupancy FED %d;i#eta;i#phi", FED), 85, 1, 86, 20, 1, 21);
1541 TH2F* timingHistVsPhi =
new TH2F(Form(
"timeVsPhiFED_%d", FED),
1542 Form(
"time Vs Phi FED %d;Relative Time (1 clock = 25ns);i#phi", FED),
1552 TH2F* timingHistVsModule =
new TH2F(Form(
"timeVsModuleFED_%d", FED),
1553 Form(
"time Vs Module FED %d;Relative Time (1 clock = 25ns);i#eta", FED),
1563 TH2F* dccRuntypeVsBxFED =
1564 new TH2F(Form(
"DCCRuntypeVsBxFED_%d", FED), Form(
"DCC Runtype vs. BX FED %d", FED), 3600, 0, 3600, 24, 0, 24);
1579 double ttEtaBins[36] = {-85, -80, -75, -70, -65, -60, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0,
1580 1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76, 81, 86};
1581 double modEtaBins[10] = {-85, -65, -45, -25, 0, 1, 26, 46, 66, 86};
1582 double ttPhiBins[73];
1583 double modPhiBins[19];
1584 double timingBins[79];
1585 double highEBins[11];
1586 for (
int i = 0;
i < 79; ++
i) {
1587 timingBins[
i] = -7. + double(
i) * 14. / 78.;
1589 ttPhiBins[
i] = 1 + 5 *
i;
1591 modPhiBins[
i] = 1 + 20 *
i;
1593 highEBins[
i] = 10. + double(
i) * 20.;
1602 double timingBinWidth = timingEndInSeconds / double(
numTimingBins_);
1608 new TH1F(
"energyHigh_AllClusters",
"energyHigh_AllClusters;Cluster Energy (GeV)", numBins,
histRangeMin_, 200.0);
1610 "energy of High Energy Clusters;Cluster Energy (GeV)",
1617 "E2vsE1_AllClusters;Seed Energy (GeV);Seed+highest neighbor energy (GeV)",
1625 "energyvsE1_AllClusters;Seed Energy (GeV);Energy(GeV)",
1632 allFedsTimingHist_ =
new TH1F(
"timeForAllFeds",
"timeForAllFeds;Relative Time (1 clock = 25ns)", 78, -7, 7);
1634 "time Vs Freq All events;Relative Time (1 clock = 25ns);Event Number",
1642 "time Vs Amp All Events;Relative Time (1 clock = 25ns);Amplitude (GeV)",
1649 allFedsFrequencyHist_ =
new TH1F(
"FrequencyAllEvent",
"Frequency for All events;Event Number", 2000, 0., 200000);
1653 Form(
"Time of Cosmic Events; Time (s);Passing Event rate/%5g s", timingBinWidth),
1656 timingEndInSeconds);
1658 new TH2F(
"FrequencyAllEventsInTimeVsPhi",
1659 Form(
"Time of Cosmic Events vs iPhi; iPhi;Time (s)/%5g s", timingBinWidth * 360.),
1665 timingEndInSeconds);
1667 new TH2F(
"FrequencyAllEventsInTimeVsTTPhi",
1668 Form(
"Time of Cosmic Events vs iPhi (TT bins); iPhi;Time (s)/%5g s", timingBinWidth * 72.),
1674 timingEndInSeconds);
1676 new TH2F(
"FrequencyAllEventsInTimeVsEta",
1677 Form(
"Time of Cosmic Events vs iEta; Time (s)/%5g s; iEta", timingBinWidth * 172.),
1685 new TH2F(
"FrequencyAllEventsInTimeVsTTEta",
1686 Form(
"Time of Cosmic Events vs Eta (TT bins);Time (s)/%5g s; iEta", timingBinWidth * 35.),
1697 allOccupancy_ =
new TH2F(
"OccupancyAllEvents",
"Occupancy all events;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1699 new TH2F(
"TrueOccupancyAllEvents",
"True Occupancy all events;#phi;#eta", 360, -3.14159, 3.14159, 172, -1.5, 1.5);
1701 new TH2F(
"OccupancyAllEventsCoarse",
"Occupancy all events Coarse;i#phi;i#eta", 360 / 5, 1, 361., 35,
ttEtaBins);
1703 "True Occupancy all events Coarse;#phi;#eta",
1713 new TH2F(
"OccupancySingleXtal",
"Occupancy single xtal clusters;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1715 "energy_SingleXtalClusters",
"Energy single xtal clusters;Cluster Energy (GeV)", numBins,
histRangeMin_, 200.0);
1718 "time vs Phi for all FEDs (TT binning);i#phi;Relative Time (1 clock = 25ns)",
1726 "time vs Phi for FEDs in EB+ (TT binning) ;i#phi;Relative Time (1 clock = 25ns)",
1734 "time vs Phi for FEDs in EB- (TT binning);i#phi;Relative Time (1 clock = 25ns)",
1742 new TH3F(
"timePhiEtaAllFEDs",
1743 "(Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1751 new TH3F(
"timeTTAllFEDs",
1752 "(Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1760 "timeLMAllFEDs",
"(LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)", 92, 1, 92, 78, -7, 7);
1762 allFedsTimingEbpHist_ =
new TH1F(
"timeEBP",
"time for FEDs in EB+;Relative Time (1 clock = 25ns)", 78, -7, 7);
1763 allFedsTimingEbmHist_ =
new TH1F(
"timeEBM",
"time for FEDs in EB-;Relative Time (1 clock = 25ns)", 78, -7, 7);
1765 new TH1F(
"timeEBPTop",
"time for FEDs in EB+ Top;Relative Time (1 clock = 25ns)", 78, -7, 7);
1767 new TH1F(
"timeEBMTop",
"time for FEDs in EB- Top;Relative Time (1 clock = 25ns)", 78, -7, 7);
1769 new TH1F(
"timeEBPBottom",
"time for FEDs in EB+ Bottom;Relative Time (1 clock = 25ns)", 78, -7, 7);
1771 new TH1F(
"timeEBMBottom",
"time for FEDs in EB- Bottom;Relative Time (1 clock = 25ns)", 78, -7, 7);
1774 new TH1F(
"numberofCosmicsPerEvent",
"Number of cosmics per event;Number of Cosmics", 30, 0, 30);
1776 new TH1F(
"numberofCosmicsPerEvent_EB",
"Number of cosmics per event EB;Number of Cosmics", 30, 0, 30);
1779 new TH1F(
"numberofCosmicsWTrackPerEvent",
"Number of cosmics with track per event", 30, 0, 30);
1781 "numberofCosmicsTopBottomPerEvent",
"Number of top bottom cosmics per event;Number of Cosmics", 30, 0, 30);
1783 "Number of events with cosmic vs Event;Event Number;Number of Good Events/100 Events",
1789 "Number of crossed ECAL cosmics per event;Number of Crossed Cosmics",
1795 "Occupancy all events Exclusive ECAL ;i#phi;i#eta",
1803 "Occupancy all events Coarse Exclusive ECAL;i#phi;i#eta",
1809 new TH2F(
"OccupancyAllEvents_ECAL",
"Occupancy all events ECAL;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1811 "Occupancy all events Coarse ECAL;i#phi;i#eta",
1817 new TH1F(
"timeForAllFeds_ECAL",
"timeForAllFeds ECAL;Relative Time (1 clock = 25ns)", 78, -7, 7);
1819 new TH3F(
"timePhiEtaAllFEDs_ECAL",
1820 "ECAL (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1828 new TH3F(
"timeTTAllFEDs_ECAL",
1829 "ECAL (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1837 "ECAL (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
1846 "OccupancyAllEvents_ExclusiveDT",
"Occupancy all events Exclusive DT;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1848 "Occupancy all events Coarse Exclusive DT;i#phi;i#eta",
1855 new TH2F(
"OccupancyAllEvents_DT",
"Occupancy all events DT;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1857 "OccupancyAllEventsCoarse_DT",
"Occupancy all events Coarse DT;i#phi;i#eta", 360 / 5, 1, 361., 35,
ttEtaBins);
1858 allFedsTimingHistDT_ =
new TH1F(
"timeForAllFeds_DT",
"timeForAllFeds DT;Relative Time (1 clock = 25ns)", 78, -7, 7);
1860 new TH3F(
"timePhiEtaAllFEDs_DT",
1861 "DT (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1869 new TH3F(
"timeTTAllFEDs_DT",
1870 "DT (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1878 "DT (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
1887 "OccupancyAllEvents_ExclusiveRPC",
"Occupancy all events Exclusive RPC;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1889 "Occupancy all events Coarse Exclusive RPC;i#phi;i#eta",
1896 new TH2F(
"OccupancyAllEvents_RPC",
"Occupancy all events RPC;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1898 "OccupancyAllEventsCoarse_RPC",
"Occupancy all events Coarse RPC;i#phi;i#eta", 360 / 5, 1, 361., 35,
ttEtaBins);
1900 new TH1F(
"timeForAllFeds_RPC",
"timeForAllFeds RPC;Relative Time (1 clock = 25ns)", 78, -7, 7);
1902 new TH3F(
"timePhiEtaAllFEDs_RPC",
1903 "RPC (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1911 new TH3F(
"timeTTAllFEDs_RPC",
1912 "RPC (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1920 "RPC (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
1929 "OccupancyAllEvents_ExclusiveCSC",
"Occupancy all events Exclusive CSC;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1931 "Occupancy all events Coarse Exclusive CSC;i#phi;i#eta",
1938 new TH2F(
"OccupancyAllEvents_CSC",
"Occupancy all events CSC;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1940 "OccupancyAllEventsCoarse_CSC",
"Occupancy all events Coarse CSC;i#phi;i#eta", 360 / 5, 1, 361., 35,
ttEtaBins);
1942 new TH1F(
"timeForAllFeds_CSC",
"timeForAllFeds CSC;Relative Time (1 clock = 25ns)", 78, -7, 7);
1944 new TH3F(
"timePhiEtaAllFEDs_CSC",
1945 "CSC (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1953 new TH3F(
"timeTTAllFEDs_CSC",
1954 "CSC (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1962 "CSC (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
1971 "Occupancy all events Exclusive HCAL;i#phi;i#eta",
1979 "Occupancy all events Coarse Exclusive HCAL;i#phi;i#eta",
1986 new TH2F(
"OccupancyAllEvents_HCAL",
"Occupancy all events HCAL;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1988 "OccupancyAllEventsCoarse_HCAL",
"Occupancy all events Coarse HCAL;i#phi;i#eta", 360 / 5, 1, 361., 35,
ttEtaBins);
1990 new TH1F(
"timeForAllFeds_HCAL",
"timeForAllFeds HCAL;Relative Time (1 clock = 25ns)", 78, -7, 7);
1992 new TH3F(
"timePhiEtaAllFEDs_HCAL",
1993 "HCAL (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
2001 new TH3F(
"timeTTAllFEDs_HCAL",
2002 "HCAL (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
2010 "HCAL (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
2019 "BCTrueOccupancyAllEvents",
"True SB Occupancy all events;#phi;#eta", 360, -3.14159, 3.14159, 172, -1.5, 1.5);
2021 "True BC Occupancy all events Coarse;#phi;#eta",
2030 new TH1F(
"numberofBCinSC",
"Number of Basic Clusters in Super Cluster;Num Basic Clusters", 20, 0, 20);
2032 "Number of Basic Clusters in Super Cluster;phi;Num Basic Clusters",
2041 new TH1F(
"timeForAllFeds_EcalMuon",
"timeForAllFeds Ecal+Muon;Relative Time (1 clock = 25ns)", 78, -7, 7);
2043 triggerHist_ =
new TH1F(
"triggerHist",
"Trigger Number", 5, 0, 5);
2050 triggerExclusiveHist_ =
new TH1F(
"triggerExclusiveHist",
"Trigger Number (Mutually Exclusive)", 5, 0, 5);
2057 runNumberHist_ =
new TH1F(
"runNumberHist",
"Run Number", 1, 0, 1);
2059 deltaRHist_ =
new TH1F(
"deltaRHist",
"deltaR", 500, -0.5, 499.5);
2060 deltaEtaHist_ =
new TH1F(
"deltaIEtaHist",
"deltaIEta", 170, -85.5, 84.5);
2061 deltaPhiHist_ =
new TH1F(
"deltaIPhiHist",
"deltaIPhi", 720, -360.5, 359.5);
2062 ratioAssocTracksHist_ =
new TH1F(
"ratioAssocTracks",
"num assoc. tracks/tracks through Ecal", 11, 0, 1.1);
2065 "trackAssoc_muonsEcal",
"Map of muon hits in Ecal", 360, 1., 361., 172, -86, 86);
2067 new TH2F(
"deltaEtaDeltaPhi",
"Delta ieta vs. delta iphi", 170, -85.5, 84.5, 720, -360.5, 359.5);
2068 seedTrackEtaHist_ =
new TH2F(
"seedTrackEta",
"track ieta vs. seed ieta", 170, -85.5, 84.5, 170, -85.5, 84.5);
2069 seedTrackPhiHist_ =
new TH2F(
"seedTrackPhi",
"track iphi vs. seed iphi", 720, -360.5, 359.5, 720, -360.5, 359.5);
2071 dccEventVsBxHist_ =
new TH2F(
"dccEventVsBx",
"DCC Runtype vs. bunch crossing", 3600, 0, 3600, 24, 0, 24);
2072 dccBXErrorByFEDHist_ =
new TH1F(
"dccBXErrorByFED",
"Incorrect BX number by FED", 54, 601, 655);
2075 dccRuntypeHist_ =
new TH1F(
"dccRuntype",
"DCC Runtype frequency", 24, 0, 24);
2076 dccErrorVsBxHist_ =
new TH2F(
"dccErrorVsBX",
"DCC Errors vs. BX", 3600, 0, 3600, 3, 0, 3);
2078 hcalEnergy_HBHE_ =
new TH1F(
"hcalEnergy_HBHE",
"RecHit Energy HBHE", 440, -10, 100);
2079 hcalEnergy_HF_ =
new TH1F(
"hcalEnergy_HF",
"RecHit Energy HF", 440, -10, 100);
2080 hcalEnergy_HO_ =
new TH1F(
"hcalEnergy_HO",
"RecHit Energy HO", 440, -10, 100);
2082 new TH2F(
"hcalHEHBecalEB",
"HCAL HBHE RecHit energy vs ECAL EB energy", numBins,
histRangeMin_, 300.0, 40, -5, 5);
2084 NumXtalsInClusterHist_ =
new TH1F(
"NumXtalsInClusterAllHist",
"Number of Xtals in Cluster;NumXtals", 150, 0, 150);
2086 "Number of Xtals in Cluster vs Energy;Energy (GeV);Number of Xtals in Cluster",
2094 "Number of Xtals in Cluster vs Energy;Energy (GeV);Number of Xtals in Cluster",
2104 new TH2F(
"OccupancyHighEnergyEvents",
"Occupancy high energy events;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
2106 "Occupancy high energy events Coarse;i#phi;i#eta",
2112 "(Phi,Eta,energy) for all high energy events;i#phi;i#eta;energy (GeV)",
2120 new TH1F(
"NumActiveXtalsInClusterAllHist",
"Number of active Xtals in Cluster;NumXtals", 100, 0, 100);
2122 HighEnergy_NumXtal =
new TH1F(
"HighEnergy_NumXtal",
"Num crystals in high E clusters;num crystals", 150, 0, 150);
2124 "HighEnergy_NumXtalFedId",
"Num crystals in cluster vs FedId;FedId;num crystals", 36, 610., 645., 150, 0, 150);
2126 "HighEnergy_NumXtaliphi",
"Num crystals in cluster vs iphi;i#phi;num crystals", 360, 1., 361., 150, 0, 150);
2128 "(Phi,Eta,energy) for all high energy events;i#phi;i#eta;energy (GeV)",
2137 "Energy in cluster vs Num crystals in cluster;num crystals;energy",
2145 HighEnergy_bestSeed =
new TH1F(
"HighEnergy_bestSeedEnergy",
"BestSeed Energy from TrackAss", 200, 0., 200.);
2147 "HighEnergy_bestSeedOccupancy",
"Occupancy HighEn events from TrackAss;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
2151 new TH1F(
"HighEnergy_ratioClusters",
"Num High Energy Clusters/Num tot Clusters", 100, 0., 1.1);
2156 new TH1F(
"HighEnergy_TopBottomTracksAngle",
"Angle between top-bottom tracks", 720, 0., 180.);
2159 "Occupancy high energy events with more than 2 GeV;i#phi;i#eta",
2165 "(iphi,ieta,energy) for all high energy events w > 10 GeV;i#phi;i#eta;energy (GeV)",
2173 "Occupancy high energy events with more than 100 GeV;i#phi;i#eta",
2179 new TH3F(
"HighEnergy_100GeV_energy3D",
2180 "(iphi,ieta,energy) for all high energy events more than 100 GeV;i#phi;i#eta;energy (GeV)",
2188 "(iphi,ieta,energy) for all events with 0 tracks;i#phi;i#eta;energy (GeV)",
2196 "(iphi,ieta,energy) for all events with 1 tracks;i#phi;i#eta;energy (GeV)",
2204 "(iphi,ieta,energy) for all events with 2 tracks;i#phi;i#eta;energy (GeV)",
2212 "(iphi,ieta,energy) for all events with 0 tracks;i#phi;i#eta;energy (GeV)",
2223 "(iphi,ieta,energy) for all events with 1 tracks;i#phi;i#eta;energy (GeV)",
2234 "(iphi,ieta,energy) for all events with 2 tracks;i#phi;i#eta;energy (GeV)",
2249 new TH1F(
"SeedEnergyAllFEDs",
"Seed Energy for EEM Feds; Seed Energy (GeV)", 200,
histRangeMin_, 10.0);
2252 new TH2F(
"OccupancyAllEventsCoarse",
"Occupancy all events Coarse EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2253 EEM_AllOccupancy_ =
new TH2F(
"OccupancyAllEvents",
"Occupancy all events EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2255 new TH1F(
"energy_AllClusters",
"energy_AllClusters_EEM;Cluster Energy (GeV)", numBins,
histRangeMin_, 10.0);
2257 "energyHigh_AllClusters",
"energyHigh_AllClusters in EEM;Cluster Energy (GeV)", numBins,
histRangeMin_, 200.0);
2259 "energy of High Energy Clusters in EEM;Cluster Energy (GeV)",
2264 new TH1F(
"E2_AllClusters",
"E2_AllClusters_EEM;Seed+highest neighbor energy (GeV)", numBins,
histRangeMin_, 10.0);
2266 "E2vsE1_AllClusters_EEM;Seed Energy (GeV);Seed+highest neighbor energy (GeV)",
2274 "energyvsE1_AllClusters_EEM;Seed Energy (GeV);Energy(GeV)",
2281 EEM_FedsTimingHist_ =
new TH1F(
"timeForAllFeds",
"timeForAllFeds_EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2283 new TH1F(
"numberofCosmicsPerEvent",
"Number of cosmics per event EEM;Number of Cosmics", 30, 0, 30);
2286 "time Vs Amp All Events EEM;Relative Time (1 clock = 25ns);Amplitude (GeV)",
2294 "(ix,iy,time) for all FEDs (SM,TT binning) EEM;ix;iy;Relative Time (1 clock = 25ns)",
2306 new TH2F(
"OccupancySingleXtal",
"Occupancy single xtal clusters EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2308 "Energy single xtal clusters EEM;Cluster Energy (GeV)",
2314 "OccupancyAllEvents_ExclusiveECAL",
"Occupancy all events Exclusive ECAL EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2316 "Occupancy all events Coarse Exclusive ECAL EEM;ix;iy",
2324 new TH2F(
"OccupancyAllEvents_ECAL",
"Occupancy all events ECAL EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2326 new TH2F(
"OccupancyAllEventsCoarse_ECAL",
"Occupancy all events Coarse ECAL EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2328 new TH1F(
"timeForAllFeds_ECAL",
"timeForAllFeds ECAL EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2330 new TH3F(
"timeTTAllFEDs_ECAL",
2331 "(ix,iy,time) for all FEDs (SM,TT binning) ECAL EEM;ix;iy;Relative Time (1 clock = 25ns)",
2343 "OccupancyAllEvents_ExclusiveDT",
"Occupancy all events Exclusive DT EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2345 "Occupancy all events Coarse Exclusive DT EEM;ix;iy",
2352 EEM_OccupancyDT_ =
new TH2F(
"OccupancyAllEvents_DT",
"Occupancy all events DT EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2354 new TH2F(
"OccupancyAllEventsCoarse_DT",
"Occupancy all events Coarse DT EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2356 new TH1F(
"timeForAllFeds_DT",
"timeForAllFeds DT EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2358 new TH3F(
"timeTTAllFEDs_DT",
2359 "(ix,iy,time) for all FEDs (SM,TT binning) DT EEM;ix;iy;Relative Time (1 clock = 25ns)",
2371 "OccupancyAllEvents_ExclusiveRPC",
"Occupancy all events Exclusive RPC EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2373 "Occupancy all events Coarse Exclusive RPC EEM;ix;iy",
2381 new TH2F(
"OccupancyAllEvents_RPC",
"Occupancy all events RPC EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2383 new TH2F(
"OccupancyAllEventsCoarse_RPC",
"Occupancy all events Coarse RPC EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2385 new TH1F(
"timeForAllFeds_RPC",
"timeForAllFeds RPC EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2387 new TH3F(
"timeTTAllFEDs_RPC",
2388 "(ix,iy,time) for all FEDs (SM,TT binning) RPC EEM;ix;iy;Relative Time (1 clock = 25ns)",
2400 "OccupancyAllEvents_ExclusiveCSC",
"Occupancy all events Exclusive CSC EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2402 "Occupancy all events Coarse Exclusive CSC EEM;ix;iy",
2410 new TH2F(
"OccupancyAllEvents_CSC",
"Occupancy all events CSC EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2412 new TH2F(
"OccupancyAllEventsCoarse_CSC",
"Occupancy all events Coarse CSC EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2414 new TH1F(
"timeForAllFeds_CSC",
"timeForAllFeds CSC EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2416 new TH3F(
"timeTTAllFEDs_CSC",
2417 "(ix,iy,time) for all FEDs (SM,TT binning) CSC EEM;ix;iy;Relative Time (1 clock = 25ns)",
2429 "OccupancyAllEvents_ExclusiveHCAL",
"Occupancy all events Exclusive HCAL EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2431 "Occupancy all events Coarse Exclusive HCAL EEM;ix;iy",
2439 new TH2F(
"OccupancyAllEvents_HCAL",
"Occupancy all events HCAL EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2441 new TH2F(
"OccupancyAllEventsCoarse_HCAL",
"Occupancy all events Coarse HCAL EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2443 new TH1F(
"timeForAllFeds_HCAL",
"timeForAllFeds HCAL EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2445 new TH3F(
"timeTTAllFEDs_HCAL",
2446 "(ix,iy,time) for all FEDs (SM,TT binning) HCAL EEM;ix;iy;Relative Time (1 clock = 25ns)",
2458 new TH1F(
"numberofBCinSC",
"Number of Basic Clusters in Super Cluster EEM;Num Basic Clusters", 20, 0, 20);
2475 new TH1F(
"NumXtalsInClusterAllHist",
"Number of Xtals in Cluster EEM;NumXtals", 150, 0, 150);
2477 "Number of Xtals in Cluster vs Energy EEM;Energy (GeV);Number of Xtals in Cluster",
2485 new TH2F(
"NumXtalsVsHighEnergy",
2486 "Number of Xtals in Cluster vs Energy EEM;Energy (GeV);Number of Xtals in Cluster",
2495 new TH2F(
"OccupancyHighEnergyEvents",
"Occupancy high energy events EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2497 "OccupancyHighEnergyEventsCoarse",
"Occupancy high energy events Coarse EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2500 new TH1F(
"NumActiveXtalsInClusterAllHist",
"Number of active Xtals in Cluster EEM;NumXtals", 100, 0, 100);
2504 new TH1F(
"SeedEnergyAllFEDs",
"Seed Energy for EEP Feds; Seed Energy (GeV)", 200,
histRangeMin_, 10.0);
2507 new TH2F(
"OccupancyAllEventsCoarse",
"Occupancy all events Coarse EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2508 EEP_AllOccupancy_ =
new TH2F(
"OccupancyAllEvents",
"Occupancy all events EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2510 new TH1F(
"energy_AllClusters",
"energy_AllClusters_EEP;Cluster Energy (GeV)", numBins,
histRangeMin_, 10.0);
2512 "energyHigh_AllClusters",
"energyHigh_AllClusters in EEP;Cluster Energy (GeV)", numBins,
histRangeMin_, 200.0);
2514 "energy of High Energy Clusters in EEP;Cluster Energy (GeV)",
2519 new TH1F(
"E2_AllClusters",
"E2_AllClusters_EEP;Seed+highest neighbor energy (GeV)", numBins,
histRangeMin_, 10.0);
2521 "E2vsE1_AllClusters_EEP;Seed Energy (GeV);Seed+highest neighbor energy (GeV)",
2529 "energyvsE1_AllClusters_EEP;Seed Energy (GeV);Energy(GeV)",
2536 EEP_FedsTimingHist_ =
new TH1F(
"timeForAllFeds",
"timeForAllFeds_EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2538 new TH1F(
"numberofCosmicsPerEvent",
"Number of cosmics per event EEP;Number of Cosmics", 30, 0, 30);
2541 "time Vs Amp All Events EEP;Relative Time (1 clock = 25ns);Amplitude (GeV)",
2549 "(ix,iy,time) for all FEDs (SM,TT binning) EEP;ix;iy;Relative Time (1 clock = 25ns)",
2561 new TH2F(
"OccupancySingleXtal",
"Occupancy single xtal clusters EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2563 "Energy single xtal clusters EEP;Cluster Energy (GeV)",
2569 "OccupancyAllEvents_ExclusiveECAL",
"Occupancy all events Exclusive ECAL EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2571 "Occupancy all events Coarse Exclusive ECAL EEP;ix;iy",
2579 new TH2F(
"OccupancyAllEvents_ECAL",
"Occupancy all events ECAL EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2581 new TH2F(
"OccupancyAllEventsCoarse_ECAL",
"Occupancy all events Coarse ECAL EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2583 new TH1F(
"timeForAllFeds_ECAL",
"timeForAllFeds ECAL EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2585 new TH3F(
"timeTTAllFEDs_ECAL",
2586 "(ix,iy,time) for all FEDs (SM,TT binning) ECAL EEP;ix;iy;Relative Time (1 clock = 25ns)",
2598 "OccupancyAllEvents_ExclusiveDT",
"Occupancy all events Exclusive DT EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2600 "Occupancy all events Coarse Exclusive DT EEP;ix;iy",
2607 EEP_OccupancyDT_ =
new TH2F(
"OccupancyAllEvents_DT",
"Occupancy all events DT EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2609 new TH2F(
"OccupancyAllEventsCoarse_DT",
"Occupancy all events Coarse DT EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2611 new TH1F(
"timeForAllFeds_DT",
"timeForAllFeds DT EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2613 new TH3F(
"timeTTAllFEDs_DT",
2614 "(ix,iy,time) for all FEDs (SM,TT binning) DT EEP;ix;iy;Relative Time (1 clock = 25ns)",
2626 "OccupancyAllEvents_ExclusiveRPC",
"Occupancy all events Exclusive RPC EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2628 "Occupancy all events Coarse Exclusive RPC EEP;ix;iy",
2636 new TH2F(
"OccupancyAllEvents_RPC",
"Occupancy all events RPC EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2638 new TH2F(
"OccupancyAllEventsCoarse_RPC",
"Occupancy all events Coarse RPC EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2640 new TH1F(
"timeForAllFeds_RPC",
"timeForAllFeds RPC EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2642 new TH3F(
"timeTTAllFEDs_RPC",
2643 "(ix,iy,time) for all FEDs (SM,TT binning) RPC EEP;ix;iy;Relative Time (1 clock = 25ns)",
2655 "OccupancyAllEvents_ExclusiveCSC",
"Occupancy all events Exclusive CSC EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2657 "Occupancy all events Coarse Exclusive CSC EEP;ix;iy",
2665 new TH2F(
"OccupancyAllEvents_CSC",
"Occupancy all events CSC EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2667 new TH2F(
"OccupancyAllEventsCoarse_CSC",
"Occupancy all events Coarse CSC EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2669 new TH1F(
"timeForAllFeds_CSC",
"timeForAllFeds CSC EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2671 new TH3F(
"timeTTAllFEDs_CSC",
2672 "(ix,iy,time) for all FEDs (SM,TT binning) CSC EEP;ix;iy;Relative Time (1 clock = 25ns)",
2684 "OccupancyAllEvents_ExclusiveHCAL",
"Occupancy all events Exclusive HCAL EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2686 "Occupancy all events Coarse Exclusive HCAL EEP;ix;iy",
2694 new TH2F(
"OccupancyAllEvents_HCAL",
"Occupancy all events HCAL EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2696 new TH2F(
"OccupancyAllEventsCoarse_HCAL",
"Occupancy all events Coarse HCAL EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2698 new TH1F(
"timeForAllFeds_HCAL",
"timeForAllFeds HCAL EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2700 new TH3F(
"timeTTAllFEDs_HCAL",
2701 "(ix,iy,time) for all FEDs (SM,TT binning) HCAL EEP;ix;iy;Relative Time (1 clock = 25ns)",
2713 new TH1F(
"numberofBCinSC",
"Number of Basic Clusters in Super Cluster EEP;Num Basic Clusters", 20, 0, 20);
2730 new TH1F(
"NumXtalsInClusterAllHist",
"Number of Xtals in Cluster EEP;NumXtals", 150, 0, 150);
2732 "Number of Xtals in Cluster vs Energy EEP;Energy (GeV);Number of Xtals in Cluster",
2740 new TH2F(
"NumXtalsVsHighEnergy",
2741 "Number of Xtals in Cluster vs Energy EEP;Energy (GeV);Number of Xtals in Cluster",
2750 new TH2F(
"OccupancyHighEnergyEvents",
"Occupancy high energy events EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2752 "OccupancyHighEnergyEventsCoarse",
"Occupancy high energy events Coarse EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2755 new TH1F(
"NumActiveXtalsInClusterAllHist",
"Number of active Xtals in Cluster EEP;NumXtals", 100, 0, 100);
2760 using namespace std;
2767 TFile root_file_(
fileName_.c_str(),
"RECREATE");
2771 TDirectory* FEDdir = gDirectory->mkdir(
dir.c_str());
2774 TH1F*
hist = itr->second;
2775 if (
hist !=
nullptr)
2778 cerr <<
"EcalCosmicsHists: Error: This shouldn't happen!" << endl;
2782 if (
hist !=
nullptr)
2785 cerr <<
"EcalCosmicsHists: Error: This shouldn't happen!" << endl;
2828 map<int, TH2F*>::const_iterator itr2d;
2831 TH2F* hist2 = itr2d->second;
2832 hist2->GetYaxis()->SetBinLabel(1,
"COSMIC");
2833 hist2->GetYaxis()->SetBinLabel(2,
"BEAMH4");
2834 hist2->GetYaxis()->SetBinLabel(3,
"BEAMH2");
2835 hist2->GetYaxis()->SetBinLabel(4,
"MTCC");
2836 hist2->GetYaxis()->SetBinLabel(5,
"LASER_STD");
2837 hist2->GetYaxis()->SetBinLabel(6,
"LASER_POWER_SCAN");
2838 hist2->GetYaxis()->SetBinLabel(7,
"LASER_DELAY_SCAN");
2839 hist2->GetYaxis()->SetBinLabel(8,
"TESTPULSE_SCAN_MEM");
2840 hist2->GetYaxis()->SetBinLabel(9,
"TESTPULSE_MGPA");
2841 hist2->GetYaxis()->SetBinLabel(10,
"PEDESTAL_STD");
2842 hist2->GetYaxis()->SetBinLabel(11,
"PEDESTAL_OFFSET_SCAN");
2843 hist2->GetYaxis()->SetBinLabel(12,
"PEDESTAL_25NS_SCAN");
2844 hist2->GetYaxis()->SetBinLabel(13,
"LED_STD");
2845 hist2->GetYaxis()->SetBinLabel(14,
"PHYSICS_GLOBAL");
2846 hist2->GetYaxis()->SetBinLabel(15,
"COSMICS_GLOBAL");
2847 hist2->GetYaxis()->SetBinLabel(16,
"HALO_GLOBAL");
2848 hist2->GetYaxis()->SetBinLabel(17,
"LASER_GAP");
2849 hist2->GetYaxis()->SetBinLabel(18,
"TESTPULSE_GAP");
2850 hist2->GetYaxis()->SetBinLabel(19,
"PEDESTAL_GAP");
2851 hist2->GetYaxis()->SetBinLabel(20,
"LED_GAP");
2852 hist2->GetYaxis()->SetBinLabel(21,
"PHYSICS_LOCAL");
2853 hist2->GetYaxis()->SetBinLabel(22,
"COSMICS_LOCAL");
2854 hist2->GetYaxis()->SetBinLabel(23,
"HALO_LOCAL");
2855 hist2->GetYaxis()->SetBinLabel(24,
"CALIB_LOCAL");
2953 TDirectory* EEMinusDir = gDirectory->mkdir(
"EEMinus");
3011 TDirectory* EEPlusDir = gDirectory->mkdir(
"EEPlus");
3107 TDirectory* highEnergyDir = gDirectory->mkdir(
"HighEnergy");
3108 highEnergyDir->cd();
3134 TDirectory* TimeStampdir = gDirectory->mkdir(
"EventTiming");
3159 using namespace std;
3160 ostringstream myStream;
3161 myStream <<
num << flush;
3162 return (myStream.str());