CMS 3D CMS Logo

DDG4ProductionCuts.cc File Reference

#include "SimG4Core/Physics/interface/DDG4ProductionCuts.h"
#include "SimG4Core/Notification/interface/SimG4Exception.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "G4ProductionCuts.hh"
#include "G4RegionStore.hh"
#include <algorithm>

Go to the source code of this file.

Functions

bool dd_is_greater (const std::pair< G4LogicalVolume *, DDLogicalPart > &p1, const std::pair< G4LogicalVolume *, DDLogicalPart > &p2)
 helper function to compare parts through their name instead of comparing them by their pointers.


Function Documentation

bool dd_is_greater ( const std::pair< G4LogicalVolume *, DDLogicalPart > &  p1,
const std::pair< G4LogicalVolume *, DDLogicalPart > &  p2 
)

helper function to compare parts through their name instead of comparing them by their pointers.

It's guaranteed to produce the same order in subsequent application runs, while pointers usually can't guarantee this

Definition at line 23 of file DDG4ProductionCuts.cc.

References HLT_VtxMuL3::result.

Referenced by DDG4ProductionCuts::initialize().

00024                                                                         {
00025   bool result = false;
00026   if (p1.second.name().ns() > p2.second.name().ns()) {
00027     result = true;
00028   }
00029   if (p1.second.name().ns() == p2.second.name().ns()) {
00030     if (p1.second.name().name() > p2.second.name().name()) {
00031       result = true;
00032     }
00033     if (p1.second.name().name() == p2.second.name().name()) {
00034       if (p1.first->GetName() > p2.first->GetName()) {
00035         result = true;
00036       }
00037     }
00038   }
00039   return result;
00040 }                  


Generated on Tue Jun 9 17:55:50 2009 for CMSSW by  doxygen 1.5.4