52 |
|
//#include "Geometry/EcalBarrelAlgo/interface/EcalBarrelGeometry.h" |
53 |
|
//#include "Geometry/EcalEndcapAlgo/interface/EcalEndcapGeometry.h" |
54 |
|
#include "Geometry/Records/interface/CaloGeometryRecord.h" |
55 |
+ |
|
56 |
|
#include "Geometry/EcalAlgo/interface/EcalBarrelGeometry.h" |
57 |
|
#include "Geometry/EcalAlgo/interface/EcalEndcapGeometry.h" |
58 |
|
#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h" |
132 |
|
#include "DataFormats/METReco/interface/CaloMET.h" |
133 |
|
#include "DataFormats/METReco/interface/CaloMETFwd.h" |
134 |
|
|
135 |
+ |
#define FROG_ZLIB |
136 |
+ |
|
137 |
|
//#include "Visualisation/Frog/soft/Includes/FROG/FROG_Element_Base_With_DetId_And_Name.h" |
138 |
|
#include "Visualisation/Frog/soft/Includes/FROG/FROG_Element_Tools.h" |
139 |
|
#include "Visualisation/Frog/soft/Includes/FROG/FROG_Element_Tools.cpp" |
152 |
|
#include "Visualisation/Frog/soft/Includes/FROG/FROG_Coord.h" |
153 |
|
#include "Visualisation/Frog/soft/Includes/FROG/FROG_Coord.cpp" |
154 |
|
|
155 |
+ |
#include "Visualisation/Frog/soft/Includes/FROG/FROG_ZLib.h" |
156 |
+ |
#include "Visualisation/Frog/soft/Includes/FROG/FROG_ZLib.cpp" |
157 |
+ |
|
158 |
|
|
159 |
|
|
160 |
|
using namespace edm; |
214 |
|
|
215 |
|
// ----------member data --------------------------- |
216 |
|
|
217 |
+ |
bool CompressFiles; |
218 |
+ |
|
219 |
+ |
|
220 |
|
bool ProduceGeom; |
221 |
|
int NEventsInVisFile; |
222 |
|
int NEvents; |
268 |
|
|
269 |
|
ProduceGeom = iConfig.getParameter<bool >("ProduceGeom" ); |
270 |
|
NEventsInVisFile = iConfig.getParameter<int >("NEventsInVisFile" ); |
271 |
+ |
CompressFiles = iConfig.getParameter<bool >("CompressFiles" ); |
272 |
+ |
|
273 |
|
|
274 |
|
NEvents = 0; |
275 |
|
} |
632 |
|
// ### CALO GEOMETRY ### |
633 |
|
|
634 |
|
edm::ESHandle<CaloGeometry> CaloGeom; |
635 |
+ |
// iSetup.get<CaloGeometryRecord>().get( CaloGeom ); |
636 |
|
iSetup.get<CaloGeometryRecord>().get( CaloGeom ); |
637 |
|
const vector<DetId> CaloDets = CaloGeom->getValidDetIds(); |
638 |
|
|
811 |
|
// ### Save .geom ### |
812 |
|
|
813 |
|
FROG_Geometry* CMS_Geom = new FROG_Geometry(prim); |
814 |
< |
CMS_Geom->Save("CMS.geom"); |
814 |
> |
CMS_Geom->Save("CMS.geom", CompressFiles); |
815 |
> |
delete CMS_Geom; |
816 |
|
} |
817 |
|
|
818 |
|
events_prim = new FROG_Element_Base(C_PRIMARY); |
825 |
|
if(NEvents>0){ |
826 |
|
char OutputFileName[1024]; |
827 |
|
sprintf(OutputFileName,"%s",OutputFile.substr(0,OutputFile.size()-4).c_str()); |
828 |
< |
if(NEventsInVisFile>=0)sprintf(OutputFileName,"%s_R%i_E%i.vis",OutputFileName,SRun,SEvent); |
828 |
> |
if(NEventsInVisFile>=0)sprintf(OutputFileName,"%s_Run%i_1stEvent%08i",OutputFileName,SRun,SEvent); |
829 |
|
sprintf(OutputFileName,"%s.vis",OutputFileName); |
830 |
|
|
831 |
|
FROG_Events* events = new FROG_Events(events_prim); |
832 |
< |
events->Save((char*) OutputFileName); |
832 |
> |
events->Save((char*) OutputFileName, CompressFiles); |
833 |
|
delete events; |
834 |
|
delete events_prim; |
835 |
|
|
900 |
|
|
901 |
|
|
902 |
|
// ### SIM OBJECTS CONTAINER ### |
903 |
< |
FROG_Element_Base_With_DetId_And_Name* frogSim = new FROG_Element_Base_With_DetId_And_Name( EVTID_GEN, "SIM"); |
903 |
> |
FROG_Element_Base_With_DetId_And_Name* frogSim = new FROG_Element_Base_With_DetId_And_Name( EVTID_SIM, "SIM"); |
904 |
|
event->addDaughter(frogSim); |
905 |
|
|
906 |
|
// ### SIMTRACK ### |
1002 |
|
|
1003 |
|
|
1004 |
|
// ### LOW RECO OBJECTS CONTAINER ### |
1005 |
< |
FROG_Element_Base_With_DetId_And_Name* frogLowReco = new FROG_Element_Base_With_DetId_And_Name( EVTID_GEN, "RECO LOW"); |
1005 |
> |
FROG_Element_Base_With_DetId_And_Name* frogLowReco = new FROG_Element_Base_With_DetId_And_Name( EVTID_LOWRECO, "RECO LOW"); |
1006 |
|
event->addDaughter(frogLowReco); |
1007 |
|
|
1008 |
|
|
1209 |
|
|
1210 |
|
if(i==0 && CaloTowersProducersBasedOnCaloHits){ |
1211 |
|
frogTower->Components_CollEvtId_ = EVTID_CALOHIT; |
1212 |
< |
std::vector<DetId> TowersDetIds = Calo_Towers[h].constituents(); |
1213 |
< |
for(unsigned int D=0;D<TowersDetIds.size();D++){frogTower->Components_Vector_.push_back(TowersDetIds[D]);} |
1212 |
> |
|
1213 |
> |
|
1214 |
> |
for(unsigned int D=0;D<Calo_Towers[h].constituentsSize();D++){frogTower->Components_Vector_.push_back(Calo_Towers[h].constituent(D));} |
1215 |
> |
|
1216 |
> |
// std::vector<DetId> TowersDetIds = Calo_Towers[h].constituents(); |
1217 |
> |
// for(unsigned int D=0;D<TowersDetIds.size();D++){frogTower->Components_Vector_.push_back(TowersDetIds[D]);} |
1218 |
|
} |
1219 |
|
|
1220 |
|
} |
1223 |
|
|
1224 |
|
|
1225 |
|
// ### MED RECO OBJECTS CONTAINER ### |
1226 |
< |
FROG_Element_Base_With_DetId_And_Name* frogMedReco = new FROG_Element_Base_With_DetId_And_Name( EVTID_GEN, "RECO MED"); |
1226 |
> |
FROG_Element_Base_With_DetId_And_Name* frogMedReco = new FROG_Element_Base_With_DetId_And_Name( EVTID_MEDRECO, "RECO MED"); |
1227 |
|
event->addDaughter(frogMedReco); |
1228 |
|
|
1229 |
|
|
1338 |
|
|
1339 |
|
|
1340 |
|
// ### HIGH RECO OBJECTS CONTAINER ### |
1341 |
< |
FROG_Element_Base_With_DetId_And_Name* frogHighReco = new FROG_Element_Base_With_DetId_And_Name( EVTID_GEN, "RECO HIGH"); |
1341 |
> |
FROG_Element_Base_With_DetId_And_Name* frogHighReco = new FROG_Element_Base_With_DetId_And_Name( EVTID_HIGHRECO, "RECO HIGH"); |
1342 |
|
event->addDaughter(frogHighReco); |
1343 |
|
|
1344 |
|
|
1381 |
|
frogCaloJetColl->addDaughter(frogJet); |
1382 |
|
|
1383 |
|
if(CaloJetsProducersBasedOnCaloTowers){ |
1384 |
< |
std::vector<CaloTowerPtr> CaloTowers = Calo_Jets[h].getCaloConstituents(); |
1384 |
> |
|
1385 |
> |
std::vector<CaloTowerPtr> CaloTowers = Calo_Jets[h].getCaloConstituents(); |
1386 |
|
frogJet->Components_CollEvtId_ = EVTID_CALOTOWER + 1; |
1387 |
|
for(unsigned int t=0;t<CaloTowers.size();t++){ frogJet->Components_Vector_.push_back(CaloTowers[t]->id().rawId());} |
1388 |
|
} |
1430 |
|
if(NEvents == NEventsInVisFile){ |
1431 |
|
char OutputFileName[1024]; |
1432 |
|
sprintf(OutputFileName,"%s",OutputFile.substr(0,OutputFile.size()-4).c_str()); |
1433 |
< |
if(NEventsInVisFile>=0)sprintf(OutputFileName,"%s_R%i_E%i.vis",OutputFileName,SRun,SEvent); |
1433 |
> |
if(NEventsInVisFile>=0)sprintf(OutputFileName,"%s_Run%i_1stEvent%08i",OutputFileName,SRun,SEvent); |
1434 |
|
sprintf(OutputFileName,"%s.vis",OutputFileName); |
1435 |
|
|
1436 |
|
FROG_Events* events = new FROG_Events(events_prim); |
1437 |
< |
events->Save((char*) OutputFileName); |
1437 |
> |
events->Save((char*) OutputFileName, CompressFiles); |
1438 |
|
delete events; |
1439 |
|
delete events_prim; |
1440 |
|
|