Skip to content
Snippets Groups Projects
Commit c8c4c519 authored by Savannah Rose Shively's avatar Savannah Rose Shively
Browse files

add veto and trigger

parent 8c10d27b
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ StatusCode SimHitAlg::initialize()
ATH_CHECK(histSvc()->regHist("/HIST/modulesSide1", m_moduleSide1));
ATH_CHECK(histSvc()->regHist("/HIST/modulesSide2", m_moduleSide2));
m_plate = new TH2D("plate", "Scint Hit Plate", 3, -1.5, 1.5, 4, -0.5, 3.5 );
m_plate = new TH2D("plate", "Scint Hit Plate", 3, -1, 1, 4, 0, 1 );
ATH_CHECK(histSvc()->regHist("/HIST/plates", m_plate));
// initialize data handle keys
......@@ -54,11 +54,11 @@ StatusCode SimHitAlg::execute()
ATH_MSG_INFO("Read FaserSiHitCollection with " << h_siHits->size() << " hits");
SG::ReadHandle<ScintHitCollection> h_preshowerHits(m_preshowerHitKey);
ATH_MSG_INFO("Read ScintHitCollection with " << h_preshowerHits->size() << " hits");
ATH_MSG_INFO("Read ScintHitCollection/Preshower with " << h_preshowerHits->size() << " hits");
SG::ReadHandle<ScintHitCollection> h_triggerHits(m_triggerHitKey);
ATH_MSG_INFO("Read ScintHitCollection with " << h_triggerHits->size() << " hits");
ATH_MSG_INFO("Read ScintHitCollection/Trigger with " << h_triggerHits->size() << " hits");
SG::ReadHandle<ScintHitCollection> h_vetoHits(m_vetoHitKey);
ATH_MSG_INFO("Read ScintHitCollection with " << h_vetoHits->size() << " hits");
ATH_MSG_INFO("Read ScintHitCollectionVeto with " << h_vetoHits->size() << " hits");
// Since we have no pile-up, there should always be a single GenEvent in the container
......@@ -71,8 +71,9 @@ StatusCode SimHitAlg::execute()
ATH_MSG_INFO("Event contains " << ev->particles_size() << " truth particles" );
// The hit container might be empty because particles missed the wafers
if (h_siHits->size() == 0) return StatusCode::SUCCESS;
else{
//if (h_siHits->size() == 0) return StatusCode::SUCCESS;
if (h_siHits->size()!=0){
// Loop over all hits; print and fill histogram
for (const FaserSiHit& hit : *h_siHits)
{
......@@ -94,31 +95,33 @@ StatusCode SimHitAlg::execute()
if (h_preshowerHits->size()!=0){
for (const ScintHit& hit : *h_preshowerHits)
{
hit.print();
m_hist->Fill(hit.energyLoss());
m_plate->Fill(hit.getStation(),hit.getPlate());
}
}
if (h_triggerHits->size()!=0){
for (const ScintHit& hit : *h_triggerHits)
{
hit.print();
m_hist->Fill(hit.energyLoss());
m_plate->Fill(hit.getStation(),hit.getPlate());
/*if (h_scintHits->size()!=0){
for (const ScintHit& hit : *h_scintHits)
}
}
if (h_vetoHits->size()!=0){
for (const ScintHit& hit : *h_vetoHits)
{
hit.print();
m_hist->Fill( hit.energyLoss() );
m_plate->Fill( hit.getStation(), hit.getPlate() );
/*if (hit.getSensor() == 0)
{
m_moduleSide1->Fill( hit.getModule(), hit.getRow());
}
else
{
m_moduleSide2->Fill( hit.getModule(), hit.getRow());
}//
m_hist->Fill(hit.energyLoss());
m_plate->Fill(hit.getStation(),hit.getPlate());
}
}*/
}
return StatusCode::SUCCESS;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment