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

more functionality

parent c0bd3970
No related tags found
No related merge requests found
Pipeline #2767982 failed
......@@ -33,7 +33,7 @@ if __name__ == "__main__":
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-FASER-01" # Needed to bypass autoconfig, only the "OFLCOND" matters at the moment
ConfigFlags.GeoModel.FaserVersion = "FASER-01" # Default FASER geometry
#ConfigFlags.Detector.SimulateFaserSCT = True
ConfigFlags.Input.Files = ["cosmics.HITS.pool.root"]#["my.COSMICHITS.pool.root"]
ConfigFlags.Input.Files = ["run001332.ESD.pool.root"]#["my.COSMICHITS.pool.root"]
ConfigFlags.lock()
# Configure components
......
......@@ -106,11 +106,19 @@ StatusCode ClusterReadAlg::execute(const EventContext& ctx) const
// Handles created from handle keys behave like pointers to the corresponding container
SG::ReadHandle<McEventCollection> h_mcEvents(m_mcEventKey);
ATH_MSG_INFO("Read McEventContainer with " << h_mcEvents->size() << " events");
ATH_MSG_INFO("\n\nTRIGGERS: Cluster:"<<m_clusterisValid<<" Trigger:"<<m_triggerisValid);
if (h_mcEvents->size() == 0) return StatusCode::FAILURE;
if (m_clusterisValid || m_triggerisValid) {
m_waveformExists = true;
}
if (m_clusterisValid && m_triggerisValid) {
m_allTriggered = true;
ATH_MSG_INFO("\n\nALL TRIGGERED\n\n");
}
// h_mcEvents->at(0)->print( msg().stream() );
SG::ReadHandle<FaserSiHitCollection> h_siHits(m_faserSiHitKey);
ATH_MSG_INFO("Read FaserSiHitCollection with " << h_siHits->size() << " hits");
......@@ -121,12 +129,15 @@ StatusCode ClusterReadAlg::execute(const EventContext& ctx) const
int row =hit.getRow();
int module = hit.getModule();
int sensor = hit.getSensor();
int energyloss= hit.energyLoss();
float energyloss= hit.energyLoss();
//std::cout<<"St:"<<station<<"\tPl:"<<plane<<"\tMod:"<<module<<"\n";
std::cout<<"\nENERGY LOSS"<<energyloss<<'\n';
++m_station[station];
m_hist->Fill(station);
if (energyloss!=0) m_hist2->Fill(energyloss);
if (energyloss!=0) {
m_hist2->Fill(energyloss);
std::cout<<"\nENERGY LOSS"<<energyloss<<'\n';
}
}
//SG::ReadHandle<FaserSCT_RDO_Container> h_sctRDO(m_faserRdoKey);
......@@ -149,7 +160,7 @@ StatusCode ClusterReadAlg::finalize()
ATH_MSG_INFO( m_numberOfClusterCollection<< " cluster collections processed" );
ATH_MSG_INFO( m_numberOfCluster<< " cluster processed" );
ATH_MSG_INFO("station distribution" << m_station[0] << m_station[1]<< m_station[2]<< m_station[3]);
ATH_MSG_INFO("station distribution" << m_station[0] <<" "<< m_station[1]<<" "<< m_station[2]<< m_station[3]);
......
......@@ -107,7 +107,8 @@ class ClusterReadAlg : public AthReentrantAlgorithm, AthHistogramming
mutable TTree* m_tree;
mutable int m_hash;
mutable bool m_waveformExists;
mutable bool m_waveformExists=false;
mutable bool m_allTriggered=false;
mutable int m_station[5]={}; //replace with coordinate vector later
mutable float m_energyLoss;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment