#include "Event.h" #include "CalorimeterConstants.h" #include "CalorimeterGeometry.h" #include "TH1.h" #include "TH2.h" void ana_simu(const Event* event) { static bool first = true; static TH1F *hcellE; static TH2F *hcellXYE; if ( first ) { hcellE = new TH1F("cellE","energie dans les cellules",100, 0., 100.); hcellXYE = new TH2F("cellXYE","vue X Y",CalConst::NbCellsInXY,CalConst::XYMin,CalConst::XYMax,CalConst::NbCellsInXY,CalConst::XYMin,CalConst::XYMax); first = false; } std::vector cal = event->CalData(); for ( std::vector::const_iterator it = cal.begin(); it != cal.end(); ++it ){ hcellE->Fill(it->energy()); hcellXYE->Fill(CalorimeterGeometry::xCentre(it->address()),CalorimeterGeometry::yCentre(it->address()),it->energy()); } }