Commit 99365936 authored by vpalladi's avatar vpalladi

3d clustering updated to the newest version. Event.h has been modified in...

3d clustering updated to the newest version. Event.h has been modified in order to take into account the parameters for 2d and 3d clustring.
parent 55b020eb
......@@ -51,7 +51,7 @@ string hName(string sName, string endcap, string specificName){
class AnalysisTrgC2d : public AnalysisBase {
public:
AnalysisTrgC2d(const std::string &sRoot="", const std::string &sOut="")
AnalysisTrgC2d(const std::string &sRoot="", const std::string &sOut="" )
: AnalysisBase("AnalysisTrgC2d",sRoot,sOut) {
gEnlapsedTime = new TGraph();
......@@ -60,11 +60,16 @@ public:
hC3d[e] = new TH2F(hName(fName, sEndcapLabel[e], "C3d").c_str(),
hName(fName, sEndcapLabel[e], "C3d").c_str(),
100, 0, 1,
100, 0, 1);
200, -.5, .5,
200, -.5, .5);
for(int l=0; l<Geometry::kNumberOfLayers; l++){
gC3d[e][l] = new TGraph();
gC3d[e][l]->SetName( hName(fName, sEndcapLabel[e], sLayerLabel[l], "graphC3d").c_str() );
#ifdef JOHAN
hChargeVsRadius[e][l] = new TH2F( hName(fName, sEndcapLabel[e], sLayerLabel[l], "QvsR").c_str(),
hName(fName, sEndcapLabel[e], sLayerLabel[l], "QvsR").c_str(),
......@@ -237,7 +242,7 @@ public:
}
}
// cluShapes[e][l] = new TList;
// projShapes[e][l] = new TList;
projShapes[e][l] = new TList;
// cluShapesAll[e][l] = new TList;
}
}
......@@ -251,9 +256,15 @@ public:
// // clearing the lists
for(unsigned e(0); e<Geometry::kNumberOfEndcaps; e++) {
hC3d[e]->Reset("ICE");
for(unsigned l(0); l<Geometry::kNumberOfLayers; l++) {
gC3d[e][l]->Set(0);
// cluShapes[e][l]->Clear();
// projShapes[e][l]->Clear();
projShapes[e][l]->Clear();
// cluShapesAll[e][l]->Clear();
// hOccupancy_simHit[e][l]->Reset("ICE");
#ifdef C2D_OCCUPANCY
......@@ -262,6 +273,9 @@ public:
hOccupancyC2dEne[e][l]->Reset("ICE");
hOccupancyTrgHitEne[e][l]->Reset("ICE");
#endif
// hOccupancy_cilCoo[e][l]->Reset("ICE");
// vProjEneMips[e][l].clear();
}
......@@ -376,13 +390,13 @@ public:
}
}
// projections
//for(unsigned int i_par=0; i_par<vPhoton.size(); i_par++){
// Particle proj = vPhoton.at(i_par).project( Geometry::layerZ(e,l) );
// TEllipse* projShape = new TEllipse( proj.position().x(), proj.position().y(), cluRadius);
//projShapes[e][l]->Add( projShape );
/* store signal particle projections */
for(unsigned int i_par=0; i_par<vSignal.size(); i_par++){
Particle proj = vSignal.at(i_par).project( Geometry::layerZ(e,l) );
TEllipse* projShape = new TEllipse( proj.position().x(), proj.position().y(), cluRadius);
projShapes[e][l]->Add( projShape );
//vProjEneMips[e][l].push_back(0.);
//}
}
/**** Getting Clusters ****/
std::vector<TrgC2d> &vTrgC2d( event.trgC2ds(e,l) );
......@@ -432,8 +446,13 @@ public:
i_clu++;
/* for 3d clustering analysis */
hC3d[e]->Fill( clu->center().first/Geometry::layerZ(e, l), clu->center().second/Geometry::layerZ(e, l) );
hC3d[e]->Fill( clu->center().first/Geometry::layerZ(e, l),
clu->center().second/Geometry::layerZ(e, l)
);
gC3d[e][l]->SetPoint( gC3d[e][l]->GetN(),
clu->center().first/Geometry::layerZ(e, l),
clu->center().second/Geometry::layerZ(e, l)
);
/* only clusters with sim sig ene */
if( clu->containsSigEne() ){
nCluWithSimEne++;
......@@ -493,7 +512,7 @@ public:
else{
bool found=false;
for( unsigned i=0; i<waferIds.size(); i++ ){
if(clu->trgHits().at(i_tc)->wafer() == waferIds.at(i) )
if(clu->trgHits().at(i_tc)->wafer() == (int)waferIds.at(i) )
found=true;
}
if( !found )
......@@ -573,7 +592,7 @@ public:
//
/* write single event file */
writeEventOnDisk=true;
writeEventOnDisk=false;
if(writeEventOnDisk)
this->write( fEventNumber );
......@@ -593,13 +612,20 @@ public:
std::string fileName("AnalysisTrgC2dSpecific");
TFile fs( (fileName+"_"+sEvt.c_str()+".root").c_str(), "RECREATE" );
gEnlapsedTime->Write("TimeEnlapsed");
hC3d[0]->Write("endcap0_C3d");
hC3d[1]->Write("endcap1_C3d");
//gC3d[0]->Write("endcap0_C3dgraph");
//gC3d[1]->Write("endcap1_C3dgraph");
for(unsigned e(0); e<Geometry::kNumberOfEndcaps; e++) {
for(unsigned l(0); l<Geometry::kNumberOfLayers; l++) {
std::string label("");
// TFile f( (label+"Evt"+sEvt+sEndcapLabel[e]+sLayerLabel[l]+".root").c_str(), "RECREATE" );
TDirectory* dir = fs.mkdir( (label+"Evt"+sEvt+sEndcapLabel[e]+sLayerLabel[l]).c_str() );
dir->cd();
gC3d[e][l]->Write();
#ifdef C2D_OCCUPANCY
hOccupancyEmpty[e][l]->Write();
hOccupancyC2d[e][l]->Write();
......@@ -611,8 +637,7 @@ public:
// hOccupancy_simHit[e][l]->Write();
// cluShapesAll[e][l]->Write("cluShapesAll", TObject::kSingleKey);
// cluShapes[e][l]->Write("cluShapes", TObject::kSingleKey);
// projShapes[e][l]->Write("projShapes", TObject::kSingleKey);
// f.Close();
projShapes[e][l]->Write("projShapes", TObject::kSingleKey);
}
}
......@@ -631,7 +656,6 @@ private:
TH2Poly* hOccupancy_cilCoo[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers];
TH2Poly* hOccupancy_simHit[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers];
TH1F *hNcluPerLayer[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers];
/* energy relaterd histos */
......@@ -659,8 +683,8 @@ private:
TH2F *hCluRealCluEneRatioVsDistance[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers];
TH2F *hC3d[Geometry::kNumberOfEndcaps];
TGraph *gC3d[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers];
TTree pippa;
#ifdef JOHAN
TH2F *hChargeVsRadius[Geometry::kNumberOfEndcaps][Geometry::kNumberOfLayers];
......
This diff is collapsed.
......@@ -1220,6 +1220,13 @@ static double fTrgHitSelectorMipsCut;
static unsigned fTrgC2dCreatorMethod;
static unsigned fTrgC3dCreatorMethod;
// 2dC
static double fENERGY_CUT_Et;
static double fSEED_ENERGY_CUT_Et;
static double fENERGY_CUT;
static double fSEED_ENERGY_CUT;
// 3dC
static double fNormCooCut;
protected:
......@@ -1274,6 +1281,15 @@ unsigned Event::fTrgC2dCreatorMethod=4; /*near neighbours (version 3)*/
unsigned Event::fTrgC3dCreatorMethod=2; /* eta phi clustering */
/* energy thr for 2d clustering (in mips) */
double Event::fENERGY_CUT_Et = 15.;
double Event::fSEED_ENERGY_CUT_Et = 5.;
double Event::fENERGY_CUT = 25.;
double Event::fSEED_ENERGY_CUT = 10.;
/* cut in normalized coordinate for 3d clustering */
double Event::fNormCooCut = 10.;
//double Event::fNormCooCut=0.2; /* norm clustering cu in x/z y/z plane */
......
......@@ -287,6 +287,21 @@ public:
}
}
pair<float,float> centerNorm(){
pair<float,float> p(0, 0);
float layerZ = Geometry::layerZ( this->endcap(), this->layer() );
if( vTrgHit.size() > 0 ){
return pair<float,float>( fCenter.first/layerZ, fCenter.second/layerZ );
}
else{
return p;
}
}
pair<float,float> centerRhoPhi(){
pair<float,float> rphi(0, 0);
......@@ -352,6 +367,10 @@ public:
}
/* DISTANCES */
double distXY(TrgC2d& trgObj){
......
......@@ -12,6 +12,8 @@
class TrgC3d {
public:
TrgC3d() : fParticle(0) {
fCenterNorm.first = 0;
fCenterNorm.second = 0;
}
~TrgC3d() {
......@@ -24,6 +26,14 @@ public:
bool addTrgC2d(TrgC2d *s) {
assert(s->endcap()==fEndcap);
vTrgC2d.push_back(s);
if( vTrgC2d.size() == 1 ){
fCenterNorm.first = ( s->centerNorm().first ) ;
fCenterNorm.second = ( s->centerNorm().second ) ;
}
else{
fCenterNorm.first = ( fCenterNorm.first + s->centerNorm().first ) / 2;
fCenterNorm.second = ( fCenterNorm.second + s->centerNorm().second ) / 2;
}
return true;
}
......@@ -169,6 +179,15 @@ public:
}
*/
pair<float,float> centerNorm(){
return fCenterNorm;
}
float C2dDistanceNorm( pair<float,float> C2dCenter ){
double dist = sqrt( (fCenterNorm.first-C2dCenter.first)*(fCenterNorm.first-C2dCenter.first) + (fCenterNorm.second-C2dCenter.second)*(fCenterNorm.second-C2dCenter.second) ) ;
return dist;
}
Point position() const {
return fPosition;
}
......@@ -189,6 +208,14 @@ public:
return e;
}
bool containsSigEne(){
for(unsigned i(0);i<vTrgC2d.size();i++)
if( vTrgC2d[i]->containsSigEne() )
return true;
return false;
}
double mips() const {
double e(0.0);
for(unsigned i(0);i<vTrgC2d.size();i++) {
......@@ -197,6 +224,14 @@ public:
return e;
}
double transverseMips() const {
double e(0.0);
for(unsigned i(0);i<vTrgC2d.size();i++) {
e+=vTrgC2d[i]->transverseMips();
}
return e;
}
unsigned numberOfTrgC2ds() const {
return vTrgC2d.size();
}
......@@ -239,6 +274,24 @@ public:
return e;
}
double simMips(bool signal=false) const {
double e(0.0);
for(unsigned i(0);i<vTrgC2d.size();i++) {
e+=vTrgC2d[i]->simMips(signal);
}
return e;
}
double simTransverseMips(bool signal=false) const {
double e(0.0);
for(unsigned i(0);i<vTrgC2d.size();i++) {
e+=vTrgC2d[i]->simTransverseMips(signal);
}
return e;
}
/*
Point2D scale2D() const {
assert(vTrgC2d.size()>0);
......@@ -316,6 +369,8 @@ private:
double fChiSquared;
unsigned fNumberOfDof;
Particle *fParticle;
pair<float,float> fCenterNorm;
};
#endif
void trgC2dCreator() {
void trgC2dCreator(
) {
std::cout << "Calling Event::trgC2dCreator() with method "
<< fTrgC2dCreatorMethod << std::endl;
double SEED_ENERGY_CUT_Et = 15. ; // transverseMips
double ENERGY_CUT_Et = 5.; // transverseMips
double SEED_ENERGY_CUT = 25. ; // transverseMips
double ENERGY_CUT = 10.; // transverseMips
// double fSEED_ENERGY_CUT_Et = 15. ; // transverseMips
// double fENERGY_CUT_Et = 5.; // transverseMips
// double fSEED_ENERGY_CUT = 25. ; // transverseMips
// double fENERGY_CUT = 10.; // transverseMips
if(fTrgC2dCreatorMethod==0) {
for(unsigned e(0);e<Geometry::kNumberOfEndcaps;e++) {
......@@ -113,7 +114,7 @@ void trgC2dCreator() {
for(unsigned i_trgHit=0; i_trgHit<trgHits.size(); i_trgHit++){
if( trgHits.at(i_trgHit)->transverseMips()<ENERGY_CUT_Et)
if( trgHits.at(i_trgHit)->transverseMips()<fENERGY_CUT_Et)
continue;
unsigned trgHitCell, trgHitWafer, trgHitLayer, trgHitEndcap;
......@@ -124,7 +125,7 @@ void trgC2dCreator() {
bool toArchive=true;
if ( trgHits.at(i_trgHit)->transverseMips()>SEED_ENERGY_CUT_Et ){
if ( trgHits.at(i_trgHit)->transverseMips()>fSEED_ENERGY_CUT_Et ){
toArchive=false;
bool createNew=true;
......@@ -207,7 +208,7 @@ void trgC2dCreator() {
for(std::vector<TrgHit*>::iterator trgHit=trgHits.begin(); trgHit!=trgHits.end(); trgHit++){
if( (*trgHit)->transverseMips()<ENERGY_CUT_Et )
if( (*trgHit)->transverseMips()<fENERGY_CUT_Et )
continue;
unsigned trgHitCell, trgHitWafer, trgHitLayer, trgHitEndcap;
......@@ -223,7 +224,7 @@ void trgC2dCreator() {
if( clu->isNeighbour( (*trgHit) ) ) {
clu->addTrgHit( &vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] );
createNew=false;
if( (*trgHit)->transverseMips()>SEED_ENERGY_CUT_Et )
if( (*trgHit)->transverseMips()>fSEED_ENERGY_CUT_Et )
clu->seedAcquired();
if( (*trgHit)->simMips(true)>0.01 )
clu->setSigEne(true);
......@@ -235,7 +236,7 @@ void trgC2dCreator() {
vTrgC2d[e][l].push_back( TrgC2d( vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] ) );
vTrgC2d[e][l].back().addTrgHit( &vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] );
vTrgC2d[e][l].back().setUniqueId( uniqueId++ );
if( (*trgHit)->transverseMips()>SEED_ENERGY_CUT_Et )
if( (*trgHit)->transverseMips()>fSEED_ENERGY_CUT_Et )
vTrgC2d[e][l].back().seedAcquired();
if( (*trgHit)->simMips(true)>0 )
vTrgC2d[e][l].back().setSigEne(true);
......@@ -287,7 +288,7 @@ void trgC2dCreator() {
for(std::vector<TrgHit*>::iterator trgHit=trgHits.begin(); trgHit!=trgHits.end(); trgHit++){
if( (*trgHit)->transverseMips()<ENERGY_CUT_Et )
if( (*trgHit)->transverseMips()<fENERGY_CUT_Et )
continue;
unsigned trgHitCell, trgHitWafer, trgHitLayer, trgHitEndcap;
......@@ -303,7 +304,7 @@ void trgC2dCreator() {
if( clu->isNeighbour( (*trgHit) ) ) {
clu->addTrgHit( &vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] );
createNew=false;
if( (*trgHit)->transverseMips()>SEED_ENERGY_CUT_Et )
if( (*trgHit)->transverseMips()>fSEED_ENERGY_CUT_Et )
clu->seedAcquired();
if( (*trgHit)->simMips(true)>0.01 )
clu->setSigEne(true);
......@@ -315,7 +316,7 @@ void trgC2dCreator() {
vTrgC2d[e][l].push_back( TrgC2d( vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] ) );
vTrgC2d[e][l].back().addTrgHit( &vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] );
vTrgC2d[e][l].back().setUniqueId( uniqueId++ );
if( (*trgHit)->transverseMips()>SEED_ENERGY_CUT_Et )
if( (*trgHit)->transverseMips()>fSEED_ENERGY_CUT_Et )
vTrgC2d[e][l].back().seedAcquired();
if( (*trgHit)->simMips(true)>0 )
vTrgC2d[e][l].back().setSigEne(true);
......@@ -396,7 +397,7 @@ void trgC2dCreator() {
for(std::vector<TrgHit*>::iterator trgHit=trgHits.begin(); trgHit!=trgHits.end(); trgHit++){
if( (*trgHit)->mips()<ENERGY_CUT )
if( (*trgHit)->mips()<fENERGY_CUT )
continue;
unsigned trgHitCell, trgHitWafer, trgHitLayer, trgHitEndcap;
......@@ -412,7 +413,7 @@ void trgC2dCreator() {
if( clu->isNeighbour( (*trgHit) ) ) {
clu->addTrgHit( &vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] );
createNew=false;
if( (*trgHit)->mips()>SEED_ENERGY_CUT )
if( (*trgHit)->mips()>fSEED_ENERGY_CUT )
clu->seedAcquired();
if( (*trgHit)->simMips(true)>0.01 )
clu->setSigEne(true);
......@@ -424,7 +425,7 @@ void trgC2dCreator() {
vTrgC2d[e][l].push_back( TrgC2d( vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] ) );
vTrgC2d[e][l].back().addTrgHit( &vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] );
vTrgC2d[e][l].back().setUniqueId( uniqueId++ );
if( (*trgHit)->mips()>SEED_ENERGY_CUT )
if( (*trgHit)->mips()>fSEED_ENERGY_CUT )
vTrgC2d[e][l].back().seedAcquired();
if( (*trgHit)->simMips(true)>0 )
vTrgC2d[e][l].back().setSigEne(true);
......@@ -486,8 +487,8 @@ void trgC2dCreator() {
// clock_t begin = clock();
double CLU_DISTANCE = 5.; // cm
// double SEED_ENERGY_CUT_Et = 25. ; // transverseMips
// double ENERGY_CUT_Et = 10.; // transverseMips
// double fSEED_fENERGY_CUT_Et = 25. ; // transverseMips
// double fENERGY_CUT_Et = 10.; // transverseMips
// trgHits.at(i_trgHit).cell(), trgHits.at(i_trgHit).wafer(), trgHits.at(i_trgHit).layer(),
// int nPhotonsInAcc=0;
......@@ -522,7 +523,7 @@ void trgC2dCreator() {
std::sort( trgHits.begin(), trgHits.end(), eneOrder );
if( trgHits.size()==0 || trgHits.at(0)->transverseMips()<SEED_ENERGY_CUT_Et )
if( trgHits.size()==0 || trgHits.at(0)->transverseMips()<fSEED_ENERGY_CUT_Et )
continue;
vTrgC2d[e][l].push_back( TrgC2d( vTrgHit[trgHits.at(0)->endcap()][trgHits.at(0)->layer()][trgHits.at(0)->wafer()][trgHits.at(0)->cell()] ) );
......@@ -537,7 +538,7 @@ void trgC2dCreator() {
bool added = false;
// energy cut
if ( trgHits.at(i_trgHit)->transverseMips() < ENERGY_CUT_Et ){
if ( trgHits.at(i_trgHit)->transverseMips() < fENERGY_CUT_Et ){
//continue;
break;
}
......@@ -570,7 +571,7 @@ void trgC2dCreator() {
}
}
if( !added && trgHits.at(i_trgHit)->transverseMips() > SEED_ENERGY_CUT_Et ){
if( !added && trgHits.at(i_trgHit)->transverseMips() > fSEED_ENERGY_CUT_Et ){
vTrgC2d[e][l].push_back( TrgC2d( vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] ) );
vTrgC2d[e][l].back().addTrgHit( &vTrgHit[trgHitEndcap][trgHitLayer][trgHitWafer][trgHitCell] );
vTrgC2d[e][l].back().setUniqueId( uniqueId++ );
......
void trgC3dCreator() {
std::cout << "Calling Event::trgC3dCreator()" << std::endl;
std::cout << "Calling Event::trgC3dCreator() with method "
<< Event::fTrgC3dCreatorMethod << std::endl;
for(unsigned e(0);e<Geometry::kNumberOfEndcaps;e++) {
vTrgC3d[e].clear();
/* SEEDING THE 3D CLUSTERS */
const unsigned layerSeed = 10;
for( unsigned iC2d = 0; iC2d<vTrgC2d[e][layerSeed].size(); iC2d++ ) {
vTrgC3d[e].push_back( TrgC3d() );
vTrgC3d[e].back().setEndcap(e);
vTrgC3d[e].back().addTrgC2d( &(vTrgC2d[e][layerSeed][iC2d]) );
}
for(unsigned l(0); l<Geometry::kNumberOfLayers; l++) {
if( l == 10 )
continue;
for( unsigned iC2d = 0; iC2d<vTrgC2d[e][l].size(); iC2d++ ) {
TrgC2d probingTC = vTrgC2d[e][l].at(iC2d);
for(unsigned iC3d=0; iC3d<vTrgC3d[e].size(); iC3d++){
TrgC2d *seedTC = vTrgC3d[e].at(iC3d).trgC2ds().at(0);
double dist = seedTC->distEtaPhi( probingTC );
if( Event::fTrgC3dCreatorMethod == 0 ){
for(unsigned e(0);e<Geometry::kNumberOfEndcaps;e++) {
vTrgC3d[e].clear();
/* SEEDING THE 3D CLUSTERS */
const unsigned layerSeed = 10;
for( unsigned iC2d = 0; iC2d<vTrgC2d[e][layerSeed].size(); iC2d++ ) {
vTrgC3d[e].push_back( TrgC3d() );
vTrgC3d[e].back().setEndcap(e);
vTrgC3d[e].back().addTrgC2d( &(vTrgC2d[e][layerSeed][iC2d]) );
}
for(unsigned l(0); l<Geometry::kNumberOfLayers; l++) {
if( l == 10 )
continue;
for( unsigned iC2d = 0; iC2d<vTrgC2d[e][l].size(); iC2d++ ) {
TrgC2d probingTC = vTrgC2d[e][l].at(iC2d);
if(dist>0 && dist<0.02){
vTrgC3d[e][iC3d].addTrgC2d( &(vTrgC2d[e][l].at(iC2d)) );
for(unsigned iC3d=0; iC3d<vTrgC3d[e].size(); iC3d++){
TrgC2d *seedTC = vTrgC3d[e].at(iC3d).trgC2ds().at(0);
double dist = seedTC->distEtaPhi( probingTC );
if(dist>0 && dist<0.02){
vTrgC3d[e][iC3d].addTrgC2d( &(vTrgC2d[e][l].at(iC2d)) );
break;
}
}
}
}
}
}
//std::cout << " vTrgC3d[e].size() " << vTrgC3d[e].size() << std::endl;
}
//std::cout << " vTrgC3d[e].size() " << vTrgC3d[e].size() << std::endl;
}
} // method 0
if( Event::fTrgC3dCreatorMethod == 1 ){
for(unsigned e(0);e<Geometry::kNumberOfEndcaps;e++) {
vTrgC3d[e].clear();
//TH2D* h[5];
TH2D* h[1];
int Nbins = 100;
double halfRange = 0.5;
h[0] = new TH2D("_base",
"_base",
Nbins, -halfRange, halfRange,
Nbins, -halfRange, halfRange );
// h[1] = new TH2D("_up",
// "_up",
// Nbins, -halfRange, halfRange,
// Nbins, -halfRange+halfRange/Nbins, halfRange+halfRange/Nbins );
// h[2] = new TH2D("_down",
// "_down",
// Nbins, -halfRange, halfRange,
// Nbins, -halfRange-halfRange/Nbins, halfRange-halfRange/Nbins );
// h[3] = new TH2D("_right",
// "_right",
// Nbins, -halfRange+halfRange/Nbins, halfRange+halfRange/Nbins,
// Nbins, -halfRange, halfRange );
// h[4] = new TH2D("_left",
// "_left",
// Nbins, -halfRange-halfRange/Nbins, halfRange-halfRange/Nbins,
// Nbins, -halfRange, halfRange );
for(unsigned l(0); l<Geometry::kNumberOfLayers; l++) {
cout << "layer " << l << endl;
for( unsigned iC2d = 0; iC2d<vTrgC2d[e][l].size(); iC2d++ ) {
double xNorm= vTrgC2d[e][l].at(iC2d).center().first / Geometry::layerZ(e, l);
double yNorm= vTrgC2d[e][l].at(iC2d).center().second / Geometry::layerZ(e, l);
h[0]->Fill(xNorm, yNorm);
//cout << xNorm << " " << yNorm << endl;
}
// h[0]->SetMinimum(2);
while( h[0]->GetBinContent( h[0]->GetMaximumBin() )>3 ){
//cout << h[0]->GetBinContent( h[0]->GetMaximumBin() ) << endl;
h[0]->SetBinContent( h[0]->GetMaximumBin(), 0 );
}
}// layer
}// endcap